| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/onesolution.com.hk/support/ |
Upload File : |
<?php require("configure.php"); ?>
<?
require 'checkuser.php';
if($logged_in == 1) {
header("Location: index.php");
}
?>
<?php
$userid = $_POST["userid"];
//$password = md5($_POST["password"]);
$password = $_POST["password"];
$sql = "SELECT * FROM SYS_STAFF where userid = '$userid' and password = md5('$password') and STATUS = 1";
$result=mysql_query($sql);
$num=mysql_numrows($result);
if ($num > 0)
{
$msg = "logon success";
$flag = "T";
$userid = mysql_result($result,0,"userid");
$password = mysql_result($result,0,"password");
//$role = mysql_result($result,0,"role");
$userid = mysql_result($result,0,"userid");
$username = mysql_result($result,0,"staffname");
$roleid = mysql_result($result,0,"roleid");
//setcookie("userid", $userid, time()+3600);
//setcookie("userid", $userid, time()+3600);
//setcookie("role", $role, time()+3600);
$_POST['userid'] = stripslashes($_POST['userid']);
$_SESSION['userid'] = $_POST['userid'];
$_POST['password'] = stripslashes($_POST['password']);
$_SESSION['password'] = $_POST['password'];
$_SESSION['username'] = $username;
$_SESSION['roleid'] = $roleid;
header("Location: index.php");
}
?>
<html>
<head>
<link rel="stylesheet" href="main.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>One Solution Limited - Support</title>
</head>
<body onload="addform.userid.focus()">
<br>
<br>
<center>
<a href="../"><img src="images/logo250x50.gif" border="0"></a>
</center>
<form action="logon.php" method="post" name="addform">
<table width="350" valign='top' align="center" border='0' cellpadding='1' cellspacing='1' bgcolor='#c0c0c0'>
<tr><td class='content' bgcolor='#FFFFFF' align='center' valign='center'>
<br><br>
<form action="logon.php" method="post" name="addform">
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr><td class='content' align="right" width="200" height="30">User Name</td><td class='content'>:   </td>
<td class='content'><input type="text" class='content' name="userid" value="" size="25" maxlength="25"></td></tr>
<tr><td class='content' align="right" valign="top" height="30">Password</td><td class='content' valign="top">:   </td>
<td class='content'><input type="password" class='content' name="password" value="" size="25" maxlength="25"></td></tr>
<tr><td colspan="2" align="right" height="30"></td>
<td align="right" class="contenttext"><input type="submit" value="User Login" class='content'></td></tr>
</table>
</form>
<br>
</td></tr>
</table>
</form>
<center>
<div class="footer">
Copyrights © One Solution Limited
</div>
</center>
</body>
</html>