查看文件: index.php
大小: 2.81 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <? if (!isset($_SESSION)){ session_start(); }?> <?php if (isset($_POST['Submit'])){ $colname_W2 = "1"; $colpass_W2 = "1"; if (isset($_POST['name'])) { $colname_W2 = (get_magic_quotes_gpc()) ? $_POST['name'] : addslashes($_POST['name']); $colpass_W2 = (get_magic_quotes_gpc()) ? $_POST['passwd'] : addslashes($_POST['passwd']); } mysql_select_db($database_BE2, $BE2); $query_W2 = sprintf("SELECT * FROM user WHERE name = '%s' AND passwd ='%s'", $colname_W2,$colpass_W2); $W2 = mysql_query($query_W2, $BE2) or die(mysql_error()); $row_W2 = mysql_fetch_assoc($W2); $totalRows_W2 = mysql_num_rows($W2); //echo $query_W2; //echo "<br>"; //echo $row_W2['website']; if (($totalRows_W2>0) && ($row_W2['website']=='skybni')){ $_SESSION['login_adboss']=$row_W2['website']; //tzhu $_SESSION['login_group']=$row_W2['stat']; //A,B,C $_SESSION['login_lv']=$row_W2['level']; //2,5,8 $_SESSION['login_id']=$row_W2['id']; //user id //$_SESSION['stat']='A'; header(sprintf("Location: %s", 'index1.php')); // echo $_SESSION['login_boss']; }else { header(sprintf("Location: %s", '../index.php')); } mysql_free_result($W2); } if($_SERVER['REMOTE_ADDR']=="220.130.43.120") { $_SESSION['login_boss']='288twtest1'; $_SESSION['login_group']='A'; $_SESSION['login_lv']=7; $_SESSION['login_id']=1; header(sprintf("Location: %s", 'index1.php')); } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>管理系統登入-請輸入帳號密碼</title> <style type="text/css"> body { background-color: #fff; } .txt { color: #000000; } </style> </head> <body> <form name="form1" method="post" action=""> <p> </p> <p> </p> <table width="350" height="250" border="0" align="center" cellpadding="0" cellspacing="0" background="images/loginbg.png"> <tr> <td><table width="253" border="0" align="center" cellpadding="0" cellspacing="0" class="font_blank_12x"> <tr> <td colspan="2" align="center" valign="middle"> </td> </tr> <tr> <td width="219" height="61" align="center" valign="middle"><h3 class="txt">帳號</h3></td> <td width="255"><input name="name" type="text" id="name" size="20" maxlength="20"> </td> </tr> <tr> <td height="54" align="center" valign="middle"><h3 class="txt">密碼</h3></td> <td><input name="passwd" type="password" id="passwd" size="20" maxlength="20"></td> </tr> <tr> <td height="30" colspan="2"><div align="center"> <input type="submit" name="Submit" value="登入"> </div></td> </tr> </table></td> </tr> </table> <p> </p> <p> </p> </form> </body> </html>
保存
取消
返回文件列表