JezK
Edit File: 2021-09-24editschool.php
<?php session_start(); include('session_check.php'); include('sa_operations.php'); $operation=new sa_operations(); // update school details if(isset($_POST['updatesubmit'])) { $schid = $_POST['sch_ref_id']; $schname = $_POST['sch_name']; $sch_email = $_POST['sch_email']; $sch_address= $_POST['sch_address']; $sch_address1= $_POST['sch_address1']; $phno = $_POST['sch_phno']; $city = $_POST['city']; $district = $_POST['district']; $state = $_POST['state']; $pincode = $_POST['pincode']; $website = $_POST['sch_website']; $contperson = $_POST['cont_per']; $mobile = $_POST['cont_per_phno']; $nooflic = $_POST['nooflic']; $duration = $_POST['expiry']; $modules = $_POST['previlage']; $prev_mods = $_POST['prev_mods']; $result=$operation->update_school_details($_SESSION['master']['me_id'],$schid,$schname,$sch_email,$sch_address,$sch_address1,$phno,$city,$district,$state,$pincode,$website,$contperson,$mobile,$nooflic,$duration,$modules,$prev_mods); if($result=='ok') { header('Location:schoolmanagement.php'); } else if($result=='exist_phone') { echo "<script>alert('The school phone number provided is already in use by another school/staff. Please provide a different phone number and then try again')</script>"; } else if($result=='email_exist') { echo "<script>alert('The school email provided is already in use by another school/staff. Please provide a different email and then try again')</script>"; } }// end update operation $post=$operation->getSchoolDetailsforUpdate($_GET['shlid']); $mp_ids=$operation->get_school_privileges($_GET['shlid']); $one = ""; $two = ""; $three = ""; $four = ""; $five = ""; $six = ""; if($mp_ids['res'] == 1) { for($i=0;$i<count($mp_ids['result']);$i++) { if($mp_ids['result'][$i] == 1) { $one = "checked"; } elseif($mp_ids['result'][$i] == 2) { $two = "checked"; } elseif($mp_ids['result'][$i] == 3) { $three = "checked"; } elseif($mp_ids['result'][$i] == 4) { $four = "checked"; } elseif($mp_ids['result'][$i] == 5) { $five = "checked"; } elseif($mp_ids['result'][$i] == 6) { $six = "checked"; } } } if(isset($_POST['previlage'])) { $one = ""; $two = ""; $three = ""; $four = ""; $five = ""; $six = ""; for($i=0;$i<count($_POST['previlage']);$i++) { if($_POST['previlage'][$i] == 1) { $one = "checked"; } elseif($_POST['previlage'][$i] == 2) { $two = "checked"; } elseif($_POST['previlage'][$i] == 3) { $three = "checked"; } elseif($_POST['previlage'][$i] == 4) { $four = "checked"; } elseif($_POST['previlage'][$i] == 5) { $five = "checked"; } elseif($_POST['previlage'][$i] == 6) { $six = "checked"; } } } include('header.php');?> <style> .table-condensed>thead>tr>th, .table-condensed>tbody>tr>th, .table-condensed>tfoot>tr>th, .table-condensed>thead>tr>td, .table-condensed>tbody>tr>td, .table-condensed>tfoot>tr>td { padding: 3px; } span input[type="text"]:focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); } </style> <script> $(document).ready(function(){ $('#errsch_name').hide(); $('#errsch_email').hide(); $('#errcont_per').hide(); $('#errsch_address').hide(); $('#errsch_address1').hide(); $('#errsch_city').hide(); $('#errsch_state').hide(); $('#errsch_district').hide(); $('#errsch_pincode').hide(); $('#errcont_per_phno').hide(); $('#errsch_phno').hide(); $('#errnooflic').hide(); $('#errprevilage').hide(); $('#errexpiry').hide(); }); function inputvalidations() { $('#errsch_name').text(''); $('#errsch_email').text(''); $('#errcont_per').text(''); $('#errsch_address').text(''); $('#errcont_per_phno').text(''); $('#errsch_phno').text(''); $('#errnooflic').text(''); $('#errprevilage').text(''); $('#errexpiry').text(''); $('#errsch_address1').text(''); $('#errsch_city').text(''); $('#errsch_state').text(''); $('#errsch_district').text(''); $('#errsch_pincode').text(''); $('#err_web').text(''); var charallow=/^[ A-Za-z0-9\n_@.,#;:/-]*$/; var regex = /^[a-zA-Z ]*$/; var regex1=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/; var regex2=/^[0-9]*$/; var regexs=/^[a-zA-Z0-9 ]*$/; var wurl=/^(http\:\/\/|https\:\/\/)?([w]{3}\.)+([a-z0-9][a-z0-9\-]*\.)+[a-z0-9][a-z0-9\-]*$/i //var wurl = /^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/; //var wurl = /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/; var sch_name = document.getElementById('sch_name').value.trim(); var sch_email = document.getElementById('sch_email').value; var sch_address = document.getElementById('sch_address').value.trim(); var sch_phno = document.getElementById('sch_phno').value; var sch_address1 = document.getElementById('sch_address1').value.trim(); var sch_city = document.getElementById('city').value.trim(); var sch_state = document.getElementById('state').value; var sch_district = document.getElementById('district').value.trim(); var sch_pincode = document.getElementById('pincode').value; var cont_per = document.getElementById('cont_per').value.trim(); var cont_per_phno = document.getElementById('cont_per_phno').value; var nooflic = document.getElementById('nooflic').value; var expiry = document.getElementById('expiry').value; var web=document.getElementById('sch_website').value.trim(); if(sch_name=='') { $('#errsch_name').text('Please enter School Name'); $('#errsch_name').show(); document.getElementById('sch_name').focus(); return false; } else if(!regexs.test(sch_name)) { $('#errsch_name').text('Please enter a valid School Name'); $('#errsch_name').show(); document.getElementById('sch_name').focus(); return false; } else if(sch_address=='') { $('#errsch_address').text('Please enter School Address'); $('#errsch_address').show(); document.getElementById('sch_address').focus(); return false; } else if(!charallow.test(sch_address)) { $('#errsch_address').text('Please enter a valid School Address'); $('#errsch_address').show(); document.getElementById('sch_address').focus(); return false; } else if(sch_address1=='') { $('#errsch_address1').text('Please enter School Address'); $('#errsch_address1').show(); document.getElementById('sch_address1').focus(); return false; } else if(!charallow.test(sch_address1)) { $('#errsch_address1').text('Please enter a valid School Address'); $('#errsch_address1').show(); document.getElementById('sch_address1').focus(); return false; } else if(sch_city=='') { $('#errsch_city').text('Please enter School City'); $('#errsch_city').show(); document.getElementById('city').focus(); return false; } else if(!regexs.test(sch_city)) { $('#errsch_city').text('Please enter a valid City'); $('#errsch_city').show(); document.getElementById('city').focus(); return false; } else if(sch_district=='') { $('#errsch_district').text('Please enter School District'); $('#errsch_district').show(); document.getElementById('district').focus(); return false; } else if(!regexs.test(sch_district)) { $('#errsch_district').text('Please enter a valid District'); $('#errsch_district').show(); document.getElementById('district').focus(); return false; } else if(sch_state=='0') { $('#errsch_state').text('Please select School State'); $('#errsch_state').show(); document.getElementById('state').focus(); return false; } else if(sch_pincode=='') { $('#errsch_pincode').text('Please enter School Pincode'); $('#errsch_pincode').show(); document.getElementById('pincode').focus(); return false; } else if(!regex2.test(sch_pincode)) { $('#errsch_pincode').text('Please enter a valid Pincode'); $('#errsch_pincode').show(); document.getElementById('pincode').focus(); return false; } else if(sch_pincode.length!=6) { $('#errsch_pincode').text('Please enter a valid Pincode'); $('#errsch_pincode').show(); document.getElementById('pincode').focus(); return false; } var prev=document.getElementsByName("previlage[]"); var prevtype=[]; j=0 for(var i = 0; i < prev.length; i++) { if(prev[i].checked) { prevtype[j] = prev[i].value; j++; } } if(prevtype.length==0) { $('#errprevilage').text('Please check atleast One Privilege'); $('#errprevilage').show(); return false; } else if(sch_phno=='') { $('#errsch_phno').text('Please enter School Phone Number'); $('#errsch_phno').show(); document.getElementById('sch_phno').focus(); return false; } else if(!regex2.test(sch_phno)) { $('#errsch_phno').text('Please enter a valid Phone Number'); $('#errsch_phno').show(); document.getElementById('sch_phno').focus(); return false; } else if(sch_phno.length!=10) { $('#errsch_phno').text('Please enter a valid Phone Number'); $('#errsch_phno').show(); document.getElementById('sch_phno').focus(); return false; } else if(sch_email=='') { $('#errsch_email').text('Please enter School Email'); $('#errsch_email').show(); document.getElementById('sch_email').focus(); return false; } else if(!regex1.test(sch_email)) { $('#errsch_email').text('Please enter a valid School Email'); $('#errsch_email').show(); document.getElementById('sch_email').focus(); return false; } else if(web!='' && !wurl.test(web)) { $('#err_web').text('Please enter a valid Website'); $('#err_web').show(); document.getElementById('sch_website').focus(); return false; } else if(cont_per=='') { $('#errcont_per').text('Please enter Contact Person Name'); $('#errcont_per').show(); document.getElementById('cont_per').focus(); return false; } else if(!regexs.test(cont_per)) { $('#errcont_per').text('Please enter a valid Contact Person Name'); $('#errcont_per').show(); document.getElementById('cont_per').focus(); return false; } else if(cont_per.length<5 || cont_per.length>50) { $('#errcont_per').text('Please enter a valid Contact Person Name'); $('#errcont_per').show(); document.getElementById('cont_per').focus(); return false; } else if(cont_per_phno=='') { $('#errcont_per_phno').text('Please enter Contact Person Phone Number'); $('#errcont_per_phno').show(); document.getElementById('cont_per_phno').focus(); return false; } else if(!regex2.test(cont_per_phno)) { $('#errcont_per_phno').text('Please enter a valid Contact Person Phone Number'); $('#errcont_per_phno').show(); document.getElementById('cont_per_phno').focus(); return false; } else if(cont_per_phno.length!=10) { $('#errcont_per_phno').text('Please enter a valid Contact Person Phone Number'); $('#errcont_per_phno').show(); document.getElementById('cont_per_phno').focus(); return false; } else if(nooflic=='') { $('#errnooflic').text('Please enter No of Licenses'); $('#errnooflic').show(); document.getElementById('nooflic').focus(); return false; } else if(!regex2.test(nooflic)) { $('#errnooflic').text('Please enter a valid No of Licenses'); $('#errnooflic').show(); document.getElementById('nooflic').focus(); return false; } else if(expiry=='0') { $('#errexpiry').text('Please select License Duration'); $('#errexpiry').show(); document.getElementById('expiry').focus(); return false; } } function backtomain() { window.location.href="schoolmanagement.php"; } </script> <body style="overflow-x: hidden;"> <div class="row" style="margin-top:30px;"> <div class="col-md-2 text-center" style="font:Arial, Helvetica, sans-serif;font-style:normal;font-size:14px; color:#000000; font-size:1.4em;"> <i class=" glyphicon glyphicon-pencil " title ="Edit School" style="font-size: 16px;margin-right:3px;"></i>Edit School </div> </div> <div class="row"> <!-- Left col --> <div class="col-md-12" > <!-- MAP & BOX PANE --> <form class="form-horizontal" method="post"> <div class="box-body" style="background-color:#fff; padding: 10px; font-family:Arial, Helvetica, sans-serif; font-size:13px;"> <div class="form-group col-md-6" style="margin-bottom:1.0%;"> <div class="col-md-4 col-md-offset-1 text-right"><b style="color:#666666;">School Name<span style="color:#FF0000;">*</span></b></div> <div class="col-md-7"> <input type="text" class="form-control" id="sch_name" maxlength="50" name="sch_name" style="height:29px;font-size:13px;" tabindex="1" value="<? if(isset($_POST['sch_name'])) echo $_POST['sch_name']; else echo $post['school_name'];?>"> <!-- if there is an error--> <div class="col-md-10" id="errsch_name" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <div class="form-group col-md-6" > <div class="col-md-5 text-right "> <b style="color:#666666;">School Phone Number<span style="color:#FF0000;">*</span></b> </div> <div class="col-md-7"> <input type="text" class="form-control" id="sch_phno" maxlength="10" name="sch_phno" style="height:29px;font-size:13px;" tabindex="14" value="<? if(isset($_POST['sch_phno'])) echo $_POST['sch_phno']; else echo $post['school_phone'];?>" placeholder="10 digit Mobile Number"> <!-- if there is an error--> <div class="col-md-10" id="errsch_phno" style="color:#990000;margin-left:-15px;"></div> <!--end error--> </div> </div> <div style="clear:both;"></div> <div class="form-group col-md-6" style="margin-bottom:1.0%;"> <div class="col-md-4 col-md-offset-1 text-right"> <b style="color:#666666;">Address Line1<span style="color:#FF0000;">*</span></b> </div> <div class="col-md-7"> <textarea class="form-control" id="sch_address" name="sch_address" maxlength="80" rows="2" style="font-size:13px;"tabindex="2"><? if(isset($_POST['sch_address'])) echo $_POST['sch_address']; else echo $post['school_address_line_1'];?></textarea> <!-- if there is an error--> <div class="col-md-10" id="errsch_address" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <div class="form-group col-md-6" style="margin-bottom:1.0%; margin-top:1.0%;"> <div class="col-md-4 col-md-offset-1 text-right"><b style="color:#666666;">School Email<span style="color:#FF0000;">*</span></b></div> <div class="col-md-7"> <input type="email" class="form-control" maxlength="50" id="sch_email" name="sch_email" style="height:26px;font-size:13px;" tabindex="15" value="<? if(isset($_POST['sch_email'])) echo $_POST['sch_email']; else echo $post['school_email'];?>" <? if(isset($_POST['sch_email'])) echo 'autofocus';?> > <!-- if there is an error--> <div class="col-md-10" id="errsch_email" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <div style="clear:both;"></div> <div class="form-group col-md-6" style="margin-bottom:1.0%;"> <div class="col-md-4 col-md-offset-1 text-right"> <b style="color:#666666;">Address Line2<span style="color:#FF0000;">*</span></b> </div> <div class="col-md-7"> <textarea class="form-control" id="sch_address1" maxlength="80" name="sch_address1" rows="2" style="font-size:13px;"tabindex="3"><? if(isset($_POST['sch_address1'])) echo $_POST['sch_address1']; else echo $post['school_address_line_2'];?></textarea> <!-- if there is an error--> <div class="col-md-10" id="errsch_address1" name="sch_address1" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <div class="form-group col-md-6" style="margin-bottom:1.0%;"> <div class="col-md-4 col-md-offset-1 text-right "><b style="color:#666666; margin-right:10px;">School Website </b></div> <div class="col-md-7"> <input type="text" class="form-control" id="sch_website" placeholder="www.mydomain.com" maxlength="150" name="sch_website" style="height:29px;font-size:13px;" tabindex="16" value="<? if(isset($_POST['sch_website'])) echo $_POST['sch_website']; else echo $post['school_site_url'];?>"> <!-- if there is an error--> <div class="col-md-10" id="err_web" name="err_web" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <input type="hidden" name="sch_ref_id" value="<?php echo $_GET['shlid'];?>"> <input type="hidden" name="prev_mods" value="<?php echo implode(',',$mp_ids['result']);?>"> <div style="clear:both;"></div> <div class="form-group col-md-6" > <div class="col-md-5 text-right "> <b style="color:#666666;">City<span style="color:#FF0000;">*</span></b> </div> <div class="col-md-7"> <input type="text" class="form-control" maxlength="50" id="city" name="city" style="height:29px;font-size:13px;" tabindex="4" value="<? if(isset($_POST['city'])) echo $_POST['city']; else echo $post['school_city'];?>"> <!-- if there is an error--> <div class="col-md-10" id="errsch_city" style="color:#990000;margin-left:-15px;"></div> <!--end error--> </div> </div> <div class="form-group col-md-6" style="margin-bottom:1.0%;"> <div class="col-md-4 col-md-offset-1 text-right "><b style="color:#666666;margin-top:-10px;"> Contact Person Name<span style="color:#FF0000;">*</span></b></div> <div class="col-md-7"> <input type="text" class="form-control" id="cont_per" maxlength="50" name="cont_per" style="height:29px;font-size:13px;" maxlength="50" tabindex="17" value="<? if(isset($_POST['cont_per'])) echo $_POST['cont_per']; else echo $post['contact_name'];?>"> <!-- if there is an error--> <div class="col-md-12" id="errcont_per" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <div style="clear:both"></div> <div class="form-group col-md-6" > <div class="col-md-5 text-right "> <b style="color:#666666;">District<span style="color:#FF0000;">*</span></b> </div> <div class="col-md-7"> <input type="text" class="form-control" maxlength="50" id="district" name="district" style="height:29px;font-size:13px;" tabindex="5" value="<? if(isset($_POST['district'])) echo $_POST['district']; else echo $post['school_district'];?>"> <!-- if there is an error--> <div class="col-md-10" id="errsch_district" style="color:#990000;margin-left:-15px;"></div> <!--end error--> </div> </div> <div class="form-group col-md-6" > <div class="col-md-4 col-md-offset-1 text-right "><b style="color:#666666;margin-left:-80px;"> Contact Person Phone Number<span style="color:#FF0000; margin:2px; ">*</span></b></div> <div class="col-md-7"> <input type="text" class="form-control" maxlength="10" id="cont_per_phno" name="cont_per_phno" style="height:29px;font-size:13px;" tabindex="18" value="<? if(isset($_POST['cont_per_phno'])) echo $_POST['cont_per_phno']; else echo $post['contact_number'];?>"> <!-- if there is an error--> <div class="col-md-12" id="errcont_per_phno" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <div style="clear:both;"></div> <div class="form-group col-md-6" > <div class="col-md-5 text-right "> <b style="color:#666666;">State<span style="color:#FF0000;">*</span></b> </div> <div class="col-md-7"> <select class="form-control" id="state" name="state" style="height:29px;font-size:13px;" tabindex="6"> <option value="0">Select State</option> <? $states=array('Andaman and Nicobar Islands','Andhra Pradesh','Arunachal Pradesh','Assam','Bihar','Chandigarh', 'Chhattisgarh','Dadra and Nagar Haveli','Daman and Diu','Delhi','Goa','Gujarat','Haryana','Himachal Pradesh','Jammu and Kashmir', 'Jharkhand','Karnataka','Kerala','Lakshadweep','Madhya Pradesh','Maharashtra','Manipur','Meghalaya','Mizoram','Nagaland','Orissa', 'Pondicherry','Punjab','Rajasthan','Sikkim','Tamil Nadu','Telangana','Tripura','Uttaranchal','Uttar Pradesh','West Bengal'); if(isset($_POST['state'])) { for($m=0;$m<count($states);$m++) { if($post['school_state']==$states[$m]) echo "<option value='".$states[$m]."' selected>".$states[$m]."</option>"; else echo "<option value='".$states[$m]."'>".$states[$m]."</option>"; } } else { for($m=0;$m<count($states);$m++) { if($post['school_state']==$states[$m]) echo "<option value='".$states[$m]."' selected>".$states[$m]."</option>"; else echo "<option value='".$states[$m]."'>".$states[$m]."</option>"; } }?> </select> <!-- if there is an error--> <div class="col-md-7" id="errsch_state" style="color:#990000;margin-left:-15px;"></div> <!--end error--> </div> </div> <div class="form-group col-md-6" style="margin-bottom:1.0%;" > <div class="col-md-4 col-md-offset-1 text-right "><b style="color:#666666;"> Number Of Licenses<span style="color:#FF0000;">*</span></b></div> <div class="col-md-7"> <input type="text" class="form-control" id="nooflic" maxlength="10" name="nooflic" style="height:29px;font-size:13px;" tabindex="19" value="<?=$post['license_count'];?>" disabled> <!-- if there is an error--> <div class="col-md-10" id="errnooflic" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <div style="clear:both;"></div> <div class="form-group col-md-6" > <div class="col-md-5 text-right "> <b style="color:#666666;">Pincode<span style="color:#FF0000;">*</span></b> </div> <div class="col-md-7"> <input type="text" class="form-control" maxlength="6" id="pincode" name="pincode" style="height:29px;font-size:13px;" tabindex="7" value="<? if(isset($_POST['pincode'])) echo $_POST['pincode'];else echo $post['school_pincode'];?>"> <!-- if there is an error--> <div class="col-md-10" id="errsch_pincode" style="color:#990000;margin-left:-15px;"></div> <!--end error--> </div> </div> <div class="form-group col-md-6" style="margin-bottom:1.0%;"> <div class="col-md-5 text-right "><b style="color:#666666;"> License Duration<span style="color:#FF0000;">*</span></b></div> <div class="col-md-7"> <select class="form-control" id="expiry" name="expiry" style="height:29px; font-size:12px;" tabindex="20" disabled> <?php $option = '<option value="0">Select Month</option>'; for($i =1 ;$i<=50;$i++) { if($i==$post['valid_months']) { $option .= '<option value="'.$i.'" selected>'.$i.'</option>'; } else { $option .= '<option value="'.$i.'">'.$i.'</option>'; } } echo $option; ?> </select> <!-- if there is an error--> <div class="col-md-10" id="errexpiry" style="color:#990000;margin-left:-15px;"></div> <!--- end error--> </div> </div> <? if(isset($_POST['previlage'])) {?> <div class="form-group col-md-6" style="margin-bottom:1.0%; clear:both;"> <div class="col-md-4 col-md-offset-1 text-right"><b style="color:#666666;">Modules Purchased<span style="color:#FF0000; margin:2px; ">*</span></b></div> <div class="col-md-7" > <input type="checkbox" <? echo $one;?> name="previlage[]" value="1" style="vertical-align:middle;" tabindex="8"><span style="vertical-align:middle;"> Attendance</span><br> <input type="checkbox" <? echo $two;?> name="previlage[]" value="2" style="vertical-align:middle;" tabindex="9"><span style="vertical-align:middle;"> Diary</span><br > <input type="checkbox" <? echo $three;?> name="previlage[]" value="3" style="vertical-align:middle;" tabindex="10"><span style="vertical-align:middle;"> Notice Board</span><br> <input type="checkbox" <? echo $four;?> name="previlage[]" value="4" style="vertical-align:middle;" tabindex="11"><span style="vertical-align:middle;"> Examinations</span><br> <input type="checkbox" <? echo $five;?> name="previlage[]" value="5" style="vertical-align:middle;" tabindex="12"><span style="vertical-align:middle;"> Transport</span><br> <input type="checkbox" <? echo $six;?> name="previlage[]" value="6" style="vertical-align:middle;" tabindex="13"><span style="vertical-align:middle;"> Fee Payment</span> </div> <!-- if there is an error--> <div class="col-md-7" id="errprevilage" style="color:#990000;margin-left:250px;"></div> <!--- end error--> </div> <? } else{?> <div class="form-group col-md-6" style="margin-bottom:1.0%; clear:both;"> <div class="col-md-4 col-md-offset-1 text-right"><b style="color:#666666;">Modules Purchased<span style="color:#FF0000; margin:2px; ">*</span></b></div> <div class="col-md-7" > <input type="checkbox" <? echo $one;?> name="previlage[]" value="1" style="vertical-align:middle;" tabindex="8"><span style="vertical-align:middle;"> Attendance</span><br> <input type="checkbox" <? echo $two;?> name="previlage[]" value="2" style="vertical-align:middle;" tabindex="9"><span style="vertical-align:middle;"> Diary</span><br > <input type="checkbox" <? echo $three;?> name="previlage[]" value="3" style="vertical-align:middle;" tabindex="10"><span style="vertical-align:middle;"> Notice Board</span><br> <input type="checkbox" <? echo $four;?> name="previlage[]" value="4" style="vertical-align:middle;" tabindex="11"><span style="vertical-align:middle;"> Examinations</span><br> <input type="checkbox" <? echo $five;?> name="previlage[]" value="5" style="vertical-align:middle;" tabindex="12"><span style="vertical-align:middle;"> Transport</span><br> <input type="checkbox" <? echo $six;?> name="previlage[]" value="6" style="vertical-align:middle;" tabindex="13"><span style="vertical-align:middle;"> Fee Payment</span> </div> <!-- if there is an error--> <div class="col-md-7" id="errprevilage" style="color:#990000;margin-left:250px;"></div> <!--- end error--> </div> <? }?> </div><!-- /.col --> </div><!-- /.row --> </div> <div class="form-group"> <div class="col-md-12" align="center"> <button type="submit" class="btn btn-default custom-button-width .navbar-right btnclr" name="updatesubmit" style="margin:10px; " tabindex="21" onclick="return inputvalidations()">Update School</button> <button type="button" class="btn btn-default custom-button-width .navbar-right btnclr" style="margin:10px;" tabindex="22" onclick="backtomain()">Cancel</button> </div> </div> </form>