?
Current Path : /home1/savoy/public_html/savoyglobal.net/sec/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/sec/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="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>Updating new course Details</div> <div class="tools"> <a href="#" onclick="viewdata('master','viewinmastersearch','search_course','view_course','<?= $_SESSION['pagenum']; ?>')" class="remove"></a> </div> </div> <div class="portlet-body form"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal 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'); ?> <h3 class="form-section">Course Details</h3> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label">Main Course Name </label> <div class="controls"> <select name="main_course_id" id="main_course_id" class="required chosen span12" > <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> <div class="span6"> <div class="control-group"> <label class="control-label">Course Code</label> <div class="controls"> <input name="course_code" onchange="checkcodeexistence(this.value)" id="course_code" class="m-wrap span12 required" value="<?= $viewinfo->course_code; ?> "/> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label">Course Name</label> <div class="controls"> <input name="course_name" id="course_name" class="m-wrap span12 required" value="<?= $viewinfo->course_name; ?>"/> </div> </div> </div> <div class="span6"> <div class="control-group"> <label class="control-label">Duration of Course</label> <div class="controls"> <input name="duration" id="duration" type="text" class="m-wrap span12" value="<?= $viewinfo->duration; ?>" /> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label">Registration Fee</label> <div class="controls"> <input name="fee" id="fee" type="text" class="m-wrap span12 " value="<?= $viewinfo->fee; ?>" /> </div> </div> </div> <div class="span6"> <div class="control-group"> <label class="control-label">Course Fee</label> <div class="controls"> <input name="course_fee" id="course_fee" type="text" class="number required m-wrap span12 " value="<?= $viewinfo->course_fee; ?>" /> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label">Books Fee</label> <div class="controls"> <input name="books_fee" id="books_fee" type="text" class="number required m-wrap span12" value="<?= $viewinfo->books_fee; ?>" /> </div> </div> </div> </div> <h3 class="form-section">Subjects</h3> <table class="table table-striped table-hover table-bordered" id="sample_3" style="background-color: white;"> <tr> <th>Subjects</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> <a href="#" onclick="checkcours_sub(<?= $row['id']; ?>,'row_added_<?= $i ?>')" id="delt<?= $i ?>">Remove</a> </td> </tr> <?php $i++; } } ?> </table> <h3 class="form-section">Add More Subjects</h3> <table class="table table-striped table-hover table-bordered" id="sample_3" style="background-color: white;"> <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="m-wrap span12 chosen" > <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/img/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> </table> <h3 class="form-section">Fees structure</h3> <table class="table table-striped table-hover table-bordered" id="sample_3" style="background-color: white;"> <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="m-wrap span12 chosen" style="width:200px;"> <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 m-wrap span6 " value="<?= $row['monthly_fee'] ?>" /> </td> <td> <img style="float: right; vertical-align: top;"src="<?= base_url() ?>assets/img/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="m-wrap span12 chosen" style="width:200px;"> <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 m-wrap span6" /> </td> <td> <img style="float: right; vertical-align: top;"src="<?= base_url() ?>assets/img/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> </table> <div class="form-actions"> <input type="hidden" name="tab_name" value="course"/> <input type="hidden" name="resfunction" value="search_course"/> <input type="hidden" name="course_id" value="<?= $viewinfo->course_id ?>"/> <button type="submit" onclick="addformdata('validateform')" class="btn blue"><i class="icon-ok"></i> Save</button> <button type="button" onclick="viewdata('master','viewinmastersearch','search_course','view_course','<?= $_SESSION['pagenum']; ?>')" class="btn">Cancel</button> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div>