<?php
$id = $convert->decode($_GET['id']);
$GetStep1Per = mysql_query("SELECT * FROM `step1_perosonal` WHERE `sid` = '$id'");
$GetStep1Per1 = mysql_fetch_assoc($GetStep1Per);

?>
<link type="text/css" href="assets/plugins/form-daterangepicker/daterangepicker-bs3.css" rel="stylesheet">    <!-- DateRangePicker -->

<link type="text/css" href="assets/plugins/gridforms/gridforms/gridforms.css" rel="stylesheet"> 									<!-- Gridforms -->

<div class="page-content">
                            <ol class="breadcrumb">
                                
<li><a href="index.html">Home</a></li>
<li>Admission Form</li>
<li class="active"><a href="#">Step 1</a></li>
                            </ol>
                            <div class="container-fluid">
                                 
<div data-widget-group="group1">
    <div class="row">
    	<div class="col-md-12">
			<div class="panel panel-white" data-widget='{"draggable": "false"}'>
				<div class="panel-heading">
					<h2>Personal Details</h2>
					<!-- <div class="panel-ctrls" data-actions-container="" data-action-collapse='{"target": ".panel-body"}'></div> -->
				</div>
				<div class="panel-body">
<form class="grid-form" method="post" action="action-pages/verify/personal-edit-action.php" enctype="multipart/form-data" id="validate-form" data-parsley-validate="" novalidate="">
					<input type="hidden" name="sid" value="<?php echo $id; ?>" />
						<fieldset>
							
							<div data-row-span="4">
								<div data-field-span="2">
									<label>Choose Program</label>


									
									
									
																		<select id="school" name="school" class="form-control" style="border:none" required>
           <option value="">Choose Program</option>
        <?php 
		  $sql=mysql_query('SELECT * FROM `sgvu_courses` ORDER BY `sgvu_courses`.`coursename` ASC');
		  while($rows=mysql_fetch_array($sql)) 
		  {
		  
		   ?>
          
          <option value="<?php echo $rows['course_id']; ?>"
		  
		  <?php
		  if($GetStep1Per1['program'] == $rows['course_id'])
		  {
		  ?>
		  
		  selected="selected"
		  <?php
		  }
		  ?>
		  ><?php echo $rows['coursename']; ?></option>
          <?php } ?> 
          </select>
								</div>
								
								
							</div>
							
							
							
							
							<div data-row-span="4" style="height:100px">
								<div data-field-span="2">

									<label>First Name</label>
									<input type="text" required name="firstname" value="<?php echo $GetStep1Per1['firstname']; ?>" data-parsley-pattern="^[A-Za-z]*$">
								</div>
								<div data-field-span="1">
									<label>Middle Name</label>
									
						        <input type="text"  name="middlename"  data-parsley-pattern="^[A-Za-z]*$" value="<?php echo $GetStep1Per1['middlename']; ?>">
						   
								</div>

								<div data-field-span="1">
									<label>Last Name</label>
									<input type="text" name="lastname" value="<?php echo $GetStep1Per1['lastname']; ?>">
								</div>
							</div>
							
<div data-row-span="4" style="height:100px">
						
								
<div data-field-span="1" style="height: 65px;">
									<label>Gender</label><br />
									<label><input type="radio" name="sex" value="M" 
                                    <?php if($GetStep1Per1['sex']=='M')
									{?>
                                    checked="checked"
                                    <?php } ?>
                                    > Male&nbsp;&nbsp;<input type="radio" name="sex" value="F" <?php if($GetStep1Per1['sex']=='F')
									{?>
                                    checked="checked"
                                    <?php } ?>> Female</label> 								</div>
								
								
								<div data-field-span="1" style="height: 65px;">
									<label>Date of Birth </label>
									<input type="text" class="form-control" id="datepicker" name="dob" placeholder="mm/dd/yyyy" required="" value="<?php echo $GetStep1Per1['dob']; ?>">
								</div><div data-field-span="1" style="height: 65px;">
									<label>Religion </label>
									<select name="religion" class="form-control" style="border:none" required="">
           <option value="">Select Religion</option>
        <?php 
		  $GetReligion=mysql_query('SELECT * FROM `religion` ORDER BY `religion`.`id` ASC');
		  while($GetReligion1=mysql_fetch_array($GetReligion)) 
		  {
		  
		   ?>
          
          <option value="<?php echo $GetReligion1['id']; ?>" 
          <?php if($GetStep1Per1['religion']==$GetReligion1['id'])
		  {?>
          selected="selected"
          <?php } ?>
          ><?php echo $GetReligion1['religion']; ?></option>
          <?php } ?> 
          </select>
								</div><div data-field-span="1" style="height: 65px;">
									<label>Category</label>
									<select id="" name="cat" class="form-control" style="border:none" required>
           <option value="">Select Category</option>
        <?php 
		  $GetCat=mysql_query('SELECT * FROM `category` ORDER BY `category`.`id` ASC');
		  while($GetCat1=mysql_fetch_array($GetCat)) 
		  {
		  
		   ?>
          
          <option value="<?php echo $GetCat1['id']; ?>"
          
          <?php if($GetStep1Per1['cat']==$GetCat1['id'])
		  {?>
          selected="selected"
          <?php } ?>><?php echo $GetCat1['category']; ?></option>
          <?php } ?> 
          </select>
								</div>								
					
						</div>							
							
						</fieldset>


						
                        <fieldset>
						
						

							<div data-row-span="4" style="height:100px">
								
								<div data-field-span="2">
									<label>Father's Name</label>
									<input type="text" name="father_name" required  data-parsley-pattern="^[A-Za-z .]*$" value="<?php echo $GetStep1Per1['father_name']; ?>">
								</div>
								<div data-field-span="1">
									<label>Father's Occupation </label>
									<input type="text" name="father_occupation" required data-parsley-pattern="^[A-Za-z .]*$" value="<?php echo $GetStep1Per1['father_occupation']; ?>">
								</div>
									<div data-field-span="1">
									<label>Annual Income</label>
									<input type="text" name="father_anuual_income" required data-parsley-type="digits" value="<?php echo $GetStep1Per1['father_anuual_income']; ?>">
								</div>
								
							</div>
							<div data-row-span="4" style="height:100px">
								
								<div data-field-span="2">
									<label>Mother's Name</label>
									<input type="text" name="mother_name" required data-parsley-pattern="^[A-Za-z .]*$" value="<?php echo $GetStep1Per1['mother_name']; ?>">
								</div>
								<div data-field-span="1">
									<label>Mother's Occupation</label>
									<input type="text" name="mother_occupation" data-parsley-pattern="^[A-Za-z .]*$" value="<?php echo $GetStep1Per1['mother_occupation']; ?>">
								</div>
									<div data-field-span="1">
									<label>Annual Income</label>
									<input type="text" name="mother_income" data-parsley-type="digits" value="<?php echo $GetStep1Per1['mother_income']; ?>">
								</div>
								
							</div>
							<br>
			
					
						
						<div class="clearfix pt-md">
							<div class="pull-right">
							
							
							          <input type="submit" class="btn-primary btn" id="submit" name="submit" value="Next &raquo;">

								
							</div>
						</div>
				  </form>
					
				</div>
			</div>
		</div>
	</div>
</div>
                            </div> <!-- .container-fluid -->
                        </div>
						
						<script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script> 							<!-- Load jQuery -->
<script type="text/javascript" src="assets/js/jqueryui-1.10.3.min.js"></script> 							<!-- Load jQueryUI -->
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script> 								<!-- Load Bootstrap -->
<script type="text/javascript" src="assets/js/enquire.min.js"></script> 									<!-- Load Enquire -->

<script type="text/javascript" src="assets/plugins/velocityjs/velocity.min.js"></script>					<!-- Load Velocity for Animated Content -->
<script type="text/javascript" src="assets/plugins/velocityjs/velocity.ui.min.js"></script>

<script type="text/javascript" src="assets/plugins/wijets/wijets.js"></script>     						<!-- Wijet -->

<script type="text/javascript" src="assets/plugins/codeprettifier/prettify.js"></script> 				<!-- Code Prettifier  -->
<script type="text/javascript" src="assets/plugins/bootstrap-switch/bootstrap-switch.js"></script> 		<!-- Swith/Toggle Button -->

<script type="text/javascript" src="assets/plugins/bootstrap-tabdrop/js/bootstrap-tabdrop.js"></script>  <!-- Bootstrap Tabdrop -->

<script type="text/javascript" src="assets/plugins/iCheck/icheck.min.js"></script>     					<!-- iCheck -->

<script type="text/javascript" src="assets/plugins/nanoScroller/js/jquery.nanoscroller.min.js"></script> <!-- nano scroller -->

<script type="text/javascript" src="assets/js/application.js"></script>
<script type="text/javascript" src="assets/demo/demo.js"></script>
<script type="text/javascript" src="assets/demo/demo-switcher.js"></script>

<!-- End loading site level scripts -->
    
    <!-- Load page level scripts-->
    
<script type="text/javascript" src="assets/plugins/gridforms/gridforms/gridforms.js"></script>  								<!-- Gridforms -->
<script>
// See Docs
	window.ParsleyConfig = {
    	  successClass: 'has-success'
		, errorClass: 'has-error'
		, errorElem: '<span></span>'
		, errorsWrapper: '<span class="help-block"></span>'
		, errorTemplate: "<div></div>"
		, classHandler: function(el) {
    		return el.$element.closest(".form-group");
		}
	};
</script>

<script type="text/javascript" src="assets/plugins/form-parsley/parsley.js"></script>  					<!-- Validate Plugin / Parsley -->
<script type="text/javascript" src="assets/plugins/form-daterangepicker/moment.min.js"></script>              			<!-- Moment.js for Date Range Picker -->

<script type="text/javascript" src="assets/plugins/form-colorpicker/js/bootstrap-colorpicker.min.js"></script> 			<!-- Color Picker -->

<script type="text/javascript" src="assets/plugins/form-daterangepicker/daterangepicker.js"></script>     				<!-- Date Range Picker -->
<script type="text/javascript" src="assets/plugins/bootstrap-datepicker/bootstrap-datepicker.js"></script>      			<!-- Datepicker -->
<script type="text/javascript" src="assets/plugins/bootstrap-timepicker/bootstrap-timepicker.js"></script>      			<!-- Timepicker -->
<script type="text/javascript" src="assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script> <!-- DateTime Picker -->

<script type="text/javascript" src="assets/plugins/clockface/js/clockface.js"></script>     								<!-- Clockface -->


<script type="text/javascript" src="assets/demo/demo-pickers.js"></script>
<script type="text/javascript" src="assets/demo/demo-formvalidation.js"></script>
<script type="text/javascript" src="assets/demo/demo-pickers.js"></script>
    <!-- Load page level scripts-->
    
