Response.Write("第<a href=search.asp?page=" & i & "&add_result=" & add_result & _
"&bt=" & server.htmlencode(bt) & "&zz=" & server.URLEncode(zz) & _
"&lj=" & lj & "&lx=" & server.URLEncode(lx) & ">" & i &"</a>页 ")
end if
end if
next
else
for i=bsy to zys
tmp=tmp+1
if tmp=11 then
tmp=0
Response.Write("<a href=search.asp?page=" & i & "&bs=next&bsy=" & i & _
"&add_result=" & add_result & "&bt=" & server.URLEncode(bt) & "&zz=" & server.htmlencode(zz) & _
"&lj=" & lj & "&lx=" & server.URLEncode(lx) & "> 下10页>></a>")
exit for
else
if i=ymh then
Response.Write("第" & i & "页 ")
else
Response.Write("第<a href=search.asp?page=" & i & "&bs=next&bsy=" & bsy & _
"&add_result=" & add_result & "&bt=" & server.URLEncode(bt) & "&zz=" & server.htmlencode(zz) & _
"&lj=" & lj & "&lx=" & server.URLEncode(lx) & ">" & i &"</a>页 ")
end if
end if
next
end if
response.write("</td></tr>")
rec.AbsolutePage=ymh
%>
<tr>
<td width="39%" align="center" bgcolor='#FF9900'>题目</td>
<td width="11%" align="center" bgcolor='#FF9900'>作者</td>
<td width="14%" align="center" bgcolor='#FF9900'>上传时间</td>
<td width="7%" align="center" bgcolor='#FF9900'>年级</td>
<td width="9%" align="center" bgcolor='#FF9900'>类别</td>
<td width="9%" align="center" bgcolor='#FF9900'>点击数</td>
<td width="11%" align="center" bgcolor='#FF9900'>评论条数</td>
</tr>
<%
do while not rec.eof and j<rec.PageSize
j=j+1
Response.Write("<tr>")
Response.Write("<td width='39%' align='center'><a href='clicktoread.asp?id=" & _
rec.fields("id").value & "'>" & rec.fields("题目").value & "</a></td>")
Response.Write("<td width='11%' align='center'>" & rec.fields("发表者").value & "</td>")
Response.Write("<td width='14%' align='center'>" & ShowTextPart(rec.fields("发表时间").value,10) & "</td>")
Response.Write("<td width='7%' align='center'>" & rec.fields("年级").value & "</td>")
Response.Write("<td width='9%' align='center'>" & rec.fields("类别").value & "</td>")
Response.Write("<td width='9%' align='center'>" & rec.fields("点击次数").value & "</td>")
Response.Write("<td width='11%' align='center'>" & rec.fields("评论条数").value & "</td>")
Response.Write("</tr>")
rec.movenext
loop
response.write("</table>")
rec.close
set rec=nothing
con.Close
set con=nothing
%>
游览者可以在网上点击[网上投稿]直接提交自己的作文。点击后先出现一个投稿表单,其代码如下:
<html>
<head><title>谢谢你提交作文!</title></head>
<body>
<p>上传文章<br>
<form method="post" action="tjzw.asp" style="font:9pt">
<table border="0" cellpadding="0" cellspacing="0" style="font:9pt">
<tr>
<td align="left">[题目]</td></tr><tr><td><input type="text" >"title" size="20"></td>
</tr>
<tr>
<td align="left">[类型]</td></tr><tr><td><select size="1" >"type">
<option selected value="写人">写人</option>
<option value="记事">记事</option>
<option value="状物">状物</option>
<option value="说明文">说明文</option>
<option value="议论文">议论文</option>
<option value="诗歌">诗歌</option>
<option value="散文">散文</option>
</select></td>
</tr>
<tr>
<td align="left">[年级]</td></tr><tr><td>
<select size="1" >"lj">
<option selected value="1">一年级</option>
<option value="2">二年级</option>
<option value="3">三年级</option>
<option value="4">四年级</option>
<option value="5">五年级</option>
<option value="6">辣年级</option>
</select></td>
</tr>
<tr>
<td align="left">[作者]</td></tr><tr><td><input type="text" >"xm" size="6">
</td>
</tr>
<tr>
<td align="left">[指导老师]</td></tr><tr><td>
<input type="text" >"teacher" size="20"></td>
</tr>
<tr>
<td align="left">[内容]</td></tr><tr><td>
<textarea rows="8" >"content" cols="30" style="font-style:normal; font-size:9pt; font-family:宋体"></textarea></td>
</tr>
</table>
<input type="submit" value="提交">
<input type="reset" value="清空">
</form>
</body>
</html>
浏览者填完表单中各项数据后点击[确定]后由tjzw.asp文件来将各数据项写入数据库。
<%@ Language=VBScript %>
<HTML>
<HEAD>
<style type="text/css" rel=stylesheet>
A:link {color:blue;text-decoration:none;}
A:hover {color:red;text-decoration:none;}
A:visited}
上一页 [1] [2] [3] [4] [5] [6] 下一页