?
Current Path : /home1/savoy/public_html/savoyglobal.net/simsdemo/school/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/simsdemo/school/application/views/Student/editparent.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $profile_details = $this->mastermodel->get_data('user_profiles','Parent','profile_user_type'); ?> <script language="javascript" type="text/javascript"> jQuery(document).ready(function() { suggeststudents(); }); function splitcode(subval) { var a = subval.split('#'); $('#class_code').val(a[1]); $('#students').val(a[0]); } function Removetr(obj) { if($('#stud_table tr').length > 2) $(obj).closest('tr').remove(); } function AddStudentRow(rowid) { var trcount=$('#trcount').val(); var row = $('#prow1').clone(true); row.attr("id",'prow'+trcount); row.insertAfter('#studinfodet>tr:last'); $("td:eq(0) input", row).attr("id", "studname_"+$('#trcount').val()); $("td:eq(0) input", row).attr("name", "student[]"); $("td:eq(1) input", row).attr("id", "studid_"+$('#trcount').val()); $("td:eq(1) input", row).attr("name", "student_id[]"); $("td:eq(2) input", row).attr("id", "classcode_"+$('#trcount').val()); $("td:eq(2) input", row).attr("name", "class_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 $attributes=array('class'=>'search_form','id'=>'validateform'); echo form_open('student/addinstudent/updateparent/viewparent/1/',$attributes); ?> <!--[if !IE]>start fieldset<![endif]--> <fieldset> <!--[if !IE]>start forms<![endif]--> <div class="forms"> <div class="backicon"> <a href="#" onclick="viewdata('student','viewinstudentsearch','searchparent','viewparent','<?=$_SESSION['pagenum'];?>')";> <img src="<?=base_url()?>assets/images/backicon.png" alt="back-icon" title="Back"/> </a> </div> <h3>Update Parent</h3> <input type="hidden" name="masterid" value="<?=$parent->parent_id;?>"/> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Name</label> <div class="inputs"> <span class="input_wrapper"><input class="text required" name="name" id="name" type="text" value="<?=$parent->name;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Relationship Type</label> <div class="inputs"> <ul> <li><input class="radio" name="relationship_type" id="relationship_type" type="radio" value="father" <?php if($parent->relationship_type=='father'){ ?>checked<?php } ?> />Father</li> <li><input class="radio" name="relationship_type" id="relationship_type" type="radio" value="mother" <?php if($parent->relationship_type=='mother'){ ?>checked<?php } ?> /> Mother</li> <li><input class="radio" name="relationship_type" id="relationship_type" type="radio" value="guardian" <?php if($parent->relationship_type=='guardian'){ ?>checked<?php } ?> /> Guardian</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="<?=$parent->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="<?=$parent->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="<?=$parent->mobile_no;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Profession</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="profession" id="profession" type="text" value="<?=$parent->profession;?>" /></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 Student</h3> <div class="table_wrapper"> <div class="table_wrapper_inner"> <table id="stud_table" cellpadding="0" cellspacing="0" width="70%"> <tbody id="studinfodet"> <tr> <th><span>Student Name</span></th> <th><span>Class</span></th> <th><span> <img src="<?=base_url()?>assets/images/add-icon.png" title="Add Row" width="20" height="20" alt="Add" align = "center" class="clickimage" onclick=" AddStudentRow('1')" alt="" /></span></th> </tr> <tr id="prow1"> <td> <input type="text" class="student" value="" onblur="splitcode(this.value)" class="text" name="students" id="students" /> </td> <td style="display:none"> <input type="text" name="students_id" id="students_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 ($parent_student as $row) { $i++; $student=$this->mastermodel->get_data_srow('student',$row['student_id'],'student_id'); $class=$this->mastermodel->get_data_srow('classlevel',$student->classlevel_id,'classlevel_id'); ?> <tr id="<?=$i;?>"> <td><?=$student->first_name." ".$student->last_name;?></td> <td><?=$class->classlevel_code;?> <input type="hidden" name="student_id[]" value="<?=$student->student_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> <!--[if !IE]>end table_wrapper<![endif]--> </div> </fieldset> <!--[if !IE]>start fieldset<![endif]--> <fieldset> <!--[if !IE]>start forms<![endif]--> <div class="forms"> <h3>Parent Address</h3> <div class="row"> <label>Address</label> <div class="inputs"> <textarea name="address" id="address"><?=$parent->address;?></textarea> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>start row<![endif]--> <!--[if !IE]>start row<![endif]--> <div class="row"> <label>Country</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="country" id="country" type="text" value="<?=$parent->country;?>" /></span> </div> </div> <!--[if !IE]>end row<![endif]--> <!--[if !IE]>end row<![endif]--> <?php $num=$this->mastermodel->get_data_srow('user',$parent->parent_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" 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]>start row<![endif]--> <div class="row"> <div class="inputs"><input type="hidden" name="tab_name" value="parent"/> <span class="button blue_button search_button" onclick="addformdata('validateform')"><span><span><em>Update Parent</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>