⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add.asp

📁 基于asp的 班级同学录主页源代码
💻 ASP
字号:
<%
'程序名称:cctony mynews v1.0(cctony首页更新 v1.0)
'程序作者:李方进(cctony)
'主页:http://okcool.mycool.net(新生代网络创意)
'OICQ:344827    E-mail:lfj1999@cmmail.com
'本程序是免费程序,您可以任意自由复制,传播。但请您尊重作者劳动,不要修改程序内的版权信息。
%>
<!-- #include file="err.asp" -->
<html>
<title>首页更新</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="style.css" rel=stylesheet>
<meta name="Microsoft Theme" content="strtedge 011, default">
<meta name="Microsoft Border" content="tl, default">
</head>
<body background="../../_themes/strtedge/strbkgde.gif" bgcolor="#FFFFFF" text="#000000" link="#660000" vlink="#003399" alink="#999933"><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><!--mstheme--><font face="宋体">

<p align="center"><font size="6"><strong></strong></font><br>
</p>
<p align="center">&nbsp;</p>

<!--mstheme--></font></td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top" width="1%"><!--mstheme--><font face="宋体">



<!--mstheme--></font></td><td valign="top" width="24"></td><!--msnavigation--><td valign="top"><!--mstheme--><font face="宋体">
<!--mstheme--></font><table width="81%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr><td><!--mstheme--><font face="宋体"><!--mstheme--></font><table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolordark="#999966" bordercolorlight="#CCCC99" align="center">
<tr align=center><td bgcolor="#33CCFF"><!--mstheme--><font face="宋体"><B>用户资料修改</B><!--mstheme--></font></td>
<td bgcolor="#33CCFF"><!--mstheme--><font face="宋体"><B>添加新信息</B><!--mstheme--></font></td></tr><tr><td><!--mstheme--><font face="宋体">
<form method="POST" action="changezl.asp">
<div align="center">用户名:
<input type="text" name="username" size="10" value="">
<br>
密 码:
<input type="text" name="password" size="10" value="">
<br>
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="清除">
</div></form><!--mstheme--></font></td><td><!--mstheme--><font face="宋体">
<form method="POST" action="save.asp" >
<div align="center">标题<br>
<input type="text" name="name" size="60" value="">
<br>
内容 <br>
<textarea name="neirong" rows="3" cols="60"></textarea>
<br>
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="清除">
</div>
</form><!--mstheme--></font></td></tr></table><!--mstheme--><font face="宋体"><!--mstheme--></font></td></tr></table><!--mstheme--><font face="宋体">
<%
If Request.QueryString("CurPage") = "" or Request.QueryString("CurPage") = 0 then
CurPage = 1
Else
CurPage = CINT(Request.QueryString("CurPage"))
End If
%>
<!-- #include file="connect.asp" -->
<%rs.Open "Select * From data Order By time DESC", conn, 1,1%>
<%if rs.eof and rs.bof then%>
暂时没有任何记录!!
<%else
RS.PageSize=10'设置每页记录数
Dim TotalPages
TotalPages = RS.PageCount

If CurPage>RS.Pagecount Then
CurPage=RS.Pagecount
end if

RS.AbsolutePage=CurPage
rs.CacheSize = RS.PageSize'设置最大记录数
Dim Totalcount
Totalcount =INT(RS.recordcount)

StartPageNum=1
do while StartPageNum+10<=CurPage
StartPageNum=StartPageNum+10
Loop

EndPageNum=StartPageNum+9

If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount       %>
<!--mstheme--></font><table border="1" width="80%" cellpadding="1" cellspacing="0" bordercolordark="#999966" bordercolorlight="#CCCC99" align="center">
<tr>
<td bgcolor="#33CCFF" height="20"><!--mstheme--><font face="宋体"><b>&nbsp;标题</b><!--mstheme--></font></td>
<td  align="center" bgcolor="#33CCFF" height="20"><!--mstheme--><font face="宋体"><b>时 间</b><!--mstheme--></font></td>
<td height="20" align="center" bgcolor="#33CCFF"><!--mstheme--><font face="宋体"><b>操作</b><!--mstheme--></font></td>
</tr>
<%I=0
p=RS.PageSize*(Curpage-1)
do while (Not RS.Eof) and (I<RS.PageSize)
p=p+1%>
<tr>
<td bordercolorlight="#C0C0C0" align=left><!--mstheme--><font face="宋体"><b><%=rs("name")%></b><!--mstheme--></font></td>
<td  align="center"><!--mstheme--><font face="宋体">[<%=rs("time")%>]<!--mstheme--></font></td>
<td bordercolorlight="#c0c0c0" align=middle><!--mstheme--><font face="宋体"><a href="del.asp?id=<%=rs("id")%>">删除</a>|<a href="modifile.asp?id=<%=rs("id")%>">修改</a><!--mstheme--></font></td>
</tr>
<%I=I+1
RS.MoveNext
Loop%>
<tr><td colspan=4 align=middle bordercolorlight="#C0C0C0"><!--mstheme--><font face="宋体">页次: <font color="#CC0000"><%=CurPage%></font>/<%=TotalPages%>
页数: <a href="add.asp?CurPage=<%=StartPageNum-1%>">&lt;&lt;</a>
<% For I=StartPageNum to EndPageNum
if I<>CurPage then %> <a href="add.asp?CurPage=<%=I%>"><%=I%></a> <% else %>
<%=I%> <% end if %> <% Next %>
<% if EndPageNum<RS.Pagecount then %> <a href="add.asp?CurPage=<%=EndPageNum+1%>">下页</a>
<%end if%>|<a href="add.asp">刷 新</a><!--mstheme--></font></td></tr>
</table><!--mstheme--><font face="宋体">
<!--mstheme--></font><!--msnavigation--></td></tr><!--msnavigation--></table></body>
</html>
<%
end if
rs.close
set rs=nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -