Current File : /home/inlingua/www/sensoriumpsychologists.com/diagnostics/franchise_between/student_details.php
<?php 
include('../franchise_back/connection.php');

$mysqli = new mysqli($host_db,$user_db,$pass_db,$name_db);

if ($mysqli -> connect_errno) {
  echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
  exit();
} 
 session_start();
 $franchise_id=$_SESSION['log_id'];
 $table_id=$_GET['ref_no'];
 $prepared_statement="SELECT * FROM shristi_child_details a WHERE franchise_id='$franchise_id' AND table_id='$table_id' AND status='active'";
 $result = $mysqli -> query($prepared_statement);
 
 $detail=$result -> fetch_assoc();
 
 //echo '<pre>'; print_r($detail);
?>
<!doctype html>
<html>
<?php include("common/page_head.php");?>
<script src="javascript/numberkey.js"></script>
<body>
<?php include("common/header_var.php");?>
<?php
$top_enrollment=$top_val;
?>
<?php include("common/header.php");?>
<div id="main_container">
<div id="main">
<br />
<br />
<div class="top_heading_page">STUDENT DETAILS</div>
<br>
<br>
<fieldset >
<legend>PERSONAL DETAILS</legend>
 <form method="post" name="myform" onSubmit="return submit_form()">
<!--<form method="post" name="myform" enctype="multipart/form-data">-->
<table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
  <tr>
        <td style="font-weight:bold;width:150px;">Admission No</td>
        <td style="font-weight:bold;width:20px;">:</td>
        <td><?php echo($detail['registration_no']);?>&nbsp;</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Name</td>
        <td style="font-weight:bold;">:</td>
        <td><?php echo($detail['name']);?>&nbsp;</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Email</td>
        <td style="font-weight:bold;">:</td>
        <td><?php echo($detail['email']);?>&nbsp;</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Date of Birth</td>
        <td style="font-weight:bold;">:</td>
        <td><?php 
		$dob=$detail['dob_date'];
			if($dob!="0000-00-00")
			{
				$date_obj = new DateTime($dob);
				$dob=$date_obj->format('d-M-Y');
				echo($dob);
			}
		?>&nbsp;</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Registration Date</td>
        <td style="font-weight:bold;">:</td>
        <td><?php $rdob=$detail['registration_date'];
			if($rdob!="0000-00-00")
			{
				$date_obj = new DateTime($dob);
				$dob=$date_obj->format('d-M-Y');
				echo($dob);
			} ?>&nbsp;</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Age</td>
        <td style="font-weight:bold;">:</td>
        <td><?php echo($detail['age']." yrs");?>&nbsp;</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Gender</td>
        <td style="font-weight:bold;">:</td>
        <td><?php echo($detail['gender']);?>&nbsp;</td>
      </tr>
       <tr>
        <td style="font-weight:bold;">School</td>
        <td style="font-weight:bold;">:</td>
        <td><?php echo($detail['school_name']);?>&nbsp;</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Std</td>
        <td style="font-weight:bold;">:</td>
        <?php echo("<td>");
			switch($detail['education'])
			{
				case '1' :echo("1st");break;
				case '2' :echo("2nd");break;
				case '3' :echo("3rd");break;
				case '4' :echo("4th");break;
				case '5' :echo("5th");break;
				case '6' :echo("6th");break;
				case '7' :echo("7th");break;
				case '8' :echo("8th");break;
				case '9' :echo("9th");break;
				case '10' :echo("10th");break;
			}
			echo(" std</td>"); ?>&nbsp;
      </tr>
	  <tr>
        <td style="font-weight:bold;">Contact No</td>
        <td style="font-weight:bold;">:</td>
        <td><?php echo($detail['contact_no']);?>&nbsp;</td>
      </tr>
	  <tr>
        <td style="font-weight:bold;">Informant</td>
        <td style="font-weight:bold;">:</td>
        <td><?php echo($detail['informant']);?>&nbsp;</td>
      </tr>
</table>

</fieldset>

<br/>
<br/>


<fieldset>
  <legend>ADDRESS</legend>
  <table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
    <tr>
      <td style="width:50%;"><table cellpadding="0" cellspacing="0" style="width:400px;">
          <tr style="height:30px;">
            <td style="font-weight:bold;width:250px;">CORRESPONDANCE ADDRESS&nbsp;&nbsp;</td>
            <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['c_local']);?>&nbsp;</td>
          </tr>
          <tr>
            <td></td>
          </tr>
          
          <tr>
            <td style="font-weight:bold;width:250px;">City</td>
			<td style="font-weight:bold;width:20px;">:</td>
			<td><?php echo($detail['c_city']);?>&nbsp;</td>
          </tr>
          <tr style="height:10px;">
            
          </tr>
          <tr>
            <td style="font-weight:bold;width:250px;">District</td>
            <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['c_district']);?>&nbsp; </td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td style="font-weight:bold;width:250px;">State</td>
            <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['c_state']);?>&nbsp;</td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td style="font-weight:bold;width:250px;">Pincode</td>
            <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['c_pincode']);?>&nbsp; </td>
          </tr>
        </table></td>
      <td><table cellpadding="0" cellspacing="0" style="width:400px;">
          <tr style="height:30px;">
            <td style="font-weight:bold;width:250px;">PERMANENT ADDRESS&nbsp;</td>
			<td style="font-weight:bold;width:20px;">:</td>
			<td><?php echo($detail['p_local']);?>&nbsp;</td>
          </tr>
          
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td style="font-weight:bold;width:250px;">City</td>
            <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['p_city']);?>&nbsp;</td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td style="font-weight:bold;width:250px;">District</td>
            <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['p_district']);?>&nbsp; </td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td style="font-weight:bold;width:250px;">State</td>
           <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['p_state']);?>&nbsp; </td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td style="font-weight:bold;width:250px;">Pincode </td>
           <td style="font-weight:bold;width:20px;">:</td>
            <td><?php echo($detail['p_pincode']);?>&nbsp; </td>
          </tr>
        </table></td>
    </tr>
  </table>
</fieldset>
<br/><br/>
<fieldset>
  <legend>PROBLEMS & BEHAVIOURS</legend>
  <table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="2"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:250px;">PRESENTING PROBLEMS OF THE CHILD</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['problem']);?>&nbsp; </td>
          </tr>
        </table></td>
      
    </tr>
   
    <tr>
      <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:250px;">Walking</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['walking']);?>&nbsp;</td>
          </tr>
        </table></td>
      <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:250px;">First Sentence : </td>
            <td style="width:20px;text-align:right;"></td>
            <td><?php echo($detail['first_sentence']);?>&nbsp; </td>
          </tr>
        </table></td>
    </tr>
     
    
    <tr valign="top">
      <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:250px;">Toilet Behaviour</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['toilet_behaviour']);?>&nbsp; </td>
          </tr>
        </table></td>
      <td style="width:70%;"><table cellpadding="5px" cellspacing="0">
          <tr valign="top">
            <td style="font-weight:bold;width:250px;">Self help skills (bathing, eating, dressing, communication skills)</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['self_help']);?>&nbsp;  </td>
          </tr>
        </table></td>
    </tr>
    <tr valign="top">
      <td colspan="2"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:250px;">Sleeping Pattern</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['sleeping_pattern']);?>&nbsp;  </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:250px;">Play (during free time)</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['play']);?>&nbsp;  </td>
          </tr>
        </table></td>
		<td ><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:250px;">Play group</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['play_group']);?>&nbsp;  </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      
    </tr>
    <tr>
      <td><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:250px;">Type of play</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['type_of_play']);?>&nbsp; 
			
			</td>
          </tr>
        </table></td>
		<td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:250px;">Behaviour with family</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['behav_with_family']);?>&nbsp; 
			
			</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      
    </tr>
    <tr>
      <td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:50%;">
          <tr>
            <td style="font-weight:bold;width:250px;">Relationship with siblings</td>
            <td style="width:20px;text-align:right;">:</td>
            <td><?php echo($detail['reln_with_siblings']);?>&nbsp; 
			
			</td>
          </tr>
        </table></td>
    </tr>
  </table>
</fieldset>
<br>

      <!--<input type="submit" name="sumnit" value="Save Now"  />--></td>
  </tr>
</table>
<br><br>
</div>
</form>
</div>

</div>
<script>
function submit_form()
{
	if($("#child_name").val()=="")
	{
		alert("Error : Please enter child's name...");
		$("#child_name").focus();
		return false;
	}
	if($("#email").val()=="")
	{
		alert("Error : Please enter Email...");
		$("#email").focus();
		return false;
	}
	if($("#age").val()=="")
	{
		alert("Error : Please select child's age...");
		$("#age").focus();
		return false;
	}
	if($("#gender").val()=="")
	{
		alert("Error : Please select gender");
		$("#gender").focus();
		return false;
	}
	if($("#dob_day").val()=="")
	{
		alert("Error : Please select Day in D.O.B");
		$("#dob_day").focus();
		return false;
	}
	if($("#dob_month").val()=="")
	{
		alert("Error : Please select Month in D.O.B");
		$("#dob_month").focus();
		return false;
	}
	if($("#dob_year").val()=="")
	{
		alert("Error : Please select Year in D.O.B");
		$("#dob_year").focus();
		return false;
	}
	if($("#education").val()=="")
	{
		alert("Error : Please select Education");
		$("#education").focus();
		return false;
	}
	if($("#school_name").val()=="")
	{
		alert("Error : Please enter school name");
		$("#school_name").focus();
		return false;
	}
	if($("#contact_no").val()=="")
	{
		alert("Error : Please select contact no");
		$("#contact_no").focus();
		return false;
	}
	if($("#informant").val()=="")
	{
		alert("Error : Please select informant");
		$("#informant").focus();
		return false;
	}
	
	

	else
	{
		
	$("#next-2").show();
    $("#next-1").hide();	
	$("#submit-1").hide();	
	$("#submit-2").show();	
	//return false;	
	}	
		
}	
	
function submit_form_next()
{	
	
	if($("#c_local").val()=="")
	{
		alert("Error : Please enter local address in 'Correspondance Address'");
		$("#c_local").focus();
		return false;
	}
	if($("#c_city").val()=="")
	{
		alert("Error : Please enter city in 'Correspondance Address'");
		$("#c_city").focus();
		return false;
	}
	if($("#c_district").val()=="")
	{
		alert("Error : Please enter district in 'Correspondance Address'");
		$("#c_district").focus();
		return false;
	}
	if($("#c_state").val()=="")
	{
		alert("Error : Please select state in 'Correspondance Address'");
		$("#c_state").focus();
		return false;
	}
	if($("#c_pincode").val()=="")
	{
		alert("Error : Please enter pincode in 'Correspondance Address'");
		$("#c_pincode").focus();
		return false;
	}
	if($("#p_local").val()=="")
	{
		alert("Error : Please enter local address in 'Permanent Address'");
		$("#p_local").focus();
		return false;
	}
	if($("#p_city").val()=="")
	{
		alert("Error : Please enter city in 'Permanent Address'");
		$("#p_city").focus();
		return false;
	}
	var p_city=$("#p_city").val();
	if(p_city.length<3)
	{
		alert("Error : City in 'Permanent Address' must be 3 characters long");
		$("#p_city").focus();
		return false;
	}
	if($("#p_district").val()=="")
	{
		alert("Error : Please enter district in 'Permanent Address'");
		$("#p_district").focus();
		return false;
	}
	if($("#p_state").val()=="")
	{
		alert("Error : Please select state in 'Permanent Address'");
		$("#p_state").focus();
		return false;
	}
	if($("#p_pincode").val()=="")
	{
		alert("Error : Please enter pincode in 'Permanent Address'");
		$("#p_pincode").focus();
		return false;
	}else {
		$("#next-3").show();	
	$("#next-2").hide();
	$("#submit-2").hide();	
	$("#submit-3").show();	
		
	}	
	
}

function submit_form_save()
{	
	if($("#problem").val()=="")
	{
		alert("Error : Please enter 'PRESENTING PROBLEM OF THE CHILD'");
		$("#problem").focus();
		return false;
	}
	if($("#walking").val()=="")
	{
		alert("Error : Please select walking");
		$("#walking").focus();
		return false;
	}
	if($("#first_sentence").val()=="")
	{
		alert("Error : Please select first sentence");
		$("#first_sentence").focus();
		return false;
	}
	if($("#toilet_behaviour").val()=="")
	{
		alert("Error : Please select 'Toilet Behaviour'");
		$("#toilet_behaviour").focus();
		return false;
	}
	if($("#self_help").val()=="")
	{
		alert("Error : Please select 'Self help skills'");
		$("#self_help").focus();
		return false;
	}
	if($("#sleeping_pattern").val()=="")
	{
		alert("Error : Please select 'Sleeping Pattern'");
		$("#sleeping_pattern").focus();
		return false;
	}
	if($("#play").val()=="")
	{
		alert("Error : Please enter 'Play (during free time)'");
		$("#play").focus();
		return false;
	}
	if($("#play_group").val()=="")
	{
		alert("Error : Please enter 'Play Group'");
		$("#play_group").focus();
		return false;
	}
	if($("#type_of_play").val()=="")
	{
		alert("Error : Please enter 'Type of Play'");
		$("#type_of_play").focus();
		return false;
	}
	if($("#behav_with_family").val()=="")
	{
		alert("Error : Please enter 'Behaviour with Family'");
		$("#behav_with_family").focus();
		return false;
	}
	if($("#reln_with_siblings").val()=="")
	{
		alert("Error : Please enter 'Relationaship with Siblings'");
		$("#reln_with_siblings").focus();
		return false;
	}
	var ans=confirm("Are you sure you want to continue?");
	if(ans==true)
	{
		document.myform.submit();
	}
	else
	{
		return false;
	}
}
function copy_addr()
{
	$("#p_local").val($("#c_local").val());
	$("#p_city").val($("#c_city").val());
	$("#p_district").val($("#c_district").val());
	$("#p_state").val($("#c_state").val());
	$("#p_pincode").val($("#c_pincode").val());
}
</script>
</body>
</html>