📄 club.asp
字号:
<%
'---------------------------------------------------------------------------------------------
id=clng(request("id"))
set rs=server.createobject("adodb.recordset")
sql="select * from "&WebSqlType&"_club where "&WebSqlType&"_ID="&id
rs.open sql,conn,1,1
if rs.eof then
response.write"<script>alert('对不起,此用户不存在或已被管理员关闭\n\n如有问题请及时和我们联系');window.open('/index.asp','_self');</script>"
response.end
end if
goname=rs(""&WebSqlType&"_webname")
goid=rs(""&WebSqlType&"_id")
title=trim(rs(""&WebSqlType&"_title"))
co=trim(rs(""&WebSqlType&"_co"))
'-------------------------------------------------------------------------------------------
Function Cactivitxtitle()
response.write"<DIV class=nav><SPAN class=tags><A "
if trim(request("msort"))="" then
response.write"class=selectTag "
end if
response.write" href='activitx.asp?id="&id&"'>所有活动</A><A "
if trim(request("msort"))="3" then
response.write"class=selectTag "
end if
response.write" href='activitx.asp?id="&id&"&msort=3'>己结束活动</A><A "
if trim(request("msort"))="4" then
response.write"class=selectTag "
end if
response.write" href='activitx.asp?id="&id&"&msort=4'>正在进行活动</A></SPAN></DIV>"
End Function
'--------------------------------------------------------------------------------------------
Function Cactivitx()
response.write"<TABLE cellSpacing=0><TBODY><TR><TH width=30> </TH>"
response.write"<TH width='387'><DIV style='TEXT-ALIGN: left'>活动名称</DIV></TH>"
response.write" <TH width=160><DIV class=th>活动日期</DIV></TH><TH width=76> <DIV class=th>报名人数</DIV></TH>"
response.write"<TH width=70><DIV class=th>上限人数</DIV></TH><TH width=84>"
response.write"<DIV class=th>活动费用</DIV></TH><TH width=93><DIV class=th> 操作</DIV></TH></TR>"
set rs1=server.createobject("adodb.recordset")
sql="select * from "&WebSqlType&"_activitx where "&WebSqlType&"_club="&id&" and "&WebSqlType&"_msort=2 order by "&WebSqlType&"_date desc"
if trim(request("msort"))="3" then
sql="select * from "&WebSqlType&"_activitx where "&WebSqlType&"_club="&id&" and "&WebSqlType&"_Edate<='"&now()&"' order by "&WebSqlType&"_date desc"
elseif trim(request("msort"))="4" then
sql="select * from "&WebSqlType&"_activitx where "&WebSqlType&"_club="&id&" and "&WebSqlType&"_Edate>='"&now()&"' order by "&WebSqlType&"_date desc"
else
sql="select * from "&WebSqlType&"_activitx where "&WebSqlType&"_club="&id&" order by "&WebSqlType&"_date desc"
end if
rs1.open sql,conn,1,1
if rs1.eof and rs1.bof then
response.write "<tr><td height=194 colspan=5 align=center>暂无内容</td></tr>"
else
listnum=20
rs1.pagesize=listnum
page=Request("page")
if (page-rs1.pagecount) > 0 then
page=rs1.pagecount
elseif page = "" or page < 1 then
page = 1
end if
rs1.absolutepage=page
'编号的实现
j=rs1.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if
do while not rs1.eof and i<listnum
n=n+1
sql="select * from "&WebSqlType&"_mactivitx where "&WebSqlType&"_activitx="&rs1(""&WebSqlType&"_id")&""
set rs2=Server.CreateObject("ADODB.Recordset")
rs2.open sql,conn,1,1
mhtc=Rs2.recordcount
rs2.close
response.write" <TR> <TD><IMG src='images/pop.gif'> </TD>"
response.write" <TD class=td1><SPAN class='graytext right'>"
if rs1(""&WebSqlType&"_Edate")<= now() then
response.write"已结束"
else
response.write"进行中"
end if
response.write"</SPAN> <A href='/quan/"&co&"/activitx_view.asp?id="&id&"&action=activitx&activitxid="&rs1(""&WebSqlType&"_id")&"'"
response.write" target=_blank>"&rs1(""&WebSqlType&"_title")&"</A> </TD>"
response.write" <TD style=' font-size:9px; color:#003300'>"&trim(rs1(""&WebSqlType&"_Gdate"))&"</TD>"
response.write" <TD>"&mhtc&"</TD><TD>"&trim(rs1(""&WebSqlType&"_ren"))&"</TD><TD>"&trim(rs1(""&WebSqlType&"_mprice"))&"</TD>"
response.write" <TD><A href='/quan/"&co&"/activitx_edit.asp?id="&id&"&activitxid="&trim(rs1(""&WebSqlType&"_id"))&"'>"
response.write"修改</A> | <A href='/quan/"&co&"/activitx_view.asp?id="&id&"&activitxid="
response.write""&trim(rs1(""&WebSqlType&"_id"))&"&action=adel'>删除 </A> </TD></TR>"
rs1.movenext
i=i+1
j=j-1
loop
response.write"<TR><TD class=page colSpan=8>"
filename="activitx.asp?id="&id&""
response.write"共 "&rs1.pagecount&" 页 "
if page=1 then
else
response.write"<a href="&filename&">|<<</a> "
response.write"<a href="&filename&"&page="&page-1&"><font color=#000000><<</font></a> "
response.write"<a href="&filename&"&page="&page-1&"><font color=#000000>["&page-1&"]</font></a> "
end if
if rs1.pagecount=1 then
else
response.write"["&page&"]"
end if
if rs1.pagecount-page <> 0 then
response.write"<a href="&filename&"&page="&page+1&"><font color=#000000>["&page+1&"]</font></a> "
response.write"<a href="&filename&"&page="&page+1&"><font color=#000000>>></font></a> "
response.write"<a href="&filename&"&page="&rs1.pagecount&"><font color=#000000>>>|</font></a> "
end if
response.write"</TD></TR>"
rs1.close
end if
response.write"</TBODY></TABLE>"
End Function
'-----------------------------------------------------------------------------------------
Function CbbsServer()
if request("Submit")="删 除" then
LID=request("LID")
LID=split(LID,",")
for i=0 to UBound(LID)
conn.execute("delete From "&WebSqlType&"_log Where "&WebSqlType&"_id="&LID(i))
next
response.Redirect("bbs.asp?id="&request("id")&"")
end if
'--------------------------------------------------------------------
if request("Submit")="置 顶" then
Lid=request("LID")
Lid=split(Lid,",")
for i=0 to UBound(Lid)
conn.execute("update "&WebSqlType&"_log set "&WebSqlType&"_z=1 Where "&WebSqlType&"_id=" & LID(i))
next
response.Redirect("bbs.asp?id="&request("id")&"")
end if
'---------------------------------------------------------------------
if request("Submit")="加 精" then
Lid=request("LID")
Lid=split(Lid,",")
for i=0 to UBound(Lid)
conn.execute("update "&WebSqlType&"_log set "&WebSqlType&"_j=1 Where "&WebSqlType&"_id=" & Lid(i))
next
response.Redirect("bbs.asp?id="&request("id")&"")
end if
End Function
'-----------------------------------------------------------------------
Function Cbbstitle()
response.Write"<SPAN class=tags><A "
if trim(request("mj"))="" and trim(request("mz"))="" then
response.Write"class=selectTag "
end if
response.Write" href='bbs.asp?id="&id&"'>所有贴子</A><A "
if trim(request("mj"))="yes" then
response.Write"class=selectTag "
end if
response.Write" href='bbs.asp?id="&id&"&mj=yes'>精华贴子</A><A "
if trim(request("mz"))="yes" then
response.Write"class=selectTag "
end if
response.Write" href='bbs.asp?id="&id&"&mz=yes'>置顶贴子</A><A href='bbssort.asp?id="&id&"'>分类管理</A></SPAN>"
End Function
'-----------------------------------------------------------------------
Function Cbbs()
response.Write"<TABLE cellSpacing=0><TBODY><form name='from' method='post' action='bbs.asp?id="&id&"'>"
response.Write"<TR><TH width=54> </TH><TH width='635'><DIV style='TEXT-ALIGN: left'>贴子名称</DIV></TH>"
response.Write"<TH width=154 align='left'><DIV class=th> 发布日期</DIV></TH><TH width=108>"
response.Write"<DIV class=th>发布人</DIV></TH><TH width=46><DIV class=th>操作</DIV></TH></TR>"
set rs1=server.createobject("adodb.recordset")
if trim(request("mj"))="yes" then
sql="select * from "&WebSqlType&"_log where "&WebSqlType&"_club="&id&" and "&WebSqlType&"_j=1 order by "&WebSqlType&"_date desc"
elseif trim(request("mz"))="yes" then
sql="select * from "&WebSqlType&"_log where "&WebSqlType&"_club="&id&" and "&WebSqlType&"_z=1 order by "&WebSqlType&"_date desc"
else
sql="select * from "&WebSqlType&"_log where "&WebSqlType&"_club="&id&" order by "&WebSqlType&"_z desc, "&WebSqlType&"_j desc"
end if
rs1.open sql,conn,1,1
if rs1.eof and rs1.bof then
response.write "<tr><td height=194 colspan=5 align=center>暂无内容</td></tr>"
else
listnum=20
rs1.pagesize=listnum
page=Request("page")
if (page-rs1.pagecount) > 0 then
page=rs1.pagecount
elseif page = "" or page < 1 then
page = 1
end if
rs1.absolutepage=page
'编号的实现
j=rs1.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if
do while not rs1.eof and i<listnum
n=n+1
if trim(rs1(""&WebSqlType&"_j"))=1 then
keyj="加精"
else
keyj=""
end if
if trim(rs1(""&WebSqlType&"_z"))=1 then
keyz="置顶"
else
keyz=""
end if
response.Write"<TR><TD><IMG src='images/pop.gif'> </TD><TD class=td1><SPAN class='graytext right'>"
response.Write""&rs1(""&WebSqlType&"_sort")&"</SPAN> <A href='/quan/"&trim(rs(""&WebSqlType&"_co"))&"/bbs_view.asp?bbsid="
response.Write""&rs1(""&WebSqlType&"_id")&"&id="&id&"' target=_blank>"&rs1(""&WebSqlType&"_title")&"</A> <font color=red>"&keyj&"</font>"
response.Write" <font color=#006600>"&keyz&"</font> </TD> <TD align='left'> "
response.Write""&year(rs1(""&WebSqlType&"_Ndate"))&"-"&month(rs1(""&WebSqlType&"_Ndate"))&"-"&day(rs1(""&WebSqlType&"_Ndate"))&"</TD>"
response.Write" <TD>"&rs1(""&WebSqlType&"_username")&"</TD><TD><input type='checkbox' name='LID' value="&rs1(""&WebSqlType&"_id")&""
response.Write" style='border:0'></TD></TR>"
rs1.movenext
i=i+1
j=j-1
loop
response.Write"<TR><TD class=page colSpan=5>"
response.Write" <input name='chkall' type='checkbox' id='chkall' value='select' onClick=""CheckAll(this.form)"""
response.Write" style='border:0'>全选 <input type='submit' name='submit' value='删 除'>"
response.Write"<input type='submit' name='submit' value='置 顶'><input type='submit' name='submit' value='加 精'> </TD>"
response.Write" </TR><TR><TD class=page colSpan=5>"
filename="bbs.asp?id="&id&""
response.Write"共 "&rs1.pagecount&" 页 "
if page=1 then
else
response.Write"<a href="&filename&">|<<</a> "
response.Write"<a href="&filename&"&page="&page-1&"><font color=#000000><<</font></a> "
response.Write"<a href="&filename&"&page="&page-1&"><font color=#000000>["&page-1&"]</font></a> "
end if
if rs1.pagecount=1 then
else
response.Write" ["&page&"]"
end if
if rs1.pagecount-page <> 0 then
response.Write"<a href="&filename&"&page="&page+1&"><font color=#000000>["&page+1&"]</font></a> "
response.Write"<a href="&filename&"&page="&page+1&"><font color=#000000>>></font></a> "
response.Write"<a href="&filename&"&page="&rs1.pagecount&"><font color=#000000>>>|</font></a> "
end if
response.Write"</TD></TR>"
rs1.close
end if
response.Write"</form></TBODY></TABLE>"
End Function
'-----------------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -