Current File : /home/inlingua/www/sensoriumpsychologists.com/diagnostics/screening/treatment_session_pre.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 require_once("../franchise_between/treatment_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
$day=$_GET['day'];
$validate_obj=new validate_functions();
$validate_obj->check_isset_empty($day,"day");
$validate_obj->check_is_num($day,"day");
?>
<?php
$week=$_GET['week'];
$validate_obj=new validate_functions();
$validate_obj->check_isset_empty($week,"week");
$validate_obj->check_is_num($week,"week");
?>
<?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");
$school_name=$student_obj->get_value("school_name");
$registration_no=$student_obj->get_value("registration_no");
$registration_date=$student_obj->get_value("registration_date");
$dob_date=$student_obj->get_value("dob_date");
$education=$student_obj->get_value("education");
$problem=$student_obj->get_value("problem");
$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;
}
?>
<?php
$treatment_id=$_GET['treatment_id'];
$validate_obj=new validate_functions();
$validate_obj->check_isset_empty($treatment_id,"treatment id");
$validate_obj->check_is_num_coma($treatment_id,"treatment id");
$treatment_id_array=explode(",",$treatment_id);
?>
<?php
$treatment_obj=new treatment_funcs();
if(isset($_GET['date'])){
 //for 5 month 
$treatment_obj->pre_treatment_details_multiple_five_month($treatment_id,$week,$day,$ref_no,$_GET['date']);
}else{
$treatment_obj->pre_treatment_details_multiple($treatment_id,$week,$day,$ref_no);
}

$treatment_name=$treatment_obj->get_value("treatment_name");
$no_of_questions=$treatment_obj->get_value("no_of_questions");
$no_of_sections=$treatment_obj->get_value("no_of_sections");
$treatment_duration=$treatment_obj->get_value("treatment_duration");
?>
<?php
if(!empty($_POST))
{
	$_SESSION['ref_no']=$ref_no;
	$_SESSION['treatment_id']=array_shift($treatment_id_array);
	$_SESSION['treatment_id_array']=$treatment_id_array;
	$_SESSION['treatment_started']="yes";
	$_SESSION['treatment_start_time']=time();
	$_SESSION['section_count']=1;
	$treatment_obj->delete_previous_student_ans($ref_no,$treatment_id);
	header ("location:treatment_session.php");
}
?>
<!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 TREATMENT AVALIABLE</legend>
    <table border="0" class="tables_fieldset" cellpadding="3px" cellspacing="0">
      <tr>
        <td colspan="3" style="font-weight:bold;text-decoration:underline;">STUDENT DETAILS</td>
      </tr>
  <?php require_once("common/student_summary_in_page_registered.php");?>
      <tr style="height:30px;">
        <td colspan="3"></td>
      </tr>
      <tr>
        <td colspan="3" style="font-weight:bold;text-decoration:underline;">TREATMENT DETAILS</td>
      </tr>
      <tr>
        <td style="font-weight:bold;">No of Sections</td>
        <td style="font-weight:bold;">:</td>
        <td>
		<?php
		echo(count($treatment_id_array));
		?>&nbsp;</td>
      </tr>
      <tr style="height:30px;">
        <td colspan="3"></td>
      </tr>
      <tr>
        <td colspan="3" style="font-weight:bold;text-decoration:underline;">INSTRUCTIONS</td>
      </tr>
      <tr>
        <td colspan="3">
          <ol style="padding-left:25px;margin-top:5px;">
            <li>Please close all other windows and tabs before starting the treatment.</li>
          </ol>
        </td>
      </tr>
      <tr>
        <td colspan="3"><br>
        <form method="post" name="my_form">
          <input type="hidden" name="posted" value="yes" />
          <a href="javascript:start_exam()"><div class="button_div" style="color:#FFF;background-color:#060;">START NOW</div></a>
        </form>
        </td>
      </tr>
    </table>
    </fieldset>
  </div>
</div>
  <br><br><br><br>
<script>
function start_exam()
{
	var ans=confirm("Are you sure you want to start treatment now ?");
	if(ans==true)
	{
		document.my_form.submit();
	}
}
</script>
</body>	
</html>