?
Current Path : /home1/savoy/public_html/savoyglobal.net/koaladraft/application/views/master/ |
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/koaladraft/application/views/master/edit_course.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script type="text/javascript"> function checkcours_sub(val,rowid) { if(confirm('Are You Sure, You Want To Delete this subject ?')) { return $.ajax({ type: "GET", url: "<?= site_url() ?>/master/checkid/"+val, // async: false, success:function(data) { if(data == 0) { var row = document.getElementById(rowid); row.parentNode.removeChild(row); } else { alert('Subject has already been assigned!'); // return false; } } }); } else { return false; } } function checkcodeexistence(code) { $.ajax({ type: "POST", url: "<?=site_url()?>/master/checkcodeexistence/"+code, success: function(msg) { if(msg==1 && code != $("#course_code_old").val()) { alert("Course code already exists"); $("#course_code").val(''); } }}); } </script> <div class="icons_main"> <div class="icons"> <img src="<?= base_url() ?>assets/images/back.png" title="Back" class="clickimage" onclick="viewdata('master','viewinmastersearch','search_course','view_course','<?= $_SESSION['pagenum']; ?>')" alt="Back" align = "center" width="32" height="32" /> </div> <div class="icons_caption"> <h4>Updating new course Details</h4> </div> </div> <?php $attributes = array('id' => 'validateform', 'class' => 'validate'); echo form_open('master/addinmaster/update_course/view_course/1', $attributes); $subject = $this->mastermodel->getdatas('subject', 'subject_id'); $main_course=$this->mastermodel->getdatas('main_course','main_course_id'); ?> <div class="grid_6"> <div class="box"> <div class="header main"> Course Details</div> <div class="content no-padding"> <div class="section _100"> <label>Main Course Name </label> <div> <select name="main_course_id" id="main_course_id" class=" required chzn-done" > <option value=''>Select</option> <?php foreach($main_course as $list) { ?> <option value="<?=$list['main_course_id']?>" <?php if($list['main_course_id']==$viewinfo->main_course_id) { echo "selected"; } ?>><?=$list['main_course_name']?></option> <?php } ?> </select> </div> </div> <div class="section _100"> <label>Course Code </label> <div> <label><input name="course_code" onchange="checkcodeexistence(this.value)" id="course_code" class="required" value="<?= $viewinfo->course_code; ?> "/></label> <input type="hidden" id="course_code_old" value="<?=$viewinfo->course_code;?>"/> </div> </div> <div class="section _100"> <label>Course Name </label> <div> <input name="course_name" id="course_name" class="required" value="<?= $viewinfo->course_name; ?>"/> </div> </div> <div class="section _100"> <label> Duration of Course </label> <div> <input name="duration" id="duration" value="<?= $viewinfo->duration; ?>" /> </div> </div> <div class="section _100"> <label> Registration Fee</label> <div> <input name="fee" id="fee" value="<?= $viewinfo->fee; ?>" /> </div> </div> <div class="section _100"> <label>Course Fee</label> <div> <input name="course_fee" id="course_fee" value="<?= $viewinfo->course_fee; ?>" class="required" /> </div> </div> <div class="section _100"> <label>Books Fee</label> <div> <input name="books_fee" id="books_fee" type="text" class="number required" value="<?= $viewinfo->books_fee; ?>" /> </div> </div> </div> </div> </div> <div class="grid_6"> <div class="box"> <div class="content no-padding"> <div class="header main"> Subjects</div> <table class="table"> <tr> <th>Subject</th> <th>Remove</th> </tr> <?php if (!empty($details)) { $i = 1; foreach ($details as $row) { ?> <tr id="row_added_<?=$i?>"> <td> <input type="hidden" name="subject_id" id="subject_id" value="<?=$row['subject_id'];?>"/> <?=$this->mastermodel->get_single_field_value('subject','subject_name','subject_id',$row['subject_id']);?> </td> <td> <img style="float: right; vertical-align: top;"src="<?= base_url() ?>assets/images/delete-icon.png" alt="Delete Row" class="delRowNew clickimage" id="delt<?=$i?>" title="Delete Row" onclick="checkcours_sub(<?= $row['id']; ?>,'row_added_<?=$i?>')" data-id ="<?= $row['id']; ?>" /> </td> </tr> <?php $i++; } } ?> </table> </div> </div> </div> <div class="grid_6"> <div class="box"> <div class="content no-padding"> <div class="header main"> Add More Subjects</div> <table class="table"> <tr> <th>Subjects</th> <th><input type="button" id="button2" value="Add More" class="addRow" title="Add Row" style="width:75px;"/></th> </tr> <tr> <td> <select name="subject_id" id="subject_id" class="chzn-done" > <option value=''>Select</option> <?php foreach($subject as $list) { ?> <option value="<?=$list['subject_id']?>"><?=$list['subject_name']?></option> <?php } ?> </select> </td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> </table> </div> </div> </div> <div class="grid_6"> <div class="box"> <div class="content no-padding"> <div class="header main"> Fees structure</div> <table class="table"> <tr> <th>No of sessions</th> <th>Monthly Fee</th> <th><input type="button" id="button2" value="Add More" class="addRow" title="Add Row" style="width:75px;"/></th> </tr> <?php $i=1; $fee=$this->mastermodel->get_data('course_fee_structure',$viewinfo->course_id,'course_id'); foreach ($fee as $row) { ?> <tr> <td> <select name="no_sessions" id="no_sessions" class="chzn-done" style="width: 61;height: 19;"> <option value="">Select</option> <?php $sessions=$this->mastermodel->getdatas('no_sessions','no_sessions'); foreach($sessions as $list) { ?> <option value="<?=$list['no_sessions_id'];?>" <?php if($list['no_sessions_id']==$row['no_sessions_id']) { echo "selected"; } ?>><?=$list['no_sessions'];?></option> <?php } ?> </select> </td> <td> <input name="monthly_fee" id="monthly_fee" type="text" class="number" value="<?=$row['monthly_fee']?>" /> </td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> <?php $i++; } ?> <tr> <td> <select name="no_sessions" id="no_sessions" class="chzn-done" style="width: 61;height: 19;"> <option value="">Select</option> <?php $sessions=$this->mastermodel->getdatas('no_sessions','no_sessions'); foreach($sessions as $list) { ?> <option value="<?=$list['no_sessions_id'];?>"><?=$list['no_sessions'];?></option> <?php } ?> </select> </td> <td> <input name="monthly_fee" id="monthly_fee" type="text" class="number" /> </td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> </table> </div> </div> </div> <div class="grid_12"> <div class="box"> <div class="actions"> <div class="actions-left"> <input type="reset"> <input type="hidden" name="resfunction" value="search_course"/> <input type="hidden" name="course_id" value="<?= $viewinfo->course_id; ?>"/> </div> <div class="actions-right"> <button type="submit" id="submit" class="clickimage" onclick="addformdata('validateform')">Save</button> </div> </div> </div> </div> <?php echo form_close(); ?>