Beispiel #1
0
    die("An unexpected error occured while saving the record, Please try again!");
}
$Startup = mysql_fetch_assoc($res);
$Status = $Startup['Data1'];
$Class = $Startup['Data2'];
session_start();
?>
<DIV STYLE="font-family: 'Lucida Sans';">
<center><h1>Diagnostics</h1>
<table border=0 width=500>
<tr><td>Client IP</td><td>-</td></td><td align=right><?php 
echo $_SERVER['REMOTE_ADDR'];
?>
</td></tr>
<tr><td>Hashed IP</td><td>-</td><td align=right><?php 
echo HashString($_SERVER['REMOTE_ADDR']);
?>
</td></tr>
<tr><td>Currrent Selected Class</td><td>-</td><td align=right><?php 
echo GetClassName($Class);
?>
</td></tr>
<tr><td>Feedback Session</td><td>-</td><td align=right><?php 
if ($Status == 0) {
    echo "No Session";
} else {
    echo "Session Running";
}
?>
</td></tr>
</table>
Beispiel #2
0
mysql_select_db($mysql_database, $bd) or die("Could not select database");
$qry = "SELECT * FROM `table_data` WHERE ID='Startup'";
$res = mysql_query($qry);
if (!mysql_query($qry, $bd)) {
    die("An unexpected error occured while saving the record, Please try again!");
}
$Startup = mysql_fetch_assoc($res);
$status = $Startup['Data1'];
if ($status == 0) {
    header("location: index.php?e=1");
    exit;
}
$Class = $Startup['Data2'];
session_start();
$_SESSION['Class'] = $Class;
$ClientIP = HashString($_SERVER['REMOTE_ADDR']);
//loading faculty allocations
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database");
mysql_select_db($mysql_database, $bd) or die("Could not select database");
$qry = "SELECT * FROM `table_data` WHERE ID='" . $Class . "'";
$res = mysql_query($qry);
$allocation = mysql_fetch_assoc($res);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Choosing The Subject</title>
				<script src="pace/pace.js"></script>
Beispiel #3
0
<?php

require_once '../CoreLib.php';
session_start();
if ($_SESSION['LoginStatus'] == NULL) {
    header("location: index.php");
}
if ($_POST['adminUname'] == NULL || $_POST['adminPass'] == NULL) {
    header("location: index.php");
}
$uname = HashString($_POST['adminUname']);
$pass = HashString($_POST['adminPass']);
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database");
mysql_select_db($mysql_database, $bd) or die("Could not select database");
$qry = "SELECT * FROM `table_data` WHERE ID='Startup'";
$res = mysql_query($qry);
if (!mysql_query($qry, $bd)) {
    die("An unexpected error occured while saving the record, Please try again!");
}
$Startup = mysql_fetch_assoc($res);
if ($Startup['Data3'] == $uname && $Startup['Data4'] == $pass) {
    $_SESSION['LoginStatus'] = 1;
    $_SESSION['LoginError'] = 0;
    header("location: home.php");
} else {
    header("location: index.php");
    $_SESSION['LoginError'] = 1;
    $_SESSION['LoginStatus'] = 0;
}