www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/index.asp
<!--#include file="conn.asp"--> <!--#include file="gyhs.asp"--> <!--#include file="zx.asp"--> <head> <title><%=request.cookies("mc")%> - 论坛首页</title> <meta name="keywords" content="<%=request.cookies("gjz")%>"> </head> <body topmargin=0> <!--#include file="gyym.asp"--> <%'*******************************************************%> <% '论坛汇总 'set =server.createobject("adodb.recordset") '.activeconnection=conn '.cursortype=3 '注册用户总数 set tong1=server.createobject("adodb.recordset") tong1.activeconnection=conn sqlzc="select id from zwuser" tong1.cursortype=3 tong1.open sqlzc zcs=tong1.recordcount tong1.close set tong1=nothing '主题总数 set tong2=server.createobject("adodb.recordset") tong2.activeconnection=conn sqlzt="select id from zwtizi where ltbh='"<bh&"'" tong2.cursortype=3 tong2.open sqlzt zts=tong2.recordcount tong2.close set tong2=nothing '回帖总数 set tong3=server.createobject("adodb.recordset") tong3.activeconnection=conn sqlhtz="select id from zwhtz where ltbh='"<bh&"'" tong3.cursortype=3 tong3.open sqlhtz hts=tong3.recordcount tong3.close set tong3=nothing '今日帖子总数 set tong4=server.createobject("adodb.recordset") tong4.activeconnection=conn sqljrt="select jrfat from zwbk where sj=date() and ltbh='"<bh&"'" tong4.cursortype=3 tong4.open sqljrt if tong4.eof then jrfats=0 else for i=1 to tong4.recordcount jrfats=tong4("jrfat")+jrfats tong4.movenext next end if tong4.close set tong4=nothing %> <table cellSpacing="0" cellPadding="0" border="0" width="97%" align="center"> <tr> <td valign="top"> <table width="100%" border="0" cellpadding="5" cellspacing="1" class="a2"> <% if dlhs<>true then '用户数据 username=request.cookies("username") sqlyh="select fabtzzs,htzzs,id,cntop from zwuser where cnuser='"&username&"'" set yhsj=conn.execute(sqlyh) %> <tr bgcolor="#FFFFFF"> <td width="18%" align="center" valign="bottom" height="100"> <img border="0" src="<%=yhsj("cntop")%>" width="72" height="72"><br> <br> <b><%=username%></b> (<% if gly<>true then response.write"管理员" else response.write"普通用户" end if yhsj.close set yhsj=nothing %>)</td> <td align="center" height="50"> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td width="25%" align="left" valign="middle" class="a3"> <a href="myziliao.asp?ltbh=<%=ltbh%><user=<%=username%>">我的资料</a></td> <td width="26%" align="left" valign="middle" class="a3"> <a href="mytz.asp?ltbh=<%=ltbh%><user=<%=username%>">我的帖子</a> </td> <td width="28%" align="left" valign="middle" class="a3"> <a href="mytz.asp?ltbh=<%=ltbh%><user=<%=username%>">管理帖子</a> </td> </tr> <tr> <td align="left" valign="middle" class="a3"> <a href="dx.asp?ltbh=<%=ltbh%><user=<%=username%>">用户短信</a> </td> <td align="left" valign="middle" class="a3"> 发表文章:<%=yhsj("fabtzzs")%> </td> <td align="left" valign="middle" class="a3"> 回复文章:<%=yhsj("htzzs")%> </td> </tr> <tr> <td align="left" valign="middle" class="a3">等级: <% if gly<>true then response.write"管理员" else response.write"普通用户" end if yhsj.close set yhsj=nothing %> </td> <td align="left" valign="middle" class="a3"><a href="admin/dlht.asp?ltbh=<%=ltbh%>"><span style="text-decoration: none"><font color="#000000"><%if gly<>true then response.write "后台管理"%></font></span></a></td> <td align="left" valign="middle" class="a3"> <a href="tuichu.asp?ltbh=<%=ltbh%>"><font color="#000000">退出</font></a> </td> </tr> <tr> <td align="left" valign="middle" class="a3"> </td> <td align="left" valign="middle" class="a3"> </td> <td align="left" valign="middle" class="a3"> </td> </tr> </table> </td> </tr> <%else%> <input type="hidden" value="add" name="menu"> <input type="hidden" value="Default.asp" name="url"> <tr bgcolor="#FFFFFF"> <td width="18%" align="center" valign="bottom" height="100"> <img border="0" src="imgs/face/visitor.jpg" width="64" height="64"><br> <br> <b>未知姓名</b> (游客)</td> <td align="center" height="50"> <form action="login.asp?ltbh=<%=ltbh%>" method="post"> <table border="0" width="100%" id="table1"> <tr> <td width="80%" align="center">用户名称: <input size="20" name="username" value=""></td> <td width="20%"><a href="register.asp?ltbh=<%=ltbh%>">没有注册?</a></td> </tr> <tr> <td width="80%" align="center">用户密码: <input type="password" size="20" value name="userpass"></td> <td width="20%"><a href="RecoverPasswd.asp">忘记密码?</a></td> </tr> <tr> <td align="center" height=30> <input type="submit" value=" 登录 " name="Submit1"> <input type="reset" value=" 取消 " name="Submit"></td><td width="20%"></td> </tr> </table> </form> </td> </tr> <%end if%> <tr bgcolor="#FFFFFF" class="a3"> <td colspan="2" align="center" valign="bottom" height="25">注册会员:<%=zcs%> 主题总数:<%=zts%> 回帖总数:<%=hts%> 今日帖数:<%=jrfats%> </td> </tr> </table> </td> <td width="223" valign="top"> <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF" class="a2" height="50%"> <tr class="a1" id="TableTitleLink"> <td height="9" align="left" valign="middle"> 论坛公告</td> </tr> <tr class="a3"> <td height="113" align="left" valign="top"> <% '公告 gonggao="select id,cnggtitle from zwggao where ltbh='"<bh&"'" set ggao=conn.execute(gonggao) if ggao.eof then response.write"<font color=#FF0000>暂时没用公告!</font>" else do while not ggao.eof response.write"<center><a target=_blank href=gonggao.asp?id="&ggao("id")&"<bh="<bh&">" & ggao("cnggtitle") & "</a>" ggao.movenext loop end if ggao.close set ggao=nothing %> </td> </tr> </table> <br> </td> </tr> </table> <!--#include file="bmian.asp"--> </p> <!--webbot bot="PurpleText" PREVIEW="板块显示区域" --> <SCRIPT>valigntop()</SCRIPT> <table cellspacing="1" cellpadding="5" width="97%" align="center" border="0" class="a2" id="table1"><tr><td height="25" class="a1" colspan="2"> <img border="0" src="imgs/1.gif" width="15" height="15"> 在线统计</td></tr><tr><td align="middle" width="5%" bgcolor=FFFFFF> <img border="0" src="imgs/totel.gif" width="20" height="20"></td><td valign="top" class="a4"> <table cellspacing="0" cellpadding="3" width="100%" id="table2"><tr><td height="15"> 目前论坛总共有 <%=zxrss%> 人在线。其中注册用户 <%=zcrs%> 人,访客 <%=fks%> 人</td></tr><tr height="25" style="display:none" id="follow0"> <td id="followTd0" align="left" class="a4" width="94%"> </td></tr></table></td></tr></table> <SCRIPT>valignbottom()</SCRIPT> </p> <SCRIPT>valigntop()</SCRIPT> <% set lk=server.createobject("adodb.recordset") lk.activeconnection=conn sql="select*from zwlike where ltbh='"<bh&"'" lk.cursortype=3 '设置静态指针常用与寻找和建立记录 lk.open sql do while not lk.eof if lk("ljlogo")="" or lk("ljlogo")="http://" then link1=link1+"<a title='"&lk("ljsm")&"' href="&lk("ljril")&" target=_blank>"&lk("ljmc")&"</a> " else link2=link2+"<a title='"&lk("ljmc")&""&chr(10)&""&lk("ljsm")&"' href="&lk("ljril")&" target=_blank><img src="&lk("ljlogo")&" border=0 width=88 height=31></a> " end if lk.movenext loop lk.close %> <table cellspacing="1" cellpadding="5" width="97%" border="0" class="a2" align="center" id="table3"><tr><td height="25" colspan="2" class="a1"> <img border="0" src="imgs/1.gif" width="15" height="15"> 友情链接</td></tr><tr> <td align="center" bgcolor=FFFFFF width="5%"> <img border="0" src="imgs/shareforum.gif" width="32" height="32"></td> <td class="a4"> <table cellpadding="0" cellspacing="0" width="100%" height="31"> <tr> <td height="16"><%=link1%></td> </tr> <tr> <td height="15"><%=link2%></td> </tr> </table> </td></tr></table> <SCRIPT>valignbottom()</SCRIPT> <!--webbot bot="PurpleText" PREVIEW="版权信息" --> <br> <% call bq dbjl.close set dbjl=nothing %><%dbclose%>