?
Current Path : /home1/savoy/public_html/savoyglobal.net/koolkids/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/koolkids/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); ?> <fieldset> <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;?>"/> <div class="row"> <label>Title</label> <div class="inputs"> <span class="input_wrapper"> <input type="text" class="text" name="title" id="title" value="<?=$parent->title;?>" /> </span> </div> </div> <div class="row"> <label>Full Name</label> <div class="inputs"> <span class="input_wrapper"> <input type="text" class="text required" name="name" id="name" value="<?=$parent->name;?>" /> </span> </div> </div> <div class="row"> <label>Preferred Name</label> <div class="inputs"> <span class="input_wrapper"> <input type="text" class="text" name="preferred_name" id="preferred_name" value="<?=$parent->preferred_name;?>" /> </span> </div> </div> <div class="row"> <label>Surname</label> <div class="inputs"> <span class="input_wrapper"> <input type="text" class="text" name="surname" id="surname" value="<?=$parent->surname;?>" /> </span> </div> </div> <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> <div class="row"> <label>Email</label> <div class="inputs"> <span class="input_wrapper"><input class="text required email" name="email" id="email" type="text" value="<?=$parent->email;?>" /></span> </div> </div> <div class="row"> <label>Home 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> <div class="row"> <label>Work Contact No</label> <div class="inputs"> <span class="input_wrapper"><input class="text" name="work_contact_no" id="work_contact_no" type="text" value="<?=$parent->work_contact_no;?>" /></span> </div> </div> <div class="row"> <label>Mobile No</label> <div class="inputs"> <span class="input_wrapper"><input class="text required" name="mobile_no" id="mobile_no" type="text" value="<?=$parent->mobile_no;?>" /></span> </div> </div> <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> </div> </fieldset> <fieldset> <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" onblur="splitcode(this.value)" class="text" name="students" id="students" /> </td> <td style="display:none"> <input type="text" name="students_id" id="students_id" /> </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> </div> </fieldset> <fieldset> <div class="forms"> <h3>Parent Address</h3> <div class="row"> <label>Physical Address</label> <div class="inputs"> <textarea name="physical_address" id="physical_address"><?=$parent->physical_address;?></textarea> </div> </div> <div class="row"> <label>Postal Address</label> <div class="inputs"> <textarea name="postal_address" id="postal_address"><?=$parent->postal_address;?></textarea> </div> </div> <?php $num=$this->mastermodel->get_data_srow('user',$parent->parent_id,'linkedto_id'); if(count($num)==0) { ?> <div class="row"> <label>Create User?</label> <div class="inputs"> <input type="checkbox" onchange="showhideuser(this)"/> </div> </div> <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> <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> <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> <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> </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> <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> <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 } ?> <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> </div> <!--[if !IE]>end forms<![endif]--> </fieldset> <?php echo form_close(); ?> </div> <span class="section_content_bottom"></span>