Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- session_start();
- session_register("user");
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Login</title>
- </head>
- <body bgcolor="#666" style="color:#FFF">
- <?php
- require "Functions.php";
- $user=@$_REQUEST['user'];
- if($user!=null)
- {
- $pass=$_REQUEST['pass'];
- //有帳號唷
- //攻擊驗證
- if(!preg_match('/^[A-Za-z0-9]+$/',$user) || !preg_match('/^[A-Za-z0-9]+$/',$pass))
- {
- //有攻擊!!
- $url=$GLOBALS['Msg']['AttackAlert'];
- echo "<script>alert('$url');</script>";
- }else
- {
- //驗證登入
- if(VertifyAccount($user,$pass))
- {
- $_SESSION['user']=$user;
- //登入了唷
- echo "<script>window.location='index.php';</script>";
- }else
- {
- $url=$GLOBALS['Msg']['LoginError'];
- echo "<script>alert('$url');</script>";
- }
- }
- }
- ?>
- <form name="RegisterForm" action="Login.php" method="POST">
- <input type="hidden" name="Method" value="create"/>
- <table style="background:#333; color:#FFF; border: 1px solid;">
- <tr>
- <td colspan="2"><h1>AtomixECO Login</h1></td>
- </tr>
- <tr>
- <td>
- UserID:
- </td>
- <td>
- <input type="text" name="user" value=""/>
- </td>
- </tr>
- <tr>
- <td>
- Password:
- </td>
- <td>
- <input type="password" name="pass" value=""/>
- </td>
- </tr>
- <tr>
- <td>
- </td>
- <td align="right">
- <input type="submit" value="Login">
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement