?
Current Path : /home1/savoy/public_html/savoyglobal.net/simsdemo/school/application/views/Teacher/ |
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/simsdemo/school/application/views/Teacher/editteacher.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $profile_details = $this->mastermodel->get_data('user_profiles','Teacher','profile_user_type') ?> <script language="javascript" type="text/javascript"> jQuery(document).ready(function() { suggestsubject(); }); function splitcode(subval) { var a = subval.split('#'); $('#class_code').val(a[1]); $('#subject').val(a[0]); } function Removetr(obj) { if($('#sub_table tr').length > 2) $(obj).closest('tr').remove(); } function AddSubjectRow(rowid) { var trcount=$('#trcount').val(); var row = $('#prow1').clone(true); row.attr("id",'prow'+trcount); row.insertAfter('#subjinfodet>tr:last'); $("td:eq(0) input", row).attr("id", "subname_"+$('#trcount').val()); $("td:eq(0) input", row).attr("name", "subject[]"); $("td:eq(1) input", row).attr("id", "subid_"+$('#trcount').val()); $("td:eq(1) input", row).attr("name", "subject_id[]"); $("td:eq(2) input", row).attr("id", "subcode_"+$('#trcount').val()); $("td:eq(2) input", row).attr("name", "subject_code[]"); $("td:eq(0) input", $('#prow1')).attr("value", ""); $("td:eq(1) input", $('#prow1')).attr("value", ""); $("td:eq(2) input", $('#prow1')).attr("value", ""); trcount++; $('input#trcount').val(trcount); } </script> <span class="section_content_top"></span> <div class="section_content_inner"> <?php $this->load->view('documentreadyfunctions'); $attributes=array('class'=>'search_form','id'=>'validateform'); echo form_open('teacher/addinteacher/updateteacher/viewteacher/1/',$attributes); ?> <input type="hidden" value="<?=$teacher->teacher_id;?>" name="masterid"/> <!--[if !IE]>start fieldset<![endif]--> <fieldset> <!--[if !IE]>start forms<![endif]--> <div class="forms"> <div class="backicon"> <a href="#" onclick="viewdata('teacher','viewinteachersearch','searchteacher','viewteacher','<?=$_SESSION['pagenum'];?>')"> <img src="<?=base_url()?>assets/images/backicon.png" alt="back-icon" title="Back"/> </a> </div> <h3>Update Teacher</h3> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Teacher No</label> <div class="inputs"> <span class="input_wrapper"><input class="text required" readonly name="teacher_no" id="teacher_no" type="text" value="<?=$teacher->teacher_no;?>"/></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>First Name</label> <div class="inputs"> <span class="input_wrapper"><input class="text required" name="first_name" id="first_name" type="text" value="<?=$teacher->first_name;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Last Name</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="last_name" id="last_name" type="text" value="<?=$teacher->last_name;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Gender</label> <div class="inputs"> <ul> <li><input class="radio" name="gender" id="gender" type="radio" value="male" <?php if($teacher->gender=='male'){ ?>checked<?php } ?> />Male</li> <li><input class="radio" name="gender" id="gender" type="radio" value="female" <?php if($teacher->gender=='female') { ?>checked<?php } ?> /> Female</li> </ul> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Email</label> <div class="inputs"> <span class="input_wrapper"><input class="text email" name="email" id="email" type="text" value="<?=$teacher->email;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Contact No</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="contact_no" id="contact_no" type="text" value="<?=$teacher->contact_no;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Mobile No</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="mobile_no" id="mobile_no" type="text" value="<?=$teacher->mobile_no;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Passport No</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="passport_no" id="passport_no" type="text" value="<?=$teacher->passport_no;?>"/></span> </div> </div> <!--[if !IE]>end row<![endif]--> </div> </fieldset> <!-- [if !IE]>end fieldset<![endif]--> <fieldset> <!-- [if !IE]>start table_wrapper<![endif]--> <input type="hidden" name="trcount" id="trcount" value="2"/> <h3>Select Subject</h3> <div class="table_wrapper"> <div class="table_wrapper_inner"> <table id="sub_table" cellpadding="0" cellspacing="0" width="70%"> <tbody id="subjinfodet"> <tr> <th><span>Subject Name</span></th> <th style="display:none"><span>Subject id</span></th> <th><span>Class</span></th> <th><span> <img src="<?=base_url()?>assets/images/add-icon.png" title="Delete Row" width="20" height="20" alt="Delete" align = "center" class="clickimage" onclick=" AddSubjectRow('1')" alt="" /></span></th> </tr> <tr id="prow1"> <td> <input type="text" class="subject" value="" onblur="splitcode(this.value)" class="text" name="subject" id="subject" /> </td> <td style="display:none"> <input type="text" name="subject_id" id="subject_id" value="" /> </td> <td> <input type="text" readonly name="class_code" id="class_code" /> </td> <td> <div class="fronticons"> <img src="<?=base_url()?>assets/images/delete_icon.png" title="Delete Row" width="20" height="20" alt="Delete" align = "center" class="clickimage" onclick=" Removetr(this)" alt="" /> </div> </td> </tr> <?php $i=1; foreach ($teacher_subject as $row) { $i++; ?> <tr id="<?=$i;?>"> <td><?=$row['subject_name'];?></td> <td><?=$row['classlevel_code'];?> <input type="hidden" name="subject_id[]" value="<?=$row['subject_id'];?>"/> </td> <td> <img src="<?=base_url()?>assets/images/delete_icon.png" title="Remove Student" class="clickimage" onclick="$('#<?=$i;?>').remove();"/> </td> </tr> <?php } ?> </tbody></table> </div> <!--<fieldset> [if !IE]>start table_wrapper<![endif] <input type="hidden" name="trcount" id="trcount" value="2"/> <h3>Select Subject</h3> <div class="table_wrapper"> <div class="table_wrapper_inner"> <table id="sub_table" cellpadding="0" cellspacing="0" width="70%"> <tbody id="subjinfodet"> <tr> <th><span>Subject Name</span></th> <th style="display:none"><span>Subject id</span></th> <th><span>Class</span></th> <th><span> <img src="<?=base_url()?>assets/images/add-icon.png" title="Delete Row" width="20" height="20" alt="Delete" align = "center" class="clickimage" onclick=" AddSubjectRow('1')" alt="" /></span></th> </tr> <tr id="prow1"> <td> <input type="text" class="subject" value="" onblur="splitcode(this.value)" class="text" name="subject" id="subject" /> </td> <td style="display:none"> <input type="text" name="subject_id" id="subject_id" value="" /> </td> <td> <input type="text" readonly name="class_code" id="class_code" /> </td> <td> <div class="fronticons"> <img src="<?=base_url()?>assets/images/delete_icon.png" title="Delete Row" width="20" height="20" alt="Delete" align = "center" class="clickimage" onclick=" Removetr(this)" alt="" /> </div> </td> </tr> </tbody> </table> </div> </div> </fieldset>--> <!--[if !IE]>end table_wrapper<![endif]--> </div> </fieldset> <!--[if !IE]>start fieldset<![endif]--> <fieldset> <!--[if !IE]>start forms<![endif]--> <div class="forms"> <h3>Teacher Address</h3> <div class="row" <label>Permanent Address</label> <div class="inputs"> <textarea name="address_permanent" id="address_permanent"><?=$address->address_permanent;?></textarea> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Permanent Country</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="country_permanent" id="country_permanent" type="text" value="<?=$address->country_permanent;?>" /></span> </div> </div> <div class="row" <label>Present Address</label> <div class="inputs"> <textarea name="address_present" id="address_present"><?=$address->address_present;?></textarea> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Present Country</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="country_present" id="country_present" type="text" value="<?=$address->country_present;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> </div> </fieldset><br/> <!--[if !IE]>end forms<![endif]--> <fieldset> <div class="forms"> <h3>Teacher Qualification</h3> <div class="table_wrapper"> <div class="table_wrapper_inner"> <table cellpadding="0" cellspacing="0" width="100%"> <thead> <tr> <span><th colspan="3"><input type="button" id="button2" value="Add More" class="addRow" title="Add Row"/></th></span> </tr> <tr> <th>Course</th> <th>University</th> <th>Passing Year</th> <th style="width:10%">Actions</th> </tr> </thead> <tbody> <?php $i=1; foreach($teacher_qualification as $qual) { ?> <tr> <td><input type="text" name="course<?$i?>" value="<?=$qual['course']?>" id="course<?$i?>"/></td> <td><input type="text" name="university<?$i?>" value="<?=$qual['university']?>" id="university<?$i?>"/></td> <td><input type="text" name="passing_year<?$i?>" value="<?=$qual['passing_year']?>" id="passing_year<?$i?>"/></td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>/assets/images/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/></td> </tr> <?php $i++; } ?> <tr> <td><input type="text" name="course<?$i?>" id="course<?$i?>"/></td> <td><input type="text" name="university<?$i?>" id="university<?$i?>"/></td> <td><input type="text" name="passing_year<?$i?>" id="passing_year<?$i?>"/></td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>/assets/images/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/></td> </tr> </tbody> </table> </div> </div> </div> </fieldset><br/> <!--[if !IE]>start fieldset<![endif]--> <fieldset> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start forms<![endif]--> <div class="forms"> <h3>Teacher Work Experience</h3> <div class="table_wrapper"> <div class="table_wrapper_inner"> <table cellpadding="0" cellspacing="0" width="100%"> <thead> <tr> <span><th colspan="3"><input type="button" id="button2" value="Add More" class="addRow" title="Add Row"/></th></span> </tr> <tr> <th>Employer</th> <th>Designation</th> <th>Period</th> <th style="width:10%">Actions</th> </tr> </thead> <tbody> <?php $i=1; foreach($teacher_work_experience as $qual) { ?> <tr> <td><input type="text" name="employer<?$i?>" value="<?=$qual['employer']?>" id="employer<?$i?>"/></td> <td><input type="text" name="designation<?$i?>" value="<?=$qual['designation']?>" id="designation<?$i?>"/></td> <td><input type="text" name="period<?$i?>" value="<?=$qual['period']?>" id="period<?$i?>"/></td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>/assets/images/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/></td> </tr> <?php $i++; } ?> <tr> <td><input type="text" name="employer<?$i?>" id="employer<?$i?>"/></td> <td><input type="text" name="designation<?$i?>" id="designation<?$i?>"/></td> <td><input type="text" name="period<?$i?>" id="period<?$i?>"/></td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>/assets/images/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/></td> </tr> </tbody> </table> </div> </div> </div> </fieldset> <!--[if !IE]>start fieldset<![endif]--> <fieldset><br/> <!--[if !IE]>end row<![endif]--> <div class="forms"> <?php $num=$this->mastermodel->get_data_srow('user',$teacher->teacher_id,'linkedto_id'); if(count($num)==0) { ?> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Create User?</label> <div class="inputs"> <input type="checkbox" name="create_user" onchange="showhideuser(this)"/> </div> </div> <!--[if !IE]>end row<![endif]--> <div style="display:none;" id="createuser"> <div class="row"> <label>Username</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="username" id="username" type="text" onchange="checkexistence('user','username',this.value)" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Password</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="password" id="password" type="password" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Confirm Password</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="password1" id="password1" type="password" onchange="checkpassword('password','password1')" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Select Profile</label> <div class="inputs"> <span class="input_wrapper select_wrapper"> <select name="profile_id" id="profile_id" class="" > <?php foreach ($profile_details as $row) { ?> <option value="<?=$row['profile_id']?>"><?=$row['name']?></option> <?php } ?> </select> </span> </div> </div> <!--[if !IE]>end row<![endif]--> </div> <?php } else { ?> <div class="row"> <label>Username</label> <div class="inputs"> <span class="input_wrapper"><input class="text required" value="<?=$num->username;?>" name="username" id="username" type="text" onchange="checkexistence('user','username',this.value)" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Password</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="password" id="password" type="password" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Select Profile</label> <div class="inputs"> <span class="input_wrapper select_wrapper"> <select name="profile_id" id="profile_id" class="required" > <?php foreach ($profile_details as $row) { ?> <option value="<?=$row['profile_id']?>"<?php if($row['profile_id']==$num->profile_id){echo "selected";}?>><?=$row['name']?></option> <?php } ?> </select> </span> </div> </div> <?php } ?> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <div class="inputs"> <input type="hidden" name="tab_name" value="teacher"/> <span class="button blue_button search_button" onclick="addformdata('validateform')"><span><span><em>Update Teacher</em></span></span><input name="" type="submit" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> </div> <!--[if !IE]>end forms<![endif]--> </fieldset> <!--[if !IE]>end fieldset<![endif]--> <?php echo form_close(); ?> </div> <span class="section_content_bottom"></span>