| 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/(Del)gepgroup.hk/webadmin/ |
Upload File : |
<?php
require_once( realpath(dirname(__FILE__)) . '/../common/config.php');
require_once( realpath(dirname(__FILE__)) . '/function_is_login.php');
if (is_login())
{
header("Location: main.php");
exit;
}
if (!SysCmsUser::exists())
{
$user = new SysCmsUser(array('name'=>'Sky', 'login_name'=>'skyadmin', 'password'=>'0d78b065f67f10fbdcd2e648bc02f0eb', 'role'=>'superadmin', 'status'=>1));
$user->save() or die('Create user failure.');
$user = new SysCmsUser(array('name'=>'Admin', 'login_name'=>'admin', 'password'=>'2e6e5a2b38ba905790605c9b101497bc', 'role'=>'admin', 'status'=>1));
$user->save() or die('Create user failure.');
}
$is_postback = isset($_POST['loginname'], $_POST['password']);
if ($is_postback)
{
$login_name = trim($_POST['loginname']);
$password = trim($_POST['password']);
//$autologin = $_POST['autologin'];
$user = SysCmsUser::first(array('conditions' => array('login_name = ? AND password = ? AND actived = ?', $login_name, md5($password), 1)));
if ($user === NULL)
{
// user not found.
unset($_SESSION['webadmin']);
}
else
{
$_SESSION['webadmin'] = $user->attributes();
header("Location: main.php");
exit;
}
}
?>
<!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" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Content Management System (CMS) - Powered by One Solution Limited</title>
<style type="text/css">
<!--
body {
padding:0px;
margin-top: 50px;
background-color:#666666;
font-family: Arial;
font-size: 12px;
color: #666666;
text-decoration: none;
}
#error_notification {
border: 1px #A25965 solid;
height: auto;
padding: 4px;
background: #F8F0F1;
text-align: center;
-moz-border-radius: 5px;
}
-->
</style>
</head>
<body>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><img alt="" src="images/login_topf.jpg" width="500" height="15" /></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#FFFFFF"><img alt="" src="images/logo.jpg" width="435" height="150" /></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><img alt="" src="images/login_line.jpg" width="500" height="15" /></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#FFFFFF"><?php
if ($is_postback)
{
?>
<div id="error_notification">The submitted login info is incorrect.</div>
<?php
}
?>
<form name="login" method="post" action="login.php">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="right">Login ID</td>
<td align="left">: </td>
<td align="left"><input id="name" type="text" name="loginname" style="width:200px;" /></td>
</tr>
<tr>
<td align="right">Password</td>
<td align="left">: </td>
<td align="left"><input type="password" name="password" style="width:200px;" /></td>
</tr>
<tr>
<td align="right"> </td>
<td align="left"> </td>
<td align="left"><input type="checkbox" name="autologin" value="1" />
Keep me signed in </td>
</tr>
<tr>
<td colspan="2" align="center"></td>
<td colspan="2" align="left"><input id="submit" type="submit" name="submit" value=" Login " /></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><img alt="" src="images/login_line.jpg" width="500" height="15" /></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td><img alt="" src="images/login_footerf.jpg" width="500" height="15" /></td>
</tr>
</table>
</body>
</html>