index2.asp

来自「纪念伟大领袖的专题网站」· ASP 代码 · 共 750 行 · 第 1/2 页

ASP
750
字号
<%@ Language=VBScript%>
<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="function.asp"-->
<!--#include file="char.inc"-->

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="军鹰工作室http://JY.chxy.mtn">
<title><%=jjgn%></title>
<LINK href=news.css rel=stylesheet>
<script language="JavaScript">
<!--
if (self != top) top.location.href = window.location.href
//-->
</script>
<script language=JavaScript>
<!--
//
var version = "other"
browserName = navigator.appName;   
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else if (browserName == "Netscape" && browserVer < 3) version = "n2";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";
else if (browserName == "Microsoft Internet Explorer" && browserVer < 4) version = "e3";
function marquee1()
{
	if (version == "e4" | version == "n3")
	{
		document.write("<marquee style='BOTTOM: 0px; FONT-WEIGHT: 100px; HEIGHT:150px;  TEXT-ALIGN: left; TOP: 0px' id='news' scrollamount='1' scrolldelay='10' behavior='loop' direction='up' border='0' onmouseover='this.stop()' onmouseout='this.start()'>")
	}
}

function marquee2()
{
	if (version == "e4" | version == "n3")
	{
		document.write("</marquee>")
	}
}

function marquee_logo_news()
{
	if (version == "e4")
	{
		document.write("<marquee style='BOTTOM: 0px; FONT-WEIGHT: 1200px; HEIGHT:31px;  TEXT-ALIGN: left; TOP: 0px' id='link_map' scrollamount='2' scrolldelay='10' behavior='alternate' direction='right' border='0' onmouseover='this.stop()' onmouseout='this.start()'>")
	}
}

function marquee3()
{
	if (version == "e4" | version == "n3")
	{
		document.write("<marquee direction='left' border='0' onmouseover='this.stop()' onmouseout='this.start()'>")
	}
}

function marquee4()
{
	if (version == "e4" | version == "n3")
	{
		document.write("</marquee>")
	}
}

function marquee5()
{
	if (version == "e4" | version == "n3")
	{
		document.write("<marquee style='BOTTOM: 0px; FONT-WEIGHT: 100px; HEIGHT:100px;  TEXT-ALIGN: left; TOP: 0px' id='news' scrollamount='1' scrolldelay='10' behavior='loop' direction='up' border='0' onmouseover='this.stop()' onmouseout='this.start()'>")
	}
}

function marquee6()
{
	if (version == "e4" | version == "n3")
	{
		document.write("</marquee>")
	}
}

//-->
</script>
<script language="JavaScript1.2">
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=20
}
</script>

<script LANGUAGE="javascript">
<!--
function checkdata()
{
if (document.user.UserName.value=="")
	{
	  alert("对不起,请输入您的论坛用户名!");
	  document.user.UserName.focus();
	  return false;
	 }
else if (document.user.Password.value=="")
	{
	  alert("对不起,请输入您的论坛密码!");
	  document.user.Passwd.focus();
	  return false;
	 }
}

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;
}
//-->
</script>

<style type="text/css">
</style>
</head>
<body topmargin="0" >
<!--#include file="top2.asp"-->
<%
dim typeid
dim typename
dim typecontent
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from "& db_Type_Table &" where typeview=1 order by typeorder"
rs.Open rs.Source,conn,1,1
i=1
Dim ArraytypeID(10000),ArraytypeName(10000)

rs.close
set rs=nothing

set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from "& db_Type_Table &" where typeview=1 order by typeorder"
rs.Open rs.Source,conn,1,1
i=1
Dim ArraytyID(10000),ArraytyName(10000),Arraytyview(10000)
if not rs.EOF then
rseof=1

while not rs.EOF
RecordCount=rs.RecordCount
tyID=rs("typeID")
tyName=trim(rs("typeName"))
tycontent=rs("typecontent")
tyview=trim(rs("typeview"))
ArraytyID(i)=tyID
ArraytyName(i)=tyName
Arraytyview(i)=tyview
i=i+1

rs.MoveNext
wend
rs.close
%>
  
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="right" valign="bottom">
    <td height="30" colspan="3" background="images/top4.gif"><table width="590" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <TD width="440" height=19>
          <script language="JavaScript">marquee3();</script><%=gg1%>

        </a> </TD>
        <TD width="150">&nbsp;</TD>
      </tr>
    </table></td>
  </tr>
  <tr> 
    <td width="160" rowspan="2" valign="top" background="images/left.gif"> 
      <table width="100%" border="0" cellpadding="3" cellspacing="0">
        <tr> 
          <td valign="top"> </td>
        </tr>
        <tr > 
          <td height="34" background="images/left-mini.gif">&nbsp;·本月热门</td>
        </tr>
        <tr > 
          <td align="center" valign=top  > 
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%" id="AutoNumber5">
<% 
dim ii
ii = 0
if DbType = "MSSQL" then
		rs.Source="select top " & top_txt & " * from "& db_News_Table &" where updatetime>'"& now()-30 &"' and checkked=1 order by click DESC"   '选择本月
else
		rs.Source="select top " & top_txt & " * from "& db_News_Table &" where (updatetime>now()-30) 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 "<tr><td align=center><br>暂 无<br><br></td></tr>" 
else 
	do while not rs.eof%>
<tr> 
	<td height=18> · 
		<%if rs("picnews")=1 then%><img src="images/news_img.gif"> <%end if%>
		<a class=middle href="ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=htmlencode4(rs("title"))%>" target="_blank" ><%=CutStr(htmlencode4(rs("title")),14)%></a>
                  </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><%if topfont=1 then%> 
          <td height="34" background="images/left-mini.gif">&nbsp;·论坛入口</td>
        </tr>
        <tr > 
          <td align="center"  >
          <form name="user" method=POST action='<%=BbsPath%>/login.asp?action=chk' onSubmit="return checkdata();">
              <table width="100%" border="0" cellpadding="3" cellspacing="0" id="AutoNumber1" style="border-collapse: collapse">
                <tr> 
                  <td width="100%" align="center"><br>
	<%if UserTableType = "FeiTium" then		'不整合%>
			用户名称: 
                    <input maxlength=20 name="UserName" size=8> </td>
                </tr>
                <tr> 
                  <td width="100%" align="center">用户密码: 
                    <input maxlength=20 name="Password" size=8 type=password> </td>
                </tr>
                <tr> 
                  <td width="100%" align="center"> <input type=submit name=submit value="登 陆" > 
                    <p><a class=middle href="<%=BbsPath%>" target="_blank">[进入]</a> 
                      <a class=middle href="<%=BbsPath%>reg.asp" target="_blank";;;>[用户注册]</a> 
                      <a class=middle href="<%=BbsPath%>lostpass.asp" target="_blank">[忘密]</a><br>
	<%else%>
		<%if UserTableType = "Dvbbs" then%>
			<%if Request.cookies(Forcast_SN)("username")="" then%>
				<br><br>
				<font color=red>功能入口
				<br><br>
				请先登录系统</font>
				<br><br>
			<%else%>
				<%loginuser=Request.cookies(Forcast_SN)("UserName")
				set rs10=server.CreateObject("ADODB.RecordSet")
				rs10.Source="select * from "& db_User_Table &" where "& db_User_Name &"='"&loginuser&"'"
				rs10.Open rs10.Source,ConnUser,1,1
				if not rs10.eof then%>
					<%if rs10(db_User_Face)<>"" then%>
						<img src="<%=BbsPath%><%=rs10(db_User_Face)%>" border="0" width="<%=rs10(db_User_Facewidth)%>" height="<%=rs10(db_User_Faceheight)%>"> 
						<%''显示用户头像,加'bbs/'前缀路径,使图文系统直接显示定向到论坛头像%>
					<%else%>
						<img src="images/nopic.gif" border="0">
					<%end if%>
					<%rs10.close
					set rs10=nothing%>
					<br>
					<font color=red>欢迎您 <%=Request.cookies(Forcast_SN)("UserName")%> !</font>
					<br><br><a href="<%=BbsPath%>" target="_blank">进入论坛</a>
 				<%end if%>
			<%end if%>
		<%end if%>
	<%end if%>
                  </td>
                </tr>
              </table>
            </form></td>
        </tr>

        </tr>
		<%end if%>
                  <tr ><% if showdata=1 then%> 
            <td height="34" background="images/left-mini.gif">&nbsp;·系统数据</td>
          </tr>
          <tr > 
            <td > <br> 

		<%								
		function gettipnum()
			dim tmprs
			tmprs=conn.execute("Select Count(NewsID) from "& db_News_Table &" 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 "& db_News_Table &" 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=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &"")
			getusernum=rs(0)
			set rs=nothing
			if isnull(getusernum) then getusernum=0
		end function

		function getgg()
			dim rs
			if db_Sex_Select = "FeiTium" then
				rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"='男' ")
				getgg=rs(0)
				set rs=nothing
			else
				if db_Sex_Select = "Number" then
					rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"=1")
					getgg=rs(0)
					set rs=nothing
				end if
			end if
			if isnull(getgg) then getgg=0
		end function

		function getmm()
			dim rs
			if db_Sex_Select = "FeiTium" then
				rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"='女' ")
				getmm=rs(0)
				set rs=nothing
			else
				if db_Sex_Select = "Number" then
					rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"=0")
					getmm=rs(0)
					set rs=nothing
				end if
			end if
			if isnull(getmm) then getmm=0
		end function

		function getother()
			dim rs
			if db_Sex_Select = "FeiTium" then
				rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &" where  "& db_User_Sex &" = '保密' ")
				getother=rs(0)
				set rs=nothing
			else
				if db_Sex_Select = "Number" then
					rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &" where  "& db_User_Sex &" <>1 and  "& db_User_Sex &"<>0 ")
					getother=rs(0)
					set rs=nothing
				end if
			end if
			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=Cnt.asp></script>
			<!--#include file=zx.asp -->
				  <br> &nbsp;&nbsp;○- 当前在线:<font color=red><%=i%></font><br><br>
		<%end if%>
            </td>
          </tr>
          <%end if%>
		  <tr> 

⌨️ 快捷键说明

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