?
Current Path : /home1/savoy/public_html/savoyglobal.net/eduplus1/application/views/examination/ |
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/eduplus1/application/views/examination/edit_subject.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script> function delete_subject(subject_id,row_id) { if (confirm("Are you sure you want to delete this subjectt?")) { $.ajax({ type: "POST", url: "<?= site_url() ?>"+'/examination/delete_subject/'+subject_id, success: function(msg) { if(msg==1) { $('#'+row_id) .hide(); } else { alert("Marks already assigned for subject in Evaluation. Cannot be deleted"); } } });} } </script> <div class="icons_main"> <div class="icons"> <img src="<?=base_url()?>assets/images/back.png" title="Back" class="clickimage" onclick="viewdata('examination','viewinexaminationsearch','search_subject','view_subject','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="32" height="32" /> </div> <div class="icons_caption"> <h4>Updating Subject Details</h4> </div> </div> <?php $attributes=array('id'=>'validateform','class'=>'validate'); echo form_open('examination/addinexamination/update_subject/view_subject/1',$attributes); ?> <div class="grid_6"> <div class="box"> <div class="header"> <span></span> </div> <div class="content no-padding"> <div class="section _100"> <label>Class Room Name </label> <div class="single_page"> <?= $viewinfo->class_room_name; ?> </div> </div> </div> </div> </div> <div class="grid_6" > <div class="box"> <div class="content no-padding"> <div class="header main">Subject Details</div> <?php $subjects= $this->mastermodel->get_data('subject', $viewinfo->class_room_id, 'class_room_id'); if(!empty($subjects)) { $i=0; ?> <table class="table" id="student_tb"> <tr> <th>Subject Code</th> <th>Subject Name</th> <th>Delete</th> </tr> <?php foreach ($subjects as $value) { $i++; ?> <tr id="<?=$i?>"> <td> <input type="text" value="<?= $value['subject_code'] ?>" name="subject_code<?=$i?>" id="subject_code<?=$i?>" class="required medium1" /> <input type="hidden" value="<?=$value['subject_id']?>" name="subject_id<?=$i?>" id="subject_id<?=$i?>"/> </td> <td> <input type="text" value="<?= $value['subject_name'] ?>" name="subject_name<?=$i?>" id="subject_name<?=$i?>" class="required medium1" /> </td> <td> <a href="#" onclick="delete_subject('<?=$value['subject_id']?>','<?=$i;?>')"> <img style="float: right; vertical-align: top;"src="<?= base_url() ?>assets/images/delete-icon.png" alt="Delete" class="clickimage" title="Delete"/> </a> </td> </tr> <?php } } ?> </table> <table class="table"> <tr> <th>Subject Code</th> <th>Subject Name</th> <th><input type="button" id="button2" value="Add More" class="addRow" title="Add Row" style="width:65px;"/></th> </tr> <tr> <td> <input type="text" name="subject_code_new" id="subject_code_new" class="medium1" /> </td> <td> <input type="text" name="subject_name_new" id="subject_name_new" class="medium1" /> </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="tab_name" value="subject"/> <input type="hidden" name="class_room_id" value="<?= $viewinfo->class_room_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();?>