index_old.asp

来自「短信平台 短信平台 短信平台」· ASP 代码 · 共 187 行

ASP
187
字号
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
	dim rs,sql
	dim classid
	dim classname
   	if request("classid")<>"" then
		classid=request("classid")
   	else
		classid=1
   	end if
  	set rs = server.createobject("adodb.recordset")
 	set rs1=server.createobject("adodb.recordset")
  	sql="select * from Aclass where classID="&cstr(classid)
 	rs.open sql,conn,1,1
 	if not rs.eof then
		classname=rs("class")
 	end if
	rs.close
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content=",http://www..com">
<LINK href="style.css" rel=stylesheet>
<title>---手机短信</title>
</head>
<body topmargin=0>
<TABLE cellSpacing=0 cellPadding=0 width="750" border=0 align=center>
  <TBODY> 
  <TR> 
    <TD bgColor="<%=Tablebackcolor%>"> 
      <TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
        <TR> 
          <TD bgColor="#0099cc"> 
            <%
	sql="select class,classid from Aclass"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "还没有任何栏目"
	else
	do while not rs.eof
%>
            |&nbsp;<a href="more_sms_.asp?classid=<%=rs("classid")%>"> 
            <%if cint(rs("classid"))=cint(classid) then%>
            <font color=red><%=rs("class")%></font> 
            <%else%>
            <%=rs("class")%> 
            <%end if%>
            </a>&nbsp;&nbsp;|&nbsp;&nbsp; 
            <%  
	rs.movenext  
	loop  
	end if  
	rs.close  
%>
          </TD>
        </TR>
        <TR> 
          <TD bgColor="#a6e9ff"> 
            <%
	sql="select Nclass,Nclassid from ANclass where classID="&cstr(classid)
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "还没有任何栏目"
	else
	do while not rs.eof
%>
            <a href="index.asp?classid=<%=classid%>&Nclassid=<%=rs("Nclassid")%>"><%=rs("Nclass")%></a>&nbsp;&nbsp; 
            <%  
	rs.movenext  
	loop  
	end if  
	rs.close  
%>
          </TD>
        </TR>
      </table>
    </td>
  </tr>
  </tbody> 
</table>
<div align="center"> 
  <table border="0" width=750 align=center cellspacing="0" cellpadding="1" bgcolor="#FFFFFF">
    <tr> 
      <td valign="top" width="25%" bgcolor="#0099cc"> 
        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 align=center>
          <TBODY> 
          <TR> 
            <TD bgColor="<%=Tablebackcolor%>"> 
              <TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
                <TR> 
                  <TD bgColor="<%=Tabletitlecolor%>"><b>最新热门短信息</TD>
                </TR>
                <TR> 
                  <TD bgColor="<%=Tablebodycolor%>"> <font style=line-height:150%> 
                    <% 
	sql="SELECT top 20 * FROM articles where year(dateandtime)=year(date()) and month(dateandtime)=month(date()) and day(dateandtime)>=day(date()-6) order by hits desc" 
	rs.open sql,conn,1,1 
	if rs.bof and rs.eof then 
		response.write "本周无更新文章" 
	else 
	do while not rs.eof     
%>
                    <a href="send.asp?id=<%=rs("articleid")%>" title="<%=rs("title")%>" target=_top> 
                    <%if len(rs("title"))>10 then%>
                    <%=left(rs("title"),10)%>... 
                    <%else%>
                    <%=rs("title")%> 
                    <%end if%>
                    </a>[<font color=red><%=rs("hits")%></font>]<br>
                    <%    
	rs.movenext     
	loop 
	end if  
	rs.close   
%>
                    </font> </TD>
                </TR>
              </table>
            </td>
          </tr>
          </tbody> 
        </table>
        
      </td>
      <td valign="top" width="1%" bgcolor="#CCCCCC">&nbsp; </td>
      <td width="74%" valign="top"> 
        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 align=center>
          <TBODY> 
          <TR> 
            <TD bgColor="<%=Tablebackcolor%>"> 
              <TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
                <TR> 
                  <TD bgColor="<%=Tabletitlecolor%>"><B>栏目分类导航</B> </TD>
                </TR>
                <TR> 
                  <TD bgColor="#fef8d8"> 
                    <p><font style=line-height:150%> 
                      <% 
	sql="select class,classid from Aclass" 
	rs.open sql,conn,1,1 
	if rs.bof and rs.eof then 
		response.write "没有任何分类" 
	else 
	do while not rs.eof 
%>
                      <a href="more_sms_.asp?classid=<%=rs("classid")%>"><%=rs("class")%></a><br>
                      <% 
	sql1="select Nclass,Nclassid,classid from ANclass where classid="&rs("classid") 
	rs1.open sql1,conn,1,1 
	do while not rs1.eof 
%>
                      <a href=".asp?classid=<%=rs1("classid")%>&Nclassid=<%=rs1("Nclassid")%>"><%=rs1("Nclass")%></a>&nbsp;&nbsp; 
                      <% 
	rs1.movenext 
	loop 
	rs1.close 
%>
                      <br>
                      <br>
                      <% 
	rs.movenext 
	loop 
	end if 
	rs.close 
	conn.close
	set conn=nothing
%>
                      </font></p>
                    <p>&nbsp; </p>
                    
                  </TD>
                </TR>
              </table>
            </td>
          </tr>
          </tbody> 
        </table>
      </td>
    </tr>
  </table>
  
</div>
</body>     
</html>                       

⌨️ 快捷键说明

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