Current File : /home/inlingua/public_html/noida/icentex_noida/s_Certificate/admin.action.php |
<?php
session_start();
ob_start();
// Include the database connection details
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();
// Records selection sql
$sqlQuery = "SELECT * FROM ingl_student where login='".$_REQUEST['username']."' and password='".$_REQUEST['passwd']."'";
// Select records from table
$selectedRecords = $dbObject->Select($sqlQuery);
// If no records selected, print message
if (!$selectedRecords)
{
$_SESSION['wrongpass']="Username or Password Wrong";
header("Location: index.php");
//header(Location :)
}
if ($selectedRecords)
{
$objectData=$dbObject->SelectNext();
$_SESSION['id']=$objectData['recNo'];
$_SESSION['SLogin']=$objectData['login'];
$_SESSION['usertype']="Student";
$_SESSION['studentName']=$objectData['studentName'];
$_SESSION['branch']=$objectData['branch'];
$queryRU="select * from ingl_course where courseid='".$objectData['courseId']."'";
$resultRU=mysql_query($queryRU) or die(mysql_query());
$numU=mysql_fetch_array($resultRU);
if($numU['language']=='English' )
{
//echo $numU['language'];
if($numU['level']=='1A' || $numU['level']=='1B' ) $location="certificate_1.php";
elseif($numU['level']=='2A' || $numU['level']=='2B' ) $location="certificate_2.php";
elseif($numU['level']=='3A' || $numU['level']=='3B' ) $location="certificate_3.php";
elseif($numU['level']=='4' ) $location="certificate_4.php";
elseif($numU['level']=='5' ) $location="certificate_5.php";
}
elseif($numU['language']=='German') $location="underconstruction.php";
elseif($numU['language']=='Spanish') $location="underconstruction.php";
header("Location:".$location."");
}
// Print navigation bar
?>