Current File : /home/inlingua/www/icentex/evaluation/php/fw_feedback_list.php |
<?php require_once("include/config/config.php");
include_functions(array('url', 'database','input','paging','date','email','file_handling','http','login','xml','image_manipulation', 'admin'));
$function=array('url', 'database','input');
include_functions($function);
//print_r($_POST);
$QueryObj = new query('fw_feedback');
if(isset($_POST['submit']) && $_POST['submit']=='Find')
{
if($_POST['start_date'] !='' && $_POST['end_date'] !='')
{
$Where .="and add_date between '".$_POST['start_date']."' and '".$_POST['end_date']."' ";
}
if(isset($_POST['course_id']) && $_POST['course_id'] !='')
{
//$course_id = substr($_POST['course_id'], 2);
$course_id = preg_replace("/[^0-9]/", "", $_POST['course_id'] );
$Where .="and course_id like '%".$course_id."' ";
}
if(isset($_POST['instructor_name']) && $_POST['instructor_name'] !='')
{
$Where .="and instructor_name like '%".$_POST['instructor_name']."%' ";
}
if($_POST['start_date'] =='' && $_POST['end_date'] =='' && $_POST['course_id'] =='' && $_POST['instructor_name'] =='')
{
$Where="and course_id='0'";
}
}else {
$QueryObj->AllowPaging=true;
$QueryObj->PageNo=isset($_GET['p'])?$_GET['p']:1;
$QueryObj->PageSize=25;
//$QueryObj->Where=" where id ='0' order by id desc";
$Where="and course_id='0'";
}
$QueryObj->Where=" where id !='0' $Where order by id desc";
$QueryObj->DisplayAll();
$count_project = $QueryObj->GetNumRows();
?>