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

📄 1.asp

📁 社区天地图文系统(核心:尘缘雅境图文系统) 版本: 1.0 本系统是ASP+ACCESS环境下开发成功
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	if Request.cookies("reglevel")="3" then
	rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel<=3 order by click DESC"   '选择本月
	end if
	if Request.cookies("reglevel")="2" then
	rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel<=2 order by click DESC"   '选择本月
	end if
	if Request.cookies("reglevel")="1" then
	rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel<=1 order by click DESC"   '选择本月
	end if
end if
if Request.cookies("key")="super" or Request.cookies("key")="typemaster" or Request.cookies("key")="bigmaster" or Request.cookies("key")="smallmaster" or Request.cookies("key")="check" then
rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
end if
else
rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
end if
rs.Open rs.Source,conn,1,1
	if rs.bof and rs.eof then 
		response.write "<td align=center>无</td>" 
	else 
	do while not rs.eof 
%>
              <tr> 
                <td height=18> · 
                  <%if rs("picnews")=1 then%>
                  <img src="IMAGES/IMG.gif"> 
                  <%end if%>
                  <a class=middle href="ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=rs("title")%>" target="_blank" > 


<script>

//测字符串实际长度
String.prototype.Tlength = function(){var arr=this.match(/[^\x00-\xff]/ig);return this.length+(arr==null?0:arr.length);}

//字符串左取
String.prototype.left = function(num,mode){if(!/\d+/.test(num))return(this);var str = this.substr(0,num);if(!mode) return str;var n = str.Tlength() - str.length;num = num - parseInt(n/2);return this.substr(0,num);}
            
//开始左取			  
document.write("<%=rs("title")%>".left(8,true));
//结束左取


</script>
                  



                  </a><font color="#666666">[<%=rs("click")%>]</font> </td>
              </tr>
              <%  ii = ii + 1
    if ii>top_txt-1 then exit do
	rs.movenext     
	loop
	end if  
	rs.close   
	set rs=nothing
%>
            </table></td>
        </tr>
        <tr bordercolor="#999999"> 
          <td height="20" valign="middle" background="IMAGES/menu-d.gif"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr bordercolor="#999999"> 
                <td height="25" valign=middle bordercolor="#999999" background="IMAGES/menu-d-yqlj.gif" bgcolor="#FFFFFF"> 
                  <p align="center"><FONT color=#000000>友情链接</FONT></td>
              </tr>
              <tr bordercolor="#999999"> 
                <td height="120" align=center valign=top bordercolor="#999999" background="IMAGES/menu-d.gif"><br> 
                  <%if showlinkmap=1 then%>
                  <script language=JavaScript>marquee5();</script> 
                  <!--#include file=link_map.asp -->
                  <script language=JavaScript>marquee6();</script> 
                  <%end if%>
                  <%if showlink=1 then%>
                  <br> <br> <select name="select" onChange="window.open(this.options[this.selectedIndex].value,'_blank')" size="1">
                    <option value="">友情文字链接站点</option>
                    <%
set rs10=server.CreateObject("ADODB.RecordSet") 
rs10.Source="select * from link where linktype=0 and pass=1 order by ID DESC "
rs10.Open rs10.Source,conn,1,1
if not rs10.EOF then
while not rs10.EOF
%>
                    <option value="<%=rs10("weburl")%>"><%=rs10("webname")%></option>
                    <%
rs10.MoveNext
wend
%>
                    <%
else
Response.Write "<option value=''>目前还没有</option>"
end if
rs10.Close
set rs10=nothing
%>
                  </select> 
                  <%end if%>
                  <br> <br> <input type=button style="cursor:hand" name=link value="申请" onclick="javascript:linkreg()"> 
                  <input type=button style="cursor:hand" name=link value="更多" onclick="javascript:morelink()"> 
                  <br> <br> </td>
              </tr>
              <%if showsearch=1 then%>
              <tr> 
                <td height="25" align="center" valign="middle" background="IMAGES/menu-d-ss.gif" bgcolor="#FFFFFF">文章搜索</td>
              </tr>
              <tr> 
                <td align="center" valign="top" background="IMAGES/menu-d.gif"> 
                  <p><br>
                    <%if search="1" then%>
                    <!--#include file=search.asp-->
                    <%else%>
                    <!--#include file=search1.asp-->
                    <%end if%>
                  </p>
                  <br> <br> </td>
              </tr>
              <%end if
              if showdata=1 then%>
              <tr bordercolor="#999999"> 
                <td height="25" align="center" bordercolor="#999999" background="IMAGES/menu-d-sj.gif"><FONT color=#000000>系统数据</font></td>
              </tr>
              <tr bordercolor="#999999"> 
                <td bordercolor="#999999" background="IMAGES/menu-d.gif"> <br> 
                  <%								
function gettipnum()
dim tmprs
tmprs=conn.execute("Select Count(NewsID) from News where checkked=1")
gettipnum=tmprs(0)
set tmprs=nothing
if isnull(gettipnum) then gettipnum=0
end function

function todays()
dim tmprs
tmprs=conn.execute("Select count(NewsID) from News Where checkked=1 and year(updatetime)=year(date()) and month(updatetime)=month(date()) and day(updatetime)=day(date())")
todays=tmprs(0)
set tmprs=nothing
if isnull(todays) then todays=0
end function

function getusernum()
dim rs
rs=conn.execute("Select Count(ID) from admin")
getusernum=rs(0)
set rs=nothing
if isnull(getusernum) then getusernum=0
end function

function getgg()
dim rs
rs=conn.execute("Select Count(ID) from admin where sex='先生'")
getgg=rs(0)
set rs=nothing
if isnull(getgg) then getgg=0
end function

function getmm()
dim rs
rs=conn.execute("Select Count(ID) from admin where sex='女士'")
getmm=rs(0)
set rs=nothing
if isnull(getmm) then getmm=0
end function

function getother()
dim rs
rs=conn.execute("Select Count(ID) from admin where sex='保密'")
getother=rs(0)
set rs=nothing
if isnull(getother) then getother=0
end function
%>
                  &nbsp;&nbsp;○- 今日文章:<font color=red><%=todays()%></font><br> 
                  &nbsp;&nbsp;○- 文章总数:<font color=red><%=gettipnum()%></font><br>
				  &nbsp;&nbsp;○- 会员总数:<font color=red><%=getusernum()%></font><br> 
                  <!--#include file=lastmember.asp --><br><br>
                  <%if showcount=1 then%>
                  <script src=include/cnt.asp></script>
				  <!--#include file=include/zx.asp -->
				  <br> &nbsp;&nbsp;○- 当前在线:<font color=red><%=i%></font><br> <br>
				  <%end if%>
                  </td>
              </tr>
              <%end if
              if showuser=1 then%>
              <tr bordercolor="#999999"> 
                <td height="25" valign="middle" bordercolor="#999999" background="IMAGES/menu-d-use.gif"> 
                  <p align="center"><FONT color=#000000>会员排行</font></td>
              </tr>
              <tr bordercolor="#999999"> 
                <td height="20" valign="middle" background="IMAGES/menu-d.gif"> 
                  <p align="center"><br>
                    <!--#include file=topuser.asp -->
                </td>
              </tr>
              <%end if%>
              <tr bordercolor="#FFFFFF"> 
                
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
    <td width="6" bgcolor="#FFFFFF"></td>
    <td align="center" valign="top" background="IMAGES/menu-zd.gif"> 
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber3">
        <tr> 
          <td height="2" valign="top" bgcolor="#FFFFFF"><img src="IMAGES/kb.gif" width="9" height="3"></td>
        </tr>
        <tr> 
          <td height="25" background="IMAGES/menu-z.gif" bgcolor="#FFFFFF">&nbsp;&nbsp;<img src=images/ico.gif align="baseline">&nbsp;<font class=m_tittle>沸腾今日导读</font></td>
        </tr>
        <tr> 
          <td valign=top background="IMAGES/menu-zd.gif"> 
            <!--#include file=daodu.asp -->
          </td>
        </tr>
        <tr> 
          <td valign=top background="IMAGES/menu-zd.gif"> 
            <%
  if rseof=1 then
for i=1 to RecordCount
typeID=Arraytyid(i)
typeName=ArraytyName(i)
%>
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
              <tr> 
                <td height="25" background="IMAGES/menu-zz.gif" bgcolor="#FFFFFF">&nbsp;&nbsp;<img src=images/ico.gif align="baseline">&nbsp;<font class=m_tittle><%=typeName%></font></td>
              </tr>
              <% dim rs3
set rs3=server.CreateObject("ADODB.RecordSet")
if uselevel=1 then
if Request.cookies("key")="super" or Request.cookies("key")="typemaster" or Request.cookies("key")="bigmaster" or Request.cookies("key")="smallmaster" or Request.cookies("key")="check" then
rs3.Source="select top " & top_news & " * from News where (typeid=" & typeid &" and checkked=1) order by istop desc,newsid DESC"
end if
if Request.cookies("key")="" then
rs3.Source="select top " & top_news & " * from News where (typeid=" & typeid &" and checkked=1) order by istop desc,newsid DESC"
end if
if Request.cookies("key")="selfreg" then
	if Request.cookies("reglevel")=3 then
	rs3.Source="select top " & top_news & " * from News where (typeid=" & typeid &" and checkked=1 and newslevel<=3) order by istop desc,newsid DESC"
	end if
	if Request.cookies("reglevel")=2 then
	rs3.Source="select top " & top_news & " * from News where (typeid=" & typeid &" and checkked=1 and newslevel<=2) order by istop desc,newsid DESC"
	end if
	if Request.cookies("reglevel")=1 then
	rs3.Source="select top " & top_news & " * from News where (typeid=" & typeid &" and checkked=1 and newslevel<=1) order by istop desc,newsid DESC"
	end if
end if
else
rs3.Source="select top " & top_news & " * from News where (typeid=" & typeid &" and checkked=1) order by istop desc,newsid DESC"
end if
rs3.Open rs3.Source,conn,1,1
while not rs3.EOF
if showyear=1 then
newsurl="ReadNews.asp?NewsID=" & rs3("NewsID")
datetime="<font class=middle>(" & year(rs3("UpdateTime"))  &"年"& Month(rs3("UpdateTime"))  &"月"& Day(rs3("UpdateTime")) &"日)</font>"
else
newsurl="ReadNews.asp?NewsID=" & rs3("NewsID")
datetime="<font class=middle>("& Month(rs3("UpdateTime"))  &"月"& Day(rs3("UpdateTime")) &"日)</font>"
end if
if rs3("picnews")=1 then
img="<img src='IMAGES/IMG.gif' border='0'> "
else
img=""
end if
%>
              <%
''''增加小类名称程序开始
B=rs3("bigclassID")
set rs22=server.createobject("adodb.recordset")
sql="SELECT bigclassID,bigclassname FROM bigclass WHERE bigclassID="&B
Set rs22=Conn.Execute(sql)
A=rs22("bigclassname")
rs22.close
set rs22=Nothing
''''增加小类名称程序结束
%>
              <tr> 
                <td height=18><div align="center"> 
                    <table width="98%" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td width="62%">&nbsp;&nbsp;<img src="images/006.gif"  border="0"> 
                          <%=A%>|<a class=middle href="<%=newsurl%>" title="<%=rs3("title")%>" target="_blank" > 
                          <%=img%> 
                          
                          <<%=rs3("titletype")%>><font color="<%=rs3("titlecolor")%>"> 

<script>

//测字符串实际长度
String.prototype.Tlength = function(){var arr=this.match(/[^\x00-\xff]/ig);return this.length+(arr==null?0:arr.length);}

//字符串左取
String.prototype.left = function(num,mode){if(!/\d+/.test(num))return(this);var str = this.substr(0,num);if(!mode) return str;var n = str.Tlength() - str.length;num = num - parseInt(n/2);return this.substr(0,num);}
            
//开始左取			  
document.write("<%=rs3("title")%>".left(16,true));
//结束左取


</script>

                   
                          


                          </font></<%=rs3("titletype")%>> </a> 
                         
                        </td>
                        <td width="17%"> 
                          <%if showtime="1" then%>
                          <%=datetime%> 
                          <%end if%>
                        </td>
                        <td width="5%" align="center"> 
                          <%if showclick="1" then%>
                          <font color=#666666><%=rs3("click")%></font> 
                          <%end if%>
                        </td>
                        <td width="16%" align="center"> 
                          <%if rs3("istop")="1" then%>
                          <img src="images/istop.gif" > 

⌨️ 快捷键说明

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