Current File : /home/inlingua/www/sensoriumpsychologists.com/diagnostics/screening/view_child.php
<?php require_once("../franchise_between/check_franchise.php");?>
<?php require_once("../franchise_between/user_details_msg_setup.php");?>
<?php require_once("../franchise_between/validate_functions.php");?>
<?php require_once("../franchise_between/student_funcs.php");?>

<?php
$ref_no=$_GET['ref_no'];
$validate_obj=new validate_functions();
$validate_obj->check_isset_empty($ref_no,"ref_no");
$validate_obj->check_is_num($ref_no,"ref_no");
?>

<?php
$student_obj=new student_funcs();
$student_obj->set_value("franchise_id",$session_id);
$student_obj->view_child($ref_no);

$child_name=$student_obj->get_value("child_name");
$email=$student_obj->get_value("email");
$age=$student_obj->get_value("age");
$gender=$student_obj->get_value("gender");
$registration_no=$student_obj->get_value("registration_no");
$registration_date=$student_obj->get_value("registration_date");
$dob_date=$student_obj->get_value("dob_date");
$school_name=$student_obj->get_value("school_name");
$problem=$student_obj->get_value("problem");
$education=$student_obj->get_value("education");
$theme_link=$student_obj->get_value("theme_class");
$theme_font=$student_obj->get_value("theme_font");

switch($education){
	case '1' :$education="1st";break;
	case '2' :$education="2nd";break;
	case '3' :$education="3rd";break;
	case '4' :$education="4th";break;
	case '5' :$education="5th";break;
	case '6' :$education="6th";break;
	case '7' :$education="7th";break;
	case '8' :$education="8th";break;
	case '9' :$education="9th";break;
	case '10' :$education="10th";break;
}
?>
<!doctype html>
<html>
<?php include("common/page_head.php");?>
<body>
<?php include("common/header_var.php");?>
<?php
$top_children=$top_val;
?>
<?php include("common/header.php");?>
<div id="main_container">
  <div id="main">
  <br><br>
    <fieldset>
    <legend>STUDENT SUMMARY</legend>
    <div style="position:relative;">
      <div style="position:absolute;right:10px;top:10px;">
        <table cellpadding="3px" cellspacing="0">
          <tr>
            <td colspan="6" align="center" style="color:#333;font-weight:bold;font-size:1.2em;">Change Theme</td>
          </tr>
          <tr>
            <td><div class="theme_selection" style="background-color:#e6ffe6;" onClick="change_theme_func('style_1','<?php echo($ref_no);?>')"></div></td>
            <td><div class="theme_selection" style="background-color:#ffe6fc;" onClick="change_theme_func('style_2','<?php echo($ref_no);?>')"></div></td>
            <td><div class="theme_selection" style="background-color:#e6f2ff;" onClick="change_theme_func('style_3','<?php echo($ref_no);?>')"></div></td>
            <td><div class="theme_selection" style="background-color:#f5f5f0;" onClick="change_theme_func('style_4','<?php echo($ref_no);?>')"></div></td>
            <td><div class="theme_selection" style="background-color:#fffcb5;" onClick="change_theme_func('style_5','<?php echo($ref_no);?>')"></div></td>
            <td><div class="theme_selection" style="background-color:#faebf5;" onClick="change_theme_func('style_6','<?php echo($ref_no);?>')"></div></td>            
            <td><div class="theme_selection" style="background-color:#a4a8fc;" onClick="change_theme_func('style_7','<?php echo($ref_no);?>')"></div></td>
            
          <td><div class="theme_selection" style="background-color:#ffb3b3;" onClick="change_theme_func('style_8','<?php echo($ref_no);?>')"></div></td>
             <!-- <td><div class="theme_selection" style="background-color:#ecf9ec;" onClick="change_theme_func('style_9','<?php echo($ref_no);?>')"></div></td>
            <td><div class="theme_selection" style="background-color:#ffffcc;" onClick="change_theme_func('style_10','<?php echo($ref_no);?>')"></div></td> -->
            <td><div class="theme_selection" style="background-color:#d4d9ea;" onClick="change_theme_func('style_11','<?php echo($ref_no);?>')"></div></td>
              <!--<td><div class="theme_selection" style="background-color:#ffece6;" onClick="change_theme_func('style_12','<?php echo($ref_no);?>')"></div></td> 
              <td><div class="theme_selection" style="background-color:#e6fff5;" onClick="change_theme_func('style_13','<?php echo($ref_no);?>')"></div></td>-->
              
              
          </tr>
        </table>
      </div>
    </div>
    <table border="0" class="tables_fieldset" cellpadding="3px" cellspacing="0">
  <?php require_once("common/student_summary_in_page_registered.php");?>
      <tr>
        <td colspan="3"><br>
        <a href="screening_available.php?ref_no=<?php echo($ref_no);?>"><div class="button_div" style="color:#FFF;background-color:#060;">SCREENING</div></a>&nbsp;&nbsp;

<?php

$reply=$student_obj->show_available_treatment($ref_no);
if($reply=="no"){
	echo("<div style=\"position:relative;display:inline-block;cursor:context-menu;padding:5px 10px;color:#000;background-color:#C5C5C5;\">TREATMENT</div>");
}else{
	echo("<a href=\"treatment_available.php?ref_no=".$ref_no."\"><div class=\"button_div\" style=\"color:#FFF;background-color:#060;\">TREATMENT</div></a>");
}
echo("&nbsp;&nbsp;<a target=\"_blank\" href=\"student_details.php?ref_no=".$ref_no."\"><div class=\"button_div\" style=\"color:#FFF;background-color:#060;\">View Details</div></a>");
?>
        </td>
      </tr>
      <tr>
        <td colspan="3">
          <br>
          <table style="width:100%;" border="1" cellpadding="3px" cellspacing="0">
            <tr>
              <td>Month & Year</td>
              <td>Screening ID</td>
              <td>Conclusion</td>
              <td>Treatment</td>
              <td>Progress Report</td>
              <td>Monthly Teacher's Observation</td>
            </tr>
<?php
$student_obj->view_all_screenings_reports_list_student($ref_no);
$new_conn = new mysqli($host_db,$user_db,$pass_db,$name_db);
if ($new_conn->connect_errno){
	echo("COULD NOT CONNECT TO THE SERVER.....TRY AGAIN LATER");
	exit();
}else{
	
$student_id=$_GET['ref_no'];
$prepared_statement="SELECT *,DATE(created_date) AS screening_date FROM shristi_questionnaires_permanent_answers WHERE ref_no='$student_id' GROUP BY screening_id";

$res1=$new_conn->query($prepared_statement);
while($detail=$res1->fetch_assoc()){
			$screening_id=$detail['screening_id'];
			echo $screening_date=$detail['screening_date'];
			echo("<tr>");
			
			$date_array=explode("-",$screening_date);
			$month="";
			$year=$date_array[0];
			
			switch(abs($date_array[1])){
				case 1:$month="JAN";break;
				case 2:$month="FEB";break;
				case 3:$month="MAR";break;
				case 4:$month="APR";break;
				case 5:$month="MAY";break;
				case 6:$month="JUN";break;
				case 7:$month="JUL";break;
				case 8:$month="AUG";break;
				case 9:$month="SEP";break;
				case 10:$month="OCT";break;
				case 11:$month="NOV";break;
				case 12:$month="DEC";break;
			}
			
			echo("<td><a target=\"_blank\" href=\"view_questionnaire_report.php?ref_no=".$student_id."&screening_id=".$screening_id."&franchise_id={$_SESSION['log_id']}\">".$month."-".$year."</a></td>");
			echo("<td>".$detail['screening_id']."</td>");
			echo("<td></td>");
			echo("<td></td>");
			echo("<td></td>");
			echo("<td></td>");
			echo("</tr>");
		}

}
?>
            
            
            <tr style="height:300px;">
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    </fieldset>
  </div>
</div>
  <br><br><br><br>
<div id="blackout">
          	<div style="position:absolute;left:50%;top:50%;margin-left:-25px;margin-top:-25px;">
            <img src="images/spheres.gif" height="64px"  /></div>
            </div>
<script src="javascript/change_theme_jquery.js"></script>
</body>	
</html>