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

📄 link.asp

📁 一个不错的论坛原代码
💻 ASP
字号:



<%'生日开始显示

if h_birder=0 then
dim counthbirder,bsex
sql="select count(*) as hbirder from user where month(h_birder)=month(date()) and day(h_birder)=day(date())"
set rs=conn.execute(sql)
counthbirder=rs("hbirder")
set rs=nothing
%>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=0 width=<%=tdc3%>  style="border-collapse: collapse">
    </body>
    <tr> 
    <td <%=hColor%> class=tdc1 height=23>&nbsp;&gt;&gt;==今天过生日的朋友(共 <%=counthbirder%> 人)</td>
  </tr>
  <tr> 
    <td bgcolor=<%=tColor2%> class=tdc height=30>  
            <% sql="select username,h_birder,sex from user where month(h_birder)=month(date()) and day(h_birder)=day(date())"
set rs=conn.execute(sql)
if not rs.eof then
   do while not rs.Eof
hyear=DateDiff("yyyy",rs("h_birder"),now()) 
if rs("sex")="女" then
bsex="她"
else
bsex="他"
end if%>
<img src=image/icon2.gif><a href="viewuser.asp?username=<%=rs("username")%>" target=_blank title=今天是"<%=rs("username")%>"的<%=hyear%>岁生日,祝福<%=bsex%>><%=rs("username")%></a>(<%=hyear%>)  
      <% rs.MoveNext 
        Loop
        set rs=nothing
        else
        response.write("今天没有朋友生日")
        end if%>
      </td>
  </tr>
  </tbody>
</table>
<br>
<%end if%>
<%'----明星开始显示-----
if h_mingxing=0 then
dim sqlmingxing,rsmingxing,sqlgr,rsgr%>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse">
  <tbody>
  <tr> 
    <td colspan="6" <%=hColor%> class=tdc1 height=23>&nbsp;&gt;&gt;==今日论坛明星</td>
  </tr>
  <tr> 
 <td bgcolor=<%=tColor1%> class=tdc align=center width=5%>   
     <img src=image/male.gif alt=今日论坛男明星>
       </td>
        <td bgcolor=<%=tColor2%> class=tdc width=45%>  
      <table border=0 width=98% align=center>
      <tbody>
      <tr class="tdc">
      <td>
     <%sqlmingxing="select top 1 imghead,imgwidth,imgheight, grade,u_todaysend,send,fen,username,face from user where sex='男'order by u_todaysend desc"
     set rsmingxing=conn.execute(sqlmingxing)
     if not rsmingxing.eof then%>
     <b> 今日发贴男明星</b>==>><p>
     姓&nbsp;&nbsp; 名:<a href=viewuser.asp?username=<%=rsmingxing("username")%>><%=rsmingxing("username")%></a><br> 
     等&nbsp;&nbsp; 级:
      <%
     sqlgr="select g_title from grade where g_num="&int(rsmingxing("grade"))&""
     set rsgr=conn.execute(sqlgr)
     if not rsgr.eof then
     response.write(rsgr("g_title"))
     end if%><br> 
     今日发贴:<%=rsmingxing("u_todaysend")%><br>
     总共发贴:<%=rsmingxing("send")%><br>
     积&nbsp;&nbsp;&nbsp; 分:<%=rsmingxing("fen")%><br>
     </td>
     <td align=center>    
        <% if rsmingxing("imghead")<>"" then%>
      <img src=<%=rsmingxing("imghead")%> width=<%=rsmingxing("imgwidth")%> height=<%=rsmingxing("imgheight")%>>
      <%else%>
     <img src=<%=rsmingxing("face")%>>
        <%end if%>
<%set rsmingxing=nothing
end if%>
</td></tr>
</tbody>
</table> 
     </td>
       <td bgcolor=<%=tColor1%> class=tdc align=center width=5%>  
     <img src=image/female.gif alt=今日论坛女明星>

       </td>
 
        <td bgcolor=<%=tColor2%> class=tdc width=45%> 
 <table border=0 width=98% align=center><tbody>
 <tr class="tdc"><td> 
        <%sqlmingxing="select top 1 imghead,imgwidth,imgheight,grade,u_todaysend,send,fen,username,face from user where sex='女'order by u_todaysend desc"
     set rsmingxing=conn.execute(sqlmingxing)
     if not rsmingxing.eof then%>
     
    <b> 今日发贴女明星</b>==>><p>
     姓&nbsp;&nbsp; 名:<a href=viewuser.asp?username=<%=rsmingxing("username")%>><%=rsmingxing("username")%></a><br> 
     等&nbsp;&nbsp; 级:<%
     sqlgr="select g_title from grade where g_num="&int(rsmingxing("grade"))&""
     set rsgr=conn.execute(sqlgr)
     if not rsgr.eof then
     response.write(rsgr("g_title"))
     end if%><br>  
     今日发贴:<%=rsmingxing("u_todaysend")%><br>
     总共发贴:<%=rsmingxing("send")%><br>
     积&nbsp;&nbsp;&nbsp; 分:<%=rsmingxing("fen")%><br>    </td>
     <td align=center>
  
      <% if rsmingxing("imghead")<>"" then%>
      <img src=<%=rsmingxing("imghead")%> width=<%=rsmingxing("imgwidth")%> height=<%=rsmingxing("imgheight")%>>
      <%else%>
   
     <img src=<%=rsmingxing("face")%>>
        <%end if%>
<%set rsmingxing=nothing
end if%>
</td></tr>
</tbody>
</table>
    </td>
  </tr>
  </tbody>
</table>
<br>
<%end if%>

<%'--------联盟开始显示------
dim sallink,rslink,countlink
sqllink="select count(*) as linkcount from link"
set rslink=conn.execute(sqllink)
countlink=rslink("linkcount")
set rslink=nothing%>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=0 width=<%=tdc3%>  style="border-collapse: collapse">
  <tbody>
  <tr> 
    <td <%=hColor%> class=tdc1 height=23>&nbsp;&gt;&gt;==联盟论坛(共有 <%=countlink%> 个联盟论坛) <a href=lm.asp target=_blank>[联盟代码]</a>&nbsp;
    </td>
  </tr>
    </tbody>
      <tbody>
  <tr> 
    <td bgcolor=<%=tColor2%> class=tdc height=35> 
    <table border=0 width=100%>
    
            <% '图片连接
            if t_link=1 then
            sqllink="select y_img,y_url,y_content from link"
set rslink=conn.execute(sqllink)
response.write("<tbody><tr class=tdc>")
i=0
            do while not rslink.Eof 
              response.write("<td width=""13%"">")
            response.write("<a href="""&rslink("y_url")&""" target=_blank>")&_
      ("<img src="&rslink("y_img")&" border=""0"" width=""88"" height=""31"" alt="""&rslink("y_content")&"""></a> ")
      
            if i=7 then
   response.write("</tr></tbody><tbody><tr class=tdc>")
  i=0
  else
  i=i+1
  end if
  
   rslink.MoveNext 
        Loop
        set rslink=nothing
  
        '文字连接
        elseif t_link=0 then
        response.write("<tbody><tr class=tdc>")
i=0
        sqllink="select y_url,y_content,y_title from link"
         set rslink=conn.execute(sqllink)
        do while not rslink.Eof
         response.write("<td width=""18%"">")
          response.write("<a href="""&rslink("y_url")&""" target=_blank title="""&rslink("y_content")&""">")&_
      (rslink("y_title")&"</a> ")
            if i=5 then
   response.write("</tr></tbody><tbody><tr class=tdc>")
  i=0
  else
  i=i+1
  end if
      rslink.MoveNext 
        Loop
         set rslink=nothing
         '图片连接与文字连接
        elseif t_link=2 then
               response.write("<tbody><tr class=tdc>")
i=0
        sqllink="select y_img,y_url,y_content from link where y_img<>''"
set rslink=conn.execute(sqllink)
     do while not rslink.eof
       response.write("<td width=""18%"">")
         response.write("<a href="""&rslink("y_url")&""" target=_blank>")&_
      ("<img src="&rslink("y_img")&" border=""0"" width=""88"" height=""31"" alt="""&rslink("y_content")&"""></a> ")
            if i=5 then
   response.write("</tr></tbody><tbody><tr class=tdc>")
  i=0
  else
  i=i+1
  end if
      rslink.MoveNext 
        Loop
        set rslink=nothing
        response.write("</tr></tbody><tbody><tr class=tdc>")
       sqllink="select y_url,y_content,y_title from link where y_img=''"
set rslink=conn.execute(sqllink)
do while not rslink.eof
  response.write("<td width=""18%"">")
    response.write("<a href="""&rslink("y_url")&""" target=_blank title="""&rslink("y_content")&""">")&_
      (rslink("y_title")&"</a> ")
         if i=5 then
   response.write("</tr></tbody><tbody><tr class=tdc>")
  i=0
  else
  i=i+1
  end if

      rslink.MoveNext 
        Loop
       set rslink=nothing
       end if    
%></tr>
 </tbody></table>
 
 
      </td>
  </tr>
    </tbody>
</table>

⌨️ 快捷键说明

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