| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/comservices/ |
Upload File : |
<?php require_once('Connections/comservice.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['user'])) {
$loginUsername=$_POST['user'];
$password=$_POST['pass'];
$MM_fldUserAuthorization = "mlevel";
$MM_redirectLoginSuccess = "backend/services.php";
$MM_redirectLoginFailed = "index.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_comservice, $comservice);
$LoginRS__query=sprintf("SELECT muser, mpass, mlevel FROM com_member WHERE muser=%s AND mpass=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $comservice) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'mlevel');
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ระบบแจ้งซ่อมครุภัณฑ์คอมพิวเตอร์ออนไลน์</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="#EEEEEE">
<h3> ระบบแจ้งซ่อมครุภัณฑ์คอมพิวเตอร์ออนไลน์ </h3></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"><br /> <br /></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF">
<form id="frmLogin" name="frmLogin" method="POST" action="<?php echo $loginFormAction; ?>">
<table width="300" border="0" align="center" cellpadding="5" cellspacing="1">
<tr>
<td height="40" colspan="2" align="center" bgcolor="#EEEEEE"><b> เข้าใช้งานระบบ </b></td>
</tr>
<tr>
<td width="176" bgcolor="#FFFFFF"> </td>
<td width="268" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><input name="user" class="form-control" id="user" size="10" placeholder="Username" required="required"/></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><input name="pass" type="password" class="form-control" id="pass" size="10" placeholder="Password" required="required"/></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF">
<button type="submit" class="btn btn-primary">เข้าสู่ระบบ</button></td>
</tr>
<tr>
<td colspan="2">
<font color="red">
user: username = a , password = a <br />
Admin: username = b , password = b
</font>
</td>
</tr>
<tr>
<td colspan="2" align="left"><a href="">
<strong><span class="glyphicon glyphicon-envelope"> </span> ลืมรหัสผ่าน</strong></a></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><b> <a href="" target="_blank"> <span class="glyphicon glyphicon-wrench"> </span> คู่มือการใช้งาน </a></b></td>
</tr>
</table>
</form>
<p> </p></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
<br />
<?php
include("footer.php")
?>
</body>
</html>