Current File : /home/inlingua/www/sensoriumpsychologists.com/diagnostics/screening/pending_initial_screenings.php |
<?php require_once("../franchise_between/check_franchise.php");?>
<?php require_once("../franchise_between/user_details_msg_setup.php");?>
<?php require_once("../franchise_between/student_funcs.php");?>
<?php require_once("../franchise_between/validate_functions.php");?>
<?php require_once("../franchise_between/reports.php");?>
<?php
$validate_obj=new validate_functions();
$student_obj=new student_funcs();
?>
<?php
$reports_obj=new reports();
?>
<?php
$sort_by=$reports_obj->get_value("sort_by");
$sort_order=$reports_obj->get_value("sort_order");
$page_no_postback=$reports_obj->get_value("page_no");
$per_page_url=$reports_obj->get_value("per_page");
$registration_date_from_postback="";
$registration_date_to_postback="";
$registration_date_from=$reports_obj->get_value("registration_date_from");
$registration_date_to=$reports_obj->get_value("registration_date_to");
?>
<?php
if(isset($_GET['sort_by']))
{
$sort_by=$_GET['sort_by'];
$validate_obj->check_empty($sort_by,"Sort By");
$validate_obj->check_is_alpha_underscore($sort_by,"Sort By");
}
if(isset($_GET['sort_order']))
{
$sort_order=$_GET['sort_order'];
$validate_obj->check_empty($sort_order,"Sort Order");
$validate_obj->check_is_alpha($sort_order,"Sort Order");
}
if(isset($_GET['page_no']))
{
$page_no_postback=$_GET['page_no'];
$validate_obj->check_empty($page_no_postback,"Page No");
$validate_obj->check_is_num($page_no_postback,"Page No");
}
if(isset($_GET['per_page']))
{
$per_page_url=$_GET['per_page'];
$validate_obj->check_empty($per_page_url,"Page No");
$validate_obj->check_is_num($per_page_url,"Page No");
}
?>
<?php
if(isset($_GET['registration_date_from']))
{
$registration_date_from=$_GET['registration_date_from'];
if($registration_date_from=="")
{
$registration_date_from="0000-00-00";
}
else
{
$registration_date_from_postback=$registration_date_from;
$registration_date_from_array=explode("-",$registration_date_from);
if(count($registration_date_from_array)!=3)
{
echo("Error : Invalid 'Invoice date from'...(Error Code : 4)");
exit();
}
if((strlen($registration_date_from_array[0])!=2)||($registration_date_from_array[0]=="")||($registration_date_from_array[0]=="00"))
{
echo("Error : Invalid day in 'Invoice date from'...(Error Code : 5)");
exit();
}
if((filter_var($registration_date_from_array[0], FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/[^0-9]+/")))))
{
echo("Error : Invalid day in 'Invoice date from'...(Error Code : 39)");
exit();
}
switch($registration_date_from_array[1])
{
case 'Jan':$registration_date_from_array[1]="01";break;
case 'Feb':$registration_date_from_array[1]="02";break;
case 'Mar':$registration_date_from_array[1]="03";break;
case 'Apr':$registration_date_from_array[1]="04";break;
case 'May':$registration_date_from_array[1]="05";break;
case 'Jun':$registration_date_from_array[1]="06";break;
case 'Jul':$registration_date_from_array[1]="07";break;
case 'Aug':$registration_date_from_array[1]="08";break;
case 'Sep':$registration_date_from_array[1]="09";break;
case 'Oct':$registration_date_from_array[1]="10";break;
case 'Nov':$registration_date_from_array[1]="11";break;
case 'Dec':$registration_date_from_array[1]="12";break;
}
if((strlen($registration_date_from_array[1])!=2)||($registration_date_from_array[1]=="")||($registration_date_from_array[1]=="00"))
{
echo("Error : Invalid month in 'Invoice date from'...(Error Code : 6)");
exit();
}
if((filter_var($registration_date_from_array[1], FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/[^0-9]+/")))))
{
echo("Error : Invalid month in 'Invoice date from'...(Error Code : 40)");
exit();
}
if((strlen($registration_date_from_array[2])!=4)||($registration_date_from_array[2]=="")||($registration_date_from_array[2]=="0000"))
{
echo("Error : Invalid year in 'Invoice date from'...(Error Code : 7)");
exit();
}
if((filter_var($registration_date_from_array[2], FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/[^0-9]+/")))))
{
echo("Error : Invalid year in 'Invoice date from'...(Error Code : 41)");
exit();
}
$registration_date_from=$registration_date_from_array[2]."-".$registration_date_from_array[1]."-".$registration_date_from_array[0];
}
}
?>
<?php
if(isset($_GET['registration_date_to']))
{
$registration_date_to=$_GET['registration_date_to'];
if($registration_date_to=="")
{
$registration_date_to="0000-00-00";
}
else
{
$registration_date_to_postback=$registration_date_to;
$registration_date_to_array=explode("-",$registration_date_to);
if(count($registration_date_to_array)!=3)
{
echo("Error : Invalid 'Invoice date from'...(Error Code : 4)");
exit();
}
if((strlen($registration_date_to_array[0])!=2)||($registration_date_to_array[0]=="")||($registration_date_to_array[0]=="00"))
{
echo("Error : Invalid day in 'Invoice date from'...(Error Code : 5)");
exit();
}
if((filter_var($registration_date_to_array[0], FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/[^0-9]+/")))))
{
echo("Error : Invalid day in 'Invoice date from'...(Error Code : 39)");
exit();
}
switch($registration_date_to_array[1])
{
case 'Jan':$registration_date_to_array[1]="01";break;
case 'Feb':$registration_date_to_array[1]="02";break;
case 'Mar':$registration_date_to_array[1]="03";break;
case 'Apr':$registration_date_to_array[1]="04";break;
case 'May':$registration_date_to_array[1]="05";break;
case 'Jun':$registration_date_to_array[1]="06";break;
case 'Jul':$registration_date_to_array[1]="07";break;
case 'Aug':$registration_date_to_array[1]="08";break;
case 'Sep':$registration_date_to_array[1]="09";break;
case 'Oct':$registration_date_to_array[1]="10";break;
case 'Nov':$registration_date_to_array[1]="11";break;
case 'Dec':$registration_date_to_array[1]="12";break;
}
if((strlen($registration_date_to_array[1])!=2)||($registration_date_to_array[1]=="")||($registration_date_to_array[1]=="00"))
{
echo("Error : Invalid month in 'Invoice date from'...(Error Code : 6)");
exit();
}
if((filter_var($registration_date_to_array[1], FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/[^0-9]+/")))))
{
echo("Error : Invalid month in 'Invoice date from'...(Error Code : 40)");
exit();
}
if((strlen($registration_date_to_array[2])!=4)||($registration_date_to_array[2]=="")||($registration_date_to_array[2]=="0000"))
{
echo("Error : Invalid year in 'Invoice date from'...(Error Code : 7)");
exit();
}
if((filter_var($registration_date_to_array[2], FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/[^0-9]+/")))))
{
echo("Error : Invalid year in 'Invoice date from'...(Error Code : 41)");
exit();
}
$registration_date_to=$registration_date_to_array[2]."-".$registration_date_to_array[1]."-".$registration_date_to_array[0];
}
}
?>
<!doctype html>
<html>
<?php include("common/page_head.php");?>
<link rel="stylesheet" href="../datepicker_css_js/jquery-ui.css">
<script src="../datepicker_css_js/jquery.js"></script>
<script src="../datepicker_css_js/jquery-ui.js"></script>
<link rel="stylesheet" href="../datepicker_css_js/style.css">
<script>
$(function() {
$('#registration_date_from,#registration_date_to').datepicker({ dateFormat: 'dd-M-yy' });
});
</script>
<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>
<form name="my_filters_form" method="get" onSubmit="return validate_form()">
<table style="width:98%;margin:auto;color:#333;line-height:25px;" border="0" cellpadding="3px" cellspacing="0" class="breadcrumb">
<tr>
<td><h1>Pending Initial Screenings</h1></td>
</tr>
</table><br>
<table style="width:98%;margin:auto;font-size:1.1em;color:#333;line-height:25px;" border="1" cellpadding="3px" cellspacing="0" class="breadcrumb">
<tr>
<td colspan="2"><strong>FILTERS</strong></td>
</tr>
<tr valign="top">
<td colspan="2">
<table>
<tr>
<td>Registration Date</td>
<td>:</td>
<td colspan="5">
<input type="text" id="registration_date_from" name="registration_date_from" placeholder=" From" value="<?php echo($registration_date_from_postback);?>" style="width:120px;" /> to <input type="text" id="registration_date_to" name="registration_date_to" placeholder=" To" value="<?php echo($registration_date_to_postback);?>" style="width:120px;" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<table style="width:98%;margin:auto;font-size:1em;color:#333;line-height:35px;" border="0" cellpadding="3px" cellspacing="0">
<tr>
<td align="right"><input type="button" onClick="window.location.href='all_children.php'" value="Reset" /> <input type="button" value="Apply Now" onClick="validate_form()" /></td>
</tr>
</table>
<br>
<table style="width:98%;margin:auto;font-size:1em;color:#333;font-weight:bold;" border="0" cellpadding="3px" cellspacing="0">
<tr>
<td>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
Per Page :
<select name="per_page" id="per_page">
<option
<?php
if($per_page_url=="50")
{
echo(" selected");
}
?>
>50</option>
<option
<?php
if($per_page_url=="100")
{
echo(" selected");
}
?>
>100</option>
<option
<?php
if($per_page_url=="500")
{
echo(" selected");
}
?>
>500</option>
<option
<?php
if($per_page_url=="1000")
{
echo(" selected");
}
?>
>1000</option>
</select>
</td>
<td style="padding-left:20px;">
Sort By :
<select name="sort_by" id="sort_by">
<option value="name"
<?php
if($sort_by=="name")
{
echo(" selected");
}
?>
>Child Name</option>
<option value="registration_no"
<?php
if($sort_by=="registration_no")
{
echo(" selected");
}
?>
>Registration No</option>
</select>
<select name="sort_order" id="sort_order">
<option value="ASC"
<?php
if($sort_order=="ASC")
{
echo(" selected");
}
?>
>Ascending</option>
<option value="DESC"
<?php
if($sort_order=="DESC")
{
echo(" selected");
}
?>
>Descending</option>
</select>
</td>
</tr>
</table>
</td>
<td align="right">
<span id="total_found_span"></span>
</td>
</tr>
</table>
<input type="hidden" name="page_no" id="page_no" value="<?php echo($page_no_postback);?>" />
<input type="hidden" id="per_page_url" value="<?php echo($per_page_url);?>" />
<input type="hidden" id="sort_by_reset_page" value="<?php echo($sort_by);?>" />
<input type="hidden" id="sort_order_reset_page" value="<?php echo($sort_order);?>" />
<input type="hidden" id="registration_date_from_reset_page" value="<?php echo($registration_date_from_postback);?>" />
<input type="hidden" id="registration_date_to_reset_page" value="<?php echo($registration_date_to_postback);?>" />
</form>
<div style="position:relative;height:5px;"></div>
<table style="width:98%;margin:auto;font-size:1em;color:#333;" border="1" cellpadding="3px" cellspacing="0">
<tr style="font-weight:bold;background-color:#333;color:#EEE;" class="table_headers">
<td style="width:30px;">S.NO</td>
<td style="width:120px;">ADMISSION NO</td>
<td>NAME</td>
<td>AGE</td>
<td>GENDER</td>
<td>EDUCATION</td>
<td>REGISTRATION DATE</td>
<td style="color:#FFF;background-color:#F00;">DAYS LEFT</td>
<td>STATUS</td>
</tr>
<?php
$reports_obj->set_value("franchise_id",$session_id);
$reports_obj->set_value("sort_by",$sort_by);
$reports_obj->set_value("sort_order",$sort_order);
$reports_obj->set_value("per_page",$per_page_url);
$reports_obj->set_value("page_no",$page_no_postback);
$reports_obj->set_value("registration_date_from",$registration_date_from);
$reports_obj->set_value("registration_date_to",$registration_date_to);
$reports_obj->all_pending_screening_children_report_between();
?>
</table>
<table style="width:90%;margin:auto;font-size:1em;" border="0" cellpadding="3px" cellspacing="0" class="page_no">
<tr>
<td>
<table>
<?php
$reports_obj->pagination();
?>
</table>
</td>
</tr>
</table>
</div><br /><br />
</div>
<script>
function validate_form()
{
var new_pp=$("#per_page").val();
var old_pp=$("#per_page_url").val();
if($("#per_page").val()!=$("#per_page_url").val())
{
$("#page_no").val("0");
}
if($("#sort_by").val()!=$("#sort_by_reset_page").val())
{
$("#page_no").val("0");
}
if($("#sort_order").val()!=$("#sort_order_reset_page").val())
{
$("#page_no").val("0");
}
if($("#registration_date_from").val()!=$("#registration_date_from_reset_page").val())
{
$("#page_no").val("0");
}
if($("#registration_date_to").val()!=$("#registration_date_to_reset_page").val())
{
$("#page_no").val("0");
}
document.my_filters_form.submit();
}
</script>
</body>
</html>