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

📄 luntan_mid.asp

📁 这是一个用ASP 做的论坛.值得研究一下. 最有趣的是,发帖支持 HTML 代码 可以回出很好玩的帖.本来想把设计架构也发上来的,它在本子上,懒得抄拉
💻 ASP
字号:
 <!--#include file="conn.asp"--> 
<% 
luntansql="select * from luntan"
set rs=conn.execute(luntansql)
%>
<html>
<head>
 
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-->
</script>
<link href="css/Style.css" rel="stylesheet" type="text/css">
<META content=CnSohoW设计 name=description>
<META content="firekinger@163.com" name=author>
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
</head>
 

<body>
 <%do while not rs.eof%>
 <%
  strsql="select * from luntan_tiemessage where tit_id=1 and luntan='"&rs("luntan")&"'"
  set rst=conn.execute(strsql)
 %>
<table width="747" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#d2ebff" class="Xsmall">
  <tr bgcolor="#FFFFFF">
    <td height="28" colspan="6">
      <TABLE width="109%" height="25" 
border=0 cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR>
            <TD width="22%" background=img/backt.gif class="Xsmall"><font color="#339933" size="+1"    ><strong><%=rs("luntan")%></strong></font></TD>
            <TD width="78%" 
                              height=25 background=img/backt.gif class="Xsmall"> <strong><strong>(<img src="img/showdigest.gif" width="13" height="13"></strong><a href='luntan_speak.asp?luntanid=<%=rs("luntan")%>' class="style1">发表新贴</a>) </strong></TD>
          </TR>
        </TBODY>
      </TABLE></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="61" align="center">状态</td>
    <td width="312" align="center">主题</td>
    <td width="88" align="center">发表者</td>
    <td width="64" align="center">人气</td>
    <td width="85" height="24" align="center">最后回复</td>
    <td width="106" align="center">时间</td>
  </tr>
   
  
  
    <%
   while not rst.eof
    typeid =rst("id") 
    title=rst("title")
	totalname=rst("name")
	laset_name=rst("last_name")
	tie_time=rst("time")
	'look=rst("looknum")
	look=0
	 looksql="select * from luntan_tiemessage where borit_id="&cint(typeid)&""
     set rslook=conn.execute(looksql)
	 a=1
	 while not rslook.eof 
     look=a
	 a=a+1
	 rslook.movenext
	 wend
	 
	 if look<10 then
	 zuantai="一般"
	 elseif look<30 and look>=10 then
	 zuantai="热帖"
	 elseif   look>=30 then
	 zuantai="精帖"
	 end if 
	 
	'renqi=rst("renqi") 
	title=left(title,24)&"..."
	response.Write("<tr bgcolor='#FFFFFF'><td><div align='center'><font color=red>"&zuantai&"</font></div></td><td height='25'><a href='luntan_look_check.asp?id="&typeid&"'><font color=blue>"&title&"</font></a> </td><td><div align='center'><a href='luntan_friend_ziliao.asp?friendziliao="&totalname&"'><font color=green>"&totalname&"</font></a></div></td><td><div align='center'><font color=red>"&look&"</font></div></td><td><div align='center'><a href='luntan_friend_ziliao.asp?friendziliao="&laset_name&"'><font color=green>"&laset_name&"</font></a></div></td><td><div align='center'>"&tie_time&"</div></td></tr>")  
    rst.movenext
   wend

	%>
  <tr bgcolor="#FFFFFF">
    <td height="26" colspan="6" align="center">   </td>
  </tr>
</table>
  <% 
	rst.close
	'3conn.close
	'set conn=nothing
	%>
	<%
rs.MoveNext
loop
rs.Close
conn.Close
%>
</body>
</html>
 

⌨️ 快捷键说明

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