📄 index.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据库原理课程设计问题反馈留言系统</title>
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(../pic/backcolor.gif);
}
-->
</style></head>
<body>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><IFRAME marginWidth=0 marginHeight=0
src="../pic.asp" frameBorder=0 width=690 scrolling=auto
height=35></IFRAME> </td>
</tr>
<tr>
<td><table width="458" height="485" border="0" align="center" cellspacing="0">
<tr>
<td width="456" height="187">
<form name="form1" method="post" action="add.asp">
<table width="100%" border="0" cellspacing="0">
<tr>
<td height="28" colspan="2"><div align="center">长沙理工大学计通学院0203203班数据库原理课程设计信息反馈留言版</div></td>
</tr>
<tr>
<td width="51%" height="18"><br>
你的名字:
<input name="name" type="text" id="name" value="王晓麦">
<br>
</td>
<td width="49%" valign="bottom">你的主页:
<input name="homepage" type="text" id="homepage" value="http://">
</td>
</tr>
<tr>
<td>留言标题:
<input name="title" type="text" id="title" value="数据库课程设计">
</td>
<td> </td>
</tr>
<tr>
<td colspan="2">请在下面填写你的留言:</td>
</tr>
<tr valign="top">
<td colspan="2"><textarea name="content" cols="63" rows="7" id="content">小组成员:王晓麦,倪丹,马雪玲
联系电话:0731-2619817</textarea>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
<br>
<br>
</td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="14" bgcolor="#FF6600">查看留言 </td>
</tr>
<tr>
<td height="84">
<%
'Server对象的CreateObject方法建立Connection对象
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="driver={SQL Server};server=(Local);UID=sa;PWD=13513343483;Database=学院人事管理系统"
Conn.Open
'定义Recordset对象
Set rs=Server.CreateObject("ADODB.Recordset")
'设置rs的ActiveConnection属性,绑定到连接
Set rs.ActiveConnection = Conn
'设置游标类型
rs.CursorType = 3
'执行SQL语句,读取所有的用户数据,并保存结果到记录集对象rs中
rs.Open "Select id,name,content,homepage,title,ti_me from book "
'循环显示所有的用户数据,同时画出表格
Do While Not rs.EOF
%>
<table width="98%" border="1" cellspacing="0" bordercolor="#FF9900" class=thin>
<tr>
<td width="21%"><div align="center"><%=rs("name")%><br>
给你留的言</div></td>
<td width="79%"> <a href="<%=rs("homepage")%>" target="_blank">他的主页</a> [留言标题: <%=rs("title")%> ] </td>
</tr>
<tr>
<td height="16" colspan="2">
<div align="left">留言的时间:<%=rs("ti_me")%></div></td>
</tr>
<tr>
<td height="87" colspan="2"><div align="center">
<table width="74%" height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><%=rs("content")%></div></td>
</tr>
<tr>
<td><div align="right"><a href="login.asp">管理留言</a></div></td>
</tr>
</table>
<div align="right"></div>
</div></td>
</tr>
</table>
<%
rs.MoveNext
Loop
%>
</td>
</tr>
<tr>
<td height="18"> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -