Current File : /home/inlingua/public_html/faridabad/icentex/admin_fd/student_ajax.php |
<?php
require('../dbConnection.php');
// Include common functions
require('../commonFunc.php');
// Include common functions
require('../globalVars.php');
// Include the table handler class
require('../dbHandler.class.php');
// Init and connect to database
$dbObject = new dbHandler();
$dbObject->connect();
$cid=$_REQUEST['CID'];
$sqlQ = "SELECT recNo, language, level, startdate, enddate,courseid,start_hour,end_hour,courseday,start_minute,end_minute FROM ingl_course where recNO='".$cid."' ";
//echo $sqlQuery;
$res=mysqli_query($conn,$sqlQ) or die();
$num=mysqli_fetch_object($res);
if($num->level=='1A' || $num->level=='1B') $table='level_1';
else if($num->level=='2A' || $num->level=='2B') $table='level_2';
else if($num->level=='3A' || $num->level=='3B') $table='level_3';
else if($num->level=='4') $table='level_4';
else if($num->level=='5' ) $table='level_5';
$echovalue .="<table cellpadding='3' width='100%'>";
$echovalue .="<tr><td><input type='hidden' name='language' value='".$num->language."' >
<input type='hidden' name='course' value='".$num->courseid."'/>
<input type='hidden' name='stime' value='".$num->start_hour.":".$num->start_minute."' />
<input type='hidden' name='etime' value='".$num->end_hour.":".$num->end_minute."' />
<input type='hidden' name='day' value='".$num->courseday."' />
<b>Language</b></td><td>".$num->language."<br></td>";
$echovalue .="<td><input type='hidden' name='level' value='".$num->level."' ><b>Level </b></td><td>".$num->level."<br></td></tr>";
$echovalue .="<tr><td><input type='hidden' name='startDate' value='".$num->startdate."' ><b>Start date </b></td><td>".$num->startdate."<br></td>";
$echovalue .="<td><input type='hidden' name='endDate' value='".$num->enddate."' ><b>End date </b></td><td>".$num->enddate."<br></td></tr></table>";
//$sqlQuery = "SELECT s.recNo, s.studentName,t.student_recNo FROM ingl_student s
//left join ". $table." t on s.recNo=t.student_recNo
//where s.courseId='".$cid."' order by s.studentName desc ";
//echo $sqlQuery;
//$result=mysqli_query($conn,$sqlQuery) or die();
//$echovalue ="<select name='courseid'>";
//$k=0;
/*$echovalue .="<table border='0' cellpadding='3' width='100%'>";
while($row=mysqli_fetch_object($result))
{
if($row->student_recNo >0)
{}
else
{
if($k%3==0 ) $echovalue .="<tr>";
$echovalue .="<td><input name='student_id[]' type='checkbox' checked value='".$row->recNo."'>".$row->studentName."<br></td>";
if($k%3==2 ) $echovalue .="</tr>";
$k++;
}
}
/*if($k>0)
{
$echovalue .="<tr><td colspan='3' align='right'>";
$echovalue .="<input type='submit' name='sub' id='sub' value=' Next >>' ><td></tr>";
}
else
{
$echovalue .="<tr><td colspan='3' align='right'>";
$echovalue .="<input type='submit' name='sub' id='sub' value=' Next >>' disabled ><br>(No Student Left)<td></tr>";
}
$echovalue .="</table>";*/
echo $echovalue;
?>