commitall

This commit is contained in:
Sampanna Rimal
2024-07-10 18:28:19 +05:45
parent 140abda4e6
commit 9cd05ef3cb
15723 changed files with 4818733 additions and 0 deletions

View File

@ -0,0 +1,584 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.error {
color: red;
font-size: 12px;
}
input[type="number"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 160px;
}
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.course_grade_details_table input[type="text"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
}
.course_grade_details_table input[type="number"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 90px;
}
.course_grade_details_table td,
.course_grade_details_table th {
border: 0;
padding: 15px 10px;
}
.course_grade_details_table {
border: 0;
}
.course_grade_details_table td {
text-align: left;
padding: 8px 10px;
}
.course_grade_details_table th {
font-weight: 300;
font-size: 15px;
color: black;
border-bottom: 2px solid #032da1;
}
.scrollable_table thead {
display: table;
width: 100%;
}
.scrollable_table tbody {
display: block;
overflow-y: scroll;
max-height: 400px;
}
.scrollable_table th,
.scrollable_table td {
width: 130px;
font-size: 12px;
}
.scrollable_table tr {
display: table;
width: 100%;
box-sizing: border-box;
}
.scrollable_table th:nth-child(1),
.scrollable_table td:nth-child(1) {
width: 42px;
}
span.margin-t {
margin-top: 5px;
display: block;
}
.bootstrap-select .dropdown-toggle .filter-option {
top: 0px;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<div class="subsec_sec" style="display:block">
<form id="searchFilters" action="<?= base_url(); ?>admin/accounting-ledgers" method="POST" onkeydown=" return event.key != 'Enter'">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover" style="margin-bottom: 4px;">
<div class="report_sec_left">
<?php
$f_f_types = array();
$currency_symbol = $school_info['currency_symbol'];
$search_batch = (isset($_POST['f_batch']) && !empty($_POST['f_batch'])) ? $_POST['f_batch'] : '';
$search_course_id = (isset($_POST['f_course']) && !empty($_POST['f_course'])) ? $_POST['f_course'] : '';
$search_section = (isset($_POST['f_section']) && !empty($_POST['f_section'])) ? $_POST['f_section'] : '';
$search_fee_types = (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types'])) ? $_POST['filter_fee_types'] : '';
$theExportHeader = 'Scholarships';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . $school_info['address'] . '\n Scholarships';
}
if (count($_POST) > 0) {
if (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types'])) {
$f_f_types = $_POST['filter_fee_types'];
}
}
// print_r($_POST);
?>
</div>
<div class="subject_lhead">Account Ledgers</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-2 pr-0">
<div class="subject-filter">
<label class="has-float-label">
<select id="f_batch" name="f_batch" class="custom-select form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
if ($search_batch != '')
$b_selected = ($row['id'] == $search_batch) ? 'selected' : '';
else
$b_selected = ($row['id'] == $school_info['batch_id']) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<span>Select Batch <span style="font-weight:bold;color:red;"> * </span></span>
</label>
<div class="text-danger cierr"><?php echo form_error('f_batch'); ?></div>
</div>
</div>
<div class="col-md-2 px-0">
<div class="subject-filter">
<label class="has-float-label">
<select id="f_user_type" name="f_user_type" class="custom-select form-control">
<option value="teacher" <?= $user_type == 'teacher' ? 'selected' : '' ?>>Teacher</option>
<option value="student" <?= $user_type == 'student' ? 'selected' : '' ?>>Student</option>
</select>
<span>Send Notice</span>
</label>
</div>
</div>
<div class="col-md-2 px-0 stdSection">
<div class="subject-filter">
<label class="has-float-label">
<select id="f_course" name="f_course" class="custom-select form-control">
<option value="">Select Class</option>
<?php foreach ($course as $c_value) {
$course_selected = ($c_value['id'] == $search_course_id) ? 'selected' : '';
?>
<option value="<?= $c_value['id']; ?>" <?= $course_selected; ?>><?php echo $c_value['course_name']; ?> </option>
<?php } ?>
</select>
<span>Select Class</span>
</label>
</div>
</div>
<div class="col-md-2 px-0 stdSection">
<div class=" form-group subject-filter">
<label class="has-float-label">
<?php if ($search_course_id != '' && $search_course_id > 0) {
$sql = "SELECT s.id as section_id,s.section_name FROM course_sections cs JOIN section s ON s.id=cs.section_id WHERE cs.course_id='$search_course_id' ORDER BY s.id DESC";
$section_list = $this->Admin_model->get_query_result($sql);
?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
if (isset($section_list) && !empty($section_list)) {
foreach ($section_list as $se_val) { ?>
<option value="<?php echo $se_val['section_id'] ?>" <?php if (isset($search_section) && !empty($search_section)) {
echo (in_array($se_val['section_id'], $search_section)) ? 'selected' : '';
} ?>><?php echo $se_val['section_name'] ?></option>
<?php }
} ?>
</select>
<?php } else { ?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
</select>
<?php } ?>
<span>Select Section</span>
</label>
</div>
</div>
<div class="col-md-3 px-0">
<div class="date-filter">
<input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success " style="width:250px;height:40px;" value="Filter">
<a href="<?php echo base_url() ?>admin/total-due-report">
<div class="date-filter"> <button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<form method="post" id="sendSmsAll" action="<?php echo base_url(); ?>Admin/createLedgerAccount">
<input type="hidden" name="batch_id" id="batch_id">
<input type="hidden" name="course_id" id="course_id">
<input type="hidden" name="user_t" id="userT">
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<?php if ($user_type == 'student') { ?>
<!-- changed ID -->
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th><input type="checkbox" id="chkParent" /></th>
<th>Roll No</th>
<th>Student Id </th>
<th>Student Name</th>
<th>Class</th>
<th>Section</th>
<th>Guardian Name</th>
<th>Contact Number</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
// echo '<pre>';
// var_dump($students);
$sno = 1;
if (isset($students) && !empty($students)) {
// echo '<pre>';
// print_r($students);
foreach ($students as $svalue) {
?>
<tr>
<td>
<?php if (empty($svalue['ledger_account'])) { ?>
<input type="checkbox" name="contact_list[]" value="<?= $svalue['studentId'] ?>" />
<?php } else { ?>
<i class="fa fa-check text-success" aria-hidden="true"></i>
<?php } ?>
</td>
<td><?= $svalue['roll_no']; ?></td>
<td class="text-left"><?= $svalue['studentId']; ?></td>
<td class="text-left"><?= $svalue['student_name']; ?></td>
<td class="text-left"><?= $svalue['course_name']; ?></td>
<td class="text-left"><?= $svalue['section_name']; ?></td>
<td class="text-left"><?= $svalue['guardian_name']; ?></td>
<td class="text-left"><?= $svalue['guardian_contact_number']; ?></td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
<?php } else { ?>
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th><input type="checkbox" id="chkParent" /></th>
<th>S.No.</th>
<th>Teacher Id</th>
<th>Designation</th>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
</tr>
</thead>
<tbody>
<?php
// echo '<pre>';
// var_dump($students);
$sno = 1;
if (isset($teachers) && !empty($teachers)) {
// echo '<pre>';
// print_r($students);
foreach ($teachers as $teacher) {
?>
<tr>
<td>
<?php if (empty($teacher['ledger_account'])) { ?>
<input type="checkbox" name="contact_list[]" value="<?= $teacher['teacherId'] ?>" />
<?php } else { ?>
<i class="fa fa-check text-success" aria-hidden="true"></i>
<?php } ?>
</td>
<td><?= $sno; ?></td>
<td class="text-capitalize text-left"><?= $teacher['teacherId']; ?></td>
<td class="text-left">
<?php
$desig = '';
foreach ($hr_designation as $desKey => $designation) {
if ($designation['id'] == $teacher['designation']) {
$desig = $designation['title'];
}
}
?>
<?= !empty($desig) ? $desig : '-' ?>
</td>
<td class="text-left"><?= $teacher['teacher_name']; ?></td>
<td class="text-left">
<div class="email-width" title="<?= $teacher['email']; ?>"><?= $teacher['email']; ?></div>
</td>
<td><?= $teacher['mobile']; ?></td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
<?php } ?>
<button type="submit" style="font-size: 14px;padding: 6px 25px; " class="subject_addbtn send_ntice float-right mt-3" id="send_ntice">Create Account</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
// $(document).on('click', '#filter_reset1', function() {
// $('#txt-submit').show();
// });
$(document).on('click', '.send_ntice', function() {
var studentidlist = [];
let batchId = $('#f_batch option:selected').val();
let courseId = $('#f_course option:selected').val();
let markCount = 0;
if (batchId == '') {
markCount++;
alert("Please Select Batch");
}
if (markCount === 0) {
$.each($("input[name='contact_list[]']:checked"), function() {
var item = $(this).data('studentid');
studentidlist.push(item);
});
if (studentidlist.length === 0) {
alert("Please Select Students" + studentidlist.length);
} else {
// alert("Please Select Students 33333 " + studentidlist.length);
$('#sendSmsAll').submit();
}
}
});
</script>
<script>
$(document).ready(function() {
$('.stdSection').hide();
var userType = '<?= $user_type ?>';
var batchId = '<?= $search_batch ?>';
console.log(userType);
if (userType === 'teacher') {
$('.stdSection').hide();
} else {
$('.stdSection').show();
}
$('#userT').val(userType);
$('#batch_id').val(batchId);
$('#chkParent').click(function() {
var isChecked = $(this).prop("checked");
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').prop('checked', isChecked);
});
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').click(function() {
var isChecked = $(this).prop("checked");
var isHeaderChecked = $("#chkParent").prop("checked");
if (isChecked == false && isHeaderChecked)
$("#chkParent").prop('checked', isChecked);
else {
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').each(function() {
if ($(this).prop("checked") == false)
isChecked = false;
});
console.log(isChecked);
$("#chkParent").prop('checked', isChecked);
}
});
});
$(document).ready(function() {
$("#searchFilters").validate({
rules: {
f_batch: 'required',
// f_course: 'required'
},
submitHandler: function(form, e) {
e.preventDefault();
form.submit();
}
});
});
$('#f_course').change(function() {
var course = $('#f_course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#f_section').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
$('#f_user_type').change(function() {
var userType = $('#f_user_type option:selected').val();
// alert(course);
if (userType === 'teacher') {
$('.stdSection').hide();
} else {
$('.stdSection').show();
}
$('#userT').val(userType);
});
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[50, -1],
[50, "All"]
],
});
//table js end
//multiple select js start
$('#f_section').selectpicker();
$('#f_feetype').selectpicker();
//multiple select js end
});
</script>
</body>
</html>

View File

@ -0,0 +1,208 @@
<style>
.error {
color: red;
padding-top: 2px;
}
</style>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<div class="wraper responsive-width">
<main class="" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_l subject_l_full_width ">
<div class="subject_lsec">
<?php
$statusArr = array('yes' => 'Yes', 'no' => 'No');
$bname = '';
$bfrom = '';
$bend = '';
$status = '';
//echo '<pre>'; print_r($batchDetails);exit;
if (isset($batchDetails) && !empty($batchDetails)) {
$bname = $batchDetails[0]['b_name'];
$bfrom = $batchDetails[0]['b_from'];
$bend = $batchDetails[0]['b_end'];
$status = $batchDetails[0]['is_active'];
}
?>
<div class="subject_lhead"><?php echo $title; ?></div>
<form id="addEditBatchForm" method="post" action="<?php echo base_url(); ?>admin/add-edit-batch/<?php echo $bid ?>">
<div class="subject_lformarea">
<div class="form-group">
<input type="hidden" name="id" id="id" class="form-control" value="<?= $bid; ?>">
<label>Batch Name <span class="text-danger">*</span></label>
<input type="text" name="b_name" id="b_name" class="form-control" value="<?php echo $bname; ?>" placeholder="Enter batch name">
<p id="error_b_name" style="color:red;"></p>
<label id="batcherror" class="error" style="display : none"></label>
</div>
<div class="form-group assign_subject">
<label>Batch Start Date <span class="text-danger">*</span></label>
<div class="po-calendar">
<input type="text" name="b_from" id='b_from' class="nepal-date form-control" value="<?php echo $bfrom; ?>" placeholder="Enter start date">
<i class="fas fa-calendar-alt cal-icon"></i>
</div>
<p id="error_b_from" style="color:red;"></p>
</div>
<div class="form-group">
<label>Batch End Date <span class="text-danger">*</span></label>
<div class="po-calendar">
<input type="text" name="b_end" id="b_end" class="nepal-date form-control" value="<?php echo $bend; ?>" placeholder="Enter end date">
<i class="fas fa-calendar-alt cal-icon"></i>
</div>
<p id="error_b_end" style="color:red;"></p>
</div>
<div class="form-group">
<label>Status <span class="text-danger">*</span></label>
<select name="is_active" id="is_active" class="form-control">
<option value=''>Select</option>
<?php
foreach ($statusArr as $key => $val) {
?>
<option <?php if ($status == $key) { ?> selected <?php } ?> value='<?php echo $key; ?>'><?php echo $val; ?></option>
<?php
}
?>
</select>
<p id="error_is_active" style="color:red;"></p>
</div>
<button type="submit" class="subject_addbtn"><?php echo $btn_value = (($bid > 0) ? 'Update' : 'Add'); ?>
</button>&nbsp;&nbsp;
<a href="<?= base_url(); ?>admin/batches"><button type="button" class="subject_addbtn bg-dark">Back</button></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
</div>
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script> -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
//multiple select js start
$('select').selectpicker();
//multiple select js end
var todaysDate = new Date();
var year = todaysDate.getFullYear();
var month = ("0" + (todaysDate.getMonth() + 1)).slice(-2);
var day = ("0" + todaysDate.getDate()).slice(-2);
var maxDate = (year + "-" + month + "-" + day);
$('input[type=date]').attr('min', maxDate);
$(document).on("change", "#b_from", function() {
var bdate = $(this).val();
// alert(bdate);
$('#b_end').attr('min', bdate);
$('#b_end').val('');
});
});
$(document).ready(function() {
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 -]{3,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#addEditBatchForm").validate({
ignore: "input[type='text']:hidden",
rules: {
b_name: {
required: true,
rangelength: [2, 20],
inputregx: true,
},
b_from: {
required: true,
},
b_end: {
required: true,
},
is_active: {
required: true,
},
},
messages: {
b_name: {
required: "Please enter Batch name ",
},
b_from: {
required: "Please Select Batch From",
},
b_end: {
required: "Please Select Batch End",
},
is_active: {
required: "Please Select Status",
},
},
submitHandler: function(form) {
var EditId = "<?= $bid ?>";
// if (EditId == 0) {
var inputValue = $("input[name='b_name']", form).val();
let flag=false;
$.ajax({
url: "<?= base_url() ?>admin/checknamewithId",
data: {
id:EditId,
value: inputValue,
tablename: "batch",
column: "b_name"
},
type: 'POST',
async: false,
success: function(data) {
// console.log(data);
if (data == 'success' ) {
flag=true;
}
}
});
if(flag){
form.submit();
}
else {
$('#batcherror').show();
$('#batcherror').text('This Batch name already exists.');
}
// } else {
// form.submit();
// }
}
});
});
</script>

View File

@ -0,0 +1,186 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group">
<a href="<?= base_url(); ?>admin/course"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead"><?php if($cid==0){ echo 'Add Course'; }else{ echo 'Update Course'; } ?></div>
<?php
$name = ''; $subjects=''; $cfee=''; $afee='';
if(isset($detail)){
$name = $detail['course_name'];
$subjects = $detail['subject_id'];
$sub = explode(',', $subjects);
$cfee = $detail['course_fee'];
$afee = $detail['application_fee'];
}
?>
<form id="coursefrom" method="post">
<input type="hidden" name="cid" id="cid" value="<?= $cid; ?>">
<div class="subject_lformarea">
<div class="form-group">
<label for="">Course Name*</label>
<input type="text" name="cname" id="cname" class="form-control" value="<?= $name; ?>" placeholder="Enter course name">
<p id="cname_error" style="color:red;"></p><p id="exists_error" style="color:red;"></p>
</div>
<div class="form-group assign_subject">
<label>Assign Subject*</label>
<select name="csubject[]" id="csubject" class="selectpicker" multiple data-live-search="true">
<?php foreach($subject_list as $subject) { ?>
<option value="<?= $subject['id']; ?>"><?= $subject['subject_name']; ?></option>
<?php } ?>
</select>
<p id="csubject_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Course Fee*</label>
<input type="text" name="cfee" id="cfee" class="form-control" value="<?= $cfee; ?>" placeholder="Enter course fee">
<p id="cfee_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Application Fee*</label>
<input type="text" name="afee" id="afee" class="form-control" value="<?= $afee; ?>" placeholder="Enter application fee">
<p id="afee_error" style="color:red;"></p>
<p id="success" style="color:green;"></p>
</div>
<button type="button" class="subject_addbtn" onclick="validate_course_form();"><?php if($cid==0){ echo 'Add'; }else{ echo 'Update'; } ?></button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="SuccessModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<h4>Course added successfully.</h4>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Ok</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script> -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function(){
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
<script type="text/javascript">
function hide_all_course_error(){
$('#cname_error').hide();
$('#csubject_error').hide();
$('#cfee_error').hide();
$('#afee_error').hide();
$('#success').html('');
}
function cleanup_course_val(){
$('#cname').val('');
$('#csubject').val('');
$('#cfee').val('');
$('#afee').val('');
$('#exists_error').html('');
}
function validate_course_form()
{
hide_all_course_error();
var errArr = new Array();
var cname = $('#cname').val().trim();
var regex = /^([a-zA-Z0-9\s]{3,})+$/;
if(cname==''){
errArr.push('cname_Sep@Str_Please enter course.');
}else if(!regex.test(cname)){
errArr.push('cname_Sep@Str_Please enter only alphabets and must be min 3 characters.');
}
var csubject = $('#csubject').val();
if(csubject==''){
errArr.push('csubject_Sep@Str_Please select subject.');
}
var cfee = $('#cfee').val().trim();
var regexno = /^[0-9]+(\.[0-9]{2})?$/;
if(cfee==''){
errArr.push('cfee_Sep@Str_Please enter course fee.');
}else if(!regexno.test(cfee)){
errArr.push('cfee_Sep@Str_Accepts only number.');
}
var afee = $('#afee').val().trim();
var regexno = /^[0-9]+(\.[0-9]{2})?$/;
if(afee==''){
errArr.push('afee_Sep@Str_Please enter application fee.');
}else if(!regexno.test(afee)){
errArr.push('afee_Sep@Str_Accepts only number.');
}
if(errArr.length>0)
{
for(i=0; i<errArr.length; i++)
{
var resArr = errArr[i].split("_Sep@Str_");
$("#"+resArr[0]+"_error").html(resArr[1]);;
$("#"+resArr[0]+"_error").show();
}
var xxxVal = errArr[0].split('_Sep@Str_');
$('#'+xxxVal[0]).focus();
return false;
}
else{
$('#coursefrom').submit();
}
}
$('#coursefrom').submit(function(e){
e.preventDefault();
var formData = new FormData(this);
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>Admin/addedit_course",
data : formData,
success:function(resposne){
if(resposne == '1'){
cleanup_course_val();
// $('#success').html('Course added successfully.');
$('#SuccessModal').modal('show');
}else if(resposne == '2'){
$('#success').html('Course updated successfully.');
}else if(resposne == '0'){
$('#success').html('');
$('#exists_error').html('Course already exists.');
}
},
contentType : false,
processData : false,
});
});
</script>

View File

@ -0,0 +1,814 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js"></script>
<style>
label.error {
color : red;
}
.np-datepicker {
border: 1px solid #ced4da;
}
.fee-installment-table .installment_amount input {
border: 1px solid #ced4da;
font-size: 13px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form id="installmentform" action="<?= base_url() ?>admin/insert_update_feeinstallment/<?= $fees_id ?>" method ="POST">
<div class="subsec_sec">
<?php if($fees_id == 0) { ?>
<div class="subject_l subject_l_full_width" style="width:45%">
<div class="subject_lsec">
<div class="subject_lhead">Create Fee Installment</div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Select Batch<span class="text-danger font-weight-bold">*</span></label>
<?php //print_r($installment); ?>
<select class="form-control" id="batch_id" name="batch_id" >
<option selected disabled>Select Batch</option>
<?php foreach($batch as $cur){
if($cur['id'] == $cid) { ?>
<option value="<?= $cur['id']; ?>" selected><?= $cur['b_name'] . ' : ' . batchdateFormatTo($cur['b_from'],$cur['b_end']); ?></option>
<?php } else { ?>
<option value="<?= $cur['id']; ?>"> <?= $cur['b_name'] . ' : ' . batchdateFormatTo($cur['b_from'],$cur['b_end']); ?> </option>
<?php }
}
?>
</select>
</div>
<div class="form-group">
<label for="">Select Course<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" name="ficourse" id="ficourse">
<option selected disbaled value="">Please select batch above</option>
</select>
<p id="ficourse_error" style="color:red;"></p>
<p id="sname_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Select Feetype<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" name="ft_id" id="ft_id">
<option selected disabled value="">Select Now</option>
<option value="1">Please select course above</option>
</select>
</div>
<div class="hostel-plan form-group" id="hostel_plan_container" style="display:none">
<label for="">Select Hostel Plan<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" onchange="get_hostel_fee(this)" name="hostel_plan" id="hostel_plan">
<option selected disabled value="">Select Now</option>
</select>
</div>
<div class="fee-fee_value_name form-group" id="fee_value_name_container" style="display:none">
<label for="">Select Fee Name<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" onchange="get_unique_fee(this)" name="fee_value_name" id="fee_value_name">
<option selected disabled value="">Select Now</option>
</select>
</div>
<div class="due-message mb-4" style="display:none">
</div>
<div class="form-group" style="display:none">
<label for="">Set Due Date</label>
<input type="date" name="fibatch_from" id="fibatch_from" class="form-control" value="<?php ?>" placeholder="Enter batch start year">
<p id="crbatch_from_error" style="color:red;"></p>
<input type="hidden" name="course-fee_id" id="course_fee_id">
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected disabled value="">Choose section status</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<label id="is_active-error" class="error" for="is_active" style="display:none"></label>
</div>
<div class="admin_weightagehead">Installment</div>
<div class="form-group">
<label for="">Number of Installment<span class="text-danger font-weight-bold">*</span></label>
<div class="form-group-inner">
<select id="paymentoption" name="paymentoption[]" class="selectpicker" multiple>
<option disabled selected value="">Select the number of installment</option>
<?php foreach ($payment_types as $key => $value) {
echo '<option value="'.$value['number_of_payment'].'">'.$value['payment_type_name'].'</option>';
} ?>
</select>
<button type = "button" id = "emi" class="subject_addbtn add_btn_white" onclick = "get_fees()">Apply</button>
</div>
<label id="paymentoption-error" class="error" for="paymentoption"></label>
</div>
<table class="table fee-installment-table dataTable table-responsive">
<thead>
<tr>
<th><span style="width:115px;display:block;">Payment method</span></th>
<th><span style="width:115px;display:block">Amount</span></th>
<th><span style="width:115px;display:block">Due dates</span></th>
</tr>
</thead>
<tbody id="installment_section">
</tbody>
</table>
<p id="afee_error" class="mb-2" style="color:red;"></p>
<p id="success" style="color:green;"></p>
<button type="submit" class="subject_addbtn" >Submit</button>
<a href="<?= base_url() ?>admin/fee-installment"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
<?php } ?>
<?php if($fees_id > 0) { ?>
<div class="subject_l subject_l_full_width" style="width:45%">
<div class="subject_lsec">
<div class="subject_lhead">Edit Fee Installment</div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Select Batch<span class="text-danger font-weight-bold">*</span></label>
<?php //print_r($installment); ?>
<select class="form-control" id="batch_id" name="batch_id" >
<?php foreach($batch as $cur){
if($cur['id'] == $batch_id) { ?>
<option value="<?= $cur['id']; ?>" selected><?= $cur['b_name'] . ' : ' .batchdateFormatTo($cur['b_from'],$cur['b_end']); ?></option>
<?php } else { ?>
<option value="<?= $cur['id']; ?>"> <?= $cur['b_name'] . ' : ' .batchdateFormatTo($cur['b_from'],$cur['b_end']); ?> </option>
<?php }
}
?>
</select>
</div>
<div class="form-group">
<label for="">Select Course<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" name="ficourse" id="ficourse">
<?php foreach($course as $cur){
if($cur['id'] == $course_id) { ?>
<option value="<?= $cur['id']; ?>" selected="selected" ><?= $cur['course_name']; ?></option>
<?php } else { ?>
<option value="<?= $cur['id']; ?>"> <?= $cur['course_name']; ?> </option>
<?php }
}
?>
</select>
<p id="ficourse_error" style="color:red;"></p>
<p id="sname_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Select Feetype<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" name="ft_id" id="ft_id">
<?php foreach($fee_types as $cur){
if($cur['id'] == $feetype_id) { ?>
<option value="<?= $cur['id']; ?>" selected="selected" ><?= $cur['feetype_name']; ?></option>
<?php } else { ?>
<option value="<?= $cur['id']; ?>"> <?= $cur['feetype_name']; ?> </option>
<?php }
}
?>
</select>
</div>
<div class="hostel-plan form-group" id="hostel_plan_container" style="display:none">
<label for="">Select Hostel Plan<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" onchange="get_hostel_fee(this)" name="hostel_plan" id="hostel_plan">
<option selected disabled value="">Select Now</option>
</select>
</div>
<div class="fee-fee_value_name form-group" id="fee_value_name_container" style="display:none">
<label for="">Select Fee Name<span class="text-danger font-weight-bold">*</span></label>
<select class="form-control" onchange="get_unique_fee(this)" name="fee_value_name" id="fee_value_name">
<option selected disabled value="">Select Now</option>
</select>
</div>
<div class="due-message mb-4">
<span class="mb-4" style="font-size : 15px">Note:<p> The due-date for selected course fee is <b class="display_edit_due"></b></p></span>
</div>
<div class="form-group" style="display:none">
<label for="">Set Due Date</label>
<input type="date" name="fibatch_from" value="<?php echo date('Y-m-d', strtotime($due_date)) ?>" id="fibatch_from" class="form-control" value="<?php ?>" placeholder="Enter batch start year">
<p id="crbatch_from_error" style="color:red;"></p>
<input type="hidden" name="course-fee_id" value="<?= $cf_id ?>" id="course_fee_id">
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected value="<?php echo $installment[0]['is_active'] ?>"><?php echo ucfirst($installment[0]['is_active']) ?></option>
<?php if($installment[0]['is_active'] == 'yes') { ?>
<option value="no">No</option>
<?php } else {?>
<option value="yes">Yes</option>
<?php } ?>
</select>
<label id="is_active-error" class="error" for="is_active" style="display:none"></label>
</div>
<div class="admin_weightagehead">Installment</div>
<div class="form-group">
<label for="">Number of Installment<span class="text-danger font-weight-bold">*</span></label>
<div class="form-group-inner">
<select id="paymentoption" name="paymentoption[]" class="selectpicker" multiple>
<option value="" >Select the number of installment</option>
<?php foreach ($payment_types as $key => $value) {
$matched = false;
foreach ($pt_keys as $index => $ele) {
if($ele == $value['number_of_payment']) {
$matched = true;
}
}
if($matched) {
echo '<option selected value="'.$value['number_of_payment'].'">'.$value['payment_type_name'].'</option>';
} else {
echo '<option value="'.$value['number_of_payment'].'">'.$value['payment_type_name'].'</option>';
}
} ?>
</select>
<button type = "button" id = "emi" class="subject_addbtn add_btn_white" onclick = "get_fees()">Apply</button>
</div>
<label id="paymentoption-error" class="error" for="paymentoption"></label>
</div>
<table class="table fee-installment-table dataTable table-responsive">
<thead>
<tr>
<th><span style="width:115px;display:block;">Payment method</span></th>
<th><span style="width:115px;display:block">Amount</span></th>
<th><span style="width:115px;display:block">Due dates</span></th>
</tr>
</thead>
<tbody id="installment_section">
<?php
foreach ($due_info as $key => $value) {
$CI = &get_instance();
$CI->load->model('Admin_model');
$inst_info = $this->db->get_where('payment_types',array('id'=>$key))->row_array();
?>
<tr>
<td class="installment_pm">
<input type="hidden" readOnly name="payment_method[]" class="mb-2" value="<?= $key ?>">
<?= $inst_info['payment_type_name'] ?>
</td>
<td class="installment_amount">
<?php
foreach ($value as $index => $ele) { ?>
<?php if($key == '1'){?>
<input type="text" name="amount[one]" class="form-control amount-input mb-2" value=<?= $ele->amount ?>>
<?php } ?>
<?php if($key == '2'){?>
<input type="text" name="amount[two][<?= $index ?>]" class="form-control amount-input mb-2" value=<?= $ele->amount ?>>
<?php } ?>
<?php if($key == '3'){?>
<input type="text" name="amount[four][<?= $index ?>]" class="form-control amount-input mb-2" value=<?= $ele->amount ?>>
<?php } ?>
<?php if($key == '4'){?>
<input type="text" name="amount[six][<?= $index ?>]" class="form-control amount-input mb-2" value=<?= $ele->amount ?>>
<?php } ?>
<?php }
?>
</td>
<td class="installment_due">
<?php
foreach ($value as $index => $ele) {
$ele->due_date = date('Y-m-d', strtotime($ele->due_date))
?>
<?php if($key == '1'){?>
<input type="text" readonly name="duedate[one]" class="form-control np-datepicker mb-2" value=<?= $ele->due_date ?>>
<?php } ?>
<?php if($key == '2'){?>
<input type="text" readonly name="duedate[two][<?= $index ?>]" class="form-control np-datepicker mb-2" value=<?= $ele->due_date ?>>
<?php } ?>
<?php if($key == '3'){?>
<input type="text" readonly name="duedate[four][<?= $index ?>]" class="form-control np-datepicker mb-2" value=<?= $ele->due_date ?>>
<?php } ?>
<?php if($key == '4'){?>
<input type="text" readonly name="duedate[six][<?= $index ?>]" class="form-control np-datepicker mb-2" value=<?= $ele->due_date ?>>
<?php } ?>
<?php }
?>
</td>
</tr>
<?php }
?>
</tbody>
</table>
<p id="afee_error" class="mb-2" style="color:red;"></p>
<p id="success" style="color:green;"></p>
<button type="submit" class="subject_addbtn" >Update</button>
<a href="<?= base_url() ?>admin/fee-installment"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
<?php } ?>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
var inst_array = Array();
function reset_fees()
{
$('#installment_section').html('');
$('#paymentoption').val('');
}
</script>
<script>
<?php if($fees_id == 0) { ?>
var global_fees = {};
<?php } else { ?>
var global_fees = {
amount : Number(<?php echo $due_amount_total ?>),
due : moment('<?php echo date('Y-m-d', strtotime($due_date)) ?>').format('YYYY-MM-DD')
};
<?php } ?>
var selectCount = document.getElementById("paymentoption");
selectCount.addEventListener("change", numOfCount);
// Get all the guest forms into an collection
var selectForms = document.querySelectorAll(".selectForm");
function numOfCount() {
// Loop through the guest forms based on the number selected
selectForms.forEach(function(v,i){
if(i < selectCount.value) {
v.classList.remove("hidden");
}
});
}
function cleanup_install_val(){
$('#ficourse').val('');
$('#fibatch_from').val('');
$('#paymentoption').val('');
$('#installment_section').html('');
}
$("#batch_id").change(function () {
var batch_id = this.value;
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/ajax_get_installment_course_batch",
data : {
batch : batch_id
},
success:function(data){
$('#ficourse').empty();
$('#installment_section').empty();
$('select[name="paymentoption[]"]').val('');
$('#ft_id').val('');
$('#ficourse').append(data);
},
});
});
$("#ficourse").change(function () {
var course_id = this.value;
var batch_id = $('#batch_id').val()
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/ajax_get_installment_course_feetype",
data : {
course : course_id,
batch : batch_id
},
success:function(data){
$('#ft_id').empty();
$('#ft_id').append(data);
$('#installment_section').empty();
$('select[name="paymentoption[]"]').val('');
},
});
});
function resteValues() {
$('.due-message').hide();
$('.due-message').empty();
global_fees = {};
$('#hostel_plan_container').hide();
$('#hostel_plan').val('');
$('#course_fee_id').val('');
$('#fibatch_from').val('');
$('#fee_value_name_container').hide();
$('#fee_value_name').val('');
}
$("#ft_id").change(function () {
var ft_id = this.value;
var hostel_id = 3;
var course_id = $('#ficourse').val();
var batch_id = $('#batch_id').val();
resteValues();
$('#installment_section').empty();
$('select[name="paymentoption[]"]').val([]);
$('.due-message').hide();
$('.due-message').empty();
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/ajax_get_installment_course_fee_date_id",
data : {
course : course_id,
batch : batch_id,
fee_id : ft_id
},
success:function(data){
global_fees = {};
res = JSON.parse(data);
console.log(res);
if(res.length < 2) {
let x = moment(res[0].due_date).format('YYYY-MM-DD').split('-');
let [Ryear,Rmonth,Rday] = x;
Rmonth = Number(Rmonth)-1;
Rmonth = NepaliFunctions.GetBsMonth(Number(Rmonth))
global_fees.amount = res[0].amount;
global_fees.due = moment(res[0].due_date).format('YYYY-MM-DD');
$('.due-message').show();
$('.due-message').html('<span class="mb-4" style="font-size : 15px">Note:<p> The due-date for selected course fee is <b>'+ Rday+'-'+Rmonth+'-'+Ryear + ' </b></p></span>');
$('#course_fee_id').val(res[0].id);
$('#fibatch_from').val(moment(res[0].due_date).format('YYYY-MM-DD'))
} else {
let url_link;
if(ft_id == hostel_id) {
url_link = "<?php echo base_url(); ?>admin/ajax_get_course_fee_hostel_plan";
} else {
url_link = "<?php echo base_url(); ?>admin/ajax_get_course_fee_values";
}
$.ajax({
type : 'POST',
url : url_link,
data : {
course : course_id,
batch : batch_id,
fee_id : ft_id
},
success:function(data){
if(ft_id == hostel_id) {
$('#hostel_plan').empty();
$('#hostel_plan').append(data);
$('#hostel_plan_container').show();
} else {
$('#fee_value_name').empty();
$('#fee_value_name_container').show();
$('#fee_value_name').append(data);
}
},
});
}
},
});
// }
});
const get_unique_fee = function(ele) {
var course_fee = ele.value;
$('#installment_section').empty();
$('select[name="paymentoption[]"]').val([]);
$('.due-message').hide();
$('.due-message').empty();
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/ajax_get_complete_course_fee_id",
data : {
id : course_fee,
},
success:function(data){
global_fees = {};
res = JSON.parse(data);
console.log(res);
let x = moment(res[0].due_date).format('YYYY-MM-DD').split('-');
let [Ryear,Rmonth,Rday] = x;
Rmonth = Number(Rmonth)-1;
Rmonth = NepaliFunctions.GetBsMonth(Number(Rmonth))
global_fees.amount = res[0].amount;
global_fees.due = moment(res[0].due_date).format('YYYY-MM-DD');
$('.due-message').show();
$('.due-message').html('<span class="mb-4" style="font-size : 15px">Note:<p> The due-date for selected course fee is <b>'+ Rday+'-'+Rmonth+'-'+Ryear + ' </b></p></span>');
$('#course_fee_id').val(res[0].id);
$('#fibatch_from').val(moment(res[0].due_date).format('YYYY-MM-DD'))
},
});
}
const get_hostel_fee = function(ele) {
var course_id = $('#ficourse').val();
var batch_id = $('#batch_id').val();
var ft_id = $('#ft_id').val();
var plan = ele.value;
$('#installment_section').empty();
$('select[name="paymentoption[]"]').val([]);
$('.due-message').hide();
$('.due-message').empty();
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/ajax_get_installment_course_fee_date_id",
data : {
course : course_id,
batch : batch_id,
fee_id : ft_id,
plan_id : plan
},
success:function(data){
console.log(data);
global_fees = {};
res = JSON.parse(data);
console.log(res);
global_fees.amount = res[0].amount;
global_fees.due = moment(res[0].due_date).format('YYYY-MM-DD');
$('.due-message').show();
$('.due-message').html('<span class="mb-4" style="font-size : 15px">Note:<p> The due-date for selected course fee is <b>'+ moment(res[0].due_date).format('DD-MMM-YYYY') + ' </b></p></span>');
$('#course_fee_id').val(res[0].id);
$('#fibatch_from').val(moment(res[0].due_date).format('YYYY-MM-DD'))
},
});
}
function get_fees(){
var course_fee = $('#course_fee_id').val();
var start = $('#fibatch_from').val();
var inst = $('#paymentoption').val();
if($("#installmentform").valid()) {
$('#sname_error').html('');
$.ajax({
type : 'post',
url : '<?php echo base_url(); ?>Admin/get_duedates',
data : { course_fee : course_fee, inst : inst,start:start },
success:function(data){
console.log(data);
data = JSON.parse(data);
$('#installment_section').html(data.html);
var mainInput = $(".np-datepicker");
let NDate = NepaliFunctions.GetCurrentBsDate();
let todayDate = `${NDate.year}-${NDate.month}-${NDate.day}`;
// alert(todayDate);
mainInput.nepaliDatePicker({
disableBefore: todayDate,
language : 'english',
});
}
});
}
}
</script>
<script>
$(document).ready(function() {
if($('.np-datepicker').length > 0) {
let NnDate = NepaliFunctions.GetCurrentBsDate();
let todayDateN = `${NnDate.year}-${NnDate.month}-${NnDate.day}`;
$('.np-datepicker').nepaliDatePicker({
language : 'english',
disableBefore : todayDateN
});
let x = moment(global_fees.due).format('YYYY-MM-DD').split('-');
let [Ryear,Rmonth,Rday] = x;
Rmonth = Number(Rmonth)-1;
Rmonth = NepaliFunctions.GetBsMonth(Number(Rmonth))
$('.display_edit_due').text(Rday+'-'+Rmonth+'-'+Ryear);
}
$("#installmentform").validate({
ignore: ":hidden",
rules: {
batch_id : "required",
ficourse : "required",
fibatch_from : "required",
ft_id : "required",
'paymentoption[]' : 'required',
'amount[one]' : 'required',
<?php for($i = 0; $i <= 8; $i++){ ?>
'amount[two][<?= $i ?>]' : 'required',
'amount[four][<?= $i ?>]' : 'required',
'amount[six][<?= $i ?>]' : 'required',
<?php } ?>
is_active : 'required',
fee_value_name : 'required',
hostel_plan : 'required',
},
messages: {
batch_id : 'Please select a batch',
ficourse : 'Please select a course',
fibatch_from : 'Please select start date of installments',
'paymentoption[]' : 'Please select one payment option',
ft_id : "Please select a fee type",
hostel_plan : "Please select a hostel plan",
fee_value_name : "Please select a fee name"
},
submitHandler: function(form,e) {
e.preventDefault();
let amountErr;
let flag = false;
let Allrows = $('#installment_section tr');
$('.installment-err').remove();
$.each(Allrows, function(index,ele) {
let tdTotal = 0;
let amountInput = $(this).find('.amount-input');
console.log(amountInput);
$.each(amountInput, function(index,ele) {
console.log(ele);
tdTotal += Number($(this).val());
});
$('.installment-err').hide();
if(tdTotal != global_fees.amount) {
$(this).before('<tr class="installment-err"><td colspan="3"><label class="error">Entered amount does not match with total fees amount: '+global_fees.amount+'</label></td></tr>')
amountErr = false;
return false;
} else {
amountErr = true;
}
});
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_validate_course_installment',
data : {
value : $('#course_fee_id').val(),
id : <?php echo $fees_id ?>
},
type : 'POST',
async : false,
success: function(data){
$('#afee_error').empty();
if(data == 'success'){
flag = true
} else {
$('#afee_error').append('Selected batch, course and fee type already have an installment.')
flag = false;
}
}
});
if(flag && amountErr) {
form.submit();
}
}
});
$('#tbl').DataTable( {
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
} );
<?php if($fees_id > 0) { ?>
<?php if($feetype_id == 3) { ?>
var hostel_plan_id = '<?php echo $hostel_plan_id ?>';
if((hostel_plan_id)) {
$('#hostel_plan_container').show();
var ft_id = $('#ft_id').val();
var course_id = $('#ficourse').val();
var batch_id = $('#batch_id').val();
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/ajax_get_course_fee_hostel_plan",
data : {
course : course_id,
batch : batch_id,
fee_id : ft_id
},
success:function(data){
console.log(data);
$('#hostel_plan').empty();
$('#hostel_plan').append(data);
$("#hostel_plan").val(hostel_plan_id);
},
});
}
<?php } else { ?>
var ft_id = $('#ft_id').val();
var course_id = $('#ficourse').val();
var batch_id = $('#batch_id').val();
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/ajax_get_course_fee_values_count_data",
data : {
course : course_id,
batch : batch_id,
fee_id : ft_id
},
success:function(response){
response = JSON.parse(response);
console.log(response);
if(response.count > 1) {
$('#fee_value_name_container').show();
$('#fee_value_name').empty();
$('#fee_value_name').append(response.data);
$('#fee_value_name').val('<?php echo $cf_id ?>');
}
},
});
<?php } ?>
<?php } ?>
})
$('#paymentoption').change(function(event) {
$("#paymentoption").multiselect('refresh');
});
</script>

View File

@ -0,0 +1,356 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<style type="text/css">
.error {
color: red;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group">
<a href="<?= base_url(); ?>admin/teacher"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead">
<?php if ($tid == 0) {
echo 'Add Staff';
} else {
echo 'Update Staff';
} ?></div>
<?php
// echo '<pre>';
// echo var_dump($assign_subjects);
$uname = '';
$name = '';
$email = '';
$mobile = '';
$address = '';
$img = '';
$passwd = '';
$csubject = '';
if (isset($detail)) {
// print_r($detail);
$uname = $detail['teacherId'];
$name = $detail['teacher_name'];
$email = $detail['email'];
$mobile = $detail['mobile'];
$address = $detail['address'];
$filePath = 'assets_admin/images/teacher-profile/' . $detail['photo'];
if (file_exists($filePath)) {
$img = base_url() . 'assets_admin/images/teacher-profile/' . $detail['photo'];
} else {
$img = base_url() . 'common_assets/No-Image.jpg';
}
$passwd = base64_decode($detail['password']);
}
?>
<form id="teacherform" method="post" action="<?php echo base_url(); ?>Admin/addedit_teacher" enctype="multipart/form-data">
<input type="hidden" name="tid" id="tid" value="<?= $tid; ?>">
<div class="subject_lformarea">
<?php //print_r($detail);
if (isset($detail)) { ?>
<div class="form-group">
<label for="">Staff Id</label>
<input type="text" name="uname" id="uname" class="form-control" value="<?= $uname; ?>" readonly placeholder="Enter User name">
<p id="uname_error" style="color:red;"></p>
</div>
<?php } ?>
<div class="row">
<div class="col">
<div class="form-group assign_subject">
<label>Assign Designation</label>
<select name="designation" id="designation" class="selectpicker" data-live-search="true">
<option value="0">Select Designation</option>
<?php
if (isset($hr_designation) && !empty($hr_designation)) {
foreach ($hr_designation as $designation) {
// if ($assign_subjects)
?>
<option value="<?php echo $designation['id']; ?>" <?= (isset($detail) && ($detail['designation'] == $designation['id'])) ? 'selected' : '' ?>>
<?php echo $designation['title']; ?>
</option>
<?php
}
}
?>
</select>
<label id="designation-error" class="error" for="designation"></label>
</div>
</div>
<div class="col">
<div class="form-group assign_subject">
<label>Assign Role</label>
<select name="role" id="role" class="selectpicker" data-live-search="true" required>
<option value="">
Select Role
</option>
<?php
if (isset($hr_roles) && !empty($hr_roles)) {
foreach ($hr_roles as $role) {
?>
<option value="<?php echo str_replace(' ', '_', strtolower($role['title'])); ?>" <?= (isset($detail) && ($detail['role'] == str_replace(' ', '_', strtolower($role['title'])))) ? 'selected' : '' ?>>
<?php echo $role['title']; ?>
</option>
<?php
}
}
?>
</select>
</div>
</div>
</div>
<div class="form-group">
<label for="">Full Name</label>
<input type="text" name="tname" id="tname" class="form-control" value="<?= $name; ?>" placeholder="Enter Staff name">
<p id="tname_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Email</label>
<input type="text" name="temail" id="temail" class="form-control" value="<?= $email; ?>" placeholder="Enter email address">
<p id="temail_error" style="color:red;"></p>
<p id="exists_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Mobile</label>
<input type="text" name="tmobile" id="tmobile" class="form-control" maxlength="10" value="<?= $mobile; ?>" placeholder="Enter mobile number">
<p id="tmobile_error" style="color:red;"></p>
</div>
</div>
<div class="form-group">
<label for="">Address</label>
<textarea type="text" name="taddress" id="taddress" rows="5" maxlength="300" class="form-control" placeholder="Enter address"><?= $address; ?></textarea>
<p id="taddress_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Password</label>
<div class="password-wrp">
<input type="password" name="tpassword" id="tpassword" class="form-control" value="<?= $passwd; ?>" placeholder="Enter password">
<div class="passwrd-icon sdfsd icon-y"><i class="far fa-eye"></i></div>
</div>
<p id="tpassword_error" style="color:red;"></p>
</div>
<label for="">Profile Picture <span style="font-size:13px">(gif, jpg, jpeg, png, jiff, jfif)</span></label>
<div class="upload-doc upload-doc-img">
<input type="file" onchange="readURL(this);" name="file" id="tpic" class="form-control">
<?php if (empty($img)) { ?>
<label for="tpic" class="upload-btn" id="uploadBtn">Upload image</label>
<?php } ?>
<?php if (!empty($img)) { ?>
<label for="tpic" class="upload-btn" id="uploadBtn">Re-Upload image</label>
<img src="<?= $img; ?>" alt="Profile Picture" width="50px;" height="50px;">
<?php } ?>
<p id="tpic_error" style="color:red;"></p>
<p id="success" style="color:green;"></p>
</div>
<div class="form-group assign_subject">
<label>Assign Subject*</label>
<select name="csubject[]" id="csubject" class="selectpicker" multiple data-live-search="true">
<?php
if (isset($subject_list) && !empty($subject_list)) {
foreach ($subject_list as $allSub) {
if ($assign_subjects)
?>
<option value="<?php echo $allSub['id']; ?>" <?php if (in_array($allSub['id'], $assign_subjects)) { ?>selected<?php } ?>>
<?php echo $allSub['subject_name']; ?>
</option>
<?php
}
}
?>
</select>
<label id="csubject-error" class="error" for="csubject"></label>
</div>
<button type="submit" class="subject_addbtn"><?php if ($tid == 0) {
echo 'Add Staff';
} else {
echo 'Update Staff';
} ?>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
<script type="text/javascript">
//PASSWORD-HIDE/SHOW
$(".sdfsd").click(function() {
var input = $("#tpassword");
if (input.attr("type") == "password") {
input.attr("type", "text");
$(".passwrd-icon").removeClass("icon-y");
} else {
input.attr("type", "password");
$(".passwrd-icon").addClass("icon-y");
}
});
function hide_all_teacher_error() {
// $('#uname_error').hide();
$('#tname_error').hide();
$('#temail_error').hide();
$('#tmobile_error').hide();
$('#csubject_error').hide();
$('#taddress_error').hide();
$('#tpic_error').hide();
$('#tpassword_error').hide();
$('#success').html('');
}
function cleanup_teacher_val() {
// $('#uname').val('');
$('#tname').val('');
$('#temail').val('');
$('#tmobile').val('');
$('#csubject').select('');
$('#taddress').val('');
$('#tpic').val('');
$('#tpassword').val('');
$('#exists_error').html('');
}
$(document).ready(function() {
jQuery.validator.addMethod("fullnameregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z ]{3,30}$/.test(value);
}, 'Please enter alpha characters only ');
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional(element) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$#!%*?&])[A-Za-z\d@$#!%*?&]{6,16}$/.test(value);
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
jQuery.validator.addMethod("emailregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z-]+\.[a-zA-Z.]{2,5}$/.test(value);
}, 'Email Address is invalid: Please enter a valid email address.');
jQuery.validator.addMethod("phonenumberregex", function(value, element) {
return this.optional(element) || /^[0-9]{10,12}$/.test(value);
}, 'Please enter a 10 digits vaild phone number.');
jQuery.validator.addMethod("zipregex", function(value, element) {
return this.optional(element) || /^[0-9]{6}$/.test(value);
}, 'Please enter 6 digits number: digits only allowed');
jQuery.validator.addMethod("genral_regex", function(value, element) {
return this.optional(element) || /^[a-zA-Z -#]{1,50}$/.test(value);
}, 'Please enter alpha characters only');
$("#teacherform").validate({
// ignore: "input[type='text']:hidden",
rules: {
tname: {
required: true,
rangelength: [2, 50],
fullnameregex: true
},
temail: {
required: true,
emailregex: true
},
tmobile: {
required: true,
phonenumberregex: true
},
taddress: {
required: true
},
tpassword: {
required: true,
passwordregex: true
},
file: {
required: function(element) {
var name = $('#uploadBtn').text();
if (name == 'Upload image') {
return true;
} else {
return false;
}
}
},
'csubject[]': {
required: true
},
},
messages: {
tname: {
required: "Please Enter Name "
},
file: {
required: "Please add image"
},
csubject: {
required: "Please select Subject"
},
taddress: {
required: "Please add Address"
},
},
submitHandler: function(form) {
form.submit();
}
});
});
function readURL(input) {
let fileSize = input.files[0].size;
extension = $(input).val().split('.').pop().toLowerCase();
var fileExtension = ['jfif', 'jpeg', 'jpg', 'png', 'gif', 'jiff'];
if ($.inArray($(input).val().split('.').pop().toLowerCase(), fileExtension) == -1) {
alert("Only formats are allowed : " + fileExtension.join(', '));
input.value = '';
return;
}
}
</script>

View File

@ -0,0 +1,355 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<style type="text/css">
.error {
color: red;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group">
<a href="<?= base_url(); ?>admin/teacher"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead">
<?php if ($tid == 0) {
echo 'Add Teacher';
} else {
echo 'Update Teacher';
} ?></div>
<?php
// echo '<pre>';
// echo var_dump($assign_subjects);
$uname = '';
$name = '';
$email = '';
$mobile = '';
$address = '';
$img = '';
$passwd = '';
$csubject = '';
if (isset($detail)) {
// print_r($detail);
$uname = $detail['teacherId'];
$name = $detail['teacher_name'];
$email = $detail['email'];
$mobile = $detail['mobile'];
$address = $detail['address'];
$filePath = 'assets_admin/images/teacher-profile/' . $detail['photo'];
if (file_exists($filePath)) {
$img = base_url() . 'assets_admin/images/teacher-profile/' . $detail['photo'];
} else {
$img = base_url() . 'common_assets/No-Image.jpg';
}
$passwd = base64_decode($detail['password']);
}
?>
<form id="teacherform" method="post" action="<?php echo base_url(); ?>Admin/addedit_teacher" enctype="multipart/form-data">
<input type="hidden" name="tid" id="tid" value="<?= $tid; ?>">
<div class="subject_lformarea">
<?php //print_r($detail);
if (isset($detail)) { ?>
<div class="form-group">
<label for="">Teacher Id</label>
<input type="text" name="uname" id="uname" class="form-control" value="<?= $uname; ?>" readonly placeholder="Enter User name">
<p id="uname_error" style="color:red;"></p>
</div>
<?php } ?>
<div class="row">
<div class="col">
<div class="form-group assign_subject">
<label>Assign Designation</label>
<select name="designation" id="designation" class="selectpicker" data-live-search="true">
<option value="0">Select Designation</option>
<?php
if (isset($hr_designation) && !empty($hr_designation)) {
foreach ($hr_designation as $designation) {
// if ($assign_subjects)
?>
<option value="<?php echo $designation['id']; ?>" <?= (isset($detail) && ($detail['designation'] == $designation['id'])) ? 'selected' : '' ?>>
<?php echo $designation['title']; ?>
</option>
<?php
}
}
?>
</select>
<label id="designation-error" class="error" for="designation"></label>
</div>
</div>
<div class="col">
<div class="form-group assign_subject">
<label>Assign Role</label>
<select name="role" id="role" class="selectpicker" data-live-search="true">
<?php
if (isset($hr_roles) && !empty($hr_roles)) {
foreach ($hr_roles as $role) {
// if ($assign_subjects)
?>
<option value="<?php echo str_replace(' ', '_', strtolower($role['title'])); ?>" <?= (isset($detail) && ($detail['role'] == str_replace(' ', '_', strtolower($role['title'])))) || (str_replace(' ', '_', strtolower($role['title'])) == 'teacher') ? 'selected' : '' ?>>
<?php echo $role['title']; ?>
</option>
<?php
}
}
?>
</select>
<label id="csubject-error" class="error" for="csubject"></label>
</div>
</div>
</div>
<div class="form-group">
<label for="">Full Name</label>
<input type="text" name="tname" id="tname" class="form-control" value="<?= $name; ?>" placeholder="Enter Teacher name">
<p id="tname_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Email</label>
<input type="text" name="temail" id="temail" class="form-control" value="<?= $email; ?>" placeholder="Enter email address">
<p id="temail_error" style="color:red;"></p>
<p id="exists_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Mobile</label>
<input type="text" name="tmobile" id="tmobile" class="form-control" maxlength="10" value="<?= $mobile; ?>" placeholder="Enter mobile number">
<p id="tmobile_error" style="color:red;"></p>
</div>
</div>
<div class="form-group">
<label for="">Address</label>
<textarea type="text" name="taddress" id="taddress" rows="5" maxlength="300" class="form-control" placeholder="Enter address"><?= $address; ?></textarea>
<p id="taddress_error" style="color:red;"></p>
</div>
<div class="form-group">
<label for="">Password</label>
<div class="password-wrp">
<input type="password" name="tpassword" id="tpassword" class="form-control" value="<?= $passwd; ?>" placeholder="Enter password">
<div class="passwrd-icon sdfsd icon-y"><i class="far fa-eye"></i></div>
</div>
<p id="tpassword_error" style="color:red;"></p>
</div>
<label for="">Profile Picture <span style="font-size:13px">(gif, jpg, jpeg, png, jiff, jfif)</span></label>
<div class="upload-doc upload-doc-img">
<input type="file" onchange="readURL(this);" name="file" id="tpic" class="form-control">
<?php if (empty($img)) { ?>
<label for="tpic" class="upload-btn" id="uploadBtn">Upload image</label>
<?php } ?>
<?php if (!empty($img)) { ?>
<label for="tpic" class="upload-btn" id="uploadBtn">Re-Upload image</label>
<img src="<?= $img; ?>" alt="Profile Picture" width="50px;" height="50px;">
<?php } ?>
<p id="tpic_error" style="color:red;"></p>
<p id="success" style="color:green;"></p>
</div>
<div class="form-group assign_subject">
<label>Assign Subject*</label>
<select name="csubject[]" id="csubject" class="selectpicker" multiple data-live-search="true">
<?php
if (isset($subject_list) && !empty($subject_list)) {
foreach ($subject_list as $allSub) {
if ($assign_subjects)
?>
<option value="<?php echo $allSub['id']; ?>" <?php if (in_array($allSub['id'], $assign_subjects)) { ?>selected<?php } ?>>
<?php echo $allSub['subject_name']; ?>
</option>
<?php
}
}
?>
</select>
<label id="csubject-error" class="error" for="csubject"></label>
</div>
<button type="submit" class="subject_addbtn"><?php if ($tid == 0) {
echo 'Add Teacher';
} else {
echo 'Update Teacher';
} ?>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
<script type="text/javascript">
//PASSWORD-HIDE/SHOW
$(".sdfsd").click(function() {
var input = $("#tpassword");
if (input.attr("type") == "password") {
input.attr("type", "text");
$(".passwrd-icon").removeClass("icon-y");
} else {
input.attr("type", "password");
$(".passwrd-icon").addClass("icon-y");
}
});
function hide_all_teacher_error() {
// $('#uname_error').hide();
$('#tname_error').hide();
$('#temail_error').hide();
$('#tmobile_error').hide();
$('#csubject_error').hide();
$('#taddress_error').hide();
$('#tpic_error').hide();
$('#tpassword_error').hide();
$('#success').html('');
}
function cleanup_teacher_val() {
// $('#uname').val('');
$('#tname').val('');
$('#temail').val('');
$('#tmobile').val('');
$('#csubject').select('');
$('#taddress').val('');
$('#tpic').val('');
$('#tpassword').val('');
$('#exists_error').html('');
}
$(document).ready(function() {
jQuery.validator.addMethod("fullnameregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z ]{3,30}$/.test(value);
}, 'Please enter alpha characters only ');
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional(element) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$#!%*?&])[A-Za-z\d@$#!%*?&]{6,16}$/.test(value);
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
jQuery.validator.addMethod("emailregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z-]+\.[a-zA-Z.]{2,5}$/.test(value);
}, 'Email Address is invalid: Please enter a valid email address.');
jQuery.validator.addMethod("phonenumberregex", function(value, element) {
return this.optional(element) || /^[0-9]{10,12}$/.test(value);
}, 'Please enter a 10 digits vaild phone number.');
jQuery.validator.addMethod("zipregex", function(value, element) {
return this.optional(element) || /^[0-9]{6}$/.test(value);
}, 'Please enter 6 digits number: digits only allowed');
jQuery.validator.addMethod("genral_regex", function(value, element) {
return this.optional(element) || /^[a-zA-Z -#]{1,50}$/.test(value);
}, 'Please enter alpha characters only');
$("#teacherform").validate({
// ignore: "input[type='text']:hidden",
rules: {
tname: {
required: true,
rangelength: [2, 50],
fullnameregex: true
},
temail: {
required: true,
emailregex: true
},
tmobile: {
required: true,
phonenumberregex: true
},
taddress: {
required: true
},
tpassword: {
required: true,
passwordregex: true
},
file: {
required: function(element) {
var name = $('#uploadBtn').text();
if (name == 'Upload image') {
return true;
} else {
return false;
}
}
},
'csubject[]': {
required: true
},
},
messages: {
tname: {
required: "Please Enter Name "
},
file: {
required: "Please add image"
},
csubject: {
required: "Please select Subject"
},
taddress: {
required: "Please add Address"
},
},
submitHandler: function(form) {
form.submit();
}
});
});
function readURL(input) {
let fileSize = input.files[0].size;
extension = $(input).val().split('.').pop().toLowerCase();
var fileExtension = ['jfif', 'jpeg', 'jpg', 'png', 'gif', 'jiff'];
if ($.inArray($(input).val().split('.').pop().toLowerCase(), fileExtension) == -1) {
alert("Only formats are allowed : " + fileExtension.join(', '));
input.value = '';
return;
}
}
</script>

View File

@ -0,0 +1,311 @@
<style>
form label.error,
#secNameerr {
color: red;
}
.form-control {
width: 40%;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template Exam---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="container">
<div class="row">
<h4><?php echo $title ?></h4>
</div>
<div class="row mt-4">
<div class="col-sm-12">
<?php
$e_title = $e_quantity = $e_amount = $e_totalAmount = $e_paidDate = $e_filePath = $e_description = '';
// print_r($expenses_types);
// echo ($checker);
if (isset($expenses_data) && !empty($expenses_data)) {
$e_title = $expenses_data['title'];
$e_quantity = $expenses_data['quantity'];
$e_amount = $expenses_data['amount'];
$e_totalAmount = $expenses_data['total_amount'];
$e_paidDate = $expenses_data['paid_date'];
$e_filePath = $expenses_data['file_path'];
$e_description = $expenses_data['description'];
$e_expense_type = $expenses_data['expense_type'];
} ?>
<form id="expenses_form" action="<?php echo base_url('admin/addExpeses/' . $checker) ?>" method="post" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
<input type="hidden" name="expenses_id" value="<?php echo $checker; ?>">
<div class="my-3 form-group">
<label for="formExpenseType" class="form-label">Expense Type <strong style="color:red">*</strong></label>
<select name="expense_type" id="expense_type" class="form-control">
<option value="">-- Select Option --</option>
<?php foreach ($expenses_types as $expenses_type) {
// $selected = ($e_expense_type == $expenses_type['expenseId']) ? "selected" : "";
?>
<option value="<?= $expenses_type['expenseId'] ?>"><?= $expenses_type['expenseTitle'] ?></option>
<?php } ?>
</select>
<select name="expense_sub_type_computer" id="expense_sub_type_computer" class="form-control mt-4 expense_sub_type_computer">
<option value="">-- Repair / Buy --</option>
<option value="buy"><?= 'Buy' ?></option>
<option value="repair"><?= 'Repair' ?></option>
</select>
<select name="expense_sub_type_vehicle" id="expense_sub_type_vehicle" class="form-control mt-4 expense_sub_type_vehicle">
<option value="">-- Select Vehicle Type --</option>
<option value="van">Van</option>
<option value="bus">Bus</option>
<!-- <option value="bus">Bus</option> -->
</select>
</div>
<div class="my-3 form-group">
<label for="formTitle" class="form-label">Title <strong style="color:red">*</strong></label>
<input type="text" class="form-control" id="formTitle" name="formTitle" value="<?php echo (!empty($e_title)) ? $e_title : '' ?>">
</div>
<div class="mb-3 form-group">
<label for="formQuantity" class="form-label">Quantity <strong style="color:red">*</strong></label>
<input type="text" class="form-control" id="formQuantity" name="formQuantity" value="<?php echo (!empty($e_quantity)) ? $e_quantity : 1; ?>">
</div>
<div class="mb-3 form-group">
<label for="formAmount" class="form-label">Amount <strong style="color:red">*</strong></label>
<input type="text" class="form-control" id="formAmount" name="formAmount" value="<?php echo (!empty($e_amount)) ? $e_amount : ''; ?>" required>
</div>
<div class="mb-3 form-group">
<label for="formTotalAmount" class="form-label">Total Amount </label>
<input type="text" name="totalAmount" class="form-control" id="formTotalAmount" value="<?php echo (!empty($e_totalAmount)) ? $e_totalAmount : ''; ?>" disabled>
<input type="hidden" name="totalAmountPaid" class="form-control" id="formTotalAmountPaid" value="<?php echo (!empty($e_totalAmount)) ? $e_totalAmount : ''; ?>">
</div>
<div class="mb-3 form-group">
<label for="formPaidDate" class="form-label">Paid Date <strong style="color:red">*</strong></label>
<input type="text" class="form-control" id="formPaidDate" name="formPaidDate" value="<?php echo (!empty($e_paidDate)) ? $e_paidDate : ''; ?>">
</div>
<div class="mb-3 form-group">
<label for="formFile" class="form-label">File Upload <label class="text-danger"> ( Accepts only png, jpeg, jpg, pdf and Max size 2 MB)</label> </label>
<input class="form-control" type="file" id="formFile" name="file_expenses" value="<?php echo (!empty($e_filePath)) ? $e_filePath : ''; ?>">
<?php if (!empty($e_filePath)) { ?>
<img src="<?php echo base_url($e_filePath) ?>" width="60" height="60">
<?php } ?>
</div>
<div class="mb-3 form-group">
<label for="formDescription" class="form-label">Description</label>
<textarea class="form-control" placeholder="Leave a comment here" id="formDescription" name="description" value=""><?php echo (!empty($e_description)) ? $e_description : ''; ?></textarea>
</div>
<button class="subject_addbtn " type="submit"><?php echo str_replace('Expenses', '', $title); ?></button>
<a href="<?php echo base_url('admin/listExpeses') ?>">
<button type="button" class="subject_addbtn bg-dark">Back</button>
</a>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!----admin template Exam end---->
</main>
<!--End right-top side-->
<script>
$('#expense_sub_type_computer').hide();
$('#expense_sub_type_vehicle').hide();
//multiple select js start
// $('select').selectpicker();
//multiple select js end
// $('$expense_type').
$('#expense_type').change(function() {
// $('input[type=text].sitebg').val('000000');
console.log($("#expense_type :selected").val());
let selectedExpenseTypeId = $("#expense_type :selected").val();
if (selectedExpenseTypeId == 2) {
$('#expense_sub_type_computer').show();
$('#expense_sub_type_vehicle').hide();
} else if (selectedExpenseTypeId == 7) {
$('#expense_sub_type_vehicle').show();
$('#expense_sub_type_computer').hide();
} else {
$('#expense_sub_type_computer').hide();
$('#expense_sub_type_vehicle').hide();
}
// $('#formTitle').attr('value', '#000000');
});
$(document).ready(function() {
/* Select your element */
let NDate = NepaliFunctions.GetCurrentBsDate();
let todayDate = `${NDate.year}-${NDate.month}-${NDate.day}`;
/* Initialize Datepicker with options */
$('#formPaidDate').nepaliDatePicker({
disableAfter: todayDate,
language: 'english',
});
// nepali date end
jQuery.validator.addMethod("amountValidation", function(value, element) {
return this.optional(element) || /^\d{0,8}(\.\d{0,9})?$/.test(value);
}, 'Please Enter Proper Amount ');
$("#expenses_form").validate({
ignore: ":hidden",
rules: {
formTitle: {
required: true
},
formQuantity: {
required: true,
digits: true
},
formAmount: {
required: true,
amountValidation: true
},
formPaidDate: {
required: true,
date: true
}
},
messages: {
formTitle: {
required: "Please Enter Title for expenses"
},
formQuantity: {
required: "Please Enter Quantity",
digits: "Accept only Positive Number"
},
// formAmount: {
// required: "Please Enter Amount",
// amountValidation: "Check Amount and Enter Properly"
// },
formPaidDate: 'Enter Purchase Date'
},
submitHandler: function(form) {
form.submit();
}
});
});
$('#formFile').on('change', function() {
let fileUpload = $('#formFile').val();
var allowedFiles = [".png", ".jpeg", ".jpg", ".pdf"];
var regex = new RegExp("([a-zA-Z0-9\s_\\.\-:])+(" + allowedFiles.join('|') + ")$");
if (!regex.test(fileUpload.toLowerCase())) {
alert("Please upload files having extensions: " + allowedFiles.join(', ') + " only.");
$(this).val('');
return false;
} else {
if (this.files[0].size > 2097152) {
alert("File size is greater than 2MB");
$(this).val('');
return false;
}
}
});
$('#formQuantity').on('change', function() {
var id_val = $('#formQuantity').val();
var amount = $('#formAmount').val();
var validAmount = /^\d{0,4}(\.\d{0,2})?$/.test(amount);
var validQuality = /^\d{0,4}(\.\d{0,2})?$/.test(id_val);
if (!validAmount || !validQuality) {
alert("Please check the Amount or Quantity");
$('#formTotalAmount').val("");
$('#formTotalAmountPaid').val("");
} else {
var calculation = parseFloat(id_val) * parseFloat(amount);
if ($.isNumeric(calculation)) {
$('#formTotalAmount').val(calculation);
$('#formTotalAmountPaid').val(calculation);
} else {
$('#formTotalAmount').val("");
$('#formTotalAmountPaid').val("");
}
}
});
$('#formAmount').on('change', function() {
var id_val = $('#formQuantity').val();
var amount = $('#formAmount').val();
var validAmount = /^\d{0,9}(\.\d{0,7})?$/.test(amount);
var validQuality = /^\d{0,7}(\.\d{0,7})?$/.test(id_val);
if (!validAmount || !validQuality) {
alert("Please check the Amount or Quantity");
$('#formTotalAmount').val("");
$('#formTotalAmountPaid').val("");
} else {
var calculation = parseFloat(id_val) * parseFloat(amount);
if ($.isNumeric(calculation)) {
$('#formTotalAmount').val(calculation);
$('#formTotalAmountPaid').val(calculation);
} else {
$('#formTotalAmount').val("");
$('#formTotalAmountPaid').val("");
}
}
});
</script>

View File

@ -0,0 +1,941 @@
<style>
.register-row {
position: relative;
display: flex;
justify-content: space-between;
}
.passwrd-icon1 {
position: absolute;
top: 5px !important;
right: 8px;
cursor: pointer;
}
.upload-doc-btn-wrap {
position: relative;
}
.error {
color: red;
padding-top: 5px;
font-size: 12px;
}
.col-md-6.col-height {
height: 50px !important;
}
</style>
<div class="wraper responsive-width">
<main class="container" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form id="addEditBatchForm" method="post" action="<?php echo base_url(); ?>admin/AddnewApplication" enctype="multipart/form-data">
<div class="col-md-8 px-0">
<div class="register-form">
<div class="row">
<div class="col-md-12">
<div class="subject_lhead"><?php echo $title; ?></div>
</div>
</div>
<br>
<div class="card">
<div class="card-body">
<h5 class="card-title">Register</h5>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-6">
<div class="register-row">
<input type="text" name="sfname" class="sfname form-control" id="sfname" placeholder="First name" />
</div>
<label id="sfname-error" class="error" for="sfname"></label>
</div>
<div class="col-md-6">
<div class="register-row">
<input type="text" name="ssname" class="ssname form-control" id="ssname" placeholder="Second name" />
</div>
<label id="ssname-error" class="error" for="ssname"></label>
</div>
</div>
</div>
<div class="col-md-12 pt-4">
<div class="row">
<div class="col-md-6">
<div class="register-row">
<input type="text" name="semail" id="semail" class="semail form-control" placeholder="Email Address">
</div>
<label id="semail-error" class="error" for="semail"></label>
</div>
<div class="col-md-6">
<div class="register-row">
<input type="text" name="semailre" class="semailre form-control" id="semailre" placeholder="Re-Enter your Email address">
</div>
<label id="semailre-error" class="error" for="semailre"></label>
</div>
</div>
</div>
<div class="col-md-12 pt-4">
<div class="row">
<div class="col-md-6">
<div class="register-row">
<input type="password" name="spaswd" class="spaswd form-control" placeholder="Password" id="password3">
<span class="passwrd-icon1 icon-y" id="p_icon3">
<i class="far fa-eye"></i>
</span>
</div>
<label id="password3-error" class="error" for="password3"></label>
</div>
<div class="col-md-6">
<div class="register-row">
<input type="password" name="spaswdre" class="spaswdre form-control" id="password4" placeholder="Re-enter Password">
<span class="passwrd-icon1 icon-y" id="p_icon4">
<i class="far fa-eye"></i>
</span>
</div>
<label id="password4-error" class="error" for="password4"></label>
</div>
</div>
</div>
<div class="col-md-12 pt-4">
<div class="row">
<div class="col-md-6">
<div class="register-row">
<input type="text" name="scontact" class="scontact form-control" id="scontact" placeholder="Contact number">
</div>
<label id="scontact-error" class="error" for="scontact"></label>
</div>
<div class="col-md-6">
<div class="register-row">
<div class="po-calendar">
<input type="text" name="sdob" id='sdob' class="nepal-date sdob form-control" placeholder="dd">
<i class="fas fa-calendar-alt cal-icon"></i>
</div>
<!-- <input type="date" name="sdob" class="sdob form-control" id="sdob" placeholder="dd"> -->
</div>
<label id="sdob-error" class="error" for="sdob"></label>
</div>
<div class="col-md-6">
<div class="register-row">
<div class="register-radio">
<label for="Male"><input type="radio" id="Male" name="sgender" value="Male"> Male </label>
</div>
<div class="register-radio">
<label for="Female"><input type="radio" id="Female" name="sgender" value="Female"> Female</label>
</div>
<div class="register-radio">
<label for="Other"><input type="radio" id="Other" name="sgender" value="Other"> Other</label>
</div>
</div>
<label id="sgender-error" class="error" for="sgender"></label>
<!-- sibling start -->
<!-- <div class="register-radio">
<label for="sibling"><input type="checkbox" id="sibling" name="sibling" value="yes"> Has sibling? </label>
</div>
<div id="sibling_outer_div" style="display: none" class="mt-3">
<label class="" for="sibling_id">Sibling Id <span style="color:red">*</span></label>
<input type="text" name="sibling_id" id="sibling_id" class="form-control" placeholder="Sibling Id">
</div>
<label id="sibling_id_err" class="error"></label> -->
<!-- Dont Delete Below Code -->
<!-- <input type="hidden" name="sibling_parent_id" id="sibling_parent"> -->
<!-- Dont Delete Below Code -->
<!-- sibling end -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card my-3">
<div class="card-body">
<h5 class="card-title">Additional details</h5>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12 my-2">
<h6>Course Details</h6>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<select name="sbatch" class="sbatch form-control" id="sbatch">
<option value="">Select Batch</option>
<?php foreach ($batch as $c) { ?>
<option value="<?= $c['id'] ?>"><?= $c['b_name'] ?></option>
<?php } ?>
</select>
</div>
<label id="sbatch-error" class="error" for="sbatch"></label>
<p id="batch_error" class="d-none text-danger" style="font-size:14px">Please Select Batch </p>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<select name="scourse" class="scourse form-control" id="scourse">
<option value="">Select Course</option>
<!-- <?php //foreach ($courses as $c) {
?>
<option value="<?php //echo $c['id']
?>"><?php //echo $c['course_name']
?></option>
<?php //}
?> -->
</select>
</div>
<label id="scourse-error" class="error" for="scourse"></label>
<p id="course_error" class="d-none text-danger" style="font-size:14px">Please Select Course </p>
<p id="course_error_msg" class="text-danger" style="font-size:14px"> </p>
</div>
<div class="col-md-6 col-height mt-3">
<div class="register-row">
<select name="s_section" class="s_section form-control" id="s_section">
<option value=''> Select Section </option>
</select>
</div>
<label id="s_section-error" class="error" for="s_section"></label>
</div>
</div>
</div>
<div class="col-md-12 pt-4">
<div class="row">
<div class="col-md-12 my-2">
<h6>Emergency Contact</h6>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<input type="text" name="semfname" class="semfname form-control" id="semfname" placeholder="Enter name">
</div>
<label id="semfname-error" class="error" for="semfname"></label>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<input type="text" name="semlname" class="semlname form-control" id="semlname" placeholder="Last Name">
</div>
<label id="semlname-error" class="error" for="semlname"></label>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<input type="text" name="semphone" class="semphone form-control" id="semphone" placeholder="Phone Number">
</div>
<label id="semphone-error" class="error" for="semphone"></label>
</div>
</div>
</div>
<div class="col-md-12 pt-4">
<div class="row">
<div class="col-md-12 my-2">
<h6>Address</h6>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<select name="scountry" class="scountry form-control" id="scountry">
<option value="">Country</option>
<option value="Nepal" selected>Nepal</option>
<option value="India">India</option>
</select>
</div>
<label id="scountry-error" class="error" for="scountry"></label>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<input type="text" name="sstate" class="sstate form-control" id="sstate" placeholder="Provinces/state">
</div>
<label id="sstate-error" class="error" for="sstate"></label>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<input type="text" name="saddress1" class="saddress1 form-control" id="saddress1" placeholder="Address 1">
</div>
<label id="saddress1-error" class="error" for="saddress1"></label>
</div>
</div>
</div>
<div class="col-md-12 pt-4">
<div class="row">
<div class="col-md-6 col-height">
<div class="register-row">
<input type="text" name="saddress2" class="saddress2 form-control" id="saddress2" placeholder="Address 2">
</div>
<label id="saddress2-error" class="error" for="saddress2"></label>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<input type="text" name="szipcode" class="szipcode form-control" id="szipcode" placeholder="PMB / Zip code">
</div>
<label id="szipcode-error" class="error" for="szipcode"></label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card my-3">
<div class="card-body">
<h5 class="card-title">Documents</h5>
<label class="text-danger "> ** Accepted Only JPG and PNG</label>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-6">
<div class="upload-doc">
<label>Passport size photo</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="photo" id="photo" name="No file uploaded" />
<label for="photo" class="upload-btn" id="uploadBtn1">Upload</label>
<label for="photo" class="upload-btn re-upload-btn" id="uploadBtn2">Upload</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="upload-doc">
<label>School certificate</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="school" id="school" name="No file uploaded" accept=".png,.jpg*" />
<label for="school" class="upload-btn" id="uploadBtn3">Upload</label>
<label for="school" class="upload-btn re-upload-btn" id="uploadBtn4">Upload</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="upload-doc">
<label>Exam Results</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="exam" id="exam" name="No file uploaded" accept=".png,.jpg*" />
<label for="exam" class="upload-btn" id="uploadBtn5">Upload</label>
<label for="exam" class="upload-btn re-upload-btn" id="uploadBtn6">Upload</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="upload-doc">
<label>Medical Certificate</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="medical" id="medical" name="No file uploaded" accept=".png,.jpg*" />
<label for="medical" class="upload-btn" id="uploadBtn7">Upload</label>
<label for="medical" class="upload-btn re-upload-btn" id="uploadBtn8">Upload</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title">Application fee</h5>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<div class="register-row">
<input type="text" name="totalfee" class="totalfee form-control" id="totalfee" readonly placeholder="Application Fee" />
</div>
<label id="totalfee-error" class="error" for="totalfee"></label>
<div id="fee-section"></div>
</div>
<div class="col-md-4">
<div class="register-row">
<!-- <input type="text" name="payment_method" class="payment_method form-control" id="payment_method" placeholder="Payment Method" /> -->
<select name="payment_method" class="payment_method form-control" id="payment_method">
<option value="">-- Select --</option>
<option value="cash">Cash</option>
<option value="bank-transfer">Bank Transfer</option>
</select>
</div>
<label id="payment_method-error" class="error" for="payment_method"></label>
</div>
<div class="col-md-4 ">
<div class="register-row description_section d-none">
<input type="text" name="description" id="description" class="description form-control" placeholder="DD No.">
</div>
<div class="register-row discount_fine_section d-none">
<div class="register-row">
<select name="dicount_scholar" class="dicount_scholar form-control" onchange="add_dicount_scholar(this)" id="dicount_scholar">
<option value="" selected>None</option>
<option value="discount">Discount</option>
<option value="scholarship">Scholarship</option>
</select>
</div>
</div>
<div id="discount_scholarship_div" class="pt-2">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" my-2">
<div class="card-body">
<div class="row text-center justify-content-center">
<div class="col-md-8 align-self-center ">
<div class="register-btn">
<button class="btn btn-success btn-sm pr-5 pl-5" type="submit" id="">Add</button>
<a href="<?= base_url(); ?>admin/get_application" class="btn btn-sm pr-5 pl-5" style="background-color:#032da1;color:white;">Back</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
</div>
<script>
$("#p_icon3").click(function() {
$(this).toggleClass("icon-y");
var input = $("#password3");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
$("#p_icon4").click(function() {
$(this).toggleClass("icon-y");
var input = $("#password4");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
$('#sbatch').change(function() {
var sbatch = $(this).val();
$('#totalfee').val('');
var divData = '';
if (sbatch != '' && sbatch != 0) {
$('#batch_error').addClass("d-none");
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_batch_course",
method: "post",
data: {
batch_id: sbatch,
},
dataType: "json",
success: function(response) {
divData += "<option value=''> Select Course </option>";
if (response != '') {
$.each(response, function(i, coursedata) {
divData += "<option value='" + coursedata.id + "'>" + coursedata.course_name + "</option>";
});
} else {
divData += "<option value=''> -- No course's Found --</option>";
// $('#course_error_msg').text("Please create application fee for particular course");
}
$('#scourse').empty().append(divData);
}
});
} else {
$('#batch_error').removeClass("d-none");
}
});
$('#scourse').change(function() {
var course = $('#scourse option:selected').val();
var batch = $('#sbatch option:selected').val();
var divData = '';
var div_data = '';
var total_fee = '';
$('#fee-section').html("");
$('#total-fee').text();
if (course != '' && course != 0) {
$('#course_error').addClass("d-none");
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_sectionbycourse",
method: "post",
data: {
course_id: course,
batch_id: batch
},
dataType: "json",
success: function(response) {
// Application Fee code and Start from here
if (response.application_fee != 0) {
var ParseData = JSON.parse(response.application_fee);
total_fee = (ParseData.amount != '') ? ParseData.amount : '';
// alert(total_fee);
$('#totalfee').val(total_fee);
} else {
div_data += '<div class="payment-row"><p class="text-danger" style="font-size:14px"> Applicatfon Fee Not Found </p></div>';
$('#totalfee').val(total_fee);
}
$('#fee-section').append(div_data);
// Application Fee code and End from here
// section options code and start from here
divData += "<option value=''> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#s_section').empty().append(divData);
// section options code here End from here
}
});
} else {
$('#course_error').removeClass("d-none");
}
});
// $('#sbatch').change(function() {
// var sbatch = $(this).val();
// var scourse = $('#scourse option:selected').val();
// // alert(scourse);
// var div_data = '';
// var total_fee = 0;
// $('#fee-section').html("");
// $('#total-fee').text();
// if (scourse != '' && scourse != 0) {
// $('#course_error').addClass("d-none");
// $.ajax({
// url: "<?php //echo base_url();
?>Student/get_applicationfee",
// method: "post",
// data: {
// batch_id: sbatch,
// course_id: scourse
// },
// dataType: "json",
// success: function(data) {
// if (data != 0) {
// total_fee = (data.amount != '') ? data.amount : 0;
// $('#totalfee').val(total_fee);
// } else {
// div_data += '<div class="payment-row"><p class="text-danger" style="font-size:14px"> Applicatfon Fee Not Found </p></div>';
// $('#totalfee').val(total_fee);
// }
// $('#fee-section').append(div_data);
// }
// });
// } else {
// $('#course_error').removeClass("d-none");
// }
// });
// $('#scourse').change(function(){
// var course = $('#scourse option:selected').val();
// var divData='';
// if (course != '' && course != 0) {
// $('#course_error').addClass("d-none");
// $.ajax({
// url: "<?php //echo base_url();
?>Admin/get_sectionbycourse",
// method: "post",
// data: {
// course_id: course
// },
// dataType: "json",
// success: function(response) {
// divData += "<option value=''> Select Section </option>";
// if(response != ''){
// $.each(response, function(i, sectiondata) {
// divData += "<option value='"+sectiondata.section_id+"'>"+sectiondata.section_name+"</option>";
// });
// }
// else {
// divData += "<option value=''> -- No Section's Found --</option>";
// }
// $('#s_section').empty().append(divData);
// }
// });
// }
// else {
// $('#course_error').removeClass("d-none");
// }
// });
</script>
<script>
var description_section_validation = '';
let discount_validation = '';
$('#payment_method').change(function() {
var payment = $('#payment_method :selected').val();
if (payment == 'bank-transfer') {
$('#discount_scholarship_div').empty();
$('.description_section').removeClass('d-none');
description_section_validation = 'required';
} else {
$('.description_section').addClass('d-none');
description_section_validation = '';
}
if (payment == 'cash') {
$('.discount_fine_section').removeClass('d-none');
discount_validation = 'required';
} else {
$('.discount_fine_section').addClass('d-none');
discount_validation = '';
}
});
jQuery.validator.addMethod("fullnameregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z]{3,30}$/.test(value);
}, 'Please enter alpha characters only ');
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional(element) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$#!%*?&])[A-Za-z\d@$!%*#?&]{6,16}$/.test(value);
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
jQuery.validator.addMethod("emailregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,8}$/.test(value);
}, 'Email Address is invalid: Please enter a valid email address.');
jQuery.validator.addMethod("phonenumberregex", function(value, element) {
return this.optional(element) || /^[0-9]{8,14}$/.test(value);
}, 'Please enter a 8-14 digits vaild phone number.');
jQuery.validator.addMethod("zipregex", function(value, element) {
return this.optional(element) || /^[0-9]{3,8}$/.test(value);
}, 'Please enter 3 - 8 digits number: digits only allowed');
jQuery.validator.addMethod("genral_regex", function(value, element) {
return this.optional(element) || /^[a-zA-Z -#]{1,50}$/.test(value);
}, 'Please enter alpha characters only');
jQuery.validator.addMethod("alphanumeric_regex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 -#]{1,50}$/.test(value);
}, 'Please enter alpha characters only');
var v = $("#addEditBatchForm").validate({
ignore: ':hidden',
rules: {
sfname: {
required: true,
minlength: 3,
maxlength: 30,
fullnameregex: true,
},
ssname: {
required: true,
minlength: 1,
genral_regex: true
},
semail: {
required: true,
email: true,
emailregex: true
},
semailre: {
required: true,
equalTo: '[name="semail"]'
},
spaswd: {
required: true,
minlength: 6,
maxlength: 12,
passwordregex: true
},
spaswdre: {
required: true,
equalTo: '[name="spaswd"]'
},
scontact: {
required: true,
minlength: 8,
maxlength: 14,
phonenumberregex: true
},
sdob: "required",
sgender: {
required: true
},
scourse: {
required: true
},
sbatch: {
required: true
},
semfname: {
required: true,
genral_regex: true
},
semlname: {
required: true,
minlength: 1,
genral_regex: true
},
semphone: {
required: true,
minlength: 8,
maxlength: 14,
phonenumberregex: true
},
scountry: {
required: true,
genral_regex: true
},
sstate: {
required: true,
genral_regex: true
},
saddress1: {
required: true
},
szipcode: {
required: true,
zipregex: true
},
sibling_id: {
required: true,
alphanumeric_regex: true
},
// school: {
// required: true,
// },
// photo: {
// required: true,
// },
// exam: {
// required: true,
// },
// medical: {
// required: true,
// },
amount: {
required: true
},
totalfee: 'required',
payment_method: 'required'
},
messages: {
semailre: {
required: "Enter your Email",
equalTo: "Please enter the same email address again.",
},
spaswdre: {
equalTo: "Please enter the same password again.",
},
semphone: {
minlength: "Please Enter a 8 digits valid phone Number",
maxlength: "Please Enter a 14 digits valid phone Number",
},
scontact: {
minlength: "Please Enter a 8 digits valid phone Number",
maxlength: "Please Enter a 14 digits valid phone Number",
},
payment_method: {
required: "Please Select Payment Method",
},
totalfee: {
required: "Fees required",
}
},
submitHandler: function(form, e) {
e.preventDefault();
var appFee = $('#totalfee').val();
var cash = $("#payment_method option:selected").val();
var dic = $("#dicount_scholar option:selected").val();
if (cash === 'cash' && (dic === 'discount' || dic === 'scholarship')) {
if (!$('.dynamic_discount').val()) {
$('.item_err').empty();
$('.dynamic_discount').after(
'<span class="item_err" style="color:red">Please enter amount </span>');
} else if (parseInt($('.dynamic_discount').val()) > parseInt(appFee)) {
$('.item_err').empty();
$('.dynamic_discount').after(
'<span class="item_err" style="color:red">Please enter amount which is less than the current fee (' +
appFee + ')</span>');
} else {
$('.item_err').empty();
form.submit();
}
} else {
$('.item_err').empty();
form.submit();
}
}
});
function add_dicount_scholar(ele) {
$('#discount_scholarship_div').empty();
if (ele.value == 'discount' || ele.value == 'scholarship') {
$('#discount_scholarship_div').append(
'<input type="text" onkeypress="return numbersOnlyValidation(event)" min="0" onkeyup="deductAmountFromTotalFee(this)" name="scOrDesc" class="dynamic_discount form-control" placeholder="Enter the amount" class="form-control" />'
);
}
}
const deductAmountFromTotalFee = (input_item) => {
let deductAmt = (input_item.value) ? input_item.value : 0
let totalfee = $('#totalfee').val();
let TotalpayableAmt = (totalfee) ? totalfee : 0;
if (parseInt(deductAmt) > parseInt(TotalpayableAmt)) {
$('.item_err').empty();
$(input_item).after(
'<span class="item_err" style="color:red">Please enter amount which is less than the current fee (' +
TotalpayableAmt + ')</span>');
} else {
$('.item_err').empty();
}
}
function numbersOnlyValidation(e) {
var keyCode = e.keyCode || e.which;
//Regex for Valid Characters i.e. Alphabets and Numbers.
var regex = /^[0-9]+$/;
//Validate TextBox value against the Regex.
var isValid = regex.test(String.fromCharCode(keyCode));
return isValid;
}
</script>
<script type="text/javascript">
$(function() {
$("#sibling").change(function() {
if (this.checked) {
$('#sibling_outer_div').show();
} else {
$('#sibling_outer_div').hide();
}
});
$('#sibling_id').change(function() {
let val = $(this).val();
if (val.length > 0) {
$.ajax({
url: '<?php echo base_url() ?>' + 'admin/ajax_check_if_exists',
data: {
value: val,
column: 'studentId',
table: 'students',
required: 'parent_username'
},
type: 'POST',
async: false,
success: function(data) {
console.log(data);
$('#sibling_id_err').empty();
if (data == 'failed') {
console.log('failed');
$('#sibling_id_err').text('There is no student with provided Id : ' + val);
$('#sibling_id').val('');
} else {
console.log(data);
$('#sibling_parent').val(data);
}
}
});
}
})
})
</script>

View File

@ -0,0 +1,823 @@
<style>
.register-row {
position: relative;
display: flex;
justify-content: space-between;
}
.passwrd-icon1 {
position: absolute;
top: 5px !important;
right: 8px;
cursor: pointer;
}
.upload-doc-btn-wrap {
position: relative;
}
.error {
color: red;
padding-top: 5px;
font-size: 12px;
}
.col-md-6.col-height {
height: 50px !important;
}
select.form-control:not([size]):not([multiple]) {
height: 33.1px;
}
</style>
<div class="wraper responsive-width">
<main class="container px-0" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<form id="addEditBatchForm" method="post" action="<?php echo base_url(); ?>admin/add-new-student" enctype="multipart/form-data">
<div class="col-md-12 px-0">
<div class="register-form">
<div class="row">
<div class="col-md-12">
<div class="h4"><?php echo $title; ?></div>
</div>
</div>
<br>
<div class="card">
<div class="card-body">
<h5 class="card-title h6">Student Details</h5>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="sname" class="sname form-control" id="sname" placeholder="Student Full name" />
<span> Full Name <b class="text-danger">*</b> </span>
</label>
<label id="sname-error" class="error my-0 px-1 py-0" style="display:none;" for="sname"></label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="sdob" id='sdob' class="nepal-date sdob form-control" placeholder=" DOB (YYYY-mm-dd)" width="100%">
<span> Date Of Birth (B.S.) <b class="text-danger">*</b> </span>
</label>
<label id="sdob-error" class="error my-0 px-1 py-0" style="display:none;" for="sdob"></label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="siemis" class="siemis form-control" id="siemis" placeholder="Student IEMIS Number" />
<span> IEMIS </span>
</label>
</div>
<div class="w-100 mt-3"></div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="smobile" class="smobile form-control" id="smobile" placeholder="Contact Number" />
<span> Contact Number </span>
</label>
<label id="smobile-error" class="error my-0 px-1 py-0" style="display:none;" for="smobile"></label>
</div>
<div class="col">
<div class="d-flex align-items-center pt-1">
<label for="Male" class="mb-0 pr-2"> Gender:</label>
<div class="register-radio">
<label for="Male" class="mb-0 px-1"><input type="radio" id="Male" name="sgender" value="Male" style="height: 12px; width: 15px;"> Male </label>
</div>
<div class="register-radio">
<label for="Female" class="mb-0 px-1"><input type="radio" id="Female" name="sgender" value="Female" style="height: 12px; width: 15px;"> Female</label>
</div>
<div class="register-radio">
<label for="Other" class="mb-0 px-1"><input type="radio" id="Other" name="sgender" value="Other" style="height: 12px; width: 15px;"> Other</label>
</div>
</div>
<label id="sgender-error" class="error" style="display:none;" for="sgender"></label>
</div>
<div class="col">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card mt-3">
<div class="card-body">
<h5 class="card-title h6">Course Details</h5>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col">
<label class="has-float-label mb-0">
<select name="sbatch" class="sbatch form-control custom-select" id="sbatch">
<option value="">Select Batch</option>
<?php foreach ($batch as $c) { ?>
<option value="<?= $c['id'] ?>"><?= $c['b_name'] ?></option>
<?php } ?>
</select>
<span> Batch <b class="text-danger">*</b> </span>
</label>
<label id="sbatch-error" class="error my-0 px-1 py-0" style="display:none;" for="sbatch"></label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<select name="scourse" class="scourse form-control custom-select" id="scourse">
<option value="">Select Course</option>
<?php foreach ($courses as $c) { ?>
<option value="<?php echo $c['id'] ?>"><?php echo $c['course_name'] ?></option>
<?php } ?>
</select>
<span> Course <b class="text-danger">*</b> </span>
</label>
<label id="scourse-error" class="error my-0 px-1 py-0" style="display:none;" for="scourse"></label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<select name="s_section" class="s_section form-control custom-select" id="s_section">
<option value=''> Select Section </option>
</select>
<span> Section <b class="text-danger">*</b> </span>
</label>
<label id="s_section-error" class="error my-0 px-1 py-0" style="display:none;" for="s_section"></label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card mt-3">
<div class="card-body">
<h5 class="card-title h6">Guardian Details</h5>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="sfathername" class="sfathername form-control" id="sfathername" placeholder="Student Father name" />
<span> Father Name </span>
</label>
<label id="sfathername-error" class="error my-0 px-1 py-0" style="display:none;" for="sfathername"></label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="sfcontact" class="sfcontact form-control" id="sfcontact" placeholder="Father Contact Number" />
<span> Contact Number </span>
</label>
<label id="sfcontact-error" class="error my-0 px-1 py-0" style="display:none;" for="sfcontact"></label>
</div>
<div class="w-100 mt-3"></div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="smothername" class="smothername form-control" id="smothername" placeholder="Student Mother name" />
<span> Mother Name </span>
</label>
<label id="smothername-error" class="error my-0 px-1 py-0" style="display:none;" for="smothername"></label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="smcontact" class="smcontact form-control" id="smcontact" placeholder="Mother Contact Number" />
<span> Contact Number </span>
</label>
<label id="smcontact-error" class="error my-0 px-1 py-0" style="display:none;" for="smcontact"></label>
</div>
<div class="w-100 mt-4"></div>
<h5 class="card-title h6 w-100 px-3">Local Guardian (If any)</h5>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="slgname" class="slgname form-control" id="slgname" placeholder="Full Name" />
<span> Full Name </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="slgaddress" class="slgaddress form-control" id="slgaddress" placeholder="Address" />
<span> Address </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="slgcontact" class="slgcontact form-control" id="slgcontact" placeholder="Contact Number" />
<span> Contact Number </span>
</label>
<label id="smcontact-error" class="error my-0 px-1 py-0" style="display:none;" for="smcontact"></label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card mt-3">
<div class="card-body">
<h5 class="card-title h6">Permanent Address</h5>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="p_ward_no" class="p_ward_no form-control" id="p_ward_no" placeholder="Ward No." />
<span> Ward No. </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="p_saddress1" class="p_saddress1 form-control" id="p_saddress1" placeholder="Ward No." />
<span> Address </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="p_district" class="p_district form-control" id="p_district" placeholder="District" />
<span> District </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<select name="p_province" class="p_province form-control custom-select" id="p_province">
<option value="">Select Province</option>
<?php foreach ($provinces as $province) { ?>
<option value="<?= $province['name'] ?>" <?= $province['id'] == 7 ? 'selected' : '' ?>><?= $province['name'] ?></option>
<?php } ?>
</select>
<span> Province </span>
</label>
</div>
<div class="w-100 mt-3"></div>
<h5 class="card-title h6 w-100 px-3 mt-3">Local Address</h5>
<div class="col">
<input type="checkbox" name="same_as_per_add" id="sameAsPermanentAddress" checked /> Same as Permanent Address
</div>
<div class="w-100 mt-3" id="localAddress">
<div class="row px-3">
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="t_ward_no" class="p_ward_no form-control" id="t_ward_no" placeholder="Ward No." />
<span> Ward No. </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="t_saddress" class="t_saddress form-control" id="t_saddress" placeholder="Ward No." />
<span> Address </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<input type="text" name="t_district" class="t_district form-control" id="t_district" placeholder="District" />
<span> District </span>
</label>
</div>
<div class="col">
<label class="has-float-label mb-0">
<select name="t_province" class="t_province form-control custom-select" id="t_province">
<option value="">Select Province</option>
<?php foreach ($provinces as $province) { ?>
<option value="<?= $province['name'] ?>" <?= $province['id'] == 7 ? 'selected' : '' ?>><?= $province['name'] ?></option>
<?php } ?>
</select>
<span> Province </span>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card my-3">
<div class="card-body">
<h5 class="card-title">Documents</h5>
<label class="text-danger "> ** Accepted Only JPG and PNG</label>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-6">
<div class="upload-doc">
<label>Passport size photo</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="photo" id="photo" name="No file uploaded" />
<label for="photo" class="upload-btn" id="uploadBtn1">Upload</label>
<label for="photo" class="upload-btn re-upload-btn" id="uploadBtn2">Upload</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="upload-doc">
<label>School certificate</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="school" id="school" name="No file uploaded" accept=".png,.jpg*" />
<label for="school" class="upload-btn" id="uploadBtn3">Upload</label>
<label for="school" class="upload-btn re-upload-btn" id="uploadBtn4">Upload</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="upload-doc">
<label>Exam Results</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="exam" id="exam" name="No file uploaded" accept=".png,.jpg*" />
<label for="exam" class="upload-btn" id="uploadBtn5">Upload</label>
<label for="exam" class="upload-btn re-upload-btn" id="uploadBtn6">Upload</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="upload-doc">
<label>Medical Certificate</label>
<!-- <span id="uploaded-file">&nbsp</span> -->
<div class="upload-doc-btn-wrap">
<input type="file" name="medical" id="medical" name="No file uploaded" accept=".png,.jpg*" />
<label for="medical" class="upload-btn" id="uploadBtn7">Upload</label>
<label for="medical" class="upload-btn re-upload-btn" id="uploadBtn8">Upload</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" my-2">
<div class="card-body">
<div class="row text-center justify-content-center">
<div class="col-md-8 align-self-center ">
<div class="register-btn">
<button class="btn btn-success btn-sm pr-5 pl-5" type="submit" id="">Add</button>
<a href="<?= base_url(); ?>admin/student" class="btn btn-sm pr-5 pl-5" style="background-color:#032da1;color:white;">Back</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
</div>
<script>
// if ($("#sameAsPermanentAddress").is(':checked'))
// $("#localAddress").show(); // checked
// else
$("#localAddress").hide(); // unchecked
$('#sameAsPermanentAddress').change(function() {
if ($(this).is(":checked")) {
// it is checked
$("#localAddress").hide();
} else {
$("#localAddress").show();
}
});
$("#p_icon3").click(function() {
$(this).toggleClass("icon-y");
var input = $("#password3");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
$("#p_icon4").click(function() {
$(this).toggleClass("icon-y");
var input = $("#password4");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
// $('#sbatch').change(function() {
// var sbatch = $(this).val();
// $('#totalfee').val('');
// var divData='';
// if (sbatch != '' && sbatch != 0) {
// $('#batch_error').addClass("d-none");
// $.ajax({
// url: "<?php //echo base_url();
?>Admin/get_batch_course",
// method: "post",
// data: {
// batch_id: sbatch,
// },
// dataType: "json",
// success: function(response) {
// divData += "<option value=''> Select Course </option>";
// if(response != ''){
// $.each(response, function(i, coursedata) {
// divData += "<option value='"+coursedata.id+"'>"+coursedata.course_name+"</option>";
// });
// }
// else {
// divData += "<option value=''> -- No course's Found --</option>";
// // $('#course_error_msg').text("Please create application fee for particular course");
// }
// $('#scourse').empty().append(divData);
// }
// });
// } else {
// $('#batch_error').removeClass("d-none");
// }
// });
$('#scourse').change(function() {
var course = $('#scourse option:selected').val();
var batch = $('#sbatch option:selected').val();
var divData = '';
var div_data = '';
var total_fee = '';
$('#fee-section').html("");
$('#total-fee').text();
if (course != '' && course != 0) {
$('#course_error').addClass("d-none");
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "post",
data: {
course_id: course,
batch_id: batch
},
dataType: "json",
success: function(response) {
// section options code and start from here
divData += "<option value=''> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#s_section').empty().append(divData);
// section options code here End from here
}
});
} else {
$('#course_error').removeClass("d-none");
}
});
</script>
<script>
jQuery.validator.addMethod("fullnameregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z]{3,30}$/.test(value);
}, 'Please enter alpha characters only ');
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional(element) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$#!%*?&])[A-Za-z\d@$!%*#?&]{6,16}$/.test(value);
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
jQuery.validator.addMethod("emailregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,8}$/.test(value);
}, 'Email Address is invalid: Please enter a valid email address.');
jQuery.validator.addMethod("phonenumberregex", function(value, element) {
return this.optional(element) || /^[0-9]{8,14}$/.test(value);
}, 'Please enter a 8-14 digits vaild phone number.');
jQuery.validator.addMethod("zipregex", function(value, element) {
return this.optional(element) || /^[0-9]{3,8}$/.test(value);
}, 'Please enter 3 - 8 digits number: digits only allowed');
jQuery.validator.addMethod("genral_regex", function(value, element) {
return this.optional(element) || /^[a-zA-Z -#]{1,50}$/.test(value);
}, 'Please enter alpha characters only');
jQuery.validator.addMethod("alphanumeric_regex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 -#]{1,50}$/.test(value);
}, 'Please enter alpha characters only');
var v = $("#addEditBatchForm").validate({
ignore: ':hidden',
rules: {
sname: {
required: true,
minlength: 3,
maxlength: 30,
},
ssname: {
required: true,
minlength: 1,
genral_regex: true
},
semail: {
required: true,
email: true,
emailregex: true
},
semailre: {
required: true,
equalTo: '[name="semail"]'
},
spaswd: {
required: true,
minlength: 6,
maxlength: 12,
passwordregex: true
},
spaswdre: {
required: true,
equalTo: '[name="spaswd"]'
},
scontact: {
required: true,
minlength: 8,
maxlength: 14,
phonenumberregex: true
},
sdob: "required",
sgender: {
required: true
},
scourse: {
required: true
},
sbatch: {
required: true
},
s_section: {
required: true
},
semfname: {
required: true,
genral_regex: true
},
semlname: {
required: true,
minlength: 1,
genral_regex: true
},
semphone: {
required: true,
minlength: 8,
maxlength: 14,
phonenumberregex: true
},
scountry: {
required: true,
genral_regex: true
},
sstate: {
required: true,
genral_regex: true
},
saddress1: {
required: true
},
szipcode: {
required: true,
zipregex: true
},
sibling_id: {
required: true,
alphanumeric_regex: true
},
// school: {
// required: true,
// },
// photo: {
// required: true,
// },
// exam: {
// required: true,
// },
// medical: {
// required: true,
// },
amount: {
required: true
},
totalfee: 'required',
payment_method: 'required'
},
messages: {
semailre: {
required: "Enter your Email",
equalTo: "Please enter the same email address again.",
},
spaswdre: {
equalTo: "Please enter the same password again.",
},
semphone: {
minlength: "Please Enter a 8 digits valid phone Number",
maxlength: "Please Enter a 14 digits valid phone Number",
},
scontact: {
minlength: "Please Enter a 8 digits valid phone Number",
maxlength: "Please Enter a 14 digits valid phone Number",
},
payment_method: {
required: "Please Select Payment Method",
},
totalfee: {
required: "Fees required",
}
},
submitHandler: function(form, e) {
e.preventDefault();
var appFee = $('#totalfee').val();
var cash = $("#payment_method option:selected").val();
var dic = $("#dicount_scholar option:selected").val();
if (cash === 'cash' && (dic === 'discount' || dic === 'scholarship')) {
if (!$('.dynamic_discount').val()) {
$('.item_err').empty();
$('.dynamic_discount').after(
'<span class="item_err" style="color:red">Please enter amount </span>');
} else if (parseInt($('.dynamic_discount').val()) > parseInt(appFee)) {
$('.item_err').empty();
$('.dynamic_discount').after(
'<span class="item_err" style="color:red">Please enter amount which is less than the current fee (' +
appFee + ')</span>');
} else {
$('.item_err').empty();
form.submit();
}
} else {
$('.item_err').empty();
form.submit();
}
}
});
function add_dicount_scholar(ele) {
$('#discount_scholarship_div').empty();
if (ele.value == 'discount' || ele.value == 'scholarship') {
$('#discount_scholarship_div').append(
'<input type="text" onkeypress="return numbersOnlyValidation(event)" min="0" onkeyup="deductAmountFromTotalFee(this)" name="scOrDesc" class="dynamic_discount form-control" placeholder="Enter the amount" class="form-control" />'
);
}
}
const deductAmountFromTotalFee = (input_item) => {
let deductAmt = (input_item.value) ? input_item.value : 0
let totalfee = $('#totalfee').val();
let TotalpayableAmt = (totalfee) ? totalfee : 0;
if (parseInt(deductAmt) > parseInt(TotalpayableAmt)) {
$('.item_err').empty();
$(input_item).after(
'<span class="item_err" style="color:red">Please enter amount which is less than the current fee (' +
TotalpayableAmt + ')</span>');
} else {
$('.item_err').empty();
}
}
function numbersOnlyValidation(e) {
var keyCode = e.keyCode || e.which;
//Regex for Valid Characters i.e. Alphabets and Numbers.
var regex = /^[0-9]+$/;
//Validate TextBox value against the Regex.
var isValid = regex.test(String.fromCharCode(keyCode));
return isValid;
}
</script>
<script type="text/javascript">
$(function() {
$("#sibling").change(function() {
if (this.checked) {
$('#sibling_outer_div').show();
} else {
$('#sibling_outer_div').hide();
}
});
$('#sibling_id').change(function() {
let val = $(this).val();
if (val.length > 0) {
$.ajax({
url: '<?php echo base_url() ?>' + 'admin/ajax_check_if_exists',
data: {
value: val,
column: 'studentId',
table: 'students',
required: 'parent_username'
},
type: 'POST',
async: false,
success: function(data) {
console.log(data);
$('#sibling_id_err').empty();
if (data == 'failed') {
console.log('failed');
$('#sibling_id_err').text('There is no student with provided Id : ' + val);
$('#sibling_id').val('');
} else {
console.log(data);
$('#sibling_parent').val(data);
}
}
});
}
})
})
</script>

View File

@ -0,0 +1,244 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<?php
ini_set('max_execution_time', '300');
ini_set("pcre.backtrack_limit", "5000000");
if (!empty($school_info['markscard_header']) && ($school_info['markscard_header'] != '')) {
if (empty($school_info['color_logo'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['markscard_header'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
} else {
if (empty($school_info['color_logo'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['color_logo'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['color_logo'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
}
?>
<div width="100%" height="100%" style="border:2px solid #00a60c; border-style: double;">
<div style="width: 100%; margin: 8px 0px 0px 0px; padding: 8px 16px 0px 16px;">
<div style="width: 20%; float: left;">
<img style="width:100px;height:100px;" src="<?= $logo_img; ?>" alt="Logo Here">
</div>
<div style="width: 60%; float: left; text-align: center;">
<h2 style="padding:0px; margin: 0px;"><?= strtoupper($school_info['school_name']); ?> </h2>
<h5 style="padding:0px; margin: 2px 0px"><?= ucfirst($school_info['address']); ?></h5>
<h6 style="padding:0px; margin: 2px 0px; font-size: 12px;">Estd : <?= $school_info['school_code']; ?></h6>
<p style="padding:0px; margin: 0px; font-size: 11px; font-weight: 500">Ph. : <?= $school_info['phone']; ?> | Email: <?= $school_info['email']; ?></p>
<div width="30%" style="margin:4px auto;background-color:#032da1;color:#fff;padding:8px 50px;border-radius:10px 0px 10px 0px;">
<span style="font-size:12px; font-weight:bold;">Admission Form</span>
</div>
</div>
<div style="width: 15%; float: right; border: 1px solid black; width: 100px; height: 75px; text-align:center; background-color: #eeeeee; padding-top: 25px;">
<p style="font-size: 12px; font-weight: bold;"> PHOTO</p>
</div>
</div>
<hr style="margin: 4px 0px">
<div style="height: 75%; padding: 0px 16px;">
<table width="100%" style="margin-top: 4px;">
<tr>
<th style="width:10%;text-align:left;font-weight:bold;font-size:12px;"> Admission No. :</th>
<td style="width:16%;text-align:left;font-size:12px;border-bottom:1px solid black; margin-right: 4px; padding: 4px 4px; color: #fff;">A </td>
<th style="width:2%;"></th>
<th style=" width:10%;text-align:left;font-weight:bold;font-size:12px; margin: 0px 16px;">Admission Date :</th>
<td style="width:16%;text-align:left;font-size:12px; border-bottom:1px solid black;margin-right: 4px; padding: 4px 4px; color: #fff;">B</td>
<th style="width:2%;"></th>
<th style="width:10%;text-align:left;font-weight:bold;font-size:12px;margin-left: 8px;">TC No. & Date :</th>
<td style="width:17%;text-align:left;font-size:12px; border-bottom:1px solid black;margin-right: 4px; padding: 4px 4px; color: #fff;">C</td>
</tr>
</table>
<div style="width: 100%; margin: 8px 0px 0px 0px;">
<div style="width: 100%">
<div style=" margin-bottom: 8px;">
<i style="font-size: 12px;">Please indicate the class to which you are seeking admission.</i>
</div>
<div style="width: 8%; float: left;">
<p style="font-size: 14px; font-weight: bold; margin-top: 80%;"> Class </p>
</div>
<div style="width: 90%; float: left; text-align: left;">
<?php
$course_name = array();
foreach ($courses as $courseKey => $course) {
?>
<div style="width: 12%; height: 25px; border: 1px solid black; float: left; margin: 0px 8px; padding: 4px 4px; margin-bottom: 8px; font-size: 12px; font-weight:bold; border-radius:4px 4px 4px 4px;">
<p style="margin-top: 2%; margin-bottom: 0px; padding:0px"><?= str_replace('Class ', '', $course['course_name']) ?></p>
</div>
<?php
}
?>
</div>
</div>
<p style="font-weight: bold; font-size: 16px;">Student's Details</td>
<div width="100%">
<div style="width:33%; float:left;">
<div style="float: left;width: 30%; font-size: 12px; font-weight:bold;">Full Name</div>
<div style="width: 62%;float: right; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 35%; font-size: 12px; font-weight:bold;">Date of Birth</div>
<div style="width: 55%;float: right; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 30%; font-size: 12px;font-weight:bold;">Gender : </div>
<div style="width: 55%;float: right; font-weight:bold; font-size: 14px;">Male / Female</div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left; width: 42%; font-size: 12px; font-weight:bold;">Birth Certificate </div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 18%; font-size: 12px; font-weight:bold;">Caste</div>
<div style="width: 74%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:30%; float:right; margin-left: 2%;">
<div style=" float: left;width: 30%; font-size: 12px;font-weight:bold;">Religion</div>
<div style="width: 55%;float: left; padding: 10px 8px; border-bottom: 1px solid black; font-weight:bold;"></div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 25%; font-size: 12px; font-weight:bold;">City, State & Country of Birth </div>
<div style="width: 70%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 7%; font-size: 12px; font-weight:bold;">Address</div>
<div style="width: 88%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 10%; font-size: 12px; font-weight:bold;">Last School</div>
<div style="width: 85%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 54%; font-size: 12px; font-weight:bold;">
Would you be requiring the school's transportation services?
</div>
<div style="width: 10%;float: left; font-size: 14px; font-weight:bold;">Yes / No</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 22%; font-size: 12px; font-weight:bold;">Allergies/Health Concerns</div>
<div style="width: 73%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width: 100%; font-size: 12px; font-weight:bold;">Is there anything you would like us to know about your child?</div>
<div style="width: 95%;border-bottom: 1px solid black; padding: 15px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width: 100%; font-size: 12px; font-weight:bold;">If I am not available and a medical emergency arises, the supervising teacher has my
permission to seek medical help at</div>
<div style="width: 95%;border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<p style="font-weight: bold; font-size: 16px;">Parent's Details</td>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Father's Name</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Citizenship No.</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 40%; font-size: 12px;font-weight:bold;">Contact No. </div>
<div style="width: 48%;float: left; border-bottom: 1px solid black; padding: 10px;"></div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Mother's Name</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Citizenship No.</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 40%; font-size: 12px;font-weight:bold;">Contact No. </div>
<div style="width: 48%;float: left; border-bottom: 1px solid black; padding: 10px;"></div>
</div>
</div>
<p style="font-weight: bold; font-size: 16px;">Local Guardian (If any)</td>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left;width: 10%; font-size: 12px; font-weight:bold;">Name</div>
<div style="width: 78%;float: right; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 22%; font-size: 12px; font-weight:bold;">Address</div>
<div style="width: 68%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 40%; font-size: 12px;font-weight:bold;">Contact No. </div>
<div style="width: 48%;float: left; border-bottom: 1px solid black; padding: 10px;"></div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 8%; font-size: 12px; font-weight:bold;">Remarks</div>
<div style="width: 87%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
</div>
</div>
<div style="height: auto;">
<table width="100%" style="margin:8px 0px 0px 8px;">
<tbody>
<tr>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;"> Test Date</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;"> Reg No.</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;"> Parent's Sign</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;">Verified By</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;">Principal's Sign</span>
</td>
</tr>
</tbody>
</table>
<p style="text-align:center; font-weight: bold; font-size: 14px;">Thank You for enrolling your child!</p>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,442 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<style>
.error {
color: red;
padding-top: 2px;
}
.form-group.form-group-iconselect {
position: relative;
margin: 0px 0px 25px 0px;
}
label#subject_icon-error {
position: absolute;
bottom: -25px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="from-group adding-class form-group_lng"><!-- Button trigger modal -->
<button type="button" class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#exampleModal">
Assign Teacher
</button>
<a href="<?= base_url(); ?>admin/assign-class-teacher/<?= $id ?>" class="ml-2">
<button type="button" class="btn btn-sm btn-outline-primary">Assign Class Teacher</button>
</a>
</div>
<!-- Modal -->
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
ufdhsXAJKZLM
<div class="subject_lhead"><?php echo $title; ?></div>
<?php
$classroom_name = (isset($classroom['classroom_name'])) ? $classroom['classroom_name'] : '';
$course_id = (isset($classroom['course_id'])) ? $classroom['course_id'] : '';
$section_id = (isset($classroom['section_id'])) ? $classroom['section_id'] : '';
$is_active = (isset($classroom['is_active'])) ? $classroom['is_active'] : '';
$action_url = base_url() . 'admin/ae-classroom/' . $id;
// echo '<pre>';
// print_r($subjects_teacher);
?>
<form id="classroomfrom" method="post" action="<?= $action_url; ?>">
<div class="form-group assign_subject">
<label>Course <span class="text-danger font-weight-bold">*</span></label>
<select name="course_id" id="course_id" class="selectpicker" data-live-search="true">
<option value="" data-course_name="">-- Select Option --</option>
<?php foreach ($courselist as $c_value) {
$selected = ($course_id == $c_value['id']) ? "selected" : "";
?>
<option value="<?= $c_value['id']; ?>" <?= $selected; ?> data-course_name="<?= $c_value['course_name']; ?>"><?= $c_value['course_name']; ?></option>
<?php
} ?>
</select>
<label id="course_id-error" class="error" for="course_id"></label>
</div>
<div class="form-group assign_subject">
<label>Section <span class="text-danger font-weight-bold">*</span></label>
<?php if ($id == 0) {
?>
<select name="section_id" id="section_id" class="selectpicker" data-live-search="true">
<option value="" data-section_name="">-- Select Option --</option>
</select>
<?php
} else {
?>
<select name="section_id" id="section_id" class="selectpicker" data-live-search="true">
<option value="" data-section_name="">-- Select Option --</option>
<?php foreach ($sectionlist as $s_value) {
$selected = ($section_id == $s_value['sectionId']) ? "selected" : "";
?>
<option value="<?= $s_value['sectionId']; ?>" <?= $selected; ?> data-section_name="<?= $s_value['section_name']; ?>"><?= $s_value['section_name']; ?></option>
<?php
} ?>
</select>
<?php } ?>
<label id="section_id-error" class="error" for="section_id"></label>
</div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Classroom Name <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="classroom_name" id="classroom_name" class="form-control" value="<?= $classroom_name; ?>" placeholder="Enter classroom name" readonly>
<label id="classroomerror" class="error" style="display : none"></label>
</div>
</div>
<?php
if ($id == 0) {
?>
<div class="form-group" id="subject_section">
</div>
<?php
}
?>
<div class="form-group">
<label for="">Status <span class="text-danger font-weight-bold">*</span></label>
<?php
$active_list = array('yes', 'no');
?>
<select name="is_active" id="is_active" class="form-control">
<option value="">-- Select Option --</option>
<?php foreach ($active_list as $avlue) {
$selected = ($is_active == $avlue) ? "selected" : "";
?>
<option <?= $avlue ?> <?= $selected ?>><?= $avlue ?></option>
<?php } ?>
</select>
<label id="is_active-error" class="error" for="is_active"></label>
</div>
<!-- updated start -->
<?php if ($id > 0) { ?>
<label for="" class="subject-label"> Subject and Teacher</label>
<?php
foreach ($course_subjects as $cs_value) {
$SubjectName = $this->db->get_where('subject', array('id' => $cs_value['course_subject_ids']))->row()->subject_name;
$SubjectTeachers_list = $this->Admin_model->get_general_result_details('teacher_subjects', 'ASC', array('subject_id' => $cs_value['course_subject_ids']));
?>
<div class="subject-flex">
<div class="form-group ">
<input type="hidden" name="subject_id[]" class="form-control" value="<?php echo $cs_value['course_subject_ids'] ?>">
<input type="text" class="form-control" value="<?php echo (!empty($SubjectName)) ? $SubjectName : "No Subject Found"; ?>" readonly>
</div>
<div class="form-group subject-select">
<select name="teacher_id[]" id="" class="form-control subjects">
<?php
echo '<option value="" data-course_name="">-- Select Option --</option>';
foreach ($SubjectTeachers_list as $stl_value) {
$TeacherSelected = ($stl_value['teacher_id'] == $cs_value['teacher_id']) ? "selected" : "";
?>
<option value="<?php echo $stl_value['teacher_id']; ?>" <?= $TeacherSelected; ?>>
<?php
// echo $value['teacher_id'];
echo $TeacherName = $this->db->get_where('teacher', array('id' => $stl_value['teacher_id']))->row()->teacher_name;
?>
</option>
<?php
}
?>
</select>
</div>
<!-- <div class="p-2">
<?php
$classTeacherChecked = '';
if ($cs_value['is_class_teacher'] == 'yes') {
$classTeacherChecked = 'Class Teacher';
echo 'Class Teacher';
}
// print_r($cs_value);
?>
<label></label>
</div> -->
</div>
<?php
}
} ?>
<!-- <input type="text" id="classSubject" name="classSubject" class="col-md-12" /> -->
<!-- updated end -->
<button type="submit" class="subject_addbtn"><?php echo $btnvalue = ($id > 0) ? 'Update' : 'Add'; ?></button>
<a href="<?= base_url(); ?>admin/classroom"><button type="button" class=" ml-2 subject_addbtn bg-dark">Back</button></a>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script> -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$('.isClassTeacher').on('change', function(i, v) {
console.log(i.which);
$('.isClassTeacher').not(this).prop('checked', false);
$('#classSubject').val('v')
});
</script>
<script>
$('#assign_subject_id').on('change', function() {
var id = $('#assign_subject_id').find(":selected").val();
alert(id);
$.ajax({
url: '<?php echo base_url() . 'admin/get_subject_teachers/' ?>' + id,
type: 'GET',
dataType: 'json',
success: function(result) {
let section = '';
console.log(result);
section += '<option value=""> - Select Section - </option>';
$.each(result, function(key, value) {
section += '<option value="' + value['teacher_id'] + '">' + value['teacher_name'] + '</option>';
});
$("#section_select").
data(section);
}
});
});
$(document).ready(function() {
var CName = $('#course_id :selected').data('course_name')
var CourseName = (CName != '') ? CName : '';
var SName = $('#section_id :selected').data('section_name');
var SectionName = (SName != '') ? SName : '';
$('#course_id').change(function() {
var courseID = $(this).val();
CourseName = $('#course_id :selected').data('course_name');
if (CourseName != '') {
var FullName = CourseName + ' - ' + SectionName;
$('#classroom_name').attr('value', FullName);
}
get_subjects(courseID);
var div_data = '<option value="" data-section_name="" > -- Please Select -- </option>';
$.ajax({
type: 'post',
url: '<?php echo base_url(); ?>Admin/getSectionsforClassroomByCourse',
data: {
course_id: courseID
},
dataType: 'json',
success: function(response) {
$.each(response, function(i, obj) {
div_data += "<option value=" + obj.id + " data-section_name='" + obj.section_name + "'>" + obj.section_name + "</option>";
});
// console.log(div_data);
$('#section_id').empty().append(div_data).selectpicker("refresh");
}
});
});
function get_subjects(courseID) {
$('#subject_section').html('');
$.ajax({
type: 'post',
url: '<?php echo base_url(); ?>Admin/getSubjectsByCourse',
data: {
course_id: courseID
},
dataType: 'json',
success: function(response) {
var subarr = response.subjects;
var tr = '';
$.each(subarr, function(i, value1) {
tr += '<label for="">Subject and Teacher</label><input type="hidden" class="form-control" name="classroom_subjects[]" id="crsubject" value="' + value1.id + '">';
tr += '<input type="text" class="form-control" value="' + value1.subject_name + '">';
tr += gettechers(value1.id);
});
$('#subject_section').append(tr);
}
});
}
function gettechers(id) {
tr = '';
$.ajax({
url: "<?= base_url() ?>admin/getTeacherbysubjects",
data: {
subject_id: id
},
type: 'POST',
async: false,
success: function(data) {
data = JSON.parse(data);
// console.log(data);
tr += '<select name="classroom_teacher[]" class="form-control subjects"> <option value=""> - Please Select Teacher - </option>'
if (data['teachers'].length > 0) {
$.each(data['teachers'], function(i, value2) {
tr += '<option value="' + value2['teach_id'] + '">' + value2['teacher_name'] + '</option>';
});
} else {
tr += '<option value=" "> No Teacher Found</option>';
}
tr += '</select> <p id="crteacher_error" style="color:red;"></p>';
}
});
return tr;
}
$('#section_id').change(function() {
if (CourseName != '') {
SectionName = $('#section_id :selected').data('section_name');
var FullName = CourseName + ' - ' + SectionName;
$('#classroom_name').attr('value', FullName);
} else {
$('#section_id').val('');
$('#course_id-error').text("Please Select Course Name");
}
});
//multiple select js start
$('select').selectpicker();
//multiple select js end
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9- ]{2,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#classroomfrom").validate({
// ignore: "input[type='text']:hidden",
rules: {
classroom_name: {
required: true,
rangelength: [2, 50],
inputregx: true
},
course_id: {
required: true
},
section_id: {
required: true
},
is_active: {
required: true
},
},
messages: {
classroom_name: {
required: "Please enter subject name "
},
course_id: {
required: "Please select course"
},
section_id: {
required: "Please select section"
},
is_active: {
required: "Please select status"
},
},
submitHandler: function(form) {
var EditId = "<?= $id ?>";
// if (EditId == 0) {
var inputValue = $("input[name='classroom_name']", form).val();
let flag = false;
$.ajax({
url: "<?= base_url() ?>admin/checknamewithId",
data: {
id: EditId,
value: inputValue,
tablename: "classroom",
column: "classroom_name"
},
type: 'POST',
async: false,
success: function(data) {
// console.log(data);
if (data == 'success')
flag = true;
}
});
if (flag) {
form.submit();
} else {
$('#classroomerror').show();
$('#classroomerror').text('This Classroom name already exists.');
}
// } else {
// form.submit();
// }
}
});
});
</script>

View File

@ -0,0 +1,250 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<style>
form label.error, #secNameerr {
color : red;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template course---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show mb-3" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<form action="<?php echo base_url() ?>admin/ae-course/<?php echo $id ?>" method="post" id="courseForm">
<?php if($id == 0) {?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Course Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="course_name" class="form-control" placeholder="Name of the course">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group assign_subject">
<label>Assign Subjects<span class="text-danger font-weight-bold">*</span></label>
<select name="csubject[]" id="csubject" class="selectpicker" multiple data-live-search="true">
<option disabled value="">Choose Subjects</option>
<?php foreach($subject_list as $subject) { ?>
<option value="<?= $subject['id']; ?>"><?= $subject['subject_name']; ?></option>
<?php } ?>
</select>
<label id="csubject-error" class="error" for="csubject" style="display:none"></label>
</div>
<div class="form-group assign_subject">
<label>Assign Sections<span class="text-danger font-weight-bold">*</span></label>
<select name="csection[]" id="csection" class="selectpicker" multiple data-live-search="true">
<option disabled value="">Choose Sections </option>
<?php foreach($section_list as $section) { ?>
<option value="<?= $section['id']; ?>"><?= $section['section_name']; ?></option>
<?php } ?>
</select>
<label id="csection-error" class="error" for="csection" style="display:none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected disabled value="">Choose section status</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<label id="is_active-error" class="error" for="is_active" style="display:none"></label>
</div>
<input type="submit" class="subject_addbtn" value="Save">
<a href="<?= base_url(); ?>admin/course"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } else { ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Course Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="course_name" value="<?php echo $course_info['course_name'] ?>" class="form-control" placeholder="Name of the course">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group assign_subject">
<label>Assign Subjects<span class="text-danger font-weight-bold">*</span></label>
<select name="csubject[]" id="csubject" class="selectpicker" multiple data-live-search="true">
<option disabled value="">Choose Subjects</option>
<?php if($course_subject_info) {
foreach($course_subject_info as $subject) { ?>
<option selected value="<?= $subject['subject_id']; ?>"><?= $subject['subject_name']; ?></option>
<?php }
} ?>
<?php
if($difference_subject) {
foreach($difference_subject as $subject) { ?>
<option value="<?= $subject['id']; ?>"><?= $subject['subject_name']; ?></option>
<?php } }?>
</select>
<label id="csubject-error" class="error" for="csubject" style="display:none"></label>
</div>
<div class="form-group assign_subject">
<label>Assign Sections<span class="text-danger font-weight-bold">*</span></label>
<select name="csection[]" id="csection" class="selectpicker" multiple data-live-search="true">
<option disabled value="">Choose Sections </option>
<?php foreach($course_section_info as $section) { ?>
<option selected value="<?= $section['section_id']; ?>"><?= $section['section_name']; ?></option>
<?php } ?>
<?php foreach($difference_section as $section) { ?>
<option value="<?= $section['id']; ?>"><?= $section['section_name']; ?></option>
<?php } ?>
</select>
<label id="csection-error" class="error" for="csection" style="display:none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected value="<?php echo $course_info['is_active'] ?>"><?php echo $course_info['is_active'] ?></option>
<?php if($course_info['is_active'] == 'yes') { ?>
<option value="no">no</option>
<?php } else {?>
<option value="yes">yes</option>
<?php } ?>
</select>
<label id="is_active-error" class="error" for="is_active" style="display:none"></label>
</div>
<input type="submit" class="subject_addbtn" value="Update">
<a href="<?= base_url(); ?>admin/course"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
</form>
<?php } ?>
</div>
</div>
</div>
<!----admin template course end---->
</main>
<!--End right-top side-->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function(){
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
<script>
$(document).on('keypress', function(e){
if(e.which==13)
{
$('form').submit();
}
});
$(document).ready(function(){
jQuery.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || /^[a-z\0-9\-\s]+$/i.test(value);
}, "Please enter alphanumeric Characters only");
$("#courseForm").validate({
rules: {
course_name: {
required: true,
minlength: 1,
alphanumeric : true
},
'csubject[]' : "required",
'csection[]' : "required",
is_active : "required"
},
messages: {
course_name: {
required: "Please provide a course name",
minlength : "Please enter more than 4 Characters"
},
'csubject' : "Please choose 1 subject",
'csection' : "Please choose 1 section",
is_active : "Please select course's status"
},
submitHandler: function(form) {
var inputValue = $("input[name='course_name']",form).val();
inputValue = inputValue.toLowerCase();
let flag = false;
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_validate_course_name',
data : {
value : inputValue,
id : <?php echo $id ?>
},
type : 'POST',
async : false,
success: function(data){
console.log(data);
if(data == 'success'){
flag = true
}
}
});
if(flag) {
form.submit();
} else {
$('#secNameerr').show();
$('#secNameerr').text('This course name already exists.');
}
}
});
});
</script>

View File

@ -0,0 +1,162 @@
<style>
form label.error, #secNameerr {
color : red;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template Exam---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form action="<?php echo base_url() ?>admin/ae-exam/<?php echo $id ?>" method="post" id="examForm">
<?php if($id == 0) {?>
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Exam Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="e_name" class="form-control" placeholder="Name of the exam">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected disable value="">Choose exam status</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
<input type="submit" class="subject_addbtn" value="Save">
<a href="<?= base_url(); ?>admin/exam-view"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } else { foreach ($result as $key => $value) {
?>
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Exam <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="e_name" value="<?php echo $value['e_name'] ?>" class="form-control" placeholder="Name of the exam">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected value="<?php echo $value['is_active'] ?>"><?php echo $value['is_active'] ?></option>
<?php if($value['is_active'] == 'yes') { ?>
<option value="no">no</option>
<?php } else {?>
<option value="yes">yes</option>
<?php } ?>
</select>
</div>
<input type="submit" class="subject_addbtn" value="Update">
<a href="<?= base_url(); ?>admin/exam-view"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } }?>
</div>
</div>
</div>
<!----admin template Exam end---->
</main>
<!--End right-top side-->
<script>
$(document).ready(function(){
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 ]{3,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#examForm").validate({
rules: {
e_name: {
required: true,
inputregx: true,
minlength: 1
},
is_active : "required"
},
messages: {
e_name: {
required: "Please provide a Exam name",
minlength : "Please enter more than 4 Characters"
},
is_active : 'Please select the status of Exam'
},
submitHandler: function(form) {
var inputValue = $("input[name='e_name']",form).val();
inputValue = inputValue.toLowerCase();
let flag = false;
$.ajax({
url : '<?php echo base_url() ?>admin/check-exam-name',
data : {
value : inputValue
},
type : 'POST',
async : false,
success: function(data){
if (data == '[]') {
flag = true;
}
let response = JSON.parse(data);
$.each(response, function(key, value) {
let item = value['name'].toLowerCase();
if(inputValue === item) {
console.log('inside second');
flag = false;
return flag;
} else {
flag = true;
}
});
}
});
if(flag) {
form.submit();
} else {
$('#secNameerr').show();
$('#secNameerr').text('This Exam name already exists.');
}
}
});
});
</script>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,927 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<style>
.multiple-fields-fees .form-div {
width: auto;
margin-right: 12px;
}
label.error,label#Nameerr,#dublicateErr {
color: red;
}
/*input {
height: calc(2.25rem + 2px);;
}*/
.form-control[readonly] {
background-color: rgb(255 255 255 / 0%);
opacity: 1;
}
.form-control[disabled] {
background-color: #e9ecef;
opacity: 1;
}
.dropdown.bootstrap-select {
width: 240px !important;
display: block !important;
}
</style>
<script src="<?php echo base_url(); ?>assets_admin/js/moment.min.js"></script>
<main class="wraper responsive-width" id="main" >
<div class="main-wrap" >
<div class="dashboard-cover">
<?php if($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="common-heading">
<!-- <div class="calendar-type mb-3">
<p class="mb-2">Note : Click below button to change type of calendar</p>
<input type="checkbox" id="cal_language" name="cal_language" checked data-toggle="toggle" data-on="Bikram Sambat" data-off="Gregorian" data-onstyle="primary" data-offstyle="success">
</div> -->
<h2>Fee </h2>
</div>
<form action="<?= base_url() ?>admin/ae-fee-course/<?= $fees_id ?>" id="fee_form" method="post">
<?php if($fees_id == 0) { ?>
<div class="feeForm-wrap">
<div class="form-group">
<label for="">Batch<span class="text-danger font-weight-bold">*</span></label>
<select name="batch_id" class="form-control" id="batch_id">
<option selected disabled value=''>Select one batch</option>
<?php foreach ($batches as $key => $value) {
echo '<option value="'.$value['id'].'">'.$value['b_name'].' : '.batchdateFormatTo($value['b_from'], $value['b_end']).'</option>';
} ?>
</select>
<div class="empty_batch_err" style="display:none;color:red"></div>
</div>
<div class="form-group">
<label for="">Course<span class="text-danger font-weight-bold">*</span></label>
<select name="course_id[]" multiple class="form-control selectpicker" id="course_id" onchange="CourseChange(this)">
<option disabled value=''>Select Courses</option>
<?php foreach ($courses as $key => $value) {
echo '<option value="'.$value['id'].'">'.$value['course_name'].'</option>';
} ?>
</select>
</div>
<div class="form-group">
<label for="">Fees Type<span class="text-danger font-weight-bold">*</span></label>
<select name="feetype" onchange="check_hostel_type(this)" class="form-control" id="feetype">
<option selected disabled value=''>Select fee type</option>
<?php foreach ($feeTypes as $key => $value) {
echo '<option value="'.$value['id'].'">'.$value['feetype_name'].'</option>';
} ?>
</select>
<label id="Nameerr" style="display : none"></label>
</div>
<div class="form-group" id="group-checkbox-id">
<label>Group Fees</label>
<label class="checkBox">
<input type="checkbox" id="checkBx" name="grouped" onchange="valueChanged()">
<span class="checkmark"></span>
</label>
<div class="form-group-h">
<div class="form-group">
<label for="">Due date<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="common_bs_due_date" class="form-control cm-datepicker common_date_picker" id="cm-datepicker" placeholder="Select Date"/>
<input type="date" onchange="applyEnglishDate(this, event)" name="common_ad_due_date" placeholder="Select Date" class="form-control eng-date english-datepicker common_date_picker" style="display: none;">
</div>
</div>
</div>
<div id="newdropdowns"></div>
<div class="multiple-fields-fees">
<div class="form-group form-group-div">
<div class="form-div">
<label for="">Fees Name<span class="text-danger font-weight-bold">*</span></label>
<div class="fees-name-container">
<input type="text" name="feename[0]" id="" class="form-control feeNameClass" placeholder="Enter fees name">
</div>
</div>
<div class="form-div">
<label for="">Amount<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="feeamount[0]" id="" class="form-control feeAmountClass" placeholder="Enter fees amount">
</div>
<div class="form-div">
<label for="">Due date<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="bsdate[0]" class="form-control cm-datepicker nepali-datepicker" id="nepali-datepicker" placeholder="Select Date"/>
<input type="date" name="englishdate[0]" class="form-control english-datepicker" style="display: none;" placeholder="Select Date">
</div>
<div class="form-div add-remove-btns">
<button style="display:none" class="add-delete-btn" onclick="addExtraFields(this, event)" name="Add new Course" id="addBtn1">+</button>
</div>
</div>
</div>
<div id="dublicateErr" class="mb-2" style="display:none"></div>
<hr>
<!-- Nstallments section -->
<!-- <div class="installment-section mt-3 mb-3">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="installment">
<label class="form-check-label" for="installment">Create Installments</label>
</div>
<div class="main_installments_container mt-3" style="display:none">
<select class="form-control" name="payment_type">
<option value="" selected>Choose one payment type</option>
<?php
foreach ($payment_types as $key => $value) { ?>
<option value="<?= $value['id'] ?>"><?= $value['payment_type_name'] ?></option>
<?php }
?>
</select>
</div>
</div>
<script type="text/javascript">
$('#installment').on('change',function() {
let sum = 0;
$('#dublicateErr').hide();
$('.feeAmountClass').each(function(i,ele) {
sum += Number(ele.value);
})
if(sum > 0) {
if($('#installment').is(":checked")) {
$('.main_installments_container').show();
}
} else {
$('.main_installments_container').hide();
$('#dublicateErr').text('Please enter atleast one amount');
$('#dublicateErr').show();
$(this).prop('checked', false)
}
})
</script> -->
<!-- Nstallments section -->
<input type="submit" class="subject_addbtn" value="Save">
<a href="<?php echo base_url() ?>admin/fee-course"><button type="button" class=" ml-2 subject_addbtn bg-dark">Back</button></a>
</div>
<?php } else { // UPDATE FORM STARTS HERE ?>
<div class="feeForm-wrap">
<div class="form-group">
<label for="">Batch<span class="text-danger font-weight-bold">*</span></label>
<select name="batch_id" class="form-control" id="batch_id">
<?php foreach ($batches as $key => $value) {
if(in_array($course_fees[0]['batch'],$value)) {
echo '<option selected value="'.$value['id'].'">'.$value['b_name'].' : '.batchdateFormatTo($value['b_from'], $value['b_end']).'</option>';
} else {
echo '<option value="'.$value['id'].'">'.$value['b_name'].' : '.batchdateFormatTo($value['b_from'], $value['b_end']).'</option>';
}
} ?>
</select>
</div>
<div class="form-group">
<label for="">Course<span class="text-danger font-weight-bold">*</span></label>
<select name="course_id" class="form-control" id="course_id" >
<?php foreach ($courses as $key => $value) {
if(in_array($course_fees[0]['course'],$value)) {
echo '<option selected value="'.$value['id'].'">'.$value['course_name'].'</option>';
} else {
echo '<option value="'.$value['id'].'">'.$value['course_name'].'</option>';
}
} ?>
</select>
</div>
<div class="form-group">
<?php
$disabled_var = $course_fees[0]['fee_id'] == 8 ? 'enabled' : '';
?>
<label for="">Fees Type<span class="text-danger font-weight-bold">*</span></label>
<select name="feetype" <?= $disabled_var ?> onchange="check_hostel_type(this)" class="form-control" id="feetype" >
<?php foreach ($feeTypes as $key => $value) {
if(in_array($course_fees[0]['feetype'],$value)) {
echo '<option selected value="'.$value['id'].'">'.$value['feetype_name'].'</option>';
} else {
echo '<option value="'.$value['id'].'">'.$value['feetype_name'].'</option>';
}
} ?>
</select>
<label id="Nameerr" style="display : none"></label>
</div>
<?php
$div_style = $course_fees[0]['fee_id'] == 8 ? 'none' : 'block';
?>
<div class="form-group" id="group-checkbox-id" style="display:<?= $div_style ?>">
<label>Group Fees</label>
<label class="checkBox">
<?php if($course_fees[0]['grouped'] == 'yes') {
echo '<input type="checkbox" checked name="grouped" id="checkBx" onchange="valueChanged()">';
} else {
echo '<input type="checkbox" name="grouped" id="checkBx" onchange="valueChanged()">';
} ?>
<span class="checkmark"></span>
</label>
<div class="form-group-h">
<div class="form-group">
<label for="">Due date<span class="text-danger font-weight-bold">*</span></label>
<?php if($course_fees[0]['grouped'] == 'yes') { ?>
<input type="text" value="<?= $course_fees[0]['due_date'] ?>" name="common_bs_due_date" class="form-control cm-datepicker common_date_picker" id="cm-datepicker" placeholder="Select Date"/>
<?php } else { ?>
<input type="text" name="common_bs_due_date" class="form-control cm-datepicker common_date_picker" id="cm-datepicker" placeholder="Select Date"/>
<?php } ?>
<input type="date" name="common_ad_due_date" placeholder="Select Date" class="form-control english-datepicker eng-date common_date_picker" style="display: none;">
</div>
</div>
</div>
<?php
// dd($course_fees);
$route_div_style = $course_fees[0]['fee_id'] == 4 ? '' : 'd-none';
?>
<div class="form-group <?=$route_div_style; ?>" >
<?php //dd($course_fees); ?>
<label for="">Route Name<span class="text-danger font-weight-bold">*</span></label>
<select name="new_route_id" class="form-control" id="new_route_id" >
<?php
foreach ($edit_route_list as $rt_key => $rt_value) {
if($course_fees[0]['route_id']==$rt_value['id']) {
echo '<option selected value="'.$rt_value['id'].'">'.$rt_value['route_name'].'</option>';
} else {
echo '<option value="'.$rt_value['id'].'">'.$rt_value['route_name'].'</option>';
}
} ?>
</select>
</div>
<div class="multiple-fields-fees">
<?php $selectedPlan = '' ?> <!-- // Used only for Hostel -->
<?php
// dd($course_fees);
foreach ($course_fees as $key => $value) {
$feenames = (array)json_decode($value['fees_name']);
$nameLength = count($feenames);
// dd($feenames);
foreach ($feenames as $index => $ele) {
$selectedPlan = $ele->name; // Ignore if fee type is not hostel
?>
<div class="form-group form-group-div ">
<div class="form-div">
<?php //echo $index."<br>".$ele->name; ?>
<label for="">Fees Name - <?php //echo $index ?><span class="text-danger font-weight-bold">*</span></label>
<div class="fees-name-container">
<input type="text" value="<?= $ele->name ?>" name="feename[<?= $index ?>]" id="" class="form-control feeNameClass checkfeename" placeholder="Enter fees name">
</div>
</div>
<div class="form-div">
<label for="">Amount<span class="text-danger font-weight-bold">*</span></label>
<input type="text" value="<?= $ele->amount ?>" name="feeamount[<?= $index ?>]" id="" class="form-control feeAmountClass" placeholder="Enter fees amount">
</div>
<?php if($value['grouped'] == 'no') { ?>
<div class="form-div">
<label for="">Due date<span class="text-danger font-weight-bold">*</span></label>
<input type="text" value="<?= $value['due_date'] ?>" name="bsdate[0]" class="form-control cm-datepicker nepali-datepicker" id="nepali-datepicker" placeholder="Select Date"/>
<input type="date" name="englishdate[<?= $index ?>]" class="form-control english-datepicker" style="display: none;" placeholder="Select Date">
</div>
<?php } else { ?>
<div class="form-div">
<label for="">Due date<span class="text-danger font-weight-bold">*</span></label>
<input type="text" disabled value="<?= $value['due_date'] ?>" name="bsdate[0]" class="form-control cm-datepicker nepali-datepicker" id="nepali-datepicker" placeholder="Select Date"/>
<input type="date" disabled name="englishdate[<?= $index ?>]" class="form-control english-datepicker" style="display: none;" placeholder="Select Date">
</div>
<?php } ?>
<?php if($nameLength == 1) { ?>
<div class="form-div add-remove-btns">
<button style="display:none" class="add-delete-btn" onclick="addExtraFields(this, event)" name="Add new Course" id="addBtn1">+</button>
</div>
<?php } else if($index == ($nameLength - 1)){ ?>
<div class="form-div add-remove-btns">
<button style="display:none" class="add-delete-btn" onclick="addExtraFields(this, event)" name="Add new Course" id="addBtn1">+</button>
</div>
<div class="form-div add-remove-btns remove-btn">
<button class="add-delete-btn" onclick="removeExtraField(this, event)" name="Add new Course" id="addBtn1">-</button>
</div>
<?php } else if($index > 0) { ?>
<div class="form-div add-remove-btns remove-btn">
<button class="add-delete-btn" onclick="removeExtraField(this, event)" name="Add new Course" id="addBtn1">-</button>
</div>
<?php } ?>
</div>
<?php }
} ?>
</div>
<div id="dublicateErr" class="mb-2" style="display:none"></div>
<input type="submit" class="subject_addbtn" value="Update">
<a href="<?php echo base_url() ?>admin/fee-course"><button type="button" class=" ml-2 subject_addbtn bg-dark">Back</button></a>
</div>
<?php } ?>
</form>
</div>
</div>
</main>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script type="text/javascript">
function CourseChange(element){
// alert(element.id);
$('#feetype').val('');
$('#newdropdowns').empty();
}
function CheckRouteFee(inputelement){
let batchid=$('#batch_id option:selected').val();
// alert(BatchId);
// let CourseId=$('#cousrse_id option:selected').val();
let feeTypeId=$('#feetype option:selected').val();
var selectedValues=[];
let checkfeename=$('.checkfeename').val();
$('#course_id option:selected').each(function() {
let selectedItem=$(this).val();
// alert('course_ids'+selectedItem);
if(selectedItem !=''){
selectedValues.push(selectedItem);
}
});
let routeId=$('#'+inputelement.id).val();
if(batchid === '')
alert("Please Select Batch");
else if(feeTypeId === '')
alert("Please Select Fees Type");
else if(selectedValues.length === 0)
alert("Please Select course");
else if(routeId === '')
alert("Please Select Route");
if(batchid !=='' && feeTypeId !=='' && (selectedValues.length > 0) && routeId!==''){
var errdiv='';
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/check_route_fees',
type : 'POST',
data:{
batch_id:batchid,
feetype_id:feeTypeId,
course_ids:selectedValues,
route_id:routeId
},
dataType: "json",
success: function(response){
if(response != 0)
{
errdiv +='<p ><strong class="text-danger" style="font-size:16px;">NOTE : </strong> <span style="font-size:14px;" class="text-success">The existing fee names can not be created again.</span></p>';
// for(let i=0;i<response.length;i++){
// errdiv +='<p class="text-danger" style="font-size:12px;"> <strong>'+ response[i].fee_values +'</strong> Fees already created for Batch and Course <strong>'+response[i].course_name+'</strong></p>';
// }
$('#errorDiv').empty().append(errdiv);
}
}
});
}
else {
console.log(selectedValues.length);
}
// alert("batch "+BatchId);
// alert("feestype "+feeTypeId);
// alert(inputelement.id);
}
$('#batch_id').on('change', function() {
$('.empty_batch_err').hide();
$('#Nameerr').hide();
})
const check_hostel_type = function(ele) {
$('#newdropdowns').empty();
$('#Nameerr').hide();
$('#group-checkbox-id').show();
let feenameContainer = $('.fees-name-container');
let notFirstChild = $('.multiple-fields-fees .form-group.form-group-div:not(:first-child)');
if(ele.value == 3) {
$('#group-checkbox-id').hide();
$('.main_installments_container').hide();
if(notFirstChild.length > 0) {
notFirstChild.remove();
$('.multiple-fields-fees .form-control').each(function(index,ele) {
ele.value = '';
})
}
$('#group-checkbox-id').hide();
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_get_hostel_plans',
type : 'POST',
async : false,
success: function(data){
feenameContainer.empty();
feenameContainer.append(data);
}
});
} else if(ele.value == 4) {
$(".add-delete-btn").show();
$('#group-checkbox-id').hide();
$('.empty_batch_err').hide();
$('#Nameerr').hide();
$('.main_installments_container').hide();
if(notFirstChild.length > 0) {
notFirstChild.remove();
$('.multiple-fields-fees .form-control').each(function(index,ele) {
ele.value = '';
})
}
$('#group-checkbox-id').hide();
let batch_id = $('#batch_id').val();
if(batch_id) {
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_get_transport_routes_new',
type : 'POST',
data : {
batch_id
},
async : false,
success: function(data){
// console.log(data);
if(!data) {
$('#Nameerr').show();
$('#Nameerr').text('There are no routes for selected batch to create Transport fees');
$(ele).val('');
} else {
$('#newdropdowns').empty();
$('#newdropdowns').append(data);
feenameContainer.empty();
feenameContainer.append('<input type="text" name="feename[0]" id="" class="form-control feeNameClass" placeholder="Enter fees name">');
}
}
});
} else {
$('.empty_batch_err').show();
$('.empty_batch_err').text('Please select a batch');
$(ele).val('');
}
// afras code start here
// if(batch_id) {
// $.ajax({
// url : '<?php //echo base_url() ?>' + 'admin/ajax_get_transport_routes',
// type : 'POST',
// data : {
// batch_id
// },
// async : false,
// success: function(data){
// console.log(data);
// if(!data) {
// $('#Nameerr').show();
// $('#Nameerr').text('There are no routes for selected batch to create Transport fees');
// $(ele).val('');
// } else {
// feenameContainer.empty();
// feenameContainer.append(data);
// }
// }
// });
// } else {
// $('.empty_batch_err').show();
// $('.empty_batch_err').text('Please select a batch');
// $(ele).val('');
// }
// Afras code end here
} else if (ele.value == 8) {
$("#group-checkbox-id").hide();
$(".add-delete-btn").show();
} else {
$('.main_installments_container').show();
$('#group-checkbox-id').show();
feenameContainer.empty();
feenameContainer.append('<input type="text" name="feename[0]" id="" class="form-control feeNameClass" placeholder="Enter fees name">');
$('.multiple-fields-fees .form-control').each(function(index,ele) {
ele.value = '';
})
}
}
const set_plan_id = function(ele) {
let id = $(ele).find(':selected').data('id');
$('#hostel_plan_id').val(id);
}
const set_transport_route_id = function(ele) {
let id = $(ele).find(':selected').data('id');
$('#route_id').val(id);
}
$(document).ready(function(){
if($('#checkBx').is(":checked")) {
$(".form-group-h").show();
$(".add-delete-btn").show();
} else {
$(".form-group-h").hide();
$(".add-delete-btn").hide();
}
$('.english-datepicker').attr('min', moment().format('YYYY-MM-DD'))
var mainInput = $(".cm-datepicker");
let NDate = NepaliFunctions.GetCurrentBsDate();
let todayDate = `${NDate.year}-${NDate.month}-${NDate.day}`;
mainInput.nepaliDatePicker({
disableBefore: todayDate,
language : 'english',
onChange: function(data) {
$('.nepali-datepicker').val(data.bs);
},
});
// *************************************************************************
<?php if($fees_id > 0) { ?>
if($('#feetype').val() == 3) {
$('#group-checkbox-id').hide();
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_get_hostel_plans',
type : 'POST',
data : {
selected_plan : '<?= $selectedPlan ?>'
},
async : false,
success: function(data){
let feenameContainer = $('.fees-name-container');
feenameContainer.empty();
feenameContainer.append(data);
}
});
}
if($('#feetype').val() == 4) {
$('#newdropdowns').empty();
$('#group-checkbox-id').hide();
let batch_id = $('#batch_id').val();
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_get_transport_routes_new',
type : 'POST',
data : {
selected_plan : '<?= $selectedPlan ?>',
batch_id
},
async : false,
success: function(data){
$('#newdropdowns').append(data);
// let feenameContainer = $('.fees-name-container');
// feenameContainer.empty();
// feenameContainer.append();
}
});
}
<?php } ?>
});
</script>
<script type="text/javascript">
const applyEnglishDate = (ele) => {
$('.english-datepicker').val(ele.value);
}
</script>
<script type="text/javascript">
let clonedItems = [];
$('.nepali-datepicker').attr('readonly', 'readonly');
function valueChanged()
{
let notFirstChild = $('.multiple-fields-fees .form-group.form-group-div:not(:first-child)');
if($('#checkBx').is(":checked")){
$(".form-group-h").show();
$(".add-delete-btn").show();
if(notFirstChild.length > 0) {
$('.multiple-fields-fees').append(notFirstChild);
}
$('.english-datepicker').attr("disabled", true);
$('.nepali-datepicker').attr("disabled", true);
$('.eng-date').prop('disabled', false);
}else{
$('.english-datepicker').removeAttr('disabled');
$('.nepali-datepicker').removeAttr('disabled');
$('.english-datepicker').removeAttr('readonly');
$('.nepali-datepicker').removeAttr('readonly');
$(".form-group-h").hide();
$(".add-delete-btn").hide();
if(notFirstChild.length > 0) {
notFirstChild.remove();
}
}
if($('#checkBx').is(":checked")) {
let updatedMultipleFields = $('.multiple-fields-fees .form-group.form-group-div');
$('.add-remove-btns').remove();
for (var i = updatedMultipleFields.length - 1; i >= 0; i--) {
if(i == 0 && (updatedMultipleFields.length == 1)) {
$(updatedMultipleFields[i]).append('<div class="form-div add-remove-btns"><button class="add-delete-btn" onclick="addExtraFields(this, event)" name="Add new Course" id="addBtn1">+</button></div>');
} else if(i == updatedMultipleFields.length - 1) {
$(updatedMultipleFields[i]).append('<div class="form-div add-remove-btns"><button class="add-delete-btn" onclick="addExtraFields(this, event)" name="Add new Course" id="addBtn1">+</button></div><div class="form-div add-remove-btns remove-btn"><button class="add-delete-btn" onclick="removeExtraField(this, event)" name="Add new Course" id="addBtn1">-</button></div>');
} else if (i == 0 ) {
$(updatedMultipleFields[i]).append('');
} else {
$(updatedMultipleFields[i]).append('<div class="form-div add-remove-btns remove-btn"><button class="add-delete-btn" onclick="removeExtraField(this, event)" name="Add new Course" id="addBtn1">-</button></div>');
}
}
}
}
// Add extra field
let count = 1;
let idCount = $('.multiple-fields-fees .form-group.form-group-div').length - 1;
function addExtraFields(ele,e){
e.preventDefault();
count = count + parseInt($(ele).parent().prev().find('input').attr('id'));
let extra = $(ele).parent().parent().clone();
$(extra).children('.remove-btn').remove();
$(extra).find('.feeAmountClass').val(null);
$(extra).find('.feeNameClass').val(null);
let newDatePicker = $(extra).find('.nepali-datepicker');
newDatePicker.attr('id', count);
extra.append('<div class="form-div add-remove-btns remove-btn"><button class="add-delete-btn" onclick="removeExtraField(this, event)" name="Add new Course" id="addBtn1">-</button></div>');
$('.multiple-fields-fees').append(extra);
let multipleFieldslength = $('.multiple-fields-fees .form-group.form-group-div').length;
let allinputs = $(extra).find('input');
let nameVal = '';
for(let i=0; i<allinputs.length; i++) {
if(multipleFieldslength == 2) {
idCount = 0;
nameVal = allinputs[i].name.replace('[0]', '['+(idCount + 1)+']')
} else {
nameVal = allinputs[i].name.replace('['+idCount+']', '['+(idCount + 1)+']')
}
allinputs[i].setAttribute('name', nameVal);
}
idCount++;
ele.remove();
}
function removeExtraField(ele, e) {
e.preventDefault();
let CurrentParent = $(ele).parent().parent();
let removedIndex = 0;
let multipleFields = $('.multiple-fields-fees .form-group.form-group-div');
for (var i = multipleFields.length - 1; i >= 0; i--) {
if(multipleFields[i] == CurrentParent[0]) {
removedIndex = i;
}
}
$(ele).parent().parent().remove();
let updatedMultipleFields = $('.multiple-fields-fees .form-group.form-group-div');
$('.add-remove-btns').remove();
for (var i = updatedMultipleFields.length - 1; i >= 0; i--) {
if(i == 0 && (updatedMultipleFields.length == 1)) {
$(updatedMultipleFields[i]).append('<div class="form-div add-remove-btns"><button class="add-delete-btn" onclick="addExtraFields(this, event)" name="Add new Course" id="addBtn1">+</button></div>');
} else if(i == updatedMultipleFields.length - 1) {
$(updatedMultipleFields[i]).append('<div class="form-div add-remove-btns"><button class="add-delete-btn" onclick="addExtraFields(this, event)" name="Add new Course" id="addBtn1">+</button></div><div class="form-div add-remove-btns remove-btn"><button class="add-delete-btn" onclick="removeExtraField(this, event)" name="Add new Course" id="addBtn1">-</button></div>');
} else if (i == 0 ) {
$(updatedMultipleFields[i]).append('');
} else {
$(updatedMultipleFields[i]).append('<div class="form-div add-remove-btns remove-btn"><button class="add-delete-btn" onclick="removeExtraField(this, event)" name="Add new Course" id="addBtn1">-</button></div>');
}
}
}
</script>
<script>
$("#fee_form").validate({
ignore: ":hidden",
rules: {
batch_id: "required",
course_id : "required",
common_bs_due_date : "required",
common_ad_due_date : "required",
common_fee_name : "required",
feetype : "required",
<?php for($i = 0; $i < 20 ; $i++){
echo "'feename[$i]' : {
required : true,
},";
} ?>
<?php for($i = 0; $i < 20 ; $i++){
echo "'feeamount[$i]' : {
required : true,
digits : true
},";
} ?>
<?php for($i = 0; $i < 20 ; $i++){?>
'bsdate[<?php echo $i ?>]' : "required",
'englishdate[<?php echo $i ?>]' : "required",
<?php } ?>
},
messages: {
course_id : "Please select a course id",
batch_id : "Please select a batch id",
common_ad_due_date : "Please select a date",
common_bs_due_date : "Please select a date",
common_fee_name : "Please provide a common fee name",
feetype : "Please select a fee type",
<?php for($i = 0; $i < 20 ; $i++){
echo "'feename[$i]' : {
required : 'Please provide a fee name',
},";
} ?>
<?php for($i = 0; $i < 20 ; $i++){
echo "'feeamount[$i]' : {
required : 'Please provide a fee amount',
},";
} ?>
<?php for($i = 0; $i < 20 ; $i++){?>
'bsdate[<?php echo $i ?>]' : "Please select a date",
'englishdate[<?php echo $i ?>]' : "Please select a date",
<?php } ?>
},
submitHandler: function(form,e) {
e.preventDefault();
fee_type_id = $('#feetype').val()
let flag = false;
$('#Nameerr').hide();
$('#dublicateErr').hide();
if(fee_type_id != 1 && fee_type_id != 2 ) { // Non-Unique Validation
let feeVal = [];
$('.feeNameClass').each(function(index,ele) {
let val = ele.value.toLowerCase();
feeVal.push(val);
})
let inputDataArr = {
id : <?= $fees_id ?>,
batch_id : $('#batch_id').val(),
course_id : $('#course_id').val(),
fee_type : $('#feetype').val(),
fee_names : feeVal
}
let inputValue = JSON.stringify(inputDataArr);
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_check_fee_names',
data : {
info : inputValue,
},
type : 'POST',
async : false,
success: function(data){
console.log(data);
if(data){
flag = true
} else {
$('#dublicateErr').show();
$('#dublicateErr').text('provided fee names have been used with the same batch,course and feetype id. Please change atleast 1 name');
}
}
});
} else { // Unique Validation
let inputDataArr = {
id : <?= $fees_id ?>,
batch_id : $('#batch_id').val(),
course_id : $('#course_id').val(),
fee_type : $('#feetype').val(),
}
console.log(inputDataArr);
let inputValue = JSON.stringify(inputDataArr);
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_validate_fee_type',
data : {
info : inputValue,
},
type : 'POST',
async : false,
success: function(data){
console.log(data);
if(data == 'success'){
flag = true
} else {
$('#dublicateErr').show();
$('#dublicateErr').text('Application Fee and Course Fee cannot be created twice for the same batch,course,feetype combination');
}
}
});
}
if(flag) {
form.submit();
}
}
});
</script>
<script>
$('#cal_language').change(function() {
$('.english-datepicker').hide();
$('.nepali-datepicker').hide();
$('.cm-datepicker').hide();
if($(this).prop('checked')) {
$('.nepali-datepicker').show();
$('.cm-datepicker').show();
} else {
$('.english-datepicker').show();
}
})
</script>

View File

@ -0,0 +1,234 @@
<style>
form label.error, #Nameerr {
color : red;
}
.subject_l {
width : 50%;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template role---->
<div class="admin_tempblock" >
<div class="admin_tempsec">
<div class="admin_sec">
<form action="<?php echo base_url() ?>admin/roles/ae-role/<?php echo $id ?>" class="mb-5" method="post" id="roleForm">
<?php if($id == 0) {?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width" >
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Role Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" onkeypress="return lettersOnly(event)" name="role_name" id="role_name" class="form-control alphaonly" placeholder="Name of the role">
<label id="Nameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="status" class="form-control">
<option selected disable value="">Choose role status</option>
<option value="Active">Active</option>
<option value="Inactive">Inactive</option>
</select>
</div>
<div class="form-group">
<label for=""> Description</label>
<textarea class="form-control" data-altName="Description" name="role_desc" rows="6" placeholder="Add some description of your course..."></textarea>
</div>
<label class="d-block">Role Permissions<span class="text-danger font-weight-bold">*</span></label>
<div class="row mt-2 mb-3">
<?php foreach($menulist as $key => $value) { ?>
<div class="col-md-6 mt-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="<?php echo $value['id'] ?>" name="rolesid[]" id="<?php echo $value['id'] ?>">
<label class="form-check-label" for="<?php echo $value['id'] ?>">
<?php echo $value['menu_name'] ?>
</label>
</div>
</div>
<?php } ?>
<!-- <label id="rolesid[]-error" class="error mb-2" for="rolesid[]"></label>
</div> -->
<div class="common_btn_wrap">
<input type="submit" class="subject_addbtn" value="Save">
<a href="<?= base_url(); ?>admin/roles/list"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</div>
</form>
<?php } else { ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Role Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" id="role_name" onkeypress="return lettersOnly(event)" name="role_name" value="<?php echo $result[0]['role_name'] ?>" class="form-control" placeholder="Name of the role">
<label id="Nameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="status" class="form-control">
<option selected value="<?php echo $result[0]['status'] ?>"><?php echo $result[0]['status'] ?></option>
<?php if($result[0]['status'] == 'Active') { ?>
<option value="Inactive">Inactive</option>
<?php } else {?>
<option value="Active">Active</option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for=""> Description</label>
<textarea class="form-control" data-altName="Description" name="role_desc" rows="6" placeholder="Add some description of your course..."><?php echo $result[0]['role_desc'] ?></textarea>
</div>
<label class="d-block">Role Permissions<span class="text-danger font-weight-bold">*</span></label>
<div class="row mt-2 mb-3">
<?php foreach($menulist as $key => $value) {
if(in_array($value['id'],$pre_selected_ids)) { ?>
<div class="col-md-6 mt-2">
<div class="form-check">
<input class="form-check-input" checked type="checkbox" value="<?php echo $value['id'] ?>" name="rolesid[]" id="<?php echo $value['id'] ?>">
<label class="form-check-label" for="<?php echo $value['id'] ?>">
<?php echo $value['menu_name'] ?>
</label>
</div>
</div>
<?php } else { ?>
<div class="col-md-6 mt-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="<?php echo $value['id'] ?>" name="rolesid[]" id="<?php echo $value['id'] ?>">
<label class="form-check-label" for="<?php echo $value['id'] ?>">
<?php echo $value['menu_name'] ?>
</label>
</div>
</div>
<?php }
?>
<?php } ?>
<!-- <label id="rolesid[]-error" class="error mb-2" for="rolesid[]"></label> -->
</div>
<div class="common_btn_wrap">
<input type="submit" class="subject_addbtn" value="Update">
<a href="<?= base_url(); ?>admin/roles/list"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
<!----admin template role end---->
</main>
<!--End right-top side-->
<script>
$(document).on('keypress', function(e){
if(e.which==13)
{
$('form').submit();
}
});
$(document).ready(function(){
$("#roleForm").validate({
rules: {
role_name: {
required: true,
minlength: 1
},
status : "required",
// 'rolesid[]' : 'required'
},
messages: {
role_name: {
required: "Please provide a role name",
minlength : "Please enter more than 4 Characters"
},
status : 'Please select the status of role',
// 'rolesid[]' : 'Please select atleast one permission.'
},
submitHandler: function(form) {
var inputValue = $("input[name='role_name']",form).val();
inputValue = inputValue.toLowerCase().trim().replace(/\s\s+/g, ' ');
$("#role_name").val(inputValue);
let flag = false;
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/ajax_validate_role_name',
data : {
value : inputValue,
id : <?php echo $id ?>
},
type : 'POST',
async : false,
success: function(data){
console.log(data);
if(data == 'success'){
flag = true
}
}
});
if(flag) {
form.submit();
} else {
$('#Nameerr').show();
$('#Nameerr').text('This role name already exists.');
}
}
});
});
</script>
<script type="text/javascript">
function lettersOnly()
{
var charCode = event.keyCode;
if ((charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123) || charCode == 8 || charCode == 32)
return true;
else
return false;
}
</script>

View File

@ -0,0 +1,166 @@
<style>
form label.error,
#secNameerr {
color: red;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template scholarship---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form action="<?php echo base_url() ?>admin/ae-scholarship-type/<?php echo $id ?>" method="post" id="scholarshipForm">
<?php if ($id == 0) { ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="scholarshiptype_name" class="form-control" placeholder="Name of the scholarship">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected disable value="">Choose scholarship status</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
<input type="submit" class="subject_addbtn" value="Save">
<a href="<?= base_url(); ?>admin/scholarship-types"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } else { ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Name <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="scholarshiptype_name" value="<?php echo $result['scholarshiptype_name'] ?>" class="form-control" placeholder="Name of the scholarship">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected value="<?php echo $result['is_active'] ?>"><?php echo $result['is_active'] ?></option>
<?php if ($result['is_active'] == 'yes') { ?>
<option value="no">no</option>
<?php } else { ?>
<option value="yes">yes</option>
<?php } ?>
</select>
</div>
<input type="submit" class="subject_addbtn" value="Update">
<a href="<?= base_url(); ?>admin/scholarship-types"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
<!----admin template scholarship end---->
</main>
<!--End right-top side-->
<script>
$(document).on('keypress', function(e) {
if (e.which == 13) {
$('form').submit();
}
});
$(document).ready(function() {
let url = window.location.pathname.split('/');
let scholarshipId = url[4];
jQuery.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || /^[a-z0-9\-\s]+$/i.test(value);
}, "Please enter alphanumeric Characters only");
$("#scholarshipForm").validate({
rules: {
scholarship_name: {
required: true,
minlength: 1,
alphanumeric: true
},
is_active: "required"
},
messages: {
scholarship_name: {
required: "Please provide a scholarship name",
minlength: "Please enter more than 4 Characters"
},
is_active: 'Please select the status of scholarship'
},
submitHandler: function(form) {
var inputValue = $("input[name='scholarship_name']", form).val();
inputValue = inputValue.toLowerCase();
let flag = false;
$.ajax({
url: '<?php echo base_url() ?>' + 'admin/validateSectionName',
data: {
value: inputValue,
id: <?php echo $id ?>
},
type: 'POST',
async: false,
success: function(data) {
console.log(data);
if (data == 'success') {
flag = true
}
}
});
if (flag) {
form.submit();
} else {
$('#secNameerr').show();
$('#secNameerr').text('This scholarship name already exists.');
}
}
});
});
</script>

View File

@ -0,0 +1,167 @@
<style>
form label.error, #secNameerr {
color : red;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form action="<?php echo base_url() ?>admin/ae-section/<?php echo $id ?>" method="post" id="sectionForm">
<?php if($id == 0) {?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Section Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="section_name" class="form-control" placeholder="Name of the section">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected disable value="">Choose section status</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
<input type="submit" class="subject_addbtn" value="Save">
<a href="<?= base_url(); ?>admin/section"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } else { ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Section <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="section_name" value="<?php echo $result['section_name'] ?>" class="form-control" placeholder="Name of the section">
<label id="secNameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="is_active" class="form-control">
<option selected value="<?php echo $result['is_active'] ?>"><?php echo $result['is_active'] ?></option>
<?php if($result['is_active'] == 'yes') { ?>
<option value="no">no</option>
<?php } else {?>
<option value="yes">yes</option>
<?php } ?>
</select>
</div>
<input type="submit" class="subject_addbtn" value="Update">
<a href="<?= base_url(); ?>admin/section"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<script>
$(document).on('keypress', function(e){
if(e.which==13)
{
$('form').submit();
}
});
$(document).ready(function(){
let url = window.location.pathname.split( '/' );
let sectionId = url[4];
jQuery.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || /^[a-z0-9\-\s]+$/i.test(value);
}, "Please enter alphanumeric Characters only");
$("#sectionForm").validate({
rules: {
section_name: {
required: true,
minlength: 1,
alphanumeric : true
},
is_active : "required"
},
messages: {
section_name: {
required: "Please provide a section name",
minlength : "Please enter more than 4 Characters"
},
is_active : 'Please select the status of section'
},
submitHandler: function(form) {
var inputValue = $("input[name='section_name']",form).val();
inputValue = inputValue.toLowerCase();
let flag = false;
$.ajax({
url : '<?php echo base_url() ?>' + 'admin/validateSectionName',
data : {
value : inputValue,
id : <?php echo $id ?>
},
type : 'POST',
async : false,
success: function(data){
console.log(data);
if(data == 'success'){
flag = true
}
}
});
if(flag) {
form.submit();
} else {
$('#secNameerr').show();
$('#secNameerr').text('This section name already exists.');
}
}
});
});
</script>

View File

@ -0,0 +1,310 @@
<style>
.error {
color: red;
padding-top: 2px;
}
.form-group.form-group-iconselect {
position: relative;
margin: 0px 0px 25px 0px;
}
label#subject_icon-error {
position: absolute;
bottom: -25px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group">
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?></div>
<?php
$subject_name = (isset($subject['subject_name'])) ? $subject['subject_name'] : '';
$subject_icon = (isset($subject['subject_icon'])) ? $subject['subject_icon'] : '';
$subject_code = (isset($subject['subject_code'])) ? $subject['subject_code'] : '';
$is_optional = (isset($subject['is_optional'])) ? $subject['is_optional'] : 'No';
$credit_hrs = (isset($subject['credit_hours'])) ? $subject['credit_hours'] : '';
$is_additional = (isset($subject['is_additional'])) ? $subject['is_additional'] : 'No';
$is_active = (isset($subject['is_active'])) ? $subject['is_active'] : '';
$action_url = base_url() . 'admin/ae-subject/' . $id;
?>
<p id="success" style="color:green;"></p>
<form id="subjectfrom" method="post" action="<?= $action_url; ?>">
<input type="hidden" name="id" id="id" value="<?= $id; ?>">
<div class="subject_lformarea">
<div class="form-group">
<label for="">Subject Name <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="subject_name" id="subject_name" class="form-control" value="<?= $subject_name; ?>" placeholder="Enter subject name">
<label id="subjecterror" class="error" style="display : none"></label>
</div>
<div class="form-group form-group-iconselect">
<input type="hidden" id="subject_icon" name="subject_icon" value="<?= $subject_icon; ?>" />
<label for="">Subject Icon <span class="text-danger font-weight-bold">*</span></label>
<div class="sub-icon-select">Select<i class="fas fa-caret-down"></i></div>
<div class="sub-icon-drpdown">
<a href="#" onclick="icon('sub1.png','sub1')">
<div class="sub-icon-option" id="sub1"><img src="<?= base_url(); ?>assets_admin/images/icons/sub1.png"></div>
</a>
<a href="#" onclick="icon('sub2.png','sub2')">
<div class="sub-icon-option" id="sub2"><img src="<?= base_url(); ?>assets_admin/images/icons/sub2.png"></div>
</a>
<a href="#" onclick="icon('sub3.png','sub3')">
<div class="sub-icon-option" id="sub3"><img src="<?= base_url(); ?>assets_admin/images/icons/sub3.png"></div>
</a>
<a href="#" onclick="icon('sub4.png','sub4')">
<div class="sub-icon-option" id="sub4"><img src="<?= base_url(); ?>assets_admin/images/icons/sub4.png"></div>
</a>
<a href="#" onclick="icon('sub5.png','sub5')">
<div class="sub-icon-option" id="sub5"><img src="<?= base_url(); ?>assets_admin/images/icons/sub5.png"></div>
</a>
<a href="#" onclick="icon('sub6.png','sub6')">
<div class="sub-icon-option" id="sub6"><img src="<?= base_url(); ?>assets_admin/images/icons/sub6.png"></div>
</a>
<a href="#" onclick="icon('sub7.png','sub7')">
<div class="sub-icon-option" id="sub7"><img src="<?= base_url(); ?>assets_admin/images/icons/sub7.png"></div>
</a>
<a href="#" onclick="icon('sub8.png','sub8')">
<div class="sub-icon-option" id="sub8"><img src="<?= base_url(); ?>assets_admin/images/icons/sub8.png"></div>
</a>
<a href="#" onclick="icon('sub9.png','sub9')">
<div class="sub-icon-option" id="sub9"><img src="<?= base_url(); ?>assets_admin/images/icons/sub9.png"></div>
</a>
<a href="#" onclick="icon('sub10.png','sub10')">
<div class="sub-icon-option" id="sub10"><img src="<?= base_url(); ?>assets_admin/images/icons/sub10.png"></div>
</a>
<a href="#" onclick="icon('sub11.png','sub11')">
<div class="sub-icon-option" id="sub11"><img src="<?= base_url(); ?>assets_admin/images/icons/sub11.png"></div>
</a>
<a href="#" onclick="icon('sub12.png','sub12')">
<div class="sub-icon-option" id="sub12"><img src="<?= base_url(); ?>assets_admin/images/icons/sub12.png"></div>
</a>
<a href="#" onclick="icon('sub13.png','sub13')">
<div class="sub-icon-option" id="sub13"><img src="<?= base_url(); ?>assets_admin/images/icons/sub13.png"></div>
</a>
<a href="#" onclick="icon('sub14.png','sub14')">
<div class="sub-icon-option" id="sub14"><img src="<?= base_url(); ?>assets_admin/images/icons/sub14.png"></div>
</a>
<a href="#" onclick="icon('sub15.png','sub15')">
<div class="sub-icon-option" id="sub15"><img src="<?= base_url(); ?>assets_admin/images/icons/sub15.png"></div>
</a>
<a href="#" onclick="icon('sub16.png','sub16')">
<div class="sub-icon-option" id="sub16"><img src="<?= base_url(); ?>assets_admin/images/icons/sub16.png"></div>
</a>
<a href="#" onclick="icon('sub17.png','sub17')">
<div class="sub-icon-option" id="sub17"><img src="<?= base_url(); ?>assets_admin/images/icons/sub17.png"></div>
</a>
</div>
</div>
<!-- <input type="file" id="upload" name="syllabus" accept=".pdf" value = "<?php //echo $syllabus
?>-->
<div class="form-group">
<label for="">Subject code</label>
<input type="text" name="subject_code" id="subject_code" class="form-control" value="<?php echo $subject_code; ?>" placeholder="Please Enter Subject code">
</div>
<div class="form-group">
<label for="">Status <span class="text-danger font-weight-bold">*</span></label>
<?php
if ($id > 0) {
?>
<select name="is_active" id="is_active" class="form-control">
<option selected value="<?php echo $is_active; ?>"><?php echo $is_active; ?></option>
<?php if ($is_active == 'yes') { ?>
<option value="no">No</option>
<?php } else { ?>
<option value="yes">Yes</option>
<?php } ?>
</select>
<?php
} else {
?>
<select name="is_active" id="is_active" class="form-control">
<option value=""> -- Please Select --</option>
<option selected value="yes">Yes</option>
<option value="no">No</option>
</select>
<?php } ?>
</div>
<div class="form-group">
<label for="">Is Optional Subject <span class="text-danger font-weight-bold">*</span></label>
<select name="is_optional" id="is_optional" class="form-control">
<option value="No" <?php if($is_optional == 'No'){?> selected <?php }?> >No</option>
<option value="Yes" <?php if($is_optional == 'Yes'){?> selected <?php }?> >Yes</option>
</select>
</div>
<div class="form-group">
<label for="">Credit Hours</label>
<input type="number" min='1' name="credit_hours" id="credit_hours" class="form-control" value="<?php echo $credit_hrs; ?>" placeholder="Please Enter Subject credit hours">
</div>
<div class="form-group">
<label for="">Is Additional Subject <span class="text-danger font-weight-bold">*</span></label>
<select name="is_additional" id="is_additional" class="form-control">
<option value="No" <?php if($is_additional == 'No'){?> selected <?php }?> >No</option>
<option value="Yes" <?php if($is_additional == 'Yes'){?> selected <?php }?> >Yes</option>
</select>
</div>
<input type="submit" class="subject_addbtn" value="<?php echo $btn_name = ($id > 0) ? 'Update' : 'Add'; ?>">
<a href="<?= base_url(); ?>admin/subject"><button type="button" class=" ml-2 subject_addbtn bg-dark">Back</button></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script>
$(".sub-icon-select").click(function() {
$(".sub-icon-drpdown").toggleClass("sub-icon-drpdown-show");
});
</script>
<script type="text/javascript">
function hide_all_subject_error() {
$('#sname_error').hide();
$('#success').html('');
}
function cleanup_subject_val() {
$('#sname').val('');
$('#exists_error').html('');
}
function icon(icn, id) {
// alert(icn);
$('#subject_icon').val(icn);
$('.sub-icon-drpdown div').removeClass('active');
$('#' + id).addClass('active');
}
$(document).ready(function() {
var icon = $('#subject_icon').val();
if (icon != '') {
$(".sub-icon-drpdown").addClass("sub-icon-drpdown-show");
var pos = icon.lastIndexOf('.');
var iconName = icon.substr(0, pos);
// alert(iconName);
$('#' + iconName).addClass('active');
}
});
$(document).ready(function() {
$("#flash-msg").delay(3000).fadeOut("slow");
});
$(document).ready(function() {
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 ]{3,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#subjectfrom").validate({
ignore: "input[type='text']:hidden",
rules: {
subject_name: {
required: true,
rangelength: [2, 50],
inputregx: true,
},
subject_icon: {
required: true,
},
is_active: {
required: true,
},
credit_hours: {
required: true,
},
},
messages: {
subject_name: {
required: "Please enter subject name ",
},
subject_icon: {
required: "Please Select subject icon",
},
is_active: {
required: "Please Select Status",
},
credit_hours: {
required: "Please enter the credit hours",
},
},
submitHandler: function(form) {
var EditId = "<?= $id ?>";
// if (EditId == 0)
/* { */
var inputValue = $("input[name='subject_name']", form).val();
let flag = false;
$.ajax({
url: "<?= base_url() ?>admin/checknamewithId",
data: {
id:EditId,
value: inputValue,
tablename: "subject",
column: "subject_name"
},
type: 'POST',
async: false,
success: function(data) {
// console.log(data);
if(data == 'success') {
flag=true;
}
}
});
if(flag) {
form.submit();
} else {
$('#subjecterror').show();
$('#subjecterror').text('This Subject name already exists.');
}
// } else {
// form.submit();
// }
}
});
});
</script>

View File

@ -0,0 +1,318 @@
<style>
form label.error,
#Nameerr {
color: red;
}
.subject_l {
width: 50%;
}
.con-pass {
position: absolute;
top: 8px;
right: 8px;
cursor: pointer;
color: #878a8d;
}
</style>
<main class="wrapper responsive-width" id="main">
<!----admin template role---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form action="<?php echo base_url() ?>admin/users/ae-user/<?php echo $id ?>" class="mb-5" method="post" id="userForm">
<?php if ($id == 0) { ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Full Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" onkeypress="return lettersOnly(event)" name="admin_name" id="validate_val" class="form-control alphaonly" placeholder="Name of the role">
</div>
<div class="form-group">
<label for="">Email-Id<span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="email" class="form-control" placeholder="Enter your email">
<label id="Nameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">Password<span class="text-danger font-weight-bold">*</span></label>
<div class="password-wrp">
<input type="password" name="password" id="password" class="form-control password_hide" placeholder="Enter your password">
<span class="passwrd-icon icon-y frst-pass"><i class="far fa-eye"></i></span>
</div>
</div>
<div class="form-group">
<label for="">Confirm Password<span class="text-danger font-weight-bold">*</span></label>
<div class="password-wrp">
<input type="password" id="confirm-password" name="confirm_password" class=" form-control" placeholder="Enter your password">
<span class="con-pass icon-y eye-icon"><i class="far fa-eye"></i></span>
</div>
</div>
<div class="form-group">
<label for="">User Role<span class="text-danger font-weight-bold">*</span></label>
<select name="admin_role_ids" class="form-control">
<option selected disable value="">Choose role</option>
<?php foreach ($roles as $key => $value) { ?>
<option value="<?php echo $value['id'] ?>"><?php echo $value['role_name'] ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="status" class="form-control">
<option selected disable value="">Choose role status</option>
<option value="Active">Active</option>
<option value="Inactive">Inactive</option>
</select>
</div>
<input type="submit" class="subject_addbtn" value="Save">
<a href="<?= base_url(); ?>admin/users/list"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php } else { ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Full Name<span class="text-danger font-weight-bold">*</span></label>
<input type="text" onkeypress="return lettersOnly(event)" name="admin_name" value="<?php echo $result[0]['admin_name'] ?>" id="validate_val" class="form-control alphaonly" placeholder="Name of the role">
</div>
<div class="form-group">
<label for="">Email-Id<span class="text-danger font-weight-bold">*</span></label>
<input type="text" value="<?php echo $result[0]['email'] ?>" name="email" class="form-control" placeholder="Enter your email">
<label id="Nameerr" style="display : none"></label>
</div>
<div class="form-group">
<label for="">User Role<span class="text-danger font-weight-bold">*</span></label>
<select name="admin_role_ids" class="form-control">
<option selected value="<?php echo $result[0]['admin_role_ids'] ?>"><?php echo $result[0]['role_name'] ?></option>
<?php foreach ($pre_selected_roles as $key => $value) { ?>
<option value="<?php echo $value['id'] ?>"><?php echo $value['role_name'] ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
<select name="status" class="form-control">
<option selected value="<?php echo $result[0]['status'] ?>"><?php echo $result[0]['status'] ?></option>
<?php if ($result[0]['status'] == 'Active') { ?>
<option value="Inactive">Inactive</option>
<?php } else { ?>
<option value="Active">Active</option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="">Password</label>
<div class="password-wrp">
<input type="password" onchange="showConfirmPwd(this.value)" id="password" name="replace_password" class="form-control password_hide" placeholder="Enter ">
<span class="passwrd-icon icon-y frst-pass"><i class="far fa-eye"></i></span>
<small>Note : Enter password to replace exisiting password</small>
</div>
<div class="form-group mt-3" id="pwdBlock" style="display:none">
<label for="">Confirm Password<span class="text-danger font-weight-bold">*</span></label>
<div class="password-wrp">
<input type="password" id="confirm-password" name="confirm_password" class=" form-control password_hide_c" placeholder="Enter your password">
<span class="con-pass icon-y"><i class="far fa-eye"></i></span>
</div>
</div>
</div>
<input type="submit" class="subject_addbtn" value="Update">
<a href="<?= base_url(); ?>admin/users/list"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
</form>
<?php } ?>
</div>
</div>
</div>
<!----admin template role end---->
</main>
<!--End right-top side-->
<script>
$(document).on('keypress', function(e) {
if (e.which == 13) {
$('form').submit();
}
});
$(document).ready(function() {
jQuery.validator.addMethod("emailregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z-]+\.[a-zA-Z.]{2,5}$/.test(value);
}, 'Email Address is invalid: Please enter a valid email address.');
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional(element) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[#@$!%*?&])[A-Za-z\d@$#!%*?&]{6,16}$/.test(value);
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
$("#userForm").validate({
ignore: ":hidden",
rules: {
admin_name: {
required: true,
minlength: 3
},
email: {
required: true,
email: true,
emailregex: true
},
password: {
required: true,
minlength: 6,
passwordregex: true
},
confirm_password: {
required: true,
minlength: 6,
equalTo: '#password'
},
admin_role_ids: "required",
status: "required",
replace_password: 'passwordregex'
},
messages: {
admin_name: {
required: "Please provide a user name",
minlength: "Please enter more than 3 Characters"
},
email: {
required: "Please provide an email-id",
},
password: {
required: 'Please enter a valid password',
minlength: 'Password should be more than 6 characters'
},
confirm_password: {
required: 'Please re-enter your password',
equalTo: "Passwords doesn't match. Please provide a password same as above"
},
admin_role_ids: 'Please select one user role',
status: 'Please select the status of user'
},
submitHandler: function(form) {
var inputValue = $("input[name='email']", form).val();
inputValue = inputValue.toLowerCase().trim().replace(/\s\s+/g, ' ');
let flag = false;
$.ajax({
url: '<?php echo base_url() ?>' + 'admin/ajax_validate_user_email',
data: {
value: inputValue,
id: <?php echo $id ?>
},
type: 'POST',
async: false,
success: function(data) {
console.log(data);
if (data == 'success') {
flag = true
}
}
});
if (flag) {
form.submit();
} else {
$('#Nameerr').show();
$('#Nameerr').text('This email already exists.');
}
}
});
});
</script>
<script type="text/javascript">
function lettersOnly() {
var charCode = event.keyCode;
if ((charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123) || charCode == 8 || charCode == 32)
return true;
else
return false;
}
$(".con-pass").click(function() {
$(".con-pass").toggleClass("eye-icon");
var input = $("#confirm-password");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
function showConfirmPwd(val) {
if (val != '') {
$('#pwdBlock').show();
} else {
$('#pwdBlock').hide();
}
}
</script>

View File

@ -0,0 +1,410 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.error {
color: red;
font-size: 12px;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$theExportHeader = '';
$today_date_time_array = explode(' ', $today_date);
// $today_date_array = $today_date_time_array[0];
$today_date_array = explode('-', $today_date_time_array[0]);
$current_year = $today_date_array[0];
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . '\n Annual Report - ' . $current_year;
}
?>
</div>
<div class="subject_lhead">Reports</div>
<?php
$SearchBatch = (isset($search_batch) && !empty($search_batch)) ? $search_batch : $school_info['batch_id'];
$SearchCourse = (isset($search_course_id) && !empty($search_course_id)) ? $search_course_id : '';
$SearchSection = (isset($search_section) && !empty($search_section)) ? $search_section : '';
$search_feetype = (isset($search_feetype) && !empty($search_feetype)) ? $search_feetype : array();
$search_start_paid_date = (isset($search_start_paid_date) && !empty($search_start_paid_date)) ? date('Y-m-d', strtotime($search_start_paid_date)) : '';
$search_end_paid_date = (isset($search_end_paid_date) && !empty($search_end_paid_date)) ? date('Y-m-d', strtotime($search_end_paid_date)) : '';
?>
<form id="searchFilters" action="<?= base_url(); ?>admin/getreport" method="POST">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="subject-filter">
<label>Select Batch</label>
<select id="f_batch" name="f_batch" class=" form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
$b_selected = ($row['id'] == $SearchBatch) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('f_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<label>Select Course</label>
<select id="f_course" name="f_course" class=" form-control">
<option value="">Select Course</option>
<?php if (isset($course) || !empty($course)) {
foreach ($course as $row) {
$cselected = ($row['id'] == $SearchCourse) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $cselected; ?>>
<?php echo $row['course_name']; ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class=" form-group subject-filter">
<label>Select Section</label>
<?php
$SearchSection = (!empty($SearchSection)) ? $SearchSection : array();
if (!empty($SearchSection) && (isset($sections) && !empty($sections))) { ?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
foreach ($sections as $fs_value) {
// $seselected=($fs_value['section_id'] == $SearchSection) ? 'selected' :'';
?>
<option value="<?= $fs_value['section_id']; ?>" <?php echo (in_array($fs_value['section_id'], $SearchSection)) ? "selected" : ""; ?>><?= $fs_value['section_name'] ?></option>
<?php
} ?>
</select>
<?php } else { ?>
<select id="f_section" id="f_section" name="f_section[]" class="form-control selectpicker" multiple>
<option value="">Select Section</option>
</select>
<?php } ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group subject-filter">
<label>Select FeeType</label>
<select id="f_feetype" name="f_feetype[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select FeeType</option>
<?php
$fees_types = (isset($fees_types) && !empty($fees_types)) ? $fees_types : array();
if ($fees_types != '') {
foreach ($fees_types as $f_value) {
// $f_selected = ($f_value['feetype_name'] == $search_feetype) ? 'selected' : '';
?>
<option value="<?php echo $f_value['id'] ?>" <?php echo (in_array($f_value['id'], $search_feetype)) ? 'selected' : ''; ?>><?php echo $f_value['feetype_name'] ?> </option>
<?php }
} ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select Start Date</label>
<input type="text" name="f_start_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_start_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select End Date</label>
<input type="text" name="f_end_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_end_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4"> <input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success w-100" value="Filter"></div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4"><a href="<?php echo base_url() ?>admin/getreport">
<div class="date-filter"> <button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button>
</a></div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" ">
<!-- changed ID -->
<table id="tbl1" class="display">
<thead>
<tr>
<th>S.No</th>
<th>Roll No</th>
<th>Student Name</th>
<th>Section</th>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
foreach ($selected_fee_types as $sftypes) {
?>
<th><?php echo $sftypes['feetype_name']; ?></th>
<?php
}
}
?>
<th>Total Assigned Amount</th>
<th>Paid Amount</th>
<th>Diduction Amount</th>
<th>Fine Amount</th>
<th>Due Amount</th>
</tr>
</thead>
<tbody>
<?php
$tdCnt = 1;
if (isset($studentlist) && !empty($studentlist)) {
// dd($studentlist);
// echo '<pre>';
// print_r($studentlist);
$sno = 1;
foreach ($studentlist as $student) {
// echo '<pre>';
// var_dump($student);
$tdCnt = 9;
?>
<tr>
<td><?php echo $sno; ?></td>
<td><?php echo $student['roll_no'] ?></td>
<td><?php echo $student['name'] ?></td>
<td><?php echo $student['section_name'] ?></td>
<?php
// dd($selected_fee_types);
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
$rowtotalAmt = 0;
$rowpaidAmt = 0;
$rowdidAmt = 0;
$rowdueAmt = 0;
$rowFineAmt = 0;
foreach ($selected_fee_types as $sftypes) {
//echo '<pre>'; print_r($sftypes) ;
$rowtotalAmt = ($rowtotalAmt + $student[$sftypes['feetype_name']]['total_amt']);
$rowpaidAmt = ($rowpaidAmt + $student[$sftypes['feetype_name']]['paid_amt']);
$rowdidAmt = ($rowdidAmt + $student[$sftypes['feetype_name']]['diduction_amt']);
$rowdueAmt = ($rowdueAmt + $student[$sftypes['feetype_name']]['pending_amt']);
$rowFineAmt = ($rowFineAmt + $student[$sftypes['feetype_name']]['fine_amt']);
?>
<td><?php echo $student[$sftypes['feetype_name']]['paid_amt']; ?></td>
<?php
$tdCnt++;
}
//exit;
}
?>
<td><?php echo $rowtotalAmt; ?></td>
<td><?php echo $rowpaidAmt; ?></td>
<td><?php echo $rowdidAmt; ?></td>
<td><?php echo $rowFineAmt; ?></td>
<td><?php echo $rowdueAmt; ?></td>
</tr>
<?php $sno++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
$("#searchFilters").validate({
rules: {
f_batch: 'required',
f_course: 'required'
},
submitHandler: function(form, e) {
e.preventDefault();
form.submit();
}
});
});
$('#f_course').change(function() {
var course = $('#f_course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#f_section').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
var currency_symbol = "<?php echo $currency_symbol; ?>";
var tdCnt = "<?php echo $tdCnt; ?>";
// alert(tdCnt);
var theTdStr = new Array();
for (let n = 0; n < tdCnt; n++) {
theTdStr.push(n);
}
console.log(theTdStr);
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
// orientation: 'landscape',
exportOptions: {
columns: theTdStr,
},
orientation: 'landscape',
pageSize: 'A4'
// messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: theTdStr
},
messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
]
});
//table js end
//multiple select js start
$('#f_section').selectpicker();
$('#f_feetype').selectpicker();
//multiple select js end
});
</script>
</body>
</html>

View File

@ -0,0 +1,541 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.error {
color: red;
font-size: 12px;
}
.custom_tble th:nth-child(1),
.custom_tble th:nth-child(2),
.custom_tble td:nth-child(1),
.custom_tble td:nth-child(2) {
background: #fff;
z-index: 1;
}
.table_div {
width: 100%;
}
.dataTables_scrollHead,
.dataTables_scrollBody,
.dataTables_scrollFoot {
width: 100% !important;
}
th,
td {
white-space: nowrap;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$theExportHeader = '';
$today_date_time_array = explode(' ', $today_date);
// $today_date_array = $today_date_time_array[0];
$today_date_array = explode('-', $today_date_time_array[0]);
$current_year = $today_date_array[0];
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . '\n Annual Report - ' . $current_year;
}
?>
</div>
<div class="subject_lhead">Report</div>
<?php
$SearchBatch = (isset($search_batch) && !empty($search_batch)) ? $search_batch : $school_info['batch_id'];
$SearchCourse = (isset($search_course_id) && !empty($search_course_id)) ? $search_course_id : '';
$SearchSection = (isset($search_section) && !empty($search_section)) ? $search_section : '';
$search_feetype = (isset($search_feetype) && !empty($search_feetype)) ? $search_feetype : array();
$search_start_paid_date = (isset($search_start_paid_date) && !empty($search_start_paid_date)) ? date('Y-m-d', strtotime($search_start_paid_date)) : '';
$search_end_paid_date = (isset($search_end_paid_date) && !empty($search_end_paid_date)) ? date('Y-m-d', strtotime($search_end_paid_date)) : '';
?>
<form id="searchFilters" action="<?= base_url(); ?>admin/getreport" method="POST">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="subject-filter">
<label>Select Batch</label>
<select id="f_batch" name="f_batch" class=" form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
$b_selected = ($row['id'] == $SearchBatch) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('f_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<label>Select Course</label>
<select id="f_course" name="f_course" class=" form-control">
<option value="">Select Course</option>
<?php if (isset($course) || !empty($course)) {
foreach ($course as $row) {
$cselected = ($row['id'] == $SearchCourse) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $cselected; ?>>
<?php echo $row['course_name']; ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class=" form-group subject-filter">
<label>Select Section</label>
<?php
$SearchSection = (!empty($SearchSection)) ? $SearchSection : array();
if (!empty($SearchSection) && (isset($sections) && !empty($sections))) { ?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
foreach ($sections as $fs_value) {
// $seselected=($fs_value['section_id'] == $SearchSection) ? 'selected' :'';
?>
<option value="<?= $fs_value['section_id']; ?>" <?php echo (in_array($fs_value['section_id'], $SearchSection)) ? "selected" : ""; ?>><?= $fs_value['section_name'] ?></option>
<?php
} ?>
</select>
<?php } else { ?>
<select id="f_section" id="f_section" name="f_section[]" class="form-control selectpicker" multiple>
<option value="">Select Section</option>
</select>
<?php } ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group subject-filter">
<label>Select FeeType</label>
<select id="f_feetype" name="f_feetype[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select FeeType</option>
<?php
$fees_types = (isset($fees_types) && !empty($fees_types)) ? $fees_types : array();
if ($fees_types != '') {
foreach ($fees_types as $f_value) {
// $f_selected = ($f_value['feetype_name'] == $search_feetype) ? 'selected' : '';
?>
<option value="<?php echo $f_value['id'] ?>" <?php echo (in_array($f_value['id'], $search_feetype)) ? 'selected' : ''; ?>><?php echo $f_value['feetype_name'] ?> </option>
<?php }
} ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select Start Date</label>
<input type="text" name="f_start_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_start_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select End Date</label>
<input type="text" name="f_end_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_end_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4"> <input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success w-100" value="Filter"></div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4"><a href="<?php echo base_url() ?>admin/getreport">
<div class="date-filter"> <button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button>
</a></div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- new divs added -->
<div class="table_div">
<!-- new divs added -->
<!-- changed ID -->
<table id="tbl1" class="custom_tble">
<thead>
<tr>
<th>S.No</th>
<th>Roll No</th>
<th>Student Name</th>
<th>Section</th>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
foreach ($selected_fee_types as $sftypes) {
?>
<th><?php echo $sftypes['feetype_name']; ?></th>
<?php
}
}
?>
<th>Diduction </th>
<th>Fine </th>
<th>Total Assigned</th>
<th>Paid </th>
<th>Due </th>
</tr>
</thead>
<tbody>
<?php
$tdCnt = 1;
if (isset($studentlist) && !empty($studentlist)) {
// dd($studentlist);
// echo '<pre>';
// print_r($studentlist);
$sno = 1;
foreach ($studentlist as $student) {
// echo '<pre>';
// var_dump($student);
$tdCnt = 9;
?>
<tr>
<td><?php echo $sno; ?></td>
<td><?php echo $student['roll_no'] ?></td>
<td><?php echo $student['name'] ?></td>
<td><?php echo $student['section_name'] ?></td>
<?php
// dd($selected_fee_types);
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
$rowtotalAmt = 0;
$rowpaidAmt = 0;
$rowdidAmt = 0;
$rowdueAmt = 0;
$rowFineAmt = 0;
foreach ($selected_fee_types as $sftypes) {
//echo '<pre>'; print_r($sftypes) ;
$rowtotalAmt = ($rowtotalAmt + $student[$sftypes['feetype_name']]['total_amt']);
$rowpaidAmt = ($rowpaidAmt + $student[$sftypes['feetype_name']]['paid_amt']);
$rowdidAmt = ($rowdidAmt + $student[$sftypes['feetype_name']]['diduction_amt']);
$rowdueAmt = ($rowdueAmt + $student[$sftypes['feetype_name']]['pending_amt']);
$rowFineAmt = ($rowFineAmt + $student[$sftypes['feetype_name']]['fine_amt']);
?>
<td><?php echo $student[$sftypes['feetype_name']]['paid_amt']; ?></td>
<?php
$tdCnt++;
}
//exit;
}
?>
<td><?php echo $rowdidAmt; ?></td>
<td><?php echo $rowFineAmt; ?></td>
<td><?php echo $rowtotalAmt; ?></td>
<td><?php echo $rowpaidAmt; ?></td>
<td><?php echo $rowdueAmt; ?></td>
</tr>
<?php $sno++;
}
} ?>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th>In <?php echo $currency_symbol; ?></th>
<?php
// print_r(count($colTotalFeeAmt));
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
foreach ($selected_fee_types as $sft_key => $sft_value) {
// $t_fee_amount = 0;
// foreach ($colTotalFeeAmt as $ctfa_key => $ctfa_value) {
// if ($ctfa_key == $sfl_key) {
// $t_fee_amount =
// $t_fee_amount + $ctfa_value[$ctfa_key];
// echo '<pre>';
// print_r($ctfa_value[$ctfa_key]);
// } else {
// $t_fee_amount = 0;
// }
?>
<th style='font-size: 13px; text-align: center;'> </th>
<?php
}
}
?>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
$("#searchFilters").validate({
rules: {
f_batch: 'required',
f_course: 'required'
},
submitHandler: function(form, e) {
e.preventDefault();
form.submit();
}
});
});
$('#f_course').change(function() {
var course = $('#f_course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#f_section').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
$(document).ready(function() {
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
var currency_symbol = "<?php echo $currency_symbol; ?>";
var theTdCnt = '<?php echo $tdCnt; ?>';
var theTdStr = new Array();
for (let n = 0; n < theTdCnt; n++) {
theTdStr.push(n);
}
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
console.log(theTdStr);
//table js
$('#tbl1').DataTable({
scrollY: screen.availHeight * 0.65,
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
left: 4,
right: 3
},
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
// orientation: 'landscape',
exportOptions: {
columns: theTdStr,
},
orientation: 'landscape',
pageSize: 'A4'
// messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: theTdStr
},
messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
],
"footerCallback": function(row, data, start, end, display) {
//var theDynTdCnt = (theTdCnt - 7);
for (let fi = 4; fi < theTdCnt; fi++) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(fi)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(fi, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(fi).footer()).html(
//currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
pageTotal
);
}
}
});
//table js end
//multiple select js start
$('#f_section').selectpicker();
$('#f_feetype').selectpicker();
//multiple select js end
});
$(document).ready(function() {
var table = $('#example').DataTable({
scrollY: "300px",
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
left: 1,
right: 1
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,589 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.error {
color: red;
font-size: 12px;
}
.custom_tble th:nth-child(1),
.custom_tble th:nth-child(2),
.custom_tble td:nth-child(1),
.custom_tble td:nth-child(2) {
background: #fff;
z-index: 1;
}
.table_div {
width: 100%;
}
.dataTables_scrollHead,
.dataTables_scrollBody,
.dataTables_scrollFoot {
width: 100% !important;
}
th,
td {
white-space: nowrap;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$theExportHeader = '';
$today_date_time_array = explode(' ', $today_date);
// $today_date_array = $today_date_time_array[0];
$today_date_array = explode('-', $today_date_time_array[0]);
$current_year = $today_date_array[0];
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . '\n Annual Report Details - ' . $current_year;
}
?>
</div>
<div class="subject_lhead">Report Details</div>
<?php
$SearchBatch = (isset($search_batch) && !empty($search_batch)) ? $search_batch : $school_info['batch_id'];
$SearchCourse = (isset($search_course_id) && !empty($search_course_id)) ? $search_course_id : '';
$SearchSection = (isset($search_section) && !empty($search_section)) ? $search_section : '';
$search_feetype = (isset($search_feetype) && !empty($search_feetype)) ? $search_feetype : array();
$search_start_paid_date = (isset($search_start_paid_date) && !empty($search_start_paid_date)) ? date('Y-m-d', strtotime($search_start_paid_date)) : '';
$search_end_paid_date = (isset($search_end_paid_date) && !empty($search_end_paid_date)) ? date('Y-m-d', strtotime($search_end_paid_date)) : '';
?>
<form id="searchFilters" action="<?= base_url(); ?>admin/getAnnualReportDetails" method="POST">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="subject-filter">
<label>Select Batch</label>
<select id="f_batch" name="f_batch" class=" form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
$b_selected = ($row['id'] == $SearchBatch) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('f_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<label>Select Course</label>
<select id="f_course" name="f_course" class=" form-control">
<option value="">Select Course</option>
<?php if (isset($course) || !empty($course)) {
foreach ($course as $row) {
$cselected = ($row['id'] == $SearchCourse) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $cselected; ?>>
<?php echo $row['course_name']; ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class=" form-group subject-filter">
<label>Select Section</label>
<?php
$SearchSection = (!empty($SearchSection)) ? $SearchSection : array();
if (!empty($SearchSection) && (isset($sections) && !empty($sections))) { ?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
foreach ($sections as $fs_value) {
// $seselected=($fs_value['section_id'] == $SearchSection) ? 'selected' :'';
?>
<option value="<?= $fs_value['section_id']; ?>" <?php echo (in_array($fs_value['section_id'], $SearchSection)) ? "selected" : ""; ?>><?= $fs_value['section_name'] ?></option>
<?php
} ?>
</select>
<?php } else { ?>
<select id="f_section" id="f_section" name="f_section[]" class="form-control selectpicker" multiple>
<option value="">Select Section</option>
</select>
<?php } ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group subject-filter">
<label>Select FeeType</label>
<select id="f_feetype" name="f_feetype[]" class=" form-control selectpicker" multiple required>
<option value="" disabled>Select FeeType</option>
<?php
$fees_types = (isset($fees_types) && !empty($fees_types)) ? $fees_types : array();
if ($fees_types != '') {
foreach ($fees_types as $f_value) {
// $f_selected = ($f_value['feetype_name'] == $search_feetype) ? 'selected' : '';
?>
<option value="<?php echo $f_value['id'] ?>" <?php echo (in_array($f_value['id'], $search_feetype)) ? 'selected' : ''; ?>><?php echo $f_value['feetype_name'] ?> </option>
<?php }
} ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select Start Date</label>
<input type="text" name="f_start_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_start_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select End Date</label>
<input type="text" name="f_end_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_end_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4"> <input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success w-100" value="Filter"></div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4"><a href="<?php echo base_url() ?>admin/getAnnualReportDetails">
<div class="date-filter"> <button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button>
</a></div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- new divs added -->
<div class="table_div">
<!-- new divs added -->
<!-- changed ID -->
<table id="tbl1" class="custom_tble">
<thead>
<tr>
<th>S.No</th>
<th>Roll No</th>
<th>Student Name</th>
<th>Section</th>
<?php
if (isset($selected_fee_list) && !empty($selected_fee_list)) {
foreach ($selected_fee_list as $sf_value) {
// print_r($sf_value);
?>
<th><?php echo $sf_value['fee_values']; ?></th>
<?php
}
}
?>
<th>Diduction Amount</th>
<th>Fine Amount</th>
<th>Total Assigned Amount</th>
<th>Paid Amount</th>
<th>Due Amount</th>
</tr>
</thead>
<tbody>
<?php
$tdCnt = 1;
if (isset($studentlist) && !empty($studentlist)) {
// dd($studentlist);
// echo '<pre>';
// print_r($studentlist);
$sno = 1;
$colTotalFeeAmt = array();
foreach ($studentlist as $student) {
// echo '<pre>';
// var_dump($student);
$tdCnt = 4;
$totalPaid = 0;
?>
<tr>
<td><?php echo $sno; ?></td>
<td><?php echo $student['roll_no'] ?></td>
<td class="text-left">
<div class="w-100">
<?php
echo ucwords($student['name']); ?>
</div>
</td>
<td><?php echo $student['section_name'] ?></td>
<?php
if (isset($selected_fee_list) && !empty($selected_fee_list)) {
$rowtotalAmt = 0;
$rowpaidAmt = 0;
$rowdidAmt = 0;
$rowdueAmt = 0;
$rowFineAmt = 0;
$totalFeeAmt = array();
foreach ($selected_fee_list as $sf_key => $sf_value) {
// print_r($sf_value);
if (isset($student['fees'][$sf_value['id']])) {
if ($student['fees'][$sf_value['id']] != 0) {
array_push($totalFeeAmt, $student['fees'][$sf_value['id']]['paid_amount']);
// echo '<pre>';
// dd($student['fees']);
$rowpaidAmt = ($rowpaidAmt + ($student['fees'][$sf_value['id']]['paid_amount']));
$rowdidAmt = ($rowdidAmt + ($student['fees'][$sf_value['id']]['deducted_amount']));
$rowdueAmt = ($rowdueAmt + ($student['fees'][$sf_value['id']]['pending_amount']));
$rowFineAmt = ($rowFineAmt + ($student['fees'][$sf_value['id']]['fine_amount']));
$rowtotalAmt = (($rowpaidAmt + $rowdueAmt));
$paidAmount = $student['fees'][$sf_value['id']]['paid_amount'];
} else {
array_push($totalFeeAmt, 0);
$paidAmount = 0;
}
} else {
array_push($totalFeeAmt, 0);
$paidAmount = 'N.A';
}
?>
<td><?php echo $paidAmount; ?></td>
<?php
$tdCnt++;
}
}
array_push($colTotalFeeAmt, $totalFeeAmt);
?>
<td><?php echo $rowdidAmt;
$tdCnt++; ?></td>
<td><?php echo $rowFineAmt;
$tdCnt++; ?></td>
<td><?php echo $rowtotalAmt;
$tdCnt++; ?></td>
<td><?php echo $rowpaidAmt;
$tdCnt++; ?></td>
<td><?php echo $rowdueAmt;
$tdCnt++; ?></td>
</tr>
<?php $sno++;
}
} ?>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<!-- <th></th> -->
<th>In <?php echo $currency_symbol; ?></th>
<?php
// print_r(count($colTotalFeeAmt));
if (isset($selected_fee_list) && !empty($selected_fee_list)) {
foreach ($selected_fee_list as $sfl_key => $sfl_value) {
// $t_fee_amount = 0;
// foreach ($colTotalFeeAmt as $ctfa_key => $ctfa_value) {
// if ($ctfa_key == $sfl_key) {
// $t_fee_amount =
// $t_fee_amount + $ctfa_value[$ctfa_key];
// echo '<pre>';
// print_r($ctfa_value[$ctfa_key]);
// } else {
// $t_fee_amount = 0;
// }
?>
<th style='font-size: 13px; text-align: center;'> </th>
<?php
}
}
?>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
$("#searchFilters").validate({
rules: {
f_batch: 'required',
f_course: 'required'
},
submitHandler: function(form, e) {
e.preventDefault();
form.submit();
}
});
});
$('#f_course').change(function() {
var course = $('#f_course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#f_section').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
$(document).ready(function() {
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
var currency_symbol = "<?php echo $currency_symbol; ?>";
var theTdCnt = '<?php echo $tdCnt; ?>';
var theTdStr = new Array();
for (let n = 0; n < theTdCnt; n++) {
theTdStr.push(n);
}
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
console.log(theTdStr);
//table js
$('#tbl1').DataTable({
scrollY: screen.availHeight * 0.65,
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
left: 4,
right: 2
},
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
// orientation: 'landscape',
exportOptions: {
columns: theTdStr,
},
orientation: 'landscape',
pageSize: 'A4'
// messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: theTdStr
},
messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
],
"footerCallback": function(row, data, start, end, display) {
//var theDynTdCnt = (theTdCnt - 7);
for (let fi = 4; fi < theTdCnt; fi++) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(fi)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(fi, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(fi).footer()).html(
//currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
pageTotal
);
}
}
});
//table js end
//multiple select js start
$('#f_section').selectpicker();
$('#f_feetype').selectpicker();
//multiple select js end
});
$(document).ready(function() {
var table = $('#example').DataTable({
scrollY: "300px",
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
left: 1,
right: 1
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,263 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<?php
ini_set('max_execution_time', '300');
ini_set("pcre.backtrack_limit", "5000000");
if (!empty($school_info['markscard_header']) && ($school_info['markscard_header'] != '')) {
if (empty($school_info['color_logo'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['markscard_header'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
} else {
if (empty($school_info['color_logo'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['color_logo'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['color_logo'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
}
?>
<?php
// print_r($applicant);
?>
<div width="100%" height="100%" style="border:2px solid #00a60c; border-style: double;">
<div style="width: 100%; margin: 8px 0px 0px 0px; padding: 8px 16px 0px 16px;">
<div style="width: 20%; float: left;">
<img style="width:100px;height:100px;" src="<?= $logo_img; ?>" alt="Logo Here">
</div>
<div style="width: 60%; float: left; text-align: center;">
<h2 style="padding:0px; margin: 0px;"><?= strtoupper($school_info['school_name']); ?> </h2>
<h5 style="padding:0px; margin: 2px 0px"><?= ucfirst($school_info['address']); ?></h5>
<h6 style="padding:0px; margin: 2px 0px; font-size: 12px;">Estd : <?= $school_info['school_code']; ?></h6>
<p style="padding:0px; margin: 0px; font-size: 11px; font-weight: 500">Ph. : <?= $school_info['phone']; ?> | Email: <?= $school_info['email']; ?></p>
<div width="30%" style="margin:4px auto;background-color:#032da1;color:#fff;padding:8px 50px;border-radius:10px 0px 10px 0px;">
<span style="font-size:12px; font-weight:bold;">Admission Form</span>
</div>
</div>
<div style="width: 15%; float: right; border: 1px solid black; width: 100px; height: 75px; text-align:center; background-color: #eeeeee; padding-top: 25px;">
<p style="font-size: 12px; font-weight: bold;"> PHOTO</p>
</div>
</div>
<hr style="margin: 4px 0px">
<div style="height: 75%; padding: 0px 16px;">
<table width="100%" style="margin-top: 4px;">
<tr>
<th style="width:10%;text-align:left;font-weight:bold;font-size:12px;"> Admission No. :</th>
<td style="width:16%;text-align:left;font-size:12px;border-bottom:1px solid black; margin-right: 4px; padding: 4px 4px; color: #fff;">A </td>
<th style="width:2%;"></th>
<th style=" width:10%;text-align:left;font-weight:bold;font-size:12px; margin: 0px 16px;">Admission Date :</th>
<td style="width:16%;text-align:left;font-size:12px; border-bottom:1px solid black;margin-right: 4px; padding: 4px 4px; color: #fff;">B</td>
<th style="width:2%;"></th>
<th style="width:10%;text-align:left;font-weight:bold;font-size:12px;margin-left: 8px;">TC No. & Date :</th>
<td style="width:17%;text-align:left;font-size:12px; border-bottom:1px solid black;margin-right: 4px; padding: 4px 4px; color: #fff;">C</td>
</tr>
</table>
<div style="width: 100%; margin: 8px 0px 0px 0px;">
<div style="width: 100%">
<div style=" margin-bottom: 8px;">
<i style="font-size: 12px;">You are seeking admission in </i>
</div>
<div style="width: 8%; float: left;">
<p style="font-size: 14px; font-weight: bold; margin-top: 12%;"> Class </p>
</div>
<div style="width: 92%; float: left; text-align: left;">
<?php
$course_name = array();
foreach ($courses as $courseKey => $course) {
if ($course['id'] == $applicant['course']) {
?>
<div style="width: 12%; height: 25px; border: 1px solid black; float: left; margin: 0px 8px; padding: 4px 4px; margin-bottom: 0px; font-size: 12px; font-weight:bold; border-radius:4px 4px 4px 4px;">
<p style="margin-top: 2%; margin-bottom: 0px; padding:0px"><?= str_replace('Class ', '', $course['course_name']) ?> </p>
</div>
<?php
}
}
?>
</div>
</div>
<p style="font-weight: bold; font-size: 16px;">Student's Details</td>
<div width="100%">
<div style="width:33%; float:left;">
<div style="float: left;width: 30%; font-size: 12px; font-weight:bold;">Full Name</div>
<div style="width: 62%;float: right; border-bottom: 1px solid black; padding: 0px 8px; font-size: 13px; font-weight:normal;text-align:center; "><?= $applicant['name'] ?></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 35%; font-size: 12px; font-weight:bold;">Date of Birth</div>
<div style="width: 55%;float: right; border-bottom: 1px solid black; padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;"><?= $applicant['dob'] ?></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 30%; font-size: 12px;font-weight:bold;">Gender : </div>
<div style="width: 55%;float: right; font-weight:bold; font-size: 14px;"><?= $applicant['gender'] ?></div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left; width: 42%; font-size: 12px; font-weight:bold;">Birth Certificate </div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"><?= $applicant['birth_certificate'] ?></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 18%; font-size: 12px; font-weight:bold;">Caste</div>
<div style="width: 74%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['caste']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['caste'] ?></div>
</div>
<div style="width:30%; float:right; margin-left: 2%;">
<div style=" float: left;width: 30%; font-size: 12px;font-weight:bold;">Religion</div>
<div style="width: 55%;float: left; border-bottom: 1px solid black; font-weight:bold; <?= !empty($applicant['religion']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['religion'] ?></div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 25%; font-size: 12px; font-weight:bold;">City, State & Country of Birth </div>
<div style="width: 70%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 7%; font-size: 12px; font-weight:bold;">Address</div>
<div style="width: 88%;float: left; border-bottom: 1px solid black; padding: 0px 16px; font-size: 13px; font-weight:normal; text-align:left;">
<?php
$address_array = array();
array_push($address_array, $applicant['address1']);
array_push($address_array, $applicant['state']);
array_push($address_array, $applicant['country']);
echo implode(', ', $address_array);
?>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 10%; font-size: 12px; font-weight:bold;">Last School</div>
<div style="width: 85%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['previous_school']) ? 'padding: 0px 16px; font-size: 13px; font-weight:normal; text-align:left;' : 'padding: 10px 8px;' ?>"><?= $applicant['previous_school'] ?></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 54%; font-size: 12px; font-weight:bold;">
Would you be requiring the school's transportation services?
</div>
<div style="width: 10%;float: left; font-size: 14px; font-weight:bold;">Yes / No</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 22%; font-size: 12px; font-weight:bold;">Allergies/Health Concerns</div>
<div style="width: 73%;float: left; border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width: 100%; font-size: 12px; font-weight:bold;">Is there anything you would like us to know about your child?</div>
<div style="width: 95%;border-bottom: 1px solid black; padding: 15px 8px;"></div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width: 100%; font-size: 12px; font-weight:bold;">If I am not available and a medical emergency arises, the supervising teacher has my
permission to seek medical help at</div>
<div style="width: 95%;border-bottom: 1px solid black; padding: 10px 8px;"></div>
</div>
<p style="font-weight: bold; font-size: 16px;">Parent's Details</td>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Father's Name</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['father_name']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['father_name'] ?></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Citizenship No.</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['father_citizenship']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['father_citizenship'] ?></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 40%; font-size: 12px;font-weight:bold;">Contact No. </div>
<div style="width: 48%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['father_mobile']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['father_mobile'] ?></div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Mother's Name</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['mother_name']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['mother_name'] ?></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 40%; font-size: 12px; font-weight:bold;">Citizenship No.</div>
<div style="width: 50%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['mother_citizenship']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['mother_citizenship'] ?></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 40%; font-size: 12px;font-weight:bold;">Contact No. </div>
<div style="width: 48%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['mother_mobile']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['mother_mobile'] ?></div>
</div>
</div>
<p style="font-weight: bold; font-size: 16px;">Local Guardian (If any)</td>
<div width="100%" style="margin-top: 16px;">
<div style="width:33%; float:left;">
<div style="float: left;width: 10%; font-size: 12px; font-weight:bold;">Name</div>
<div style="width: 78%;float: right; border-bottom: 1px solid black; <?= !empty($applicant['emergency_contact_name']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['emergency_contact_name'] ?></div>
</div>
<div style="width:33%; float:left; margin-left: 2%;">
<div style="float: left;width: 22%; font-size: 12px; font-weight:bold;">Address</div>
<div style="width: 68%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['emergency_contact_address']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['emergency_contact_address'] ?></div>
</div>
<div style="width:25%; float:left; margin-left: 2%;">
<div style=" float: left;width: 40%; font-size: 12px;font-weight:bold;">Contact No. </div>
<div style="width: 48%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['emergency_contact_number']) ? 'padding: 0px 8px; font-size: 13px; font-weight:normal; text-align:center;' : 'padding: 10px 8px;' ?>"><?= $applicant['emergency_contact_number'] ?></div>
</div>
</div>
<div width="100%" style="margin-top: 16px;">
<div style="float: left; width: 8%; font-size: 12px; font-weight:bold;">Remarks</div>
<div style="width: 87%;float: left; border-bottom: 1px solid black; <?= !empty($applicant['description']) ? 'padding: 0px 16px; font-size: 13px; font-weight:normal; text-align:left;' : 'padding: 10px 8px;' ?>"><?= $applicant['description'] ?></div>
</div>
</div>
</div>
<div style="height: auto;">
<table width="100%" style="margin:8px 0px 0px 8px;">
<tbody>
<tr>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;"> Test Date</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;"> Reg No.</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;"> Parent's Sign</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;">Verified By</span>
</td>
<td width="19%" style="text-align:center;">
<hr width="90%" style="margin:40px 5px 5px 15px; color: #000;">
<span style="font-weight:500;margin-top:10px;font-weight:bold;font-size:12px;">Principal's Sign</span>
</td>
</tr>
</tbody>
</table>
<p style="text-align:center; font-weight: bold; font-size: 14px;">Thank You for enrolling your child!</p>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,382 @@
<style>
.error {
color: red !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="displaydata pt-5 form-group_lng" style="display:flex">
<div class="col-md-6 pull-left" style="padding:0">
<!-- <a href="<?php // echo base_url();
?>admin/classroom" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a> -->
</div>
<?php
$search_batchid = (!empty($search_batch_id)) ? $search_batch_id : '';
$search_classroomid = (!empty($search_classroom_id)) ? $search_classroom_id : '';
?>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<div class="bootstrap_alert">
</div>
<form method="post" action="<?php echo base_url(); ?>admin/assign-routes">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Batch</label>
<select id="search_batch" class="form-control" placeholder="Select Batch" name="search_batch">
<option value=""> Select Batch</option>
<?php
if (isset($batchs) && !empty($batchs)) {
foreach ($batchs as $bvalue) {
if ($search_batchid == $bvalue['id'])
$bchecked = 'selected';
else
$bchecked = '';
?>
<option value="<?php echo $bvalue['id']; ?>" <?= $bchecked; ?>><?php echo $bvalue['b_name']; ?></option>
<?php }
} ?>
</select>
<span class="error">
<?php echo form_error('search_batch', '<div class="error">', '</div>'); ?>
</span>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Classroom</label>
<?php if (!empty($search_classroom_id) && count($search_classroom_id) > 0) { ?>
<select placeholder="Select Classroom" name="search_classroom[]" id="search_classroom" class="form-control selectpicker" multiple>
<option value="" disabled> -- Select Classroom -- </option>
<?php
foreach ($classrooms as $clvalue) {
?>
<option value="<?= $clvalue['id'] ?>" <?php echo (in_array($clvalue['id'], $search_classroom_id)) ? "selected" : ""; ?>><?= $clvalue['classroom_name']; ?></option>
<?php } ?>
</select>
<?php } else { ?>
<select placeholder="Select Classroom" name="search_classroom[]" id="search_classroom" class="form-control selectpicker" multiple>
<option value="" disabled> -- Select Classroom -- </option>
<?php
if (isset($classrooms) && !empty($classrooms)) {
foreach ($classrooms as $clvalue) {
if ($search_classroomid == $clvalue['id'])
$clchecked = 'selected';
else
$clchecked = '';
?>
<option value="<?php echo $clvalue['id']; ?>" <?= $clchecked; ?>><?php echo $clvalue['classroom_name']; ?></option>
<?php }
} ?>
</select>
<?php } ?>
</div>
</div>
<div class="col-md-4">
<div class="form-group" style="margin-top: 1.5rem;">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/assign-routes"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</div>
</form>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Student Id</th>
<th>Student Name</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
// dd($studentlist);
if (isset($studentlist) && !empty($studentlist)) {
$sno = 1;
foreach ($studentlist as $student) {
$studentBatch = (isset($student['batch_id']) && !empty($student['batch_id'])) ? $student['batch_id'] : 0;
$studentCourse = (isset($student['course']) && !empty($student['course'])) ? $student['course'] : 0;
?>
<tr>
<td><?= $sno; ?></td>
<td><?= $student['studentId']; ?></td>
<td><?= $student['name']; ?></td>
<td>
<?php
// echo '<pre>';
// print_r($student);
if (lcfirst($student['bus_facility']) == 'yes' && $student['bus_routeid'] != 0) {
$routes_coursefee_rst = $this->db->query('SELECT id FROM course_fees WHERE batch_id=' . $studentBatch . ' AND course_id=' . $studentCourse . ' AND fees_type=4 AND route_id=' . $student['bus_routeid'])->row_array();
$routes_coursefee_id = (isset($routes_coursefee_rst) && !empty($routes_coursefee_rst)) ? $routes_coursefee_rst['id'] : '';
// $routes_coursefee_id=$this->db->get_where('course_fees',array('batch_id'=>$studentBatch ,'course_id'=>$studentCourse,'fees_type'=>'4','route_id'=>$student['bus_routeid']))->row()->id;
// if($route_coursefee_id !=0 ){
// $student_installment=$this->db->get_where('students_online_payments',array('student_id'=>$student_id,'course_fee_id'=>$route_coursefee_id ))->row_array();
// $paymentStatus=false;
// if(!empty($student_installment)){
// $installmentArray=json_decode($student_installment['payment_details'],true);
// foreach($installmentArray as $payment_data){
// if($payment_data['payment_status']=='yes'){
// $paymentStatus=true;
// break;
// }
// }
// }
// }
?>
<button class="btn btn-success btn-xs route_modal" style="padding:6px !important;" data-id="<?php echo $student['id']; ?>"> <i class="fas fa-check-circle "></i> Re-Assign</button>
<?php } else { ?>
<button class="btn btn-primary btn-xs route_modal" style="padding:6px !importants;" data-id="<?php echo $student['id']; ?>">Assign</button>
<?php } ?>
</td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!-- modal start -->
<!-- Modal -->
<div class="modal fade " id="RouteDetailModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="routes_body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" id="unassign_route_btn"> Unassign</button>
<button type="button" class="btn btn-primary" id="assign_route_btn"> Assign</button>
</div>
<input type="hidden" id="student_id" name="student_id" class="form-control" />
</div>
</div>
</div>
<!-- modal end -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
});
$(".route_modal").click(function() {
var studentid = $(this).data('id');
var batchid = "<?php echo $search_batchid; ?>";
var divdata = '';
if (batchid != '') {
$.ajax({
url: "<?php echo base_url(); ?>admin/getrouteDetails",
method: "POST",
data: {
batch_id: batchid,
student_id: studentid
},
success: function(htmldata) {
// console.log(htmldata);
$('#student_id').val(studentid);
$(".routes_body").html(htmldata);
$('#RouteDetailModal').modal({
backdrop: 'static',
keyboard: false,
show: true
});
// let assignBtn = $('#modalStudentPayment').data('payment-status');
// if (assignBtn === 1) {
// $("#assign_route_btn").removeClass("d-none");
// } else {
// $("#assign_route_btn").removeClass("d-none");
// }
}
});
} else {
alert("Please Select Batch");
}
});
$("#assign_route_btn").click(function(e) {
var selectedVal = "";
var alertsection = '';
var selected = $("input[type='radio'][name='route_id']:checked");
var isOneWay = $("input[type='checkbox'][name='isOneWay']:checked");
if (selected.length > 0) {
selectedVal = selected.val();
var Selected_r = $('#stop_name_' + selectedVal + " option:selected").val();
if (Selected_r === "0") {
alert('Please Select Stop Name');
e.preventDefault();
} else {
var batchid = "<?php echo $search_batchid; ?>";
var studentid1 = $('#student_id').val();
if (studentid1 != '') {
$.ajax({
url: "<?php echo base_url(); ?>admin/routeAssignToStudent",
method: "POST",
data: {
route_id: selectedVal,
student_id: studentid1,
stop_id: Selected_r,
batch_id: batchid,
is_one_way: isOneWay.length > 0 ? 'yes' : 'no'
},
success: function(result) {
$('#RouteDetailModal').modal("hide");
if (result == 1) {
<?php $this->session->set_flashdata('success_msg', 'Route Assigned Successfully'); ?>
} else {
<?php $this->session->set_flashdata('error_msg', 'Route Assiging Failed'); ?>
}
location.reload();
}
});
} else {
alert("Student Id : " + studentid);
}
}
} else {
alert("Please Select Route");
}
})
$("#unassign_route_btn").click(function(e) {
var selectedVal = "";
var alertsection = '';
var selected = $("input[type='radio'][name='route_id']:checked");
var isOneWay = $("input[type='checkbox'][name='isOneWay']:checked");
var studentid1 = $('#student_id').val();
var studentCourse = $('#s_course').val();
// console.log(studentid1);
if (selected.length > 0) {
selectedVal = selected.val();
var Selected_r = $('#stop_name_' + selectedVal + " option:selected").val();
if (Selected_r === "0") {
alert('Please Select Stop Name');
e.preventDefault();
} else {
var batchid = "<?php echo $search_batchid; ?>";
var studentid1 = $('#student_id').val();
console.log(studentid1);
if (studentid1 != '') {
$.ajax({
url: "<?php echo base_url(); ?>admin/routeUnAssignToStudent",
method: "POST",
data: {
route_id: selectedVal,
student_id: studentid1,
stop_id: Selected_r,
batch_id: batchid,
s_course: studentCourse,
is_one_way: isOneWay.length > 0 ? 'yes' : 'no'
},
success: function(result) {
$('#RouteDetailModal').modal("hide");
if (result == 1) {
<?php $this->session->set_flashdata('success_msg', 'Route unassigned Successfully'); ?>
} else {
<?php $this->session->set_flashdata('error_msg', 'Route unassiging Failed'); ?>
}
// console.log(result);
location.reload();
}
});
} else {
alert("Student Id : " + studentid);
}
}
} else {
alert("Please Select Route");
}
})
</script>

View File

@ -0,0 +1,280 @@
<style>
.error {
color:red !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="displaydata pt-5 form-group_lng" style="display:flex">
<div class="col-md-6 pull-left" style="padding:0">
<!-- <a href="<?php // echo base_url(); ?>admin/classroom" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a> -->
</div>
<?php
$search_batchid=(!empty($search_batch_id)) ? $search_batch_id :'';
$search_classroomid=(!empty($search_classroom_id)) ? $search_classroom_id :'';
?>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<div class="bootstrap_alert">
</div>
<form method="post" action="<?php echo base_url(); ?>admin/assign-to-hostel">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Batch</label>
<select id="search_batch" class="form-control" placeholder="Select Batch"
name="search_batch">
<option value=""> Select Batch</option>
<?php
if(isset($batchs) && !empty($batchs)){
foreach($batchs as $bvalue){
if($search_batchid == $bvalue['id'])
$bchecked='selected';
else
$bchecked='';
?>
<option value="<?php echo $bvalue['id']; ?>" <?=$bchecked; ?>><?php echo $bvalue['b_name']; ?></option>
<?php } } ?>
</select>
<span class="error">
<?php echo form_error('search_batch', '<div class="error">', '</div>'); ?>
</span>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Classroom</label>
<select id="search_classroom" class="form-control" placeholder="Select Classroom"
name="search_classroom">
<option value=""> Select Classroom</option>
<?php
if(isset($classrooms) && !empty($classrooms)){
foreach($classrooms as $clvalue){
if($search_classroomid == $clvalue['id'])
$clchecked='selected';
else
$clchecked='';
?>
<option value="<?php echo $clvalue['id']; ?>" <?=$clchecked; ?> ><?php echo $clvalue['classroom_name']; ?></option>
<?php } } ?>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group" style="margin-top: 1.5rem;">
<input type="submit" name="filterSubmit" id="filter_reset"
class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/assign-routes"><button type="button"
name="reset_filter" id="reset_filter" value="reset_filter"
class="subject_addbtn subject_addbtn_nobg"><i
class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</div>
</form>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Student Id</th>
<th>Student Name</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php if(isset($studentlist) && !empty($studentlist) ){
$sno=1;
foreach($studentlist as $student){
?>
<tr>
<td><?= $sno; ?></td>
<td><?= $student['studentId']; ?></td>
<td><?= $student['name']; ?></td>
<td>
<?php if(lcfirst($student['hostel']) == 'yes' && $student['hostel_plan_id'] != 0 ){ ?>
<button class="btn btn-success btn-xs route_modal" style="padding:6px !important;" data-id="<?php echo $student['id']; ?>"> <i class="fas fa-check-circle "></i> Re-Assign</button>
<?php } else { ?>
<button class="btn btn-primary btn-xs route_modal" style="padding:6px !importants;" data-id="<?php echo $student['id']; ?>">Assign</button>
<?php } ?>
</td>
</tr>
<?php
$sno++; }
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!-- modal start -->
<!-- Modal -->
<div class="modal fade " id="HostelDetailModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="routes_body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="assign_route_btn">Assign</button>
</div>
<input type="hidden" id="student_id" name="student_id" class="form-control" />
</div>
</div>
</div>
<!-- modal end -->
<script>
$(document).ready(function(){
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
// $('#tbl1').DataTable({
// "lengthMenu": [
// [25, 50, 100, 150, -1],
// [25, 50, 100, 150, "All"]
// ]
// });
});
$(".route_modal").click(function(){
var studentid=$(this).data('id');
var batchid= "<?php echo $search_batchid; ?>";
var divdata='';
if(batchid !=''){
$.ajax({
url:"<?php echo base_url(); ?>admin/gethostelDetails",
method:"POST",
data:{
batch_id:batchid,
student_id:studentid
},
success: function(htmldata){
$('#student_id').val(studentid);
$(".routes_body").html(htmldata);
$('#HostelDetailModal').modal({
backdrop:'static',
keyboard:false,
show:true
});
let assignBtn=$('#modalStudentPayment').data('payment-status');
if(assignBtn === 1){
$("#assign_route_btn").addClass("d-none");
}
else {
$("#assign_route_btn").removeClass("d-none");
}
}
});
}
else {
alert("Please Select Batch");
}
});
$("#assign_route_btn").click(function(){
var selectedVal = "";
var alertsection='';
var selected = $("input[type='radio'][name='hostel_plan_id']:checked");
if (selected.length > 0) {
selectedVal = selected.val();
var studentid1=$('#student_id').val();
if(studentid1 != ''){
$.ajax({
url:"<?php echo base_url(); ?>admin/hostelAssignToStudent",
method:"POST",
data:{
hostel_plan_id:selectedVal,
student_id:studentid1
},
success: function(result){
$('#HostelDetailModal').modal("hide");
if(result == 1){
swal({
title: "Good job",
text: "Hostel has been assigned successfully!",
type: "success"
},
function(){
location.reload();
});
// $(".bootstrap_alert").html('<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert">&times;</a><strong>Success!</strong> Route Assigned Successfully </div>');
}
else {
swal({
title: "Sorry",
text: "Hostel assigning failed!",
type: "error",
},
function(){
location.reload();
});
// $(".bootstrap_alert").html('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert">&times;</a><strong>Danger!</strong> Route Assiging Failed </div>');
}
}
});
}
else
{
alert("Student Id : "+studentid);
}
}
else {
alert("Please Select Route");
}
})
</script>

View File

@ -0,0 +1,444 @@
<style>
.action_subject_addbtn {
background: #032DA4;
border-radius: 35px;
color: #fff;
padding: 5px 15px;
border: none;
font-size: 12px;
cursor: pointer;
text-decoration: none;
}
form label.error, #secNameerr {
color : red;
}
.cierr {
font-size:14px;
}
.form-group .bootstrap-select > .dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
</style>
<div class="wraper responsive-width w-90">
<main class="" id="main">
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<form method="post" action="<?php echo base_url(); ?>admin/assign-additional-subjects" id="assignAdditionalSubToStudentsForm">
<input type="hidden" name="clicked_on" id="clicked_on" value="Filter">
<div class="subject_lsec">
<div class="subject_lhead">
Assign Additional Subjects To The Students
<p id="success" style="color:green;"></p>
</div>
<?php
$batchId=''; $courseId=''; $sectionIds='';
if(count($_POST)>0)
{
$batchId = $_POST['filter_by_batch'];
$courseId = $_POST['filter_by_course'];
if(isset($_POST['filter_by_section']) && !empty($_POST['filter_by_section']))
$sectionIds = implode(',',$_POST['filter_by_section']);
}
?>
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">
Batch <span style="font-weight:bold;color:red;"> * </span>
</label>
<select class="form-control" name="filter_by_batch" id="filter_by_batch" onchange="batch_is_changed()">
<option value="">Select Batch</option>
<?php
if (isset($batch) && !empty($batch))
{
foreach ($batch as $row)
{
?>
<option value="<?php echo $row['id'] ?>" <?php if($row['id']==$batchId){?> selected <?php } ?> >
<?php echo $row['b_name']; ?>
</option>
<?php
}
}
?>
</select>
<div id='err_filter_by_batch' class="text-danger cierr"><?php echo form_error('filter_by_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">
Course <span style="font-weight:bold;color:red;"> * </span>
</label>
<select class="form-control" name="filter_by_course" id="filter_by_course" onchange="fetch_sections_of_course('onchange')">
<option value="">Select Course</option>
<?php
if (isset($course) || !empty($course))
{
foreach ($course as $row)
{
?>
<option value="<?php echo $row['id'] ?>" <?php if($row['id']==$courseId){?> selected <?php } ?> >
<?php echo $row['course_name']; ?>
</option>
<?php
}
}
?>
</select>
<div id='err_filter_by_course' class="text-danger cierr"><?php echo form_error('filter_by_course'); ?></div>
</div>
</div>
<div class="col-md-3 pl-0">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Section</label>
<select class="form-control selectpicker" multiple data-live-search="true" name="filter_by_section[]" id="filter_by_section">
<option value="">Select Section</option>
</select>
<div class="text-danger cierr"><?php echo form_error('filter_by_section'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group" style="margin-top: 1.5rem;">
<input type="button" name="filterSubmit" onclick="validate_filter()" id="filter_reset" class="btn btn-success" value="Filter">
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="<?php echo base_url() ?>admin/assign-additional-subjects"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg p-0"><i class="fas fa-redo "></i>Reset</button></a>
</div>
</div>
</div>
<?php if($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php
/*$showHideTable = "style='display:none;'";
if(isset($theResults) && !empty($theResults))
$showHideTable = "style=''"; */
$showHideTableUpdate = "style='display:none;'";
if(isset($theResults) && !empty($theResults) && !empty($theOptSubs))
$showHideTableUpdate = "style='margin-top: 1.5rem;'";
?>
<div id='theTableHere'>
<table id="tbl" class="display table-responsive" >
<thead>
<tr>
<th width='50px;'>Sl No</th>
<th width='50px;'>Roll No</th>
<th width='150px;'>Student Name</th>
<?php
$theColSpan = 3;
if($batchId == $currentBatch)
{
if(!empty($theOptSubs))
{
foreach ($theOptSubs as $osub)
{
$theColSpan++;
?>
<th>
<input type="checkbox" id='chk_unchk_all_<?php echo $osub['id'];?>' onclick="check_uncheck_column(<?php echo $osub['id'];?>)" ><br/>
<?php echo $osub['sub_name'];?>
</th>
<?php
}
}
else
{
$theColSpan++;
?>
<th>No additional subjects present for the selected Batch & Course</th>
<?php
}
}
else
{
$theColSpan++;
?>
<th>Additional Subject Details</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
if(isset($theResults) && !empty($theResults))
{
$slno=1;
foreach ($theResults as $key => $std)
{
$osArr = array();
if(isset($std['the_add_subjects']) && $std['the_add_subjects']!='')
$osArr = explode(',', $std['the_add_subjects']);
?>
<tr>
<td><?php echo $slno;?></td>
<td><?php echo $std['roll_no'];?></td>
<td><?php echo $std['name'];?></td>
<?php
if($batchId == $currentBatch)
{
if(!empty($theOptSubs))
{
foreach ($theOptSubs as $ss=>$osub)
{
if(empty($osArr))
{
?>
<td>
<input type="checkbox" class='c_uc_os_col_<?php echo $osub['id'];?>' name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='cb_std_<?php echo $std['id']."_".$osub['id'];?>' onclick="manage_the_checkboxes(<?php echo $std['id'];?>, <?php echo $osub['id'];?>)" >
<input type="hidden" class='txt_c_uc_os_col_<?php echo $osub['id'];?>' size="5px" name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='hidden_std_<?php echo $std['id']."_".$osub['id'];?>' value='no'>
</td>
<?php
}
else
{
$checked = ''; $chkVal='no';
if(in_array($osub['id'], $osArr)){
$checked = 'checked';
$chkVal='yes';
}
?>
<td>
<?php //echo $osub['id'].' = '.$checked;?>
<input type="checkbox" class='c_uc_os_col_<?php echo $osub['id'];?>' name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='cb_std_<?php echo $std['id']."_".$osub['id'];?>' <?php echo $checked;?> onclick="manage_the_checkboxes(<?php echo $std['id'];?>, <?php echo $osub['id'];?>)" >
<input type="hidden" class='txt_c_uc_os_col_<?php echo $osub['id'];?>' size="5px" name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='hidden_std_<?php echo $std['id']."_".$osub['id'];?>' value='<?php echo $chkVal;?>'>
</td>
<?php
}
}
}
else
{
?>
<td> - </td>
<?php
}
}
else
{
?>
<td><?php echo $std['the_add_subject_details'];?></td>
<?php
}
?>
</tr>
<?php
$slno++;
}
}
else
{
?>
<tr>
<td colspan="<?php echo $theColSpan;?>">-- No data to display --</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="col-md-3" >
<div id='tbl-update-btn' class="form-group" <?php echo $showHideTableUpdate;?> >
<input type="button" name="assignSubmit" onclick="submit_the_form_here()" class="btn btn-success" value="Update">
</div>
<div id='tbl-loading-btn' class="form-group" style='display:none;'>
<i class="fa-solid fa-loader"></i>Loading.... Please wait
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
var jsCurrBatch = '<?php echo $currentBatch;?>';
var jsSeldSections = "<?php echo $sectionIds;?>";
$(document).ready(function(){
fetch_sections_of_course('onload');
//table js
/*$('#tbl').DataTable( {
"lengthMenu": [[50, 75, 100, -1], [50, 75, 100, "All"]],
"ordering": false,
});*/
$('#tbl').DataTable( {
"lengthMenu": [[-1], ["All"]],
"ordering": false,
});
//table js end
$('#filter_by_section').selectpicker();
});
function batch_is_changed()
{
$('#filter_by_course').val('');
$('#filter_by_section').empty().selectpicker("refresh");
$('#theTableHere').hide();
}
function fetch_sections_of_course(calledOn)
{
if(calledOn=='onchange')
$('#theTableHere').hide();
$('#filter_by_section').empty().selectpicker("refresh");
var divData = "<option value='' disabled> Select Section </option>";
if($('#filter_by_course').val()!='')
{
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: $('#filter_by_course').val()
},
dataType: "json",
success: function(response) {
//divData += "<option value='' disabled> Select Section </option>";
if(response.sections != '')
{
var ssArr = [];
if(jsSeldSections!='')
ssArr = jsSeldSections.split(",");
$.each(response.sections, function(i, sectiondata) {
if(ssArr.includes(sectiondata.section_id))
divData += "<option value='"+sectiondata.section_id+"' selected >"+sectiondata.section_name+"</option>";
else
divData += "<option value='"+sectiondata.section_id+"'>"+sectiondata.section_name+"</option>";
});
}
else
divData += "<option value=''> -- No Section's Found --</option>";
$('#filter_by_section').append(divData).selectpicker("refresh");
}
});
}
}
function validate_filter()
{
$errCnt=0;
$("#err_filter_by_batch").hide();
$("#err_filter_by_course").hide();
if($('#filter_by_batch').val()=='')
{
$('#err_filter_by_batch').html('Please select the batch.');
$('#err_filter_by_batch').show();
$errCnt++;
}
if($('#filter_by_course').val()=='')
{
$('#err_filter_by_course').html('Please select the course.');
$('#err_filter_by_course').show();
$errCnt++;
}
$('#clicked_on').val('Filter');
if($errCnt==0)
$('#assignAdditionalSubToStudentsForm').submit();
return false;
}
function check_uncheck_column(optSubId)
{
if($('#chk_unchk_all_'+optSubId).prop('checked'))
{
$('.c_uc_os_col_'+optSubId).each(function(){
$(this).prop('checked', true);
});
$('.txt_c_uc_os_col_'+optSubId).each(function(){
$(this).val('yes');
});
}
else
{
$('.c_uc_os_col_'+optSubId).each(function(){
$(this).prop('checked', false);
});
$('.txt_c_uc_os_col_'+optSubId).each(function(){
$(this).val('no');
});
}
}
function manage_the_checkboxes(stdId, osId)
{
if($('#cb_std_'+stdId+'_'+osId).prop('checked'))
$('#hidden_std_'+stdId+'_'+osId).val('yes');
else
$('#hidden_std_'+stdId+'_'+osId).val('no');
}
function submit_the_form_here()
{
$('#clicked_on').val('UpdateData');
$('#assignAdditionalSubToStudentsForm').submit();
$('#tbl-update-btn').hide();
$('#tbl-loading-btn').show();
}
</script>

View File

@ -0,0 +1,769 @@
<Link href="https://cdn.datatables.net/fixedcolumns/4.1.0/css/fixedColumns.dataTables.min.css" />
<style>
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.action_subject_addbtn {
background: #032DA4;
border-radius: 35px;
color: #fff;
padding: 5px 15px;
border: none;
font-size: 12px;
cursor: pointer;
text-decoration: none;
}
.custom_tble th:nth-child(1),
.custom_tble th:nth-child(2),
.custom_tble td:nth-child(1),
.custom_tble td:nth-child(2) {
background: #fff;
z-index: 9;
}
.table_div {
width: 100%;
}
th,
td {
white-space: nowrap;
}
.table_stu_name {
width: 150px;
margin: auto;
}
.assign_Fee_startdate .form-control {
height: calc(2.25rem + 2px);
padding: 9px 3px;
}
.assign_fee_reset .subject_addbtn {
padding: 6px 10px;
}
/*START : added by Nandini*/
.dt-buttons {
display: none !important;
}
/*END OF : added by Nandini*/
.error {
color: red;
padding-top: 5px;
/* font-weight:500; */
}
@media screen and (min-width: 1200px) {}
@media screen and (max-width: 1200px) {
div.dataTables_wrapper {
width: 776px;
}
}
@media screen and (max-width: 1100px) {
div.dataTables_wrapper {
width: 700px;
}
}
@media screen and (max-width: 1024px) {
div.dataTables_wrapper {
width: 675px;
}
}
@media screen and (max-width: 800px) {
div.dataTables_wrapper {
width: 508px;
}
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="col-md-6 pull-left" style="padding:0">
<a href="<?= base_url(); ?>admin/fee-course" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a>
</div>
<div class="subject_lhead"><?php echo $title; ?></div>
<?php
$selCourseId = '';
$selSectionId = '';
$sercStdStr = '';
if (count($_POST) > 0) {
$selCourseId = $_POST['filter-course'];
$selSectionId = $_POST['filter-section'];
}
?>
<form method="post" action="<?php echo base_url(); ?>admin/assign-all-fees" id="form-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Course</label>
<select class="form-control" placeholder="Select Course" name="filter-course" id="filter-course">
<option value="">Select Course</option>
<?php
if (isset($courses) || !empty($courses)) {
foreach ($courses as $row) {
?>
<option value="<?php echo $row['id'] ?>" <?php if ($row['id'] == $selCourseId) { ?> selected <?php } ?>>
<?php echo $row['course_name']; ?>
</option>
<?php
}
}
?>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-course'); ?></div>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Section</label>
<select class="form-control" placeholder="Select Section" name="filter-section" id="filter-section">
<?php if ($section != '') {
$sectionName = $this->db->get_where('section', array('id' => $section))->row()->section_name;
?>
<option value="<?= $section; ?>" <?php echo set_select('filter-section', $section, TRUE); ?>><?php echo $sectionName; ?></option>
<?php } ?>
<option value=""> -- Select Section -- </option>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-section'); ?></div>
</div>
</div>
<div class="col-md-2">
<div class="form-group assign_fee_toall">
<label class="mb-0" style="font-size: 13px;">Fees Type</label>
<?php if (!empty($feestypes) && count($feestypes) > 0) { ?>
<select placeholder="Select Fees type" name="filter-fees_type[]" id="filter-fees_type" class="form-control selectpicker" multiple data-live-search="true">
<option value="" disabled> -- Select Fees type -- </option>
<?php
foreach ($fees_type as $ft_value) {
?>
<option value="<?= $ft_value['id'] ?>" <?php echo (in_array($ft_value['id'], $feestypes)) ? "selected" : ""; ?>><?= $ft_value['feetype_name'] ?></option>
<?php
} ?>
</select>
<label id="filter-fees_type-error" class="error" for="filter-fees_type"></label>
<?php
} else { ?>
<select placeholder="Select Fees type" name="filter-fees_type[]" id="filter-fees_type" class="form-control fees_type_list selectpicker" multiple>
<option value="" disabled> -- Select Fees type -- </option>
<?php
foreach ($fees_type as $ft_value) {
?>
<option value="<?= $ft_value['id'] ?>"><?= $ft_value['feetype_name'] ?></option>
<?php } ?>
</select>
<label id="filter-fees_type-error" class="error" for="filter-fees_type"></label>
<?php } ?>
<div class="text-danger cierr"><?php echo form_error('filter-fees_type'); ?></div>
</div>
</div>
<?php if (isset($filter_route_id) && $filter_route_id != '') { ?>
<div class="col-md-2 " id="new-dropdown-section">
<label class="mb-0" style="font-size: 13px;">Routes</label>
<select class='form-control' name='filter-route-id' id='filter-route-id'>
<?php if (isset($routes) && !empty($routes)) { ?>
<option value="" disabled> -- Select Route -- </option>
<?php
foreach ($routes as $rt_value) {
?>
<option value="<?= $rt_value['id'] ?>" <?php echo ($filter_route_id == $rt_value['id']) ? "selected" : ""; ?>><?= $rt_value['route_name'] ?></option>
<?php
} ?>
</select>
</div>
<?php }
} else { ?>
<div class="col-md-2 " id="new-dropdown-section">
</div>
<?php } ?>
<div class="col-md-2">
<div class="form-group assign_subject assign_Fee_startdate">
<label class="mb-0" style="font-size: 13px;margin-bottom: 4px !important;"> Start Date <span class="text-danger"></span></label>
<input type="text" name="date_from" id='date_from' class="form-control nepal-date" value="<?php echo $start_date; ?>" placeholder="Enter start date">
<p id="error_d_from" style="color:red;"></p>
</div>
</div>
<div class="col-md-3">
<div class="form-group assign_fee_reset" style="margin-top: 1.5rem;">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/assign-all-fees"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</div>
</form>
<form method="post" action="<?php echo base_url(); ?>Admin/assigntostudents">
<div class="applicnts-list-wrap ">
<div class="table_div ">
<?php //dd($theStudents);
?>
<table id="tbl" class="display custom_tble" width="100%">
<thead>
<tr>
<th>
<label class="checkBox">
<input type="checkbox" id="chkParent" />
<span class="checkmark"><?php //echo $fee_value['course_fee_id'];
?></span>
</label>
</th>
<th>Student Details </th>
<?php $thCount = (!empty($fees_type_names)) ? count($fees_type_names) : 0;
// dd($fees_type_names);
foreach ($fees_type_names as $index => $fee_value) {
?>
<th>
<?php //echo $fee_value['feecourse_id']
?>
<div class="t_heading">
<?= $fee_value['fee_amount'] . '<br>' . $fee_value['fee_name'] //($fee_value['feecourse_id']);
?>
</div>
<input type="hidden" name="feestype[]" value="<?= $fee_value['course_fee_id']; ?>">
<label class="checkBox">
<input type="checkbox" name="grouped_<?= $fee_value['feecourse_id'] ?>" id="parentcheckall_<?= $fee_value['feecourse_id'] ?>" onclick="checkparent_all(this,<?= $fee_value['feecourse_id'] ?>)">
<span class="checkmark"></span>
</label>
</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
if (isset($theStudents['student_info']) && !empty($theStudents['student_info'])) {
$sno = 1;
foreach ($theStudents['student_info'] as $sindex => $student_value) {
// echo '<pre>';
// print_r($student_value);
?>
<tr>
<td width="5%">
<label class="checkBox">
<input type="checkbox" class="student-checkbox " id="student-checkbox_<?= $student_value['student_id']; ?>" name="students[]" onclick="studentParentCheck(this)" value="<?= $student_value['student_id']; ?>">
<span class="checkmark">
</span>
</label>
</td>
<td>
<div class="mx-2 text-left">
<?php echo $student_value['student_name']; ?> <br>
<small><?php echo $student_value['studentId']; ?></small> <br>
<?= isset($student_value['route_details']) && ($student_value['route_details']['one_way'] == 'yes') ? '<span class="text-muted" style="font-style: italic; font-size: 10px;font-weight: 500;">(One Way)</span>' : '' ?>
</div>
<input type="hidden" id="rowcounter_<?= $student_value['student_id']; ?>" class="student_list_chkbx" value="0">
</td>
<?php
foreach ($student_value['fees_data'] as $index => $fee_value) {
$check_status = ($fee_value['status'] == 1) ? "checked" : "";
$cfID = $fee_value["course_fee_id"];
$cfstudId = $student_value["student_id"];
$check_fees = $this->db->query('SELECT * FROM students_online_payments WHERE course_fee_id=' . $cfID . ' AND student_id=' . $cfstudId . ' AND paid_amount > 0')->result();
// $check_fees=$this->db->get_where('students_online_payments',array('course_fee_id'=>$fee_value['course_fee_id'],'student_id'=>$student_value['student_id']))->result();
if (count($check_fees) > 0) {
$className = "";
$checkbxinput = "";
$disable_attr = 'style="background-color: #28a745 !impotant;" disabled="disabled" data-toggle="tooltip" title="Fees Partialy paid" readonly="readonly"';
$partial_payment_checkbox = " style='background-color: green !important;'";
} else {
$checkbxinput = "stud_check_inputs feestype_childerns_" . $fee_value['course_fee_id'] . " childschkBx" . $student_value['student_id'];
$className = "fes_child_checkbox fees_type_" . $fee_value['course_fee_id'] . " student_checkid_" . $student_value['student_id'];
$disable_attr = '';
$partial_payment_checkbox = "";
}
?>
<td>
<?php //echo $fee_value['course_fee_id'];
?>
<label class="checkBox">
<input type="checkbox" id="checkBx_<?= $fee_value['course_fee_id']; ?>_<?= $student_value['student_id']; ?>" class=" <?= $className; ?>" name="fees_<?= $index; ?>_<?= $fee_value['course_fee_id']; ?>[]" onclick="fees_type_check(this,<?= $fee_value['course_fee_id']; ?>,<?php echo $student_value['student_id']; ?>)" <?= $check_status; ?> value="<?php echo ($fee_value['status'] == 1) ? "on" : "off"; ?>" <?= $disable_attr; ?>>
<span class="checkmark" <?php echo $partial_payment_checkbox; ?>><?php //echo $fee_value['course_fee_id'];
?></span>
</label>
<input type="hidden" id="chkBx_<?= $fee_value['course_fee_id']; ?>_<?= $student_value['student_id']; ?>" class="<?= $checkbxinput ?>" name="row[<?= $student_value['student_id']; ?>][<?= $fee_value['course_fee_id']; ?>]" value="<?php echo ($fee_value['status'] == 1) ? "on" : "off"; ?>">
<input type="hidden" id="cb_<?= $fee_value['course_fee_id']; ?>_<?= $student_value['student_id']; ?>" value="<?= $fee_value['status']; ?>">
<input type="hidden" name="one_way[<?= $student_value['student_id']; ?>][<?= $fee_value['course_fee_id']; ?>]" id="one_way_<?= $fee_value['course_fee_id']; ?>_<?= $student_value['student_id']; ?>" value="<?= isset($student_value['route_details']) ? $student_value['route_details']['one_way'] : 'no' ?>" />
</td>
<?php } ?>
</tr>
<?php $sno++;
}
}
?>
</tbody>
</table>
<hr />
<div class="row">
<div class="col-md-9"></div>
<div class="col-md-3"><button type="submit" class=" w-100 btn btn-sm mb-2" style="background-color:#032da1;color:#fff;" name="assigntostudents" value="assign"> Assign </button></div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script defer src="https://cdn.datatables.net/fixedcolumns/4.1.0/js/dataTables.fixedColumns.min.js"></script>
<script>
$(document).ready(function() {
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 -]{3,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#form-filter").validate({
ignore: "input[type='text']:hidden",
rules: {
"filter-course": {
required: true,
},
"filter-fees_type[]": {
required: true
},
"filter-route-id": {
required: true
}
},
messages: {
"filter-course": {
required: "Please Select Course ",
}
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>
<script>
function studentParentCheck(ele) {
// alert(+ele.value);
var isChecked = $('#' + ele.id).prop('checked');
if (isChecked == true) {
$('.childschkBx' + ele.value).val('on');
$('#rowcounter_' + ele.value).val(1);
$('.student_checkid_' + ele.value).each(function() {
$(this).prop('checked', true);
});
} else {
$('.childschkBx' + ele.value).val('off');
$('#rowcounter_' + ele.value).val(0);
$('.student_checkid_' + ele.value).each(function() {
$(this).prop('checked', false);
});
}
}
$(document).ready(function() {
<?php if (isset($filter_route_id) && $filter_route_id != '') { ?>
$('#new-dropdown-section').removeClass('d-none');
<?php } else { ?>
$('#new-dropdown-section').addClass('d-none');
<?php } ?>
$('#filter-fees_type').change(function() {
$('#filter-fees_type').selectpicker('toggle');
$('#new-dropdown-section').addClass('d-none');
var TotalValues = [];
var selectedValues = [];
$('#filter-fees_type option').each(function() {
let item = $(this).val();
if (item != '') {
TotalValues.push(item);
}
});
$('#filter-fees_type option:selected').each(function() {
let selectItem = $(this).val();
if (selectItem != '')
selectedValues.push(selectItem);
});
const intersection = TotalValues.filter(element => selectedValues.includes(element));
const differValues = TotalValues.filter(element => !selectedValues.includes(element));
// console.log(intersection);
// console.log(differValues);
if (intersection.length > 0) {
var divData1 = '';
if (intersection.includes("3") || intersection.includes("4")) {
for (let i = 0; i < intersection.length; i++) {
if (intersection[i] == '4') {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_routes_by_batch_course",
method: "GET",
dataType: "json",
success: function(res) {
// console.log(res.routes);
// #new-dropdown-section
$('#new-dropdown-section').removeClass('d-none');
divData1 += "<label class='mb-0' style='font-size: 13px;margin-bottom: 4px !important;'> Routes <span class='text-danger'></span></label><select class='form-control' name='filter-route-id' id='filter-route-id' >";
divData1 += "<option value='' disabled> Select Routes </option>";
if (res.routes != '') {
$.each(res.routes, function(i, routedata) {
// console.log(routedata.id+"="+routedata.route_name);
divData1 += "<option value='" + routedata.id + "'>" + routedata.route_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData1 += "<option value=''> -- No Route's Found --</option>";
}
divData1 += "</select>"
$('#new-dropdown-section').empty().append(divData1);
}
});
} else if (intersection[i] == '3') {
}
for (let j = 0; j < differValues.length; j++) {
$("#filter-fees_type option[value='" + differValues[j] + "']").prop('disabled', true);
}
$("#filter-fees_type option[value='" + intersection[i] + "']").prop('disabled', false);
}
} else {
$("#filter-fees_type option[value='3']").prop('disabled', true);
$("#filter-fees_type option[value='4']").prop('disabled', true);
}
} else {
$("#filter-fees_type option").prop('disabled', false);
}
// for(let i=0;i<TotalValues.length;i++){
// console.log(i, "i");
// console.log(TotalValues[i]);
// console.log(selectedValues[i]);
// if( selectedValues[i]==="3"){
// $("#filter-fees_type option[value='"+selectedValues[i]+"']").prop('disabled',false);
// }
// else {
// $("#filter-fees_type option[value='"+TotalValues[i]+"']").prop('disabled',true);
// }
// if(TotalValues[i] === '3'){
// $("#filter-fees_type option[value='"+TotalValues[i]+"']").prop('disabled',false);
// }
// else if(TotalValues[i] === '4'){
// $("#filter-fees_type option[value='"+TotalValues[i]+"']").prop('disabled',false);
// }
// else {
// $("#filter-fees_type option[value='"+TotalValues[i]+"']").prop('disabled',true);
// $("#filter-fees_type option[value='"+TotalValues[i]+"']").prop('selected',false);
// }
// }
});
$('#chkParent').click(function() {
var isChecked = $(this).prop("checked");
$('#tbl tr:has(td)').find('.student-checkbox').prop('checked', isChecked);
if (isChecked == true) {
$('.stud_check_inputs').val('on');
$('.student_list_chkbx').val(1);
$('.fes_child_checkbox').each(function() {
$(this).prop('checked', true);
});
} else {
$('.stud_check_inputs').val('off');
$('.student_list_chkbx').val(0);
$('.fes_child_checkbox').each(function() {
$(this).prop('checked', false);
});
}
});
$('#tbl tr:has(td)').find('.student-checkbox').click(function() {
var isChecked = $(this).prop("checked");
var isHeaderChecked = $("#chkParent").prop("checked");
if (isChecked == false && isHeaderChecked)
$("#chkParent").prop('checked', isChecked);
else {
$('#tbl tr:has(td)').find('.student-checkbox').each(function() {
if ($(this).prop("checked") == false)
isChecked = false;
});
$("#chkParent").prop('checked', isChecked);
}
});
});
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
});
/* Ensure that the demo table scrolls */
/* Ensure that the demo table scrolls */
$(document).ready(function() {
var table = $('#tbl').DataTable({
scrollY: "400px",
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
leftColumns: 2
}
});
});
$(document).ready(function() {
var selected = [];
$('.fees_type_list option:selected').each(function() {
selected[$(this).val()] = $(this).text();
});
// Get Section by Course - start from Here
// Developer :Shivakumar
$('#filter-course').change(function() {
var course = $('#filter-course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value=''> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#filter-section').empty().append(divData);
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#filter-section').empty().append(divData);
}
});
// Get Section by Course - End from Here
});
function checkparent_all(ele, fee_id) {
var isChecked = $('#parentcheckall_' + fee_id).prop("checked");
if (isChecked == true) {
$('.feestype_childerns_' + fee_id).val('on');
$('.student_list_chkbx').val(1);
$('.fees_type_' + fee_id).prop('checked', isChecked);
$('.student-checkbox').each(function() {
$(this).prop('checked', true);
});
} else {
$('.feestype_childerns_' + fee_id).val('off');
$('.student_list_chkbx').val(0);
$('.student-checkbox').each(function() {
$(this).prop('checked', false);
});
$('.fees_type_' + fee_id).prop('checked', isChecked);
}
}
function fees_type_check_old(ele, fee_id, student_id) {
var isChecked = $('.fees_type_' + fee_id).prop("checked");
var isStudentChecked = $('#student-checkbox_' + student_id).prop("checked");
if (isStudentChecked == false)
$('#student-checkbox_' + student_id).prop('checked', true);
var isHeaderChecked = $('#parentcheckall_' + fee_id).prop("checked");
if (isChecked == false && isHeaderChecked) {
$('#parentcheckall_' + fee_id).prop('checked', isChecked);
} else {
$('.fees_type_' + fee_id).each(function() {
if ($(this).prop("checked") == false)
isChecked = false;
});
$('#parentcheckall_' + fee_id).prop('checked', isChecked);
}
}
function fees_type_check(ele, fee_id, student_id) {
var act_val = parseInt($('#cb_' + fee_id + '_' + student_id).val());
var isChecked = $('#' + ele.id).prop("checked");
// alert('#'+ele.id);
if (isChecked)
$('#chkBx_' + fee_id + '_' + student_id).val("on");
else
$('#chkBx_' + fee_id + '_' + student_id).val("off");
var read_val = (isChecked === true) ? 1 : 0;
var rowcounter = parseInt($('#rowcounter_' + student_id).val());
if (parseInt(read_val) != act_val) {
rowcounter = rowcounter + 1;
} else {
rowcounter = rowcounter - 1;
}
if (rowcounter === 0) {
$('#student-checkbox_' + student_id).prop('checked', false);
} else {
$('#student-checkbox_' + student_id).prop('checked', true);
}
$('#rowcounter_' + student_id).val(rowcounter);
}
//
function assignfees(ele, event) {
console.log(ele);
}
</script>
<script>
jQuery(document).ready(function() {
jQuery(".custom_tble").clone(true).appendTo('.table_div_cover').addClass('clone');
});
</script>
</body>
</html>

View File

@ -0,0 +1,229 @@
<style>
.checkBox input:checked~.checkmark {
background-color: #032da1;
}
.checkmark {
position: absolute;
top: 6px;
left: 0;
height: 15px;
width: 15px;
border: 1px solid #ced4da;
border-radius: 0.25rem;
}
.small,
small {
font-size: 75%;
font-weight: 500;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group">
<a href="javascript:history.back()"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('danger'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('danger'); ?>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<?php if (!empty($theStudentInfo)) { ?>
<!-- <div class="subject_lhead"> -->
<?php
if (empty($theStudentInfo['photo'])) {
$profileimg = base_url() . "common_assets/user.png";
} else if (file_exists('assets_student/application/' . $theStudentInfo['photo'])) {
$profileimg = base_url() . "assets_student/application/" . $theStudentInfo['photo'];
} else {
if ($theStudentInfo['gender'] == 'Male')
$profileimg = base_url() . "common_assets/male_image.jpg";
else
$profileimg = base_url() . "common_assets/female_image.jpg";
}
// print_r($theStudentInfo);
?>
<div class="card">
<div class="card-body py-3">
<div class="row align-items-center px-3">
<img src="<?= $profileimg; ?>" class="img-thumbnail img-fluid border-primary rounded-circle applicant-img" style="width: 80px; height: auto !important;">
<div class="px-3">
<label style="font-size: 18px; font-weight: 600;" class="my-0 h6"> <?= $theStudentInfo['name'] ?></label>
<h6 style="font-size: 12px">
<?= $theStudentInfo['studentId'] ?>
</h6>
<h6 style="font-size: 14px; font-weight: 600; ">
<?= $theStudentInfo['classroom_name'] ?>
</h6>
<h6 style="font-size: 13px; font-style: italic; font-weight: 500; ">
<?= $theStudentInfo['b_name'] ?>
</h6>
</div>
<div style="font-size: 14px; font-weight: 600; " class="col text-right">
<div>
<i class="fa fa-phone mx-1" aria-hidden="true" style="-webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); "></i>
<?= $theStudentInfo['emergency_contact_number'] ?>
</div>
</div>
</div>
</div>
</div>
<hr>
<form method="post" action="<?= base_url(); ?>admin/student-fees/<?= $url_params ?>">
<input type="hidden" name="student_id" value="<?= $theStudentInfo['student_id']; ?>">
<input type="hidden" name="batch_id" value="<?= $theStudentInfo['batch_id']; ?>">
<input type="hidden" name="course_id" value="<?= $theStudentInfo['course_id']; ?>">
<?php
// dd($theStudentInfo);
$course_fees = $theStudentInfo['course_fees'];
foreach ($course_fees as $cf_key => $course_fee) {
$feeTitle = $course_fee['fee_title'];
$fees = $course_fee['fees'];
?>
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title mb-2"><?= $feeTitle ?></h5>
<p class="card-text">
<?php
// echo '<pre>';
// print_r($fees);
?>
</p>
<div class="row px-3 align-items-center">
<?php
foreach ($fees as $f_key => $f_value) {
$check_status = ($f_value['fee_assigned_id'] > 0) ? "checked" : "";
if ($f_value['sop_id'] > 0) {
$className = "";
$checkbxinput = "";
$disable_attr = 'style="background-color: #28a745 !important;" disabled="disabled" data-toggle="tooltip" title="Fees Partialy paid" readonly="readonly"';
$partial_payment_checkbox = " style='background-color: green !important;'";
} else {
$checkbxinput = "stud_check_inputs feestype_childerns_" . $f_value['id'] . " childschkBx" . $theStudentInfo['student_id'];
$className = "fes_child_checkbox fees_type_" . $f_value['id'] . " student_checkid_" . $theStudentInfo['student_id'];
$disable_attr = '';
$partial_payment_checkbox = "";
}
?>
<div class="col-md-3 py-0 my-auto align-items-center justify-content-center">
<!-- <div class="row px-3 mb-2 align-items-center">
<input type="checkbox" id="checkBx_<?= $f_value['id']; ?>_<?= $theStudentInfo['student_id']; ?>" class="checkmark <?= $className; ?>" name="fees_<?= $f_key; ?>_<?= $f_value['id']; ?>[]" onclick="fees_type_check(this,<?= $f_value['id']; ?>,<?php echo $theStudentInfo['student_id']; ?>)" <?= $check_status; ?> value="<?php echo ($f_value['fee_assigned_id'] > 0) ? "on" : "off"; ?>" <?= $disable_attr; ?>>
<h6 class="px-3"><?= $f_value['fee_values'] ?></h6>
</div> -->
<div class="checkbox">
<label>
<input type="hidden" name="course_fees_id[]" value="<?= $f_value['id']; ?>">
<input type="hidden" name="course_fees_assigned_id[<?= $f_value['id']; ?>]" value="<?= $f_value['fee_assigned_id']; ?>">
<input type="hidden" name="course_fees_payment_status[<?= $f_value['id']; ?>]" value="<?= $f_value['payment']; ?>">
<input type="checkbox" id="checkBx_<?= $f_value['id']; ?>_<?= $theStudentInfo['student_id']; ?>" class="checkmark <?= $className; ?>" name="fees[<?= $f_value['id']; ?>]" onclick="fees_type_check(this,<?= $f_value['id']; ?>,<?php echo $theStudentInfo['student_id']; ?>)" <?= $check_status; ?> <?= $disable_attr; ?>>
<h6 class="px-3" style="font-size: 14px;"><?= $f_value['fee_values'] ?> <br> <small>(<?= $school_info['currency_symbol'] . '. ' . $f_value['amount'] ?>)</small></h6>
</label>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<?php } ?>
<input type="submit" class=" w-100 btn btn-sm mb-2" style="background-color:#032da1;color:#fff;" name="assigntostudents" value="Update">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
jQuery(document).ready(function() {
jQuery(".custom_tble").clone(true).appendTo('.table_div_cover').addClass('clone');
});
function fees_type_check(ele, fee_id, student_id) {
var act_val = parseInt($('#cb_' + fee_id + '_' + student_id).val());
var isChecked = $('#' + ele.id).prop("checked");
// alert('#'+ele.id);
// if (isChecked)
// $('#chkBx_' + fee_id + '_' + student_id).val("on");
// else
// $('#chkBx_' + fee_id + '_' + student_id).val("off");
// var read_val = (isChecked === true) ? 1 : 0;
// var rowcounter = parseInt($('#rowcounter_' + student_id).val());
// if (parseInt(read_val) != act_val) {
// rowcounter = rowcounter + 1;
// } else {
// rowcounter = rowcounter - 1;
// }
// if (rowcounter === 0) {
// $('#student-checkbox_' + student_id).prop('checked', false);
// } else {
// $('#student-checkbox_' + student_id).prop('checked', true);
// }
// $('#rowcounter_' + student_id).val(rowcounter);
console.log(ele + ' ======> ' + fee_id + ' ====> ' + student_id);
console.log($(ele).prop('checked'));
$(ele).attr('checked', true);
}
</script>
</body>
</html>

View File

@ -0,0 +1,148 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<style>
.error {
color: red;
padding-top: 2px;
}
.form-group.form-group-iconselect {
position: relative;
margin: 0px 0px 25px 0px;
}
label#subject_icon-error {
position: absolute;
bottom: -25px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<?php
$classroom_name = (isset($classroom['classroom_name'])) ? $classroom['classroom_name'] : '';
$course_id = (isset($classroom['course_id'])) ? $classroom['course_id'] : '';
$section_id = (isset($classroom['section_id'])) ? $classroom['section_id'] : '';
$is_active = (isset($classroom['is_active'])) ? $classroom['is_active'] : '';
$action_url = base_url() . 'admin/assign-class-teacher/' . $id;
?>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_l subject_l_full_width">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?></div>
<div class="subject_lhead" style="font-size: 16px;"><?php echo $classroom_name; ?></div>
<hr>
<?php
// echo '<pre>';
// print_r($classroom_subjects);
?>
<form id="classroomfrom" method="post" action="<?= $action_url; ?>">
<div class="form-group assign_subject">
<label>Select Class Teacher Subject <span class="text-danger font-weight-bold">*</span></label>
<!-- <input type="text" name="class"> -->
<select name="subject_id" id="subject_id" class="selectpicker" data-live-search="true" required>
<option value="" data-course_name="">-- Select Option --</option>
<?php foreach ($classroom_subjects as $cs_value) {
$selected = '';
if ($cs_value['is_class_teacher'] == 'yes') {
$selected = 'selected';
}
?>
<option value="<?= $cs_value['subject_id']; ?>" <?= $selected; ?> data-course_name="<?= $cs_value['subject_name']; ?>"><?= $cs_value['subject_name']; ?></option>
<?php
} ?>
</select>
<label id="subject_id-error" class="error" for="subject_id"></label>
</div>
<input type="submit" name="update" value="Update" class="subject_addbtn">
<a href="<?= base_url(); ?>admin/ae-classroom/<?= $id ?>"><button type="button" class=" ml-2 subject_addbtn bg-dark">Back</button></a>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script> -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$('.isClassTeacher').on('change', function(i, v) {
$('.isClassTeacher').not(this).prop('checked', false);
});
</script>
<script>
function toggle(which) {
// var teacherId = $("input[name='teacher_id[which]']").val();
$("input[name='teacher_id[]']").each(function(i, v) {
alert(i);
console.log(v);
});
// console.log(teacherId);
}
</script>
<script>
$(document).ready(function() {
//multiple select js start
$('select').selectpicker();
//multiple select js end
var CName = $('#subject_id :selected').data('course_name')
$("#classroomfrom").validate({
// ignore: "input[type='text']:hidden",
rules: {
classroom_name: {
required: true,
rangelength: [2, 50],
inputregx: true
},
},
messages: {
subject_id: {
required: "Please select class teacher subject"
},
},
});
});
</script>

View File

@ -0,0 +1,443 @@
<style>
.action_subject_addbtn {
background: #032DA4;
border-radius: 35px;
color: #fff;
padding: 5px 15px;
border: none;
font-size: 12px;
cursor: pointer;
text-decoration: none;
}
form label.error, #secNameerr {
color : red;
}
.cierr {
font-size:14px;
}
.form-group .bootstrap-select > .dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
</style>
<div class="wraper responsive-width w-90">
<main class="" id="main">
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<form method="post" action="<?php echo base_url(); ?>admin/assign-optional-subjects" id="assignOptSubToStudentsForm">
<input type="hidden" name="clicked_on" id="clicked_on" value="Filter">
<div class="subject_lsec">
<div class="subject_lhead">
Assign Optional Subjects To The Students ss
<p id="success" style="color:green;"></p>
</div>
<?php
$batchId=''; $courseId=''; $sectionIds='';
if(count($_POST)>0)
{
$batchId = $_POST['filter_by_batch'];
$courseId = $_POST['filter_by_course'];
if(isset($_POST['filter_by_section']) && !empty($_POST['filter_by_section']))
$sectionIds = implode(',',$_POST['filter_by_section']);
}
?>
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">
Batch <span style="font-weight:bold;color:red;"> * </span>
</label>
<select class="form-control" name="filter_by_batch" id="filter_by_batch" onchange="batch_is_changed()">
<option value="">Select Batch</option>
<?php
if (isset($batch) && !empty($batch))
{
foreach ($batch as $row)
{
?>
<option value="<?php echo $row['id'] ?>" <?php if($row['id']==$batchId){?> selected <?php } ?> >
<?php echo $row['b_name']; ?>
</option>
<?php
}
}
?>
</select>
<div id='err_filter_by_batch' class="text-danger cierr"><?php echo form_error('filter_by_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">
Course <span style="font-weight:bold;color:red;"> * </span>
</label>
<select class="form-control" name="filter_by_course" id="filter_by_course" onchange="fetch_sections_of_course('onchange')">
<option value="">Select Course</option>
<?php
if (isset($course) || !empty($course))
{
foreach ($course as $row)
{
?>
<option value="<?php echo $row['id'] ?>" <?php if($row['id']==$courseId){?> selected <?php } ?> >
<?php echo $row['course_name']; ?>
</option>
<?php
}
}
?>
</select>
<div id='err_filter_by_course' class="text-danger cierr"><?php echo form_error('filter_by_course'); ?></div>
</div>
</div>
<div class="col-md-3 pl-0">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Section</label>
<select class="form-control selectpicker" multiple data-live-search="true" name="filter_by_section[]" id="filter_by_section">
<option value="">Select Section</option>
</select>
<div class="text-danger cierr"><?php echo form_error('filter_by_section'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group" style="margin-top: 1.5rem;">
<input type="button" name="filterSubmit" onclick="validate_filter()" id="filter_reset" class="btn btn-success" value="Filter">
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="<?php echo base_url() ?>admin/assign-optional-subjects"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg p-0"><i class="fas fa-redo "></i>Reset</button></a>
</div>
</div>
</div>
<?php if($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php
/*$showHideTable = "style='display:none;'";
if(isset($theResults) && !empty($theResults))
$showHideTable = "style=''"; */
$showHideTableUpdate = "style='display:none;'";
if(isset($theResults) && !empty($theResults) && !empty($theOptSubs))
$showHideTableUpdate = "style='margin-top: 1.5rem;'";
?>
<div id='theTableHere'>
<table id="tbl" class="display table-responsive" >
<thead>
<tr>
<th width='50px;'>Sl No</th>
<th width='50px;'>Roll No</th>
<th width='150px;'>Student Name</th>
<?php
$theColSpan = 3;
if($batchId == $currentBatch)
{
if(!empty($theOptSubs))
{
foreach ($theOptSubs as $osub)
{
$theColSpan++;
?>
<th>
<input type="checkbox" id='chk_unchk_all_<?php echo $osub['id'];?>' onclick="check_uncheck_column(<?php echo $osub['id'];?>)" ><br/>
<?php echo $osub['sub_name'];?>
</th>
<?php
}
}
else
{
$theColSpan++;
?>
<th>No optional subjects present for the selected Batch & Course</th>
<?php
}
}
else
{
$theColSpan++;
?>
<th>Optional Subject Details</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
if(isset($theResults) && !empty($theResults))
{
$slno=1;
foreach ($theResults as $key => $std)
{
$osArr = array();
if($std['the_opt_subjects']!='')
$osArr = explode(',', $std['the_opt_subjects']);
?>
<tr>
<td><?php echo $slno;?></td>
<td><?php echo $std['roll_no'];?></td>
<td><?php echo $std['name'];?></td>
<?php
if($batchId == $currentBatch)
{
if(!empty($theOptSubs))
{
foreach ($theOptSubs as $ss=>$osub)
{
if(empty($osArr))
{
?>
<td>
<input type="checkbox" class='c_uc_os_col_<?php echo $osub['id'];?>' name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='cb_std_<?php echo $std['id']."_".$osub['id'];?>' onclick="manage_the_checkboxes(<?php echo $std['id'];?>, <?php echo $osub['id'];?>)" >
<input type="hidden" class='txt_c_uc_os_col_<?php echo $osub['id'];?>' size="5px" name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='hidden_std_<?php echo $std['id']."_".$osub['id'];?>' value='no'>
</td>
<?php
}
else
{
$checked = ''; $chkVal='no';
if(in_array($osub['id'], $osArr)){
$checked = 'checked';
$chkVal='yes';
}
?>
<td>
<input type="checkbox" class='c_uc_os_col_<?php echo $osub['id'];?>' name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='cb_std_<?php echo $std['id']."_".$osub['id'];?>' <?php echo $checked;?> onclick="manage_the_checkboxes(<?php echo $std['id'];?>, <?php echo $osub['id'];?>)" >
<input type="hidden" class='txt_c_uc_os_col_<?php echo $osub['id'];?>' size="5px" name="student[<?php echo $std['id'];?>][<?php echo $osub['id'];?>]" id='hidden_std_<?php echo $std['id']."_".$osub['id'];?>' value='<?php echo $chkVal;?>'>
</td>
<?php
}
}
}
else
{
?>
<td> - </td>
<?php
}
}
else
{
?>
<td><?php echo $std['the_opt_subject_details'];?></td>
<?php
}
?>
</tr>
<?php
$slno++;
}
}
else
{
?>
<tr>
<td colspan="<?php echo $theColSpan;?>">-- No data to display --</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="col-md-3" >
<div id='tbl-update-btn' class="form-group" <?php echo $showHideTableUpdate;?> >
<input type="button" name="assignSubmit" onclick="submit_the_form_here()" class="btn btn-success" value="Update">
</div>
<div id='tbl-loading-btn' class="form-group" style='display:none;'>
<i class="fa-solid fa-loader"></i>Loading.... Please wait
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
var jsCurrBatch = '<?php echo $currentBatch;?>';
var jsSeldSections = "<?php echo $sectionIds;?>";
$(document).ready(function(){
fetch_sections_of_course('onload');
//table js
/*$('#tbl').DataTable( {
"lengthMenu": [[50, 75, 100, -1], [50, 75, 100, "All"]],
"ordering": false,
});*/
$('#tbl').DataTable( {
"lengthMenu": [[-1], ["All"]],
"ordering": false,
});
//table js end
$('#filter_by_section').selectpicker();
});
function batch_is_changed()
{
$('#filter_by_course').val('');
$('#filter_by_section').empty().selectpicker("refresh");
$('#theTableHere').hide();
}
function fetch_sections_of_course(calledOn)
{
if(calledOn=='onchange')
$('#theTableHere').hide();
$('#filter_by_section').empty().selectpicker("refresh");
var divData = "<option value='' disabled> Select Section </option>";
if($('#filter_by_course').val()!='')
{
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: $('#filter_by_course').val()
},
dataType: "json",
success: function(response) {
//divData += "<option value='' disabled> Select Section </option>";
if(response.sections != '')
{
var ssArr = [];
if(jsSeldSections!='')
ssArr = jsSeldSections.split(",");
$.each(response.sections, function(i, sectiondata) {
if(ssArr.includes(sectiondata.section_id))
divData += "<option value='"+sectiondata.section_id+"' selected >"+sectiondata.section_name+"</option>";
else
divData += "<option value='"+sectiondata.section_id+"'>"+sectiondata.section_name+"</option>";
});
}
else
divData += "<option value=''> -- No Section's Found --</option>";
$('#filter_by_section').append(divData).selectpicker("refresh");
}
});
}
}
function validate_filter()
{
$errCnt=0;
$("#err_filter_by_batch").hide();
$("#err_filter_by_course").hide();
if($('#filter_by_batch').val()=='')
{
$('#err_filter_by_batch').html('Please select the batch.');
$('#err_filter_by_batch').show();
$errCnt++;
}
if($('#filter_by_course').val()=='')
{
$('#err_filter_by_course').html('Please select the course.');
$('#err_filter_by_course').show();
$errCnt++;
}
$('#clicked_on').val('Filter');
if($errCnt==0)
$('#assignOptSubToStudentsForm').submit();
return false;
}
function check_uncheck_column(optSubId)
{
if($('#chk_unchk_all_'+optSubId).prop('checked'))
{
$('.c_uc_os_col_'+optSubId).each(function(){
$(this).prop('checked', true);
});
$('.txt_c_uc_os_col_'+optSubId).each(function(){
$(this).val('yes');
});
}
else
{
$('.c_uc_os_col_'+optSubId).each(function(){
$(this).prop('checked', false);
});
$('.txt_c_uc_os_col_'+optSubId).each(function(){
$(this).val('no');
});
}
}
function manage_the_checkboxes(stdId, osId)
{
if($('#cb_std_'+stdId+'_'+osId).prop('checked'))
$('#hidden_std_'+stdId+'_'+osId).val('yes');
else
$('#hidden_std_'+stdId+'_'+osId).val('no');
}
function submit_the_form_here()
{
$('#clicked_on').val('UpdateData');
$('#assignOptSubToStudentsForm').submit();
$('#tbl-update-btn').hide();
$('#tbl-loading-btn').show();
}
</script>

View File

@ -0,0 +1,193 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<style>
.error {
color: red;
padding-top: 2px;
/* padding-bottom: 5px; */
}
.form-group.assign_subject {
position: relative;
margin: 0px 0px 15px 0px;
}
label#course-error {
position: absolute;
bottom: -25px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec subsec_sec_assign">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title . $subject['subject_name']; ?></div>
<br>
<form id="assignsubjectfrom" method="post" action="<?php echo $action_url . '/' . $subject['id']; ?>" enctype="multipart/form-data">
<div class="subject_lformarea">
<div class="form-group assign_subject">
<label>Assign Subject*</label>
<!-- <select name="subject" id="csubject" class="selectpicker" multiple data-live-search="true"> </select> -->
<input type="text" class="form-control" id="subject" placeholder="Please Enter Subject" value="<?= $subject['subject_name']; ?>" readonly>
<input type="hidden" name="subject_id" value="<?php echo $subject['id'] ?>" ?>
</div>
<div class="form-group assign_subject">
<label>Course*</label>
<select name="course_id" id="course" class="selectpicker course" data-live-search="true">
<option value="">-- Please Select Class --</option>
<?php
if (!empty($courses)) {
foreach ($courses as $course_value) { ?>
<option value="<?php echo $course_value['course_id']; ?>"><?php echo $course_value['course_name']; ?>
</option>
<?php }
}
?>
</select>
</div>
<div class="sub_syllabus d-none">
<label class="view_syllabus"></label>
<label class="text-danger" style="font-size:10px"> ** Accepted Only JPG,PNG and PDF (Max : 5MB) </label>
<br><div class="upload-doc upload-doc-img">
<input type="file" name="syllabus" id="tpic" class="form-control">
<label for="tpic" class="upload-btn" id="uploadBtn">Browse Syllabus</label>
<p id="tpic_error" style="color:red;"></p>
<p id="success" style="color:green;"></p>
</div>
</div>
<div class="d-flex">
<button type="submit" class="subject_addbtn">Assign</button>
<a href="<?= base_url(); ?>admin/subject"><button type="button" class=" ml-2 subject_addbtn bg-dark">Back</button></a>
</div>
</div>
</form>
</div>
</div>
<div class="subject_r subject_r_table">
<div class="subject_lsec">
<hr>
<table class="display table table-responsive" id="tbl">
<thead>
<tr>
<th>SNO</th>
<th>Course Name</th>
<th>Syllabus</th>
</tr>
</thead>
<tbody>
<?php
$sno = 1;
foreach ($syllabuslist as $s_value) { ?>
<tr>
<td><?php echo $sno; ?></td>
<td><?php echo $s_value['course_name']; ?></td>
<td><a href="<?php echo base_url() . $s_value['syllabus']; ?>" target="_blank">View</a></td>
</tr>
<?php $sno++;
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
</div>
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script> -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[5, 10, 15, -1],
[5, 10, 15, "All"]
]
});
//table js end
});
$(document).ready(function() {
$('#course').change(function() {
var selectvalue = $(this).val();
if (selectvalue != '') {
// alert(selectvalue);
var subjectId = <?php echo $subject['id'] ?>;
$.ajax({
url: "<?= base_url() ?>admin/checksyllabus",
data: {
subject_id: subjectId,
course_id: selectvalue
},
type: 'POST',
async: false,
success: function(response) {
console.log(response);
var base_url = "<?php echo base_url(); ?>";
if (response != 0)
$('.view_syllabus').html("<a href='" + base_url + response + "' target='_blank' >View Syllabus</a>");
}
});
$('.sub_syllabus').removeClass('d-none');
} else {
$('.sub_syllabus').addClass('d-none');
}
});
$("#assignsubjectfrom").validate({
ignore: "input[type='text']:hidden",
rules: {
subject_id: {
required: true
},
course_id: {
required: true
},
syllabus: {
required: true
}
},
messages: {
subject_id: {
required: "Please enter subject name ",
},
course_id: {
required: "Please Select Course",
},
syllabus: {
required: "Please upload Syllabus",
},
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>

View File

@ -0,0 +1,255 @@
<style>
.subject-filter {
margin-right: 10px;
width: 290px;
}
button.btn.btn-success.btn-sm {
padding: 8px;
}
p.text-danger {
color: red;
}
.top-filter {
display: flex;
font-size: 15px;
margin-bottom: 35px;
align-items: flex-end;
color: red;
}
.subject_addbtn1 {
background: #032da1;
border-radius: 3px;
color: #fff;
padding: 3px 38px;
border: none;
font-size: 16px;
cursor: pointer;
}
.cierr {
font-size: 14px;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="from-group adding-class form-group_lng">
<?php $classroom_id = (!empty($classroomid)) ? $classroomid : 0; ?>
</div>
<div class="row displaydata">
<div class="col-md-6 pull-left">
<a href="<?= base_url(); ?>admin/classroom" class="pull-left"><button type="button" class="btn subject_addbtn1 bg-dark">Back</button></a>
</div>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<form method="POST" action="<?php echo base_url() . 'Admin/assignedtoclassroom' ?>" id="studentsfilterform">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<div class="date-fil-row">
<select id="batch_filter" class="form-control batch_filter" name="batch_filter" placeholder="Select Batch">
<option value="">-- Select Batch --</option>
<?php foreach ($batch_list as $b_value) {
?>
<option value="<?php echo $b_value['id'] ?>" <?= $school_info['batch_id'] == $b_value['id'] ? 'selected' : '' ?>><?php echo $b_value['b_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="text-danger cierr"><?php echo form_error('batch_filter'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<div class="date-fil-row">
<select class="form-control course_filter" name="course_filter" placeholder="Select Course" id="course_filter" readonly>
<option value="">-- Select Course --</option>
<?php foreach ($course_list as $c_value) {
if ($course_id == $c_value['id']) { ?>
<option value="<?php echo $c_value['id'] ?>" selected><?php echo $c_value['course_name'] ?></option>
<?php }
}
echo 'course -' . $course_id; ?>
</select>
</div>
<div class="text-danger cierr"><?php echo form_error('filter-Edate'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<select id="section_filter" class="form-control section_filter" name="section_filter" placeholder="Select Section" onchange="reload_unsigned_students()">
<option value="">-- Select Section --</option>
</select>
<div class="text-danger cierr"><?php echo form_error('section_filter'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<button type="submit" name="assignto" class="btn btn-success btn-sm w-70" value="assigntoclassroom">Assign To Classroom</button>
<a href="<?php echo base_url(); ?>admin/assign-to-classroom/<?php echo $back_url; ?>" class="p-0"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg p-0"><i class="fas fa-redo"></i>Reset</button></a>
<div class="text-danger cierr"><?php echo form_error('student_list[]'); ?></div>
</div>
</div>
</div>
<div id="results"></div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script type="text/javascript">
function autoselect_course() {
reload_unsigned_students();
var div_data = "<option value=''> -- Select Section-- </option>";
var course_id = $('#course_filter').val();
$('#section_filter').html("");
// alert(course_id);
if (course_id != '') {
$.ajax({
type: "post",
url: "<?php echo base_url('Admin/getsectionsbyCourse'); ?>",
data: {
courseid: course_id
},
dataType: "json",
success: function(response) {
console.log(response);
if (response != "") {
$.each(response, function(index, data) {
div_data += "<option value=" + data.section_id + ">" + data.section_name + "</option>";
});
}
$('#section_filter').append(div_data);
}
});
}
}
function reload_unsigned_students() {
var values = $('#studentsfilterform').serialize();
urlVal = '<?php echo base_url(); ?>Admin/ajaxstudentfilters';
$.ajax({
type: "POST",
url: urlVal,
data: values,
success: function(result) {
console.log(result);
result = result.trim();
$('#results').empty();
$('#results').html(result);
}
});
}
$(document).ready(function() {
autoselect_course();
// reload_unsigned_students();
var sectionId = 0,
sectionName = "No Sections Found";
$('#course_filter').change(function() {
reload_unsigned_students();
var div_data = "<option value=''> -- Select Section-- </option>";
var course_id = $(this).val();
$('#section_filter').html("");
// alert(course_id);
if (course_id != '') {
$.ajax({
type: "post",
url: "<?php echo base_url('Admin/getsectionsbyCourse'); ?>",
data: {
courseid: course_id
},
dataType: "json",
success: function(response) {
console.log(response);
if (response != "") {
$.each(response, function(index, data) {
div_data += "<option value=" + data.section_id + ">" + data.section_name + "</option>";
});
}
$('#section_filter').append(div_data);
}
});
}
});
$("#batch_filter").change(function() {
reload_unsigned_students();
});
});
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success_msg']); ?>
<?php unset($_SESSION['error_msg']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,610 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.error {
color: red;
font-size: 12px;
}
input[type="number"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 160px;
}
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.course_grade_details_table input[type="text"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
}
.course_grade_details_table input[type="number"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 90px;
}
.course_grade_details_table td,
.course_grade_details_table th {
border: 0;
padding: 15px 10px;
}
.course_grade_details_table {
border: 0;
}
.course_grade_details_table td {
text-align: left;
padding: 8px 10px;
}
.course_grade_details_table th {
font-weight: 300;
font-size: 15px;
color: black;
border-bottom: 2px solid #032da1;
}
.scrollable_table thead {
display: table;
width: 100%;
}
.scrollable_table tbody {
display: block;
overflow-y: scroll;
max-height: 400px;
}
.scrollable_table th,
.scrollable_table td {
width: 130px;
font-size: 12px;
}
.scrollable_table tr {
display: table;
width: 100%;
box-sizing: border-box;
}
.scrollable_table th:nth-child(1),
.scrollable_table td:nth-child(1) {
width: 42px;
}
span.margin-t {
margin-top: 5px;
display: block;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="from-group adding-class form-group_lng">
<!-- <a href="<?= base_url(); ?>admin/scholarship-types" class="">
<button type="button" class="btn subject_addbtn btn-sm">Scholarship Types</button>
</a>
<a href="<?= base_url(); ?>admin/scholarship" class="ml-4">
<button type="button" class="btn subject_addbtn btn-sm">Assign Scholarship</button>
</a> -->
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<div class="subsec_sec" style="display:block">
<form id="searchFilters" action="<?= base_url(); ?>admin/assign-due-fees" method="POST" onkeydown=" return event.key != 'Enter'">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
// $f_f_types = array();
$currency_symbol = $school_info['currency_symbol'];
$search_batch = (isset($_POST['f_batch']) && !empty($_POST['f_batch'])) ? $_POST['f_batch'] : '';
$search_course_id = (isset($_POST['f_course']) && !empty($_POST['f_course'])) ? $_POST['f_course'] : '';
$search_section = (isset($_POST['f_section']) && !empty($_POST['f_section'])) ? $_POST['f_section'] : '';
// $search_fee_types = (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types'])) ? $_POST['filter_fee_types'] : '';
$theExportHeader = 'Scholarships';
// if (isset($school_info) && !empty($school_info)) {
// $theExportHeader = $school_info['school_name'] . '\n' . $school_info['address'] . '\n Scholarships';
// }
// if (count($_POST) > 0) {
// if (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types'])) {
// $f_f_types = $_POST['filter_fee_types'];
// }
// }
// print_r($_POST);
?>
</div>
<div class="subject_lhead">Opening Balance</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="subject-filter">
<label>Select Batch <span style="font-weight:bold;color:red;"> * </span></label>
<select id="f_batch" name="f_batch" class=" form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
if ($search_batch != '')
$b_selected = ($row['id'] == $search_batch) ? 'selected' : '';
else
$b_selected = ($row['id'] == $school_info['batch_id']) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('f_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<label>Select Course <span style="font-weight:bold;color:red;"> * </span></label>
<select id="f_course" name="f_course" class=" form-control">
<option value="">Select Course</option>
<?php foreach ($course as $c_value) {
$course_selected = ($c_value['id'] == $search_course_id) ? 'selected' : '';
?>
<option value="<?= $c_value['id']; ?>" <?= $course_selected; ?>><?php echo $c_value['course_name']; ?> </option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class=" form-group subject-filter">
<label>Select Section</label>
<?php if ($search_course_id != '' && $search_course_id > 0) {
$sql = "SELECT s.id as section_id,s.section_name FROM course_sections cs JOIN section s ON s.id=cs.section_id WHERE cs.course_id='$search_course_id' ORDER BY s.id DESC";
$section_list = $this->Admin_model->get_query_result($sql);
?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
if (isset($section_list) && !empty($section_list)) {
foreach ($section_list as $se_val) { ?>
<option value="<?php echo $se_val['section_id'] ?>" <?php if (isset($search_section) && !empty($search_section)) {
echo (in_array($se_val['section_id'], $search_section)) ? 'selected' : '';
} ?>><?php echo $se_val['section_name'] ?></option>
<?php }
} ?>
</select>
<?php } else { ?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
</select>
<?php } ?>
</div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4">
<input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success " style="width:250px;height:40px;" value="Filter">
<a href="<?php echo base_url() ?>admin/total-due-report">
<div class="date-filter"> <button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" table_div">
<!-- changed ID -->
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>Student Id </th>
<th>Student Name</th>
<th>Roll No</th>
<th>Course</th>
<th>Section</th>
<th>Contact No</th>
<th>Amount (in Rs.)</th>
</tr>
</thead>
<tbody>
<?php
//dd($student_fees);
$sno = 1;
if (isset($student_fees) && !empty($student_fees)) {
foreach ($student_fees as $svalue) {
// echo '<pre>';
// print_r($svalue);
$amount = 0;
$cfId = 0;
if (isset($student_opening_balance) && count($student_opening_balance) != 0) {
foreach ($student_opening_balance as $sob) {
if ($sob['student_id'] == $svalue['student_id']) {
// print_r($sob);
$amount = $sob['amount'];
$cfId = $sob['course_fee_id'];
}
}
}
?>
<tr>
<td><?= $svalue['studentId']; ?></td>
<td><?= $svalue['student_name']; ?></td>
<td><?= $svalue['roll_no']; ?></td>
<td><?= $svalue['course_name']; ?></td>
<td><?= $svalue['section_name']; ?></td>
<td><?= $svalue['emergency_contact_number']; ?></td>
<td colspan="2">
<input type="hidden" class="form-control w-50 m-auto text-center" name="course_fee[<?= $svalue["student_id"]; ?>]" value="<?= $cfId != 0 ? $cfId : '' ?>">
<input type="hidden" class="form-control w-50 m-auto text-center" name="student_course[<?= $svalue["student_id"]; ?>]" value="<?= $svalue['course_id']; ?>">
<input type="hidden" class="form-control w-50 m-auto text-center" name="student_section[<?= $svalue["student_id"]; ?>]" value="<?= $svalue['section_id']; ?>">
<input type="hidden" class="form-control w-50 m-auto text-center" name="student_batch[<?= $svalue["student_id"]; ?>]" value="<?= $svalue['batch_id']; ?>">
<input type="number" min="0" placeholder="Amount" name='opening_balance[<?= $svalue["student_id"]; ?>]' value="<?= isset($amount) ? $amount : '' ?>">
</td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
<input type="submit" name="save" id="save_scholarship" class="btn subject_addbtn btn-sm " style="width:250px;height:40px;" value="Save">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
// function formOnEnter() {
// $(this).next('input').focus();
// }
$('input').on("keydown", function(e) {
/* ENTER PRESSED*/
console.log(e.keyCode);
if (e.keyCode == 13) {
/* FOCUS ELEMENT */
var inputs = $(this).parents("form").eq(0).find(":input[type='number']");
var idx = inputs.index(this);
if (idx == inputs.length - 1) {
inputs[0].select()
} else {
inputs[idx + 1].focus(); // handles submit buttons
inputs[idx + 1].select();
}
e.preventDefault();
return false;
} else {
return true;
// e.preventDefault();
}
});
$('#save_scholarship').click(function() {
$('#searchFilters').submit();
});
// Reusable helper functions
const calculateSale = (feePrice, discount) => {
feePrice = parseFloat(feePrice);
discount = parseFloat(discount);
return (feePrice * discount / 100).toFixed(2); // Final price
}
const calculateDiscount = (feePrice, finalPrice) => {
feePrice = parseFloat(feePrice);
finalPrice = parseFloat(finalPrice);
return (finalPrice * 100 / feePrice).toFixed(2); // Discount percentage
}
function perToAmount(discount, scholarshipAmountFieldName, feeAmount, selectId) {
console.log(discount + ' =============> ' + scholarshipAmountFieldName);
$('input[name="' + scholarshipAmountFieldName + '"]').val(calculateSale(feeAmount, discount));
$('#' + selectId).attr('required', 'required');
// console.log(calculateSale(feeAmount, discount));
}
function amountToPer(amount, scholarshipPercentageName, feeAmount) {
// console.log(discount + ' =============> ' + scholarshipAmountFieldName);
$('input[name="' + scholarshipPercentageName + '"]').val(calculateDiscount(feeAmount, amount));
$('#' + selectId).attr('required', true);
// console.log(calculateSale(feeAmount, discount));
}
// $('input[name^="scholarshipPercentage"]').change(function(event) {
// $('input').attr('name', $('input').attr('name'))
// console.log($('input').attr('name'));
// // console.log(event.target);
// // $('input[name^="scholarshipPercentage"]').val(1000);
// var index = $('input[name^="scholarshipPercentage"]').index(this);
// studentId = $('input[name^="studentId"]').val();
// var totalFeeAmount = $('input[name^="totalFee"]').val();
// $('input[name^="scholarshipPercentage"]').each(function(index, elem) {
// console.log('Index = ' + index + 'Eleam =======> ');
// $('input[name="scholarshipAmount[' + index + ']"]', index).val(1000);
// console.log($('input[name^="scholarshipPercentage"]').is(':focus'));
// // $(".val2", elem).val(parseInt($(".val1", elem).val()) * parseInt($("#value").val()));
// });
// alert('Index =======> ' + index + ' Student Id =======> ' + studentId + ' Total Fee Amount =======> ' + totalFeeAmount);
// });
// Init!
// $totalFee.trigger('input');
</script>
<script>
// checkFeeType();
// $("#filter_fee_types option[value='3']").prop('disabled', true);
// $("#filter_fee_types option[value='4']").prop('disabled', true);
// $("#filter_fee_types option[value='8']").prop('disabled', true);
// const intersection = TotalValues.filter(element => selectedValues.includes(element));
// const differValues = TotalValues.filter(element => !selectedValues.includes(element));
function checkFeeType() {
}
$('#filter_fee_types').change(function() {
$('#filter_fee_types').selectpicker('toggle');
$('#new-dropdown-section').addClass('d-none');
var TotalValues = [];
var selectedValues = [];
$('#filter_fee_types option').each(function() {
let item = $(this).val();
if (item != '') {
TotalValues.push(item);
}
});
$('#filter_fee_types option:selected').each(function() {
let selectItem = $(this).val();
if (selectItem != '')
selectedValues.push(selectItem);
});
const intersection = TotalValues.filter(element => selectedValues.includes(element));
const differValues = TotalValues.filter(element => !selectedValues.includes(element));
// console.log(intersection);
// console.log(differValues);
if (intersection.length > 0) {
var divData1 = '';
if (intersection.includes("3") || intersection.includes("4") || intersection.includes("8")) {
for (let i = 0; i < intersection.length; i++) {
if (intersection[i] == '4') {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_routes_by_batch_course",
method: "GET",
dataType: "json",
success: function(res) {
// console.log(res.routes);
// #new-dropdown-section
$('#new-dropdown-section').removeClass('d-none');
divData1 += "<label class='mb-0' style='font-size: 13px;margin-bottom: 4px !important;'> Routes <span class='text-danger'></span></label><select class='form-control' name='filter-route-id' id='filter-route-id' >";
divData1 += "<option value='' disabled> Select Routes </option>";
if (res.routes != '') {
$.each(res.routes, function(i, routedata) {
// console.log(routedata.id+"="+routedata.route_name);
divData1 += "<option value='" + routedata.id + "'>" + routedata.route_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData1 += "<option value=''> -- No Route's Found --</option>";
}
divData1 += "</select>"
$('#new-dropdown-section').empty().append(divData1);
}
});
} else if (intersection[i] == '3') {
} else if (intersection[i] == '8') {
}
for (let j = 0; j < differValues.length; j++) {
$("#filter_fee_types option[value='" + differValues[j] + "']").prop('disabled', true);
}
$("#filter_fee_types option[value='" + intersection[i] + "']").prop('disabled', false);
}
} else {
$("#filter_fee_types option[value='3']").prop('disabled', true);
$("#filter_fee_types option[value='4']").prop('disabled', true);
$("#filter_fee_types option[value='8']").prop('disabled', true);
}
} else {
$("#filter_fee_types option").prop('disabled', false);
}
});
$(document).ready(function() {
$("#searchFilters").validate({
rules: {
f_batch: 'required',
f_course: 'required',
"filter_fee_types[]": {
required: true
},
},
submitHandler: function(form, e) {
e.preventDefault();
form.submit();
}
});
});
$('#f_course').change(function() {
var course = $('#f_course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#f_section').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[-1],
["All"]
],
"dom": 'lBfrtip',
"buttons": []
});
$('#f_section').selectpicker();
$('#f_feetype').selectpicker();
});
</script>
</body>
</html>

View File

@ -0,0 +1,226 @@
<style>
.displaydata {
width: 100% !important;
}
.subject_addbtn {
background: #032da1;
border-radius: 3px;
color: #fff;
padding: 3px 38px;
border: none;
font-size: 16px;
cursor: pointer;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="displaydata pt-5 form-group_lng" style="display:flex">
<div class="col-md-6 pull-left" style="padding:0">
<a href="<?= base_url(); ?>admin/assign-students/<?php echo $classroomid ?>" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a>
</div>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>S.No.</th>
<th>Student Id</th>
<th>Photo</th>
<th>Name</th>
<th>Batch</th>
<th>Registration No.</th>
</tr>
</thead>
<tbody>
<?php
$sno = 1;
// echo "<pre>";
// print_r($student_list);
// die();
foreach ($student_list as $student) {
if (empty($student['photo'])) {
$profile_path = base_url() . "common_assets/user.png";
} else if (file_exists('assets_student/application/' . $student['photo'])) {
$profile_path = base_url() . "assets_student/application/" . $student['photo'];
} else {
if ($student['gender'] == 'Male' || $student['gender'] == 'male')
$profile_path = base_url() . "common_assets/male_image.jpg";
else
$profile_path = base_url() . "common_assets/female_image.jpg";
}
?>
<tr>
<td><?= $sno; ?></td>
<td class="text-left"><?= $student['studentId']; ?></td>
<td> <img src="<?= $profile_path; ?>" class="student_img_list" /></td>
<td class="text-left"><?= $student['name']; ?></td>
<td>
<?php
$batch = $this->db->get_where('batch', array('id' => $student['student_batch']))->row_array();
echo $batch['b_name'];
?>
</td>
<td>
<input type="text" class="form-control w-100 m-auto text-center rolls" onchange="check_data(this)" name="registration_no[]" value="<?= $student['registration_no']; ?>" max="3">
<input type="hidden" class="form-control w-100 m-auto text-center" name="student_batchid[]" value="<?= $student['stud_batch_id']; ?>">
</td>
</tr>
<?php $sno++;
}
?>
</tbody>
<tfoot>
<tr>
<th colspan="5"></th>
<th>
<div class="float-right w-100">
<button class="btn btn-md btn-info w-100 update_roll">Update Registration No</button>
</div>
</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<form method="post" id="update_rollNumber" action="<?php echo base_url('admin/registration-number/' . $encrepted_clas); ?>">
<input type="hidden" name="registration_numbers" class="registration_numbers">
<input type="hidden" name="batch_ids" class="batch_id">
</form>
</div>
</div>
</main>
</div>
<script>
// $('input').on("keydown", function(e) {
// /* ENTER PRESSED*/
// console.log(e.keyCode);
// if (e.keyCode == 13) {
// /* FOCUS ELEMENT */
// var inputs = $(this).parents("form").eq(0).find(":input[type='text']");
// var idx = inputs.index(this);
// if (idx == inputs.length - 1) {
// inputs[0].select()
// } else {
// inputs[idx + 1].focus(); // handles submit buttons
// inputs[idx + 1].select();
// }
// e.preventDefault();
// return false;
// } else {
// return true;
// // e.preventDefault();
// }
// });
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[-1],
["All"]
],
paging: false,
info: false
});
//table js end
});
function check_data(data) {
var $regexname = /^([0-9]{1,3})$/;
// if (!data.value.match($regexname)) {
// data.value = data.defaultValue;
// alert("Please Enter only Positive number or Length should be 3");
// return false;
// }
// if (data.value == 0) {
// data.value = data.defaultValue;
// alert("Zero should not be Enter");
// return false;
// }
}
$('.update_roll').on('click', function() {
let arr = [];
let batch = [];
var registration_no = $("input[name='registration_no[]']")
.each(function() {
arr.push($(this).val());
});
$("input[name='student_batchid[]']")
.each(function() {
batch.push($(this).val());
});
arr = arr.filter(function(e) {
return e
});
const toFindDuplicates = arr => arr.filter((item, index) => arr.indexOf(item) !== index);
let duplicateElementa = toFindDuplicates(arr);
if (duplicateElementa.length > 0) {
alert(' You have dublicate elements ' + duplicateElementa.toString());
return;
} else {
// console.log(arr);
$('.registration_numbers').val(arr);
$('.batch_id').val(batch);
$('#update_rollNumber').submit();
}
});
</script>
<script type="text/javascript">
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success_msg']); ?>
<?php unset($_SESSION['error_msg']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,197 @@
<style>
.displaydata {
width: 100% !important;
}
.subject_addbtn {
background: #032da1;
border-radius: 3px;
color: #fff;
padding: 3px 38px;
border: none;
font-size: 16px;
cursor: pointer;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="displaydata pt-5 form-group_lng" style="display:flex">
<div class="col-md-6 pull-left" style="padding:0">
<a href="<?= base_url(); ?>admin/assign-students/<?php echo $classroomid ?>" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a>
</div>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>S.No</th>
<th>Roll No.</th>
<th>Student Id</th>
<th>Photo</th>
<th>Name</th>
<th>Batch</th>
</tr>
</thead>
<tbody>
<?php
$sno = 1;
// echo "<pre>";
// print_r($student_list);
// die();
foreach ($student_list as $student) {
if (empty($student['photo'])) {
$profile_path = base_url() . "common_assets/user.png";
} else if (file_exists('assets_student/application/' . $student['photo'])) {
$profile_path = base_url() . "assets_student/application/" . $student['photo'];
} else {
if ($student['gender'] == 'Male' || $student['gender'] == 'male')
$profile_path = base_url() . "common_assets/male_image.jpg";
else
$profile_path = base_url() . "common_assets/female_image.jpg";
}
?>
<tr>
<td><?= $sno; ?></td>
<td>
<input type="number" class="form-control w-50 m-auto text-center rolls" onchange="check_data(this)" name="roll_no[]" value="<?= $student['roll_no']; ?>" max="3">
<input type="hidden" class="form-control w-50 m-auto text-center" name="student_batchid[]" value="<?= $student['stud_batch_id']; ?>">
</td>
<td><?= $student['studentId']; ?></td>
<td> <img src="<?= $profile_path; ?>" class="student_img_list" /></td>
<td><?= $student['name']; ?></td>
<td>
<?php
$batch = $this->db->get_where('batch', array('id' => $student['student_batch']))->row_array();
echo $batch['b_name'];
?>
</td>
</tr>
<?php $sno++;
}
?>
</tbody>
<tfoot>
<tr>
<th colspan="5"></th>
<th>
<div class="float-right w-100">
<button class="btn btn-md btn-info w-100 update_roll">Update Roll No</button>
</div>
</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<form method="post" id="update_rollNumber" action="<?php echo base_url('admin/roll-change/' . $encrepted_clas); ?>">
<input type="hidden" name="roll_numbers" class="roll_numbers">
<input type="hidden" name="batch_ids" class="batch_id">
</form>
</div>
</div>
</main>
</div>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[-1],
["All"]
],
paging: false,
info: false
});
//table js end
});
function check_data(data) {
var $regexname = /^([0-9]{1,3})$/;
if (!data.value.match($regexname)) {
data.value = data.defaultValue;
alert("Please Enter only Positive number or Length should be 3");
return false;
}
if (data.value == 0) {
data.value = data.defaultValue;
alert("Zero should not be Enter");
return false;
}
}
$('.update_roll').on('click', function() {
let arr = [];
let batch = [];
var roll_no = $("input[name='roll_no[]']")
.each(function() {
arr.push($(this).val());
});
$("input[name='student_batchid[]']")
.each(function() {
batch.push($(this).val());
});
const toFindDuplicates = arr => arr.filter((item, index) => arr.indexOf(item) !== index);
let duplicateElementa = toFindDuplicates(arr);
if (duplicateElementa.length > 0) {
alert(' You have dublicate elements ' + duplicateElementa.toString());
return;
} else {
$('.roll_numbers').val(arr);
$('.batch_id').val(batch);
$('#update_rollNumber').submit();
}
});
</script>
<script type="text/javascript">
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success_msg']); ?>
<?php unset($_SESSION['error_msg']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,200 @@
<style>
.displaydata {
width: 100% !important;
}
.subject_addbtn {
background: #032da1;
border-radius: 3px;
color: #fff;
padding: 3px 38px;
border: none;
font-size: 16px;
cursor: pointer;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="displaydata pt-5 form-group_lng" style="display:flex">
<div class="col-md-5 pull-left" style="padding:0">
<a href="<?= base_url(); ?>admin/classroom" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a>
</div>
<div class="col-md-7 pull-right text-right" style="padding:0">
<?php $classroom_id = (!empty($classroomid)) ? $classroomid : 0;
$cls_id = urlsafe_b64encode($classroomid . '-qqcksbvlwierhwjerw');
?>
<a href="<?= base_url(); ?>admin/symbol-number/<?php echo $cls_id ?>" class="pull-right btn btn-outline-primary btn-sm">Symbol Number</a>
<a href="<?= base_url(); ?>admin/registration-number/<?php echo $cls_id ?>" class="pull-right btn btn-outline-primary btn-sm">Registration Number</a>
<a href="<?= base_url(); ?>admin/roll-change/<?php echo $cls_id ?>" class="pull-right"><button type="button" class="btn btn-outline-primary btn-sm">Roll Number</button></a>
<a href="<?= base_url(); ?>admin/assign-to-classroom/<?php echo $cls_id ?>" class="pull-right"><button type="button" class="btn btn-outline-primary btn-sm">Assign to classroom</button></a>
</div>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>S.No.</th>
<th>Roll No.</th>
<th>Student Id</th>
<th>Photo</th>
<th>Name</th>
<th>Email</th>
<th>Contact</th>
<th>Course</th>
<th>Batch</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$sno = 1;
// echo "<pre>";
// print_r($student_list);
// die();
foreach ($student_list as $student) {
if (empty($student['photo'])) {
$profile_path = base_url() . "common_assets/user.png";
} else if (file_exists('assets_student/application/' . $student['photo'])) {
$profile_path = base_url() . "assets_student/application/" . $student['photo'];
} else {
if ($student['gender'] == 'Male' || $student['gender'] == 'male')
$profile_path = base_url() . "common_assets/male_image.jpg";
else
$profile_path = base_url() . "common_assets/female_image.jpg";
}
?>
<tr>
<td><?= $sno; ?></td>
<td><?= $student['roll_no']; ?></td>
<td class="text-left"><?= $student['studentId']; ?></td>
<td> <img src="<?= $profile_path; ?>" class="student_img_list" /></td>
<td class="text-left"><?= $student['name']; ?></td>
<td class="text-left"><?= $student['email']; ?></td>
<td class="text-left"><?= $student['mobile']; ?></td>
<td>
<?php
$course_name = $this->db->get_where('course', array('id' => $student['course']))->row()->course_name;
echo (!empty($course_name)) ? $course_name : ''; ?>
</td>
<td>
<?php
$batch = $this->db->get_where('batch', array('id' => $student['student_batch']))->row_array();
echo $batch['b_name'];
?>
</td>
<td>
<a href="<?php echo base_url(); ?>admin/view_student/<?php echo $student['id']; ?>" class="p-1" data-toggle="tooltip" title="view Profile">
<i class="fa fa-eye fa-lg" aria-hidden="true"></i>
</a>
<span class="text-danger" data-toggle="tooltip" onclick="removestudent(<?php echo $student['id']; ?>,<?= $student['batch_id']; ?>,<?= $classroom_id; ?>)" title="Remove from Classroom">
<i class="fa fa-times fa-lg" aria-hidden="true"></i>
</span>
</td>
</tr>
<?php $sno++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type="hidden" id="student_id" />
<input type="hidden" id="batch_id" />
<input type="hidden" id="classroom_id" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#student_id').val(),$('#batch_id').val(),$('#classroom_id').val());">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
function removestudent(stud_id, batch_id, classroom_id) {
$('#student_id').val(stud_id);
$('#batch_id').val(batch_id);
$('#classroom_id').val(classroom_id);
$('#deleteModal').modal('show');
}
function deletedata(student_id, btach_id, classroom_id) {
window.location.href = "<?php echo base_url(); ?>Admin/remove_classroom_student/" + student_id + "/" + btach_id + "/" + classroom_id;
}
</script>
<script type="text/javascript">
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success_msg']); ?>
<?php unset($_SESSION['error_msg']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,226 @@
<style>
.displaydata {
width: 100% !important;
}
.subject_addbtn {
background: #032da1;
border-radius: 3px;
color: #fff;
padding: 3px 38px;
border: none;
font-size: 16px;
cursor: pointer;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="displaydata pt-5 form-group_lng" style="display:flex">
<div class="col-md-6 pull-left" style="padding:0">
<a href="<?= base_url(); ?>admin/assign-students/<?php echo $classroomid ?>" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a>
</div>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>S.No</th>
<th>Student Id</th>
<th>Photo</th>
<th>Name</th>
<th>Batch</th>
<th>Symbol No.</th>
<th>Registration No.</th>
</tr>
</thead>
<tbody>
<?php
$sno = 1;
// echo "<pre>";
// print_r($student_list);
// die();
foreach ($student_list as $student) {
if (empty($student['photo'])) {
$profile_path = base_url() . "common_assets/user.png";
} else if (file_exists('assets_student/application/' . $student['photo'])) {
$profile_path = base_url() . "assets_student/application/" . $student['photo'];
} else {
if ($student['gender'] == 'Male' || $student['gender'] == 'male')
$profile_path = base_url() . "common_assets/male_image.jpg";
else
$profile_path = base_url() . "common_assets/female_image.jpg";
}
?>
<tr>
<td><?= $sno; ?></td>
<td><?= $student['studentId']; ?></td>
<td> <img src="<?= $profile_path; ?>" class="student_img_list" /></td>
<td><?= $student['name']; ?></td>
<td>
<?php
$batch = $this->db->get_where('batch', array('id' => $student['batch_id']))->row_array();
$b_from = (isset($batch['b_from'])) ? $batch['b_from'] : '';
$b_end = (isset($batch['b_end'])) ? $batch['b_end'] : '';
echo isset($batch['b_end']) ? $batch['b_name'] : '-';
?>
</td>
<td>
<input type="text" class="form-control w-100 m-auto text-center rolls" onchange="check_data(this)" name="symbol_no[]" value="<?= $student['symbol_no']; ?>" max="3">
<input type="hidden" class="form-control w-100 m-auto text-center" name="student_batchid[]" value="<?= $student['stud_batch_id']; ?>">
</td>
</tr>
<?php $sno++;
}
?>
</tbody>
<tfoot>
<tr>
<th colspan="5"></th>
<th>
<div class="float-right w-100">
<button class="btn btn-md btn-info w-100 update_roll">Update Roll No</button>
</div>
</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<form method="post" id="update_rollNumber" action="<?php echo base_url('admin/symbol-number/' . $encrepted_clas); ?>">
<input type="hidden" name="symbol_numbers" class="symbol_numbers">
<input type="hidden" name="batch_ids" class="batch_id">
</form>
</div>
</div>
</main>
</div>
<script>
// $('input').on("keydown", function(e) {
// /* ENTER PRESSED*/
// console.log(e.keyCode);
// if (e.keyCode == 13) {
// /* FOCUS ELEMENT */
// var inputs = $(this).parents("form").eq(0).find(":input[type='text']");
// var idx = inputs.index(this);
// if (idx == inputs.length - 1) {
// inputs[0].select()
// } else {
// inputs[idx + 1].focus(); // handles submit buttons
// inputs[idx + 1].select();
// }
// e.preventDefault();
// return false;
// } else {
// return true;
// // e.preventDefault();
// }
// });
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[-1],
["All"]
],
paging: false,
info: false
});
//table js end
});
function check_data(data) {
var $regexname = /^([0-9]{1,3})$/;
// if (!data.value.match($regexname)) {
// data.value = data.defaultValue;
// alert("Please Enter only Positive number or Length should be 3");
// return false;
// }
// if (data.value == 0) {
// data.value = data.defaultValue;
// alert("Zero should not be Enter");
// return false;
// }
}
$('.update_roll').on('click', function() {
let arr = [];
let batch = [];
var symbol_no = $("input[name='symbol_no[]']")
.each(function() {
arr.push($(this).val());
});
$("input[name='student_batchid[]']")
.each(function() {
batch.push($(this).val());
});
const toFindDuplicates = arr => arr.filter((item, index) => arr.indexOf(item) !== index);
let duplicateElementa = toFindDuplicates(arr);
if (duplicateElementa.length > 0) {
alert(' You have dublicate elements ' + duplicateElementa.toString());
return;
} else {
console.log(arr);
$('.symbol_numbers').val(arr);
$('.batch_id').val(batch);
$('#update_rollNumber').submit();
}
});
</script>
<script type="text/javascript">
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success_msg']); ?>
<?php unset($_SESSION['error_msg']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,225 @@
<style>
.displaydata {
width: 100% !important;
}
.subject_addbtn {
background: #032da1;
border-radius: 3px;
color: #fff;
padding: 3px 38px;
border: none;
font-size: 16px;
cursor: pointer;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="displaydata pt-5 form-group_lng" style="display:flex">
<div class="col-md-6 pull-left" style="padding:0">
<a href="<?= base_url(); ?>admin/assign-students/<?php echo $classroomid ?>" class="pull-left"><button type="button" class="btn subject_addbtn bg-dark">Back</button></a>
</div>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>S.No.</th>
<th>Student Id</th>
<th>Photo</th>
<th>Name</th>
<th>Batch</th>
<th>Symbol No.</th>
</tr>
</thead>
<tbody>
<?php
$sno = 1;
// echo "<pre>";
// print_r($student_list);
// die();
foreach ($student_list as $student) {
if (empty($student['photo'])) {
$profile_path = base_url() . "common_assets/user.png";
} else if (file_exists('assets_student/application/' . $student['photo'])) {
$profile_path = base_url() . "assets_student/application/" . $student['photo'];
} else {
if ($student['gender'] == 'Male' || $student['gender'] == 'male')
$profile_path = base_url() . "common_assets/male_image.jpg";
else
$profile_path = base_url() . "common_assets/female_image.jpg";
}
?>
<tr>
<td><?= $sno; ?></td>
<td class="text-left"><?= $student['studentId']; ?></td>
<td> <img src="<?= $profile_path; ?>" class="student_img_list" /></td>
<td class="text-left"><?= $student['name']; ?></td>
<td>
<?php
$batch = $this->db->get_where('batch', array('id' => $student['student_batch']))->row_array();
echo $batch['b_name'];
?>
</td>
<td>
<input type="text" class="form-control w-100 m-auto text-center rolls" onchange="check_data(this)" name="symbol_no[]" value="<?= $student['symbol_no']; ?>" max="3">
<input type="hidden" class="form-control w-100 m-auto text-center" name="student_batchid[]" value="<?= $student['stud_batch_id']; ?>">
</td>
</tr>
<?php $sno++;
}
?>
</tbody>
<tfoot>
<tr>
<th colspan="5"></th>
<th>
<div class="float-right w-100">
<button class="btn btn-md btn-info w-100 update_roll">Update Symbol No</button>
</div>
</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<form method="post" id="update_rollNumber" action="<?php echo base_url('admin/symbol-number/' . $encrepted_clas); ?>">
<input type="hidden" name="symbol_numbers" class="symbol_numbers">
<input type="hidden" name="batch_ids" class="batch_id">
</form>
</div>
</div>
</main>
</div>
<script>
// $('input').on("keydown", function(e) {
// /* ENTER PRESSED*/
// console.log(e.keyCode);
// if (e.keyCode == 13) {
// /* FOCUS ELEMENT */
// var inputs = $(this).parents("form").eq(0).find(":input[type='text']");
// var idx = inputs.index(this);
// if (idx == inputs.length - 1) {
// inputs[0].select()
// } else {
// inputs[idx + 1].focus(); // handles submit buttons
// inputs[idx + 1].select();
// }
// e.preventDefault();
// return false;
// } else {
// return true;
// // e.preventDefault();
// }
// });
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[-1],
["All"]
],
paging: false,
info: false
});
//table js end
});
function check_data(data) {
var $regexname = /^([0-9]{1,3})$/;
// if (!data.value.match($regexname)) {
// data.value = data.defaultValue;
// alert("Please Enter only Positive number or Length should be 3");
// return false;
// }
// if (data.value == 0) {
// data.value = data.defaultValue;
// alert("Zero should not be Enter");
// return false;
// }
}
$('.update_roll').on('click', function() {
let arr = [];
let batch = [];
var symbol_no = $("input[name='symbol_no[]']")
.each(function() {
arr.push($(this).val());
});
$("input[name='student_batchid[]']")
.each(function() {
batch.push($(this).val());
});
arr = arr.filter(function(e) {
return e
});
const toFindDuplicates = arr => arr.filter((item, index) => arr.indexOf(item) !== index);
let duplicateElementa = toFindDuplicates(arr);
if (duplicateElementa.length > 0) {
alert(' You have dublicate elements ' + duplicateElementa.toString());
return;
} else {
// console.log(arr);
$('.symbol_numbers').val(arr);
$('.batch_id').val(batch);
$('#update_rollNumber').submit();
}
});
</script>
<script type="text/javascript">
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success_msg']); ?>
<?php unset($_SESSION['error_msg']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,143 @@
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group adding-class form-group_lng">
<a href="<?= base_url(); ?>admin/add-edit-batch/0"><button type="button" class="btn btn-success btn-sm">Add New Batch</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Batches List <p id="success" style="color:green;"></p>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th class="textCenter">Sl No</th>
<th class="textCenter">Batch Name</th>
<th class="textCenter">Start Date</th>
<th class="textCenter">End Date</th>
<th class="textCenter">Is Active</th>
<th class="textCenter">Action</th>
</tr>
</thead>
<tbody>
<?php $i = 1;
foreach ($batch as $bt) {
?>
<tr>
<td class="textCenter"> <?php echo $i; ?></td>
<td class="textCenter"><div class="name_width"><?php echo $bt['b_name']; ?></div></td>
<td class="textCenter"><div class="width_control"><?php echo date(MY_DATE_FORMAT, strtotime($bt['b_from'])); ?></div></td>
<td class="textCenter"><div class="width_control"><?php echo date(MY_DATE_FORMAT, strtotime($bt['b_end'])); ?></div></td>
<td class="textCenter"><?php echo $bt['is_active']; ?></td>
<td>
<div class="sub_tabbtnsec">
<a href="<?php echo base_url(); ?>admin/add-edit-batch/<?php echo $bt['id']; ?>">
<div><i class="fas fa-pencil-alt"></i></div>
</a>
<a data-toggle="modal" onclick="confirm_delete_batch(<?php echo $bt['id']; ?>)">
<div class="sub_delbtn">
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
</div>
</td>
</tr>
<?php $i++;
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="confirmDeleteBatchModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type="hidden" id="del_batch_id" id="del_batch_id" />
<h4>Are you sure?</h4>
<p>you want to delete this Batch?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="delete_batch($('#del_batch_id').val());">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
</script>
<script type="text/javascript">
function confirm_delete_batch(batchId) {
$('#del_batch_id').val(batchId);
$('#confirmDeleteBatchModal').modal('show');
}
function cancel_delete_batch(batchId) {
$('#del_batch_id').val('');
$('#confirmDeleteBatchModal').modal('hide');
}
function delete_batch(delId) {
window.location.replace('<?php echo base_url() ?>' + 'admin/delete_batch/' + delId);
}
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success']); ?>
<?php unset($_SESSION['danger']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,280 @@
<style type="text/css">
.main-wrap {
width: 75%;
margin-left: 40px;
}
.calender-heading {
color: #3D3D3D;
font-size: 23px;
font-weight: bold;
margin-bottom: 40px;
}
.calender-show {
position: relative;
}
.modal-content h3 {
font-size: 22px;
font-weight: bold;
margin: 12px 15px;
}
.modal-content .close {
position: absolute;
right: -41px;
top: 0;
color: #131212;
opacity: 1;
background: white;
border-radius: 15px;
padding: 2px 10px;
font-size: 20px;
}
.modal-content .close {
right: 9px;
top: 9px;
background: white;
border-radius: 15px;
padding: 1px 5px;
border: 2px solid black;
z-index: 99;
}
.modal-content .close {
color: #fff;
opacity: 1;
background: #FF0000;
outline: 0;
border: none;
padding: 2px 7px;
font-size: 20px;
font-weight: bold;
}
.close:not(:disabled):not(.disabled) {
cursor: pointer;
}
.calender-model {
padding: 20px;
}
.calender-model input {
width: 100%;
margin: auto;
border: 1px solid #707070;
color: #707070;
}
.calender-model textarea {
height: 100px;
width: 100%;
color: #707070;
padding: 10px;
}
.event-color-block {
margin: 0 6px;
padding: 3px;
}
.event-color-sec1 {
background: #032DA1;
width: 23px;
height: 23px;
border-radius: 50%;
cursor: pointer;
}
.event-color-sec2 {
background: #55D3D2;
width: 23px;
height: 23px;
border-radius: 50%;
cursor: pointer;
}
.event-color-sec3 {
background: #FF0000;
width: 23px;
height: 23px;
border-radius: 50%;
cursor: pointer;
}
.event-color-sec4 {
background: #FFB653;
width: 23px;
height: 23px;
border-radius: 50%;
cursor: pointer;
}
.calender-model select {
width: 100%;
margin: auto;
margin-top: auto;
margin-bottom: auto;
padding: 5px;
color: #707070;
}
.addevent-form {
background: #032da1;
color: #fff;
font-size: 16px;
padding: 5px 20px;
border: none;
cursor: pointer;
border-radius: 5px;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template Exam---->
<div class="main-wrap">
<h2 class="calender-heading">
<?php echo $title; ?>
</h2>
<div class="calender-show">
<div id="calendar"></div>
<button data-toggle="modal" data-target="#createAssignment" type="button" class="addevent">Add Event</button>
</div>
</div>
<!----admin template Exam end---->
</main>
<!--End right-top side-->
<div class="">
<div class="modal fade show" id="createAssignment" role="dialog" style="padding-right: 16px; ">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<h3>Add New Event</h3>
<button type="button" class="close" data-dismiss="modal"> ×</button>
<div class="calender-model">
<div class="my-3">
<input type="text" name="startDate" value="" class="form-control datetimepicker " autocomplete="off" placeholder="DD MM YYYY, 00:00:00">
</div>
<div class="my-3">
<input type="text" name="startDate" value="" class="form-control " placeholder="Event Title">
</div>
<div class="my-3">
<textarea placeholder="Discription"></textarea>
</div>
<div class="d-flex my-3">
<div>
<p>Event Colour: </p>
</div>
<div class="mx-3" >
<!-- <input type="color" /> -->
<div class="select-event-color d-flex">
<div class="event-color-block">
<div class="event-color-sec1"> </div>
</div>
<div class="event-color-block">
<div class="event-color-sec2"> </div>
</div>
<div class="event-color-block">
<div class="event-color-sec3"> </div>
</div>
<div class="event-color-block">
<div class="event-color-sec4"> </div>
</div>
</div>
</div>
</div>
<select class="form-select my-2" >
<option value="" disabled="" selected="" hidden=""> Select Teacher</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<select class="form-select my-2 " >
<option value="" disabled="" selected="" hidden=""> Select Class</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<div class="text-center my-3">
<button type="button" class="addevent-form m-auto">Add Event</button>
</div>
</div>
</div>
</div>
</div>
</div>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/fullCalender.css">
<script src="<?php echo base_url(); ?>assets_admin/js/jquery-3.4.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/moment.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/bootstrap.min.js"></script>
<script defer src="<?php echo base_url(); ?>assets_admin/js/fullCalendar.js"></script>
<script defer src="<?php echo base_url(); ?>assets_admin/js/all.js"></script>
<script defer src="<?php echo base_url(); ?>assets_admin/js/main.js"></script>
<script defer src="<?php echo base_url(); ?>assets_admin/js/calendar.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/owl-carousel/js/owl.carousel.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/datepicker.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/datetimepicker.js"></script>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
});
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script type="text/javascript">
$(document).ready(function () {
$("#calendar").fullCalendar({
editable: true,
events: "test",
displayEventTime: false,
editable: true,
header: {
left: "title, gotoDate",
right: "",
},
customButtons: {
gotoDate: {
text: "Go to Date",
click: function () {
$(this).datepicker({
autoclose: true,
dateFormat: "yyyy-mm-dd",
});
$(this)
.datepicker()
.on("changeDate", function (e) {
$("#calendar").fullCalendar("gotoDate", e.date);
});
$(this).datepicker("show");
},
},
},
navLinks: true,
editable: true,
});
});
$(".event-btn").click(function () {
$(this).hide();
$(".notification-right").addClass("notif_show").css("overflow", "auto");;
});
$("#main, #mySidebar , header").click(function () {
$(".event-btn").show();
$(".notification-right").removeClass("notif_show").css({ 'overflow' : '' });
});
$(document).ready(function () {
$(".event-color-block").on("click", function () {
$(".event-color-block").removeClass("activecolor");
$(this).addClass("activecolor");
});
});
$(function () {
$('.datetimepicker').datetimepicker({
format:'MM/DD/YYYY hh:mm A',
defaultDate: new Date()
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,133 @@
<style>
form label.error, #secNameerr {
color : red;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template Exam---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form action="<?php echo base_url() ?>/admin/admin-change-password" method="post" id="pwdForm">
<?php if($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Password<span class="text-danger font-weight-bold">*</span></label>
<div class="password-wrp">
<input type="password" name="password" id="password" class="form-control" placeholder="Enter your password">
<span class="passwrd-icon icon-y" id="icon_one"><i class="far fa-eye"></i></span>
</div>
</div>
<div class="form-group">
<label for="">Retype New Password<span class="text-danger font-weight-bold">*</span></label>
<div class="password-wrp">
<input type="password" name="confirm_password" id="confirm_password" class="form-control" placeholder="Enter your password">
<span class="passwrd-icon icon-y" id="icon_two"><i class="far fa-eye"></i></span>
</div>
</div>
<input type="submit" class="subject_addbtn" value="Save">
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template Exam end---->
</main>
<!--End right-top side-->
<script>
$("#icon_one").click(function() {
$("#icon_one").toggleClass("eye-icon");
var input = $("#password");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
$("#icon_two").click(function() {
$("#icon_two").toggleClass("eye-icon");
var input = $("#confirm_password");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
</script>
<script>
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional( element ) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!#%*?&])[A-Za-z\d@$#!%*?&]{6,16}$/.test( value );
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
$("#pwdForm").validate({
ignore: ":hidden",
rules: {
password: {
required: true,
minlength: 6,
maxlength: 16,
passwordregex:true
},
confirm_password : {
required : true,
minlength : 6,
equalTo : '#password'
}
},
messages: {
password : {
required : 'Please enter a valid password',
minlength : 'Password should be more than 6 characters',
maxlength : 'Password should not exceed 16 Characters'
},
confirm_password : {
required : 'Please re-enter your password',
equalTo : "Please enter the same password again."
},
},
submitHandler: function(form) {
form.submit();
}
});
</script>

View File

@ -0,0 +1,154 @@
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="from-group">
<a href="<?= base_url(); ?>admin/classroom"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Classroom List <p id="success" style="color:green;"></p></div>
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Classroom</th>
<th>Course</th>
<th>Subject</th>
<th>Teacher</th>
<!--th>Students</th-->
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i=1;
//echo "<pre>";
//print_r($final_details);
// print_r($classroom);
foreach($final_details as $classrm){
// print_r($final_details);
?>
<tr> <td><?= $i; ?></td>
<td><?= $classrm['classroom_name'];?></td>
<td><?= $classrm['course_name']; ?></td>
<td><?php echo $classrm['subject']; ?></td>
<td><?php echo $classrm['teacher']; ?></td>
<td>
<div class="sub_tabbtnsec">
<a data-toggle="modal" onclick = "classres('<?php echo $classrm['classroom_name'];?>')" href="#restoreModal">
<div class="sub_editbtn"><img src="<?= base_url(); ?>assets_admin/images/icons/restore.png" class="restore-icon"></div>
</a>
<a data-toggle="modal" onclick = "classdel('<?php echo $classrm['classroom_name'];?>')" href="#deleteModal">
<div class="sub_delbtn" >
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
</div>
</td></tr>
<?php $i++; ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="restoreModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "resid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to restore this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="restoredata($('#clsid').val(), 'classroom');">Restore</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "clsid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#clsid').val(), 'classroom');">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
//table js
$('#tbl').DataTable( {
"lengthMenu": [[25,50, 100, 150, -1], [25,50, 100, 150, "All"]]
} );
//table js end
});
</script>
<script type="text/javascript">
function classdel(icn){
alert(icn);
$('#clsid').val(icn);
}
function classres(icn){
alert(icn);
$('#resid').val(icn);
}
function restoredata(id, table){
$('#restoreModal').modal('hide');
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>Admin/restore_data",
data : {id : id, table : table},
success:function(resposne){
if(resposne == '1'){
// $('#success').html('Subject restored successfully.');
// setTimeout(function() {
// window.location.href = "<?php echo base_url(); ?>Admin/classroom_deleted";
// }, 3000);
}
}
});
}
function deletedata(id, table){
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>Admin/delete_classroom_permanent",
data : {id : id, table : table},
success:function(resposne){
if(resposne == '1'){
window.location.href = "<?php echo base_url(); ?>Admin/classroom_deleted";
}
}
});
}
</script>

View File

@ -0,0 +1,178 @@
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
<a href="<?php echo base_url(); ?>admin/classroom"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
<a href="<?php echo base_url(); ?>admin/students_notassign/<?php echo $class_id; ?>/<?php echo $course_id; ?>"><button type="button" class="btn btn-success btn-sm">Assign students</button></a>
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="subject_lhead">Manage Student</div>
<!-- tab added -->
<div class="top-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Start date</label>
<input type="date" name="dd/mm/yy" class="form-control">
</div>
<div class="date-fil-row">
<label>End date</label>
<input type="date" name="dd/mm/yy" class="form-control">
</div>
</div>
<div class="filter-reset">
<button type="button" id="filter_reset" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset Filters</button>
</div>
</div>
<div class="applicnts-list-wrap ">
<div class=" ">
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>S.No.</th>
<th>StudentId</th>
<th>Photo</th>
<th>Name of Student</th>
<th>Contact No.</th>
<th>Course</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 0;
foreach ($students as $s) { ?>
<tr>
<td><?php echo ++$i; ?></td>
<td><?= $s['studentId']; ?></td>
<td>
<img src="<?= base_url(); ?>assets_student/application/<?= $s['photo']; ?>" class="student_img_list">
</td>
<td>
<div class="applicant_nme"><?= $s['name']; ?></div>
</td>
<td><?= $s['mobile']; ?></td>
<td><?= $s['course_name']; ?></td>
<td>
<div class="sub_tabbtnsec stud_tabbtnsec">
<div class="sub_viewbtn" title="View">
<a href="<?php echo base_url(); ?>Admin/view_classstudent/<?php echo $s['id']; ?>">
<i class="fa fa-eye" aria-hidden="true"></i>
</div>
<a data-toggle="modal" onclick="subdel(<?php echo $s['id']; ?>)" href="#deleteModal">
<div class="sub_delbtn" title="Remove"><i class="fas fa-times-circle"></i></div>
</a>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type="text" id="sdid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="removestudent($('#sdid').val(), 'students');">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function subdel(icn) {
// alert(icn);
$('#sdid').val(icn);
}
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl2').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl3').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
function removestudent(id, table) {
$('#deleteModal').modal('hide');
$.ajax({
type: 'POST',
url: "<?php echo base_url(); ?>Admin/remove_student",
data: {
id: id,
table: table
},
success: function(resposne) {
if (resposne == '1') {
// $('#success').html('Data deleted successfully.');
// setTimeout(function() {
location.reload();
// }, 3000);
}
}
});
}
</script>
</body>
</html>

View File

@ -0,0 +1,196 @@
<style>
.action_subject_addbtn {
background: #032DA4;
border-radius: 35px;
color: #fff;
padding: 5px 15px;
border: none;
font-size: 12px;
cursor: pointer;
text-decoration: none;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="from-group adding-class form-group_lng">
<a href="<?= base_url(); ?>admin/ae-classroom/0"><button type="button" class="btn btn-success btn-sm">Add Classroom</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title; ?> <p id="success" style="color:green;"></p>
</div>
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<!--<div class="view_del-subjects"><a href="<?= base_url(); ?>admin/classroom_deleted">View Deleted Items</a></div>-->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Classroom</th>
<th>Course</th>
<th>Subjects</th>
<th>Teachers</th>
<th>Class Teacher</th>
<th class="textCenter">Action</th>
</tr>
</thead>
<tbody>
<?php $i = 1;
//echo "<pre>";
//print_r($final_details);
// print_r($classroom);
foreach ($classroomlist as $classrm) {
$classroomId = $classrm['id'];
?>
<tr>
<td><?= $i; ?></td>
<td>
<div class="ellipsis" title="<?= $classrm['classroom_name']; ?>"><?= $classrm['classroom_name']; ?></div>
</td>
<td><?= $classrm['course_name']; ?></td>
<?php $subject_query = "SELECT cts.*,s.subject_name FROM classroom cl JOIN course_subjects cs ON cl.course_id=cs.course_id LEFT JOIN `classroom_teacher_subject` cts ON cs.subject_id=cts.subject_id AND cl.id=cts.classroom_id LEFT JOIN subject s ON s.id=cts.subject_id WHERE cts.classroom_id=$classroomId ORDER BY cts.id ASC";
$subject_list = $this->Admin_model->get_query_result($subject_query);
// foreach ($subject_list as $sub_value) {
?>
<td>
<?php
// $subject_query = "SELECT s.subject_name FROM classroom_teacher_subject cts LEFT JOIN subject s ON s.id=cts.subject_id WHERE cts.classroom_id=$classroomId ORDER BY cts.id ASC";
// $subject_query = "SELECT cts.*,s.subject_name FROM classroom cl JOIN course_subjects cs ON cl.course_id=cs.course_id LEFT JOIN `classroom_teacher_subject` cts ON cs.subject_id=cts.subject_id AND cl.id=cts.classroom_id LEFT JOIN subject s ON s.id=cts.subject_id WHERE cts.classroom_id=$classroomId ORDER BY cts.id ASC";
//SELECT cts.*,s.subject_name FROM `classroom_teacher_subject` cts LEFT JOIN subject s ON s.id=cts.subject_id WHERE cts.classroom_id=$classroomId ORDER BY cts.id ASC
// $subject_list = $this->Admin_model->get_query_result($subject_query);
foreach ($subject_list as $sub_value) {
echo $subject_name = ($sub_value['subject_name'] != '') ? $sub_value['subject_name'] . "<br>" : '-';
}
?>
</td>
<td>
<?php
$classTeacher = '';
// $teacher_query = "SELECT cts.*,t.teacher_name FROM `classroom_teacher_subject` cts LEFT JOIN teacher t ON t.id=cts.teacher_id WHERE cts.classroom_id=$classroomId ORDER BY cts.id ASC";
// $teacher_list = $this->Admin_model->get_query_result($teacher_query);
// foreach ($teacher_list as $teacher_value) {
// echo $subject_name = ($teacher_value['teacher_id'] != 0) ? $teacher_value['teacher_name'] . "<br>" : '-<br>';
foreach ($subject_list as $sub_value) {
$teacher_query = "SELECT cts.*,t.teacher_name FROM `classroom_teacher_subject` cts LEFT JOIN teacher t ON t.id=cts.teacher_id WHERE cts.id=" . $sub_value['id'] . " ORDER BY cts.id ASC";
$teacher_list = $this->Admin_model->get_query_result($teacher_query);
foreach ($teacher_list as $teacher_value) {
if ($teacher_value['is_class_teacher'] == 'yes') {
$classTeacher = $teacher_value['teacher_name'];
}
echo $subject_name = ($teacher_value['teacher_id'] != 0) ? $teacher_value['teacher_name'] . "<br>" : '-<br>';
}
}
?>
</td>
<td>
<?= $classTeacher ?>
</td>
<td>
<div class="sub_tabbtnsec">
<div><a href="<?php echo base_url(); ?>admin/assign-students/<?= $classrm['id']; ?>" class="action_subject_addbtn" style=" width: 122px !important;display: block;padding: 5px 5px;">Manage Students</a></div>
<a href="<?php echo base_url(); ?>admin/ae-classroom/<?php echo $classrm['id']; ?>">
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
</a>
<a data-toggle="modal" onclick="classdel('<?php echo $classrm['id']; ?>')" href="#deleteModal">
<div class="sub_delbtn">
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
<!--<div><a href="<?php //echo base_url();
?>admin/assign-students/<?php //echo $classrm['id'];
?>" data-toggle="tooltip" title="View Assigned Students"><i class="fa fa-eye"></i></a></div>-->
</div>
</td>
</tr>
<?php $i++; ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type="hidden" id="clsid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this Classroom ?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#clsid').val());">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
</script>
<script type="text/javascript">
function classdel(icn) {
// alert(icn);
$('#clsid').val(icn);
}
function deletedata(id) {
// alert(id);
window.location.replace('<?php echo base_url() ?>' + 'admin/delete_classroom/' + id);
}
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success_msg']); ?>
<?php unset($_SESSION['error_msg']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,572 @@
<!-- <Link href="https://cdn.datatables.net/fixedcolumns/4.1.0/css/fixedColumns.dataTables.min.css" /> -->
<style>
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.action_subject_addbtn {
background: #032DA4;
border-radius: 35px;
color: #fff;
padding: 5px 15px;
border: none;
font-size: 12px;
cursor: pointer;
text-decoration: none;
}
.custom_tble th:nth-child(1),
.custom_tble th:nth-child(2),
.custom_tble td:nth-child(1),
.custom_tble td:nth-child(2) {
background: #fff;
z-index: 9;
}
.table_div {
width: 100%;
}
th,
td {
white-space: nowrap;
}
.table_stu_name {
margin: auto;
}
.assign_Fee_startdate .form-control {
height: calc(2.25rem + 2px);
padding: 9px 3px;
}
.assign_fee_reset .subject_addbtn {
padding: 6px 10px;
}
/*START : added by Nandini*/
.dt-buttons {
display: block !important;
}
/*END OF : added by Nandini*/
.error {
color: red;
padding-top: 5px;
/* font-weight:500; */
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="col-md-6 pull-left" style="padding:0">
<button onclick="history.back()" type="button" class="btn subject_addbtn bg-dark">Back</button>
</div>
<?php
$theExportHeader = '';
if (isset($school_info) && !empty($school_info)) {
$courseTitle = '';
$monthTitle = '';
if (isset($selectedCourse) && !empty($selectedCourse)) {
// echo '<pre>';
$courseTitle = $selectedCourse['course_name'];
}
$theExportHeader = $courseTitle . ' - Class Schedule';
}
$selBatch = (isset($theBatchId) && !empty($theBatchId)) ? $theBatchId : $school_info['batch_id'];
$selCourseId = '';
$selSectionId = '';
$sercStdStr = '';
if (count($_POST) > 0) {
$selCourseId = $course;
$selSectionId = $section;
}
?>
<div class="subject_lhead"><?= 'Classroom Schedule'; ?></div>
<form method="post" action="<?php echo base_url(); ?>admin/classroom-schedule" id="form-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-3">
<label class="has-float-label">
<select id="f_batch" name="f_batch" class="custom-select form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
$b_selected = ($row['id'] == $selBatch) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<span>Batch <b class="text-danger">*</b></span>
</label>
</div>
<div class="col-md-3">
<label class="has-float-label mb-0">
<select class="form-control custom-select" placeholder="Select Course" name="filter-course" id="filter-course">
<option value="">Select Course</option>
<?php
if (isset($courses) || !empty($courses)) {
foreach ($courses as $row) {
?>
<option value="<?php echo $row['id'] ?>" <?php if ($row['id'] == $selCourseId) { ?> selected <?php } ?>>
<?php echo $row['course_name']; ?>
</option>
<?php
}
}
?>
</select>
<span>Course <b class="text-danger">*</b></span>
</label>
<label id="filter-course-error" class="error py-0 my-0 px-1 small" for="filter-course"></label>
</div>
<div class="col-md-3">
<label class="has-float-label mb-0">
<select class="form-control custom-select" placeholder="Select Section" name="filter-section" id="filter-section">
<?php if ($section != '') {
$sectionName = $this->db->get_where('section', array('id' => $section))->row()->section_name;
?>
<option value="<?= $section; ?>" <?php echo set_select('filter-section', $section, TRUE); ?>><?php echo $sectionName; ?></option>
<?php } ?>
<option value=""> Select Section </option>
</select>
<span>Section <b class="text-danger">*</b></span>
</label>
<label id="filter-section-error" class="error py-0 my-0 px-1 small" for="filter-section"></label>
</div>
<div class="col-md-3">
<div class="form-group assign_fee_reset">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/classroom-schedule"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</div>
</form>
<hr>
<?php if (isset($class_schedule) && !empty($selCourseId)) { ?>
<div class="table_div ">
<?php
// print_r($class_schedule);
?>
<form method="post" action="<?php echo base_url(); ?>admin/classroom-schedule" id="form-filter">
<input type="hidden" name="selectedBatchId" value="<?= $selBatch ?>" />
<input type="hidden" name="selectedCourseId" value="<?= $selCourseId ?>" />
<input type="hidden" name="selectedSectionId" value="<?= $section ?>" />
<div class="row align-items-center mb-3">
<div class="col-md-2">
<label class="has-float-label mb-0">
<input type="time" id="class_start_time" name="class_start_time" class=" form-control" value="" placeholder='Enter Class Starts Time' required>
<span>Start Time <b class="text-danger">*</b></span>
</label>
</div>
<div class="col-md-2">
<label class="has-float-label mb-0">
<input type="time" id="class_end_time" name="class_end_time" class=" form-control" value="" placeholder='Enter Class End Time' required>
<span>End Time <b class="text-danger">*</b></span>
</label>
</div>
<div class="col-md-3">
<label class="has-float-label mb-0">
<select id="subject" class="form-control selectpicker" name="subject" data-live-search="false" required>
<option value="">
Select Subject
</option>
<?php
foreach ($course_subjects as $cs_key => $course_subject) {
?>
<option value="<?= $course_subject['subject_id'] ?>">
<?= $course_subject['subject_name'] ?>
</option>
<?php
}
?>
<option value="0>">
<?= 'Interval' ?>
</option>
</select>
<span>Subject <b class="text-danger">*</b></span>
</label>
</div>
<div class="col-md-3">
<label class="has-float-label mb-0">
<select id="days" class="form-control selectpicker" name="days[]" multiple data-live-search="false" required>
<option value="">
Select Days
</option>
<?php
foreach ($week_days as $wd_key => $week_day) {
?>
<option value="<?= $week_day['id'] ?>">
<?= $week_day['title'] ?>
</option>
<?php
}
?>
</select>
<span>Day <b class="text-danger">*</b></span>
</label>
</div>
<div class="col-md-2">
<input type="submit" name="addClassSchedule" id="addClassSchedule" class="btn btn-outline-success w-100" value="Save">
</div>
</div>
</form>
<hr>
<table id="tbl" class="display" width="100%">
<thead>
<tr>
<th class="border-right border-top border-left sorting_desc" style="width: 4%">
<!-- <label class=" mb-0 pl-0 "> -->
Time
<!-- </label> -->
</th>
<?php
if (isset($week_days) && !empty($week_days)) {
foreach ($week_days as $w_key => $week_day) {
?>
<th class="text-center border-right border-top">
<?= $week_day['title'] ?>
</th>
<?php
}
}
?>
<th class="border-right border-top border-left sorting_desc noExport" style="width: 4%">
<!-- <label class=" mb-0 pl-0 "> -->
Action
<!-- </label> -->
</th>
</tr>
</thead>
<tbody>
<?php
// echo '<pre>';
if (isset($class_schedule) && !empty($class_schedule)) {
$sno = 1;
$class_schedules = isset($class_schedule['class_schedule']) ? $class_schedule['class_schedule'] : [];
// dd($class_schedules);
foreach ($class_schedules as $csKey => $schedule) {
$days_schedules = $schedule['days'];
?>
<tr>
<td class="border-right border-left">
<?php echo date('h:i A', strtotime($schedule['start_time'])) . ' - ' . date('h:i A', strtotime($schedule['end_time']));
// print_r($schedule['days']);
?>
</td>
<?php
foreach ($week_days as $w_key => $week_day) {
foreach ($days_schedules as $ds_key => $ds) {
if ($ds['id'] == $week_day['id']) {
?>
<td class="text-left border-right border-top">
<?= !empty($ds['subject']) ? $ds['subject']['subject_name'] : '-' ?>
</td>
<?php
}
}
}
?>
<td class="border-right border-left">
<?php
// dd($schedule);
$url_params = array(
'batch_id' => $schedule['batch_id'],
'course_id' => $schedule['course_id'],
'section_id' => $schedule['section_id'],
'start_time' => $schedule['start_time'],
'end_time' => $schedule['end_time']
);
?>
<a target="_blank" href="<?= base_url() . 'admin/classroom-schedule-update/' . urlencode(serialize($url_params)) ?>" class="btn btn-sm btn-outline-primary mr-1">
<i class="fa fa-edit"></i>
</a>
<button type="submit" id="deleteBtn" href="<?= base_url() . 'admin/classroom-schedule-update/' . urlencode(serialize($url_params)) ?>" class="btn btn-sm btn-outline-danger">
<i class="fa fa-trash"></i>
</button>
<form method="post" action="<?php echo base_url(); ?>admin/classroom-schedule" id="form-delete">
<input type="hidden" name="batch_id" value=<?= $schedule['batch_id'] ?>>
<input type="hidden" name="course_id" value=<?= $schedule['course_id'] ?>>
<input type="hidden" name="section_id" value=<?= $schedule['section_id'] ?>>
<input type="hidden" name="start_time" value=<?= $schedule['start_time'] ?>>
<input type="hidden" name="end_time" value=<?= $schedule['end_time'] ?>>
<input type="hidden" name="d_action" value='deleteSchedule'>
<!-- <input type="submit" -->
<!-- <button type="submit" name="deleteSchedule" class="btn btn-sm btn-outline-danger" value="Delete"> <i class="fas fa-trash"></i></button> -->
</form>
</td>
</tr>
<?php
}
// print_();($class_schedule);
}
?>
</tbody>
</table>
<!-- <hr />
<div class="row">
<div class="col-md-9"></div>
<div class="col-md-3"><button type="submit" class=" w-100 btn btn-sm mb-2" style="background-color:#032da1;color:#fff;" name="assigntostudents" value="assign"> Assign </button></div>
</div> -->
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<!-- <script defer src="https://cdn.datatables.net/fixedcolumns/4.1.0/js/dataTables.fixedColumns.min.js"></script> -->
<script>
$("#deleteBtn").click(function() {
$("#form-delete").submit(); // Submit the form
});
$(document).ready(function() {
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 -]{3,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#form-filter").validate({
ignore: "input[type='text']:hidden",
rules: {
"filter-course": {
required: true,
},
"filter-section": {
required: true,
},
"filter-fees_type[]": {
required: true
},
"filter-route-id": {
required: true
}
},
messages: {
"filter-course": {
required: "Please Select Course ",
},
"filter-section": {
required: "Please Select Section ",
}
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>
<script>
/* Ensure that the demo table scrolls */
$(document).ready(function() {
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
var table = $('#tbl').DataTable({
scrollY: screen.height * 0.6,
scrollX: true,
scrollCollapse: true,
paging: false,
// order: [
// [1, 'acs']
// ],
fixedColumns: {
left: 1,
},
"dom": 'lBfrtip',
buttons: [{
extend: 'pdfHtml5',
// orientation: 'landscape',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
},
stripNewlines: false,
stripHtml: true
},
orientation: 'landscape',
pageSize: 'A4',
// customize: function(doc) {
// doc.content[1].table.widths = Array(doc.content[1].table.body[0].length + 1).join('*').split('');
// // doc.defaultStyle.alignment = 'center';
// doc.styles.tableHeader.alignment = 'center';
// }
// messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'print',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
},
stripNewlines: false,
stripHtml: true
},
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
},
stripNewlines: false,
stripHtml: true,
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
],
});
});
$('#filter-course').change(function() {
var course = $('#filter-course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' > Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#filter-section').empty().append(divData);
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#filter-section').empty().append(divData);
}
});
</script>
<script>
jQuery(document).ready(function() {
jQuery(".custom_tble").clone(true).appendTo('.table_div_cover').addClass('clone');
});
</script>

View File

@ -0,0 +1,374 @@
<!-- <Link href="https://cdn.datatables.net/fixedcolumns/4.1.0/css/fixedColumns.dataTables.min.css" /> -->
<style>
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.action_subject_addbtn {
background: #032DA4;
border-radius: 35px;
color: #fff;
padding: 5px 15px;
border: none;
font-size: 12px;
cursor: pointer;
text-decoration: none;
}
.custom_tble th:nth-child(1),
.custom_tble th:nth-child(2),
.custom_tble td:nth-child(1),
.custom_tble td:nth-child(2) {
background: #fff;
z-index: 9;
}
.table_div {
width: 100%;
}
th,
td {
white-space: nowrap;
}
.table_stu_name {
margin: auto;
}
.assign_Fee_startdate .form-control {
height: calc(2.25rem + 2px);
padding: 9px 3px;
}
.assign_fee_reset .subject_addbtn {
padding: 6px 10px;
}
/*START : added by Nandini*/
.dt-buttons {
display: block !important;
}
/*END OF : added by Nandini*/
.error {
color: red;
padding-top: 5px;
/* font-weight:500; */
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="col-md-6 pull-left" style="padding:0">
<button onclick="history.back()" type="button" class="btn subject_addbtn bg-dark">Back</button>
</div>
<?php
$theExportHeader = '';
if (isset($school_info) && !empty($school_info)) {
$courseTitle = '';
$monthTitle = '';
if (isset($selectedCourse) && !empty($selectedCourse)) {
// echo '<pre>';
$courseTitle = $selectedCourse['course_name'];
}
$theExportHeader = $courseTitle . ' - Class Schedule';
}
$selBatch = (isset($theBatchId) && !empty($theBatchId)) ? $theBatchId : $school_info['batch_id'];
$selCourseId = '';
$selSectionId = '';
$sercStdStr = '';
if (count($_POST) > 0) {
$selCourseId = $course;
$selSectionId = $section;
}
?>
<!-- <div class="subject_lhead"><?= $classroom['classroom_name'] ?></div> -->
<div class="row align-items-center">
<div class="col">
<div class="subject_lhead"><?= $classroom['classroom_name'] ?></div>
</div>
<div class="col text-right h6 mb-0">
<i class="fas fa-clock fa-spin"></i>
<?= date('h:i A', strtotime($start_time)) . ' - ' . date('h:i A', strtotime($end_time)) ?>
</div>
</div>
<hr class="bg-primary">
<form method="post" action="<?php echo base_url(); ?>admin/classroom-schedule-update/<?= $url_params ?>" id="form-filter">
<input type="hidden" name="batch_id" value="<?= $theBatchId ?>">
<input type="hidden" name="course_id" value="<?= $course ?>">
<input type="hidden" name="section_id" value="<?= $section ?>">
<div class="row col-md-7 px-0 mt-3">
<div class="col">
<label class="has-float-label mb-0">
<input type="time" id="class_start_time" name="class_start_time" class=" form-control" value="<?= $start_time ?>" placeholder='Enter Class Starts Time' required>
<span>Start Time <b class="text-danger">*</b></span>
</label>
</div>
<div class="col pr-0">
<label class="has-float-label mb-0">
<input type="time" id="class_end_time" name="class_end_time" class=" form-control" value="<?= $end_time ?>" placeholder='Enter Class End Time' required>
<span>End Time <b class="text-danger">*</b></span>
</label>
</div>
</div>
<?php
foreach ($week_days as $wd => $week_day) {
?>
<div class="card my-3">
<div class="card-body py-2">
<div class="row align-items-center">
<div class="col-md-2 h6 small mb-0" style="font-weight:500"> <?= $week_day['title'] ?> </div>
<div class="col-md-10">
<!-- <label class="has-float-label mb-0"> -->
<select id="subject" class="form-control selectpicker col-md-6" name="subject[<?= $week_day['id'] ?>]" data-live-search="false">
<option value="">
Select Subject
</option>
<?php
foreach ($course_subjects as $cs_key => $course_subject) {
$selected = '';
foreach ($class_schedule as $c_key => $sch) {
if ($sch['day'] == $week_day['id']) {
echo $sch['subject'] . ' ==> ' . $course_subject['subject_id'] . '<br>';
if ($sch['subject'] == $course_subject['subject_id']) {
$selected = 'selected';
}
}
}
?>
<option value="<?= $course_subject['subject_id'] ?>" <?= $selected ?>>
<?= $course_subject['subject_name'] ?>
</option>
<?php
}
?>
<option value="0>">
<?= 'Interval' ?>
</option>
</select>
<!-- <span>Subject <b class="text-danger">*</b></span>
</label> -->
</div>
</div>
</div>
</div>
<?php
}
?>
<div class="col-md-7 px-0">
<input type="submit" name="schedule_update" value="Save" class="btn btn-sm btn-outline-success w-100 px-0">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<!-- <script defer src="https://cdn.datatables.net/fixedcolumns/4.1.0/js/dataTables.fixedColumns.min.js"></script> -->
<script>
$(document).ready(function() {
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 -]{3,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#form-filter").validate({
ignore: "input[type='text']:hidden",
rules: {
"filter-course": {
required: true,
},
"filter-section": {
required: true,
},
"filter-fees_type[]": {
required: true
},
"filter-route-id": {
required: true
}
},
messages: {
"filter-course": {
required: "Please Select Course ",
},
"filter-section": {
required: "Please Select Section ",
}
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>
<script>
/* Ensure that the demo table scrolls */
$(document).ready(function() {
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
var table = $('#tbl').DataTable({
scrollY: screen.height * 0.6,
scrollX: true,
scrollCollapse: true,
paging: false,
// order: [
// [1, 'acs']
// ],
fixedColumns: {
left: 1,
right: 1
},
"dom": 'lBfrtip',
buttons: [{
extend: 'pdfHtml5',
// orientation: 'landscape',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
},
stripNewlines: false,
stripHtml: true
},
orientation: 'landscape',
pageSize: 'A4',
// customize: function(doc) {
// doc.content[1].table.widths = Array(doc.content[1].table.body[0].length + 1).join('*').split('');
// // doc.defaultStyle.alignment = 'center';
// doc.styles.tableHeader.alignment = 'center';
// }
// messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'print',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
},
stripNewlines: false,
stripHtml: true
},
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
},
stripNewlines: false,
stripHtml: true,
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
],
});
});
$('#filter-course').change(function() {
var course = $('#filter-course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' > Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#filter-section').empty().append(divData);
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#filter-section').empty().append(divData);
}
});
</script>
<script>
jQuery(document).ready(function() {
jQuery(".custom_tble").clone(true).appendTo('.table_div_cover').addClass('clone');
});
</script>

View File

@ -0,0 +1,149 @@
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group">
<a href="<?= base_url(); ?>admin/course"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Deleted Course List <p id="success" style="color:green;"></p></div>
<div class="view_del-subjects"><a href="<?php echo base_url(); ?>Admin/course_deleted">View Deleted Items</a></div>
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Course Name</th>
<th>Subject Name</th>
<th>Course Fee</th>
<th>Application Fee</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i=1; foreach($course as $cur){
$data = $this->Admin_model->get_subjectName($cur['subject_id']);
?>
<tr>
<td><?= $i; ?></td>
<td><?= $cur['course_name']; ?></td>
<td><?php foreach($data as $val){ echo $val['subject_name'].'<br>'; } ?></td>
<td><?= $cur['course_fee']; ?></td>
<td><?= $cur['application_fee']; ?></td>
<td>
<div class="sub_tabbtnsec sub_tabbtnsec_restore ">
<a data-toggle="modal" onclick = "coursedel(<?php echo $cur['id']; ?>)" href="#restoreModal">
<div class="sub_editbtn"><img src="<?= base_url(); ?>assets_admin/images/icons/restore.png" class="restore-icon"></div>
</a>
<a data-toggle="modal" onclick = "coursedel(<?php echo $cur['id']; ?>)" href="#deleteModal">
<div class="sub_delbtn" >
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
</div>
</td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="restoreModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "crid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to restore this subject?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="restoredata($('#crid').val(), 'course');">Restore</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "crid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item permanently?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#crid').val(), 'course');">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
//table js
$('#tbl').DataTable( {
"lengthMenu": [[25,50, 100, 150, -1], [25,50, 100, 150, "All"]]
} );
//table js end
});
</script>
<script type="text/javascript">
function coursedel(icn){
// alert(icn);
$('#crid').val(icn);
}
function restoredata(id, table){
$('#restoreModal').modal('hide');
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>Admin/restore_data",
data : {id : id, table : table},
success:function(resposne){
if(resposne == '1'){
// $('#success').html('Subject restored successfully.');
// setTimeout(function() {
window.location.href = "<?php echo base_url(); ?>Admin/course_deleted";
// }, 3000);
}
}
});
}
</script>
<script type="text/javascript">
function deletedata(id, table){
$('#deleteModal').modal('hide');
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>Admin/delete_data_permanent",
data : {id : id, table : table},
success:function(resposne){
if(resposne == '1'){
window.location.href = "<?php echo base_url(); ?>Admin/course_deleted";
}
}
});
}
</script>

View File

@ -0,0 +1,187 @@
<style>
.error {
color: red;
padding-top: 2px;
}
</style>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<div class="wraper responsive-width">
<main class="" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_l subject_l_full_width ">
<div class="subject_lsec">
<?php
$statusArr = array('yes' => 'Yes', 'no' => 'No');
$bname = '';
$bfrom = '';
$bend = '';
$status = '';
//echo '<pre>'; print_r($batchDetails);exit;
if (isset($batchDetails) && !empty($batchDetails)) {
$bname = $batchDetails[0]['b_name'];
$bfrom = $batchDetails[0]['b_from'];
$bend = $batchDetails[0]['b_end'];
$status = $batchDetails[0]['is_active'];
}
?>
<div class="subject_lhead"><?php echo $title; ?></div>
<form id="addEditBatchForm" method="post" action="<?php echo base_url(); ?>admin/add-edit-batch/<?php echo $bid ?>">
<div class="subject_lformarea">
<div class="form-group">
<input type="hidden" name="id" id="id" class="form-control" value="<?= $bid; ?>">
<label>Batch Name <span class="text-danger">*</span></label>
<input type="text" name="b_name" id="b_name" class="form-control" value="<?php echo $bname; ?>" placeholder="Enter batch name">
<p id="error_b_name" style="color:red;"></p>
<label id="batcherror" class="error" style="display : none"></label>
</div>
<div class="form-group assign_subject">
<label>Batch Start Date <span class="text-danger">*</span></label>
<input type="date" name="b_from" id='b_from' class="form-control" value="<?php echo $bfrom; ?>" placeholder="Enter start date">
<p id="error_b_from" style="color:red;"></p>
</div>
<div class="form-group">
<label>Batch End Date <span class="text-danger">*</span></label>
<input type="date" name="b_end" id="b_end" class="form-control" value="<?php echo $bend; ?>" placeholder="Enter end date">
<p id="error_b_end" style="color:red;"></p>
</div>
<div class="form-group">
<label>Status <span class="text-danger">*</span></label>
<select name="is_active" id="is_active" class="form-control">
<option value=''>Select</option>
<?php
foreach ($statusArr as $key => $val) {
?>
<option <?php if ($status == $key) { ?> selected <?php } ?> value='<?php echo $key; ?>'><?php echo $val; ?></option>
<?php
}
?>
</select>
<p id="error_is_active" style="color:red;"></p>
</div>
<button type="submit" class="subject_addbtn"><?php echo $btn_value = (($bid > 0) ? 'Update' : 'Add'); ?>
</button>&nbsp;&nbsp;
<a href="<?= base_url(); ?>admin/batches"><button type="button" class="subject_addbtn bg-dark">Back</button></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
</div>
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script> -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
//multiple select js start
$('select').selectpicker();
//multiple select js end
var todaysDate = new Date();
var year = todaysDate.getFullYear();
var month = ("0" + (todaysDate.getMonth() + 1)).slice(-2);
var day = ("0" + todaysDate.getDate()).slice(-2);
var maxDate = (year + "-" + month + "-" + day);
$('input[type=date]').attr('min', maxDate);
$(document).on("change", "#b_from", function() {
var bdate = $(this).val();
// alert(bdate);
$('#b_end').attr('min', bdate);
$('#b_end').val('');
});
});
$(document).ready(function() {
jQuery.validator.addMethod("inputregx", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9 -]{3,50}$/.test(value);
}, 'Please enter alpha and numeric characters only ');
$("#addEditBatchForm").validate({
ignore: "input[type='text']:hidden",
rules: {
b_name: {
required: true,
rangelength: [2, 20],
inputregx: true,
},
b_from: {
required: true,
},
b_end: {
required: true,
},
is_active: {
required: true,
},
},
messages: {
b_name: {
required: "Please enter Batch name ",
},
b_from: {
required: "Please Select Batch From",
},
b_end: {
required: "Please Select Batch End",
},
is_active: {
required: "Please Select Status",
},
},
submitHandler: function(form) {
var EditId = "<?= $bid ?>";
if (EditId == 0) {
var inputValue = $("input[name='b_name']", form).val();
$.ajax({
url: "<?= base_url() ?>admin/checkname",
data: {
value: inputValue,
tablename: "batch",
column: "b_name"
},
type: 'POST',
async: false,
success: function(data) {
// console.log(data);
if (data == 0) {
form.submit();
} else {
$('#batcherror').show();
$('#batcherror').text('This Batch name already exists.');
}
}
});
} else {
form.submit();
}
}
});
});
</script>

View File

@ -0,0 +1,247 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select > .dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.course_grade_setup_table th,.course_grade_setup_table td {
border: 0;
font-size: 16px;
padding: 10px;
}
.course_grade_setup_table {
border: 0;
}
.course_grade_setup_table th {
font-weight: 600;
font-size: 17px;
color: #888787;
border-bottom: 1px solid #ddd;
}
.course_grade_setup_table th {
text-align: center;
}
.course_grade_setup_table th:nth-child(1),.course_grade_setup_table td:nth-child(1) {
text-align: left;
width: 15%;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
</div>
<div class="subject_lhead">Course Grade Setup</div>
<form action="<?= base_url(); ?>admin/course-grade-setup" method="POST" id='courseGradeSetupForm'>
<?php if(!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php } unset($_SESSION['success']); ?>
<div class="row" >
<div class="col-md-12">
<table style='width:100%' border='1' class="course_grade_setup_table">
<tr>
<th width='25%'>Course Name</th>
<th width='25%'>
<input type="checkbox" id='the_main_grade' onclick='check_uncheck("the_main_grade")'> Grade
</th>
<th width='25%'>
<input type="checkbox" id='the_main_division' onclick='check_uncheck("the_main_division")'> Percentage
</th>
<th width='25%'>
<input type="checkbox" id='the_main_all' onclick='check_uncheck("the_main_all")'> All
</th>
</tr>
<?php
if(isset($theResult) && !empty($theResult))
{
foreach($theResult as $k=>$res)
{
if($res['setup']=='Grade')
$theRowSelect = 'Grade';
else if($res['setup']=='Percentage')
$theRowSelect = 'Percentage';
else if($res['setup']=='All')
$theRowSelect = 'All';
else
$theRowSelect = '';
?>
<tr>
<!--onclick='abcd("g", <?php echo $res["id"];?>)'-->
<td><?php echo $res['course_name'];?></td>
<td>
<input type="radio" name="<?php echo $res['id'];?>" id="<?php echo 'g_'.$res['id'];?>" class='the_grades' value='Grade' <?php if($theRowSelect == 'Grade'){?> checked <?php } ?> >
</td>
<td>
<input type="radio" name="<?php echo $res['id'];?>" id="<?php echo 'p_'.$res['id'];?>" class='the_division' value='Percentage' <?php if($theRowSelect == 'Percentage'){?> checked <?php } ?> >
</td>
<td>
<input type="radio" name="<?php echo $res['id'];?>" id="<?php echo 'a_'.$res['id'];?>" class='the_all' value='All' <?php if($theRowSelect == 'All'){?> checked <?php } ?> >
</td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="4">
<button type='submit' name='update_data' style="font-size: 14px;padding: 6px 10px; " class="subject_addbtn download_idcards" >
Update
</button>
&nbsp; &nbsp;
<a href="<?php echo base_url() ?>admin/course-grade-setup">
<input type="button" style="font-size: 14px;padding: 6px 10px; " class="subject_addbtn download_idcards" value="Reset">
</a>
</td>
</tr>
</table>
</div>
</div>
</form>
<!-- tab added -->
<!-- new divs added -->
<!--<div class="tab-content">
<div class="applicnts-list-wrap ">
<div class=" ">
</div>
</div>
</div>-->
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script type="text/javascript">
function check_uncheck(theFlag)
{
if(theFlag=='the_main_grade')
{
if($('#the_main_grade').prop('checked'))
{
$('.the_grades').each(function(){
$(this).prop('checked', true);
});
$("#the_main_division").attr('disabled', true);
$("#the_main_all").attr('disabled', true);
}
else
{
$('.the_grades').each(function(){
$(this).prop('checked', false);
});
$("#the_main_division").attr('disabled', false);
$("#the_main_all").attr('disabled', false);
}
}
else if(theFlag=='the_main_division')
{
if($('#the_main_division').prop('checked'))
{
$('.the_division').each(function(){
$(this).prop('checked', true);
});
$("#the_main_grade").attr('disabled', true);
$("#the_main_all").attr('disabled', true);
}
else
{
$('.the_division').each(function(){
$(this).prop('checked', false);
});
$("#the_main_grade").attr('disabled', false);
$("#the_main_all").attr('disabled', false);
}
}
else if(theFlag=='the_main_all')
{
if($('#the_main_all').prop('checked'))
{
$('.the_all').each(function(){
$(this).prop('checked', true);
});
$("#the_main_grade").attr('disabled', true);
$("#the_main_division").attr('disabled', true);
}
else
{
$('.the_all').each(function(){
$(this).prop('checked', false);
});
$("#the_main_grade").attr('disabled', false);
$("#the_main_division").attr('disabled', false);
}
}
}
$('input[type=radio]').click(function(){
if(this.previous) {
this.checked = false;
}
this.previous = this.checked;
});
/*function abcd(flag, idVal)
{
//alert(flag+' = '+idVal);
//alert( $('#'+flag+'_'+idVal).attr('previousValue') );
//$('#'+flag+'_'+idVal).toggle();
if($('#'+flag+'_'+idVal).prop('checked'))
$('#'+flag+'_'+idVal).prop('checked', false);
else
$('#'+flag+'_'+idVal).prop('checked', true);
}*/
</script>
</body>
</html>

View File

@ -0,0 +1,175 @@
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group adding-class form-group_lng">
<a href="<?= base_url(); ?>admin/ae-course/0"><button type="button" class="btn btn-success btn-sm">Add New Course</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Courses List <p id="success" style="color:green;"></p></div>
<?php if($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Course</th>
<th>Section Name</th>
<th>Subject Name</th>
<th>Fee Cost</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach($course_names as $key => $value) {
$sectionsarr = array();
$subjectsarr = array();
?>
<tr>
<td><?php echo $key + 1 ?></td>
<td><?php echo $value['course_name'] ?></td>
<td>
<?php foreach ($result as $se_key => $se_value) {
if($se_value['course_name'] == $value['course_name']) {
if(!in_array($se_value['section_name'], $sectionsarr)) {
array_push($sectionsarr, $se_value['section_name']);
}
}
}
echo implode('<br>', $sectionsarr);
?>
</td>
<td><?php foreach ($result as $se_key => $se_value) {
if($se_value['course_name'] == $value['course_name']) {
if(!in_array($se_value['subject_name'], $subjectsarr)) {
array_push($subjectsarr, $se_value['subject_name']);
}
}
}
echo implode('<br>', $subjectsarr);
?></td>
<td>
<?php
if(!empty($value['amount']))
echo $value['amount'];
else
echo 'Course fee not assigned';
?>
</td>
<td>
<div class="sub_tabbtnsec">
<div class="sub_editbtn"><a href="<?php echo base_url() ?>admin/ae-course/<?php echo $value['id'] ?>"><i class="fas fa-pencil-alt"></i></a></div>
<a data-toggle="modal" onclick ="coursedel(<?php echo $value['id'] ?>)" href="#deleteModal">
<div class="sub_delbtn" >
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "crid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this course?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#crid').val());">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!--div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "sdid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to restore this subject?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="restoredata($('#sdid').val(), 'subject');">Restore</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div-->
<script>
$(document).ready(function(){
//table js
$('#tbl').DataTable( {
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
} );
//table js end
});
</script>
<script type="text/javascript">
function coursedel(icn){
// alert(icn);
$('#crid').val(icn);
}
function deletedata(id){
window.location.href = "<?php echo base_url(); ?>Admin/delete_course/" + id;
}
</script>

View File

@ -0,0 +1,74 @@
<style>
.error {
color : red;
}
</style>
<main class="wrapper responsive-width" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php if($this->session->flashdata('failed')) { ?>
<div class="mt-3 mb-3 text-center p-2 bg-danger text-white">
<p><?php echo $this->session->flashdata('failed') ?></p>
</div>
<?php } ?>
<form action="<?php echo base_url() ?>Admin/insertSection" method="post" id="sectionForm">
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead">Create Section</div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Section Name</label>
<input type="text" name="section_name" class="form-control" placeholder="Name of your course">
</div>
<input type="submit" class="subject_addbtn" value="Submit">
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<script>
$(document).ready(function(){
$("#sectionForm").validate({
rules: {
section_name: {
required: true,
minlength: 5
}
},
// Specify validation error messages
messages: {
section_name: {
required: "Please provide a section name",
minlength : "Please enter more than 4 Characters"
},
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>

View File

@ -0,0 +1,319 @@
<div class="wraper responsive-width">
<main class="" id="main">
<div class="main-wrap">
<div class="dashboard-cover">
<div class="common-heading">
<h2>DashBoard</h2>
</div>
<div class="dashboard-menu-wrap new-dashboard">
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/subject" class="dashboard-tab-link">
<img src="<?= base_url(); ?>assets_admin/images/icons/subjects.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($subject_count) ? $subject_count : '0' ?></h3>
<p>Subjects</p>
</div>
</a>
</div>
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/course">
<img src="<?= base_url(); ?>assets_admin/images/icons/courses.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($course_count) ? $course_count : '0' ?></h3>
<p>Courses</p>
</div>
</a>
</div>
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/classroom">
<img src="<?= base_url(); ?>assets_admin/images/icons/classrooms.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($classroom_count) ? $classroom_count : '0' ?></h3>
<p>Classrooms</p>
</div>
</a>
</div>
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/teacher">
<img src="<?= base_url(); ?>assets_admin/images/icons/teachers.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($teacher_count) ? $teacher_count : '0' ?></h3>
<p>Teachers</p>
</div>
</a>
</div>
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/student">
<img src="<?= base_url(); ?>assets_admin/images/icons/students.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($student_count) ? $student_count : '0' ?></h3>
<p>Students</p>
</div>
</a>
</div>
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/exam-view">
<img src="<?= base_url(); ?>assets_admin/images/icons/exams.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($exam_count) ? $exam_count : '0' ?></h3>
<p>Exam</p>
</div>
</a>
</div>
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/online_session_list">
<img src="<?= base_url(); ?>assets_admin/images/icons/lectures.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($session_count) ? $session_count : '0' ?></h3>
<p>Lectures</p>
</div>
</a>
</div>
<div class="dashboard-tabs">
<a href="<?= base_url(); ?>admin/get_application">
<img src="<?= base_url(); ?>assets_admin/images/icons/enrollments.png">
<div class="tab-sub-sec">
<h3 class="tab-number"><?php echo ($application_count) ? $application_count : '0' ?></h3>
<p>Enrollments</p>
</div>
</a>
</div>
</div>
<!-- <button type="button" class="btn btn-success" onclick="<?php echo base_url() ?>Admin/sendSMS()">Sign Up</button> -->
<div class="subject_lsec dashboard_graph">
<div class="report_sec_cover">
<!-- chart data -->
<div class="row">
<div class="col-md-12">
<div class="subject_lhead">Girl's and Boy's Count</div>
</div>
<div class="col-md-4">
<select id="course_name" name="course_name">
<?php if (!empty($courses)) { ?>
<option value="">--- Select Course ----</option>
<?php foreach ($courses as $key => $value) { ?>
<option value="<?php echo $value['id'] ?>"> <?php echo $value['course_name'] ?></option>
<?php }
} ?>
</select>
</div>
<div class="col-md-4">
<select id="section" name="section_name" style="width:253px">
</select>
</div>
<div class="col-md-4">
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="charts_section mx-3 my-3" id="girls-boys-chart">
<div class="text-center mt-4" id="data_hidden">
<h5>Select the Course to view Chart</h5>
</div>
</div>
</div>
</div>
</div>
</div>
<form method="post" action="<?php echo base_url(); ?>admin/send-message">
<input type="submit" name="submit" class="btn btn-success" value="Submit">
</form>
</div>
</div>
</main>
<!--End right-top side-->
</div>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
});
</script>
<script>
// var graph_data = <?php //echo json_encode($graph_data);
?>;
// console.log(graph_data);
// Highcharts.setOptions({
// lang: {
// drillUpText: '<< Back'
// }
// });
// Highcharts.chart('recoveryGraf', {
// chart: {
// type: 'pie'
// },
// title: {
// text: ''
// },
// plotOptions: {
// series: {
// dataLabels: {
// enabled: true,
// format: '{point.name}: {point.y:.1f}'
// }
// }
// },
// tooltip: {
// headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
// pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}</b> of total<br/>'
// },
// series: [{
// name: 'Fee Report',
// colorByPoint: true,
// colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3'],
// data: [
// <?php
// foreach ($graph_data as $v) {
// echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
// }
?>
// ]
// }],
// drilldown: {
// series: [{
// name: 'Recycleds',
// id: 'Recycleds',
// colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3'],
// data: [
// <?php
// foreach ($graph_data as $v) {
// echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
// }
?>
// ]
// }]
// }
// });
function theGirlsandBoyChart(boy, girl) {
boy = parseInt(boy);
girl = parseInt(girl);
$('#data_hidden').hide();
var data_title = 'Chart Description';
//Type can be : line, spline, area, areaspline, column, bar, pie, scatter, gauge, arearange, areasplinerange and columnrange
$('#girls-boys-chart').highcharts({
chart: {
type: 'column',
borderWidth: 0
},
title: {
text: data_title
},
plotOptions: {
borderWidth: 0
},
xAxis: {
title: {
text: 'Girls And Boys',
},
min: 1,
tickInterval: 1,
},
yAxis: {
title: {
text: 'Total Count',
},
},
series: [{
name: "Boy's",
data: [0, boy]
}, {
name: "Girl's",
data: [0, girl]
}, ]
});
//To hide the text "Highcharts.com" which comes as default
//$('.highcharts-credits').hide();
//$('.highcharts-legend-item').hide();
}
$('#course_name').change(function() {
var id = $(this).find(":selected").val();
$.ajax({
url: '<?php echo base_url() . 'admin/get_sections_from_classroom/' ?>' + id,
type: 'GET',
dataType: 'json',
success: function(result) {
let section = '';
section += '<option value=""> - Select Section - </option>';
$.each(result, function(key, value) {
section += '<option value="' + value['id'] + '">' + value['section_name'] + '</option>';
});
$("#section").html(section);
}
});
var course_id = $('#course_name').find(":selected").val();
if (course_id > 0) {
$.ajax({
url: '<?php echo base_url() . 'admin/get_count_of_girl_and_boy/' ?>' + course_id + '/0',
type: 'GET',
dataType: 'json',
success: function(result) {
theGirlsandBoyChart(result['male'], result['female']);
}
});
} else {
alert("Please select the Course ");
}
});
$('#section').change(function() {
var course_id = $('#course_name').find(":selected").val();
var section_id = $(this).find(":selected").val();
if (course_id > 0 && section_id > 0) {
$.ajax({
url: '<?php echo base_url() . 'admin/get_count_of_girl_and_boy/' ?>' + course_id + '/' + section_id,
type: 'GET',
dataType: 'json',
success: function(result) {
theGirlsandBoyChart(result['male'], result['female']);
}
});
} else {
alert("select the course or section");
}
});
</script>

View File

@ -0,0 +1,162 @@
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group adding-class form-group_lng">
<a href="<?= base_url(); ?>admin/create-db-backups">
<button type="button" class="btn btn-success btn-sm">Create New Backup</button>
</a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Database Backup Files <p id="success" style="color:green;"></p>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th width='50px' class="textCenter">Sl No</th>
<th class="textCenter">File Name</th>
<th class="textCenter">Backup Date</th>
<th class="textCenter">Action</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
if(isset($dbBackupFiles) && !empty($dbBackupFiles))
{
foreach ($dbBackupFiles as $key=>$value)
{
$dateandtime = substr($value,0,-4);
$dtArr = explode('_', $dateandtime);
$dat = strtotime($dtArr[0].' '.str_replace("-", ":", $dtArr[1]));
?>
<tr>
<td class="textCenter"> <?php echo $i; ?></td>
<td class="textCenter"><div class="name_width"><?php echo $value; ?></div></td>
<td class="textCenter">
<div class="width_control">
<?php echo date(MY_DATE_FORMAT, strtotime($dtArr[0])).' , '.date("h:i:s A", $dat); ?>
</div>
</td>
<td>
<div class="sub_tabbtnsec">
<!--<a data-toggle="modal" href="<?php echo base_url();?>database_backups/<?php echo $value;?>" download='<?php echo $dateandtime;?>'>-->
<a href="javascript:download('<?php echo base_url();?>database_backups/<?php echo $value;?>')" >
<div class="sub_delbtn" style='color:#28a745;' data-toggle="tooltip" title="Download">
<i class="fa fa-download" aria-hidden="true"></i>
</div>
</a>
<?php if($i >5){?>
&nbsp;&nbsp;
<a data-toggle="modal" onclick="confirm_delete_backup('<?php echo $value;?>')">
<div class="sub_delbtn" data-toggle="tooltip" title="Delete">
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
<?php } ?>
</div>
</td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="confirmDeleteBatchModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type="hidden" id="del_backup_id" id="del_backup_id" />
<h4>Are you sure?</h4>
<p>you want to delete this database backup?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="delete_delete_backup($('#del_backup_id').val());">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
</script>
<script type="text/javascript">
function confirm_delete_backup(delBackupName) {
$('#del_backup_id').val(delBackupName);
$('#confirmDeleteBatchModal').modal('show');
}
function delete_delete_backup(delId) {
window.location.replace('<?php echo base_url() ?>' + 'admin/delete-db-backup/' + delId);
}
function download(path) {
window.location.href = path;
};
$(document).ready(function() {
// show the alert
setTimeout(function() {
$(".alert").alert('close');
<?php unset($_SESSION['success']); ?>
<?php unset($_SESSION['danger']); ?>
}, 15000);
});
</script>

View File

@ -0,0 +1,176 @@
<div class="wraper responsive-width">
<main>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="mb-4">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?= base_url() . 'admin/dashboard' ?>">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page"><?= $title ?></li>
</ol>
</nav>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><b> Success !</b> <?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><b> Error !</b> <?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="row justify-content-center">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Add New Department</h5>
<!-- <?php echo base_url(); ?>department -->
<form method="post" action="<?php echo base_url(); ?>admin/department">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" placeholder='Enter department title' required>
<span>Department Title</span>
</label>
</div>
<div class="text-center w-100">
<input type="submit" name="addDepartment" id="add_department" class="btn btn-sm btn-success w-100" value="Add">
</div>
</form>
</div>
</div>
</div>
<div class="col-md-8 pl-0">
<div class="col-md-12 border rounded py-3">
<!-- -->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th class="textCenter">S.No</th>
<th class="textCenter">Department Title</th>
<th class="textCenter">Is Active</th>
<th class="textCenter">Action</th>
</tr>
</thead>
<tbody>
<?php
foreach ($department_list as $departmentKey => $department) {
?>
<tr>
<td><?= $departmentKey + 1 ?></td>
<td><?= $department['title'] ?></td>
<td><?= ucfirst($department['is_active']) ?></td>
<td>
<button type="button" class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#updateModal<?= $department['id'] ?>">
<i class="fa fa-edit"></i>
</button>
<div class="modal fade" id="updateModal<?= $department['id'] ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Update</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form action="<?= base_url(); ?>admin/department" method="POST" onkeydown=" return event.key != 'Enter'">
<div class="modal-body">
<input type="hidden" name="departmentId" value="<?= $department['id'] ?>">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" value="<?= $department['title'] ?>" placeholder='Enter department title' required>
<span>Department Title</span>
</label>
</div>
<div class="form-group mt-4">
<label class="has-float-label">
<select id="is_active" class="form-control custom-select" placeholder="Is Active" name="is_active">
<option value="yes" <?= $department['is_active'] == 'yes' ? 'selected' : '' ?>>
Yes
</option>
<option value="no" <?= $department['is_active'] == 'no' ? 'selected' : '' ?>>
No
</option>
</select>
<span>Is Active</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">Close</button>
<input type="submit" name="updateDepartment" class="btn btn-sm btn-success" value="Update">
</div>
</form>
</div>
</div>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!--End right-top side-->
<!-- <script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.2.1.slim.min.js"></script> -->
<script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.4.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/all.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/main.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/owl-carousel/js/owl.carousel.min.js"></script>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
</script>

View File

@ -0,0 +1,176 @@
<div class="wraper responsive-width">
<main>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="pr-5 mb-4">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?= base_url() . 'admin/dashboard' ?>">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page"><?= $title ?></li>
</ol>
</nav>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><b> Success !</b> <?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><b> Error !</b> <?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="pr-5">
<div class="row justify-content-center">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Add New Designation</h5>
<form method="post" action="<?php echo base_url(); ?>admin/designation">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" placeholder='Enter designation title' required>
<span>Designation Title</span>
</label>
</div>
<div class=" w-100">
<input type="submit" name="addDesignation" id="add_designation" class="btn btn-sm btn-success w-100" value="Add">
</div>
</form>
</div>
</div>
</div>
<div class="col-md-8 pl-0">
<div class="col-md-12 border rounded py-3">
<!-- -->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th class="textCenter">S.No</th>
<th class="textCenter">Designation Title</th>
<th class="textCenter">Is Active</th>
<th class="textCenter">Action</th>
</tr>
</thead>
<tbody>
<?php
foreach ($designation_list as $designationKey => $designation) {
?>
<tr>
<td><?= $designationKey + 1 ?></td>
<td><?= $designation['title'] ?></td>
<td><?= ucfirst($designation['is_active']) ?></td>
<td>
<button type="button" class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#updateModal<?= $designation['id'] ?>">
<i class="fa fa-edit"></i>
</button>
<div class="modal fade" id="updateModal<?= $designation['id'] ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Update</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form action="<?= base_url(); ?>admin/designation" method="POST" onkeydown=" return event.key != 'Enter'">
<div class="modal-body">
<input type="hidden" name="designationId" value="<?= $designation['id'] ?>">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" value="<?= $designation['title'] ?>" placeholder='Enter designation title' required>
<span>Designation Title</span>
</label>
</div>
<div class="form-group mt-4">
<label class="has-float-label">
<select id="is_active" class="form-control custom-select" placeholder="Is Active" name="is_active">
<option value="yes" <?= $designation['is_active'] == 'yes' ? 'selected' : '' ?>>
Yes
</option>
<option value="no" <?= $designation['is_active'] == 'no' ? 'selected' : '' ?>>
No
</option>
</select>
<span>Is Active</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">Close</button>
<input type="submit" name="updateDesignation" class="btn btn-sm btn-success" value="Update">
</div>
</form>
</div>
</div>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!--End right-top side-->
<!-- <script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.2.1.slim.min.js"></script> -->
<script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.4.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/all.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/main.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/owl-carousel/js/owl.carousel.min.js"></script>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
</script>

View File

@ -0,0 +1,496 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.error {
color: red;
font-size: 12px;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$search_batch = (isset($_POST['f_batch']) && !empty($_POST['f_batch'])) ? $_POST['f_batch'] : '';
$search_course_id = (isset($_POST['f_course']) && !empty($_POST['f_course'])) ? $_POST['f_course'] : '';
$search_section = (isset($_POST['f_section']) && !empty($_POST['f_section'])) ? $_POST['f_section'] : '';
$search_feetype = (isset($_POST['f_feetype']) && !empty($_POST['f_feetype'])) ? $_POST['f_feetype'] : '';
$search_start_paid_date = (isset($search_start_paid_date) && !empty($search_start_paid_date)) ? $search_start_paid_date : '';
$search_end_paid_date = (isset($search_end_paid_date) && !empty($search_end_paid_date)) ? $search_end_paid_date : '';
$search_payment_status = (isset($_POST['payment_status']) && !empty($_POST['payment_status'])) ? $_POST['payment_status'] : '';
$theExportHeader = 'The Fee Revert Reports';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . $school_info['address'] . '\n Invoice Reports \n';
}
if (count($_POST) > 0) {
if ($search_start_paid_date != '')
$theExportHeader .= ' From ' . $search_start_paid_date;
if ($search_end_paid_date != '')
$theExportHeader .= ' To ' . $search_end_paid_date;
}
// print_r($_POST);
?>
</div>
<div class="subject_lhead"><?php echo ucfirst($search_payment_status) ?> Reports</div>
<form id="searchFilters" action="<?= base_url(); ?>admin/due-reports" method="POST">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="subject-filter">
<label>Select Batch <span style="font-weight:bold;color:red;"> * </span></label>
<select id="f_batch" name="f_batch" class=" form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
if ($search_batch != '')
$b_selected = ($row['id'] == $search_batch) ? 'selected' : '';
else
$b_selected = ($row['id'] == $school_info['batch_id']) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('f_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<label>Select Course <span style="font-weight:bold;color:red;"> * </span></label>
<select id="f_course" name="f_course" class=" form-control">
<option value="">Select Course</option>
<?php foreach ($course as $c_value) {
$course_selected = ($c_value['id'] == $search_course_id) ? 'selected' : '';
?>
<option value="<?= $c_value['id']; ?>" <?= $course_selected; ?>><?php echo $c_value['course_name']; ?> </option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class=" form-group subject-filter">
<label>Select Section</label>
<?php if ($search_course_id != '' && $search_course_id > 0) {
$sql = "SELECT s.id as section_id,s.section_name FROM course_sections cs JOIN section s ON s.id=cs.section_id WHERE cs.course_id='$search_course_id' ORDER BY s.id DESC";
$section_list = $this->Admin_model->get_query_result($sql);
?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
if (isset($section_list) && !empty($section_list)) {
foreach ($section_list as $se_val) { ?>
<option value="<?php echo $se_val['section_id'] ?>" <?php if (isset($search_section) && !empty($search_section)) {
echo (in_array($se_val['section_id'], $search_section)) ? 'selected' : '';
} ?>><?php echo $se_val['section_name'] ?></option>
<?php }
} ?>
</select>
<?php } else { ?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
</select>
<?php } ?>
</div>
</div>
<div class="col-md-3">
<div class="form-group subject-filter">
<label>Select FeeType</label>
<select id="f_feetype" name="f_feetype[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select FeeType</option>
<?php foreach ($fees_types as $ft_value) {
?>
<option value="<?= $ft_value['id']; ?>" <?php if (!empty($search_feetype)) {
echo (in_array($ft_value['id'], $search_feetype)) ? 'selected' : '';
} ?>><?= $ft_value['feetype_name']; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select Start Date</label>
<input type="text" name="f_start_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_start_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="date-filter">
<div class="date-fil-row">
<label>Select End Date</label>
<input type="text" name="f_end_paid_date" class="form-control w-100 nepal-date" value="<?php echo $search_end_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group subject-filter">
<label>Payment Status <span style="font-weight:bold;color:red;"> * </span></label>
<select id="payment_status" class="form-control payment_status w-100" name="payment_status">
<option value=""> Select Status </option>
<?php $payment_status_arr = array('paid');
foreach ($payment_status_arr as $ps_val) {
?>
<option value='<?php echo $ps_val; ?>' <?php if ($search_payment_status != '') {
echo ($ps_val == $search_payment_status) ? 'selected' : '';
} ?>><?php echo ucfirst($ps_val) ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class="date-filter pt-4">
<input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success " style="width:250px;height:40px;" value="Filter">
<a href="<?php echo base_url() ?>admin/due-reports">
<div class="date-filter"> <button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button>
</a>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" ">
<!-- changed ID -->
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>S.No</th>
<th>Roll No</th>
<th>Student Name</th>
<th>Course</th>
<th>Section</th>
<?php
if (isset($selected_feetype) && !empty($selected_feetype)) {
foreach ($selected_feetype as $sftypes) {
?>
<th><?php echo $sftypes['feetype_name']; ?></th>
<?php
}
}
?>
<th>Total Assigned Amount</th>
<th>Paid Amount</th>
<th>Diduction Amount</th>
<th>Fine Amount</th>
<th>Due Amount</th>
<th>Due Amount</th>
</tr>
</thead>
<tbody>
<?php
// dd($students);
$tdCnt = 1;
if (isset($students) && !empty($students)) {
$sno = 1;
foreach ($students as $student) {
$tdCnt = 10;
?>
<tr>
<td><?php echo $sno; ?></td>
<td><?php echo $student['roll_no']; ?> </td>
<td><?php echo $student['name'] ?> </td>
<td><?php echo $student['course_name'] ?> </td>
<td><?php echo $student['section_name'] ?> </td>
<?php
if (isset($selected_feetype) && !empty($selected_feetype)) {
$theRowTotalAssignedAmt = 0;
$theRowTotalPaidAmt = 0;
$theRowTotalDiscoutAmt = 0;
$theRowTotalFineAmt = 0;
$theRowTotaldueAmt = 0;
foreach ($selected_feetype as $sftypes) {
$theRowTotalAssignedAmt = ($theRowTotalAssignedAmt + $student[$sftypes['id']]['total_assigned_amount']);
$theRowTotalPaidAmt = ($theRowTotalPaidAmt + $student[$sftypes['id']]['total_paid_amount']);
$theRowTotalDiscoutAmt = ($theRowTotalDiscoutAmt + $student[$sftypes['id']]['total_diduction_amount']);
$theRowTotalFineAmt = ($theRowTotalFineAmt + $student[$sftypes['id']]['total_fine_amount']);
$theRowTotaldueAmt = ($theRowTotaldueAmt + $student[$sftypes['id']]['total_pending_amount']);
?>
<th><?php echo $student[$sftypes['id']]['total_paid_amount']; ?></th>
<?php
$tdCnt++;
}
}
?>
<td><?php echo $theRowTotalAssignedAmt; ?> </td>
<td><?php echo ($theRowTotalPaidAmt - $theRowTotalFineAmt); ?> </td>
<td><?php echo $theRowTotalDiscoutAmt; ?> </td>
<td><?php echo $theRowTotalFineAmt; ?> </td>
<td><?php echo $theRowTotaldueAmt; ?></td>
</tr>
<?php $sno++;
}
} ?>
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th>In <?php echo $currency_symbol; ?></th>
<?php
if (isset($selected_feetype) && !empty($selected_feetype)) {
foreach ($selected_feetype as $sftypes) {
?>
<th style='font-size: 14px;'></th>
<?php
}
}
?>
<th style='font-size: 14px;'></th>
<th style='font-size: 14px;'></th>
<th style='font-size: 14px;'></th>
<th style='font-size: 14px;'></th>
<th style='font-size: 14px;'></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
$("#searchFilters").validate({
rules: {
f_batch: 'required',
f_course: 'required',
payment_status: 'required'
},
submitHandler: function(form, e) {
e.preventDefault();
form.submit();
}
});
});
$('#f_course').change(function() {
var course = $('#f_course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#f_section').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
var theTdCnt = '<?php echo $tdCnt; ?>';
var theTdStr = new Array();
for (let n = 0; n < theTdCnt; n++) {
theTdStr.push(n);
}
//alert(theTdCnt);
var jsSdate = '<?php echo $search_start_paid_date; ?>';
var jsTdate = '<?php echo $search_end_paid_date; ?>';
//alert(jsSdate+' = '+jsTdate);
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
console.log(jsTheExportHeader);
$('#tbl1').DataTable({
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
// orientation: 'landscape',
// exportOptions: {
// columns: [0,1,2,3,4,5],
// },
header: true,
footer: true,
title: jsTheExportHeader,
customize: function(doc) {
var rowCount = document.getElementById("tbl1").rows.length;
//alert(rowCount);
for (i = 0; i < rowCount; i++) {
for (j = 0; j < theTdCnt; j++) {
doc.content[1].table.body[i][j].alignment = 'center';
}
}
doc.styles.table = {
alignment: 'center'
}
},
orientation: 'landscape',
pageSize: 'LEGAL'
// messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: theTdStr,
},
messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.'
}
],
"footerCallback": function(row, data, start, end, display) {
//var theDynTdCnt = (theTdCnt - 7);
for (let fi = 5; fi < theTdCnt; fi++) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(fi)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(fi, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(fi).footer()).html(
//currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
pageTotal
);
}
}
});
//table js end
//multiple select js start
$('#f_section').selectpicker();
$('#f_feetype').selectpicker();
//multiple select js end
});
</script>
</body>
</html>

View File

@ -0,0 +1,75 @@
<style>
.error {
color : red;
}
</style>
<main class="wrapper responsive-width" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php if($this->session->flashdata('failed')) { ?>
<div class="mt-3 mb-3 text-center p-2 bg-danger text-white">
<p><?php echo $this->session->flashdata('failed') ?></p>
</div>
<?php } ?>
<form action="<?php echo base_url() ?>Admin/updateSection" method="post" id="sectionForm">
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead">Create Section</div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Section Name</label>
<input type="text" name="section_name" value="<?php echo $result['section_name'] ?>" class="form-control" placeholder="Name of your course">
<input type="hidden" name="secId" value="<?php echo $result['id'] ?>">
</div>
<input type="submit" class="subject_addbtn" value="Submit">
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<script>
$(document).ready(function(){
$("#sectionForm").validate({
rules: {
section_name: {
required: true,
minlength: 5
}
},
// Specify validation error messages
messages: {
section_name: {
required: "Please provide a section name",
minlength : "Please enter more than 4 Characters"
},
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>

View File

@ -0,0 +1,292 @@
<style>
.error {
color: red;
}
</style>
<main class="wrapper responsive-width" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if ($student) {
foreach ($student as $app) { ?>
<form action="<?php echo base_url() ?>Admin/editInfo_Student" method="post" id="studentForm">
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead">Edit Student Info</div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">First Name</label>
<input type="text" name="first_name" value="<?= $app['first_name']; ?>" class="form-control" placeholder="Name of your Student">
<input type="hidden" name="student_Id" value="<?php echo $student_id ?>">
</div>
<div class="form-group">
<label for="">Last Name</label>
<input type="text" name="last_name" value="<?= $app['last_name']; ?>" class="form-control" placeholder="Name of your Student">
<input type="hidden" name="student_Id" value="<?php echo $student_id ?>">
</div>
<div class="form-group">
<label for="">Course</label>
<input type="text" name="corse_name" value="<?php echo $app['course_name'] ?>" class="form-control" placeholder="Name of your course" disabled>
</div>
<div class="form-group">
<label for="">IEMIS No.</label>
<input type="text" name="iemis" value="<?php echo $app['iemis'] ?>" class="form-control" placeholder="IEMIS No.">
</div>
<div class="form-group">
<label for="">Email</label>
<input type="email" name="email" value="<?php echo $app['email'] ?>" class="form-control" placeholder="Enter Email">
</div>
<div class="form-group">
<label for="">Contact Number</label>
<input type="Number" name="contact" value="<?php echo $app['mobile'] ?>" class="form-control" placeholder="Enter mobile number">
</div>
<div class="form-group">
<label for="">Parent/Guardian Name</label>
<input type="text" name="pname" value="<?php echo $app['emergency_contact_name'] ?>" class="form-control" placeholder="Enter Name">
</div>
<div class="form-group">
<label for="">Father Name</label>
<input type="text" name="fname" value="<?php echo $app['father_name'] ?>" class="form-control" placeholder="Enter Father Name">
</div>
<div class="form-group">
<label for="">Mother Name</label>
<input type="text" name="mname" value="<?php echo $app['mother_name'] ?>" class="form-control" placeholder="Enter Mother Name">
</div>
<div class="form-group">
<label for="">Parent/Guardian Contact Number</label>
<input type="text" name="pcontact" value="<?php echo $app['emergency_contact_number'] ?>" class="form-control" placeholder="Enter Name">
</div>
<div class="form-group">
<label for="">Parent PAN Number</label>
<input type="text" name="pan" value="<?php echo $app['parent_pan'] ?>" class="form-control" placeholder="Enter parent PAN number" style="text-transform:uppercase" maxlength="10">
</div>
<div class="form-group">
<label for="">Date Of Birth</label>
<!-- <input type="date" name="dob" value="<?php echo $app['dob'] ?>" class="form-control" placeholder=""> -->
<div class="po-calendar">
<input type="text" readonly style="background-color: transparent;" name="dob" class="nepal-date form-control" value="<?php echo $app['dob'] ?>" placeholder="">
<i class="fas fa-calendar-alt cal-icon"></i>
</div>
</div>
<div class="form-group">
<label for="">Gender : </label>
<div class="form-check ml-2 mt-2 form-check-inline" style="top:1px">
<?php if ($app['gender'] == 'Male') { ?>
<input class="form-check-input" checked name="gender" type="radio" id="inlineCheckbox1" value="Male">
<?php } else { ?>
<input class="form-check-input" name="gender" type="radio" id="inlineCheckbox1" value="Male">
<?php } ?>
<label class="form-check-label" for="inlineCheckbox1">Male</label>
</div>
<div class="form-check mt-2 form-check-inline" style="top:1px">
<?php if ($app['gender'] == 'Female') { ?>
<input class="form-check-input" checked name="gender" type="radio" id="inlineCheckbox1" value="Female">
<?php } else { ?>
<input class="form-check-input" name="gender" type="radio" id="inlineCheckbox1" value="Female">
<?php } ?>
<label class="form-check-label" for="inlineCheckbox2">Female</label>
</div>
<div class="form-check mt-2 form-check-inline" style="top:1px">
<?php if ($app['gender'] == 'Other') { ?>
<input class="form-check-input" checked name="gender" type="radio" id="inlineCheckbox1" value="Other">
<?php } else { ?>
<input class="form-check-input" name="gender" type="radio" id="inlineCheckbox1" value="Other">
<?php } ?>
<label class="form-check-label" for="inlineCheckbox2">Other</label>
</div>
</div>
<div class="form-group">
<label for="">Address1</label>
<textarea name="address1" class="form-control"><?= $app['address1'] ?></textarea>
</div>
<div class="form-group">
<label>Address2</label>
<textarea name="address2" class="form-control"><?= $app['address2']; ?> </textarea>
</div>
<div class="form-group">
<label>State</label>
<input type="text" name="state" value="<?= $app['state'] ?>" class="form-control">
</div>
<div class="form-group">
<label>Country</label>
<select name="country" class="form-control">
<?php if (strtolower($app['country']) == 'nepal') {
echo '<option selected value="' . $app['country'] . '">' . $app['country'] . '</option>';
} else {
echo '<option value="Nepal">Nepal</option>';
} ?>
<?php if (strtolower($app['country']) == 'india') {
echo '<option selected value="' . $app['country'] . '">' . $app['country'] . '</option>';
} else {
echo '<option value="India">India</option>';
} ?>
</select>
<!-- <input type="text" name="country" value="<?= $app['country']; ?>" class="form-control"> -->
</div>
<div class="form-group">
<label>Pin Code</label>
<input type="text" name="zipcode" value="<?= $app['zipcode']; ?>" class="form-control">
</div>
<div class="form-group">
<label for="">Applied on</label>
<input type="text" name="section_name" value="<?= $app['registered_on']; ?>" class="form-control" placeholder="Name of your course" disabled>
</div>
<input type="submit" class="subject_addbtn" value="Update Info" name="submit_info">
<a href="<?= base_url(); ?>admin/view_student/<?php echo $student_id ?>"><button type="button" class="subject_addbtn bg-dark ml-2">Back</button></a>
</div>
</div>
</div>
</div>
</form>
<?php }
} ?>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<script>
$(document).ready(function() {
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element) || /^[a-zA-z ]+$/i.test(value);
}, "please enter only alphabets");
jQuery.validator.addMethod("fullnameregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z ]{3,30}$/.test(value);
}, 'Please enter alpha characters only ');
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional(element) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,16}$/.test(value);
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
jQuery.validator.addMethod("emailregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/.test(value);
}, 'Email Address is invalid: Please enter a valid email address.');
jQuery.validator.addMethod("phonenumberregex", function(value, element) {
return this.optional(element) || /^[0-9]{8,14}$/.test(value);
}, 'Please enter a 8 to 14 digits vaild phone number.');
jQuery.validator.addMethod("zipregex", function(value, element) {
return this.optional(element) || /^[0-9]{3,8}$/.test(value);
}, 'Please enter 3-8 digits number: digits only allowed');
jQuery.validator.addMethod("genral_regex", function(value, element) {
return this.optional(element) || /^[a-zA-Z -#]{1,50}$/.test(value);
}, 'Please enter alpha characters only');
// jQuery.validator.addMethod("pannumberregex", function(value, element) {
// return this.optional(element) || /^[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}$/.test(value);
// }, 'Please enter correct PAN numner.');
$("#studentForm").validate({
ignore: ':hidden',
rules: {
first_name: {
required: true,
minlength: 3,
maxlength: 30,
lettersonly: true,
},
last_name: {
required: true,
minlength: 1,
maxlength: 30,
lettersonly: true,
},
email: {
required: true,
email: true,
emailregex: true
},
contact: {
required: true,
minlength: 8,
maxlength: 14,
phonenumberregex: true
},
dob: "required",
gender_name: {
required: true
},
country: {
required: true,
genral_regex: true
},
pan: {
required: false,
minlength: 2
},
state: {
required: true,
genral_regex: true
},
address1: {
required: true
},
zipcode: {
required: true,
minlength: 3,
maxlength: 8,
},
},
messages: {
email: {
required: "Enter your Email",
equalTo: "Please enter the same email address again.",
},
contact: {
minlength: "Please Enter a 10 digits valid phone Number",
maxlength: "Please Enter a 10 digits valid phone Number",
},
zipcode: {
minlength: "Please enter atleast 3 numbers",
maxlength: "Please enter below 8 numbers"
}
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>

View File

@ -0,0 +1,187 @@
<div class="wraper responsive-width">
<main>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="mb-4">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?= base_url() . 'admin/dashboard' ?>">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page"><?= $title ?></li>
</ol>
</nav>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><b> Success !</b> <?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><b> Error !</b> <?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="row justify-content-center">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Add New Expense Type</h5>
<!-- <?php echo base_url(); ?>department -->
<form method="post" action="<?php echo base_url(); ?>admin/expense-types">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" placeholder='Enter expense title' required>
<span>Expense Title</span>
</label>
</div>
<?php ACCOUNTING ? $this->accounting->showExpenseTypeMappingOption() : null; ?>
<div class="text-center w-100 mt-3">
<input type="submit" name="addExpenseType" id="add_ExpenseType" class="btn btn-sm btn-success w-100" value="Add">
</div>
</form>
</div>
</div>
</div>
<div class="col-md-8 pl-0">
<div class="col-md-12 border rounded py-3">
<!-- -->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th class="textCenter">S.No</th>
<th class="textCenter">Expense Title</th>
<?php if (ACCOUNTING) : ?>
<th class="textCenter">Default Account</th>
<?php endif; ?>
<th class="textCenter">Is Active</th>
<th class="textCenter">Action</th>
</tr>
</thead>
<tbody>
<?php
foreach ($expense_types as $expenseKey => $expense) {
?>
<tr>
<td><?= $expenseKey + 1 ?></td>
<td class="text-left"><?= $expense['name'] ?></td>
<?php if (ACCOUNTING) : ?>
<td class="text-left"><?= $expense['default_account'] ?></td>
<?php endif; ?>
<td><?= ucfirst($expense['status']) ?></td>
<td>
<button type="button" class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#updateModal<?= $expense['id'] ?>">
<i class="fa fa-edit"></i>
</button>
<div class="modal fade" id="updateModal<?= $expense['id'] ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Update</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form action="<?= base_url(); ?>admin/expense-types" method="POST" onkeydown=" return event.key != 'Enter'">
<div class="modal-body">
<input type="hidden" name="expenseId" value="<?= $expense['id'] ?>">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" value="<?= $expense['name'] ?>" placeholder='Enter expense title' required>
<span>Expense Title</span>
</label>
</div>
<?php ACCOUNTING ? $this->accounting->showExpenseTypeMappingOption($default = $expense['default_account']) : null; ?>
<div class="form-group mt-4">
<label class="has-float-label">
<select id="is_active" class="form-control custom-select" placeholder="Is Active" name="is_active">
<option value="yes" <?= $expense['status'] == 'yes' ? 'selected' : '' ?>>
Yes
</option>
<option value="no" <?= $expense['status'] == 'no' ? 'selected' : '' ?>>
No
</option>
</select>
<span>Is Active</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">Close</button>
<input type="submit" name="updateExpenseType" class="btn btn-sm btn-success" value="Update">
</div>
</form>
</div>
</div>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!--End right-top side-->
<!-- <script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.2.1.slim.min.js"></script> -->
<script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.4.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/all.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/main.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/owl-carousel/js/owl.carousel.min.js"></script>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
</script>

View File

@ -0,0 +1,275 @@
<style>
.action_subject_addbtn {
background: #032DA4;
border-radius: 35px;
color: #fff;
padding: 5px 15px;
border: none;
font-size: 12px;
cursor: pointer;
text-decoration: none;
}
form label.error,
#secNameerr {
color: red;
}
.cierr {
font-size: 14px;
}
</style>
<?php
function isJSON($string)
{
return is_string($string) && is_array(json_decode($string, true)) ? true : false;
}
?>
<div class="wraper responsive-width w-90">
<main class="" id="main">
<div class="from-group adding-class form-group_lng">
<a href="<?= base_url(); ?>admin/assign-all-fees">
<button type="button" class="btn btn-primary btn-sm">Assign All Fees</button>
</a> &nbsp;&nbsp;
<a href="<?= base_url(); ?>admin/ae-fee-course/0">
<button type="button" class="btn btn-success btn-sm">Add fees</button>
</a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Fees List <p id="success" style="color:green;"></p>
</div>
<!-- tab added -->
<form method="post" action="<?php echo base_url(); ?>admin/fee-course">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Batch </label>
<select id="course" class="form-control" placeholder="Select Course" name="filter-batch">
<option value=" "> Select ..</option>
<?php
if (isset($batch) || !empty($batch)) {
foreach ($batch as $row) { ?>
<option value="<?php echo $row['id'] ?>" <?= $selected_batch == $row['id'] ? 'selected' : '' ?>>
<?php echo $row['b_name']; ?>
</option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Course Name</label>
<select id="course" class="form-control" placeholder="Select Course" name="filter-course">
<option value=" "> Select ..</option>
<?php if (isset($course) || !empty($course)) {
foreach ($course as $row) { ?>
<option value="<?php echo $row['id'] ?>" <?php echo set_select('filter-course', $row['id'], (!empty($courseId) ? TRUE : FALSE)); ?>>
<?php echo $row['course_name']; ?></option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-course'); ?></div>
</div>
</div>
<div class="col-md-2 pl-0">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Fees Type</label>
<select id="course" class="form-control" placeholder="Select Course" name="filter-feeType">
<option value=" "> Select ..</option>
<?php if (isset($fee_types) || !empty($fee_types)) {
foreach ($fee_types as $row) { ?>
<option value="<?php echo $row['id'] ?>" <?php echo set_select('filter-feeType', $row['id'], (!empty($feeType_id) ? TRUE : FALSE)); ?>>
<?php echo $row['feetype_name']; ?></option>
<?php }
} ?>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-feeType'); ?></div>
</div>
</div>
<div class="col-md-2 p-0">
<div class="form-group">
<label class="mb-0" style="font-size: 13px;">Fees Name</label>
<input type="text" name="filter-feesName" class="form-control" value="<?php echo (isset($feeName) && !empty($feeName)) ? $feeName : '' ?>">
</div>
</div>
<div class="col-md-2">
<div class="form-group" style="margin-top: 1.5rem;">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/fee-course"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg p-0"><i class="fas fa-redo "></i>Reset</button></a>
</div>
</div>
</div>
</form>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Refer Id</th>
<th>Fees Type</th>
<th>Batch</th>
<th>Course</th>
<th>Fees Name</th>
<th>Amount</th>
<th>Due Date</th>
<th>Actions </th>
</tr>
</thead>
<tbody>
<?php
// dd($course_fees);
if (isset($course_fees) && !empty($course_fees)) {
foreach ($course_fees as $key => $value) {
$feenames = json_decode($value['fees_name']);
?>
<tr>
<td><?php echo $key + 1 ?></td>
<td><?php echo $value['id']; ?></td>
<td><?= $value['feetype'] ?></td>
<td><?= $value['batch'] ?></td>
<td><?= $value['course'] ?></td>
<td>
<?php
if (isJSON($value['fees_name'])) {
foreach ($feenames as $index => $ele) {
?> <?= $ele->name ?>-<?= $ele->amount ?>
<?php }
} else {
echo $value['fees_name'];
}
?>
</td>
<td class="text-center"><?= $value['amount'] ?></td>
<td><?= $value['due_date'] ?></td>
<td>
<div class="sub_tabbtnsec">
<!-- <div class="sub_viewbtn" title="view">
<a href="<?php //echo base_url()
?>admin/student_fee_course/<?php //echo $value['id']
?>">
<i class="fa fa-eye" aria-hidden="true"></i>
</a>
</div> -->
<div class="sub_editbtn"><a href="<?php echo base_url() ?>admin/ae-fee-course/<?php echo $value['id'] ?>"><i class="fas fa-pencil-alt"></i></a></div>
<a data-toggle="modal" onclick="coursedel(<?php echo $value['id'] ?>)" href="#deleteModal">
<div class="sub_delbtn">
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
<div>
<a class="action_subject_addbtn" style=" width: 122px !important;display: block;padding: 5px 5px;" href="<?= base_url() ?>admin/manage-installments/<?= $value['id'] ?>">Assign Students</a>
</div>
</div>
</td>
</tr>
<?php }
} else { ?>
<tr>
<td class="text-center" colspan="9">No data Found</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type="hidden" id="fid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#fid').val());">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[50, 75, 100, -1],
[50, 75, 100, "All"]
]
});
//table js end
});
</script>
<script type="text/javascript">
function coursedel(icn) {
$('#fid').val(icn);
}
function deletedata(id) {
window.location.href = "<?php echo base_url(); ?>Admin/delete_course_fees/" + id;
}
</script>

View File

@ -0,0 +1,153 @@
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group adding-class form-group_lng" >
<a href="<?= base_url(); ?>admin/ae-fee-installment/0">
<button type="button" class="btn btn-success btn-sm">Add course fee installment</button>
</a>
</div>
<?php if($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng" >
<div class="subject_lsec">
<div class="subject_lhead">Course Fee Installment List</div>
<div class="fee_table">
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Course Name</th>
<th>Amount</th>
<th>
<div class="row">
<div class="col-md-4">
<b>Payment option</b>
</div>
<div class="col-md-4">
<b>Due Dates</b>
</div>
</div>
</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
foreach ($installments as $key => $value) {
$due_info = json_decode($value['due_amount_date']);
?>
<tr>
<td><?= $key + 1 ?></td>
<td><div class="name_width"><?= $value['course_name'] .'-'. $value['fees_name'] ?></div></td>
<td><?= $value['amount'] ?></td>
<td>
<?php foreach ($due_info as $index => $ele) {
$CI = &get_instance();
$CI->load->model('Admin_model');
$inst_info = $this->db->get_where('payment_types',array('id'=>$index))->row_array();
?>
<div class="row mb-2">
<div class="col-md-4">
<?= $inst_info['payment_type_name'] ?>
</div>
<div class="col-md-6">
<?php
foreach ($ele as $key2 => $value2) { ?>
<span class="mr-1" style=" white-space: nowrap;"><?= $value2->due_date ?>,</span>
<?php } ?>
</div>
</div>
<?php } ?>
</td>
<td><div class="sub_tabbtnsec">
<a href="<?php echo base_url(); ?>admin/ae-fee-installment/<?php echo $value["id"]; ?>">
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
</a>
<a data-toggle="modal" href="#deleteModal">
<div class="sub_delbtn" onclick = "installdel(<?php echo $value['id']; ?>)"><i class="fa fa-trash" aria-hidden="true"></i></div>
</a>
</div></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "inid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#inid').val(), 'installment');">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
//table js
$('#tbl').DataTable( {
"lengthMenu": [[25,50, 100, 150, -1], [25,50, 100, 150, "All"]]
} );
//table js end
});
</script>
<script type="text/javascript">
function installdel(icn){
$('#inid').val(icn);
}
function deletedata(id, table){
window.location.href = "<?php echo base_url(); ?>admin/delete_course_installment/" + id;
}
</script>

View File

@ -0,0 +1,388 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.filter-form-section .form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$theExportHeader = 'The Fee Revert Reports';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . $school_info['address'] . '\n Fee Revert Reports';
}
?>
</div>
<div class="subject_lhead">Fee Revert Reports</div>
<?php
$f_f_types = array();
$f_course = array();
$f_from_date = '';
$f_to_date = '';
$select_particular = '';
if (count($_POST) > 0) {
//echo '<pre>'; print_r($_POST);exit;
if (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types']))
$f_f_types = $_POST['filter_fee_types'];
if (isset($_POST['filter_course']) && !empty($_POST['filter_course']))
$f_course = $_POST['filter_course'];
$f_from_date = $_POST['filter_from_date'];
$f_to_date = $_POST['filter_to_date'];
$select_particular = $_POST['select_particular'];
if ($select_particular == 'today')
$theExportHeader .= ' For Today';
if ($f_from_date != '')
$theExportHeader .= ' From ' . $f_from_date;
if ($f_to_date != '')
$theExportHeader .= ' To ' . $f_to_date;
}
?>
<form action="<?= base_url(); ?>admin/fee-revert-reports" method="POST" id='feeRevertReportsSearchForm'>
<div class="row filter-form-section">
<div class="col-md-2">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Select Fees Type</label>
<select name="filter_fee_types[]" id="filter_fee_types" class=" form-control selectpicker" multiple data-live-search="true">
<option value="" disabled="">Select Fees Type</option>
<?php
if (!empty($all_fee_types)) {
foreach ($all_fee_types as $ftypes) {
?>
<option value="<?php echo $ftypes['id'] ?>" <?php if (in_array($ftypes['id'], $f_f_types)) { ?> selected <?php } ?>> <?php echo $ftypes['feetype_name'] ?> </option>
<?php
}
}
?>
</select>
</div>
</div>
</div>
<div class="col-md-2">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Select Course</label>
<select name="filter_course[]" id="filter_course" class=" form-control selectpicker" multiple data-live-search="true">
<option value="" disabled="">Select Course</option>
<?php
if (!empty($course_list)) {
foreach ($course_list as $crs) {
?>
<option value="<?php echo $crs['id'] ?>" <?php if (in_array($crs['id'], $f_course)) { ?> selected <?php } ?>> <?php echo $crs['course_name'] ?> </option>
<?php
}
}
?>
</select>
</div>
</div>
</div>
<div class="col-md-2">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Select Particular</label>
<select name="select_particular" id="select_particular" class="form-control selectpicker" onchange='manage_select_particular()'>
<option value=''>Select</option>
<option value='today' <?php if ($select_particular == 'today') { ?> selected <?php } ?>>Today</option>
<option value='select_date_range' <?php if ($select_particular == 'select_date_range') { ?> selected <?php } ?>>Select Date Range</option>
</select>
</div>
</div>
</div>
<div class="col-md-2 the-dates" style='display:none;'>
<div class="date-filter">
<div class="date-fil-row">
<label>Start Date</label>
<input type="text" name="filter_from_date" id="filter_from_date" class="form-control nepal-date" value="<?php echo $f_from_date; ?>" placeholder='yyyy-mm-dd'>
</div>
</div>
</div>
<div class="col-md-2 the-dates" style='display:none;'>
<div class="date-filter">
<div class="date-fil-row">
<label>End Date</label>
<input type="text" name="filter_to_date" id="filter_to_date" class="form-control nepal-date" value="<?php echo $f_to_date; ?>" placeholder='yyyy-mm-dd'>
</div>
</div>
</div>
<div class="col-md-2">
<div class="filter-reset">
<input type="button" name="filtersubmit" id="filter_reset1" class="btn btn-success" value="Filter" onclick="search_fee_revert_reports()">
<a href="<?php echo base_url() ?>admin/fee-revert-reports">
<button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg">
<i class="fas fa-redo"></i>Reset
</button>
</a>
</div>
</div>
</div>
</form>
<!-- tab added -->
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" ">
<!-- changed ID -->
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>S.No</th>
<th>StudentID</th>
<th>Student Name</th>
<th>Course</th>
<th>Inovice No</th>
<th>Payment Type</th>
<th>Amount</th>
<th>Done By</th>
<th>Date & Time</th>
</tr>
</thead>
<tbody>
<?php
$rowscount = (isset($the_results) && !empty($the_results)) ? count($the_results) : 0;
if (isset($the_results) && !empty($the_results)) {
$sno = 1;
foreach ($the_results as $res) {
$invoiceNo = $res['invoice_no'];
if ($school_info['invoice_prefix_status'] == 1)
$invoiceNo = $school_info['invoice_prefix'] . $invoiceNo;
$d_by = '-';
if ($res['done_by'] != '') {
$dby_arr = explode(' - ', $res['done_by']);
if (isset($dby_arr[1]) && $dby_arr[1] != '')
$d_by = $dby_arr[1];
}
?>
<tr>
<td><?= $sno; ?></td>
<td><?php echo $res['studentId']; ?></td>
<td><?php echo $res['std_name']; ?></td>
<td><?php echo $res['course_name']; ?></td>
<td><?php echo $invoiceNo; ?></td>
<td>
<?php echo $res['fee_name'] . '<br> (' . $res['feetype_name'] . ')'; ?>
</td>
<td><?php echo $res['payment_amt']; ?></td>
<td><?php echo $d_by; ?></td>
<td><?php echo date('Y-m-d h:iA', strtotime($res['c_date'])); ?></td>
</tr>
<?php
$sno++;
}
} ?>
<tfoot>
<tr>
<!--<th style="text-align:left"></th>
<th style="text-align:left"></th>
<th style="text-align:left"></th>
<th style="text-align:left"></th>
<th style="text-align:right">Total Fee Revert Amount:</th>
<th style="text-align:left"></th>
<th style="text-align:left"></th>
<th style="text-align:left"></th>
<th style="text-align:left"></th>-->
<th colspan="6" style="text-align:right">Total Fee Revert Amount:</th>
<th style="text-align:left"></th>
<th colspan="2" style="text-align:left"></th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
var jsSdate = '<?php echo $f_from_date; ?>';
var jsTdate = '<?php echo $f_to_date; ?>';
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
manage_select_particular();
var currency_symbol = "<?php echo $currency_symbol; ?>";
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
//messageTop: 'the address will come here',
customize: function(doc) {
var rowCount = document.getElementById("tbl1").rows.length;
for (i = 0; i < rowCount; i++) {
for (j = 0; j <= 8; j++) {
doc.content[1].table.body[i][j].alignment = 'center';
/*if(i>0 && j==6)
doc.content[1].table.body[i][j].color = 'red'; */
}
}
},
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8],
modifier: {
page: 'current'
}
},
orientation: 'portrait',
pageSize: 'A3'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8]
}
}
],
"footerCallback": function(row, data, start, end, display) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(6)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(6, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Update footer
$(api.column(0).footer()).html(
''
);
$(api.column(6).footer()).html(
currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
);
}
});
$('#tbl2').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl3').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
function manage_select_particular() {
if ($('#select_particular').val() == 'select_date_range') {
$('#filter_from_date').val(jsSdate);
$('#filter_to_date').val(jsTdate);
$('.the-dates').show();
} else {
$('#filter_from_date').val('');
$('#filter_to_date').val('');
$('.the-dates').hide();
}
}
function search_fee_revert_reports() {
$('#feeRevertReportsSearchForm').submit();
}
</script>
</body>
</html>

View File

@ -0,0 +1,189 @@
<div class="wraper responsive-width">
<main>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="mb-4">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?= base_url() . 'admin/dashboard' ?>">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page"><?= $title ?></li>
</ol>
</nav>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><b> Success !</b> <?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><b> Error !</b> <?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="row justify-content-center">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Add New Fee Type</h5>
<!-- <?php echo base_url(); ?>department -->
<form method="post" action="<?php echo base_url(); ?>admin/fee-types">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" placeholder='Enter fee title' required>
<span>Fee Title</span>
</label>
</div>
<?php ACCOUNTING ? $this->accounting->showFeeTypeMappingOption() : null; ?>
<div class="text-center w-100 mt-3">
<input type="submit" name="addFeeType" id="add_feeType" class="btn btn-sm btn-success w-100" value="Add">
</div>
</form>
</div>
</div>
</div>
<div class="col-md-8 pl-0">
<div class="col-md-12 border rounded py-3">
<!-- -->
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th class="textCenter">S.No</th>
<th class="textCenter">Fee Title</th>
<?php if (ACCOUNTING) : ?>
<th class="textCenter">Default Account</th>
<?php endif; ?>
<th class="textCenter">Is Active</th>
<th class="textCenter">Action</th>
</tr>
</thead>
<tbody>
<?php
foreach ($fee_types as $feeKey => $fee) {
?>
<tr>
<td><?= $feeKey + 1 ?></td>
<td class="text-left"><?= $fee['feetype_name'] ?></td>
<?php if (ACCOUNTING) : ?>
<td class="text-left"><?= $fee['default_account'] ?></td>
<?php endif; ?>
<td><?= ucfirst($fee['is_active']) ?></td>
<td>
<button type="button" class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#updateModal<?= $fee['id'] ?>">
<i class="fa fa-edit"></i>
</button>
<div class="modal fade" id="updateModal<?= $fee['id'] ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Update</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form action="<?= base_url(); ?>admin/fee-types" method="POST" onkeydown=" return event.key != 'Enter'">
<div class="modal-body">
<input type="hidden" name="feeId" value="<?= $fee['id'] ?>">
<div class="form-group mb-0">
<label class="has-float-label">
<input type="text" id="title" name="title" class=" form-control" value="<?= $fee['feetype_name'] ?>" placeholder='Enter fee title' required>
<span>Fee Title</span>
</label>
</div>
<?php ACCOUNTING ? $this->accounting->showFeeTypeMappingOption($default=$fee['default_account']) : null; ?>
<div class="form-group mt-4">
<label class="has-float-label">
<select id="is_active" class="form-control custom-select" placeholder="Is Active" name="is_active">
<option value="yes" <?= $fee['is_active'] == 'yes' ? 'selected' : '' ?>>
Yes
</option>
<option value="no" <?= $fee['is_active'] == 'no' ? 'selected' : '' ?>>
No
</option>
</select>
<span>Is Active</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">Close</button>
<input type="submit" name="updateFeeType" class="btn btn-sm btn-success" value="Update">
</div>
</form>
</div>
</div>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<!--End right-top side-->
<!-- <script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.2.1.slim.min.js"></script> -->
<script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.4.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/all.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/main.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/owl-carousel/js/owl.carousel.min.js"></script>
<script>
$(document).ready(function() {
//table js
$('#tbl').DataTable({
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
//table js end
});
</script>

View File

@ -0,0 +1,301 @@
<style>
.w-60 {
width: 70%;
}
.user-info-row-one {
margin-bottom: 30px !important;
}
.title p {
font-weight: 500;
font-size: 20px;
padding-bottom: 3px;
border-bottom: 1px solid #c6c6c6;
display: inline-block;
}
input {
overflow: visible;
border-color: #fff;
border: none;
width: 130px;
}
input.withB {
border : 1px solid #c6c6c6 !important;
}
.error {
color: red;
}
.discountBox label {
margin-bottom: 0 !important;
margin-top: 10px;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<div class="from-group">
<a href="<?= base_url(); ?>admin/get_application"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="subject_lhead">
</div>
<div class="student-little-info mb-4">
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Student Name : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?= $student_info_array['name'] ?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2">
<span style="font-weight : 600">Email : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?= $student_info_array['email'] ?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2">
<span style="font-weight : 600">Application-id : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?= $student_info_array['applicationid'] ?></span>
</div>
</div>
</div>
<hr>
<form method="POST" action="<?= base_url(); ?>Admin/feecollectionFromStudent" id="feecollectionForm">
<div class="row">
<div class="col-md-12">
<h5><?= (isset($feetypeName) && !empty($feetypeName)) ? $feetypeName : 'Fees '; ?></h5>
</div>
<div class="col-md-8">
<div class="row pt-4">
<div class="col-md-6"><label style='font-weight:500'>Fee Amount : </label></div>
<div class="col-md-6">N- <?php echo (isset($course_fees['amount']) && !empty($course_fees['amount'])) ? $course_fees['amount'] : "No Fees Assigned to Class"; ?> </div>
</div>
<div class="row pt-4">
<?php
// echo '<pre>';
$due_amount_date = (isset($installment['due_amount_date']) && !empty($installment['due_amount_date'])) ? $installment['due_amount_date'] : '';
$installment_data = json_decode($due_amount_date);
$applicationid = (isset($studentinfo['applicationid']) && !empty($studentinfo['applicationid'])) ? $studentinfo['applicationid'] : 0;
?>
<div class="col-md-6"><label style='font-weight:500'>Payment Options : </label></div>
<div class="col-md-6">
<input type="hidden" name="application_id" id="application_id" value="<?php echo $applicationid; ?>">
<input type="hidden" name="installment_id" id="installment_id" value="<?php echo (isset($installment['id']) && !empty($installment['id'])) ? $installment['id'] : 0; ?>">
<input type="hidden" name="course_fee_id" id="course_fee_id" value="<?php echo (isset($installment['course_fee_id']) && !empty($installment['course_fee_id'])) ? $installment['course_fee_id'] : 0; ?>">
<input type="hidden" name="fees_type" id="fees_type" value="<?php echo (isset($feetypeName) && !empty($feetypeName)) ? $feetypeName : ''; ?>">
<select name="payment_options" id="payment_options" class="form-control">
<option value=""> -- Select Payment Option -- </option>
<?php
foreach ($installment_data as $key => $value) {
$paytypesname = $this->db->get_where('payment_types', array('id' => $key))->row_array();
?>
<option value="<?= $key; ?>"><?php echo $paytypesname['payment_type_name']; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="row">
<div class="col-md-6 pt-4"><label style='font-weight:500'>Payment Details:</label></div>
<div class="col-md-6 pt-4">
<div class="instalments-cover">
</div>
</div>
</div>
</div>
<div class="col-md-4"></div>
</div>
<div class="row mt-4">
<div class="col-md-4 pt-2"><label style='font-weight:500'>Fee Amount</label></div>
<div class="col-md-4 ">
<input type="text" name="totalAmount" id="totalAmount" readonly>
<div class="discountBox" style="display:none">
<div>
<label>Choose one option</label>
<select class="form-control" onChange="showDiscountBox(this)" name="deduction_type">
<option value="" Selected>Choose type of reimbursement</option>
<option value="discount">Discount</option>
<option value="scholarship">Scholarship</option>
</select>
</div>
<div id="discount_amount" style="display:none">
<label>Reimbursement Amount<span style="color:red">*</span></label>
<input type="number" name="deduction_amount" id="" class="form-control withB">
</div>
</div>
</div>
<div class="col-md-4 "></div>
</div>
<div class="row mt-4">
<div class="col-md-4 pt-2"><label style='font-weight:500'>Payment Method</label></div>
<div class="col-md-4 ">
<select name="payment_method" class="payment_method form-control valid" id="payment_method">
<option value="">-- Select Payment Method --</option>
<option value="cash">Cash</option>
<option value="bank-transfer">Bank Transfer</option>
</select>
</div>
<div class="col-md-4 ">
<div class="register-row description_section d-none">
<input type="text" name="description" id="description" class="description form-control" placeholder="DD No./Transaction Id">
</div>
<p class="error" id="description-error"></p>
</div>
</div>
<div class="row mt-4">
<div class="col-md-4 pt-2"></div>
<div class="col-md-4 ">
<input type="submit" name="make_payment" class="btn btn-success btn-sm w-100" id="make_payment" value="Make Payment">
</div>
<div class="col-md-4 pt-2"></div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script>
const showDiscountBox = (ele) => {
let value = ele.value;
if(value !== "") {
$('#discount_amount').show();
} else {
$('#discount_amount').hide();
}
}
$(document).ready(function() {
$("#payment_options").on('change', function() {
//alert("hiii");
var amt = 0;
var install_typeId = $('#payment_options option:selected').val();
var installmentId = $('#installment_id').val();
var application_id = $('#application_id').val();
$.ajax({
type: 'post',
url: '<?php echo base_url(); ?>Admin/get_installdetails',
data: {
installment_id: installmentId,
install_type: install_typeId,
applicationid: application_id
},
success: function(resposne) {
console.log(resposne);
$('.instalments-cover').html(resposne);
amt = $('#feeamount').data('amt');
$('#totalAmount').val(amt);
$('.discountBox').show();
}
});
});
var description_section_validation = false;
$('#payment_method').change(function() {
var payment = $('#payment_method :selected').val();
if (payment == 'bank-transfer') {
$('.description_section').removeClass('d-none');
description_section_validation = true;
} else {
$('.description_section').addClass('d-none');
description_section_validation = false;
}
});
});
jQuery.validator.addMethod("validate_amount", function(value, element) {
let feeAmount = $('#totalAmount').val();
let returnValue = (parseInt(value) <= parseInt(feeAmount));
return returnValue;
}, "Please enter amount which is less than fee amount");
$("#feecollectionForm").validate({
// ignore: "input[type='text']:hidden",
ignore: ":hidden",
rules: {
payment_options: {
required: true,
},
payment_method: {
required: true,
},
deduction_amount : {
required : true,
validate_amount : true
}
},
messages: {
payment_options: {
required: "Please Select Payment Installment ",
},
payment_method: {
required: "Please Select Payment Method",
}
},
submitHandler: function(form) {
var payment1 = $('#payment_method :selected').val();
var description_length = $("input#description").val().length;
if (payment1 == 'bank-transfer') {
if (description_length < 3) {
$('#description-error').text('Length is short, minimum 3 Characters required.');
} else {
form.submit();
}
} else {
form.submit();
}
}
});
</script>

View File

@ -0,0 +1,80 @@
<!--<script src="<?php echo base_url(); ?>assets_admin/js/jquery-3.4.1.min.js"></script>-->
<script src="<?php echo base_url(); ?>assets_admin/js/jquery-ui.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/bootstrap.min.js"></script>
<!-- <script defer src="<?php echo base_url(); ?>assets_admin/js/all.js"></script> -->
<script defer src="<?php echo base_url(); ?>assets_admin/js/main.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/owl-carousel/js/owl.carousel.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/nepali.datepicker.v3.7.min.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/bootstrap4-toggle.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/datatable-2-1-0/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/datatable-2-1-0/pdfmake.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/datatable-2-1-0/vfs_fonts.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/datatable-2-1-0/buttons.html5.min.js">
</script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/datatable-2-1-0/jszip.min.js"> </script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/datatable-2-1-0/buttons.print.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/datatable-2-1-0/buttons.print.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.colVis.min.js">
</script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.semanticui.min.js">
</script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets_admin/js/dataTables.fixedColumns.min.js"></script>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
let url = window.location.href.toLowerCase();
let flag = false;
let Clickedurl;
$('ul.admin-sidebar li').removeClass('active');
$('ul.admin-sidebar li a').each(function() {
Clickedurl = $(this).attr('href').toLowerCase();
if (url == Clickedurl) {
console.log(url, Clickedurl)
flag = true;
let liParent = $(this).parent();
liParent.addClass('active');
$.ajax({
url: '<?php echo base_url() ?>teacher/update_link_active',
data: {
link: url
},
type: 'POST',
async: false,
success: function(data) {}
});
}
});
if (flag == false) {
Clickedurl = '<?php echo isset($_SESSION['active_old_link']) ? $_SESSION['active_old_link'] : 0 ?>';
$('ul.admin-sidebar li a').each(function() {
if ($(this).attr('href') == Clickedurl) {
let liParent = $(this).parent();
liParent.addClass('active');
}
});
}
});
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html>
<body style="background-color:#e2e1e0;font-family: Open Sans, sans-serif;font-size:100%;font-weight:400;line-height:1.4;color:#000;">
<table style=" max-width: 670px;margin:50px auto 10px;background-color:#fff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);-moz-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24); line-height: 25px;">
<tr>
<td colspan="3">
<table style="padding:20px 30px;padding: 20px 30px;background: #fff;width: 100%;padding: 115px auto 0;">
<tbody>
<tr style="padding: 20px 0;text-align: center;">
<td><img src="<?= $baseurl; ?>assets_admin/images/erisn-blue.png"></td>
</tr>
<tr style="text-align: center;">
<td><img src="<?= $baseurl; ?>assets_admin/images/mail-image.png" style="margin-top: 20px"></td>
</tr>
<tr>
<td style="font-weight: 800;font-size: 22px;"> Reset Password</td>
</tr>
<tr>
<td style="padding-top: 20px;font-weight: 500;font-size: 16px;"> Dear <?= $admin_name; ?>,</td>
</tr>
<tr>
<td>
<p style="font-weight: 400;font-size: 16px;">A Request has been received to change the password for your ErisnClassroom Admin Account</p>
</td>
</tr>
<tr>
<td>
<p class="email-temp" style="font-size: 14px; font-weight: 400; margin: 2% 0 0% 0;">Best Regards,</p>
<p class="email-temp" style="font-size: 14px; font-weight: 400; margin: 0% 0 3% 0;">Team Erisn</p>
</td>
</tr>
<tr style="text-align: center;">
<td>
<a href="<?php echo $reset_link?>" target="_blank" style="color: #ffffff; text-decoration: none;">
<span class="email-temp" style="padding: 1% 2%; border-radius: 4px;border: none; color: #fff;font-weight: 500;font-size: 16px;background-color: #032DA1; cursor:pointer;">Password Reset Link</span>
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table style="width: 100%;background: #fff;color: #032DA1;padding:10px 20px">
<tr style="text-align: center;">
<td colspan="2">
<ul style="list-style-type: none;padding: 0;">
<li style="margin-bottom: 4px;">
<a href="<?php echo ERISN_WEB_URL ?>" target="_blank" style="color: #032DA1;text-decoration: none;font-size: 14px;">
<img src="<?= $baseurl; ?>assets_admin/images/mail-globe.png" style="width: 20px;margin-right: 10px;vertical-align: middle;">www.erisnclassroom.com</a>
</li>
</ul>
</td>
<td colspan="2">
<ul style="list-style-type: none;padding: 0;">
<li style="margin-bottom: 4px;">
<a href="mailto:<?php echo ADMIN_PASSWORD_MAIL_TO ?>" target="_blank" style="color: #032DA1;text-decoration: none;font-size: 14px;">
<img src="<?= $baseurl; ?>assets_admin/images/mail-envelope.png" style="width: 20px;margin-right: 10px;vertical-align: middle;">erisnclassroom@gmail.com</a>
</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,125 @@
<style>
form label.error,
#mailErr {
color: #ff0000;
}
</style>
<div class="login-wrap">
<div class="login-box-cover-outter forget-box-cover-outter">
<div class="login-box-cover">
<div class="login-heading">
<!-- <h3>Welcome To</h3>-->
<h2>Erisn Classroom<br> Admin Portal</h2>
</div>
<div class="login-box">
<h3>Forgot Password?</h3>
<form id="restPasswordForm" method="post">
<div class="login-row">
<p>Please enter your email address verify for sending link to change password.</p>
</div>
<div class="login-row">
<label class="login-lbl">
Email Address*
</label>
<input type="text" onkeydown="hideMessages()" name="email" placeholder="Enter email address">
<p class="loginErr" style="display : none">Entered email-id does not exist</p>
</div>
<p id="mailErr" style="display : none;">Mail could not be sent, Please try again later</p>
<p class="loading" style="display:none">Please wait....</p>
<p class="loginSuccess" style="display : none">An email has been sent to your email id with link to reset your password. Click on the link to reset your password.</p>
<div class="login-row">
<button class="common-btn">Submit</button>
</div>
</form>
<div class="backto-login">
<a href="<?php echo base_url() ?>admin"> &lt; Back to login </a>
</div>
</div>
</div>
</div>
</div>
<script>
function hideMessages() {
$('.loginErr').hide();
$('.loginSuccess').hide();
$('#mailErr').hide();
}
jQuery.validator.addMethod("emailregex", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/.test(value);
}, 'Email Address is invalid: Please enter a valid email address.');
$("#restPasswordForm").validate({
ignore: ":hidden",
rules: {
email: {
required: true,
email: true,
emailregex: true
}
},
messages: {
email: {
required: "Please enter your email id",
},
},
submitHandler: function(form) {
var flag = false;
emailValue = $('input[name="email"]', form).val();
$.ajax({
method: 'POST',
url: '<?php echo base_url() ?>/admin/ajax_send_password_email',
data: {
email: emailValue
},
beforeSend: function() {
$('.loading').show();
$('.common-btn').hover(function() {
$(this).css({
'cursor': 'wait'
})
});
$(document.body).css({
'cursor': 'wait'
});
},
success: function(data) {
// console.log(data);
$('.loading').hide();
$(document.body).css({
'cursor': 'default'
});
$('.common-btn').hover(function() {
$(this).css({
'cursor': 'pointer'
})
});
if (data == 'failed') {
$('.loginErr').show();
}
if (data == 'success') {
$('.loginSuccess').show();
}
if (data == 'mailErr') {
$('#mailErr').show();
}
}
})
// form.submit();
}
});
</script>

View File

@ -0,0 +1,326 @@
<div class="row">
<div class="col-md-8"></div>
<?php
$urlparam = urlencode(serialize($download_url));
?>
</div>
<div class="wraper responsive-width" style="height:100% !important;">
<main class="" id="main">
<!-- <div class="main-wrap" style="page-break-after: always;">
<div class="dashboard-cover">
</div>
</div> -->
<?php
// echo '<pre>';
// print_r($student_info);
?>
<div class="from-group">
<a href="<?= base_url(); ?>admin/student/certificates"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_l_full_width">
<!-- <?php
if (!empty($this->session->flashdata('certificateSuccess'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('certificateFailed'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('failed'); ?>
</div>
<?php } ?> -->
<div class="subject_lsec">
<div class="subject_lhead"><?php echo 'Certificate Details'; ?></div>
<?php
$studentId = (isset($student_info['student_id'])) ? $student_info['student_id'] : '';
$studentName = (isset($student_info['name'])) ? $student_info['name'] : '';
$dob = (isset($student_info['dob'])) ? $student_info['dob'] : '';
$course = (isset($student_info['course_name'])) ? $student_info['course_name'] : '';
$section = (isset($student_info['section_name'])) ? $student_info['section_name'] : '';
$rollNo = (isset($student_info['roll_no'])) ? $student_info['roll_no'] : '';
$contactNumber = (isset($student_info['mobile'])) ? $student_info['mobile'] : '';
$emergencyContactName = (isset($student_info['emergency_contact_name'])) ? $student_info['emergency_contact_name'] : '';
$emergencyContactNumber = (isset($student_info['emergency_contact_number'])) ? $student_info['emergency_contact_number'] : '';
$addressArray = array();
if (isset($student_info['address1']) && $student_info['address1'] != '') {
array_push(
$addressArray,
$student_info['address1']
);
}
if (isset($student_info['address2']) && $student_info['address2'] != '') {
array_push(
$addressArray,
$student_info['address2']
);
}
if (isset($student_info['state']) && $student_info['state'] != '') {
array_push(
$addressArray,
$student_info['state']
);
}
if (isset($student_info['country']) && $student_info['country'] != '') {
array_push(
$addressArray,
$student_info['country']
);
}
$certificateId = (isset($student_certificate_info['id'])) ? $student_certificate_info['id'] : 0;
$studentAddress = (isset($student_certificate_info['address'])) ? $student_certificate_info['address'] : implode(', ', $addressArray);
$academicSessionStartYear = (isset($student_certificate_info['session_starts'])) ? $student_certificate_info['session_starts'] : (int) $issue_year;
$academicSessionEndsYear = (isset($student_certificate_info['session_ends'])) ? $student_certificate_info['session_ends'] :
(int) $issue_year;
$fatherName = (isset($student_certificate_info['father_name'])) ? $student_certificate_info['father_name'] : '';
$motherName = (isset($student_certificate_info['mother_name'])) ? $student_certificate_info['mother_name'] : '';
$examination = (isset($student_certificate_info['examination'])) ? $student_certificate_info['examination'] : '';
$examinationYear = (isset($student_certificate_info['examination_year'])) ? $student_certificate_info['examination_year'] : (int) $issue_year;
$securedMark = (isset($student_certificate_info['secured_mark'])) ? $student_certificate_info['secured_mark'] : '';
$remarks = (isset($student_certificate_info['remarks'])) ? $student_certificate_info['remarks'] : '';
$admissionNumber = (isset($student_certificate_info['admission_number'])) ? $student_certificate_info['admission_number'] : '';
$registrationNumber = (isset($student_certificate_info['registration_number'])) ? $student_certificate_info['registration_number'] : '';
$symbolNumber = (isset($student_certificate_info['symbol_number'])) ? $student_certificate_info['symbol_number'] : '';
$type = (isset($student_certificate_info['type'])) ? $student_certificate_info['type'] : '';
$isGenerated = (isset($student_certificate_info['created_on'])) ? true : false;
?>
<!-- <?= $isGenerated ?> -->
<!-- If the certificate is already generated then dispalying in table view for view and print option. -->
<?php if ($isGenerated) { ?>
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<!-- <th></th> -->
<th>Student Name</th>
<th>Class</th>
<th>Roll No</th>
<th>Certificate Type</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<!-- <td class=" p-0"><span class="fa fa-circle text-success text-small"></span></td> -->
<td><?= $studentName ?></td>
<td><?= $course ?></td>
<td><?= $rollNo ?></td>
<td>
<?php
if ($type == 'tc') {
echo 'Transfer Certificate';
} else if ($type == 'cc') {
echo 'Character Certificate';
} else if ($type == 'tcc') {
echo 'Transfer & Character Certificate';
}
?>
</td>
<td>
<a href="<?php echo base_url(); ?>admin/view-certificate?data=<?= $urlparam; ?>&type=<?= $type ?>" data-toggle="tooltip" title="View" target="_blank">
<i class="fa fa-eye p-2 h6" style="color:#032da1" aria-hidden="true"></i>
</a>
<!-- <a href="<?php echo base_url(); ?>admin/download-certificate?data=<?= $urlparam; ?>&type=<?= $type ?>" data-toggle="tooltip" title="Download" target="_blank">
<i class="fa fa-download p-2 h6" style="color:#032da1" aria-hidden="true"></i>
</a> -->
</td>
</tr>
</tbody>
</table>
<hr>
<?php } ?>
<form action="<?php echo base_url() ?>Admin/create_studentCertificate" class="mb-5" method="post" id="userForm">
<input type="hidden" name="student_id" id="student_name" class="form-control" value="<?= $studentId; ?>">
<input type="hidden" name="batch_id" id="batch_id" class="form-control" value="<?= $student_info['batch_id']; ?>">
<input type="hidden" name="course_id" id="course_id" class="form-control" value="<?= $student_info['course_id']; ?>">
<input type="hidden" name="section_id" id="section_id" class="form-control" value="<?= $student_info['section_id']; ?>">
<input type="hidden" name="gender" id="gender" class="form-control" value="<?= $student_info['gender']; ?>">
<input type="hidden" name="certificateId" id="certificateId" class="form-control" value="<?= $certificateId ?>">
<div class="subject_lformarea">
<div class="row">
<div class="col form-group">
<label for="">Student Name <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="student_name" id="student_name" class="form-control" value="<?= $studentName; ?>" placeholder="Student name" readonly>
</div>
<div class="col form-group">
<label for="">Class <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="student_class" id="student_class" class="form-control" value="<?= $course; ?>" placeholder="Class" readonly>
</div>
<div class="col form-group">
<label for="">Section <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="student_section" id="student_section" class="form-control" value="<?= $section; ?>" placeholder="Section" readonly>
</div>
<div class="col form-group">
<label for="">Roll Number <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="student_roll_no" id="student_roll_no" class="form-control" value="<?= $rollNo; ?>" placeholder="Roll Number" readonly>
</div>
</div>
<div class="row">
<div class="col form-group">
<label for="">Date Of Birth</label>
<!-- <input type="date" name="dob" value="<?php echo $dob ?>" class="form-control" placeholder=""> -->
<div class="po-calendar">
<input type="text" style="background-color: transparent;" name="dob" class="nepal-date form-control" value="<?php echo $dob ?>" placeholder="">
<i class="fas fa-calendar-alt cal-icon"></i>
</div>
</div>
<div class="col form-group">
<label for="">Address <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="student_address" id="student_address" class="form-control" value="<?= $studentAddress; ?>" placeholder="Address" required>
</div>
</div>
<hr>
<label class="font-weight-bold">Academic Session <span class="text-danger font-weight-bold">*</span></label>
<div class="row">
<div class="col form-group">
<input type="number" name="academic_session_starts" id="academic_session_starts" class="form-control" max="<?= (int) $issue_year ?>" value="<?= (int) $academicSessionStartYear - 1 ?>" placeholder="School Joined Year">
</div>
<div class="col form-group">
<input type="number" name="academic_session_ends" id="academic_session_ends" class="form-control" max="<?= (int) $issue_year ?>" value="<?= $academicSessionEndsYear ?>" placeholder="Ends">
</div>
</div>
<hr>
<label class="font-weight-bold">Parents Details <span class="text-danger font-weight-bold">*</span></label>
<div class="row">
<div class="col form-group">
<input type="text" name="student_father_name" id="student_father_name" class="form-control" placeholder="Father's Name" value="<?= $fatherName ?>" required>
</div>
<div class="col form-group">
<input type="text" name="student_mother_name" id="student_mother_name" class="form-control" placeholder="Mother's Name" value="<?= $motherName ?>" required>
</div>
</div>
<hr>
<label class="font-weight-bold">Examination Detail </label>
<div class="row">
<div class="col form-group">
<label for="">Examination <span class="text-danger font-weight-bold">*</span></label>
<select name="examination" class="scountry form-control" id="examination">
<option value="" selected> Select Exam</option>
<?php foreach ($offline_exams as $oe_key => $offline_exam) { ?>
<option value="<?= $offline_exam['exam_name'] ?>" <?= $examination == $offline_exam['exam_name'] ? 'selected' : '' ?>><?= $offline_exam['exam_name'] ?></option>
<?php } ?>
</select>
</div>
<div class="col form-group">
<label for="">Examination Year <span class="text-danger font-weight-bold">*</span></label>
<input type="number" name="examination_year" id="examination_year" class="form-control" max="<?= (int) $issue_year ?>" value="<?= $examinationYear ?>" placeholder="Examination Year" required>
</div>
<div class="col form-group">
<label for="">Secured Marks / Grade <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="secured_mark" id="secured_mark" class="form-control" placeholder="Mark / Grade" value="<?= $securedMark ?>" required>
</div>
</div>
<div class="row">
<div class="col form-group">
<label for="">Remarks <span class="text-danger font-weight-bold">*</span></label>
<input type="text" name="remarks" id="remarks" class="form-control" placeholder="Remarks" value="<?= $remarks ?>" required>
</div>
</div>
<hr>
<label class="font-weight-bold">Additional Info </label>
<div class="row">
<div class="col form-group">
<label for="">Admission Number </label>
<input type="text" name="admission_number" id="admission_number" class="form-control" value="<?= $admissionNumber ?>" placeholder="Admission Number">
</div>
<div class="col form-group">
<label for="">Registration Number </label>
<input type="text" name="registration_number" id="registration_number" class="form-control" value="<?= $registrationNumber ?>" placeholder="Registration Number">
</div>
<div class="col form-group">
<label for="">Symbol Number </label>
<input type="text" name="symbol_number" id="symbol_number" class="form-control" value="<?= $symbolNumber ?>" placeholder="Symbol Number">
</div>
</div>
<hr>
<div class="row mb-4">
<div class="col-md-12 my-2">
<h6 class="font-weight-bold">Certificate Type<span class="text-danger font-weight-bold">*</span></h6>
</div>
<div class="col-md-6 col-height">
<div class="register-row">
<select name="certificate_type" class="scountry form-control" id="certificate_type">
<option value="" selected>--Select--</option>
<option value="tc" <?= $type == 'tc' ? 'selected' : '' ?>>Transfer Certificate</option>
<option value="cc" <?= $type == 'cc' ? 'selected' : '' ?>>Character Certificate</option>
<option value="tcc" <?= $type == 'tcc' ? 'selected' : '' ?>>Combined Transfer & Character</option>
</select>
</div>
</div>
</div>
<input type="submit" class="col subject_addbtn" value="<?= $type != '' ? 'Updae Info' : 'Generate' ?>" name="submit_info">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
$('#tbl').DataTable({
// "lengthMenu": [
// [25, 50, 100, 150, -1],
// [25, 50, 100, 150, "All"]
// ]
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bInfo": false,
"searching": false, // Search Box will Be Disabled
"ordering": false,
});
});
</script>

View File

@ -0,0 +1,227 @@
<style>
#tbl1 tr th {
font-weight: 600;
font-size: 12px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="">
<div class=" subject_l_full_width ">
<div class="subject_lsec">
<!-- <button style="font-size: 14px;padding: 6px 25px;" class="subject_addbtn ">Back</button> -->
<div class="subject_lhead"><?php echo $title; ?>
</div>
<a href="<?= base_url() . 'admin/export_mark_card?batch=' . $batch_id . '&course=' . $course_id . '&exam=' . $exam_id . '&section=' . $section_id . '' ?>" class="btn btn-outline-primary mb-2">Export Excel</a>
<?php //dd($student_results);
// echo '<pre>';
// print_r($student_results);
?>
<table id="tbl1" style='width:100%;' class="table table-bordered table-striped text-center">
<thead>
<tr>
<th rowspan="2">SNo</th>
<th rowspan="2">student Name</th>
<th rowspan="2">Roll No </th>
<?php if (count($course_subjects) > 0) {
foreach ($course_subjects as $cs_value) {
?>
<th colspan="3"><?= $cs_value['subject_name'] ?></th>
<?php
}
}
?>
<th rowspan="2">Total Marks</th>
<!-- <th rowspan="2">GPA</th>
<th rowspan="2">Final Grade</th>
<th rowspan="2">Remarks</th> -->
<th rowspan="2">Percentage (%)</th>
</tr>
<tr>
<?php if (count($course_subjects) > 0) {
foreach ($course_subjects as $cs_value) {
?>
<th>Th. Mark </th>
<!-- <th>Th. Grade</th> -->
<th>Pr. Marks</th>
<!-- <th>Pr. Grade</th> -->
<th>
Total Mark
</th>
<!-- <th>Subject Grade</th> -->
<?php
}
}
?>
</tr>
</thead>
<tbody>
<?php
$total_subjects = (count($course_subjects) * 3);
$sno = 1;
if (count($student_results) > 0) {
foreach ($student_results as $studkey => $student) {
?>
<tr>
<th><?= $sno; ?></th>
<th><?= $student['student_name'] ?></th>
<th><?= $student['roll_no'] ?></th>
<?php
$theFinalresult = array();
// echo'<pre>;
// print_r($theFinalresult);;
foreach ($course_subjects as $csk => $csv) {
// echo'<pre>';
// print_r($student['subject_results'][$csv['subject_id']['total_full_marks']]);
if (isset($student['subject_results']) && count($student['subject_results']) > 0) {
if (isset($student['subject_results'][$csv['subject_id']]['sub_id']) && ($student['subject_results'][$csv['subject_id']]['sub_id'] == $csv['subject_id'])) {
?>
<td><?php echo (isset($student['subject_results'][$csv['subject_id']]['th_obt_marks']) && !empty($student['subject_results'][$csv['subject_id']]['th_obt_marks'])) ? $student['subject_results'][$csv['subject_id']]['th_obt_marks'] : ''; ?></td>
<!-- <td><?php echo (isset($student['subject_results'][$csv['subject_id']]['th_obt_grade']) && !empty($student['subject_results'][$csv['subject_id']]['th_obt_grade'])) ? $student['subject_results'][$csv['subject_id']]['th_obt_grade'] : ''; ?></td> -->
<td><?php echo (isset($student['subject_results'][$csv['subject_id']]['pr_obt_marks']) && !empty($student['subject_results'][$csv['subject_id']]['pr_obt_marks']) && ($student['subject_results'][$csv['subject_id']]['pr_obt_marks']) != 0.00) ? $student['subject_results'][$csv['subject_id']]['pr_obt_marks'] : ''; ?></td>
<!-- <td><?php echo (isset($student['subject_results'][$csv['subject_id']]['th_obt_grade']) && !empty($student['subject_results'][$csv['subject_id']]['pr_obt_grade'])) ? $student['subject_results'][$csv['subject_id']]['pr_obt_grade'] : ''; ?></td> -->
<td><?php echo (isset($student['subject_results'][$csv['subject_id']]['total_obt_marks']) && !empty($student['subject_results'][$csv['subject_id']]['total_obt_marks'])) ? $student['subject_results'][$csv['subject_id']]['total_obt_marks'] : ''; ?></td>
<!-- <td><?php echo (isset($student['subject_results'][$csv['subject_id']]['total_obt_grade']) && !empty($student['subject_results'][$csv['subject_id']]['total_obt_grade'])) ? $student['subject_results'][$csv['subject_id']]['total_obt_grade'] : ''; ?></td> -->
<?php
$theFinalresult[] = array(
'exam_total_obt_marks' => (isset($student['subject_results'][$csv['subject_id']]['exam_total_obt_marks']) && !empty($student['subject_results'][$csv['subject_id']]['exam_total_obt_marks'])) ? $student['subject_results'][$csv['subject_id']]['exam_total_obt_marks'] : '',
'exam_gpa' => (isset($student['subject_results'][$csv['subject_id']]['gpa']) && !empty($student['subject_results'][$csv['subject_id']]['gpa'])) ? $student['subject_results'][$csv['subject_id']]['gpa'] : '',
'remarks_gpa' => (isset($student['subject_results'][$csv['subject_id']]['remarks_gpa']) && !empty($student['subject_results'][$csv['subject_id']]['remarks_gpa'])) ? $student['subject_results'][$csv['subject_id']]['remarks_gpa'] : '',
'exams_total_percentage' => (isset($student['subject_results'][$csv['subject_id']]['exams_total_percentage']) && !empty($student['subject_results'][$csv['subject_id']]['exams_total_percentage'])) ? $student['subject_results'][$csv['subject_id']]['exams_total_percentage'] : '',
'exam_total_obt_grade' => (isset($student['subject_results'][$csv['subject_id']]['grade']) && !empty($student['subject_results'][$csv['subject_id']]['grade'])) ? $student['subject_results'][$csv['subject_id']]['grade'] : '',
);
} else {
echo " <td><b style='color:red;'>NA</b></td>
<td><b style='color:red;'>NA</b></td>
<td><b style='color:red;'>NA</b></td>";
}
} else { ?>
<td>-</td>
<td>-</td>
<td>-</td>
<?php
}
?>
<?php }
if (count($theFinalresult) > 0) {
?>
<td><?php echo (isset($theFinalresult[0]['exam_total_obt_marks']) && !empty($theFinalresult[0]['exam_total_obt_marks'])) ? $theFinalresult[0]['exam_total_obt_marks'] : ''; ?></td>
<!-- <td><?php echo (isset($theFinalresult[0]['exam_gpa']) && !empty($theFinalresult[0]['exam_gpa'])) ? $theFinalresult[0]['exam_gpa'] : ''; ?></td> -->
<!-- <td>
<?php
if (isset($theFinalresult[0]['remarks_gpa']) && !empty($theFinalresult[0]['remarks_gpa'])) {
foreach ($exam_grade_system as $g_row) {
if ($theFinalresult[0]['remarks_gpa'] == $g_row['remarks']) {
echo $g_row['grade'];
}
}
} else {
echo '-';
}
echo (isset($theFinalresult[0]['exam_total_obt_grade']) && !empty($theFinalresult[0]['exam_total_obt_grade'])) ? $theFinalresult[0]['exam_total_obt_grade'] : '';
?>
</td> -->
<!-- <td><?php echo (isset($theFinalresult[0]['remarks_gpa']) && !empty($theFinalresult[0]['remarks_gpa'])) ? $theFinalresult[0]['remarks_gpa'] : ''; ?></td> -->
<td><?php echo (isset($theFinalresult[0]['exams_total_percentage']) && !empty($theFinalresult[0]['exams_total_percentage'])) ? $theFinalresult[0]['exams_total_percentage'] : ''; ?></td>
</tr>
<?php
}
$sno++;
}
} ?>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<?php
$theExportHeader = 'The Markscard Reports';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'];
}
?>
</div>
<script>
$(document).ready(function() {
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
$('#tbl1').DataTable({
"lengthMenu": [
[100, 125, 150, -1],
[100, 125, 150, "All"]
],
fixedColumns: {
left: 2,
},
dom: 'lBfrtip',
buttons: [{
extend: 'pdfHtml5',
title: 'Student List',
orientation: 'landscape',
pageSize: 'LEGAL',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
}
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
]
});
});
</script>

View File

@ -0,0 +1,328 @@
<style>
#tbl1 tr th {
font-weight: 600;
font-size: 12px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="">
<div class=" subject_l_full_width ">
<div class="subject_lsec">
<!-- <button style="font-size: 14px;padding: 6px 25px;" class="subject_addbtn ">Back</button> -->
<div class="subject_lhead"><?php echo $title; ?>
</div>
<?php //dd($student_results);
// echo '<pre>';
// print_r($student_results);
?>
<table id="tbl1" style='width:100%;' class="table table-bordered table-striped text-center">
<thead>
<tr>
<!-- <th rowspan="2">SNo</th> -->
<th rowspan="2">Student Name</th>
<th rowspan="2">Roll No </th>
<?php
// if (count($theSubjects) > 0) {
// foreach ($theSubjects as $cs_value) {
//
?>
<!-- // <th colspan="2"><?= $cs_value['subject_name'] ?></th> -->
<?php
// }
// }
?>
<?php if (count($theSubjects) > 0) {
// echo '<pre>';
// print_r($theSubjects);
foreach ($theSubjects as $cs_value) {
?>
<th>
<?php
// echo $cs_value['subject_name'] . ' (Obt. Mark)';
?>
</th>
<th>
<?php
// echo $cs_value['subject_name'] . ' (Grade)';
?>
</th>
<?php
}
}
?>
<th rowspan="2">Total Marks</th>
<th rowspan="2">GPA</th>
<th rowspan="2">Final Grade</th>
<th rowspan="2">Remarks</th>
<th rowspan="2">Percentage (%)</th>
</tr>
<tr>
<?php if (count($theSubjects) > 0) {
// echo '<pre>';
// print_r($theSubjects);
foreach ($theSubjects as $cs_value) {
?>
<!--<th>Th. Mark </th>-->
<!--<th>Th. Grade</th>-->
<!--<th>Pr. Marks</th>-->
<!--<th>Pr. Grade</th>-->
<!-- <th> -->
<!-- <label style="font-weight: 500; font-size: 12px;"> -->
<!-- <?php echo 'Total Mark (' . $cs_value['subject_name'] . ')'; ?> -->
<!-- </label> -->
<!-- </th> -->
<!-- <th> -->
<!-- <label style="font-weight: 500; font-size: 12px;"> -->
<!-- <?php echo 'Subject Grade (' . $cs_value['subject_name'] . ')'; ?> -->
<!-- </label> -->
<!-- </th> -->
<th>
<?php
echo $cs_value['subject_name'] . ' (Obt. Mark)';
?>
</th>
<th>
<?php echo $cs_value['subject_name'] . ' (Grade)'; ?>
</th>
<?php
}
}
?>
</tr>
</thead>
<tbody>
<?php
$total_subjects = (count($theSubjects) * 6);
$sno = 1;
if (count($student_results) > 0) {
foreach ($student_results as $studkey => $student) {
?>
<!-- <th><?= $sno; ?></th> -->
<th><?= $student['student_name'] ?></th>
<th><?= $student['roll_no'] ?></th>
<?php
$theFinalresult = array();
// echo'<pre>;
// print_r($theFinalresult);;
foreach ($theSubjects as $csk => $csv) {
// echo'<pre>';
// print_r($student['subject_results'][$csv['subject_id']['total_full_marks']]);
if (isset($student['subject_results']) && count($student['subject_results']) > 0) {
if (isset($student['subject_results'][$csv['subject_id']]['sub_id']) && ($student['subject_results'][$csv['subject_id']]['sub_id'] == $csv['subject_id'])) {
?>
<td>
<?php echo (isset($student['subject_results'][$csv['subject_id']]['total_obt_marks']) && !empty($student['subject_results'][$csv['subject_id']]['total_obt_marks'])) ? $student['subject_results'][$csv['subject_id']]['total_obt_marks'] : ''; ?>
</td>
<td>
<?php echo (isset($student['subject_results'][$csv['subject_id']]['total_obt_grade']) && !empty($student['subject_results'][$csv['subject_id']]['total_obt_grade'])) ? $student['subject_results'][$csv['subject_id']]['total_obt_grade'] : ''; ?>
</td>
<?php
$theFinalresult[] = array(
'exam_total_obt_marks' => (isset($student['subject_results'][$csv['subject_id']]['exam_total_obt_marks']) && !empty($student['subject_results'][$csv['subject_id']]['exam_total_obt_marks'])) ? $student['subject_results'][$csv['subject_id']]['exam_total_obt_marks'] : '',
'exam_gpa' => (isset($student['subject_results'][$csv['subject_id']]['gpa']) && !empty($student['subject_results'][$csv['subject_id']]['gpa'])) ? $student['subject_results'][$csv['subject_id']]['gpa'] : '',
'remarks_gpa' => (isset($student['subject_results'][$csv['subject_id']]['remarks_gpa']) && !empty($student['subject_results'][$csv['subject_id']]['remarks_gpa'])) ? $student['subject_results'][$csv['subject_id']]['remarks_gpa'] : '',
'exams_total_percentage' => (isset($student['subject_results'][$csv['subject_id']]['exams_total_percentage']) && !empty($student['subject_results'][$csv['subject_id']]['exams_total_percentage'])) ? $student['subject_results'][$csv['subject_id']]['exams_total_percentage'] : '',
'exam_total_obt_grade' => (isset($student['subject_results'][$csv['subject_id']]['total_obt_grade']) && !empty($student['subject_results'][$csv['subject_id']]['total_obt_grade'])) ? $student['subject_results'][$csv['subject_id']]['total_obt_grade'] : '',
);
} else {
echo "
<td><b style='color:red;'>NA</b></td>
<td><b style='color:red;'>NA</b></td>";
}
} else { ?>
<td>-</td>
<td>-</td>
<?php
}
?>
<?php }
if (count($theFinalresult) > 0) {
?>
<td><?php echo (isset($theFinalresult[0]['exam_total_obt_marks']) && !empty($theFinalresult[0]['exam_total_obt_marks'])) ? $theFinalresult[0]['exam_total_obt_marks'] : ''; ?></td>
<td><?php echo (isset($theFinalresult[0]['exam_gpa']) && !empty($theFinalresult[0]['exam_gpa'])) ? $theFinalresult[0]['exam_gpa'] : ''; ?></td>
<td><?php echo (isset($theFinalresult[0]['exam_total_obt_grade']) && !empty($theFinalresult[0]['exam_total_obt_grade'])) ? $theFinalresult[0]['exam_total_obt_grade'] : ''; ?></td>
<td><?php echo (isset($theFinalresult[0]['remarks_gpa']) && !empty($theFinalresult[0]['remarks_gpa'])) ? $theFinalresult[0]['remarks_gpa'] : ''; ?></td>
<td><?php echo (isset($theFinalresult[0]['exams_total_percentage']) && !empty($theFinalresult[0]['exams_total_percentage'])) ? $theFinalresult[0]['exams_total_percentage'] : ''; ?></td>
</tr>
<?php
}
$sno++;
}
} ?>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<?php
$theExportHeader = 'The Markscard Reports';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'];
}
?>
</div>
<script>
$(document).ready(function() {
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
$('#tbl1').DataTable({
"lengthMenu": [
[100, 125, 150, -1],
[100, 125, 150, "All"]
],
fixedColumns: {
left: 2,
},
dom: 'lBfrtip',
buttons: [{
extend: 'pdfHtml5',
title: 'Student List',
orientation: 'landscape',
pageSize: 'LEGAL',
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
}
},
// {
// extend: 'colvis',
// }
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
},
]
});
});
///
// $('#example').DataTable({
// searching: false, paging: false, info: false, ordering: false,
// dom: 'Bfrtip',
// buttons: [
// {
// extend: 'excelHtml5',
// exportOptions: {
// columns: "thead th:not(.noExport)",
// rows: function (indx, rowData, domElement) {
// return $(domElement).css("display") != "none";
// }
// },
// customize: function (xlsx) {
// var sheet = xlsx.xl.worksheets['sheet1.xml'];
// $('row c[r^="C"]', sheet).attr('s', '2');
// }
// },
// {
// extend: 'csvHtml5',
// exportOptions: {
// columns: "thead th:not(.noExport)",
// rows: function (indx, rowData, domElement) {
// return $(domElement).css("display") != "none";
// }
// }
// },
// {
// orientation : 'landscape',
// pageSize: 'A3',
// extend: 'pdfHtml5',
// exportOptions: {
// columns: "thead th:not(.noExport)",
// rows: function (indx, rowData, domElement) {
// return $(domElement).css("display") != "none";
// }
// }
// ,
// customize: function (doc) {
// doc.defaultStyle.alignment = 'center';
// doc.content[1].table.widths = Array(doc.content[1].table.body[0].length + 1).join('*').split('');
// var tblBody = doc.content[1].table.body;
// doc.content[1].layout = {
// hLineWidth: function (i, node) {
// return (i === 0 || i === node.table.body.length) ? 2 : 1;
// },
// };
// },
// }, {
// extend: 'print',
// }
// ]
// });
</script>

View File

@ -0,0 +1,220 @@
<style>
form label.error, #secNameerr {
color : red;
}
.filter-reset {
margin-top: 20px !important;
position: absolute;
}
.cierr {
font-size:14px;
}
</style>
<main class="wraper responsive-width" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<!-- <div class="subsec_sec"> -->
<!-- <div class="subject_l subject_l_full_width"> -->
<div class="subject_lsec">
<div class="subject_lhead"><?php echo $title ?></div>
<div class="subject_lformarea">
<form action="<?php echo base_url() ?>admin/results" method="post" id="sectionForm">
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label for="">Batch <span class="text-danger font-weight-bold">*</span></label>
<select name="search_batch" id="search_batch" class="form-control">
<option value=""> -- Select Batch -- </option>
<?php
if(!empty($batchlist)):
foreach($batchlist as $batch):
// $batch_date = date('M-Y', $d_f) . ' To ' . date('M-Y', $d_f);
$batch_date = batchdateFormat($batch['b_from'],$batch['b_end']);
?>
<option value="<?= $batch['id'];?>" <?php echo set_select('search_batch', $batch['id'],( !empty($batchid) ? TRUE : FALSE )); ?> ><?= $batch_date;?></option>
<?php endforeach;
endif;
?>
</select>
<div class="text-danger cierr"><?php echo form_error('search_batch'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for=""> Course <span class="text-danger font-weight-bold">*</span></label>
<select name="search_course" id="search_course" class="form-control">
<option value=""> -- Select Course -- </option>
<?php
if(!empty($courselist)):
foreach($courselist as $course):
// $classroomId=(!empty($classroomid)) ? $classroomid:0;
// if():
// else:
?>
<option value="<?= $course['id'];?>" <?php echo set_select('search_course', $course['id'],( !empty($courseId) ? TRUE : FALSE )); ?>><?= $course['course_name'];?></option>
<?php endforeach;
endif;
?>
</select>
<div class="text-danger cierr"><?php echo form_error('search_course'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="">Exam <span class="text-danger font-weight-bold">*</span></label>
<select name="search_exam" id="search_exam" class="form-control">
<option value=""> -- Select Exam -- </option>
<?php
if(!empty($examlist)):
foreach($examlist as $exam): ?>
<option value="<?= $exam['id'];?>" <?php echo set_select('search_exam', $exam['id'],( !empty($examid) ? TRUE : FALSE )); ?>><?= $exam['e_name'];?></option>
<?php endforeach;
endif;
?>
</select>
<div class="text-danger cierr"><?php echo form_error('search_exam'); ?></div>
</div>
</div>
<div class="col-md-3">
<div class="filter-reset">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/getstudentsresults"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="applicnts-list-wrap mt-5">
<div class="">
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Student Name</th>
<th>Classroom </th>
<th>Exam</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 1;
if(!empty($studentlist)){
// dd($studentlist);
foreach ($studentlist as $student) {
?>
<tr>
<td><?= $i ?></td>
<td><?= $student['name']; ?></td>
<td><?= $student['course_name']; ?></td>
<td><?= $student['exam_name']; ?></td>
<td>
<!-- <span title="View" data-toggle="modal" data-target="#viewAssignment"> -->
<span title="View" onclick="getmarkscardDetails(<?= $student['studid']; ?>,<?= $student['examid']; ?>,<?= $student['course'];?>)">
<i class="fa fa-eye" aria-hidden="true"></i>
</span>
<a href="<?php echo base_url(); ?>admin/downloadMarkscard/<?php echo $student['studid']; ?>/<?= $student['examid']; ?>/<?= $student['course'];?>" title="View" class="pl-2">
<i class="fa fa-download" aria-hidden="true"></i>
</a>
</td>
</tr>
<?php $i++;
} }
?>
</tbody>
</table>
</div>
</div>
<!-- </div> -->
<!-- </div> -->
</div>
</div>
</div>
<!----admin template section end---->
<div class="modal fade syllabus-modal assignment-modal mark-sheet-modal" id="viewAssignment" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="marksheetWrap">
<div class="marksheet">
</div>
</div>
</div>
</div>
</div>
</main>
<!--End right-top side-->
<script>
$(document).ready(function(){
$('#tbl').DataTable({
"lengthMenu": [
[ 25, 50,75,100, -1],
[ 25, 50,75,100, "All"]
],
});
});
function getmarkscardDetails(studentId,examId,courseId){
if(studentId !='' && examId != '' && courseId!='' ){
// console.log(studentId+'-'+studentBatchId+'-'+examId);
// alert(studentId);
$.ajax({
url:"<?= base_url() ?>admin/getMarksCardDetails",
method:"POST",
data:{
studentID:studentId,
courseID:courseId,
examID:examId
},
// contentType: "application/json;",
success:function(response){
// console.log(response);
$('.marksheet').html(response);
$("#viewAssignment").modal("show");
}
});
}
else {
alert("Student Id is Empty");
}
}
</script>

View File

@ -0,0 +1,209 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<title><?= $school_info['school_name']; ?></title>
<link rel="icon" type="image/x-icon" href="<?php echo base_url(); ?>common_assets/fav.png">
<!--styles links-->
<!-- <link rel="stylesheet" href="https://cdn.datatables.net/fixedcolumns/4.2.1/css/fixedColumns.bootstrap4.min.css"> -->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/fixedColumns.bootstrap4.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/jquery-ui.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/all.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/owl-carousel/css/owl.carousel.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/style-admin.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/style-admin-responsive.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/jquery.dataTables.min.css">
<!-- <link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/style.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/responsive.css"> -->
<!-- <link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/fontawesome.min.css" /> -->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/nepali.datepicker.v3.7.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap4-toggle.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-select.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/datatable/buttons.dataTables.min.css">
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap-float-label.min.css" />
<!--<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.semanticui.min.css">-->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/datatable/dt-custom.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.8/semantic.min.css">-->
<link href="<?php echo base_url(); ?>assets_admin/css/cwc-font.css" rel="stylesheet">
<script src="<?php echo base_url(); ?>assets_student/js/jquery-3.6.0.min.js"></script>
<script src="<?php echo base_url(); ?>assets_admin/js/jquery.validate.js"></script>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/sweetalert/sweet-alert.css">
<script src="<?php echo base_url(); ?>assets_admin/sweetalert/sweet-alert.js"></script>
</head>
<body class="mob_bg">
<?php if (isset($_SESSION['admin_id'])) { ?>
<header id="header" class="responsive-width">
<div class="search-bar-wrap">
<!-- <input type="text" name="" placeholder="Search..">
<button class="search-btn"><i class="fas fa-search"></i></button> -->
</div>
<div class="user-login-section">
<div class="user-wrap">
<div class="user-login-head">
<img src="<?= base_url(); ?>assets_admin/images/A.png">
<h5><span class="user-name"><?php echo $_SESSION['admin_name']; ?></span><i class="fa fa-caret-down" aria-hidden="true"></i><i class="fa fa-caret-up" aria-hidden="true"></i></h5>
</div>
<div class="login-wrap-open">
<ul>
<!--li><a href="<?= base_url(); ?>admin/my-profile"><span><i class="fa fa-user" aria-hidden="true"></i></span>My Profile</a></li-->
<li>
<a href="<?php echo base_url() . 'admin/admin-change-password'; ?>">
<span><i class="fas fa-lock"></i></span>Change Password
</a>
</li>
<li>
<a href="<?php echo base_url() . 'admin-logout'; ?>">
<span><i class="fas fa-sign-out-alt"></i></span>Sign Out
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="mobileMenu">
<i class="fas fa-bars"></i>
</div>
<div class="mob_screen">
<h3>To use <img src="<?= base_url(); ?>assets_admin/images/<?= $logo['logo']; ?>"> on your mobile, install the
<img src="<?= base_url(); ?>assets_admin/images/<?= $logo['logo']; ?>"> mobile app. <h3>
<a href=""><img src="<?= base_url(); ?>assets_admin/images/google_play.png" /> </a>
</div>
</header>
<aside id="mySidebar" class="sideMenu" id="style-2">
<div class="logo-wrap">
<img src="<?= base_url(); ?>common_assets/<?= $school_info['logo']; ?>">
</div>
<?php /*?><ul class="side-list">
<?php
if(!isset($currentURL)) $currentURL = '';
$url = explode(base_url(), $currentURL); ?>
<?php if(isset($menulist)) {foreach($menulist as $menu){ ?>
<li class="list <?php if($url[1]==$menu['page_link']){echo 'active'; } ?> ">
<a href="<?= base_url(); ?><?= $menu['page_link']; ?>">
<img src="<?= base_url(); ?>assets_admin/images/<?= $menu['inactive_icon']; ?>" class="icon-inactive">
<img src="<?= base_url(); ?>assets_admin/images/<?= $menu['active_icon']; ?>" class="icon-active">
<span><?= $menu['menu_name']; ?></span>
</a>
</li>
<?php } } ?>
</ul><?php */ ?>
<!--<ul>
<li class="list ">
<a href="subject-create.html" class="dropdown" id="dropdownMenuButton1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="../assets/images/subject1.png" class="icon-inactive">
<img src="../assets/images/subject2.png" class="icon-active">
<span>Subjects</span>
</a>
</li>
<li class="list active ">
<a href="#" id="btn-1" class="dropdown-toggle" data-toggle="collapse" data-target="#submenu1" aria-expanded="false">
<img src="../assets/images/dashboard1.png" class="icon-inactive">
<img src="../assets/images/dashboard2.png" class="icon-active">
<span>Dashboard</span>
</a>
<div class="nav collapse" id="submenu1" role="menu" aria-labelledby="btn-1">
<a class="dropdown-item active" href="#">Submenu 1</a>
<a class="dropdown-item" href="#">option 2 submenu</a>
<a class="dropdown-item" href="#">Something submenu</a>
</div>
</li>
</ul>-->
<ul class="side-list admin-sidebar">
<?php
if (!isset($currentURL))
$currentURL = '';
$url = explode(base_url() . 'index.php/', $currentURL);
//echo $currentURL;
//echo '<pre>';print_r($url);
$CI = &get_instance();
$CI->load->model('Admin_model');
$adminMenuHere = $CI->Admin_model->get_admin_menu();
$adminRolePerms = $CI->Admin_model->get_admin_role_permissions("admin_role_ids IN(" . $_SESSION['admin_role_ids'] . ")");
if (!empty($adminRolePerms)) {
$arpStr = '';
$arpArr = array();
foreach ($adminRolePerms as $arp) {
if ($arpStr == '')
$arpStr = $arp['menu_ids'];
else
$arpStr .= ',' . $arp['menu_ids'];
}
$arpArr = array_unique(explode(',', $arpStr));
if (!empty($adminMenuHere)) {
// dd($adminMenuHere);
foreach ($adminMenuHere as $key => $menuData) {
if (in_array($key, $arpArr)) {
if (isset($menuData[$key]) && !empty($menuData[$key])) {
$smPageLinks = array();
foreach ($menuData[$key] as $tmactive) {
array_push($smPageLinks, $tmactive['page_link']);
}
//echo '<pre>'; print_r($smPageLinks);
//echo $url[1];
$mmmActive = '';
if (in_array($url[1], $smPageLinks))
$mmmActive = 'active';
?>
<li class="list listWithDrpdwn <?php echo $mmmActive; ?>">
<a href="javascript:void(0)" id="btn-1" class="dropdown-toggle " data-toggle="collapse" data-target="#<?php echo $menuData['menu_name'] . '-submenu'; ?>" aria-expanded="false">
<!-- <img src="<?php echo base_url(); ?>assets_admin/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
<img src="<?php echo base_url(); ?>assets_admin/images/<?php echo $menuData['active_icon']; ?>" class="icon-active">
<span><?php echo $menuData['menu_name']; ?></span>
</a>
<div class="nav collapse" id="<?php echo $menuData['menu_name'] . '-submenu'; ?>" role="menu" aria-labelledby="btn-1">
<?php
foreach ($menuData[$key] as $subMenu) {
?>
<a class="dropdown-item <?php if ($url[1] == $subMenu['page_link']) { ?>active<?php } ?>" href="<?php echo base_url() . $subMenu['page_link']; ?>"><?php echo $subMenu['menu_name']; ?></a>
<?php
}
?>
</div>
</li>
<?php
} else {
?>
<li class="list <?php if ($url[1] == $menuData['page_link']) { ?>active<?php } ?>">
<a href="<?php echo base_url() . $menuData['page_link']; ?>" class="dropdown">
<!-- <img src="<?php echo base_url(); ?>assets_admin/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
<img src="<?php echo base_url(); ?>assets_admin/images/<?php echo $menuData['active_icon']; ?>" class="icon-active">
<span><?php echo $menuData['menu_name']; ?></span>
</a>
</li>
<?php
}
}
}
}
}
?>
</ul>
</aside>
<?php } ?>

View File

@ -0,0 +1,106 @@
<style>
.tooltip{
z-index: 1151 !important;
}
</style>
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"> Hostel Details : [ Batch - <?= $batch_name; ?>]</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<?php //echo $hostel_course_fee_id; ?>
<table>
<tbody>
<tr>
<th style="font-weight:600;"> Student Name: &nbsp;</th><td>&nbsp; <?= $student_info['name']; ?></td>
</tr>
<tr>
<th style="font-weight:600;">Student ID: &nbsp;</th><td>&nbsp; <?= $student_info['studentId']; ?></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-12">
<span class="text-danger" style="font-size:12px;" id="modalStudentPayment" data-payment-status='<?php echo ($payment_status) ? $payment_status : 0; ?>'>
<?php
echo $payment_status_msg=($payment_status) ? "One or more payments are already done for the present selected hostel package. SO, the hostel package can not be updated now.":"";
?>
</span>
</div>
</div>
<hr>
<div class="row" >
<div class="col-md-12" >
<table id="tbl1" cellspacing="0" width="100%">
<thead>
<tr>
<th width="5%">SNo</th>
<th width="10%">Select</th>
<th width="45%">Hostel Plan</th>
<th width="40%">Fee</th>
<!-- <th>PickUp</th>
<th>Drop</th> -->
</tr>
</thead>
<tbody id="routes_body">
<?php
$sno=1;
if(isset($hostelplan_data) && !empty($hostelplan_data)){
foreach($hostelplan_data as $value) { ?>
<tr>
<td><?= $sno;?></td>
<td>
<?php if($value['hostel_fee'] !=0){
$student_hostel_planID=($student_hostel_plan_id > 0)? $student_hostel_plan_id : 0;
$student_hostel_checked=($student_hostel_planID == $value['hostel_plan_id']) ? "checked" : '';
$payment_status_disabled=($payment_status) ? "disabled='disabled' data-toggle='tooltip' title='Payment partial or full installment paid'" : '';
?>
<input type="radio" name="hostel_plan_id" value="<?php echo $value['hostel_plan_id']; ?>" <?= $payment_status_disabled; ?> <?= $student_hostel_checked; ?>>
<?php } else {
echo "<h5> - </h5>";
} ?>
</td>
<td><?php echo $value['hostel_plan_name']; ?></td>
<td><?php if($value['hostel_fee'] !=0)
echo $value['hostel_fee'];
else
echo "<p class='text-danger'>The fees is not yet created for this Hostel plan.</p>";
?></td>
</tr>
<?php $sno++; } } ?>
</tbody>
</table>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#tbl1').DataTable({
"autoWidth": false,
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
});
</script>

View File

@ -0,0 +1,372 @@
<style type="text/css">
.error-style {
color: red;
}
</style>
<style type="text/css">
.error-style {
color: red;
}
.import-filter-sec {
display: flex;
}
.select-box {
padding: 3px 10px !important;
width: 100%;
border-radius: 5px;
border: 1px solid #ccc !important;
font-size: 15px;
color: black;
height: calc(1.85rem + 8px) !important;
}
.filter-head {
display: flex;
align-items: center;
justify-content: space-between;
}
.mt-5 {
margin-top: 2.5rem !important;
}
.btn-info {
color: #fff;
background-color: #2c9f0f;
border: none !important;
}
.delete-modal-btn {
margin-bottom: 15px;
margin-top: 2.6rem !important;
}
li {
list-style-type: none;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<h5 class="alert-heading font-weignt-bold " style="color: red;">Note</h5>
<p class="mb-1" style="padding-left: 10px;font-size:14px;"><i class="fa fa-arrow-right mr-5" aria-hidden="true"></i>the csv file, except address2 column, rest all are mandatory fields.</p>
<p class="mb-1" style="padding-left: 10px;font-size:14px;"><i class="fa fa-arrow-right mr-5" aria-hidden="true"></i>Allowed values for gender are : Male, Female, Other . These values are case sensitive.</p>
<p class="mb-1" style="padding-left: 10px;font-size:14px;"><i class="fa fa-arrow-right mr-5" aria-hidden="true"></i>Allowed values for country are : Nepal, India . These values are case sensitive.</p>
<p class="mb-1" style="padding-left: 10px;font-size:14px;"><i class="fa fa-arrow-right mr-5" aria-hidden="true"></i>dob & registered_on should be in dd-mm-yyyy format</p>
<p class="mb-1" style="padding-left: 10px;font-size:14px;"><i class="fa fa-arrow-right mr-5" aria-hidden="true"></i>Allowed values for hostel, payment_status & assign_status are : yes, no. These values are case sensitive.</p>
<p class="mb-1" style="padding-left: 10px;font-size:14px;"><i class="fa fa-arrow-right mr-5" aria-hidden="true"></i>Max allowed entries per csv file is 100 only.</p>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="filter-head">
<div class="subject_lhead text-center mt-3 mb-4">Add Existing Students</div>
<div class="">
<a href="<?php echo base_url() . 'admin/downloadCsvFile' ?>" class="btn btn-success btn-sm float-left"><i class="fa fa-download" aria-hidden="true"></i> &nbsp;Sample Download</a>
</div>
</div>
<?php
// var_dump($batch);
?>
<form enctype="multipart/form-data" method="post" action="<?php echo base_url() . 'admin/importStudents' ?>" id="ImportStudent">
<div class="import-filter-sec">
<div class="form-group mx-2">
<label class=" col-form-label">Select Batch</label>
<div class="">
<select id="" name="batch" class="select-box ">
<option value="">--- Select Batch ---</option>
<?php foreach ($batch as $key => $value) { ?>
<option value="<?php echo $value['id'] ?>">
<?php //echo batchdateFormatTo($value['b_from'], $value['b_end']);
?>
<?= $value['b_name']; ?>
</option>
<?php } ?>
</select>
</div>
<div class="text-center">
<label id="batch-error" class="error error-style" for="batch"></label>
</div>
</div>
<div class="form-group mx-2">
<label class="col-form-label">Select Course</label>
<div class="">
<select id="course_select" name="course" class="select-box ">
<option value="">--- Select Course ---</option>
<?php foreach ($course as $key => $value) { ?>
<option value="<?php echo $value['id'] ?>">
<?php echo $value['course_name']; ?>
</option>
<?php } ?>
</select>
</div>
<div class=" text-center">
<label id="course_select-error" class="error error-style" for="course_select"></label>
</div>
</div>
<div class="form-group mx-2">
<label class=" col-form-label">Select Section</label>
<div class="">
<select id="section_select" name="section" class="select-box ">
<option value="">--- Select Section ---</option>
</select>
</div>
<div class=" text-center">
<label id="section_select-error" class="error error-style" for="section_select"></label>
</div>
</div>
<div class="form-group mx-2">
<label class=" col-form-label">Excel File</label>
<div class="mt-1">
<input id="upload" name="file" type="file" accept=".csv, .xlsx" />
<buttom class="btn btn-info btn-sm float-left" id="upload_link">Upload File</button>
</div>
</div>
<div class="delete-modal-btn mt-4 btn-md text-center">
<button type="submit" class="subject_addbtn ">Submit</button>
</div>
</div>
</form>
<form method="post" id="downloadAll" action="<?php echo base_url(); ?>Admin/downloadAll">
<div class="applicnts-list-wrap ">
<div class="">
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>SI No</th>
<th>Student Id</th>
<th>Name of Student</th>
<th>Email</th>
<th>Contact No.</th>
<th>Application Date</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php if ($view_data) {
$i = 1;
foreach ($view_data as $key => $value) {
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo ($value['status'] == 'duplicate') ? '-------' : $value['studentId'] ?></td>
<td><?php echo $value['name']; ?></td>
<td><?php echo $value['email']; ?></td>
<td><?php echo $value['mobile']; ?></td>
<td><?php echo $value['registered_on']; ?></td>
<td style="color:<?php echo ($value['status'] == 'success') ? 'green' : 'red'; ?>;"><?php echo $value['status']; ?></td>
</tr>
<?php $i++;
}
}
unset($_SESSION['promote_table']); ?>
</tbody>
</table>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<style type="text/css">
#upload_link {
text-decoration: none;
}
#upload {
display: none
}
</style>
<script>
//file uplaod link trigger
$(function() {
$("#upload_link").on('click', function(e) {
e.preventDefault();
$("#upload:hidden").trigger('click');
});
});
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
],
dom: 'lBfrtip',
buttons: [{
extend: 'pdfHtml5',
title: 'Student List',
exportOptions: {
columns: [1, 3, 4, 5, 6, 7]
}
},
{
extend: 'csvHtml5',
exportOptions: {
columns: [1, 3, 4, 5, 6, 7]
}
}
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
$(document).ready(function() {
$("#ImportStudent").validate({
rules: {
batch: {
required: true
},
course: {
required: true
},
section: {
required: true
},
file: {
required: true
}
},
messages: {
batch: {
required: "Please Select Batch "
},
file: {
required: "Please add Excel file"
},
course: {
required: "Please Select Course"
},
section: {
required: "Please Select Section"
},
},
submitHandler: function(form) {
form.submit();
}
});
});
$('#course_select').change(function() {
var id = $('#course_select').find(":selected").val();
$.ajax({
url: '<?php echo base_url() . 'admin/get_sections_from_classroom/' ?>' + id,
type: 'GET',
dataType: 'json',
success: function(result) {
let section = '';
section += '<option value=""> - Select Section - </option>';
$.each(result, function(key, value) {
section += '<option value="' + value['id'] + '">' + value['section_name'] + '</option>';
});
$("#section_select").empty().append(section);
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,163 @@
<div class="wraper responsive-width">
<main class="" id="main">
<div class="from-group">
<a href="<?= base_url(); ?>admin/fee-installment"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
</div>
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec">
<div class="subject_r subject_r_lng" >
<div class="subject_lsec">
<div class="subject_lhead">Course Fee Installment List</div>
<div class="fee_table">
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>S No</th>
<th>Course Name</th>
<th>Payment option</th>
<th>Amount</th>
<th>Due Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 0 ;
$courseunique = array();
// print_r($installment);
foreach($installment as $in){
if(array_search( $in['course_name'],$installment) == false)
{
array_push($courseunique,$in['course_name']);
}
}
$posprev = -1;
foreach($installment as $inst){ $i++; ?>
<tr>
<td><?= $i ?></td>
<?php $pos = array_search($inst["course_name"],$courseunique);
if($posprev != $pos) { ?>
<td><?php echo $inst["course_name"]; $posprev = $pos;?></td>
<?php } else { ?>
<td></td>
<?php } ?>
<td><?= $inst["payment_installment"]?></td>
<td><?= $inst["payable_amount"]?></td>
<td><?= str_replace(',','<br>',$inst["duedates"])?></td>
<td>
<div class="sub_tabbtnsec">
<a data-toggle="modal" href="#deleteModal">
<div class="sub_delbtn" onclick = "installrestore(<?php echo $in['id']; ?>)"><img src="<?= base_url(); ?>assets_admin/images/icons/restore.png" class="restore-icon"></div>
</a>
<div class="sub_delbtn" >
<i class="fa fa-trash" aria-hidden="true" title="Delete permanently"></i>
</div>
</div>
</td>
</tr> <?php $prev = $inst["course_name"]; } ?>
<!--tr>
<td>1</td>
<td>1st standard</td>
<td>Full payment</td>
<td>Rs 5000</td>
<td>Date</td>
<td>
<div class="sub_tabbtnsec">
<a href="<?php echo base_url(); ?>admin/add-edit-fee-installment/">
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
</a>
<a data-toggle="modal" href="#deleteModal">
<div class="sub_delbtn" ><i class="fa fa-trash" aria-hidden="true"></i></div>
</a>
</div>
</td>
</tr-->
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "inid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to restore this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="restoredata($('#inid').val(), 'installment');">Restore</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!--div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata('1', 'installment');">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div-->
<script>
$(document).ready(function(){
//table js
$('#tbl').DataTable( {
"lengthMenu": [[25,50, 100, 150, -1], [25,50, 100, 150, "All"]]
} );
//table js end
});
</script>
<script type="text/javascript">
function installrestore(icn){
// alert(icn);
$('#inid').val(icn);
}
function restoredata(id, table){
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>admin/restore_data",
data : {id : id, table : table},
success:function(resposne){
if(resposne == '1'){
window.location.href = "<?php echo base_url(); ?>admin/fee-installment";
}
}
});
}
</script>

View File

@ -0,0 +1,449 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$theExportHeader = 'The Fee Invoice Reports';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . ' - Invoice Reports';
}
?>
</div>
<div class="subject_lhead">Invoice Fee Reports</div>
<?php
$f_f_types = array();
$f_from_date = '';
$f_to_date = '';
$select_particular = '';
if (count($_POST) > 0) {
//echo '<pre>'; print_r($_POST);exit;
if (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types']))
$f_f_types = $_POST['filter_fee_types'];
$f_from_date = $_POST['filter_from_date'];
$f_to_date = $_POST['filter_to_date'];
$select_particular = $_POST['select_particular'];
if ($select_particular == 'today')
$theExportHeader .= ' For Today';
if ($f_from_date != '')
$theExportHeader .= ' From ' . $f_from_date;
if ($f_to_date != '')
$theExportHeader .= ' To ' . $f_to_date;
}
?>
<form action="<?= base_url(); ?>admin/invoice-fee-reports" method="POST" id='searchInvoiceReports'>
<div class="row">
<div class="col-md-1">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Select Fees Type</label>
<select name="filter_fee_types[]" id="filter_fee_types" class=" form-control selectpicker" multiple data-live-search="true">
<option value="" disabled="">Select Fees Type</option>
<?php
if (!empty($all_fee_types)) {
foreach ($all_fee_types as $ftypes) {
?>
<option value="<?php echo $ftypes['id'] ?>" <?php if (in_array($ftypes['id'], $f_f_types)) { ?> selected <?php } ?>> <?php echo $ftypes['feetype_name'] ?> </option>
<?php
}
}
?>
</select>
</div>
</div>
</div>
<div class="col-md-2">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Select Particular</label>
<select name="select_particular" id="select_particular" class="form-control selectpicker" onchange='manage_select_particular()'>
<option value=''>Select</option>
<option value='today' <?php if ($select_particular == 'today') { ?> selected <?php } ?>>Today</option>
<option value='select_date_range' <?php if ($select_particular == 'select_date_range') { ?> selected <?php } ?>>Select Date Range</option>
</select>
</div>
</div>
</div>
<div class="col-md-2 the-dates" style='display:none;'>
<div class="date-filter">
<div class="date-fil-row">
<label>Start Date</label>
<input type="text" name="filter_from_date" id="filter_from_date" class="form-control nepal-date" value="<?php echo $f_from_date; ?>" placeholder='yyyy-mm-dd'>
</div>
</div>
</div>
<div class="col-md-2 the-dates" style='display:none;'>
<div class="date-filter">
<div class="date-fil-row">
<label>End Date</label>
<input type="text" name="filter_to_date" id="filter_to_date" class="form-control nepal-date" value="<?php echo $f_to_date; ?>" placeholder='yyyy-mm-dd'>
</div>
</div>
</div>
<div class="col-md-2">
<div class="filter-reset">
<input type="button" name="filtersubmit" id="filter_reset1" class="btn btn-success" value="Filter" onclick="search_invoice_reports()">
<a href="<?php echo base_url() ?>admin/invoice-fee-reports">
<button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg">
<i class="fas fa-redo"></i>Reset
</button>
</a>
</div>
</div>
</div>
</form>
<!-- tab added -->
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" ">
<!-- changed ID -->
<table id="tbl1" class="display table-responsive text-center">
<thead>
<tr>
<th>S.No</th>
<th>Date</th>
<th>Invoice No</th>
<th>Student Id</th>
<th>Student Name</th>
<th>Class</th>
<th>Roll No</th>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
foreach ($selected_fee_types as $sftypes) {
?>
<th><?php echo $sftypes['feetype_name']; ?></th>
<?php
}
}
?>
<th>Discount</th>
<th>Fine</th>
<th>Total Paid</th>
</tr>
</thead>
<tbody>
<?php
$tdCnt = 1;
if (isset($the_results) && !empty($the_results)) {
// echo '
// <pre>';
// print_r($the_results);
$sno = 1;
foreach ($the_results as $res) {
// echo '<pre>';
// print_r($the_results);
$tdCnt = 9;
?>
<tr>
<td><?php echo $sno; ?></td>
<td><?php echo date('d-m-Y', strtotime($res['payment_date'])); ?></td>
<td><?php echo $res['invoice_no']; ?></td>
<td><?php echo $res['studentId']; ?></td>
<td><?php echo $res['std_name']; ?></td>
<td><?php echo $res['classroom_name']; ?></td>
<td><?php echo $res['roll_no']; ?></td>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
$theRowTotal = 0;
foreach ($selected_fee_types as $sftypes) {
if (isset($res[$sftypes['feetype_name']])) {
$theRowTotal = ($theRowTotal + $res[$sftypes['feetype_name']]);
// echo '=> Deduction Amount = ' . $totalDeductionAmount;
?>
<td><?php echo $res[$sftypes['feetype_name']]; ?></td>
<?php
}else{
?>
<td> 0 </td>
<?php
}
$tdCnt++;
}
}
?>
<?php
$a = 0;
$totalDeductionAmount = 0;
$deduction_amt_arr = explode(",", $res['deduction_amt']);
// print_r(count($deduction_amt_arr));
// print_r(($deduction_amt_arr));
for ($x = 0; $x < count($deduction_amt_arr); $x++) {
// echo
// $deduction_amt_arr[$x];
$totalDeductionAmount = $totalDeductionAmount + $deduction_amt_arr[$x];
}
$totalFineAmount = 0;
$fine_amt_arr = explode(",", $res['fine_amt']);
for ($y = 0; $y < count($fine_amt_arr); $y++) {
$totalFineAmount = $totalFineAmount + $fine_amt_arr[$y];
}
?>
<td style='font-size: 13px;'><?= $totalDeductionAmount; ?></td>
<td style='font-size: 13px;'><?= $totalFineAmount; ?></td>
<td style='font-size: 13px;'><?= $theRowTotal - $totalDeductionAmount + $totalFineAmount; ?></td>
</tr>
<?php
$sno++;
}
}
?>
<tfoot>
<tr>
<th></th>
<th></th><th></th>
<th></th>
<th></th>
<th></th>
<!-- <th></th> -->
<th>In <?php echo $currency_symbol; ?></th>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
foreach ($selected_fee_types as $sftypes) {
?>
<th style='font-size: 13px;'></th>
<?php
}
}
?>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
var theTdCnt = '<?php echo $tdCnt; ?>';
var theTdStr = new Array();
for (let n = 0; n < theTdCnt; n++) {
theTdStr.push(n);
}
//alert(theTdCnt);
var jsSdate = '<?php echo $f_from_date; ?>';
var jsTdate = '<?php echo $f_to_date; ?>';
//alert(jsSdate+' = '+jsTdate);
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
customize: function(doc) {
var rowCount = document.getElementById("tbl1").rows.length;
//alert(rowCount);
for (i = 0; i < rowCount; i++) {
for (j = 0; j < theTdCnt; j++) {
doc.content[1].table.body[i][j].alignment = 'center';
}
}
doc.styles.table = {
alignment: 'center'
}
},
exportOptions: {
columns: theTdStr,
alignment: 'center',
modifier: {
page: 'current'
}
},
orientation: 'landscape',
pageSize: 'LEGAL'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: theTdStr
}
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
],
"footerCallback": function(row, data, start, end, display) {
//var theDynTdCnt = (theTdCnt - 7);
for (let fi = 6; fi < theTdCnt; fi++) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(fi)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(fi, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(fi).footer()).html(
//currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
pageTotal
);
}
}
});
//table js end
//multiple select js start
$('#filter_fee_types').selectpicker();
//multiple select js end
manage_select_particular();
});
function manage_select_particular() {
if ($('#select_particular').val() == 'select_date_range') {
$('#filter_from_date').val(jsSdate);
$('#filter_to_date').val(jsTdate);
$('.the-dates').show();
} else {
$('#filter_from_date').val('');
$('#filter_to_date').val('');
$('.the-dates').hide();
}
}
function search_invoice_reports() {
$('#searchInvoiceReports').submit();
}
</script>
</body>
</html>

View File

@ -0,0 +1,448 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$theExportHeader = 'The Fee Invoice Reports';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . ' - Invoice Reports';
}
?>
</div>
<div class="subject_lhead">Invoice Reports</div>
<?php
$f_f_types = array();
$f_from_date = '';
$f_to_date = '';
$select_particular = '';
if (count($_POST) > 0) {
//echo '<pre>'; print_r($_POST);exit;
if (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types']))
$f_f_types = $_POST['filter_fee_types'];
$f_from_date = $_POST['filter_from_date'];
$f_to_date = $_POST['filter_to_date'];
$select_particular = $_POST['select_particular'];
if ($select_particular == 'today')
$theExportHeader .= ' For Today';
if ($f_from_date != '')
$theExportHeader .= ' From ' . $f_from_date;
if ($f_to_date != '')
$theExportHeader .= ' To ' . $f_to_date;
}
?>
<form action="<?= base_url(); ?>admin/invoice-reports" method="POST" id='searchInvoiceReports'>
<div class="row">
<div class="col-md-1">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Select Fees Type</label>
<select name="filter_fee_types[]" id="filter_fee_types" class=" form-control selectpicker" multiple data-live-search="true">
<option value="" disabled="">Select Fees Type</option>
<?php
if (!empty($all_fee_types)) {
foreach ($all_fee_types as $ftypes) {
?>
<option value="<?php echo $ftypes['id'] ?>" <?php if (in_array($ftypes['id'], $f_f_types)) { ?> selected <?php } ?>> <?php echo $ftypes['feetype_name'] ?> </option>
<?php
}
}
?>
</select>
</div>
</div>
</div>
<div class="col-md-2">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Select Particular</label>
<select name="select_particular" id="select_particular" class="form-control selectpicker" onchange='manage_select_particular()'>
<option value=''>Select</option>
<option value='today' <?php if ($select_particular == 'today') { ?> selected <?php } ?>>Today</option>
<option value='select_date_range' <?php if ($select_particular == 'select_date_range') { ?> selected <?php } ?>>Select Date Range</option>
</select>
</div>
</div>
</div>
<div class="col-md-2 the-dates" style='display:none;'>
<div class="date-filter">
<div class="date-fil-row">
<label>Start Date</label>
<input type="text" name="filter_from_date" id="filter_from_date" class="form-control nepal-date" value="<?php echo $f_from_date; ?>" placeholder='yyyy-mm-dd'>
</div>
</div>
</div>
<div class="col-md-2 the-dates" style='display:none;'>
<div class="date-filter">
<div class="date-fil-row">
<label>End Date</label>
<input type="text" name="filter_to_date" id="filter_to_date" class="form-control nepal-date" value="<?php echo $f_to_date; ?>" placeholder='yyyy-mm-dd'>
</div>
</div>
</div>
<div class="col-md-2">
<div class="filter-reset">
<input type="button" name="filtersubmit" id="filter_reset1" class="btn btn-success" value="Filter" onclick="search_invoice_reports()">
<a href="<?php echo base_url() ?>admin/invoice-reports">
<button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg">
<i class="fas fa-redo"></i>Reset
</button>
</a>
</div>
</div>
</div>
</form>
<!-- tab added -->
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" ">
<!-- changed ID -->
<table id="tbl1" class="display table-responsive text-center">
<thead>
<tr>
<th>S.No</th>
<th>Date</th>
<th>Invoice No</th>
<th>Student Name</th>
<th>Class</th>
<th>Roll No</th>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
foreach ($selected_fee_types as $sftypes) {
?>
<th><?php echo $sftypes['feetype_name']; ?></th>
<?php
}
}
?>
<th>Discount</th>
<th>Fine</th>
<th>Total Paid</th>
</tr>
</thead>
<tbody>
<?php
$tdCnt = 1;
if (isset($the_results) && !empty($the_results)) {
// echo '
// <pre>';
// print_r($the_results);
$sno = 1;
foreach ($the_results as $res) {
$tdCnt = 9;
?>
<tr>
<td><?php echo $sno; ?></td>
<td><?php echo date('d-m-Y', strtotime($res['payment_date'])); ?></td>
<td><?php echo $res['invoice_no']; ?></td>
<td><?php echo $res['std_name']; ?></td>
<td><?php echo $res['classroom_name']; ?></td>
<td><?php echo $res['roll_no']; ?></td>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
$theRowTotal = 0;
foreach ($selected_fee_types as $sftypes) {
$theRowTotal = ($theRowTotal + $res[$sftypes['feetype_name']]);
// echo '=> Deduction Amount = ' . $totalDeductionAmount;
?>
<td><?php echo $res[$sftypes['feetype_name']]; ?></td>
<?php
$tdCnt++;
}
}
?>
<?php
$a = 0;
$totalDeductionAmount = 0;
$deduction_amt_arr = explode(",", $res['deduction_amt']);
// print_r(count($deduction_amt_arr));
// print_r(($deduction_amt_arr));
for ($x = 0; $x < count($deduction_amt_arr); $x++) {
// echo
// $deduction_amt_arr[$x];
$totalDeductionAmount = $totalDeductionAmount + $deduction_amt_arr[$x];
}
$totalFineAmount = 0;
$fine_amt_arr = explode(",", $res['fine_amt']);
for ($y = 0; $y < count($fine_amt_arr); $y++) {
$totalFineAmount = $totalFineAmount + $fine_amt_arr[$y];
}
?>
<td style='font-size: 13px;'><?= $totalDeductionAmount; ?></td>
<td style='font-size: 13px;'><?= $totalFineAmount; ?></td>
<td style='font-size: 13px;'><?= $theRowTotal - $totalDeductionAmount + $totalFineAmount; ?></td>
</tr>
<?php
$sno++;
}
}
?>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<!-- <th></th> -->
<th>In <?php echo $currency_symbol; ?></th>
<?php
if (isset($selected_fee_types) && !empty($selected_fee_types)) {
foreach ($selected_fee_types as $sftypes) {
?>
<th style='font-size: 13px;'></th>
<?php
}
}
?>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
var theTdCnt = '<?php echo $tdCnt; ?>';
var theTdStr = new Array();
for (let n = 0; n < theTdCnt; n++) {
theTdStr.push(n);
}
//alert(theTdCnt);
var jsSdate = '<?php echo $f_from_date; ?>';
var jsTdate = '<?php echo $f_to_date; ?>';
//alert(jsSdate+' = '+jsTdate);
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
customize: function(doc) {
var rowCount = document.getElementById("tbl1").rows.length;
//alert(rowCount);
for (i = 0; i < rowCount; i++) {
for (j = 0; j < theTdCnt; j++) {
doc.content[1].table.body[i][j].alignment = 'center';
}
}
doc.styles.table = {
alignment: 'center'
}
},
exportOptions: {
columns: theTdStr,
alignment: 'center',
modifier: {
page: 'current'
}
},
orientation: 'landscape',
pageSize: 'LEGAL'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: theTdStr
}
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
],
"footerCallback": function(row, data, start, end, display) {
//var theDynTdCnt = (theTdCnt - 7);
for (let fi = 6; fi < theTdCnt; fi++) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(fi)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(fi, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(fi).footer()).html(
//currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
pageTotal
);
}
}
});
//table js end
//multiple select js start
$('#filter_fee_types').selectpicker();
//multiple select js end
manage_select_particular();
});
function manage_select_particular() {
if ($('#select_particular').val() == 'select_date_range') {
$('#filter_from_date').val(jsSdate);
$('#filter_to_date').val(jsTdate);
$('.the-dates').show();
} else {
$('#filter_from_date').val('');
$('#filter_to_date').val('');
$('.the-dates').hide();
}
}
function search_invoice_reports() {
$('#searchInvoiceReports').submit();
}
</script>
</body>
</html>

View File

@ -0,0 +1,478 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/invoice.css">
<div class="wraper responsive-width">
<main class="printdiv1" id="main">
<div class="main-wrap">
<div class="dashboard-cover">
<button type="button" class="btn btn-success btn-sm btn-dark back_btn">Back</button>
<div class="common-heading">
<h2>Transactions Details</h2>
</div>
<?php
// echo '<pre>';
$invoice_no = '';
$billPrintCountArray = [];
$invoiceIds = [];
foreach ($invoice_data['invoices'] as $i_key => $i_value) {
$invoice_no = $i_value['invoice_no'];
array_push($invoiceIds, strval($i_value['id']));
array_push(
$billPrintCountArray,
$i_value['bill_print_count']
);
}
// print_r($invoiceIds);
?>
<div class="invoice_wrap">
<div class="invoice_head" id="printableArea">
<div class="invoice_head_left">
Bill Details
</div>
<div class="invoice_head_right" style="cursor: pointer;">
<p id="printSection"><img src="<?php echo base_url(); ?>assets_admin/images/print.png" /></p>
</div>
</div>
<div id="printpage">
<div class="invoice_main">
<?php
if (empty($school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['markscard_header'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
//
//
?><?php
// print_r($invoice_data);
?>
<div class="invoice_head_row">
<table width="100%" class="head_tbl">
<tr>
<td style="width:40%">
<div class="top_logo">
<img class="logo_img" src="<?= $logo_img; ?>" alt="Logo Here" width="60px">
<hr align="left" style="width:50%;">
<h4 style="margin:0;padding:0;"><?= $school_info['school_name']; ?></h4>
<p class="address" style="width:250px;word-wrap: break-word;margin:0;padding:0;"><?= $school_info['address']; ?></p>
</div>
</td>
<td style="width:20%">
<div class="bill-type">
<p><label for="">Bill Type</label> : <span>Original</span></p>
</div>
</td>
<td style="width:30%">
<ul>
<li><label for="">Phone :</label><span><?= $school_info['phone']; ?></span></li>
<li><label for="">Email :</label><span><?= $school_info['email']; ?></span></li>
<li><label for="">Website :</label><span><?= $school_info['website_link']; ?></span></li>
<li><label for="">School PAN :</label><span><?= (!empty($school_info['pan'])) ? $school_info['pan'] : "-"; ?></span></li>
</ul>
</td>
</tr>
</table>
<hr />
</div>
<div class="invoice_body">
<div class="row">
<div class="col"><b>Student Name : </b><span style="font-size: 18px;"><?= $invoice_data['studentname'] ?></span></div>
<div class="col"><b>Parent PAN: </b><span style="font-size: 18px;"><?= $invoice_data['parent_pan'] ?></span></div>
<div class="col" style="font-size: 18px;"><b> Invoice Number : </b><?= $invoice_no ?></div>
</div>
<div class="row mt-1">
<div class="col"><b>Classroom : </b>
<span style="font-size: 18px;">
<?php
$section_id = (!empty($invoice_data['section_id']) && isset($invoice_data['section_id'])) ? $invoice_data['section_id'] : 0;
if ($section_id != 0)
$section_name = $this->db->get_where('section', array('id' => $section_id))->row()->section_name;
else
$section_name = '';
$course_name = $this->db->get_where('course', array('id' => $invoice_data['course_id']))->row()->course_name;
echo (!empty($section_name)) ? $course_name . ' - ' . $section_name : $course_name;
?>
</span>
</div>
<div class="col"><b>Student ID : </b><span style="font-size: 18px;"><?= $invoice_data['studentId'] ?></span></div>
<div class="col"><b>Batch : </b><span style="font-size: 18px;"><?= str_replace('Batch ', '', $invoice_data['batch_name']) ?></span></div>
</div>
<div class="row mt-1">
<div class="px-3" style="width: 33.33%">
<b> Bill Count : </b><span style="font-size: 18px;"><?= $billPrintCountArray[0] ?></span>
</div>
<div class="col"><b>Transaction Date & Time : </b><span style="font-size: 18px;"><?= $invoice_data['tdt'] ?></span></div>
</div>
</div>
<div class="invoice_footer_row" style="padding-top:10px;">
<table class="footer_tbl_main" width="100%" style="border:1px solid #000;border-collapse: collapse;text-align:center;font-size:16px;">
<tr>
<th style="width:5%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">S.NO</th>
<th style="width:25%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Description Fee</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Billed By</th>
<th style="width:15%; text-align:center;border:1px solid #000;color: #212529;font-size:16px; padding: 8px;">Mode of Payment</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Paid Date</th>
<th style="width:8%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Discount</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Fine</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Amount</th>
</tr>
<tbody>
<?php
$totalAmt = 0;
if (!empty($invoice_data['invoices'])) {
$sno = 1;
foreach ($invoice_data['invoices'] as $i_key => $ivalue) {
// echo '<pre>';
// print_r($ivalue['course_fee']['fee_name']);
$totalAmt = $totalAmt + $ivalue['payment_amt'];
?>
<tr>
<td style="width:5%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $sno; ?></td>
<td style="width:25%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['course_fee']['fee_name'] ?><small>(<?= $ivalue['payment_for'] ?>)</small></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_recived_id'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_method'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= date('d-m-Y', strtotime($ivalue['payment_date'])); ?></td>
<td style="width:8%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['deduction_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['fine_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_amt'] ?></td>
</tr>
<?php
$sno++;
}
} else {
?>
<tr>
<td colspan=5> No Data Found</td>
</tr>
<?php } ?>
</tbody>
<?php
$totalAmt = 0;
$fine_amount = 0;
$disc_amount = 0;
if (!empty($invoice_data['invoices'])) {
$sno = 1;
foreach ($invoice_data['invoices'] as $ivalue) {
$totalAmt = $totalAmt + $ivalue['payment_amt'];
$fine_amount = $fine_amount + $ivalue['fine_amount'];
$disc_amount = $disc_amount + $ivalue['deduction_amount'];
}
?>
<tr style="border:1px solid;">
<th colspan="5" style="border:1px solid #000;padding:5px;text-align:center; font-size:16px;"></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $disc_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $fine_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $totalAmt ?></th>
</tr>
<?php } ?>
</table>
<table class="footer_tbl_sub" style="border-collapse: collapse;" width=100%>
<tr>
<td colspan="7" width=65% style="border:1px solid #000;text-align:left;border-right:0;border-top: 0;padding-left:35px;">
<label for="" style="font-size: 12px;width: 100px;font-weight: 600;font-size:12px;">Amount In Word</label> :
<span style="font-size: 12px;width: 100px;font-weight: 600;font-size:16px;"><?php echo '"' . amountInWords((float)$totalAmt + $fine_amount - $disc_amount) . '"'; ?></span>
<p style="color: #212529;padding-top:5px; font-size: 10px; text-align: start;">“This is computer generated receipt, no signature required.”</p>
</td>
<td width=45% style="border:1px solid #000;padding:16px 5px;border-left:0;border-top: 0;">
<table class="bottom-tbl" width=100% style="border: 2px solid #000;">
<tr>
<th style="padding:8px;text-align:left;width:65%; font-size: 16px;">Total Paid Amount </th>
<th style="padding:8px;text-align:left;width:5%;font-size: 16px;">:</th>
<td style="width:30%;padding:8px;text-align:right;font-size: 16px;"><?= $school_info['currency_symbol']; ?>. <?= (number_format($totalAmt + $fine_amount - $disc_amount)) ?></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="row">
<div class="row"></div>
</div>
</div>
</div>
<hr>
<div class="invoice_main">
<?php
if (empty($school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['markscard_header'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
//
//
?><?php
// print_r($invoice_data);
?>
<div class="invoice_head_row">
<table width="100%" class="head_tbl">
<tr>
<td style="width:40%">
<div class="top_logo">
<img class="logo_img" src="<?= $logo_img; ?>" alt="Logo Here" width="60px">
<hr align="left" style="width:50%;">
<h4 style="margin:0;padding:0;"><?= $school_info['school_name']; ?></h4>
<p class="address" style="width:250px;word-wrap: break-word;margin:0;padding:0;"><?= $school_info['address']; ?></p>
</div>
</td>
<td style="width:20%">
<div class="bill-type">
<p><label for="">Bill Type</label> : <span>Copy</span></p>
</div>
</td>
<td style="width:30%">
<ul>
<li><label for="">Phone :</label><span><?= $school_info['phone']; ?></span></li>
<li><label for="">Email :</label><span><?= $school_info['email']; ?></span></li>
<li><label for="">Website :</label><span><?= $school_info['website_link']; ?></span></li>
<li><label for="">School PAN :</label><span><?= (!empty($school_info['pan'])) ? $school_info['pan'] : "-"; ?></span></li>
</ul>
</td>
</tr>
</table>
<hr />
</div>
<div class="invoice_body">
<div class="row">
<div class="col"><b>Student Name : </b><span style="font-size: 18px;"><?= $invoice_data['studentname'] ?></span></div>
<div class="col"><b>Parent PAN: </b><span style="font-size: 18px;"><?= $invoice_data['parent_pan'] ?></span></div>
<div class="col" style="font-size: 18px;"><b> Invoice Number : </b><?= $invoice_no ?></div>
</div>
<div class="row mt-1">
<div class="col"><b>Classroom : </b>
<span style="font-size: 18px;">
<?php
$section_id = (!empty($invoice_data['section_id']) && isset($invoice_data['section_id'])) ? $invoice_data['section_id'] : 0;
if ($section_id != 0)
$section_name = $this->db->get_where('section', array('id' => $section_id))->row()->section_name;
else
$section_name = '';
$course_name = $this->db->get_where('course', array('id' => $invoice_data['course_id']))->row()->course_name;
echo (!empty($section_name)) ? $course_name . ' - ' . $section_name : $course_name;
?>
</span>
</div>
<div class="col"><b>Student ID : </b><span style="font-size: 18px;"><?= $invoice_data['studentId'] ?></span></div>
<div class="col"><b>Batch : </b><span style="font-size: 18px;"><?= str_replace('Batch ', '', $invoice_data['batch_name']) ?></span></div>
</div>
<div class="row mt-1">
<div class="px-3" style="width: 33.33%">
<b> Bill Count : </b><span style="font-size: 18px;"><?= $billPrintCountArray[0] ?></span>
</div>
<div class="col"><b>Transaction Date & Time : </b><span style="font-size: 18px;"><?= $invoice_data['tdt'] ?></span></div>
</div>
</div>
<div class="invoice_footer_row" style="padding-top:10px;">
<table class="footer_tbl_main" width="100%" style="border:1px solid #000;border-collapse: collapse;text-align:center;font-size:16px;">
<tr>
<th style="width:5%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">S.NO</th>
<th style="width:25%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Description Fee</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Billed By</th>
<th style="width:15%; text-align:center;border:1px solid #000;color: #212529;font-size:16px; padding: 8px;">Mode of Payment</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Paid Date</th>
<th style="width:8%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Discount</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Fine</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Amount</th>
</tr>
<tbody>
<?php
$totalAmt = 0;
if (!empty($invoice_data['invoices'])) {
$sno = 1;
foreach ($invoice_data['invoices'] as $i_key => $ivalue) {
$totalAmt = $totalAmt + $ivalue['payment_amt'];
?>
<tr>
<td style="width:5%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $sno; ?></td>
<td style="width:25%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['course_fee']['fee_name'] ?><small>(<?= $ivalue['payment_for'] ?>)</small></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_recived_id'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_method'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= date('d-m-Y', strtotime($ivalue['payment_date'])); ?></td>
<td style="width:8%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['deduction_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['fine_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_amt'] ?></td>
</tr>
<?php
$sno++;
}
} else {
?>
<tr>
<td colspan=5> No Data Found</td>
</tr>
<?php } ?>
</tbody>
<?php
$totalAmt = 0;
$fine_amount = 0;
$disc_amount = 0;
if (!empty($invoice_data['invoices'])) {
$sno = 1;
foreach ($invoice_data['invoices'] as $ivalue) {
$totalAmt = $totalAmt + $ivalue['payment_amt'];
$fine_amount = $fine_amount + $ivalue['fine_amount'];
$disc_amount = $disc_amount + $ivalue['deduction_amount'];
}
?>
<tr style="border:1px solid;">
<th colspan="5" style="border:1px solid #000;padding:5px;text-align:center; font-size:16px;"></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $disc_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $fine_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $totalAmt ?></th>
</tr>
<?php } ?>
</table>
<table class="footer_tbl_sub" style="border-collapse: collapse;" width=100%>
<tr>
<td colspan="7" width=65% style="border:1px solid #000;text-align:left;border-right:0;border-top: 0;padding-left:35px;">
<label for="" style="font-size: 12px;width: 100px;font-weight: 600;font-size:12px;">Amount In Word</label> :
<span style="font-size: 12px;width: 100px;font-weight: 600;font-size:16px;"><?php echo '"' . amountInWords((float)$totalAmt + $fine_amount - $disc_amount) . '"'; ?></span>
<p style="color: #212529;padding-top:5px; font-size: 10px; text-align: start;">“This is computer generated receipt, no signature required.”</p>
</td>
<td width=45% style="border:1px solid #000;padding:16px 5px;border-left:0;border-top: 0;">
<table class="bottom-tbl" width=100% style="border: 2px solid #000;">
<tr>
<th style="padding:8px;text-align:left;width:65%; font-size: 16px;">Total Paid Amount </th>
<th style="padding:8px;text-align:left;width:5%;font-size: 16px;">:</th>
<td style="width:30%;padding:8px;text-align:right;font-size: 16px;"><?= $school_info['currency_symbol']; ?>. <?= (number_format($totalAmt + $fine_amount - $disc_amount)) ?></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="row">
<div class="row"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script type="text/javascript">
$("#printSection").on("click", function() {
var element = $(".bill_count").text();
$(".bill_count").text(parseInt(element) + 1);
$.ajax({
url: "<?= base_url() . 'admin/printcount_increment'; ?>",
method: "POST",
data: {
inoviceids: <?php echo $invoiceIds[0]; ?>
},
success: function(response) {
console.log('done');
}
});
var frame1 = $('<iframe />').attr("id", "printDiv");
frame1[0].name = "frame1";
frame1.css({
"position": "absolute",
"top": "-1000000px"
});
var divContents = $("#printpage").html();
$("body").append(frame1);
var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
frameDoc.document.open();
//Create a new HTML document.
frameDoc.document.write('<html>');
frameDoc.document.write('<head>');
frameDoc.document.write('<title></title>');
// frameDoc.document.write('<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap.min.css">');
frameDoc.document.write('<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/invoice.css">');
frameDoc.document.write('<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap.min.css">');
frameDoc.document.write('<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/all.css">');
// frameDoc.document.write('<style rel="stylesheet" type="text/css" media="print">@page { size: landscape; }</style>');
frameDoc.document.write('</head>');
frameDoc.document.write('<body>');
frameDoc.document.write(divContents);
frameDoc.document.write('</body>');
frameDoc.document.write('</html>');
frameDoc.document.close();
setTimeout(function() {
document.getElementById('printDiv').contentWindow.focus();
document.getElementById('printDiv').contentWindow.print();
// frame1.remove();
if (winload) {
window.location.reload(true);
}
}, 500);
return true;
});
$(document).ready(function() {
$('.back_btn').click(function() {
parent.history.back();
return false;
});
});
</script>

View File

@ -0,0 +1,217 @@
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/invoice.css">
<div class="wraper responsive-width">
<main class="printdiv1" id="main">
<div class="main-wrap">
<div class="dashboard-cover">
<button type="button" class="btn btn-success btn-sm btn-dark back_btn">Back</button>
<div class="common-heading">
<h2>Transactions Details</h2>
</div>
<div class="invoice_wrap" id="printpage">
<div class="invoice_head" id="printableArea">
<div class="invoice_head_left">
Bill Details
</div>
<div class="invoice_right">
<p id="printSection"><img src="<?php echo base_url(); ?>assets_admin/images/print.png" /></p>
<a href="<?= base_url(); ?>admin/invoicedownload/<?= urlsafe_b64encode($invoice_data['studentId']) ?>/<?= urlsafe_b64encode($invoice_data['txn_id']) ?>"><i class="fas fa-download"></i></a>
</div>
</div>
<div class="invoice_top">
<div class="invoice_top_left">
<?php
if(empty($school_info['color_logo'])) {
$logo_img=base_url().'common_assets/black_logo.png';
}
else if(file_exists('common_assets/'.$school_info['color_logo']))
{
$logo_img=base_url().'common_assets/'.$school_info['color_logo'];
}
else {
$logo_img=base_url().'common_assets/black_logo.png';
}
?>
<img src="<?= $logo_img; ?>">
</div>
<div class="invoice_top_right">
<ul>
<li><label>Address </label>: <div><?= $school_info['address']; ?></div>
</li>
<li><label>Phone </label>: <div><?= $school_info['phone']; ?></div>
</li>
<li><label>Email </label>: <div><?= $school_info['email']; ?></div>
</li>
<li><label>Website </label>: <div><?= $school_info['website_link']; ?></div>
</li>
<li><label>School PAN </label>: <div><?= ($school_info['pan']) ? $school_info['pan'] : '-'; ?></div>
</li>
</ul>
</div>
</div>
<div class="invoice_content" >
<div class="invoice_content_left" style="width: 33.33%;">
<ul>
<li><label>Student Name </label>: &nbsp; <span><?= $invoice_data['studentname'] ?></span></li>
<li><label>Classroom </label>: &nbsp; <span>
<?php
$section_id = (!empty($invoice_data['section_id']) && isset($invoice_data['section_id'])) ? $invoice_data['section_id'] : 0;
if ($section_id != 0)
$section_name = $this->db->get_where('section', array('id' => $section_id))->row()->section_name;
else
$section_name = '';
$course_name = $this->db->get_where('course', array('id' => $invoice_data['course_id']))->row()->course_name;
echo (!empty($section_name)) ? $course_name . ' - ' . $section_name : $course_name;
?>
</span></li>
<li><label>Student id </label>: &nbsp; <span><?= $invoice_data['studentId']; ?></span></li>
<li><label>Batch</label>: &nbsp; <span><?php echo $invoice_data['batch_name']; ?></span></li>
</ul>
</div>
<div class="invoice_content_right" style="width: 28.33%;">
<ul>
<li><label>Parent PAN </label>: &nbsp; <span><?php echo $invoice_data['batch_name']; ?></span></li>
<li><label class="w-110">Transaction id </label>: &nbsp; <span><?= $invoice_data['txn_id'] ?></span></li>
<li><label class="w-110">Date </label>: &nbsp; <span><?= date('d-m-Y H:i:s', strtotime($invoice_data['paid_date'])) ?></span></li>
<li><label class="w-110">Billed By </label>:&nbsp;&nbsp;<span><?= $invoice_data['received_by'] ?></span></li>
</ul>
</div>
<div class="invoice_content_right" style="width: 38.33%;">
<ul>
<li><label class="w-186">Bill Print Count </label>:&nbsp;&nbsp;<span class="bill_count"><?php echo $invoice_data['bill_print_count'] ?></span></li>
<li><label class="w-186">Mode of Payment </label>:&nbsp;&nbsp;<span><?= $invoice_data['payment_method'] ?></span></li>
<li><label class="w-186">Transaction Date and Time </label>:&nbsp;&nbsp;<span><?= $invoice_data['tdt'] ?></span></li>
<li><label style="width: 80px">Bill Number</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: &nbsp; <span><?= $invoice_data['course_fee_id'].$invoice_data['studentId'].'/'.$invoice_data['install_sno'] ?></span></li>
</ul>
</div>
</div>
<div class="invoice_table">
<table style="text-align: center;">
<thead>
<tr>
<th>Sl No</th>
<th>Description Fee</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><?= $invoice_data['payment_for'] ?></td>
<td><?= $school_info['currency_symbol']; ?> <?= $invoice_data['payment_amt'] ?></td>
</tr>
</tbody>
<tfoot>
<!-- <tr>
<td colspan="2" style="background-color: #ffff;">Total Estimate Cost :</td>
<td style="background-color: #ffff;"><?= $invoice_data['payment_amt'] ?></td>
</tr> -->
<tr style="background-color: #ffff;border: none;">
<td colspan="2" style="background-color: #ffff;border: none;">Fine :</td>
<td style="background-color: #ffff;border: none;"><?= $invoice_data['fine_amount'] ?></td>
</tr>
<tr style="background-color: #ffff;">
<td colspan="2" style="background-color: #ffff;border: none;"><?= ucfirst($invoice_data['deduction_type']) ?> :</td>
<td style="background-color: #ffff;border: none;"> <?= $invoice_data['deduction_amount'] ?></td>
</tr>
<tr>
<td colspan="2" >Total Paid :</td>
<td ><?= $school_info['currency_symbol']; ?> <?= (($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount']) ?></td>
</tr>
<tr>
<td colspan="3" style="background-color: #ffff;">Amount In Word : &nbsp;&nbsp;<?php echo '"'. amountInWords((($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount'])) .'"'; ?></td>
</tr>
</tfoot>
</table>
</div>
<div class="invoice_footer">
<p>“This is computer generated receipt, no signature required.”</p>
</div>
</div>
</div>
</div>
</main>
</div>
<script type="text/javascript">
// $("#printSection").on("click", function() {
// //alert($(window).height());
// var ht = $(window).height();
// var wt = $(window).width();
// var divContents = $("#printpage").html();
// var printWindow = window.open('', '', 'height=' + ht + 'px,width=' + wt + 'px');
// printWindow.document.write('<html><head><title>Invoice</title>');
// printWindow.document.write('<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/invoice.css">');
// printWindow.document.write('</head><body>');
// printWindow.document.write(divContents);
// printWindow.document.write('</body></html>');
// printWindow.document.close();
// printWindow.print();
// });
$("#printSection").on("click", function() {
var element = $(".bill_count").text();
$(".bill_count").text(parseInt(element)+1);
$.ajax({
url: "<?= base_url().'admin/printcount_increment'; ?>",
method: "POST",
data: {
inoviceids: <?php echo $invoice_data['student_fee_online_transactions_id']; ?>
},
success: function(response) {
console.log('done');
} });
var frame1 = $('<iframe />').attr("id", "printDiv");
frame1[0].name = "frame1";
frame1.css({"position": "absolute", "top": "-1000000px"});
var divContents = $("#printpage").html();
$("body").append(frame1);
var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
frameDoc.document.open();
//Create a new HTML document.
frameDoc.document.write('<html>');
frameDoc.document.write('<head>');
frameDoc.document.write('<title></title>');
// frameDoc.document.write('<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap.min.css">');
frameDoc.document.write('<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/invoice.css">');
frameDoc.document.write('</head>');
frameDoc.document.write('<body>');
frameDoc.document.write(divContents);
frameDoc.document.write('</body>');
frameDoc.document.write('</html>');
frameDoc.document.close();
setTimeout(function () {
document.getElementById('printDiv').contentWindow.focus();
document.getElementById('printDiv').contentWindow.print();
// frame1.remove();
if (winload) {
window.location.reload(true);
}
}, 500);
return true;
});
$(document).ready(function(){
$('.back_btn').click(function(){
parent.history.back();
return false;
});
});
</script>

View File

@ -0,0 +1,448 @@
<!-- <link rel="stylesheet" href="<?php //echo base_url();
?>assets_admin/css/invoice.css"> -->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/invoice.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/all.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets_admin/css/bootstrap.min.css">
<div class="wraper responsive-width" style="margin:0px;padding:0px;">
<main class="printdiv1" id="main">
<div class="main-wrap">
<div class="dashboard-cover">
<div class="invoice_wrap" id="printpage">
<?php
// echo '<pre>';
$single_invoice_no = '';
$billPrintCount = 0;
$billPrintCountArray = [];
// print_r(($invoicelist));
// print_r(($invoiceids));
$isSingleInvoice = false;
if (count($invoiceids) == 1) {
$isSingleInvoice = true;
}
foreach ($invoicelist as $i_key => $i_value) {
$single_invoice_no = $i_value['invoice_no'];
array_push($billPrintCountArray, $i_value['bill_print_count']);
}
$cssStyle = (!empty($invoicelist) && (count($invoicelist) > 20)) ? 'style="page-break-after: always;"' : '';
?>
<div class="invoice_main" <?= $cssStyle; ?>>
<?php
if (empty($school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['markscard_header'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
?>
<div class="invoice_head_row">
<table width="100%" class="head_tbl">
<tr>
<td style="width:40%">
<div class="top_logo">
<img class="logo_img" src="<?= $logo_img; ?>" alt="Logo Here" width="60px">
<hr align="left" style="width:50%;">
<h4 style="padding:0px;margin:0px;"><?= $school_info['school_name']; ?></h4>
<p class="address" style="word-wrap: break-word;margin:0;padding:0;"><?= $school_info['address']; ?></p>
</div>
</td>
<td style="width:20%">
<div class="bill-type" style="text-align:center;">
<p><label for="">Bill Type</label> : <span>Original</span></p>
</div>
</td>
<td style="width:30%">
<ul>
<li><label for="">Phone :</label><span><?= $school_info['phone']; ?></span></li>
<li><label for="">Email :</label><span><?= $school_info['email']; ?></span></li>
<li><label for="">Website :</label><span><?= $school_info['website_link']; ?></span></li>
<li><label for="">School PAN :</label><span><?= (!empty($school_info['pan'])) ? $school_info['pan'] : "-"; ?></span></li>
</ul>
</td>
</tr>
</table>
<hr />
</div>
<div class="invoice_body">
<div class="row">
<div class="col"><b>Student Name : </b><span style="font-size: 18px;"><?= $studentinfo['studentname'] ?></span></div>
<div class="col"><b>Parent PAN: </b><span style="font-size: 18px;"><?= $studentinfo['parent_pan'] ?></span></div>
<div class="col" style="font-size: 18px;"><b><?= $isSingleInvoice ? 'Invoice Number' : 'Bill Print Count' ?>: </b><?= $isSingleInvoice ? $single_invoice_no : $billPrintCountArray[0] ?></div>
</div>
<div class="row mt-1">
<div class="col"><b>Classroom : </b>
<span style="font-size: 18px;">
<?php
// $section_id = (!empty($studentinfo['section_id']) && isset($studentinfo['section_id'])) ? $studentinfo['section_id'] : 0;
// if ($section_id != 0)
// $section_name = $this->db->get_where('section', array('id' => $section_id))->row()->section_name;
// else
// $section_name = '';
// $course_name = $this->db->get_where('course', array('id' => $studentinfo['course_id']))->row()->course_name;
// echo (!empty($section_name)) ? $course_name . ' - ' . $section_name : $course_name;
echo $studentinfo['classroom_name'];
?>
</span>
</div>
<div class="col"><b>Student ID : </b><span style="font-size: 18px;"><?= $studentinfo['studentId'] ?></span></div>
<div class="col"><b>Batch : </b><span style="font-size: 18px;"><?= str_replace('Batch ', '', $studentinfo['batch_name']) ?></span></div>
</div>
<div class="row mt-1">
<?php
if ($isSingleInvoice) {
?>
<div class="" style="width: 33.33%">
<b> BiBill Count : </b><span style="font-size: 18px;"><?= $billPrintCountArray[0] ?></span>
</div>
<?php } ?>
<div class="col"><b>Transaction Date & Time : </b><span style="font-size: 18px;"><?= $nDate ?></span></div>
</div>
</div>
<div class="invoice_footer_row" style="padding-top:10px;">
<table class="footer_tbl_main" width="100%" style="border:1px solid #000;border-collapse: collapse;text-align:center;font-size:16px;">
<tr>
<th style="width:5%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">S.NO</th>
<th style="width:25%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Description Fee</th>
<?php
if (!$isSingleInvoice) {
?>
<th style="width:8%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Invoice No.</th>
<?php } ?>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Billed By</th>
<th style="width:15%; text-align:center;border:1px solid #000;color: #212529;font-size:16px; padding: 8px;">Mode of Payment</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Paid Date</th>
<th style="width:8%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Discount</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Fine</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Amount</th>
</tr>
<tbody>
<?php
$totalAmt = 0;
if (!empty($invoicelist)) {
$sno = 1;
foreach ($invoicelist as $ivalue) {
$totalAmt = $totalAmt + $ivalue['payment_amt'];
?>
<tr>
<td style="width:5%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $sno; ?></td>
<td style="width:25%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['fee_values'] ?><small>(<?= $ivalue['payment_for'] ?>)</small></td>
<?php
if (!$isSingleInvoice) {
?>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;">
<?php
if ($school_info['invoice_prefix_status'] == 1 && !empty($ivalue['invoice_no']))
echo $school_info['invoice_prefix'] . $ivalue['invoice_no'];
else
echo $ivalue['invoice_no'];
//echo $ivalue['course_fee_id'].$ivalue['studentId'].'/'.$ivalue['install_sno']
?>
</td>
<?php } ?>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_recived_id'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_method'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= date('d-m-Y', strtotime($ivalue['payment_date'])); ?></td>
<td style="width:8%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['deduction_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['fine_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_amt'] ?></td>
</tr>
<?php
$sno++;
}
} else {
?>
<tr>
<td colspan=5> No Data Found</td>
</tr>
<?php } ?>
</tbody>
<?php
$totalAmt = 0;
$fine_amount = 0;
$disc_amount = 0;
if (!empty($invoicelist)) {
$sno = 1;
foreach ($invoicelist as $ivalue) {
$totalAmt = $totalAmt + $ivalue['payment_amt'];
$fine_amount = $fine_amount + $ivalue['fine_amount'];
$disc_amount = $disc_amount + $ivalue['deduction_amount'];
}
?>
<tr style="border:1px solid;">
<th colspan="<?= !$isSingleInvoice ? 6 : 5 ?>" style="border:1px solid #000;padding:5px;text-align:center; font-size:16px;"></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $disc_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $fine_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:16px;"><?php echo $totalAmt ?></th>
</tr>
<?php } ?>
</table>
<table class="footer_tbl_sub" style="border-collapse: collapse;" width=100%>
<tr>
<td colspan="7" width=65% style="border:1px solid #000;text-align:left;border-right:0;border-top: 0;padding-left:35px;">
<label for="" style="font-size: 12px;width: 100px;font-weight: 600;font-size:12px;">Amount In Word</label> :
<span style="font-size: 12px;width: 100px;font-weight: 600;font-size:16px;"><?php echo '"' . amountInWords((float)$totalAmt + $fine_amount - $disc_amount) . '"'; ?></span>
<p style="color: #212529;padding-top:5px; font-size: 10px; text-align: start;">“This is computer generated receipt, no signature required.”</p>
</td>
<td width=45% style="border:1px solid #000;padding:16px 5px;border-left:0;border-top: 0;">
<table class="bottom-tbl" width=100% style="border: 2px solid #000;">
<tr>
<th style="padding:8px;text-align:left;width:65%; font-size: 16px;">Total Paid Amount </th>
<th style="padding:8px;text-align:left;width:5%;font-size: 16px;">:</th>
<td style="width:30%;padding:8px;text-align:right;font-size: 16px;"><?= $school_info['currency_symbol']; ?>. <?= (number_format($totalAmt + $fine_amount - $disc_amount)) ?></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="row">
<div class="row"></div>
</div>
</div>
</div>
<hr>
<div class="invoice_main" <?= $cssStyle; ?>>
<?php
if (empty($school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/black_logo.png';
} else if (file_exists('common_assets/' . $school_info['markscard_header'])) {
$logo_img = base_url() . 'common_assets/' . $school_info['markscard_header'];
} else {
$logo_img = base_url() . 'common_assets/black_logo.png';
}
?>
<div class="invoice_head_row">
<table width="100%" class="head_tbl">
<tr>
<td style="width:40%">
<div class="top_logo">
<img class="logo_img" src="<?= $logo_img; ?>" alt="Logo Here" width="60px">
<hr align="left" style="width:50%;">
<h4 style="padding:0px;margin:0px;"><?= $school_info['school_name']; ?></h4>
<p class="address" style="word-wrap: break-word;margin:0;padding:0;"><?= $school_info['address']; ?></p>
</div>
</td>
<td style="width:20%">
<div class="bill-type" style="text-align:center;">
<p><label for="">Bill Type</label> : <span>Copy</span></p>
</div>
</td>
<td style="width:30%">
<ul>
<li><label for="">Phone :</label><span><?= $school_info['phone']; ?></span></li>
<li><label for="">Email :</label><span><?= $school_info['email']; ?></span></li>
<li><label for="">Website :</label><span><?= $school_info['website_link']; ?></span></li>
<li><label for="">School PAN :</label><span><?= (!empty($school_info['pan'])) ? $school_info['pan'] : "-"; ?></span></li>
</ul>
</td>
</tr>
</table>
<hr />
</div>
<div class="invoice_body">
<div class="row">
<div class="col"><b>Student Name : </b><span style="font-size: 18px;"><?= $studentinfo['studentname'] ?></span></div>
<div class="col"><b>Parent PAN: </b><span style="font-size: 18px;"><?= $studentinfo['parent_pan'] ?></span></div>
<div class="col" style="font-size: 18px;"><b><?= $isSingleInvoice ? 'Invoice Number' : 'Bill Print Count' ?>: </b><?= $isSingleInvoice ? $single_invoice_no : $billPrintCountArray[0] ?></div>
</div>
<div class="row mt-1">
<div class="col"><b>Classroom : </b>
<span style="font-size: 18px;">
<?php
$section_id = (!empty($studentinfo['section_id']) && isset($studentinfo['section_id'])) ? $studentinfo['section_id'] : 0;
if ($section_id != 0)
$section_name = $this->db->get_where('section', array('id' => $section_id))->row()->section_name;
else
$section_name = '';
$course_name = $this->db->get_where('course', array('id' => $studentinfo['course_id']))->row()->course_name;
echo (!empty($section_name)) ? $course_name . ' - ' . $section_name : $course_name;
?>
</span>
</div>
<div class="col"><b>Student ID : </b><span style="font-size: 18px;"><?= $studentinfo['studentId'] ?></span></div>
<div class="col"><b>Batch : </b><span style="font-size: 18px;"><?= str_replace('Batch ', '', $studentinfo['batch_name']) ?></span></div>
</div>
<div class="row mt-1">
<?php
if ($isSingleInvoice) {
?>
<div class="" style="width: 33.33%">
<b> BiBill Count : </b><span style="font-size: 18px;"><?= $billPrintCountArray[0] ?></span>
</div>
<?php } ?>
<div class="col"><b>Transaction Date & Time : </b><span style="font-size: 18px;"><?= $nDate ?></span></div>
</div>
</div>
<div class="invoice_footer_row" style="padding-top:10px;">
<table class="footer_tbl_main" width="100%" style="border:1px solid #000;border-collapse: collapse;text-align:center;font-size:16px;">
<tr>
<th style="width:5%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">S.NO</th>
<th style="width:25%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Description Fee</th>
<?php
if (!$isSingleInvoice) {
?>
<th style="width:8%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Invoice No.</th>
<?php } ?>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px; padding: 8px;">Billed By</th>
<th style="width:15%; text-align:center;border:1px solid #000;color: #212529;font-size:16px; padding: 8px;">Mode of Payment</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Paid Date</th>
<th style="width:8%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Discount</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Fine</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; font-size:16px;padding: 8px;">Amount</th>
</tr>
<tbody>
<?php
$totalAmt = 0;
if (!empty($invoicelist)) {
$sno = 1;
foreach ($invoicelist as $ivalue) {
$totalAmt = $totalAmt + $ivalue['payment_amt'];
?>
<tr>
<td style="width:5%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $sno; ?></td>
<td style="width:25%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['fee_values'] ?><small>(<?= $ivalue['payment_for'] ?>)</small></td>
<?php
if (!$isSingleInvoice) {
?>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:16px;">
<?php
if ($school_info['invoice_prefix_status'] == 1 && !empty($ivalue['invoice_no']))
echo $school_info['invoice_prefix'] . $ivalue['invoice_no'];
else
echo $ivalue['invoice_no'];
//echo $ivalue['course_fee_id'].$ivalue['studentId'].'/'.$ivalue['install_sno']
?>
</td>
<?php } ?>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_recived_id'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_method'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= date('d-m-Y', strtotime($ivalue['payment_date'])); ?></td>
<td style="width:8%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['deduction_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['fine_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 5px; font-size:18px;"><?= $ivalue['payment_amt'] ?></td>
</tr>
<?php
$sno++;
}
} else {
?>
<tr>
<td colspan=5> No Data Found</td>
</tr>
<?php } ?>
</tbody>
<?php
$totalAmt = 0;
$fine_amount = 0;
$disc_amount = 0;
if (!empty($invoicelist)) {
$sno = 1;
foreach ($invoicelist as $ivalue) {
$totalAmt = $totalAmt + $ivalue['payment_amt'];
$fine_amount = $fine_amount + $ivalue['fine_amount'];
$disc_amount = $disc_amount + $ivalue['deduction_amount'];
}
?>
<tr style="border:1px solid;">
<th colspan="<?= !$isSingleInvoice ? 6 : 5 ?>" style="border:1px solid #000;padding:5px;text-align:center; font-size:18px;"></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:18px;"><?php echo $disc_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:18px;"><?php echo $fine_amount ?></th>
<th style="border:1px solid #000;padding:5px;text-align:center;font-size:18px;"><?php echo $totalAmt ?></th>
</tr>
<?php } ?>
</table>
<table class="footer_tbl_sub" style="border-collapse: collapse;" width=100%>
<tr>
<td colspan="7" width=65% style="border:1px solid #000;text-align:left;border-right:0;border-top: 0;padding-left:35px;">
<label for="" style="font-size: 12px;width: 100px;font-weight: 600;font-size:12px;">Amount In Word</label> :
<span style="font-size: 12px;width: 100px;font-weight: 600;font-size:16px;"><?php echo '"' . amountInWords((float)$totalAmt + $fine_amount - $disc_amount) . '"'; ?></span>
<p style="color: #212529;padding-top:5px; font-size: 10px; text-align: start;">“This is computer generated receipt, no signature required.”</p>
</td>
<td width=45% style="border:1px solid #000;padding:16px 5px;border-left:0;border-top: 0;">
<table class="bottom-tbl" width=100% style="border: 2px solid #000;">
<tr>
<th style="padding:8px;text-align:left;width:65%; font-size: 16px;">Total Paid Amount </th>
<th style="padding:8px;text-align:left;width:5%;font-size: 16px;">:</th>
<td style="width:30%;padding:8px;text-align:right;font-size: 16px;"><?= $school_info['currency_symbol']; ?>. <?= (number_format($totalAmt + $fine_amount - $disc_amount)) ?></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="row">
<div class="row"></div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>

View File

@ -0,0 +1,408 @@
<div class="wraper responsive-width" style="height:100% !important;">
<main class="" id="main">
<div class="main-wrap" style="page-break-after: always;">
<div class="dashboard-cover">
<?php
if(empty($school_info['color_logo'])) {
$logo_img=base_url().'common_assets/black_logo.png';
}
else if(file_exists('common_assets/'.$school_info['color_logo']))
{
$logo_img=base_url().'common_assets/'.$school_info['color_logo'];
}
else {
$logo_img=base_url().'common_assets/black_logo.png';
}
?>
<div class="invoice_wrap">
<div class="invoice_head_row" style="background-color:#F1F1F1">
<table width="100%" class="head_tbl" style="padding-top: 25px;">
<tr>
<td style="width:30%">
<table width="100%">
<tr>
<td width="100%" ><img class="logo_img" src="<?= $logo_img; ?>" alt="Logo Here"></td>
</tr>
<tr><td><hr style="width:100%;"></td></tr>
<tr>
<td width="100%"><h4><?= $school_info['school_name']; ?></h4></td>
</tr>
<tr>
<td width="100%"><p class="address"><?= $school_info['address']; ?></p></td>
</tr>
</table>
<div class="top_logo" style="padding-left:10px;">
</div>
</td>
<td style="width:30%">
<table >
<tr>
<th style="padding:0px 0px 0px 50px;">Bill Type</th><th> :</th><td>Original</td>
</tr>
</table>
</td>
<td style="width:40%">
<table style="text-align: left;">
<tr>
<th style="text-align: left;padding:5px;">Phone</th><th>:</th><td><span><?= $school_info['phone']; ?></span></td>
</tr>
<tr>
<th style="text-align: left;padding:5px;">Email</th><th>:</th><td><span><?= $school_info['email']; ?></span></td>
</tr>
<tr>
<th style="text-align: left;padding:5px;">Website</th><th>:</th><td><span><?= $school_info['website_link']; ?></span></td>
</tr>
<tr>
<th style="text-align: left;padding:5px;">School PAN</th><th>:</th><td><span><?= (!empty($school_info['pan'])) ? $school_info['pan']:"-"; ?></span></td>
</tr>
</table>
</td>
</tr>
</table>
<hr/>
</div>
<div style="margin:20px 5px">
<table width="100%" >
<tr>
<th style="padding:7px 7px 7px 0px;text-align:left; width:12%">Student Name </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= $invoice_data['studentname'] ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:12%">Parent PAN </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= (!empty($invoice_data['parent_pan'])) ? $invoice_data['parent_pan'] : '-'; ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:14%">Bill Print Count </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:16%"><span><?= $invoice_data['bill_print_count'] ?></span></td>
</tr>
<tr>
<th style="padding:7px 7px 7px 0px;text-align:left; width:12%">Classroom </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?php
$section_id = (!empty($invoice_data['section_id']) && isset($invoice_data['section_id'])) ? $invoice_data['section_id'] : 0;
if ($section_id != 0)
$section_name = $this->db->get_where('section', array('id' => $section_id))->row()->section_name;
else
$section_name = '';
$course_name = $this->db->get_where('course', array('id' => $invoice_data['course_id']))->row()->course_name;
echo (!empty($section_name)) ? $course_name . ' - ' . $section_name : $course_name;
?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left; width:12%">Student ID </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= $invoice_data['studentId'] ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:14%">Transaction Date & Time </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:16%"><span><span><?= date('d-m-Y H:i:s', strtotime($invoice_data['tdt'])) ?></span></td>
</tr>
<tr>
<th style="padding:7px 7px 7px 0px;text-align:left; width:15%">Batch </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= $invoice_data['batch_name']; ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:15%"></th><th style="text-align:left; width:2%"></th><td style="text-align:left; width:20%"><span></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:15%"></th><th style="text-align:left; width:2%"></th><td style="text-align:left; width:20%"><span></span></td>
</tr>
</table>
</div>
<div class="invoice_table">
<table class="tblbody" style="border:1px solid #000; border-collapse: collapse; margin:5px;width: 100%;">
<thead>
<tr >
<th style="width:5%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">SNo</th>
<th style="width:25%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Description</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Bill No</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Billed By</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Mode of Payment</th>
<th style="width:15%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Paid Date</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;"><?php echo (!empty(ucfirst($invoice_data['deduction_type']))) ? ucfirst($invoice_data['deduction_type']) : "Scholarship/\nDiscount"; ?></th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Fine</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:5%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;">1</td>
<td style="width:20%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['payment_for'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?php echo $invoice_data['invoice_no']; //echo $invoice_data['course_fee_id'].$invoice_data['studentId'].'/'.$invoice_data['install_sno'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['received_by'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['payment_method'] ?></td>
<td style="width:15%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= date('d-m-Y H:i:s', strtotime($invoice_data['paid_date'])) ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['deduction_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['fine_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= (($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount']) ?></td>
</tr>
<tr>
<td colspan="6" style="border:1px solid #000;padding:5px;text-align:center;"></td>
<td style="border:1px solid #000;padding:5px;text-align:center;"><?= $invoice_data['deduction_amount']; ?></td>
<td style="border:1px solid #000;padding:5px;text-align:center;"><?= $invoice_data['fine_amount']; ?></td>
<td style="border:1px solid #000;padding:5px;text-align:center;"><?= $invoice_data['payment_amt']; ?></td>
</tr>
</tbody>
<tr>
<td colspan="6" style="padding:10px 5px 10px 50px;text-align:left;width:60%">
<p style="padding:5px;font-weight:bold;"><span><b>Amount In Word :</b>
<?php echo '"'. amountInWords((($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount'])) .'"'; ?></span></p>
<br>
<p style="padding:5px;"> “This is computer generated receipt, no signature required.”</p>
</td>
<td colspan="3" style="padding:5px;width:40%;">
<table style="border:2px solid #000;border-collapse: collapse; margin:5px;width:100%;background-color:white;">
<tbody>
<tr >
<th style="padding:5px;text-align:left;width:65%">Total Fee Amount </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-weight:bold;"><?= $invoice_data['payment_amt']; ?></td>
</tr>
<tr>
<th style="padding:5px;text-align:left;width:65%">Total Fine </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-weight:bold;"><?= $invoice_data['fine_amount']; ?></td>
</tr>
<tr>
<th style="padding:5px;text-align:left;width:65%">Total <?php echo (!empty(ucfirst($invoice_data['deduction_type']))) ? ucfirst($invoice_data['deduction_type']) : "Scholarship/\nDiscount"; ?> </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-weight:bold;"><?= $invoice_data['deduction_amount']; ?></td>
</tr>
<tr>
<th style="padding:5px;text-align:left;width:65%">Total Paid Amount </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-weight:bold;"><?= $school_info['currency_symbol']; ?>. <?= (($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount']) ?></td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
</div>
<hr>
</div>
</div>
<!-- *************************************Copy****************************** -->
<div class="main-wrap">
<div class="dashboard-cover">
<?php
if(empty($school_info['color_logo'])) {
$logo_img=base_url().'common_assets/black_logo.png';
}
else if(file_exists('common_assets/'.$school_info['color_logo']))
{
$logo_img=base_url().'common_assets/'.$school_info['color_logo'];
}
else {
$logo_img=base_url().'common_assets/black_logo.png';
}
?>
<div class="invoice_wrap">
<div class="invoice_head_row" style="background-color:#F1F1F1">
<table width="100%" class="head_tbl" style="padding-top: 25px;">
<tr>
<td style="width:30%">
<table width="100%">
<tr>
<td width="100%" ><img class="logo_img" src="<?= $logo_img; ?>" alt="Logo Here"></td>
</tr>
<tr><td><hr style="width:100%;"></td></tr>
<tr>
<td width="100%"><h4><?= $school_info['school_name']; ?></h4></td>
</tr>
<tr>
<td width="100%"><p class="address"><?= $school_info['address']; ?></p></td>
</tr>
</table>
<div class="top_logo" style="padding-left:10px;">
</div>
</td>
<td style="width:30%">
<table >
<tr>
<th style="padding:0px 0px 0px 50px;">Bill Type</th><th> :</th><td>Copy</td>
</tr>
</table>
</td>
<td style="width:40%">
<table style="text-align: left;">
<tr>
<th style="text-align: left;padding:5px;">Phone</th><th>:</th><td><span><?= $school_info['phone']; ?></span></td>
</tr>
<tr>
<th style="text-align: left;padding:5px;">Email</th><th>:</th><td><span><?= $school_info['email']; ?></span></td>
</tr>
<tr>
<th style="text-align: left;padding:5px;">Website</th><th>:</th><td><span><?= $school_info['website_link']; ?></span></td>
</tr>
<tr>
<th style="text-align: left;padding:5px;">School PAN</th><th>:</th><td><span><?= (!empty($school_info['pan'])) ? $school_info['pan']:"-"; ?></span></td>
</tr>
</table>
</td>
</tr>
</table>
<hr/>
</div>
<div style="margin:20px 5px">
<table width="100%" >
<tr>
<th style="padding:7px 7px 7px 0px;text-align:left; width:12%">Student Name </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= $invoice_data['studentname'] ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:12%">Parent PAN </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= (!empty($invoice_data['parent_pan'])) ? $invoice_data['parent_pan'] : '-'; ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:14%">Bill Print Count </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:16%"><span><?= $invoice_data['bill_print_count'] ?></span></td>
</tr>
<tr>
<th style="padding:7px 7px 7px 0px;text-align:left; width:12%">Classroom </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?php
$section_id = (!empty($invoice_data['section_id']) && isset($invoice_data['section_id'])) ? $invoice_data['section_id'] : 0;
if ($section_id != 0)
$section_name = $this->db->get_where('section', array('id' => $section_id))->row()->section_name;
else
$section_name = '';
$course_name = $this->db->get_where('course', array('id' => $invoice_data['course_id']))->row()->course_name;
echo (!empty($section_name)) ? $course_name . ' - ' . $section_name : $course_name;
?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left; width:12%">Student ID </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= $invoice_data['studentId'] ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:14%">Transaction Date & Time </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:16%"><span><span><?= date('d-m-Y H:i:s', strtotime($invoice_data['tdt'])) ?></span></td>
</tr>
<tr>
<th style="padding:7px 7px 7px 0px;text-align:left; width:15%">Batch </th><th style="text-align:left; width:2%">:</th><td style="text-align:left; width:20%"><span><?= $invoice_data['batch_name']; ?></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:15%"></th><th style="text-align:left; width:2%"></th><td style="text-align:left; width:20%"><span></span></td>
<th style="padding:7px 7px 7px 0px;text-align:left;width:15%"></th><th style="text-align:left; width:2%"></th><td style="text-align:left; width:20%"><span></span></td>
</tr>
</table>
</div>
<div class="invoice_table">
<table class="tblbody" style="border:1px solid #000; border-collapse: collapse; margin:5px;width: 100%;">
<thead>
<tr >
<th style="width:5%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">SNo</th>
<th style="width:25%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Description</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Bill No</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Billed By</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Mode of Payment</th>
<th style="width:15%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Paid Date</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;"><?php echo (!empty(ucfirst($invoice_data['deduction_type']))) ? ucfirst($invoice_data['deduction_type']) : "Scholarship/\nDiscount"; ?></th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Fine</th>
<th style="width:10%; text-align:center;border:1px solid #000;color: #212529; padding: 7px;">Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:5%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;">1</td>
<td style="width:20%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['payment_for'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?php echo $invoice_data['invoice_no']; //echo $invoice_data['course_fee_id'].$invoice_data['studentId'].'/'.$invoice_data['install_sno'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['received_by'] ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['payment_method'] ?></td>
<td style="width:15%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= date('d-m-Y H:i:s', strtotime($invoice_data['paid_date'])) ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['deduction_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= $invoice_data['fine_amount']; ?></td>
<td style="width:10%; text-align:center;border:1px solid #000;color: #212529;padding: 7px;"><?= (($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount']) ?></td>
</tr>
<tr>
<td colspan="6" style="border:1px solid #000;padding:5px;text-align:center;"></td>
<td style="border:1px solid #000;padding:5px;text-align:center;"><?= $invoice_data['deduction_amount']; ?></td>
<td style="border:1px solid #000;padding:5px;text-align:center;"><?= $invoice_data['fine_amount']; ?></td>
<td style="border:1px solid #000;padding:5px;text-align:center;"><?= $invoice_data['payment_amt']; ?></td>
</tr>
</tbody>
<tr>
<td colspan="6" style="padding:10px 5px 10px 50px;text-align:left;width:60%">
<p style="padding:5px;font-weight:bold;"><span><b>Amount In Word :</b>
<?php echo '"'. amountInWords((($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount'])) .'"'; ?></span></p>
<br>
<p style="padding:5px;"> “This is computer generated receipt, no signature required.”</p>
</td>
<td colspan="3" style="padding:5px;width:40%;">
<table style="border:2px solid #000;border-collapse: collapse; margin:5px;width:100%;background-color:white;">
<tbody>
<tr >
<th style="padding:5px;text-align:left;width:65%">Total Fee Amount </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-weight:bold;"><?= $invoice_data['payment_amt']; ?></td>
</tr>
<tr>
<th style="padding:5px;text-align:left;width:65%">Total Fine </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-weight:bold;"><?= $invoice_data['fine_amount']; ?></td>
</tr>
<tr>
<th style="padding:5px;text-align:left;width:65%;font-size:14px;">Total <?php echo (!empty(ucfirst($invoice_data['deduction_type']))) ? ucfirst($invoice_data['deduction_type']) : "Scholarship/\nDiscount"; ?> </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-size:14px;font-weight:bold;"><?= $invoice_data['deduction_amount']; ?></td>
</tr>
<tr>
<th style="padding:5px;text-align:left;width:65%;font-size:14px;">Total Paid Amount </th><th style="padding:5px;text-align:left;width:5%">:</th><td style="width:30%;padding:5px;text-align:right;font-weight:bold;font-size:14px;"><?= $school_info['currency_symbol']; ?>. <?= (($invoice_data['payment_amt'] + $invoice_data['fine_amount'] ) - $invoice_data['deduction_amount']) ?></td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
</div>
<hr>
</div>
</div>
</main>
</div>

View File

@ -0,0 +1,657 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.error {
color: red;
font-size: 12px;
}
input[type="number"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 160px;
}
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.course_grade_details_table input[type="text"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
}
.course_grade_details_table input[type="number"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 90px;
}
.course_grade_details_table td,
.course_grade_details_table th {
border: 0;
padding: 15px 10px;
}
.course_grade_details_table {
border: 0;
}
.course_grade_details_table td {
text-align: left;
padding: 8px 10px;
}
.course_grade_details_table th {
font-weight: 300;
font-size: 15px;
color: black;
border-bottom: 2px solid #032da1;
}
.scrollable_table thead {
display: table;
width: 100%;
}
.scrollable_table tbody {
display: block;
overflow-y: scroll;
max-height: 400px;
}
.scrollable_table th,
.scrollable_table td {
width: 130px;
font-size: 12px;
}
.scrollable_table tr {
display: table;
width: 100%;
box-sizing: border-box;
}
.scrollable_table th:nth-child(1),
.scrollable_table td:nth-child(1) {
width: 42px;
}
span.margin-t {
margin-top: 5px;
display: block;
}
.bootstrap-select .dropdown-toggle .filter-option {
top: 0px;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error_msg'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php } ?>
<div class="subsec_sec" style="display:block">
<form id="searchFilters" action="<?= base_url(); ?>admin/journal-vouchers" method="POST" onkeydown=" return event.key != 'Enter'">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover" style="margin-bottom: 4px;">
<div class="report_sec_left">
<?php
$f_f_types = array();
$currency_symbol = $school_info['currency_symbol'];
$search_batch = (isset($_POST['f_batch']) && !empty($_POST['f_batch'])) ? $_POST['f_batch'] : '';
$search_course_id = (isset($_POST['f_course']) && !empty($_POST['f_course'])) ? $_POST['f_course'] : '';
$search_section = (isset($_POST['f_section']) && !empty($_POST['f_section'])) ? $_POST['f_section'] : '';
$search_fee_types = (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types'])) ? $_POST['filter_fee_types'] : '';
$theExportHeader = 'Scholarships';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . $school_info['address'] . '\n Scholarships';
}
if (count($_POST) > 0) {
if (isset($_POST['filter_fee_types']) && !empty($_POST['filter_fee_types'])) {
$f_f_types = $_POST['filter_fee_types'];
}
}
// print_r($_POST);
?>
</div>
<div class="subject_lhead">Journal Vouchers</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-2 pr-0">
<div class="subject-filter">
<label class="has-float-label">
<select id="f_batch" name="f_batch" class="custom-select form-control">
<option value="">Select Batch</option>
<?php if (isset($batches) || !empty($batches)) {
foreach ($batches as $row) {
if ($search_batch != '')
$b_selected = ($row['id'] == $search_batch) ? 'selected' : '';
else
$b_selected = ($row['id'] == $school_info['batch_id']) ? 'selected' : '';
?>
<option value="<?php echo $row['id'] ?>" <?= $b_selected; ?>>
<?php echo $row['b_name']; ?></option>
<?php }
} ?>
</select>
<span>Select Batch <span style="font-weight:bold;color:red;"> * </span></span>
</label>
<div class="text-danger cierr"><?php echo form_error('f_batch'); ?></div>
</div>
</div>
<div class="col-md-2 px-0">
<div class="subject-filter">
<label class="has-float-label">
<select id="f_user_type" name="f_user_type" class="custom-select form-control">
<option value="teacher" <?= $user_type == 'teacher' ? 'selected' : '' ?>>Teacher</option>
<option value="student" <?= $user_type == 'student' ? 'selected' : '' ?>>Student</option>
</select>
<span>Send Notice</span>
</label>
</div>
</div>
<div class="col-md-2 px-0 stdSection">
<div class="subject-filter">
<label class="has-float-label">
<select id="f_course" name="f_course" class="custom-select form-control">
<option value="">Select Class</option>
<?php foreach ($course as $c_value) {
$course_selected = ($c_value['id'] == $search_course_id) ? 'selected' : '';
?>
<option value="<?= $c_value['id']; ?>" <?= $course_selected; ?>><?php echo $c_value['course_name']; ?> </option>
<?php } ?>
</select>
<span>Select Class</span>
</label>
</div>
</div>
<div class="col-md-2 px-0 stdSection">
<div class=" form-group subject-filter">
<label class="has-float-label">
<?php if ($search_course_id != '' && $search_course_id > 0) {
$sql = "SELECT s.id as section_id,s.section_name FROM course_sections cs JOIN section s ON s.id=cs.section_id WHERE cs.course_id='$search_course_id' ORDER BY s.id DESC";
$section_list = $this->Admin_model->get_query_result($sql);
?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
if (isset($section_list) && !empty($section_list)) {
foreach ($section_list as $se_val) { ?>
<option value="<?php echo $se_val['section_id'] ?>" <?php if (isset($search_section) && !empty($search_section)) {
echo (in_array($se_val['section_id'], $search_section)) ? 'selected' : '';
} ?>><?php echo $se_val['section_name'] ?></option>
<?php }
} ?>
</select>
<?php } else { ?>
<select id="f_section" id="f_section" name="f_section[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
</select>
<?php } ?>
<span>Select Section</span>
</label>
</div>
</div>
<!-- <div class="col-md-3">
<div class="form-group assign_fee_toall mb-0">
<label class="has-float-label mb-0">
<?php if (!empty($all_fee_types) && count($all_fee_types) > 0) {
?>
<select placeholder="Select Fees type" name="filter_fee_types[]" id="filter_fee_types" class="form-control selectpicker" multiple data-live-search="true" required>
<option value="" disabled> -- Select Fees type -- </option>
<?php
foreach ($all_fee_types as $ft_value) {
$disableStatus = '';
if (count($selected_feetype) != 0) {
if (in_array(8, $selected_fee_types)) {
$disableStatus = '';
} else {
$disableStatus = 'disabled';
}
if ($ft_value['id'] == 8) {
$disableStatus = '';
} else {
$disableStatus = 'disabled';
}
}
?>
<option value="<?= $ft_value['id'] ?>" <?php echo (in_array($ft_value['id'], $f_f_types)) ? "selected" : ""; ?> <?= $disableStatus ?>><?= $ft_value['feetype_name'] ?></option>
<?php
} ?>
</select>
<?php
} else { ?>
<select placeholder="Select Fees type" name="filter_fee_types[]" id="filter_fee_types" class="form-control fees_type_list selectpicker" multiple required>
<option value="" disabled> -- Select Fees type -- </option>
<?php
foreach ($all_fee_types as $ft_value) {
?>
<option value="<?= $ft_value['id'] ?>"><?= $ft_value['feetype_name'] ?></option>
<?php } ?>
</select>
<?php } ?>
<span> Fees Type</span>
</label>
<label id="filter_fee_types-error" class="error mb-0" for="filter_fee_types"></label>
</div>
</div> -->
<div class="col-md-3">
<div class="date-filter">
<input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success " style="width:250px;height:40px;" value="Filter">
<a href="<?php echo base_url() ?>admin/total-due-report">
<div class="date-filter"> <button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<form method="post" id="sendSmsAll" action="<?php echo base_url(); ?>Admin/createVoucher">
<input type="hidden" name="batch_id" id="batch_id">
<input type="hidden" name="course_id" id="course_id">
<input type="hidden" name="user_t" id="userT">
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<?php if ($user_type == 'student') { ?>
<!-- changed ID -->
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th><input type="checkbox" id="chkParent" /></th>
<th>Roll No</th>
<th>Student Id </th>
<th>Student Name</th>
<th>Class</th>
<th>Section</th>
<!-- <th>Guardian Name</th>
<th>Contact Number</th> -->
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
$sno = 1;
if (isset($students) && !empty($students)) {
foreach ($students as $svalue) {
?>
<tr>
<td>
<?php if (empty($svalue['ledger_account'])) { ?>
<input type="checkbox" name="contact_list[]" value="<?= $svalue['studentId'] ?>" />
<?php } else { ?>
<i class="fa fa-check text-success" aria-hidden="true"></i>
<?php } ?>
</td>
<td><?= $svalue['roll_no']; ?></td>
<td class="text-left"><?= $svalue['studentId']; ?></td>
<td class="text-left"><?= $svalue['student_name']; ?></td>
<td class="text-left"><?= $svalue['course_name']; ?></td>
<td class="text-left"><?= $svalue['section_name']; ?></td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
<?php } else { ?>
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th><input type="checkbox" id="chkParent" /></th>
<th>S.No.</th>
<th>Teacher Id</th>
<th>Designation</th>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
</tr>
</thead>
<tbody>
<?php
$sno = 1;
if (isset($teachers) && !empty($teachers)) {
foreach ($teachers as $teacher) {
?>
<tr>
<td>
<?php if (empty($teacher['ledger_account'])) { ?>
<input type="checkbox" name="contact_list[]" value="<?= $teacher['teacherId'] ?>" />
<?php } else { ?>
<i class="fa fa-check text-success" aria-hidden="true"></i>
<?php } ?>
</td>
<td><?= $sno; ?></td>
<td class="text-capitalize text-left"><?= $teacher['teacherId']; ?></td>
<td class="text-left">
<?php
$desig = '';
foreach ($hr_designation as $desKey => $designation) {
if ($designation['id'] == $teacher['designation']) {
$desig = $designation['title'];
}
}
?>
<?= !empty($desig) ? $desig : '-' ?>
</td>
<td class="text-left"><?= $teacher['teacher_name']; ?></td>
<td class="text-left">
<div class="email-width" title="<?= $teacher['email']; ?>"><?= $teacher['email']; ?></div>
</td>
<td><?= $teacher['mobile']; ?></td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
<?php } ?>
<button type="submit" style="font-size: 14px;padding: 6px 25px; " class="subject_addbtn send_ntice float-right mt-3" id="send_ntice">Create Account</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script>
// $(document).on('click', '#filter_reset1', function() {
// $('#txt-submit').show();
// });
$('#filter_fee_types').change(function() {
$('#filter_fee_types').selectpicker('toggle');
$('#new-dropdown-section').addClass('d-none');
var TotalValues = [];
var selectedValues = [];
$('#filter_fee_types option').each(function() {
let item = $(this).val();
if (item != '') {
TotalValues.push(item);
}
});
$('#filter_fee_types option:selected').each(function() {
let selectItem = $(this).val();
if (selectItem != '')
selectedValues.push(selectItem);
});
const intersection = TotalValues.filter(element => selectedValues.includes(element));
const differValues = TotalValues.filter(element => !selectedValues.includes(element));
if (intersection.length > 0) {
if (intersection.includes("3") || intersection.includes("4") || intersection.includes("8")) {
for (let i = 0; i < intersection.length; i++) {
for (let j = 0; j < differValues.length; j++) {
$("#filter_fee_types option[value='" + differValues[j] + "']").prop('disabled', true);
}
$("#filter_fee_types option[value='" + intersection[i] + "']").prop('disabled', false);
}
} else {
$("#filter_fee_types option[value='3']").prop('disabled', true);
$("#filter_fee_types option[value='4']").prop('disabled', true);
$("#filter_fee_types option[value='8']").prop('disabled', true);
}
} else {
$("#filter_fee_types option").prop('disabled', false);
}
});
$(document).on('click', '.send_ntice', function() {
var studentidlist = [];
let batchId = $('#f_batch option:selected').val();
let courseId = $('#f_course option:selected').val();
let markCount = 0;
if (batchId == '') {
markCount++;
alert("Please Select Batch");
}
if (markCount === 0) {
$.each($("input[name='contact_list[]']:checked"), function() {
var item = $(this).data('studentid');
studentidlist.push(item);
});
if (studentidlist.length === 0) {
alert("Please Select Students" + studentidlist.length);
} else {
// alert("Please Select Students 33333 " + studentidlist.length);
$('#sendSmsAll').submit();
}
}
});
</script>
<script>
$(document).ready(function() {
$('.stdSection').hide();
var userType = '<?= $user_type ?>';
var batchId = '<?= $search_batch ?>';
console.log(userType);
if (userType === 'teacher') {
$('.stdSection').hide();
} else {
$('.stdSection').show();
}
$('#userT').val(userType);
$('#batch_id').val(batchId);
$('#chkParent').click(function() {
var isChecked = $(this).prop("checked");
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').prop('checked', isChecked);
});
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').click(function() {
var isChecked = $(this).prop("checked");
var isHeaderChecked = $("#chkParent").prop("checked");
if (isChecked == false && isHeaderChecked)
$("#chkParent").prop('checked', isChecked);
else {
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').each(function() {
if ($(this).prop("checked") == false)
isChecked = false;
});
console.log(isChecked);
$("#chkParent").prop('checked', isChecked);
}
});
});
$(document).ready(function() {
$("#searchFilters").validate({
rules: {
f_batch: 'required',
// f_course: 'required'
},
submitHandler: function(form, e) {
e.preventDefault();
form.submit();
}
});
});
$('#f_course').change(function() {
var course = $('#f_course option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
// console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#f_section').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
$('#f_user_type').change(function() {
var userType = $('#f_user_type option:selected').val();
// alert(course);
if (userType === 'teacher') {
$('.stdSection').hide();
} else {
$('.stdSection').show();
}
$('#userT').val(userType);
});
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[50, -1],
[50, "All"]
],
});
//table js end
//multiple select js start
$('#f_section').selectpicker();
$('#f_feetype').selectpicker();
//multiple select js end
});
</script>
</body>
</html>

View File

@ -0,0 +1,437 @@
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<?php
$currency_symbol = $school_info['currency_symbol'];
?>
<div class="from-group adding-class form-group_lng " style="width: 95%;">
<a href="<?= base_url() ?>admin/expense-types"><button type="button" class="btn btn-outline-primary btn-sm mr-2">Expenses Type</button></a>
<a href="<?= base_url() ?>admin/addExpeses/0"><button type="button" class="btn btn-outline-primary btn-sm">Add Expenses</button></a>
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form method="post" action="<?php echo base_url(); ?>admin/listExpeses">
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="subject_lhead">Expenses List</div>
<!-- tab added -->
<div class="top-filter mb-0 mt-4" style="display: block;">
<div class="row">
<div class="col-md-3 pr-0">
<div class="form-group mb-0 pr-1">
<label class="has-float-label">
<select id="course" class="form-control custom-select" placeholder="Select Expense Type" name="filter-expense-type">
<option value=" "> Select Expense Type</option>
<?php if (isset($expenses_types) || !empty($expenses_types)) {
foreach ($expenses_types as $row) { ?>
<option value="<?php echo $row['expenseId'] ?>" <?php echo set_select('filter-expense-type', $row['expenseId'], (!empty($s_expense_type) ? TRUE : FALSE)); ?>>
<?php echo $row['expenseTitle']; ?></option>
<?php }
} ?>
</select>
<span>Expense Type</span>
</label>
</div>
</div>
<div class="col-md-3 pr-0 pl-2">
<div class="form-group mb-0">
<div class="date-fil-row">
<!-- <label>Start date</label> -->
<label class="has-float-label">
<input type="text" id="start_date" name="filter-Sdate" class=" form-control nepal-date" placeholder='dd-mm-yyyy' value="<?php echo (!empty($sdate)) ? $sdate : ''; ?>" <?php echo set_select('filter-Sdate', (!empty($sdate)) ? $sdate : '', (!empty($sdate) ? TRUE : FALSE)); ?>>
<span>Start Date</span>
</label>
</div>
<div class="text-danger cierr"><?php echo form_error('filter-Sdate'); ?></div>
</div>
</div>
<div class="col-md-3 pr-0 pl-0">
<div class="form-group mb-0">
<div class="date-fil-row">
<!-- <label>End date</label> -->
<label class="has-float-label">
<input type="text" id="end_date" name="filter-Edate" class="form-control nepal-date" placeholder='dd-mm-yyyy' value="<?php echo (!empty($edate)) ? $edate : ''; ?>" <?php echo set_select('filter-Edate', (!empty($edate)) ? $edate : '', (!empty($edate) ? TRUE : FALSE)); ?>>
<span>End Date</span>
</label>
</div>
<div class="text-danger cierr"><?php echo form_error('filter-Edate'); ?></div>
</div>
</div>
<div class="col-md-3 pr-0 pl-0">
<div class="row d-flex justify-content-center pl-2">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-outline-success w-100 col-md-6" value="Filter">
<a class="col-md-6 pl-0 pr-0 row d-flex justify-content-center" href="<?php echo base_url() ?>admin/listExpeses">
<button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn p-0 subject_addbtn_nobg ml-4"><i class="fas fa-redo"></i>Reset</button>
</a>
</div>
</div>
</div>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<hr>
<div class="applicnts-list-wrap ">
<div class="">
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Title</th>
<th>Type</th>
<th>Paid Date</th>
<th class="noExport">View File </th>
<th>Description </th>
<th>Quantity</th>
<th>Amount</th>
<th>Total Amount</th>
<th class="noExport">Action </th>
</tr>
</thead>
<tbody>
<?php if ($expenses_data) {
foreach ($expenses_data as $key => $value) { ?>
<tr>
<td><?php echo $key + 1; ?></td>
<td><?php echo $value['title']; ?></td>
<td>
<?php
foreach ($expenses_types as $e_type) {
if ($value['expense_type'] == $e_type['expenseId']) {
if ($value['expense_s_type'] != '') {
echo $e_type['expenseTitle'] . ' <label class="text-small text-muted">(' . ucwords($value['expense_s_type']) . ')</label>';
} else {
echo $e_type['expenseTitle'];
}
}
}
?>
</td>
<td><?php echo $value['paid_date']; ?> </td>
<td><?php if (!empty($value['file_path'])) { ?>
<div class="sub_viewbtn" title="edit" onclick="view_image('<?php echo base_url($value['file_path']); ?>')">
<i class="fa fa-image"></i>
</div>
<?php } else {
echo '-';
} ?>
</td>
<td><?php echo substr($value['description'], 0, 20) . '-'; ?></td>
<td><?php echo $value['quantity']; ?></td>
<td><?php echo $value['amount']; ?></td>
<td><?php echo $value['total_amount']; ?></td>
<td>
<div class="sub_tabbtnsec stud_tabbtnsec">
<div class="sub_viewbtn" data-toggle="tooltip" title="edit">
<a href="<?= base_url() ?>admin/addExpeses/<?php echo $value['id'] ?>">
<i class="fas fa-pencil-alt"></i>
</a>
</div>
<div class="sub_delbtn" data-toggle="tooltip" title="Remove">
<a data-toggle="modal" onclick="examdel(<?php echo $value['id']; ?>)" href="#deleteModal">
<i class="fas fa-trash-alt"></i>
</a>
</div>
</div>
</td>
</tr>
<?php }
} ?>
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th> </th>
<th></th>
<th></th>
<th style="font-size:13px;" class="text-center"> In <?= $currency_symbol; ?></th>
<th style="font-size:13px" class="text-center"></th>
<th style="font-size:13px;" class="text-center"></th>
<th style="font-size:13px;" class="text-center"></th>
<th></th>
<!-- <th></th> -->
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type="hidden" id="thid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this Expenses?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#thid').val());">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal " id="imageModal" role="dialog" style="padding-top: 100px !important;">
<!-- Modal Content (The Image) -->
<img class="modal-content_img" id="get_image">
</div>
</main>
<!--End right-top side-->
<style type="text/css">
/* The Modal (background) */
.imageModal {
display: none;
/* Hidden by default */
position: fixed;
/* Stay in place */
z-index: 4;
/* Sit on top */
padding-top: 100px !important;
left: 0;
top: 0;
width: 100%;
/* Full width */
height: 100%;
/* Full height */
overflow: auto;
/* Enable scroll if needed */
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.9);
/* Black w/ opacity */
}
/* Modal Content (Image) */
.modal-content_img {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
}
/* Caption of Modal Image (Image Text) - Same Width as the Image */
/* Add Animation - Zoom in the Modal */
.modal-content_img {
animation-name: zoom;
animation-duration: 0.6s;
}
@keyframes zoom {
from {
transform: scale(0)
}
to {
transform: scale(1)
}
}
/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
.modal-content_img {
width: 100%;
}
}
</style>
</div>
<?php
$theExportHeader = 'Expense List';
?>
<script>
function examdel(icn) {
$('#thid').val(icn);
}
$(document).ready(function() {
var currency_symbol = "<?php echo $currency_symbol; ?>";
var jsTheExportHeader = '<?php echo $theExportHeader; ?>';
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[-1],
["All"]
],
"bLengthChange": false,
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
title: 'Student List',
orientation: 'landscape',
exportOptions: {
columns: [1, 2, 3, 4, 5, 6, 7, 8]
}
},
{
extend: 'excelHtml5',
header: true,
footer: true,
title: jsTheExportHeader,
exportOptions: {
columns: "thead th:not(.noExport)",
rows: function(indx, rowData, domElement) {
return $(domElement).css("display") != "none";
}
},
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="C"]', sheet).attr('s', '2');
}
}
],
"footerCallback": function(row, data, start, end, display) {
for (let td_count = 7; td_count <= 8; td_count++) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(td_count)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(td_count, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
$(api.column(td_count).footer()).html(
//currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
pageTotal
);
}
}
});
//table js end
/* Select your element */
let NDate = NepaliFunctions.GetCurrentBsDate();
let todayDate = `${NDate.year}-${NDate.month}-${NDate.day}`;
/* Initialize Datepicker with options */
$('#start_date').nepaliDatePicker({
disableAfter: todayDate,
language: 'english',
});
$('#end_date').nepaliDatePicker({
disableAfter: todayDate,
language: 'english',
});
// nepali date end
});
</script>
<script type="text/javascript">
function deletedata(id) {
let url = window.location.pathname.split('/');
let postUrl = url[1] + '/' + url[2];
// console.log('admin/delete-section/'+postUrl + id);
window.location.replace('<?php echo base_url() ?>' + 'admin/delete_expenses/' + id);
}
function view_image(documentPath) {
var src1 = documentPath;
$("#get_image").attr("src", src1);
$("#imageModal").modal('show');
}
</script>

View File

@ -0,0 +1,136 @@
<div class="login-wrap">
<div class="login-box-cover-outter">
<div class="login-box-cover">
<div class="login-heading">
<!-- <h3>Welcome To</h3>-->
<h2><?= $school_info['school_name']; ?><br> Admin Portal</h2>
<?php
$uname = '';
$pass = '';
$rme = 'Off';
if (isset($_COOKIE["username"]))
$uname = $_COOKIE["username"];
if (isset($_COOKIE["password"]))
$pass = $_COOKIE["password"];
if (isset($_COOKIE["rem_me"]))
$rme = $_COOKIE["rem_me"];
?>
</div>
<div class="login-box">
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<h3>Login</h3>
<form id="loginform" method="post">
<div class="login-row">
<label class="login-lbl">
Email Address*
</label>
<input type="Email" name="email" id="email" value='<?php echo $uname; ?>' placeholder="Enter email address">
<p id="email_error" style="color:red;"></p>
</div>
<div class="login-row">
<label class="login-lbl">
Password*
</label>
<input type="password" name="password" id="password" value='<?php echo $pass; ?>' placeholder="Enter password" class="password_hide">
<span class="passwrd-icon icon-y"><i class="far fa-eye"></i></span>
<p id="password_error" style="color:red;"></p>
<p id="invalid_error" style="color:red;"></p>
</div>
<div class="login-row">
<div class="rem-paswd">
<input type="checkbox" name="remember_me" <?php if ($rme == 'On') { ?>checked<?php } ?>>
<label class="remember">Remember me</label>
</div>
<div class="forget-password">
<a href="<?php echo base_url(); ?>admin/forgot-password">Forgot Password?</a>
</div>
</div>
<div class="login-row">
<button type="submit" class="common-btn" onclick="validate_login_form()">Login</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function hide_all_login_errors() {
$('#email_error').hide();
$('#password_error').hide();
}
function celanup_login_form() {
$('#email').val('');
$('#passsword').val('');
$('#invalid_error').html('');
}
function validate_login_form() {
hide_all_login_errors();
var errArr = new Array();
var lemail = $('#email').val().trim();
var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (lemail == '') {
errArr.push('email_Sep@Str_Please enter your email address.');
} else if (!regex.test(lemail)) {
errArr.push('email_Sep@Str_Please enter a valid email address.');
}
var lpwd = $('#password').val().trim();
if (lpwd == '') {
errArr.push('password_Sep@Str_Please enter your password.');
}
if (errArr.length > 0) {
for (i = 0; i < errArr.length; i++) {
var resArr = errArr[i].split("_Sep@Str_");
$("#" + resArr[0] + "_error").html(resArr[1]);;
$("#" + resArr[0] + "_error").show();
}
var xxxVal = errArr[0].split('_Sep@Str_');
$('#' + xxxVal[0]).focus();
return false;
} else {
$('#loginform').submit();
}
}
$('#loginform').submit(function(e) {
e.preventDefault();
var formData = new FormData($("#loginform")[0]);
$.ajax({
url: '<?php echo base_url(); ?>Admin/admin_login',
dataType: 'json',
type: 'POST',
data: formData,
contentType: false,
processData: false,
success: function(response) {
if (response == '1') {
window.location.href = "<?php echo base_url(); ?>admin/dashboard";
} else if (response == '0') {
$('#invalid_error').html("Invalid email or password.");
}
}
});
});
</script>

View File

@ -0,0 +1,393 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.course_grade_details_table input[type="text"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
}
.course_grade_details_table input[type="number"] {
font-size: 14px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 83px;
}
.course_grade_details_table td,
.course_grade_details_table th {
border: 0;
padding: 15px 10px;
}
.course_grade_details_table {
border: 0;
}
.course_grade_details_table td {
text-align: left;
padding: 8px 10px;
}
.course_grade_details_table th {
font-weight: 600;
font-size: 15px;
color: #888787;
border-bottom: 1px solid #ddd;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$theExportHeader = 'The Fee Revert Reports';
if (isset($school_info) && !empty($school_info)) {
$theExportHeader = $school_info['school_name'] . '\n' . $school_info['address'] . '\n Invoice Reports';
}
?>
</div>
<div class="subject_lhead">Manage Course Grades</div>
<?php
$course_id = '';
$grade_type = '';
if (count($_POST) > 0) {
$course_id = $_POST['course_id'];
$grade_type = $_POST['grade_type'];
}
//echo '<pre>'; print_r($theResult);
?>
<form action="<?= base_url(); ?>admin/manage-course-grades" method="POST" id='searchManageCourseGradesForm'>
<input type="hidden" name="clicked_id" id="clicked_id" value=''>
<input type="hidden" name="clicked_button" id="clicked_button" value='View'>
<div class="row">
<div class="col-md-3">
<div class="form-group assign_fee_toall">
<!--<label>Select Course</label>-->
<select name="course_id" id="course_id" onchange='show_hide_table("onchange")' class="form-control custom-select">
<option value="">Select Course</option>
<?php
if (isset($course) && !empty($course)) {
foreach ($course as $key => $cr) {
?>
<option value="<?php echo $cr['id']; ?>" <?php if ($cr['id'] == $course_id) { ?> selected <?php } ?>>
<?php echo $cr['course_name']; ?>
</option>
<?php
}
}
?>
</select>
<div id='err_course_id' class="text-danger cierr"></div>
</div>
</div>
<div class="col-md-3">
<div class="form-group assign_fee_toall">
<!--<label>Select Course</label>-->
<select name="grade_type" id="grade_type" onchange='show_hide_table("onchange")' class="form-control custom-select">
<option value="">Select Grade Type</option>
<option value="Grade" <?php if ($grade_type == 'Grade') { ?> selected <?php } ?>>Grade</option>
<option value="Percentage" <?php if ($grade_type == 'Percentage') { ?> selected <?php } ?>>Percentage</option>
</select>
<div id='err_grade_type' class="text-danger cierr"></div>
</div>
</div>
<div class="col-md-3">
<input type="button" name="filtersubmit" id="filter_reset1" class="btn btn-success" value="View" onclick="validate_view_here()">
<a href="<?php echo base_url() ?>admin/manage-course-grades">
<button type="button" class="subject_addbtn subject_addbtn_nobg">
<i class="fas fa-redo"></i>Reset
</button>
</a>
</div>
<div class="col-md-3">
<div class="filter-reset"></div>
</div>
</div>
<?php if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php }
unset($_SESSION['success']); ?>
<div id='theCourseGradeDetailsTable' class="row" style='display: none;'>
<div class="col-md-12">
<div id='the_error' class="text-danger cierr" style='font-size: 15px; padding-bottom: 5px;'></div>
<table style='width:100%' border='1' class="course_grade_details_table">
<tr>
<th width='10%'>Start % <span style="color:red;"> * </span></th>
<th width='10%'>Upto % <span style="color:red;"> * </span></th>
<?php if ($grade_type == 'Grade') { ?>
<th width='6%'>Grade <span style="color:red;"> * </span></th>
<th width='6%'>GP From <span style="color:red;"> * </span></th>
<th width='6%'>GP To <span style="color:red;"> * </span></th>
<th width='6%'>GPA <span style="color:red;"> * </span></th>
<?php } else if ($grade_type == 'Percentage') { ?>
<th width='20%'>Division <span style="color:red;"> * </span></th>
<?php } ?>
<th width='15%'>Remarks <span style="color:red;"> * </span></th>
<th width='20%'>School Remarks <span style="color:red;"> * </span></th>
<th width='8%'>Is Fail</th>
<th></th>
</tr>
<tr>
<td>
<input type="number" min='0' max='100' size='5px' name="sp_0" id='sp_0'>
</td>
<td>
<input type="number" min='0' max='100' size='5px' name="up_0" id='up_0'>
</td>
<?php if ($grade_type == 'Grade') { ?>
<td>
<input type="text" size='5px' name="grade_0" id='grade_0'>
</td>
<td>
<input type="text" size='5px' name="gpfrom_0" id='gpfrom_0'>
</td>
<td>
<input type="text" size='5px' name="gpto_0" id='gpto_0'>
</td>
<td>
<input type="text" size='5px' name="gpa_0" id='gpa_0'>
</td>
<?php } else if ($grade_type == 'Percentage') { ?>
<td>
<input type="text" size='15px' name="div_0" id='div_0'>
</td>
<?php } ?>
<td>
<input type="text" size='15px' name="rem_0" id='rem_0'>
</td>
<td>
<input type="text" size='15px' name="srem_0" id='srem_0'>
</td>
<td>
<input type="checkbox" size='15px' name="fail_0" id='fail_0'>
</td>
<td>
<input type="button" class="btn btn-success" style="font-size: 14px;padding: 6px 17px;" value="Save" onclick="validate_the_form_here('Save',0)">
</td>
</tr>
<?php
if (isset($theResult) && !empty($theResult)) {
foreach ($theResult as $k => $res) {
$id = $res['id'];
$isFailCkd = '';
if ($res['is_fail'] == 'Yes')
$isFailCkd = 'checked';
?>
<tr>
<td>
<input type="text" size='5px' name="sp_<?php echo $id; ?>" id='sp_<?php echo $id; ?>' value="<?php echo $res['start_perc']; ?>">
</td>
<td>
<input type="text" size='5px' name="up_<?php echo $id; ?>" id='up_<?php echo $id; ?>' value="<?php echo $res['upto_perc']; ?>">
</td>
<?php if ($grade_type == 'Grade') { ?>
<td>
<input type="text" size='5px' name="grade_<?php echo $id; ?>" id='grade_<?php echo $id; ?>' value="<?php echo $res['grade']; ?>">
</td>
<td>
<input type="text" size='5px' name="gpfrom_<?php echo $id; ?>" id='gpfrom_<?php echo $id; ?>' value="<?php echo $res['gp_from']; ?>">
</td>
<td>
<input type="text" size='5px' name="gpto_<?php echo $id; ?>" id='gpto_<?php echo $id; ?>' value="<?php echo $res['gp_to']; ?>">
</td>
<td>
<input type="text" size='5px' name="gpa_<?php echo $id; ?>" id='gpa_<?php echo $id; ?>' value="<?php echo $res['gpa']; ?>">
</td>
<?php } else if ($grade_type == 'Percentage') { ?>
<td>
<input type="text" size='15px' name="div_<?php echo $id; ?>" id='div_<?php echo $id; ?>' value="<?php echo $res['division']; ?>">
</td>
<?php } ?>
<td>
<input type="text" size='15px' name="rem_<?php echo $id; ?>" id='rem_<?php echo $id; ?>' value="<?php echo $res['remarks']; ?>">
</td>
<td>
<input type="text" size='15px' name="srem_<?php echo $id; ?>" id='srem_<?php echo $id; ?>' value="<?php echo $res['school_remarks']; ?>">
</td>
<td>
<input type="checkbox" size='15px' name="fail_<?php echo $id; ?>" id='fail_<?php echo $id; ?>' <?php echo $isFailCkd; ?>>
</td>
<td>
<button type='button' style="font-size: 14px;padding: 6px 8px; " class="subject_addbtn download_idcards" onclick="validate_the_form_here('Update',<?php echo $id; ?>)">
Update
</button>
&nbsp; &nbsp;
<button type='button' style="font-size: 14px;padding: 6px 10px; background:#ff3636; " class="subject_addbtn download_idcards" onclick="validate_the_form_here('Delete',<?php echo $id; ?>)">
Delete
</button>
</td>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</form>
<!-- tab added -->
<!-- new divs added -->
<!--<div class="tab-content">
<div class="applicnts-list-wrap ">
<div class=" ">
</div>
</div>
</div>-->
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script type="text/javascript">
$(document).ready(function() {
show_hide_table('onload');
});
function show_hide_table(flagVal) {
$('#theCourseGradeDetailsTable').hide();
if (flagVal == 'onload' && $('#course_id').val() != '' && $('#grade_type').val() != '')
$('#theCourseGradeDetailsTable').show();
}
function validate_view_here() {
$errCnt = 0;
$("#err_course_id").hide();
$("#err_grade_type").hide();
if ($('#course_id').val() == '') {
$('#err_course_id').html('Please select the course.');
$('#err_course_id').show();
$errCnt++;
}
if ($('#grade_type').val() == '') {
$('#err_grade_type').html('Please select the grade type.');
$('#err_grade_type').show();
$errCnt++;
}
$('#clicked_button').val('View');
if ($errCnt == 0)
$('#searchManageCourseGradesForm').submit();
return false;
}
function validate_the_form_here(theStr, theId) {
$('#clicked_id').val(theId);
$('#clicked_button').val(theStr);
$("#the_error").hide();
var start = $('#sp_' + theId).val();
start = parseFloat(start).toFixed(2);
$('#sp_' + theId).val(start);
var upto = $('#up_' + theId).val();
upto = parseFloat(upto).toFixed(2);
$('#up_' + theId).val(upto);
var remarks = $('#rem_' + theId).val();
var sremarks = $('#srem_' + theId).val();
var grade = $('#grade_' + theId).val();
var gpa = $('#gpa_' + theId).val();
var division = $('#div_' + theId).val();
var errorArr = [];
if ($('#grade_type').val() == 'Grade') {
if (start == '' || upto == '' || remarks == '' || grade == '' || gpa == '')
errorArr.push("Required fields cannot be left blank. Please provide valid data for all the required fields.");
} else {
if (start == '' || upto == '' || remarks == '' || division == '')
errorArr.push("Required fields cannot be left blank. Please provide valid data for all the required fields.");
}
/*if(start!='')
{
var intRegEx = /^[0-9]+$/;
if(!intRegEx.test(start))
errorArr.push('Only numbers are allowed for Start %.');
}
if(upto!='')
{
var intRegEx = /^[0-9]+$/;
if(!intRegEx.test(upto))
errorArr.push('Only numbers are allowed for Upto %.');
}*/
if (errorArr.length > 0) {
var errStr = '';
$.each(errorArr, function(n, currentElem) {
errStr += '<br/>' + (n + 1) + '. ' + currentElem;
});
$('#the_error').html(errStr);
$("#the_error").show();
} else
$('#searchManageCourseGradesForm').submit();
}
</script>
</body>
</html>

View File

@ -0,0 +1,344 @@
<style type="text/css">
.amount-input {
border: 1px solid #c6c6c6c6 !important;
}
.installments-links {
padding: 10px 20px;
}
.installments-links a {
border: 1px solid black;
padding: 5px 15px;
color: black;
}
.installments-links.active a,
.installments-links:hover a {
background-color: #032da1;
color: #fff;
}
</style>
<div class="wraper responsive-width w-90">
<a href="<?=base_url()?>admin/fee-course"><button type="button" class="subject_addbtn bg-dark">Back</button></a>
<div class="subject_lhead">Fee Installments</div>
<hr>
<?php
if (!empty($this->session->flashdata('success'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?>
</div>
<?php
}
if (!empty($this->session->flashdata('error'))) {
?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Failed!</strong> <?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<div class="course_feedetails mt-4">
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Batch : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?=$course_fee['b_name']?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Course : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?=$course_fee['course_name']?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Fee Type : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?=$course_fee['feetype_name']?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Fee Amount : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3">N-<?=$course_fee['amount']?></span>
</div>
</div>
</div>
<hr>
<div class="subject_lhead mt-4">Assign Installments</div>
<form action="<?=base_url()?>admin/add_new_installments_revised" method="post" id="new_installment_form">
<div class="students-list mb-5">
<input type="hidden" name="course_fee_id" value="<?=$cf_id?>">
<table style="max-width: 50%;margin:0;display: none;"
class="table installment_container fee-installment-table dataTable table-responsive">
<thead>
<tr>
<th><span style="width:115px;display:block;">Payment method</span></th>
<th><span style="width:115px;display:block">Amount</span></th>
<th><span style="width:115px;display:block">Due dates</span></th>
</tr>
</thead>
<tbody id="installment_section">
</tbody>
</table>
<table id="unassignedList" class="tbl table student_list display table-responsive">
<thead>
<tr>
<th><input type="checkbox" id="main_check" name="checkall"></th>
<th>Student Id</th>
<th>Student Name</th>
<th>Email</th>
<th>Section</th>
<th>Mobile</th>
</tr>
</thead>
<tbody>
<?php
// dd($unassigned_students);
foreach ($unassigned_students as $key => $value) {
$tr_class = $value['assigned'] == 'YES' ? 'selected' : '';
$checkbox_value = $value['assigned'] == 'YES' ? 'checked' : '';
$checkbox_input_value= $value['assigned'] == 'YES' ? 1 : 0;
?>
<tr class="<?=$tr_class?>">
<td><input type="checkbox" <?=$checkbox_value?> id="stud_<?=$value['id'] ?>" onClick="checkAllCheckBox(this,<?=$value['id'] ?>)"
class="child_checks" name="students[]" value="<?=$value['id']?>">
<input type="hidden" class='studentcheckinput' id="checkbox_input_<?=$value['id'] ?>" name="students_input[<?=$value['id'] ?>]" value="<?=$checkbox_input_value;?>" >
</td>
<td><?=$value['studentId']?></td>
<td><?=$value['name']?></td>
<td><?=$value['email']?></td>
<td><?=$value['section_name']?></td>
<td><?=$value['mobile']?></td>
</tr>
<?php }?>
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</table>
</div>
<label id="students[]-error" style="color:red" class="error" for="students[]"></label>
<input type="hidden" name="table_rows" id="table_rows">
<?php if (!empty($unassigned_students)) {?>
<div class="submit-btn-container mb-5" style="max-width : 60%;">
<input type="submit" name="" value="Assign Students" class="btn btn-primary btn-md">
</div>
<?php }?>
</form>
</div>
<script>
$("#new_installment_form").validate({
ignore: ':hidden:not(.child_checks)',
submitHandler: function(form, e) {
e.preventDefault();
let amountErr = true;
if (amountErr) {
var table = $('#unassignedList').DataTable();
var tableData = table.rows('.selected').data().toArray();
let filtered = tableData.map((ele, i) => {
return ele[1];
})
console.log(filtered);
tableData = JSON.stringify(filtered)
$('#table_rows').val(tableData);
form.submit();
}
}
});
</script>
<script>
const get_installments = function(ele) {
$('.installment_container').hide();
$('.submit-btn-container').hide();
if (ele.value != '' && ele.value) {
let installment_val = [ele.value];
let course_fee_id = <?=$cf_id?>;
let due_date = '<?=date('Y-m-d', strtotime($course_fee['due_date']))?>';
let url_link = "<?php echo base_url(); ?>admin/get_duedates";
$.ajax({
type: 'POST',
url: url_link,
data: {
course_fee: course_fee_id,
inst: installment_val,
start: due_date
},
success: function(data) {
// console.log(data);
data = JSON.parse(data);
$('.installment_container').show();
$('#installment_section').html(data.html);
$('.submit-btn-container').show();
requiredFunc();
},
});
}
}
const requiredFunc = function() {
let NnDate = NepaliFunctions.GetCurrentBsDate();
let todayDateN = `${NnDate.year}-${NnDate.month}-${NnDate.day}`;
$('.np-datepicker').nepaliDatePicker({
language: 'english',
disableBefore: todayDateN
});
$(".amount-input").keypress(function(e) {
var keyCode = e.keyCode || e.which;
//Regex for Valid Characters i.e. Alphabets and Numbers.
var regex = /^[0-9]+$/;
//Validate TextBox value against the Regex.
var isValid = regex.test(String.fromCharCode(keyCode));
return isValid;
});
}
const checkAllCheckBox = (ele,student_id) => {
// $('#main_check').prop('checked', false);
var ischecked=$('#'+ele.id).prop('checked');
if(ischecked == true)
$('#checkbox_input_'+student_id).val(1);
else
$('#checkbox_input_'+student_id).val(0);
}
</script>
<script type="text/javascript">
$(document).ready(function() {
oTableStaticFlow = $('#unassignedList').DataTable({
"aoColumnDefs": [{
'bSortable': false,
'aTargets': [0]
}],
'aLengthMenu': [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "All"]
],
'iDisplayLength': -1,
});
// $('#unassignedList tbody').on('click', 'tr', function() {
// if ($(this).find('.child_checks').is(':checked')) {
// $(this).addClass('selected');
// } else {
// $(this).removeClass('selected');
// }
// });
// $("#main_check").click(function() {
// var cells = oTableStaticFlow.column(0).nodes(), // Cells from 1st column
// state = this.checked;
// for (var i = 0; i < cells.length; i += 1) {
// cells[i].querySelector("input[type='checkbox']").checked = state;
// $(cells[i]).parent().removeClass('selected');
// if (state) {
// $(cells[i]).parent().addClass('selected');
// } else {
// $(cells[i]).parent().removeClass('selected');
// }
// }
// });
/*$('#main_check').click(function() {
var isChecked = $(this).prop("checked");
let student_id,isCheck;
// alert(isChecked);
$('#unassignedList tr:has(td)').find('.child_checks').prop('checked', isChecked);
$('#unassignedList tr:has(td)').find('.child_checks').each(function(){
isCheck=$(this).attr("checked", true);
student_id=$(this).val();
alert(isCheck);
if(isCheck==true)
$('#unassignedList tr:has(td)').find('#checkbox_input_'+student_id).val(1);
else
$('#unassignedList tr:has(td)').find('#checkbox_input_'+student_id).val(0);
});
});*/
$('#main_check').click(function() {
var isChecked = $(this).prop("checked");
if(isChecked==true)
{
$('.studentcheckinput').val(1);
$('.child_checks').each(function(){
$(this).prop('checked', true);
});
}
else
{
$('.studentcheckinput').val(0);
$('.child_checks').each(function(){
$(this).prop('checked', false);
});
}
});
$('#unassignedList tr:has(td)').find('.child_checks').click(function() {
var isChecked = $(this).prop("checked");
// alert(isChecked);
var isHeaderChecked = $("#main_check").prop("checked");
if (isChecked == false && isHeaderChecked)
$("#main_check").prop('checked', isChecked);
else {
$('#tbl tr:has(td)').find('.child_checks').each(function() {
if ($(this).prop("checked") == false)
isChecked = false;
});
// console.log(isChecked);
$("#main_check").prop('checked', isChecked);
}
});
})
</script>

View File

@ -0,0 +1,316 @@
<style type="text/css">
.amount-input {
border: 1px solid #c6c6c6c6 !important;
}
.installments-links {
padding: 10px 20px;
}
.installments-links a {
border: 1px solid black;
padding: 5px 15px;
color : black;
}
.installments-links.active a, .installments-links:hover a {
background-color: #032da1;
color: #fff;
}
</style>
<div class="wraper responsive-width w-90">
<a href="<?= base_url() ?>admin/fee-course"><button type="button" class="subject_addbtn bg-dark">Back</button></a>
<div class="subject_lhead">Fee Installments</div>
<hr>
<div class="course_feedetails mt-4">
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Batch : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?= $course_fee['b_name'] ?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Course : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?= $course_fee['course_name'] ?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Fee Type : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3"><?= $course_fee['feetype_name'] ?></span>
</div>
</div>
<div class="row mt-2">
<div class="col-md-2 col-12">
<span style="font-weight : 600">Fee Amount : </span>
</div>
<div class="col-md-6 col-12">
<span class="ml-3">N-<?= $course_fee['amount'] ?></span>
</div>
</div>
</div>
<hr>
<div class="page_links_installments">
<div class="d-flex justify-content-center">
<div class="assign-installment installments-links ">
<a href="<?= base_url() ?>admin/manage-installments/<?= $cf_id ?>">Assign Installments</a>
</div>
<div class="update-installment installments-links active">
<a href="<?= base_url() ?>admin/update-installments/<?= $cf_id ?>">Update Installments</a>
</div>
</div>
</div>
<div class="subject_lhead mt-4">Update Installments</div>
<form action="<?= base_url() ?>admin/update_new_installments_revised" method="post" id="new_installment_form">
<div class="students-list mb-5">
<?php if(count($unassigned_students) > 0) { ?>
<div class="installment-container mb-5" style="max-width : 40%">
<div class="form-group">
<label for="exampleFormControlSelect1">Choose type of Installment<span
style="color:red">*</span></label>
<select class="form-control" name="installment_type" onchange="get_installments(this)"
id="exampleFormControlSelect1">
<option value="">Select one installment</option>
<?php
foreach ($payment_types as $key => $value) { ?>
<option value="<?= $value['number_of_payment'] ?>"><?= $value['payment_type_name'] ?></option>
<?php } ?>
</select>
<input type="hidden" name="course_fee_id" value="<?= $cf_id ?>">
</div>
</div>
<?php } ?>
<table style="max-width: 50%;margin:0;display: none;"
class="table installment_container fee-installment-table dataTable table-responsive">
<thead>
<tr>
<th><span style="width:115px;display:block;">Payment method</span></th>
<th><span style="width:115px;display:block">Amount</span></th>
<th><span style="width:115px;display:block">Due dates</span></th>
</tr>
</thead>
<tbody id="installment_section">
</tbody>
</table>
<table id="unassignedList" class="tbl table student_list display table-responsive">
<thead>
<tr>
<th><input type="checkbox" id="main_check" name="checkall"></th>
<th>Student Id</th>
<th>Student Name</th>
<th>Email</th>
<th>Section</th>
<th>Mobile</th>
</tr>
</thead>
<tbody>
<?php foreach ($unassigned_students as $key => $value) { ?>
<tr>
<td><input type="checkbox" onClick="checkAllCheckBox()" class="child_checks" name="students[]"
value="<?= $value['id'] ?>">
</td>
<td><?= $value['studentId'] ?></td>
<td><?= $value['name'] ?></td>
<td><?= $value['email'] ?></td>
<td><?= $value['section_name'] ?></td>
<td><?= $value['mobile'] ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</table>
</div>
<label id="students[]-error" style="color:red" class="error" for="students[]"></label>
<input type="hidden" name="table_rows" id="table_rows">
<label id="totalamount-error" style="color:red;display: none;"></label>
<div class="submit-btn-container mb-5" style="max-width : 60%;display:none;">
<input type="submit" name="" value="Submit" class="btn btn-primary btn-md">
</div>
</form>
</div>
<script>
$("#new_installment_form").validate({
ignore: ':hidden:not(.child_checks)',
rules: {
'installment_type[]': 'required',
'paymentoption[]': 'required',
'amount[one]': 'required',
<?php for($i = 0; $i <= 12; $i++){ ?> 'amount[two][<?= $i ?>]': 'required',
'amount[four][<?= $i ?>]': 'required',
'amount[six][<?= $i ?>]': 'required',
<?php } ?> 'students[]': 'required'
},
messages: {
'students[]': 'Please select atleast one student from above table'
},
submitHandler: function(form, e) {
e.preventDefault();
let amountErr;
let TotalSum = Number(<?= $course_fee['amount'] ?>);
let Allrows = $('#installment_section tr');
$('.installment-err').remove();
$('#totalamount-error').hide();
$.each(Allrows, function(index, ele) {
let tdTotal = 0;
let amountInput = $(this).find('.amount-input');
$.each(amountInput, function(index, ele) {
tdTotal += Number($(this).val());
});
$('.installment-err').hide();
if (tdTotal != TotalSum) {
$(this).before(
'<tr class="installment-err"><td colspan="3"><label class="error" style="color:red">Entered amount does not match with total fees amount: ' +
<?= $course_fee['amount'] ?> + '</label></td></tr>')
amountErr = false;
$('#totalamount-error').text(
'Entered amount in installments does not match with total fees amount : ' +
<?= $course_fee['amount'] ?>);
$('#totalamount-error').show();
return false;
} else {
amountErr = true;
}
if (amountErr) {
var table = $('#unassignedList').DataTable();
var tableData = table.rows('.selected').data().toArray();
let filtered = tableData.map((ele, i) => {
return ele[1];
})
console.log(filtered);
tableData = JSON.stringify(filtered)
$('#table_rows').val(tableData);
form.submit();
}
});
}
});
</script>
<script>
const get_installments = function(ele) {
$('.installment_container').hide();
$('.submit-btn-container').hide();
if (ele.value != '' && ele.value) {
let installment_val = [ele.value];
let course_fee_id = <?= $cf_id ?>;
let due_date = '<?= date('Y-m-d', strtotime($course_fee['due_date'])) ?>';
let url_link = "<?php echo base_url(); ?>admin/get_duedates";
$.ajax({
type: 'POST',
url: url_link,
data: {
course_fee: course_fee_id,
inst: installment_val,
start: due_date
},
success: function(data) {
// console.log(data);
data = JSON.parse(data);
$('.installment_container').show();
$('#installment_section').html(data.html);
$('.submit-btn-container').show();
requiredFunc();
},
});
}
}
const requiredFunc = function() {
let NnDate = NepaliFunctions.GetCurrentBsDate();
let todayDateN = `${NnDate.year}-${NnDate.month}-${NnDate.day}`;
$('.np-datepicker').nepaliDatePicker({
language: 'english',
disableBefore: todayDateN
});
$(".amount-input").keypress(function(e) {
var keyCode = e.keyCode || e.which;
//Regex for Valid Characters i.e. Alphabets and Numbers.
var regex = /^[0-9]+$/;
//Validate TextBox value against the Regex.
var isValid = regex.test(String.fromCharCode(keyCode));
return isValid;
});
}
const checkAllCheckBox = () => {
$('#main_check').prop('checked', false);
}
</script>
<script type="text/javascript">
$(document).ready(function() {
oTableStaticFlow = $('#unassignedList').DataTable({
"aoColumnDefs": [{
'bSortable': false,
'aTargets': [0]
}],
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#unassignedList tbody').on('click', 'tr', function() {
if ($(this).find('.child_checks').is(':checked')) {
$(this).addClass('selected');
} else {
$(this).removeClass('selected');
}
});
$("#main_check").click(function() {
var cells = oTableStaticFlow.column(0).nodes(), // Cells from 1st column
state = this.checked;
for (var i = 0; i < cells.length; i += 1) {
cells[i].querySelector("input[type='checkbox']").checked = state;
$(cells[i]).parent().removeClass('selected');
if(state) {
$(cells[i]).parent().addClass('selected');
} else {
$(cells[i]).parent().removeClass('selected');
}
}
});
})
</script>

View File

@ -0,0 +1,698 @@
<style>
.upload-doc-btn-wrap {
position: relative;
}
table.dataTable tfoot th {
font-weight: 600 !important;
}
.form-group .bootstrap-select>.dropdown-toggle {
padding: 9px 9px !important;
font-size: 12px !important;
border: 1px solid #c8c8c8 !important;
background: #fff !important;
}
.course_grade_details_table input[type="text"] {
font-size: 13px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
}
.course_grade_details_table input[type="number"] {
font-size: 13px;
border: 1px solid #858585;
border-radius: 4px;
color: #6b6b6b;
padding: 5px;
width: 90px;
}
.course_grade_details_table td,
.course_grade_details_table th {
border: 0;
padding: 15px 10px;
font-size: 12px !important;
}
.course_grade_details_table {
border: 1px solid #eee;
}
.course_grade_details_table td {
text-align: left;
padding: 8px 10px;
}
.course_grade_details_table th {
font-weight: 300;
font-size: 12px;
color: black;
border-bottom: 2px solid #032da1;
}
.scrollable_table thead {
display: table;
width: 100%;
}
.scrollable_table tbody {
display: block;
overflow-y: scroll;
max-height: 400px;
}
.scrollable_table th,
.scrollable_table td {
width: 130px;
font-size: 12px;
}
.scrollable_table tr {
display: table;
width: 100%;
box-sizing: border-box;
}
.scrollable_table th:nth-child(1),
.scrollable_table td:nth-child(1) {
width: 42px;
}
span.margin-t {
margin-top: 5px;
display: block;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left"></div>
<div class="subject_lhead">Multiple Record Update</div>
<?php
$showTable = 'No';
// $totalSubjects
if (isset($theStudents) && !empty($theStudents))
$showTable = 'Yes';
$batch_id = $selected_batch;
$course_id = '';
$sectionIds = '';
if (count($_POST) > 0) {
$batch_id = $_POST['batch_id'];
$course_id = $_POST['course_id'];
// $sectionIds = $_POST['section_id'];
}
$search_section = (isset($_POST['section_id']) && !empty($_POST['section_id'])) ? $_POST['section_id'] : '';
//echo '<pre>'; print_r($theResult);
?>
<form action="<?= base_url(); ?>admin/multiple-edit" method="POST" id='recordsUpdateForm' enctype="multipart/form-data">
<input type="hidden" name="the_student_id" id="the_student_id" value=''>
<input type="hidden" name="clicked_button" id="clicked_button" value='View'>
<input type="hidden" name="the_delete_subject_id" id="the_delete_subject_id" value=''>
<div class="row">
<div class="col-md-3 pr-0">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Batch <span style="color:red;"> * </span></label>
<select name="batch_id" id="batch_id" onchange='show_hide_table("onchange")' class="form-control">
<option value="">Select Batch</option>
<?php
if (isset($batch) && !empty($batch)) {
foreach ($batch as $key => $b) {
?>
<option value="<?php echo $b['id']; ?>" <?php if ($b['id'] == $batch_id) { ?> selected <?php } ?>>
<?php echo $b['b_name']; ?>
</option>
<?php
}
}
?>
</select>
<div id='err_batch_id' class="text-danger cierr"></div>
</div>
</div>
</div>
<div class="col-md-3 pr-0">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Course <span style="color:red;"> * </span></label>
<select name="course_id" id="course_id" class="form-control">
<option value="">Select Course</option>
<?php
if (isset($course) && !empty($course)) {
foreach ($course as $key => $cr) {
?>
<option value="<?php echo $cr['id']; ?>" <?php if ($cr['id'] == $course_id) { ?> selected <?php } ?>>
<?php echo $cr['course_name']; ?>
</option>
<?php
}
}
?>
</select>
<div id='err_course_id' class="text-danger cierr"></div>
</div>
</div>
</div>
<div class="col-md-3 pr-0">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label>Section <span style="color:red;"> * </span></label>
<!-- <select name="section_id[]" id="section_id" onchange='show_hide_table("onchange")' class="form-control selectpicker" multiple>
<option value="">Select Section</option>
</select>
<div id='err_section_id' class="text-danger cierr"></div> -->
<?php if ($course_id != '' && $course_id > 0) {
$sql = "SELECT s.id as section_id,s.section_name FROM course_sections cs JOIN section s ON s.id=cs.section_id WHERE cs.course_id='$course_id' ORDER BY s.id DESC";
$section_list = $this->Admin_model->get_query_result($sql);
?>
<select id="section_id" name="section_id[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
<?php
if (isset($section_list) && !empty($section_list)) {
foreach ($section_list as $se_val) { ?>
<option value="<?php echo $se_val['section_id'] ?>" <?php if (isset($search_section) && !empty($search_section)) {
echo (in_array($se_val['section_id'], $search_section)) ? 'selected' : '';
} ?>><?php echo $se_val['section_name'] ?></option>
<?php }
} ?>
</select>
<?php } else { ?>
<select id="section_id" id="section_id" name="section_id[]" class=" form-control selectpicker" multiple>
<option value="" disabled>Select Section</option>
</select>
<?php } ?>
</div>
</div>
</div>
<div class="col-md-3">
<div class="subject-filter">
<div class="form-group assign_fee_toall">
<label></label>
<div>
<input type="button" class="btn btn-success" value="View" onclick="validate_view_here()">
<a href="<?php echo base_url() ?>admin/multiple-edit">
<button type="button" class="subject_addbtn subject_addbtn_nobg">
<i class="fas fa-redo"></i>Reset
</button>
</a>
</div>
</div>
</div>
</div>
</div>
<?php if (!empty($this->session->flashdata('success_msg'))) { ?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> <?php echo $this->session->flashdata('success_msg'); ?>
</div>
<?php }
unset($_SESSION['success']); ?>
<?php if (!empty($this->session->flashdata('error_msg'))) { ?>
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Error!</strong> <?php echo $this->session->flashdata('error_msg'); ?>
</div>
<?php }
unset($_SESSION['danger']); ?>
<?php
if (isset($theStudents) && !empty($theStudents)) {
?>
<div class="col-md-12">
<div id='the_error' class="text-danger cierr" style='font-size: 15px; padding-bottom: 5px;'></div>
<table id="tbl1" class=" table-bordered course_grade_details_table text-center">
<thead>
<tr>
<th class="text-center sort border-left border-right"> S.No. </th>
<th width="100px" class="text-center border-right"> Student Details </th>
<th valign="center" style="background-image: none;" class="border-right p-0 m-0 text-small">
Section
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0 text-small">
Name
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0">
Email
</th>
<th valign="center" width="120px" style="background-image: none;" class="border-right p-0 m-0">
DOB
</th>
<th valign="center" width="100px" style="background-image: none;" class="border-right p-0 m-0">
Contact No.
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0">
Father's Name
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0">
Mother's Name
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0">
Emergency Contact No.
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0">
Address
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0">
State
</th>
<th valign="center" width="150px" style="background-image: none;" class="border-right p-0 m-0">
Country
</th>
<th valign="center" width="70px" style="background-image: none;" class="border-right p-0 m-0">
Student Photo
</th>
<th valign="center" width="70px" style="background-image: none;" class="border-right p-0 m-0">
IEMIS
</th>
<!-- <th style="background-image: none;" width="70px" class="border-right border-left">
</th> -->
</tr>
</thead>
<tbody>
<?php
$a = 0;
if (isset($theStudents) && !empty($theStudents)) {
// echo '<pre>';
// var_dump($theStudents);
$slNo = 1;
foreach ($theStudents as $sk => $std) {
// echo '<pre>';
// print_r($ta_value);
?>
<tr>
<td valign="center" class="border-right border-bottom text-center"><?php echo $slNo; ?></td>
<td valign="center" class="text-left border-right border-bottom">
<input type="hidden" name="studentId[<?php echo $std["id"]; ?>]" id="studentId[<?php echo $std["id"]; ?>]" value="<?php echo $std['studentId']; ?>" />
<?php
echo ucwords($std['name']) . '<br>';
echo '<small class="font-weight-bold">' . $std['studentId'] . '</small><br>';
echo '<small>Roll No : ' . $std['roll_no'] . '</small><br>';
?>
<!-- <input type="number" min="0" placeholder="Pr Days" name='present_days[<?php echo $std["student_id"]; ?>]' value="<?php echo $thePrDays != null ? (int) $thePrDays : ''; ?>"> -->
</td>
<td valign="center" class="border-right border-bottom text-center">
<?php echo $std['section_name']; ?>
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Name" name='name[<?php echo $std["id"]; ?>]' value="<?php echo $std['name']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Email Address" name='email[<?php echo $std["id"]; ?>]' value="<?php echo $std['email']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" name="sdob[<?php echo $std["id"]; ?>]" id='dob[<?php echo $std["id"]; ?>]' class="nepal-date sdob form-control" placeholder="Date Of Birth" value="<?php echo $std['dob']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Contact No." name='mobile[<?php echo $std["id"]; ?>]' value="<?php echo $std['mobile']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Father Name" name='fathername[<?php echo $std["id"]; ?>]' value="<?php echo $std['father_name']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Mother Name" name='mother_name[<?php echo $std["id"]; ?>]' value="<?php echo $std['mother_name']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Emergency Contact No." name='emergency_contact_number[<?php echo $std["id"]; ?>]' value="<?php echo $std['emergency_contact_number']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Address" name='address[<?php echo $std["id"]; ?>]' value="<?php echo $std['address1']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="State" name='state[<?php echo $std["id"]; ?>]' value="<?php echo $std['state']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<input type="text" placeholder="Country" name='country[<?php echo $std["id"]; ?>]' value="<?php echo $std['country']; ?>">
</td>
<td valign="center" class="border-right border-bottom">
<div class="upload-doc mb-0">
<input type="hidden" name="user_photo[<?php echo $std["id"]; ?>]" id="user_photo[<?php echo $std["id"]; ?>]" value="<?php echo $std['photo']; ?>" />
<div class="">
<input type="file" name="photo[<?php echo $std["id"]; ?>]" id="photo[<?php echo $std["id"]; ?>]" multiple />
<!-- <label for="photo" class="upload-btn" id="uploadBtn1">Upload</label> -->
<!-- <label for="photo" class="upload-btn re-upload-btn" id="uploadBtn2">Upload</label> -->
</div>
</div>
</td>
<td valign="center" class="border-right border-bottom">
<input style="width:90px !important" type="text" placeholder="IEMIS No." name='iemis[<?php echo $std["id"]; ?>]' value="<?php echo $std['iemis']; ?>">
</td>
<!-- <td class="border-right border-bottom">
<input type="button" id="row-save-<?php echo $std['id']; ?>" class="btn btn-success" style="font-size: 14px;padding: 6px 17px; margin-left:8px" value="Save" onclick="validate_the_form_here('Save', <?php echo $std['id']; ?>)">
<div id="row-save-loading-<?php echo $std['id']; ?>" class="form-group" style="font-size:13px; display:none;">
<i class="fa-solid fa-loader"></i>Loading....
</div>
</td> -->
</tr>
<?php $slNo++;
}
}
?>
</tbody>
</table>
<div class="col-md-12" style="align-content: right;">
<div id='tbl-save-all-btn' class="form-group">
<input type="button" name="assignSubmit" onclick="validate_the_form_here('Save All',0)" class="btn btn-success" value="Save All">
</div>
<div id='tbl-loading-btn' class="form-group" style='display:none;'>
<i class="fa-solid fa-loader"></i>Loading.... Please wait
</div>
</div>
</div>
<?php } ?>
</form>
<!-- tab added -->
<!-- new divs added -->
<!--<div class="tab-content">
<div class="applicnts-list-wrap ">
<div class=" ">
</div>
</div>
</div>-->
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<div class="modal fade" id="confirmDeleteSubjectColumnModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<!--<input type="text" id="del_batch_id" id="del_batch_id" />-->
<h4>Are you sure?</h4>
<p>you want to delete the records for this subject?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="delete_subject_column_records();">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" onclick="cancel_delete_subject_column_records()">Cancel</button>
</div>
</div>
</div>
</div>
</div>
<script defer src="<?php echo base_url(); ?>assets_admin/js/bootstrap-select.min.js"></script>
<script type="text/javascript">
var jsShowTable = '<?php echo $showTable; ?>';
var jsSeldSections = "<?php echo $sectionIds; ?>";
function confirm_delete_subject_column_records(subjectId) {
$('#clicked_button').val('Delete Subject Records');
$('#the_delete_subject_id').val(subjectId);
$('#confirmDeleteSubjectColumnModal').modal('show');
}
function cancel_delete_subject_column_records() {
$('#clicked_button').val('');
$('#the_delete_subject_id').val('');
$('#confirmDeleteSubjectColumnModal').modal('hide');
}
function delete_subject_column_records() {
$('#recordsUpdateForm').submit();
}
$('input').on("keydown", function(e) {
/* ENTER PRESSED*/
console.log(e.keyCode);
if (e.keyCode == 13) {
/* FOCUS ELEMENT */
var inputs = $(this).parents("form").eq(0).find(":input[type='text']:not([readonly])");
var idx = inputs.index(this);
console.log('====================>' + inputs.prop);
if (idx == inputs.length - 1) {
inputs[0].select()
} else {
inputs[idx + 11].focus(); // handles submit buttons
inputs[idx + 11].select();
}
e.preventDefault();
return false;
} else {
return true;
// e.preventDefault();
}
});
$(document).ready(function() {
$('#tbl1').DataTable({
scrollY: "500px",
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
left: 3,
right: 1
},
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": []
});
sessionStorage.clear();
// fetch_sections_of_course('onload');
show_hide_table('onload');
});
function absent_clicked(stdId, subId) {
sessionStorage.setItem('#row_th_obt_pORa_' + stdId + '_' + subId, $('#row_th_obt_' + stdId + '_' + subId).val());
sessionStorage.setItem('#row_pr_obt_pORa_' + stdId + '_' + subId, $('#row_pr_obt_' + stdId + '_' + subId).val());
$('#row_th_obt_' + stdId + '_' + subId).val(0);
$('#row_pr_obt_' + stdId + '_' + subId).val(0);
}
function present_clicked(stdId, subId) {
let storedPresentThObtMarks = sessionStorage.getItem('#row_th_obt_pORa_' + stdId + '_' + subId);
if (storedPresentThObtMarks) {
$('#row_th_obt_' + stdId + '_' + subId).val(storedPresentThObtMarks);
} else {
$('#row_th_obt_' + stdId + '_' + subId).val(0);
}
let storedPresentPrObtMarks = sessionStorage.getItem('#row_pr_obt_pORa_' + stdId + '_' + subId);
if (storedPresentPrObtMarks) {
$('#row_pr_obt_' + stdId + '_' + subId).val(storedPresentPrObtMarks);
} else {
$('#row_pr_obt_' + stdId + '_' + subId).val(0);
}
}
// function fetch_sections_of_course(calledOn) {
// if (calledOn == 'onchange')
// $('#theOfflineExamMarksEntryTable').hide();
// //$('#section_id').empty().selectpicker("refresh");
// $('#section_id').empty();
// var divData = "<option value=''> Select Section </option>";
// if ($('#course_id').val() != '') {
// // alert('A');
// $.ajax({
// url: "<?php echo base_url(); ?>Admin/get_section_by_course",
// method: "POST",
// data: {
// course_id: $('#course_id').val()
// },
// dataType: "json",
// success: function(response) {
// //divData += "<option value='' disabled> Select Section </option>";
// if (response.sections != '') {
// var ssArr = [];
// if (jsSeldSections != '')
// ssArr = jsSeldSections.split(",");
// $.each(response.sections, function(i, sectiondata) {
// console.log(sectiondata);
// if (ssArr.includes(sectiondata.section_id))
// divData += "<option value='" + sectiondata.section_id + "' selected >" + sectiondata.section_name + "</option>";
// else
// divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
// });
// } else
// divData += "<option value=''> -- No Section's Found --</option>";
// //$('#section_id').append(divData).selectpicker("refresh");
// $('#section_id').append(divData);
// }
// });
// } else
// $('#section_id').append(divData);
// }
$('#course_id').change(function() {
var course = $('#course_id option:selected').val();
// alert(course);
var divData = '';
if (course != '' && course != 0) {
$.ajax({
url: "<?php echo base_url(); ?>Admin/get_section_by_course",
method: "POST",
data: {
course_id: course
},
dataType: "json",
success: function(response) {
console.log(response);
// section options code and start from here
divData += "<option value='' disabled> Select Section </option>";
if (response.sections != '') {
$.each(response.sections, function(i, sectiondata) {
divData += "<option value='" + sectiondata.section_id + "'>" + sectiondata.section_name + "</option>";
});
}
// $('#course_error_msg').text();
else {
divData += "<option value=''> -- No Section's Found --</option>";
}
$('#section_id').empty().append(divData).selectpicker("refresh");
// section options code here End from here
}
});
} else {
divData = "<option value=''> -- Select Section -- </option>";
$('#f_section').empty().append(divData);
}
});
function show_hide_table(flagVal) {
$('#theOfflineExamMarksEntryTable').hide();
//&& $('#section_id').val()!=''
if (flagVal == 'onload' && $('#batch_id').val() != '' && $('#course_id').val() != '' && jsShowTable == 'Yes')
$('#theOfflineExamMarksEntryTable').show();
}
function validate_view_here() {
$errCnt = 0;
$("#err_batch_id").hide();
$("#err_course_id").hide();
$("#err_section_id").hide();
if ($('#batch_id').val() == '') {
$('#err_batch_id').html('Please select the batch.');
$('#err_batch_id').show();
$errCnt++;
}
if ($('#course_id').val() == '') {
$('#err_course_id').html('Please select the course.');
$('#err_course_id').show();
$errCnt++;
}
$('#clicked_button').val('View');
if ($errCnt == 0)
$('#recordsUpdateForm').submit();
return false;
}
function validate_the_form_here(theFunction, theStudentId) {
$('#the_student_id').val(theStudentId);
$('#clicked_button').val(theFunction);
$('#recordsUpdateForm').submit();
if (theStudentId > 0) {
$('#row-save-' + theStudentId).hide();
$('#row-save-loading-' + theStudentId).show();
}
$('#tbl-save-all-btn').hide();
$('#tbl-loading-btn').show();
}
</script>

View File

@ -0,0 +1,266 @@
<?php
class nepali_date
{
//List of month nepali
private $nepali_length = array(
1975 => array(31,32,31,32,31,30,30,30,29,30,29,31),
1976 => array(31,32,31,32,31,30,30,30,29,29,30,30),
1977 => array(31,31,32,31,31,31,30,29,30,29,30,30),
1978 => array(31,31,31,32,31,31,30,29,30,29,30,30),
1979 => array(31,32,31,32,31,30,30,30,29,30,29,31),
1980 => array(31,32,31,32,31,30,30,29,30,29,30,30),
1981 => array(31,31,32,31,31,31,30,29,30,29,30,30),
1982 => array(31,31,31,32,31,31,29,30,30,29,30,30),
1983 => array(31,32,31,32,31,30,30,30,29,29,30,31),
1984 => array(31,31,32,32,31,30,30,29,30,29,30,30),
1985 => array(31,31,32,31,31,31,30,29,30,29,30,30),
1986 => array(31,31,31,32,31,31,29,30,30,29,30,30),
1987 => array(31,32,31,32,31,30,30,30,29,29,30,31),
1988 => array(31,31,32,32,31,30,30,29,30,29,30,30),
1989 => array(31,31,32,31,31,31,30,29,30,29,30,30),
1990 => array(31,31,31,32,31,31,29,30,30,29,29,31),
1991 => array(31,32,31,32,31,30,30,30,29,29,30,31),
1992 => array(31,31,32,32,31,30,30,29,30,29,30,30),
1993 => array(31,31,32,31,31,31,30,29,30,29,30,30),
1994 => array(30,32,31,32,31,30,30,30,29,30,29,31),
1995 => array(31,32,31,32,31,30,30,30,29,29,30,31),
1996 => array(31,31,32,32,31,30,29,30,30,29,30,30),
1997 => array(31,31,32,31,31,31,30,29,30,29,30,30),
1998 => array(30,32,31,32,31,30,30,30,29,30,29,31),
1999 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2000 => array(30,32,31,32,31,30,30,30,29,30,29,31),
2001 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2002 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2003 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2004 => array(30,32,31,32,31,30,30,30,29,30,29,31),
2005 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2006 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2007 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2008 => array(31,31,31,32,31,31,29,30,30,29,29,31),
2009 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2010 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2011 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2012 => array(31,31,31,32,31,31,29,30,30,29,30,30),
2013 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2014 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2015 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2016 => array(31,31,31,32,31,31,29,30,30,29,30,30),
2017 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2018 => array(31,32,31,32,31,30,30,29,30,29,30,30),
2019 => array(31,32,31,32,31,30,30,30,29,30,29,31),
2020 => array(31,31,31,32,31,31,30,29,30,29,30,30),
2021 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2022 => array(31,32,31,32,31,30,30,30,29,29,30,30),
2023 => array(31,32,31,32,31,30,30,30,29,30,29,31),
2024 => array(31,31,31,32,31,31,30,29,30,29,30,30),
2025 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2026 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2027 => array(30,32,31,32,31,30,30,30,29,30,29,31),
2028 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2029 => array(31,31,32,31,32,30,30,29,30,29,30,30),
2030 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2031 => array(30,32,31,32,31,30,30,30,29,30,29,31),
2032 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2033 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2034 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2035 => array(30,32,31,32,31,31,29,30,30,29,29,31),
2036 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2037 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2038 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2039 => array(31,31,31,32,31,31,29,30,30,29,30,30),
2040 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2041 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2042 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2043 => array(31,31,31,32,31,31,29,30,30,29,30,30),
2044 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2045 => array(31,32,31,32,31,30,30,29,30,29,30,30),
2046 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2047 => array(31,31,31,32,31,31,30,29,30,29,30,30),
2048 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2049 => array(31,32,31,32,31,30,30,30,29,29,30,30),
2050 => array(31,32,31,32,31,30,30,30,29,30,29,31),
2051 => array(31,31,31,32,31,31,30,29,30,29,30,30),
2052 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2053 => array(31,32,31,32,31,30,30,30,29,29,30,30),
2054 => array(31,32,31,32,31,30,30,30,29,30,29,31),
2055 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2056 => array(31,31,32,31,32,30,30,29,30,29,30,30),
2057 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2058 => array(30,32,31,32,31,30,30,30,29,30,29,31),
2059 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2060 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2061 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2062 => array(30,32,31,32,31,31,29,30,29,30,29,31),
2063 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2064 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2065 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2066 => array(31,31,31,32,31,31,29,30,30,29,29,31),
2067 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2068 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2069 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2070 => array(31,31,31,32,31,31,29,30,30,29,30,30),
2071 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2072 => array(31,32,31,32,31,30,30,29,30,29,30,30),
2073 => array(31,32,31,32,31,30,30,30,29,29,30,31),
2074 => array(31,31,31,32,31,31,30,29,30,29,30,30),
2075 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2076 => array(31,32,31,32,31,30,30,30,29,29,30,30),
2077 => array(31,32,31,32,31,30,30,30,29,30,29,31),
2078 => array(31,31,31,32,31,31,30,29,30,29,30,30),
2079 => array(31,31,32,31,31,31,30,29,30,29,30,30),
2080 => array(31,32,31,32,31,30,30,30,29,29,30,30),
2081 => array(31,31,32,32,31,30,30,30,29,30,30,30),
2082 => array(30,32,31,32,31,30,30,30,29,30,30,30),
2083 => array(31,31,32,31,31,30,30,30,29,30,30,30),
2084 => array(31,31,32,31,31,30,30,30,29,30,30,30),
2085 => array(31,32,31,32,30,31,30,30,29,30,30,30),
2086 => array(30,32,31,32,31,30,30,30,29,30,30,30),
2087 => array(31,31,32,31,31,31,30,30,29,30,30,30),
2088 => array(30,31,32,32,30,31,30,30,29,30,30,30),
2089 => array(30,32,31,32,31,30,30,30,29,30,30,30),
2090 => array(30,32,31,32,31,30,30,30,29,30,30,30),
2091 => array(31,31,32,32,31,30,30,29,30,29,30,30),
2092 => array(30,31,32,32,31,30,30,30,29,30,30,30),
2093 => array(30,32,31,32,31,30,30,30,29,29,30,30),
2094 => array(31,31,32,31,31,30,30,30,29,30,30,30),
2095 => array(31,31,32,31,31,31,30,29,30,30,30,30)
//OH GOD! I am tired.
);
private $firstday_en ="1918-04-13";
private $start_ne = "1975";
private $start_en = "1918";
private $end_ne = "2095";
private $end_en = "2038";
private $month_name = array('ब‌ैशाख', 'जेठ', 'असार', 'साउन', 'भदौ', 'असोज', 'कार्तिक', 'मङ्सिर', 'पुस', 'माघ', 'फाल्गुण', 'चैत');
private $day_name = array('अाईतबार', 'सोमबार', 'मङ्गलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिवार');
private function get_week_ne($year, $month, $day)
{
$jd = GregorianToJD($month, $day, $year);
return $this->day_name[JDDayOfWeek($jd,0)];
}
private function validate_ne($year, $month, $day)
{
if(!array_key_exists($year, $this->nepali_length))
{
return 'Invalid <b>Year</b> range';
}
if($month >12 || $month<1)
{
return 'Invalid <b>Month</b> range';
}
if($day>$this->nepali_length[$year][$month-1] || $day<1)
{
return 'Invalid <b>Day</b>';
}
return TRUE;
}
private function validate_en($year, $month, $day)
{
if ($year < $this->start_en || $year>$this->end_en) { return 'Invalid Year Range';}
if ($month < 1 || $month>12) { return 'Invalid Month Range';}
if ($day < 1 || ($day>cal_days_in_month(CAL_GREGORIAN, $month, $year)))
{ return 'Invalid day Range';}
return TRUE;
}
//Convert AD to Bs
public function get_nepali_date($year,$month,$day)
{
$validate = $this->validate_en($year, $month, $day);
if($validate !== TRUE)
{
die($validate);
}
$date = $year.'-'.$month.'-'.$day;
$dayname = $this->get_week_ne($year, $month, $day);
$date_start=date_create($this->firstday_en);
$date_today=date_create($date);
$diff=date_diff($date_start,$date_today, true);
$days = $diff->format("%a");
$arr='0';
$mm='';
for ($i=$this->start_ne; $i<$this->end_ne; $i++)
{
$arr+=array_sum($this->nepali_length[$i]);
if ($arr>$days)
{
$year = $i;
$count_previous=$arr-array_sum($this->nepali_length[$i]);
$year_previous = $i-1;
for ($j=0; $j < 12; $j++)
{
$count_previous+= $this->nepali_length[$i][$j];
if($count_previous>$days)
{
$month = $j+1; //Even I don't Know Why should I add 1 :p
$daysss = $count_previous-$days;
$dayss = ($this->nepali_length[$i][$j]-$daysss)+1;
break;
} elseif ($count_previous==$days)
{
$year = $i;
$month = $j+1;
$day = 1;
}
}
break;
} elseif($arr==$days)
{
$year = $i+1;
$month = 1;
$day = 1;
}
}
$date = array();
$date['y'] = $year;
$date['m'] = $month;
$date['M'] = $this->month_name[$month-1];
$date['d'] = $dayss;
$date['l'] = $dayname;
return $date;
}
//Convert Nepali Date to english
public function get_eng_date($year, $month, $day)
{
$validate = $this->validate_ne($year, $month, $day);
if($validate !== TRUE)
{
die($validate);
}
$date_start = date_create($this->firstday_en);
$daycount = '0';
$months=$month-1;
for($i=$this->start_ne;$i<$year; $i++)
{
$daycount+=array_sum($this->nepali_length[$i]);
}
for($j=0; $j<$months; $j++)
{
$daycount+=$this->nepali_length[$i][$j];
}
$daycount+=$day-1;
$nep = date_add($date_start, date_interval_create_from_date_string($daycount." days"));
$date = array();
$date['y'] = date_format($nep, "Y");
$date['m'] = date_format($nep, "m");
$date['M'] = date_format($nep, "M");
$date['d'] = date_format($nep, "d");
$date['l'] = date_format($nep, "l");
return $date;
}
//end of class
}
?>

View File

@ -0,0 +1,54 @@
<main class="wraper responsive-width" id="main">
<div class="from-group">
<a href="<?php echo base_url() ?>Admin/notifications"><button type="button" class="btn btn-dark btn-sm">Back</button></a>
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form>
<div class="subsec_sec">
<div class="subject_l w-100 subject_l_notifn">
<div class="subject_lsec">
<div class="subject_lhead">Notification Details</div>
<div class="notif_details">
<ul>
<li><label>To :</label> <?php echo ucfirst($result->notification_to) ?></li>
<li><label>Date : </label> <?php echo $result->created_at ?></li>
</ul>
<h5 class="mt-3 mb-2"><?php echo $result->notification_title ?></h5>
<p><?php echo $result->description ?></p>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
<script>
$(document).ready(function(){
$('.user-drpdown').click(function(){
$('.drpdown-items').toggle();
});
//table js
$('#tbl').DataTable( {
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
} );
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
</body>
</html>

View File

@ -0,0 +1,166 @@
<main class="wraper responsive-width" id="main">
<div class="from-group adding-class form-group_lng form-group_full-width ">
<a href="<?php echo base_url() ?>admin/send-sms"><button type="button" class="btn subject_addbtn btn-sm mr-3">Send SMS</button></a>
<a href="<?php echo base_url() ?>admin/send-notification"><button type="button" class="btn subject_addbtn btn-sm">Send Notification</button></a>
</div>
<!----admin template section---->
<div class="admin_tempblock form-group_full-width">
<div class="admin_tempsec">
<div class="admin_sec">
<form method="post" action="<?php echo base_url(); ?>Admin/notifications">
<div class="subsec_sec ">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Notifications</div>
<div class="top-filter notif_filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="subject-filter">
<select class="form-control" name="filter-name" placeholder="Select Subject">
<option selected disabled value=""> Select </option>
<?php foreach ($filterArray['title'] as $row) {
echo '<option value="' . $row['notification_title'] . '"> ' . $row['notification_title'] . ' </option>';
} ?>
</select>
</div>
<div class="subject-filter">
<select id=" " name="filter-classroom" class="form-control" placeholder="Select Subject">
<option selected disabled value="">Classroom</option>
<?php foreach ($filterArray['class'] as $row) {
if ($row['student_classroom'] != NULL) {
echo '<option value="' . $row['student_classroom'] . '"> ' . $row['student_classroom'] . ' </option>';
}
} ?>
</select>
</div>
<div class="subject-filter">
<select id=" " name="filter-teacher" class="form-control" placeholder="Select Subject">
<option selected disabled value="">Teacher</option>
<?php foreach ($filterArray['teacher'] as $row) {
if ($row['teacher_name'] != NULL) {
echo '<option value="' . $row['teacher_name'] . '"> ' . $row['teacher_name'] . ' </option>';
}
} ?>
</select>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label></label>
<div class="po-calendar">
<input type="text" placeholder="Select date" name="filter-date" class="nepal-date form-control">
<i class="fas fa-calendar-alt cal-icon"></i>
</div>
</div>
</div>
<div class="filter-reset">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>Admin/notifications"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="">
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Title of Notifications</th>
<th>Description</th>
<th>Notification to</th>
<th>Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($notificationInfo as $key => $value) {
$originalDate = $notificationInfo[$key]['created_at'];
$newDate = date("d-m-Y", strtotime($originalDate));
?>
<tr>
<td><?php echo $key + 1 ?></td>
<td><?php echo $notificationInfo[$key]['notification_title'] ?></td>
<td>
<div class="sub_descdetail_notif"><?php echo substr($notificationInfo[$key]['description'], 0, 120) ?>...</div>
</td>
<td><?php echo $notificationInfo[$key]['notification_to'] ?></td>
<td>
<div class="width_control"><?php echo $newDate ?></div>
</td>
<td>
<div class="sub_tabbtnsec">
<div class="sub_viewbtn"><a href="<?php echo base_url() ?>admin/view-notification/<?php echo $notificationInfo[$key]['notification_id'] ?>"><i class="fa fa-eye" aria-hidden="true"></i></a></div>
<!-- <div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div> -->
<div class="sub_delbtn"><a href="<?php echo base_url() ?>Admin/delete_notification?id=<?php echo $notificationInfo[$key]['notification_id'] ?>"><i class="fa fa-trash" aria-hidden="true"></i></a></div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>

View File

@ -0,0 +1,206 @@
<style>
.error {
color: red;
font-weight: 400;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
<a href="<?php echo base_url(); ?>admin/reports"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
<!--a href=" "><button type="button" class="btn btn-success btn-sm">Assign students</button></a-->
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
$search_feetype = (isset($search_feetype) && !empty($search_feetype)) ? $search_feetype : 0;
?>
<form method="post" action="<?php echo base_url(); ?>Admin/payment_overview/<?= $search_feetype; ?>" id="payment_overview_filter">
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="subject_lhead">Payment Overview</div>
<!-- tab added -->
<div class="top-filter report_filter payment-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="subject-filter ">
<select id="fees_type" name="by_feetype" class=" form-control">
<option value="">Select Payment Type</option>
<?php
$feetype_list = (isset($feetype_list) && !empty($feetype_list)) ? $feetype_list : 0;
if ($feetype_list != 0) {
foreach ($feetype_list as $f_value) {
$f_selected = ($f_value['id'] == $search_feetype) ? 'selected' : '';
?>
<option value="<?php echo $f_value['id'] ?>" <?= $f_selected ?>><?php echo $f_value['feetype_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="subject-filter course-filter">
<select id="course_id" name="course_id" class=" form-control">
<option value=""> Select Course</option>
<?php
$course_list = (isset($course_list) && !empty($course_list)) ? $course_list : 0;
if ($course_list != 0) {
foreach ($course_list as $c_value) {
?>
<option value="<?php echo $c_value['id'] ?>"><?php echo $c_value['course_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Start date</label>
<input type="date" id="start_date" name="start_date" class="form-control">
</div>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>End date</label>
<input type="date" id="end_date" name="end_date" class="form-control">
</div>
</div>
<div class="subject-filter subject-filter-l">
<select id="by_payment_status" name="by_payment_status" class=" form-control">
<option value="">Select Payment Status</option>
<option value="Completed">Success</option>
<option value="Failed">Failed </option>
</select>
</div>
<div class="filter-reset">
<input type="submit" name="search_filter" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/payment-overview/0"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
<div class="top-filter report_filter payment-filter">
<label id="fees_type-error" class="error" for="fees_type"></label>
</div>
<div class="applicnts-list-wrap ">
<div class="">
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>Sl.NO</th>
<th>Student ID</th>
<th>Student Name</th>
<th>Course</th>
<th>Payment</th>
<th>Amount</th>
<th>Date</th>
<th>Payment Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$rowCount = (isset($payment_data) && !empty($payment_data)) ? count($payment_data) : 0;
if ($rowCount > 0) {
$sno = 1;
foreach ($payment_data as $value) {
?>
<tr>
<td><?= $sno; ?> </td>
<td><?= $value['studentId'] ?> </td>
<td><?= $value['name'] ?></td>
<td><?php
$course_id = (isset($value['course']) && !empty($value['course'])) ? $value['course'] : 0;
echo $this->db->get_where('course', array('id' => $course_id))->row()->course_name;
?></td>
<td><?= $value['payment_for'] ?></td>
<td><?= $value['payment_amt'] ?></td>
<td><?= date('Y-m-d', strtotime($value['payment_date'])) ?></td>
<td><?= $value['status'] ?></td>
<td><a href="<?= base_url(); ?>admin/invoice/<?= urlsafe_b64encode($value['studentId']) ?>/<?= urlsafe_b64encode($value['txn_id']) ?>/<?= urlsafe_b64encode(0) ?>">
<i class="fa fa-eye" aria-hidden="true"></i></td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[50, 75, 100, -1],
[50, 75, 100, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
$(document).ready(function() {
$("#payment_overview_filter").validate({
rules: {
by_feetype: {
required: true,
},
},
messages: {
by_feetype: {
required: "Please Select Payment Type",
}
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,513 @@
<style>
form label.error,
#secNameerr,
.error {
color: red;
}
.cierr {
font-size: 14px;
}
</style>
<div class="wraper responsive-width">
<main class="" id="main">
<!-- admin template section -->
<div class="main-wrap">
<div class="dashboard-cover">
<div class="admin_sec">
<div class="common-heading">
<h2>Promotions</h2>
</div>
<?php if ($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if ($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<!-- tab added -->
<form method="post" action="<?php base_url('admin/studentPromosionView') ?>" id="serach_student">
<?php
$courseId = (isset($courseId) && !empty($courseId)) ? $courseId : '';
//$batchId = (isset($batchId) && !empty($batchId)) ? $batchId : '';
$batchId = '';
if (isset($batchId) && $batchId != '')
$batchId = $batchId;
$sectionId = (isset($sectionId) && !empty($sectionId)) ? $sectionId : '';
?>
<div class="top-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="subject-filter">
<select id="batch" class="form-control" placeholder="Select Course" name="filter-batch">
<option value=""> Select Batch </option>
<?php
foreach ($batch as $key => $value) { ?>
<option value="<?php echo $value['id'] ?>" <?php echo ($batchId == $value['id']) ? 'selected' : '' ?>>
<?php echo $value['b_name']; ?>
</option>
<?php }
?>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-batch'); ?></div>
</div>
<div class="subject-filter">
<select id="course" class="form-control" placeholder="Select Course" name="filter-course">
<option value=""> Select Course</option>
<?php
foreach ($course as $row) { ?>
<option value="<?php echo $row['id'] ?>" <?php echo ($courseId == $row['id']) ? 'selected' : '' ?>> <?php echo $row['course_name']; ?></option>
<?php }
?>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-course'); ?></div>
</div>
<div class="subject-filter">
<select id="section" class="form-control" placeholder="Select Course" name="filter-section">
<option value=""> --- Select Section --- </option>
</select>
<div class="text-danger cierr"><?php echo form_error('filter-section'); ?></div>
</div>
<div class="filter-reset">
<input type="submit" name="filterSubmit" id="filter_reset" class="btn " value="Search" style="background: #032DA1 0% 0% no-repeat padding-box;color: #fff;">
<a href="<?php echo base_url(); ?>admin/studentPromosionView"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</form>
<form method="post" id="downloadAll" action="<?php echo base_url(); ?>admin/promote-student">
<div class="subject_lhead">Promote Students To Different Batch</div>
<div class="top-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="subject-filter">
<select id="select_batch" class="form-control" placeholder="Select Course" name="select-batch">
<option value=""> Select Batch </option>
<?php
foreach ($batch as $key => $value) { ?>
<option value="<?php echo $value['id'] ?>">
<?php echo $value['b_name']; ?>
</option>
<?php }
?>
</select>
<label class="error batch-error d-none"></label>
</div>
<div class="subject-filter">
<select id="select_course" class="form-control" placeholder="Select Course" name="select-course">
<option value=""> Select Course</option>
<?php
foreach ($course as $row) { ?>
<option value="<?php echo $row['id'] ?>"> <?php echo $row['course_name']; ?></option>
<?php }
?>
</select>
<label class="error course-error d-none"></label>
</div>
<div class="subject-filter">
<select id="select_section" class="form-control" placeholder="Select Course" name="select-section">
<option value="0"> --- Select Section --- </option>
</select>
<label class="error section-error d-none"></label>
</div>
<div class="filter-reset">
<button class="btn btn-success" id="download_idcards">Promote</button>
</div>
</div>
<?php if (isset($promoted_students) && !empty($promoted_students)) { ?>
<script>
$(document).ready(function() {
$("#confirmModal").modal({
backdrop: 'static',
keyboard: false
});
});
</script>
<style type="text/css">
.reload .fa-undo:hover {
color: green !important;
}
</style>
<!-- Modal -->
<div class="modal fade " id="confirmModal" role="dialog">
<div class="modal-dialog modal-dialog-centered" style="max-width:70% !important">
<div class="modal-content bg-light">
<div class="modal-header" style="border-bottom: none;">
<h5 class="modal-title" id="exampleModalLongTitle">Promoted Student List</h5>
<!-- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button> -->
</div>
<div class="model-body">
<div class="container">
<div class="row justify-content-md-center">
<div class="col-md-12">
<table class="table" id="drop_list_student">
<thead>
<tr>
<th>SI No</th>
<th>Student ID</th>
<th>Student Name</th>
<th>Course Name</th>
<th>Section Name</th>
<th>Batch Name</th>
<th>Action</th>
</tr>
</thead>
<tbody class="list_drop">
<?php $i = 1;
foreach ($promoted_students as $key => $val) { ?>
<tr>
<td><?php echo $i++; ?> <input type="hidden" name="studentBatch_id" class="sb_id" value="<?php echo $val['sb_id']; ?>"></td>
<td><?php echo $val['student_id'] ?></td>
<td class="student_name"><?php echo $val['student_name'] ?></td>
<td><?php echo $val['course_name'] ?></td>
<td><?php echo $val['section_name'] ?></td>
<td><?php echo $val['batch_name'] ?></td>
<td>
<!-- <div class="reload" title="reload" onclick="get_batch_id(<?php echo $val['sb_id']; ?>)">
<i class="fa fa-undo" aria-hidden="true" style="color:red;font-size: 15px;font-weight: bold;"></i>
</div> -->
<div class="btnReload" title="reload">
<i class="fa fa-undo" aria-hidden="true" style="color:red;font-size: 15px;font-weight: bold;"></i>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<div class="failed_define"></div>
<a href="<?php echo base_url(); ?>admin/studentPromosionView" class="btn btn-success float-right mb-3">
Final Submit
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<?php if (isset($students) && !empty($students)) { ?>
<div class="applicnts-list-wrap ">
<div class="">
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>
<input type="checkbox" id="chkParent" />
</th>
<th>Student Id</th>
<th>Name of Student</th>
<th>course name</th>
<th>section name</th>
</tr>
</thead>
<tbody>
<?php foreach ($students as $key => $value) { ?>
<tr>
<td>
<input type='checkbox' name='student_id_list[]' value="<?php echo $value['id']; ?>" />
</td>
<td><?php echo $value['studentId'] ?></td>
<td><?php echo $value['name'] ?></td>
<td><?php echo $value['course_name'] ?></td>
<td><?php echo $value['section_name'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<?php } else { ?>
<div class="subject_lhead">No Data Found</div>
<?php } ?>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[-1],
["All"]
],
dom: 'lBfrtip',
buttons: [{
extend: 'pdfHtml5',
title: 'Student List',
exportOptions: {
columns: [1, 3, 4, 5, 6, 7]
}
},
{
extend: 'csvHtml5',
exportOptions: {
columns: [1, 3, 4, 5, 6, 7]
}
}
]
});
//table js end
//multiple select js start
// $('select').selectpicker();
//multiple select js end
});
var course_id = <?php echo ($courseId) ? $courseId : 0; ?>;
var sectionId = <?php echo ($sectionId) ? $sectionId : 0; ?>;
if (course_id != 0 && sectionId != 0) {
var id = $('#course').find(":selected").val();
$.ajax({
url: '<?php echo base_url() . 'admin/get_sections_from_classroom/' ?>' + id,
type: 'GET',
dataType: 'json',
success: function(result) {
let section = '';
section += '<option value=""> --- Select Section --- </option>';
$.each(result, function(key, value) {
if (sectionId == value['id']) {
section += '<option value="' + value['id'] + '" selected>' + value['section_name'] + '</option>';
} else {
section += '<option value="' + value['id'] + '" >' + value['section_name'] + '</option>';
}
});
$("#section").html(section);
}
});
}
$('#chkParent').click(function() {
var isChecked = $(this).prop("checked");
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').prop('checked', isChecked);
});
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').click(function() {
var isChecked = $(this).prop("checked");
var isHeaderChecked = $("#chkParent").prop("checked");
if (isChecked == false && isHeaderChecked)
$("#chkParent").prop('checked', isChecked);
else {
$('#tbl1 tr:has(td)').find('input[type="checkbox"]').each(function() {
if ($(this).prop("checked") == false)
isChecked = false;
});
console.log(isChecked);
$("#chkParent").prop('checked', isChecked);
}
});
$('#course').change(function() {
var id = $('#course').find(":selected").val();
$.ajax({
url: '<?php echo base_url() . 'admin/get_sections_from_course_id/' ?>' + id,
type: 'GET',
dataType: 'json',
success: function(result) {
let section = '';
section += '<option value=""> --- Select Section --- </option>';
$.each(result, function(key, value) {
section += '<option value="' + value['id'] + '">' + value['section_name'] + '</option>';
});
$("#section").html(section);
}
});
});
$('#select_course').change(function() {
var id = $('#select_course').find(":selected").val();
$.ajax({
url: '<?php echo base_url() . 'admin/get_sections_from_course_id/' ?>' + id,
type: 'GET',
dataType: 'json',
success: function(result) {
let section = '';
section += '<option value=""> --- Select Section --- </option>';
$.each(result, function(key, value) {
section += '<option value="' + value['id'] + '">' + value['section_name'] + '</option>';
});
$("#select_section").html(section);
}
});
});
$(document).on('click', '#download_idcards', function(e) {
var counter = 0;
var batch_id = $('#select_batch').find(":selected").val();
var course_id = $('#select_course').find(":selected").val();
var section_id = $('#select_section').find(":selected").val();
var from_batch_id = $('#batch').find(":selected").val();
if (batch_id == null || batch_id == undefined || batch_id == '') {
counter++;
$('.batch-error').removeClass('d-none');
$('.batch-error').css('display', 'block !important');
$('.batch-error').text('Please select the batch');
} else {
if (from_batch_id != '' && batch_id != '' && from_batch_id == batch_id) {
counter++;
$('.batch-error').removeClass('d-none');
$('.batch-error').css('display', 'block !important');
$('.batch-error').text('Students can not be promoted to the same batch.');
} else {
$('.batch-error').text('');
$('.batch-error').addClass('d-none')
}
}
if (course_id == null || course_id == undefined || course_id == '') {
counter++;
$('.course-error').removeClass('d-none');
$('.course-error').text('Please select the course');
$('.course-error').css('display', 'block !important');
} else {
$('.course-error').addClass('d-none');
$('.course-error').text('');
}
if (section_id == null || section_id == undefined || section_id == '') {
counter++;
$('.section-error').removeClass('d-none');
$('.section-error').css('display', 'block !important');
$('.section-error').text('Please select the section');
} else {
$('.section-error').addClass('d-none');
$('.section-error').text('');
}
if (counter == 0) {
var studentidlist = [];
$.each($("input[name='student_id_list[]']:checked"), function() {
var item = $(this).data('studentid');
studentidlist.push(item);
});
if (studentidlist.length === 0) {
alert("Please Select Students");
e.preventDefault(e);
} else {
$('#downloadAll').submit();
}
} else {
e.preventDefault(e);
}
});
$('#drop_list_student').on('click', '.btnReload', function() {
let currentTr = $(this).parent().parent();
var student_batch = $(this).parent().siblings().children('.sb_id');
// console.log($(student_batch).val());
var id = $(student_batch).val();
// $(currentTr).remove();
$.ajax({
url: '<?php echo base_url() ?>admin/deltePromotedStudentByBatch',
type: 'post',
data: {
id
},
success: function(result) {
console.log(result);
if (result == 'success') {
// location.reload();
$(currentTr).remove();
} else {
var failed_msg = '<div class="alert alert-danger alert-dismissible fade show" role="alert"><p>Cant Remove this table</p><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button></div>';
$('.failed_define').html(failed_msg);
}
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,422 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="subject_lhead">Current Month Report</div>
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$TotalDueAmt = 0;
$TotalCollectedAmt = 0;
foreach ($current_report_data as $report_value) {
$TotalDueAmt += $report_value['feetype_due_amt'];
$TotalCollectedAmt += $report_value['feetype_paid_amount'];
$feeTypeId = (isset($report_value['feetype_id']) && !empty($report_value['feetype_id'])) ? $report_value['feetype_id'] : 0;
?>
<div class="report_tabs">
<div class="report_head">
<img src="<?= base_url(); ?>assets_admin/images/icons/<?= $report_value['feetype_icon'] ?>" class="report_icon">
<a href="<?php echo base_url(); ?>admin/payment-overview/<?= $feeTypeId; ?>">
<h5><?= $report_value['feetype_name'] ?></h5>
</a>
</div>
<ul class="report_info">
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/pending.png">Due Amount :</label><span><?= $report_value['feetype_due_amt'] ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/collected.png">Collected :</label><span><?= $report_value['feetype_paid_amount'] ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/due-date.png">Total Amount :</label><span><?= $report_value['feetype_total'] ?></span>
</li>
</ul>
</div>
<?php } ?>
</div>
<div class="subject_lhead">Current Month Overview</div>
<div class="report_sec_right report_dashboard">
<div class="report_graph">
<div id="recoveryGraf" style="width:700px;margin-left: 170px;"></div>
<div class="graph_details">
<ul>
<?php
$graph_data = array();
foreach ($current_report_data as $collected_value) {
$graph_data[] = array(
'typename' => $collected_value['feetype_name'],
'total' => $collected_value['feetype_paid_amount']
);
?>
<li><span>&nbsp;</span>
<p class="chart_fee_name"><?= $collected_value['feetype_name']; ?></p>
<p class="chart_fee"><?= $collected_value['feetype_paid_amount']; ?></p>
</li>
<?php }
// $piechart_data = json_encode($graph_data);
?>
</ul>
</div>
</div>
<div class="report_graph_info">
<ul class="report_info">
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/pending.png">Due Amount :</label><span><?= $TotalDueAmt; ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/collected.png">Collected :</label><span><?= $TotalCollectedAmt; ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/due-date.png">Total Amount :</label><span><?php echo $TotalAmount = ($TotalDueAmt + $TotalCollectedAmt); ?></span>
</li>
</ul>
</div>
</div>
<div class="subject_lhead">Recent Transactions</div>
<?php
$search_course_id = (isset($search_course_id) && $search_course_id != 0) ? $search_course_id : '';
$search_feetype = (isset($search_feetype) && !empty($search_feetype)) ? $search_feetype : '';
$search_start_paid_date = (isset($search_start_paid_date) && !empty($search_start_paid_date)) ? date('Y-m-d', strtotime($search_start_paid_date)) : '';
$search_end_paid_date = (isset($search_end_paid_date) && !empty($search_end_paid_date)) ? date('Y-m-d', strtotime($search_end_paid_date)) : '';
?>
<form action="<?= base_url(); ?>admin/reports" method="POST">
<div class="top-filter report_filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="subject-filter">
<label>Select Fees Type</label>
<select id="fees_type" name="by_feetype" class=" form-control">
<option value="">Select Fees Type</option>
<?php
$feetype_list = (isset($feetype_list) && !empty($feetype_list)) ? $feetype_list : 0;
if ($feetype_list != 0) {
foreach ($feetype_list as $f_value) {
$f_selected = ($f_value['feetype_name'] == $search_feetype) ? 'selected' : '';
?>
<option value="<?php echo $f_value['feetype_name'] ?>" <?= $f_selected ?>><?php echo $f_value['feetype_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="subject-filter">
<label>Select Course</label>
<select class="form-control" name="by_course_id" id="course">
<option value=''>Select Course </option>
<?php
$course_list = (isset($course_list) && !empty($course_list)) ? $course_list : 0;
if ($course_list != 0) {
foreach ($course_list as $c_value) {
$c_selected = ($c_value['id'] == $search_course_id) ? 'selected' : '';
?>
<option value="<?php echo $c_value['id'] ?>" <?= $c_selected ?>><?php echo $c_value['course_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Select Start Date</label>
<input type="text" name="by_start_paid_date" class="form-control nepal-date" value="<?php echo $search_start_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Select End Date</label>
<input type="text" name="by_end_paid_date" class="form-control nepal-date" value="<?php echo $search_end_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
<div class="filter-reset">
<input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success" value="filter">
<a href="<?php echo base_url() ?>admin/reports">
<button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</form>
<!-- tab added -->
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" ">
<!-- changed ID -->
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>S.No</th>
<th>StudentID</th>
<th>Student Name</th>
<th>Course</th>
<th>Inovice No.</th>
<th>Payment Type</th>
<th>Amount</th>
<th>Paid Date</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$rowscount = (isset($student_fees) && !empty($student_fees)) ? count($student_fees) : 0;
if ($rowscount > 0) {
$sno = 1;
foreach ($student_fees as $ft_value) {
?>
<tr>
<td><?= $sno; ?></td>
<td><?= $ft_value['studentId']; ?></td>
<td><?= $ft_value['name']; ?></td>
<td><?php
$course_id = $ft_value['course'];
echo $courseName = $this->db->get_where('course', array('id' => $course_id))->row()->course_name;
?></td>
<td>
<div class="applicn-date">
<?php
if ($school_info['invoice_prefix_status'] == 1 && !empty($ft_value['invoice_no']))
echo $school_info['invoice_prefix'] . $ft_value['invoice_no'];
else
echo $ft_value['invoice_no'];
// $ft_value['txn_id'];
?>
</div>
</td>
<td>
<?php
if ($ft_value['course_fee_id'] != 0)
$feeTypeName = $this->db->get_where('course_fees', array('id' => $ft_value['course_fee_id']))->row()->fee_values;
else
$feeTypeName = "-";
?>
<div class="applicant_nme"><?= $feeTypeName . '<br>(' . $ft_value['payment_for'] . ')'; ?></div>
</td>
<td><?= $ft_value['payment_amt']; ?></td>
<td>
<div class="date_width" title="<?= $ft_value['payment_date']; ?>"><?= $ft_value['payment_date']; ?>
</td>
<td><label><?= $ft_value['status']; ?></label></td>
<td>
<div class="sub_tabbtnsec">
<div class="sub_viewbtn" title="View"><a href="<?= base_url(); ?>admin/invoice/<?= urlsafe_b64encode($ft_value['studentId']) ?>/<?= urlsafe_b64encode($ft_value['txn_id']) ?>/<?= urlsafe_b64encode(0) ?> "><i class="fa fa-eye" aria-hidden="true"></i></a></div>
</div>
</td>
</tr>
<?php
$sno++;
}
} ?>
<tfoot>
<tr>
<th colspan="6" style="text-align:right">Total Fees:</th>
<th colspan="4"></th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
// orientation: 'landscape',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8],
},
orientation: 'landscape',
pageSize: 'A4'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8]
}
}
],
"footerCallback": function(row, data, start, end, display) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(6)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(6, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Update footer
$(api.column(6).footer()).html(
currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
);
}
});
$('#tbl2').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl3').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
<script>
var graph_data = <?= json_encode($graph_data); ?>;
console.log(graph_data);
Highcharts.setOptions({
lang: {
drillUpText: '<< Back'
}
});
Highcharts.chart('recoveryGraf', {
chart: {
type: 'pie'
},
title: {
text: ''
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.name}: {point.y:.1f}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}</b> of total<br/>'
},
series: [{
name: 'Fee Report',
colorByPoint: true,
colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3'],
data: [
<?php
foreach ($graph_data as $v) {
echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
} ?>
]
}],
drilldown: {
series: [{
name: 'Recycleds',
id: 'Recycleds',
colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3'],
data: [
<?php
foreach ($graph_data as $v) {
echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
} ?>
]
}]
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,198 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="subject_lhead">Current Month Report Overview</div>
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
$TotalDueAmt = 0;
$TotalCollectedAmt = 0;
foreach ($current_report_data as $report_value) {
$TotalDueAmt += $report_value['feetype_due_amt'];
$TotalCollectedAmt += $report_value['feetype_paid_amount'];
$feeTypeId = (isset($report_value['feetype_id']) && !empty($report_value['feetype_id'])) ? $report_value['feetype_id'] : 0;
?>
<div class="report_tabs">
<div class="report_head">
<img src="<?= base_url(); ?>assets_admin/images/icons/<?= $report_value['feetype_icon'] ?>" class="report_icon">
<a href="<?php echo base_url(); ?>admin/payment-overview/<?= $feeTypeId; ?>">
<h5><?= $report_value['feetype_name'] ?></h5>
</a>
</div>
<ul class="report_info">
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/pending.png">Due Amount :</label><span><?= $report_value['feetype_due_amt'] ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/collected.png">Collected :</label><span><?= $report_value['feetype_paid_amount'] ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/due-date.png">Total Amount :</label><span><?= $report_value['feetype_total'] ?></span>
</li>
</ul>
</div>
<?php } ?>
</div>
<div class="subject_lhead">Current Month Overview</div>
<div class="report_sec_right report_dashboard">
<div class="report_graph">
<div id="recoveryGraf" style="width:700px;margin-left: 170px;"></div>
<div class="graph_details">
<ul>
<?php
$graph_data = array();
foreach ($current_report_data as $collected_value) {
$graph_data[] = array(
'typename' => $collected_value['feetype_name'],
'total' => $collected_value['feetype_paid_amount']
);
?>
<li><span>&nbsp;</span>
<p class="chart_fee_name"><?= $collected_value['feetype_name']; ?></p>
<p class="chart_fee"><?= $collected_value['feetype_paid_amount']; ?></p>
</li>
<?php }
// $piechart_data = json_encode($graph_data);
?>
</ul>
</div>
</div>
<div class="report_graph_info">
<ul class="report_info">
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/pending.png">Due Amount :</label><span><?= $TotalDueAmt; ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/collected.png">Collected :</label><span><?= $TotalCollectedAmt; ?></span>
</li>
<li>
<label><img src="<?= base_url(); ?>assets_admin/images/icons/due-date.png">Total Amount :</label><span><?php echo $TotalAmount = ($TotalDueAmt + $TotalCollectedAmt); ?></span>
</li>
</ul>
</div>
</div>
<!-- new divs added -->
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
//table js
$('#tbl2').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl3').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
<script>
var graph_data = <?= json_encode($graph_data); ?>;
console.log(graph_data);
Highcharts.setOptions({
lang: {
drillUpText: '<< Back'
}
});
Highcharts.chart('recoveryGraf', {
chart: {
type: 'pie'
},
title: {
text: ''
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.name}: {point.y:.1f}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}</b> of total<br/>'
},
series: [{
name: 'Fee Report',
colorByPoint: true,
colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3','#a0a9c1','#899bcde6'],
data: [
<?php
foreach ($graph_data as $v) {
echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
} ?>
]
}],
drilldown: {
series: [{
name: 'Recycleds',
id: 'Recycleds',
colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3','#a0a9c1','#899bcde6'],
data: [
<?php
foreach ($graph_data as $v) {
echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
} ?>
]
}]
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,364 @@
<style>
table.dataTable tfoot th {
font-weight: 600 !important;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main" id="main">
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<div class="subsec_sec" style="display:block">
<div class="subject_lsec dashboard_graph report_sec_graph">
<div class="report_sec_cover">
<div class="report_sec_left">
<?php
$currency_symbol = $school_info['currency_symbol'];
?>
</div>
<div class="subject_lhead">Recent Transactions</div>
<?php
$search_course_id = (isset($search_course_id) && $search_course_id != 0) ? $search_course_id : '';
$search_feetype = (isset($search_feetype) && !empty($search_feetype)) ? $search_feetype : '';
$search_start_paid_date = (isset($search_start_paid_date) && !empty($search_start_paid_date)) ? date('Y-m-d', strtotime($search_start_paid_date)) : '';
$search_end_paid_date = (isset($search_end_paid_date) && !empty($search_end_paid_date)) ? date('Y-m-d', strtotime($search_end_paid_date)) : '';
?>
<form action="<?= base_url(); ?>admin/report-recent-transactions" method="POST">
<div class="top-filter report_filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="subject-filter">
<label>Select Fees Type</label>
<select id="fees_type" name="by_feetype" class=" form-control">
<option value="">Select Fees Type</option>
<?php
$feetype_list = (isset($feetype_list) && !empty($feetype_list)) ? $feetype_list : 0;
if ($feetype_list != 0) {
foreach ($feetype_list as $f_value) {
$f_selected = ($f_value['feetype_name'] == $search_feetype) ? 'selected' : '';
?>
<option value="<?php echo $f_value['feetype_name'] ?>" <?= $f_selected ?>><?php echo $f_value['feetype_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="subject-filter">
<label>Select Course</label>
<select class="form-control" name="by_course_id" id="course">
<option value=''>Select Course </option>
<?php
$course_list = (isset($course_list) && !empty($course_list)) ? $course_list : 0;
if ($course_list != 0) {
foreach ($course_list as $c_value) {
$c_selected = ($c_value['id'] == $search_course_id) ? 'selected' : '';
?>
<option value="<?php echo $c_value['id'] ?>" <?= $c_selected ?>><?php echo $c_value['course_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Select Start Date</label>
<input type="text" name="by_start_paid_date" class="form-control nepal-date" value="<?php echo $search_start_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Select End Date</label>
<input type="text" name="by_end_paid_date" class="form-control nepal-date" value="<?php echo $search_end_paid_date; ?>" placeholder='dd-mm-yyyy'>
</div>
</div>
<div class="filter-reset">
<input type="submit" name="filtersubmit" id="filter_reset1" class="btn btn-success" value="filter">
<a href="<?php echo base_url() ?>admin/report-recent-transactions">
<button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
</form>
<!-- tab added -->
<!-- new divs added -->
<div class="tab-content">
<!-- new divs added -->
<div class="applicnts-list-wrap ">
<div class=" ">
<!-- changed ID -->
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>S.No</th>
<th>StudentID</th>
<th>Student Name</th>
<th>Course</th>
<th>Inovice No.</th>
<th>Payment Type</th>
<!-- <th>Scholarship / Discount</th>
<th>Fine</th> -->
<th>Amount</th>
<th>Paid Date</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$rowscount = (isset($student_fees) && !empty($student_fees)) ? count($student_fees) : 0;
if ($rowscount > 0) {
$sno = 1;
foreach ($student_fees as $ft_value) {
// echo '<pre>';
// print_r($ft_value);
?>
<tr>
<td><?= $sno; ?></td>
<td><?= $ft_value['studentId']; ?></td>
<td><?= $ft_value['name']; ?></td>
<td><?php
$course_id = $ft_value['course'];
echo $courseName = $this->db->get_where('course', array('id' => $course_id))->row()->course_name;
?></td>
<td>
<div class="applicn-date">
<?php
if ($school_info['invoice_prefix_status'] == 1 && !empty($ft_value['invoice_no']))
echo $school_info['invoice_prefix'] . $ft_value['invoice_no'];
else
echo $ft_value['invoice_no'];
// $ft_value['txn_id'];
?>
</div>
</td>
<td>
<?php
if ($ft_value['course_fee_id'] != 0)
$feeTypeName = $this->db->get_where('course_fees', array('id' => $ft_value['course_fee_id']))->row()->fee_values;
else
$feeTypeName = "-";
?>
<div class="applicant_nme"><?= $feeTypeName . '<br>(' . $ft_value['payment_for'] . ')'; ?></div>
</td>
<!-- <td><?= $ft_value['deduction_amount']; ?></td>
<td><?= $ft_value['fine_amount']; ?></td> -->
<td><?= $ft_value['payment_amt'] - $ft_value['deduction_amount'] + $ft_value['fine_amount']; ?></td>
<td>
<div class="date_width" title="<?= $ft_value['payment_date']; ?>"><?= $ft_value['payment_date']; ?>
</td>
<td><label><?= $ft_value['status']; ?></label></td>
<td>
<div class="sub_tabbtnsec">
<div class="sub_viewbtn" title="View"><a href="<?= base_url(); ?>admin/invoice/<?= urlsafe_b64encode($ft_value['studentId']) ?>/<?= urlsafe_b64encode($ft_value['txn_id']) ?>/<?= urlsafe_b64encode(0) ?> "><i class="fa fa-eye" aria-hidden="true"></i></a></div>
</div>
</td>
</tr>
<?php
$sno++;
}
} ?>
<tfoot>
<tr>
<th colspan="6" style="text-align:right">Total Fees:</th>
<th colspan="4"></th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
var currency_symbol = "<?php echo $currency_symbol; ?>";
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[100, -1],
[100, "All"]
],
"dom": 'lBfrtip',
"buttons": [{
extend: 'pdfHtml5',
// orientation: 'landscape',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8],
},
orientation: 'landscape',
pageSize: 'A4'
},
{
extend: 'csvHtml5',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8]
}
},
],
"footerCallback": function(row, data, start, end, display) {
var api = this.api(),
data;
// Remove the formatting to get integer data for summation
var intVal = function(i) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '') * 1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column(6)
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Total over this page
pageTotal = api
.column(6, {
page: 'current'
})
.data()
.reduce(function(a, b) {
return intVal(a) + intVal(b);
}, 0);
// Update footer
$(api.column(6).footer()).html(
currency_symbol + ' ' + pageTotal + ' ( ' + currency_symbol + ' ' + total + ' total )'
);
}
});
$('#tbl2').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl3').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
</script>
<script>
var graph_data = <?= json_encode($graph_data); ?>;
console.log(graph_data);
Highcharts.setOptions({
lang: {
drillUpText: '<< Back'
}
});
Highcharts.chart('recoveryGraf', {
chart: {
type: 'pie'
},
title: {
text: ''
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.name}: {point.y:.1f}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}</b> of total<br/>'
},
series: [{
name: 'Fee Report',
colorByPoint: true,
colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3'],
data: [
<?php
foreach ($graph_data as $v) {
echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
} ?>
]
}],
drilldown: {
series: [{
name: 'Recycleds',
id: 'Recycleds',
colors: ['#032da1', '#133ba7', '#2449ad', '#3557b3', '#4665ba', '#5773c0', '#6781c6', '#788fcd', '#899dd3'],
data: [
<?php
foreach ($graph_data as $v) {
echo "['" . $v['typename'] . "'," . $v['total'] . "],\n";
} ?>
]
}]
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,124 @@
<style>
.con-pass {
position: absolute;
top: 8px;
right: 8px;
cursor: pointer;
color: #878a8d;
}
.passwrd-icon {
top : 2px !important;
}
</style>
<div class="login-wrap">
<div class="login-box-cover-outter forget-box-cover-outter">
<div class="login-box-cover">
<div class="login-heading">
<h2>Erisn Classroom Admin Portal</h2>
</div>
<div class="login-box-cover">
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div class="login-box">
<h3>Reset your Password</h3>
<form method="post" action="<?php echo base_url() ?>/admin/reset_admin_password/<?php echo $encodedKey ?>" id="pwdForm">
<div class="login-row">
<input type="hidden" name="id" value="<?php echo $id ?>">
</div>
<div class="login-row">
<label class="login-lbl">
New Password*
</label>
<div class="password-wrp">
<input type="password" name="password" id="password" class="form-control" placeholder="Enter your password">
<span class="passwrd-icon icon-y"><i class="far fa-eye"></i></span>
</div>
<!-- <p class="loginErr">Please enter correct data</p> -->
</div>
<div class="login-row">
<label class="login-lbl">
Retype New Password*
</label>
<div class="password-wrp">
<input type="password" id="confirm-password" name="confirm_password" class=" form-control" placeholder="Enter your password">
<span class="con-pass icon-y eye-icon"><i class="far fa-eye"></i></span>
</div>
<!-- <p class="loginErr">Please enter correct data</p> -->
</div>
<!-- <p class="loginSuccess">Data verified successfully</p> -->
<div class="login-row">
<button class="common-btn">Submit</button>
</div>
</form>
<div class="backto-login">
<a href="<?php echo base_url() ?>admin"> &lt Back to login </a>
</div>
</div>
</div>
</div>
</div> </div>
<script>
jQuery.validator.addMethod("passwordregex", function(value, element) {
return this.optional( element ) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!#%*?&])[A-Za-z\d@$#!%*?&]{6,16}$/.test( value );
}, 'Your password must be atleast 6 characters long, which inculdes one upper case, one numerical value and one special character.');
$("#pwdForm").validate({
ignore: ":hidden",
rules: {
password: {
required: true,
minlength: 6,
maxlength: 16,
passwordregex:true
},
confirm_password : {
required : true,
minlength : 6,
equalTo : '#password'
}
},
messages: {
password : {
required : 'Please enter a valid password',
minlength : 'Password should be more than 6 characters',
maxlength : 'Password should not exceed 16 Characters'
},
confirm_password : {
required : 'Please re-enter your password',
equalTo : "Please enter the same password again."
},
},
submitHandler: function(form) {
form.submit();
}
});
</script>
<script>
$(".con-pass").click(function() {
$(".con-pass").toggleClass("eye-icon");
var input = $("#confirm-password");
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
</script>

View File

@ -0,0 +1,170 @@
<main class="wraper responsive-width" id="main">
<div class="from-group adding-class form-group_lng form-group_full-width ">
<a href="<?php echo base_url() . 'admin/roles/ae-role/0' ?>"><button type="button" class="btn btn-success btn-sm">Add New Role</button></a>
</div>
<!----admin template section---->
<div class="admin_tempblock form-group_full-width">
<div class="admin_tempsec">
<div class="admin_sec">
<form>
<div class="subsec_sec ">
<div class="subject_r subject_r_lng">
<div class="subject_lsec">
<div class="subject_lhead">Roles List</div>
<?php if($this->session->flashdata('success')) { ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('success') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('failed')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('failed') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
</div>
<div class="">
<table id="tbl" class="display table-responsive">
<thead>
<tr>
<th>Sl.No</th>
<th>Role</th>
<th>Permissions</th>
<th>Status</th>
<th>Created On</th>
<th>Modified On</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
foreach($result as $key => $value) {
$createdDate = date(MY_DATE_FORMAT, strtotime($value['created']));
$modifiedDate = $value['modified'] == null ? '-' : date(MY_DATE_FORMAT, strtotime($value['modified']));
$updated_menu_str = str_replace(',', ' OR id = ', $value['menu_ids']??'');
$where = 'id = '. $updated_menu_str;
$CI = &get_instance();
$CI->load->model('Admin_model');
$get_roles = $CI->Admin_model->get_table_info('admin_menu',$where);
$rolesArr = array_column($get_roles, 'menu_name');
$roles = implode('<br>', $rolesArr);
// $roles = count($rolesArr) == 19 ? 'All' : implode('<br>', $rolesArr);
?>
<tr>
<td><?php echo $key + 1 ?></td>
<td><?php echo ucfirst($value['role_name']) ?></td>
<td><?php echo $roles ?></td>
<td><?php echo ucfirst($value['status']) ?></td>
<td><?php echo $createdDate ?></td>
<td><?php echo $modifiedDate ?></td>
<td>
<div class="sub_tabbtnsec">
<div class="sub_editbtn"><a href="<?php echo base_url() ?>admin/roles/ae-role/<?php echo $value['id'] ?>"><i class="fas fa-pencil-alt"></i></a></div>
<?php
if($value['can_delete'] == 'Yes') { ?>
<a data-toggle="modal" onclick = "adminroledel(<?php echo $value['id'] ?>)" href="#deleteModal">
<div class="sub_delbtn" >
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a>
<?php } ?>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<div class="viewDoc delete-modal-wrap">
<div class="modal fade" id="deleteModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "btid" />
<h4>Are you sure?</h4>
<p><?php echo str_replace('%s', 'Role', THE_DELETE_ALERT_MSG) ?></p>
<div class="delete-modal-btn">
<a onclick="deletedata($('#btid').val());" class="text-white subject_addbtn subject_addbtn_red">Delete</a>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('.user-drpdown').click(function(){
$('.drpdown-items').toggle();
});
//table js
$('#tbl').DataTable( {
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
} );
//table js end
});
</script>
<script type="text/javascript">
function adminroledel(icn){
// alert(icn);
$('#btid').val(icn);
}
function deletedata(id){
let url = window.location.pathname.split( '/' );
let postUrl = url[1] +'/'+ url[2];
// console.log('admin/delete-section/'+postUrl + id);
window.location.replace('<?php echo base_url() ?>' + 'admin/delete_role/' + id);
}
</script>

View File

@ -0,0 +1,153 @@
<style>
.tooltip {
z-index: 1151 !important;
}
</style>
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"> Route Details : [ Batch - <?= $batch_name; ?>]</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<?php // echo $route_course_fee_id;
?>
<table>
<tbody>
<tr>
<th style="font-weight:600;"> Student Name: &nbsp;</th>
<td>&nbsp; <?= $student_info['name']; ?></td>
</tr>
<tr>
<th style="font-weight:600;">Student ID: &nbsp;</th>
<td>&nbsp; <?= $student_info['studentId']; ?></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-12">
<span class="text-danger" style="font-size:12px;" id="modalStudentPayment" data-payment-status='<?php echo ($payment_status) ? $payment_status : 0; ?>'>
<?php
echo $payment_status_msg = ($payment_status) ? "One or more payments are already done for the present selected route. SO, the route can not be updated now." : "";
?>
</span>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<table id="tbl1" cellspacing="0" width="100%">
<thead>
<tr>
<th width="5%">SNo</th>
<th width="10%">Select</th>
<th width="25%">Route Name</th>
<th width="25%">Stop Name</th>
<th width="15%">One Way</th>
<th width="25%">Fee</th>
<!-- <th>PickUp</th>
<th>Drop</th> -->
</tr>
</thead>
<tbody id="routes_body">
<?php
$sno = 1;
if (isset($route_data) && !empty($route_data)) {
// default one way is no.
$oneWay = 'no';
if ($student_assigned_route != null) {
// echo '<pre>';
// var_dump($student_assigned_route);
// Check if the one way is checked.
$oneWay = $student_assigned_route['one_way'];
}
foreach ($route_data as $value) {
$BTSdb = $this->load->database('erisnClassroom_bts', TRUE);
$pick_sele = $BTSdb->query('SELECT pick_up_id FROM bt_students_bus_route_details WHERE student_id=' . $student_info['id'] . ' and route_id=' . $value['route_id'] . ' order by id desc limit 1')->row_array();
$pick_sele = (isset($pick_sele['pick_up_id']) && !empty($pick_sele['pick_up_id'])) ? $pick_sele['pick_up_id'] : 0;
?>
<tr>
<td><?= $sno; ?></td>
<td>
<?php if ($value['route_fee'] != 0) {
$student_routeID = ($student_route_id > 0) ? $student_route_id : 0;
$student_route_checked = ($value['route_id'] == $student_routeID) ? "checked" : '';
$student_one_way_checked = ($oneWay == 'yes') ? "checked" : '';
$payment_status_disabled = ($payment_status) ? "data-toggle='tooltip' title='Payment partial or full installment paid'" : '';
// $payment_status_disabled = ($payment_status) ? "data-toggle='tooltip' title='Payment partial or full installment paid'" : '';
?>
<input type="radio" name="route_id" value="<?php echo $value['route_id']; ?>" <?= $payment_status_disabled; ?> <?= $student_route_checked; ?>>
<?php } else {
echo "<h5> - </h5>";
} ?>
</td>
<td><?php echo $value['route_name']; ?></td>
<td>
<select id="stop_name_<?php echo $value['route_id'] ?>" class="form-control stop_list" data-route_id="<?php echo $value['route_id']; ?>" placeholder="Select Stop Name" name="filter-Stop">
<option value="0"> Select Stop Name</option>
<?php if (isset($stop_list) || !empty($stop_list)) {
foreach ($stop_list[$value['route_id']] as $row) { ?>
<option value="<?php echo $row['stops_id'] ?>" <?php echo ($pick_sele == $row['stops_id']) ? 'selected' : ''; ?>>
<?php echo $row['place_name']; ?></option>
<?php }
} ?>
</select>
</td>
<td>
<!-- <?= $value['route_id'] ?>
<?= $student_route_id ?> -->
<input type="checkbox" name="isOneWay" value="<?php echo $value['route_id']; ?>" <?= $value['route_id'] == $student_route_id ? $student_one_way_checked : ''; ?>>
</td>
<td><?php if ($value['route_fee'] != 0)
echo $value['route_fee'];
else
echo "<p class='text-danger'>The fees is not yet created for this route.</p>";
?></td>
</tr>
<?php $sno++;
}
} ?>
</tbody>
</table>
<input type="hidden" id="s_course" name="s_course" class="form-control" value="<?= $student_info['course'] ?>" />
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('#tbl1').DataTable({
"autoWidth": false,
"lengthMenu": [
[25, 50, 100, 150, -1],
[25, 50, 100, 150, "All"]
]
});
});
</script>

Some files were not shown because too many files have changed in this diff Show More