📄 default.asp
字号:
<!--#include file="Conn.asp"-->
<%
dim sql,objRS,objRS_path
dim ID,tttt
dim i
dim thispath
dim pagecount,currpage,Spage,Epage,recordcount,logo,siteabout,stationname,userid
ID = session("txtId")
tttt = Request.QueryString("info")
currpage = request.querystring("currpage")
if ID = "" then
Response.Write("会员页面,请注册登录")
Response.Write("<form ACTION=userlogin.asp METHOD=POST NAME=formSignUp>")
Response.Write("<p>用户:<input type=text size=8 name=userid>密码:<input type=Password size=8 name=password> <input type=submit name=cmdOk value=确定 ONCLICK=javascript:return checksignup()>")
Response.Write("<a href=lookpwd.asp target=_blank>忘记密码</a> <a href=Register_1.asp target=_blank>注册为用户</a> ")
Response.Write("</form>")
Response.End
else
sql = "select * from stationinfo where userid = " & session("txtId")
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open sql,objConn,3,1
sql = "select * from pathform where thispath like '%" & ID & "'"
Set objRS_path = objConn.Execute(sql)
if not objRS_path.EOF then thispath = GetPath(objRS_path("thispath"),objRS_path("pathname"),FALSE)
end if
if currpage = "" or IsNull(currpage) then currpage = 1
if not IsNumeric(currpage) then currpage = 1
currpage = Cint(currpage)
%>
<html>
<head>
<title>会员管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td { font-family: "宋体", "serif"; font-size: 9pt}
a:link { font-size: 9pt; color: #003399; text-decoration: underline}
a:hover { font-size: 9pt; color: #FF9900; text-decoration: underline}
a:visited { font-size: 9pt; text-decoration: underline}
.unnamed1 { font-family: "宋体", "serif"; font-size: 10.5pt}
-->
</style>
</head>
<body bgcolor="#FFFFFF" vlink="#003399" alink="#CCCCCC" leftmargin="0" topmargin="0"><!--#include file="top.htm"-->
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="214" valign="top"> <table width="210" border="0" cellspacing="1" cellpadding="0" bgcolor="#666666" height="100%">
<tr bgcolor="#FFFFFF">
<td width="204"> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FDFDFD" align="center" height="100%">
<tr bgcolor="#FFC820">
<td height="22" bgcolor="#73D649"><div align="center"><b><font color="#B00000" class="unnamed1">会员服务中心</font></b></div></td>
</tr>
<tr>
<td align="center" valign="top"> <table border=0 cellpadding=3 cellspacing=0 width="100%">
<tbody>
<tr>
<td><img height=2 src="" width=1></td>
</tr>
<tr>
<td valign=top width="4%"> </td>
</tr>
</tbody>
</table>
<p>
<%if session("txtClass")="普通会员" then%>
<img src="images/icon6.gif" width="17" height="17" border="0">
<%end if%>
</p>
<p>
<%if session("txtClass")="vip会员" then%>
<img src="images/biaoshi.gif" width="40" height="48" border="0">
<%end if%>
<br>
您的身份是: <%=session("txtClass")%>
<p><br>
</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p></td>
</tr>
</table></td>
</tr>
</table></td>
<td valign="top"> <p>
<%
userid = session("txtId")
%>
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from stationinfo where userid ='" & userid & "'"
rs.open sqltext,conn,1,1
dim MaxPerPage
MaxPerPage=10
'假如没有数据时
If rs.eof and rs.bof then
call showpages
response.write "<p align='center'>您还没发布有信息,点击<a href='../Submit-class.asp' target='_blank'>发布信息</a></p>"
response.end
End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call showpages
call list
If Rs.recordcount > MaxPerPage then
call showpages
end if
'显示帖子的子程序
Sub list()%>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><strong><font color="#FF0000">注意:同一条信息重复发布两次以上将被认为是恶意发布信息,您所发布的信息将会全部被删除!</font></strong></td>
</tr>
</table>
<form method='POST' action='news1_Search.asp'>
<table width="100%" height="13" border="0" cellpadding="0" cellspacing="1" bordercolorlight="#416327" bordercolordark="#DEEBD6" bgcolor="#2995FF">
<tr>
<td width="8%" height="19" align="center" bgcolor="#2995FF" class=main2><font color="#FFFFFF">编号</font></td>
<td width="44%" height="19" align="center" bgcolor="#2995FF" class=main2><font color="#FFFFFF">信息标题</font></td>
<td width="9%" height="19" align="center" bgcolor="#2995FF" class=main2><font color="#FFFFFF">有效期</font></td>
<td width="14%" height="19" align="center" bgcolor="#2995FF" class=main2><font color="#FFFFFF">发布日期</font></td>
<td width="8%" height="19" align="center" bgcolor="#2995FF" class=main2><font color="#FFFFFF">状态</font></td>
<td width="17%" height="19" align="center" bgcolor="#2995FF" class=main2><font color="#FFFFFF">操作</font></td>
<%
if not rs.eof then
i=0
do while not rs.eof
%>
<tr bgcolor="#FFFFFF" class=main2>
<td width="8%" height="1" align="left">
<p align="center"><%=rs("ID")%></p></td>
<td align="left"><%=rs("stationname")%></td>
<td width="9%" align="center"><%=rs("infotime")%></td>
<td width="14%" align="left"><%=rs("thisdate")%></td>
<center>
<td width="8%" height="1" align="center">
<%if rs("ispass")="True" then%>
已审核<%else%>
<font color="#FF0000">待审核</font>
<%end if%>
</td>
<td width="17%" align="center"><a href="../information.asp?ID=<%=rs("id")%>" target="_blank">查看</a>
<a href="modify1.asp?staid=<%=rs("id")%>" target="_self">修改</a>
<a href="../information.asp?ID=<%=rs("id")%>" target="_blank">删除</a>
</td>
</center>
</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%>
</table>
<br>
<%
End sub
rs.close
conn.close
%><div align="center">
</form>
<center>
<p>
<%
'显示翻页的子程序
sub showpages()%>
</p>
<table bgColor="#f8e8a0" border="0" cellPadding="0" cellSpacing="0" width="100%" >
<tr>
<td >
<%
response.write "<form method=Post action='user1info.asp'>"
%>
<table bgColor="#1f60a0" border="0" cellPadding="0" cellSpacing="0" width="100%" height="30">
<tr>
<td bgcolor="#DEEBD6" class=main2> <p align="left"> <font color="#000000">
<%
Response.write "您已发布"& Cstr(Rs.RecordCount) & "条信息;"
If currentpage > 1 Then
response.write "<a href='default.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='default.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上页</font></a><font color='#ffffff'><b>-</b></font>"
Else
Response.write "<font color='#000000'>首页-</font>"
Response.write "<font color='#000000'>上页-</font>"
End if
If currentpage < Rs.PageCount Then
Response.write "<a href='default.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下页</font></a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='default.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a> "
Else
Response.write "<font color='#000000'>下页-</font>"
Response.write "<font color='#000000'>尾页</font> "
End if
Response.write "<font color='#000000'>页次:</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font> "
Response.write "<font color=#ff0000>" & Cstr(MaxPerPage) & "</font>" & "<font color='#000000'>条记录/页 " & "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条记录</font> "
response.write "</td><td align='right'>"
response.write "<font color='#ffffff' class=main2>转到:</font><input type='text' name='page' size=4 maxlength=4 class=smallInput value="&Currentpage&"> "
response.write "<input class=buttonface type='submit' value='Go' name='cndok' style='background-color: #e1f0ff'></span> "
%>
</font></td>
</tr>
</table></td>
</tr>
</table>
<%end sub%>
</center>
</td>
</tr>
</table>
<!--#include file="copyright.htm"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -