?
Current Path : /home1/savoy/public_html/savoyglobal.net/cocorico/application/views/student/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/cocorico/application/views/student/add_student_class.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $stud = array(0); $index = 0; ?> <script src="<?= base_url() ?>assets/scripts/jquery.autocomplete.js"></script> <script type="text/javascript"> function suggestStudent(divid) { $(divid).autocomplete("<?= site_url() ?>/master/autosuggeststudent/", { width: 250, selectFirst: false }); } $(document).ready(function() { $("#stud").css('display', "none"); suggestStudent('#student'); }); function getFeeParticularAmount(fee_details_id,payment_type,index){ $('#first_month_div_'+index).hide(); $('#first_actual_month_div_'+index).hide(); $('#pay_amount_'+index).show(); $.ajax({ type: "POST", dataType:"json", url: "<?= site_url() ?>/student/get_fee_details/"+fee_details_id+"/"+payment_type, success: function(msg) { if(payment_type=="monthly"){ $('#first_month_div_'+index).show(); $('#first_actual_month_div_'+index).show(); $('#pay_amount_'+index).hide(); $('#actual_pay_amount_'+index).hide(); $('.pay_amount'+index).val(msg); $('.actual_pay_amount_'+index).val(msg); $('#pay_amount_'+index).val(0); $('#actual_pay_amount_'+index).val(msg); // $('.calfocus').datepick({dateFormat: 'dd-mm-yyyy'}); } else{ $('#first_month_div_'+index).hide(); $('#first_actual_month_div_'+index).hide(); $('#pay_amount_'+index).show(); $('#actual_pay_amount_'+index).show(); $('.pay_amount'+index).val(0); $('.actual_pay_amount_'+index).val(0); $('#pay_amount_'+index).val(msg); $('#actual_pay_amount_'+index).val(msg); } } }); } function getSessionAmount(session,divid){ var res = session.split("~"); $('#'+divid).val(res[1]); } function load_student_fee_details() { var term_id = $('#term_id').val(); var session_id = $('#session_id').val(); var student_id = $('#student_id').val(); var no_sessions= $('#fee_term_no_of_days').val(); if(student_id == "" || session_id=="" || term_id=="") { alert("Please select Student, Tem, Session First.."); } else if(no_sessions==""){ alert("Plaese select no of days."); } else { // var flag=0; // var students=$('#list_stud_id').val(); // alert(students); // $.each( students.split(','), function( key, list_student ) { // if(term_id+"_"+student_id==list_student){ // flag=1; // } // }); // var index=$('#student_added tr').length+1; $.ajax({ type: "POST", dataType:"json", url: "<?= site_url('student/check_student_already_allocated/') ?>/"+term_id+"/"+session_id+"/"+<?=$id?>+"/"+student_id, success: function(data) { if(data != "") { alert('Student is Already added'); } else { $("#stud_fee_details").empty().html('<CENTER><img src="<?= base_url() ?>assets/img/loading.gif" class="loading"/></CENTER>'); $("#stud_fee_details").load("<?= site_url() ?>/student/load_student_fee_details/"+<?= $class_details->class_name_id ?>+"/"+student_id+"/"+<?= $class_details->class_name_academic_year_id ?>+"/"+no_sessions+"/"+term_id+"/"+session_id); $("#stud").css('display', "block"); } } }); // if(flag==1) // { // alert('Student is Already added'); // } // else // { // $("#stud_fee_details").empty().html('<CENTER><img src="<?= base_url() ?>assets/img/loading.gif" class="loading"/></CENTER>'); // $("#stud_fee_details").load("<?= site_url() ?>/student/load_student_fee_details/"+<?= $class_details->class_name_id ?>+"/"+student_id+"/"+<?= $class_details->class_name_academic_year_id ?>+"/"+no_sessions+"/"+term_id+"/"+session_id); // $("#stud").css('display', "block"); // } } } function checkallstd(status,tag) { $('#'+tag+ ' input').each(function(index,obj){ if(obj.type === 'checkbox') { obj.checked = !status; } }); } </script> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Class Allocation</div> <div class="tools"> <a href="#" onclick="viewdata('student','viewinstudentsearch','search_student_class','view_student_class','<?= $_SESSION['pagenum']; ?>')" class="remove"></a> </div> </div> <div class="portlet-body form" style="overflow: visible;"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate', 'onsubmit' => 'return Checkfiles();'); echo form_open('student/addinstudent/insert_student_class/view_student_class/1', $attributes); ?> <h3 class="form-section">Class Details</h3> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Class Code</label> <div class="controls"> <span class="text bold"><?= $class_details->class_name_code; ?></span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Class Room Name</label> <div class="controls"> <span class="text bold"><?= $class_details->class_room_name; ?></span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Term</label> <div class="controls"> <select onchange="load_allocated_students()" class="chosen span12 required" name="term_id" id="term_id"> <option value="">Select</option> <?php $term = $this->mastermodel->search_term(); foreach ($term['results']->result_array() as $list) { ?> <option value="<?= $list['term_id'] ?>"><?= $list['term_name'] ?></option> <?php } ?> </select> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Session</label> <div class="controls"> <select onchange="load_allocated_students()" class="chosen span12 required" name="session_id" id="session_id"> <option value="">Select</option> <?php $term = $this->mastermodel->search_session(); foreach ($term['results']->result_array() as $list) { ?> <option value="<?= $list['session_id'] ?>"><?= $list['session_name'] ?></option> <?php } ?> </select> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Academic Year</label> <div class="controls"> <span class="text bold"><?= $this->mastermodel->get_single_field_value('academic_year', 'display_name', 'academic_year_id', $class_details->class_name_academic_year_id); ?></span> </div> </div> </div> </div> <input type="hidden" name="class_name_id" id="class_name_id" value="<?= $class_details->class_name_id; ?>"/> <div class="row-fluid portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Add Student To <?= $class_details->class_name_code; ?></div> </div> <div class="portlet-body form" style="overflow: visible;"> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Student</label> <div class="controls"> <input type="text" name="student" id="student" value=''placeholder="Select Student" class="reset span12" /> <input type="hidden" name="student_id" id="student_id" class="reset" /> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">No Of Days</label> <div class="controls"> <?php $no_of_days = $this->mastermodel->getdatas('no_sessions'); ?> <select id="fee_term_no_of_days" name="fee_term_no_of_days" class="chosen valid required span12" onchange="empty('#stud_fee_details')"> <?php foreach ($no_of_days as $list) { echo '<option value="' . $list['no_sessions'] . '">' . $list['no_sessions'] . '</option>'; } ?> </select> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Date of Allotment</label> <div class="controls"> <!--<input id="admission_date" type="text" name="admission_date" class="calfocus span12" value="<?= date("d-m-Y"); ?>"/>--> <input type="text" name="class_allocation_date" id="class_allocation_date" class="calfocus span12" value="<?= date('d-m-Y') ?>"/> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label"></label> <div class="controls"> <input type="button" onclick="load_student_fee_details()" value="Load Fee Details " style="border: 1px solid #14526F;background-color: #71B4D3;color: white;padding: 5px;width: 200px;text-align: center;margin: 0 auto;margin-top: 10px;"/> </div> </div> </div> </div> <div id="stud_fee_details" style="width: 100%;text-align: center;"> </div> </div> </div> <h3 class="form-section"><?= $class_details->class_name_code; ?></h3> <div class="allocated_student"></div> <input type="hidden" value="<?= implode(',', $stud) ?>" name="list_stud_id" id="list_stud_id" /> <div class="form-actions" id="sub"> <button type="submit" class="btn blue" onclick="addformdata('validateform')"><i class="icon-ok"></i> Save</button> <button type="button" onclick="viewdata('student','viewinstudentsearch','search_student_class','view_student_class','<?= $_SESSION['pagenum']; ?>')" class="btn">Cancel</button> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div> <script> function load_allocated_students() { var term_id = $('#term_id').val(); var session_id = $('#session_id').val(); if(term_id) { if(session_id) { $.ajax({ type: "POST", // dataType:"json", url: "<?= site_url('student/get_allocated_students/') ?>/"+term_id+"/"+session_id+"/"+<?=$id?>, success: function(data) { $('.allocated_student').html(data); // alert(data); } }); } else { alert("Please Select a Session"); } } else { alert("Please Select a Term"); } // alert(term_id) // alert(session_id) } </script>