<%@language=vbscript codepage=936 %> <% dim conn,db Set conn = Server.CreateObject("ADODB.Connection") conn.Open "provider=sqloledb;data source=127.0.0.1;initial catalog=nursewz;user id=runsun-nurse;password=nurse2007!@#" sub CloseConn() conn.close set conn=nothing end sub %> <% dim UserTableType,Conn_User,db_bbs UserTableType = "Dvbbs7.1" ' "Dvbbs6.0" --- 整合动网论坛6.0 Set Conn_User = Server.CreateObject("ADODB.Connection") Conn_User.Open "provider=sqloledb;data source=127.0.0.1;initial catalog=nursebbs;user id=runsun-nurse;password=nurse2007!@#;" sub CloseConn_User() Conn_User.close set Conn_User=nothing end sub 'MY动力与动网论坛共用的用户数据表 Const db_User_Table="[Dv_User]" 'MY动力与动网论坛共用的用户字段名 Const db_User_ID="UserID" '用户ID Const db_User_Name="UserName" '用户名 Const db_User_Sex="UserSex" '性别 Const db_User_Email="UserEmail" 'Email地址 'Const db_User_Homepage="homepage" '主页 'Const db_User_QQ="Oicq" 'QQ 'Const db_User_Icq="icq" 'Icq 'Const db_User_Msn="msn" 'Msn '以上4个字段集中到DV_User中的UserIM字段 Const db_User_IM="UserIM" Const db_User_Password="UserPassword" '密码 Const db_User_Question="UserQuesion" '忘记密码的提示问题 Const db_User_Answer="UserAnswer" '问题答案 Const db_User_Sign="Usersign" '签名 Const db_User_Face="Userface" '头像 Const db_User_FaceWidth="Userwidth" '头像宽度 Const db_User_FaceHeight="Userheight" '头像高度 Const db_User_RegDate="JoinDate" '注册日期 Const db_User_LoginTimes="Userlogins" '登录次数 Const db_User_LastLoginTime="lastlogin" '最后登录时间 Const db_User_LastLoginIP="UserLastIP" '最后登录IP Const db_User_UserClass="userclass" '论坛用户等级(登录时用到) 'MY动力使用的用户字段名 Const db_User_CheckNum="CheckNum" '验证码 Const db_User_LockUser="lockuser" '是否锁定用户 Const db_User_ArticleCount="ArticleCount" '发表文章数 Const db_User_ArticleChecked="ArticleChecked" '已审核文章数 Const db_User_UserLevel="UserLevel" '用户等级(权限) Const db_User_UserPoint="userWealth" '用户点数 Const db_User_ChargeType="ChargeType" '计费方式 Const db_User_BeginDate="BeginDate" '开始日期 Const db_User_Valid_Num="Valid_Num" '有效期数值 Const db_User_Valid_Unit="Valid_Unit" '有效期单位 '动网论坛使用的用户字段名 'Const db_User_BbsType="bbstype" Const db_User_Article="userpost" '原Article字段 Const db_User_UserGroup="UserGroup" Const db_User_UserWealth="userWealth" Const db_User_UserEP="userEP" Const db_User_UserCP="userCP" Const db_User_Title="UserTitle" 'Const db_User_Showre="showre" 'Const db_User_Reann="reann" 'Const db_User_UserCookies="usercookies" Const db_User_Birthday="Userbirthday" Const db_User_UserPhoto="UserPhoto" Const db_User_UserPower="UserPower" Const db_User_UserDel="UserDel" Const db_User_UserIsBest="UserIsBest" Const db_User_UserInfo="UserInfo" Const db_User_UserSetting="UserSetting" Const db_User_UserGroupID="UserGroupID" Const db_User_TitlePic="TitlePic" %> <% Const SiteName="中国护士网" '网站名称 Const SiteTitle="中国护士网" '网站标题 Const SiteUrl="http://www.china-nurse.com" '网站地址 Const LogoUrl="http://www.china-nurse.com/images/logos.gif" 'Logo地址 Const BannerUrl="http://www.china-nurse.com/images/logo468.jpg" 'Banner地址 Const WebmasterName="runsun" '站长姓名 Const WebmasterEmail="nurse@vip.163.com" '站长信箱 Const Copyright="版权所有 Copyright? 2003 <% sub ShowUserLogin() dim strLogin if CheckUserLogined()=False then strLogin="" & vbcrlf strLogin=strLogin & "" & vbcrlf strLogin=strLogin & "" & vbcrlf strLogin=strLogin & "" & vbcrlf strLogin=strLogin & "" & vbcrlf strLogin=strLogin & "" & vbcrlf strLogin=strLogin & "
用户名:
密  码:
Cookie:
" & vbcrlf strLogin=strLogin & "

新用户注册  忘记密码?
" & vbcrlf response.write strLogin %> <% Else username=request.Cookies("asp1632")("UserName") response.write "欢迎您!" & username & ",好久不见!" if ChargeType=1 then if UserPoint>0 then response.write "" if UserPoint<=10 then response.write "
" end if else response.write "" response.write "" end if else if ValidDays>0 then response.write "" if ValidDays<=10 then response.write "" end if else response.write "" response.write "" end if end if response.write "
用户控制面板:
" & vbcrlf response.write "   
进社区讨论" & vbcrlf response.write " 我的日记本
" & vbcrlf response.write "   主页投稿" & vbcrlf response.write "   投稿管理
" & vbcrlf response.write "   人才登录" & vbcrlf response.write "   语音聊天
" & vbcrlf response.write "   商城购物" & vbcrlf response.write "   我的订单
" & vbcrlf response.write "   个人信息" & vbcrlf response.write "   注销登录
" & vbcrlf dim MessagePOP MessagePop=1 response.write "   发短消息  " if Cint(newincept())>Cint(0) then response.write "" if MessagePop=1 then%> <%end if%> 收件箱 (<%=newincept()%>) <% else %> 收件箱 (0) <% end if response.write "
" end if end sub function CheckUserLogined() dim Logined,Password,rsLogin,sqlLogin Logined=True UserName=request.cookies("asp1632")("UserName") Password=request.cookies("asp1632")("Password") UserLevel=request.cookies("asp1632")("UserLevel") if UserName="" then Logined=False end if if Password="" then Logined=False end if if UserLevel="" then Logined=False UserLevel=9999 end if if Logined=True then username=replace(trim(username),"'","") password=replace(trim(password),"'","") UserLevel=Cint(trim(UserLevel)) set rsLogin=server.createobject("adodb.recordset") sqlLogin="select * from " & db_User_Table & " where " & db_User_LockUser & "=0 and " & db_User_Name & "='" & username & "' and " & db_User_Password & "='" & password &"'" rsLogin.open sqlLogin,Conn_User,1,1 if rsLogin.bof and rsLogin.eof then Logined=False else if password<>rsLogin(db_User_Password) or UserLevel"),"<","<") l=len(str) t=0 for i=1 to l c=Abs(Asc(Mid(str,i,1))) if c>255 then t=t+2 else t=t+1 end if if t>=strlen then gotTopic=left(str,i) & "…" exit for else gotTopic=str end if next gotTopic=replace(replace(replace(replace(gotTopic," "," "),chr(34),"""),">",">"),"<","<") end function sub ShowHot(ArticleNum,TitleLen) dim sqlHot,rsHot set rsHot=conn.execute("RGetArticleList_Hot " & HitsOfHot) if TitleLen<0 or TitleLen>255 then TitleLen=50 if rsHot.bof and rsHot.eof then response.write "
  • 无热门文章
  • " else do while not rsHot.eof response.Write "
  • " & gotTopic(rsHot("title"),TitleLen) & "
  • " rsHot.movenext loop end if rsHot.close set rsHot=nothing end sub sub Showelite2(ArticleNum,TitleLen) dim sqlelite2,rselite2 set rselite2=conn.execute("RGetArticleList_elite2") if TitleLen<0 or TitleLen>255 then TitleLen=50 if rselite2.bof and rselite2.eof then response.write "
  • 无推荐文章
  • " else do while not rselite2.eof response.Write "
  • " & gotTopic(rselite2("title"),TitleLen) & "
  • " rselite2.movenext loop end if rselite2.close set rselite2=nothing end sub function newincept() rs2=Conn_User.execute("Select Count(id) From Dv_Message Where flag=0 and issend=1 and delR=0 And incept='"& Trim(Request.Cookies("asp1632")("UserName")) &"'") newincept=rs2(0) set rs2=nothing if isnull(newincept) then newincept=0 end function function inceptid(stype) set rs2=Conn_User.execute("Select top 1 id,sender From dv_Message Where flag=0 and issend=1 and delR=0 And incept='"& Trim(Request.Cookies("asp1632")("UserName")) &"'") if stype=1 then inceptid=rs2(0) else inceptid=rs2(1) end if set rs2=nothing end function %> <% function JoinChar(strUrl) if strUrl="" then JoinChar="" exit function end if if InStr(strUrl,"?")1 then if InStr(strUrl,"&")" & totalnumber & " " & strUnit & "  " end if strUrl=JoinChar(sfilename) if CurrentPage<2 then strTemp=strTemp & "首页 上一页 " else strTemp=strTemp & "首页 " strTemp=strTemp & "上一页 " end if if n-currentpage<1 then strTemp=strTemp & "下一页 尾页" else strTemp=strTemp & "下一页 " strTemp=strTemp & "尾页" end if strTemp=strTemp & " 页次:" & CurrentPage & "/" & n & "页 " strTemp=strTemp & " " & maxperpage & "" & strUnit & "/页" if ShowAllPages=True then strTemp=strTemp & " 转到:" end if strTemp=strTemp & "" response.write strTemp end sub sub showpageAbroad(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit) dim n, i,strTemp,strUrl if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if strTemp= "
    " if ShowTotal=true then strTemp=strTemp & "共 " & totalnumber & " " & strUnit & "  " end if strUrl=JoinChar(sfilename) if CurrentPage<2 then strTemp=strTemp & "首页 上一页 " else strTemp=strTemp & "首页 " strTemp=strTemp & "上一页 " end if if n-currentpage<1 then strTemp=strTemp & "下一页 尾页" else strTemp=strTemp & "下一页 " strTemp=strTemp & "尾页" end if strTemp=strTemp & " 页次:" & CurrentPage & "/" & n & "页 " strTemp=strTemp & " " & maxperpage & "" & strUnit & "/页" if ShowAllPages=True then strTemp=strTemp & " 转到:" end if strTemp=strTemp & "
    " response.write strTemp end sub function nohtml(str) dim re Set re=new RegExp re.IgnoreCase =true re.Global=True re.Pattern="(\<.[^\<]*\>)" str=re.replace(str," ") re.Pattern="(\<\/[^\<]*\>)" str=re.replace(str," ") nohtml=str set re=nothing end function sub ShowAD(ADType) dim sqlAD,rsAD,AD,arrSetting,popleft,poptop,floatleft,floattop,fixedleft,fixedtop set rsAD=conn.execute("RGetADList " & ChannelID & "," & ADType) if not rsAd.bof and not rsAD.eof then do while not rsAD.eof if rsAD("isflash")=true then AD= "0 then AD = AD & " width='" & rsAD("ImgWidth") & "'" if rsAD("ImgHeight")>0 then AD = AD & " height='" & rsAD("ImgHeight") & "'" AD = AD & ">0 then AD = AD & " width='" & rsAD("ImgWidth") & "'" if rsAD("ImgHeight")>0 then AD = AD & " height='" & rsAD("ImgHeight") & "'" AD = AD & ">" else AD ="0 then AD = AD & " width='" & rsAD("ImgWidth") & "'" if rsAD("ImgHeight")>0 then AD = AD & " height='" & rsAD("ImgHeight") & "'" AD = AD & " border='0'>" end if if ADtype=0 then if session("PopAD"&rsAD("ID")&ChannelID)<>True then if instr(rsAD("ADSetting"),"|")>0 then arrSetting=split(rsAD("ADSetting"),"|") popleft=arrsetting(0) poptop=arrsetting(1) end if response.write "" session("PopAD"&rsAD("ID")&ChannelID)=True end if elseif ADtype=1 then response.write AD exit do elseif ADtype=2 then response.write AD exit do elseif ADtype=3 then response.write AD exit do elseif ADtype=4 then if instr(rsAD("ADSetting"),"|")>0 then arrSetting=split(rsAD("ADSetting"),"|") floatleft=arrsetting(0) floattop=arrsetting(1) end if response.write "
    " & AD & "
    " call FloatAD() exit do elseif ADtype=5 then if instr(rsAD("ADSetting"),"|")>0 then arrSetting=split(rsAD("ADSetting"),"|") fixedleft=arrsetting(0) fixedtop=arrsetting(1) end if response.write "
    " & AD & "
    " call FixedAD() exit do end if rsAD.movenext loop end if rsAD.close set rsAD=nothing end sub sub ShowTopUser(UserNum) if UserNum<=0 or UserNum>100 then UserNum=10 dim sqlTopUser,rsTopUser,i sqlTopUser="select top " & UserNum & " * from " & db_User_Table & " order by " & db_User_ArticleChecked & " desc," & db_User_ID & " asc" set rsTopUser=server.createobject("adodb.recordset") rsTopUser.open sqlTopUser,Conn_User,1,1 if rsTopUser.bof and rsTopUser.eof then response.write "没有任何用户" else response.write "" for i=1 to rsTopUser.recordcount response.write "" rsTopUser.movenext next response.write "
    名次用户名文章数
    " & cstr(i) & "" & rsTopUser(db_User_Name) & "" & rsTopUser(db_User_ArticleChecked) & "
    more...
    " end if set rsTopUser=nothing end sub sub ShowVote() dim sqlVote,rsVote,i sqlVote="select top 1 * from vote2 where IsSelected=1" sqlVote=sqlVote& " and (ChannelID=0 or ChannelID=" & ChannelID & ") order by ID Desc" Set rsVote= Server.CreateObject("ADODB.Recordset") rsVote.open sqlVote,conn,1,1 if rsVote.bof and rsVote.eof then response.Write " 没有任何调查" else response.write "
    " response.write "    " & rsVote("Title") & "
    " if rsVote("VoteType")="Single" then for i=1 to 8 if trim(rsVote("Select" & i) & "")="" then exit for response.Write "" & rsVote("Select" & i) & "
    " next else for i=1 to 8 if trim(rsVote("Select" & i) & "")="" then exit for response.Write "" & rsVote("Select" & i) & "
    " next end if response.write "
    " response.write "" response.write "" response.write "
    " response.write "  " response.write "" response.write "
    " end if rsVote.close set rsVote=nothing end sub dim strChannel,sqlChannel,rsChannel,ChannelUrl,ChannelName dim ArticleID,ArticleTitle dim FileName,strFileName,MaxPerPage,ShowSmallClassType dim totalPut,CurrentPage,TotalPages dim BeginTime,EndTime dim founderr, errmsg dim ClassID,SpecialID,keyword,strField,SpecialName dim rs,sql,sqlArticle,rsArticle,sqlSearch,rsSearch,rsPic,sqlSpecial,rsSpecial,sqlUser,rsUser dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,SkinID,LayoutID,LayoutFileName,ChildID,tID,tChild dim tSpecial dim strPic,AnnounceCount dim PageTitle,strPath,strPageTitle dim strClassTree UserLogined=CheckUserLogined() BeginTime=Timer ArticleID=trim(request("ArticleID")) SpecialID=trim(request("SpecialID")) strField=trim(request("Field")) keyword=trim(request("keyword")) 'UserLevel=request.cookies("asp1632")("UserLevel") if ArticleId="" then ArticleID=0 else ArticleID=Clng(ArticleID) end if if ClassID<>"" then ClassID=CLng(ClassID) else ClassID=0 end if if SpecialID="" then SpecialID=0 else SpecialID=CLng(SpecialID) end if if UserLevel="" then UserLevel=5000 else UserLevel=Cint(UserLevel) end if strPath= " 您现在的位置: " & SiteName & "" strPageTitle= SiteTitle if ShowSiteChannel="Yes" then strChannel= "| " set rsChannel=conn.execute("RGetChannel") do while not rsChannel.eof if rsChannel("ChannelID")=ChannelID then ChannelUrl=rsChannel("LinkUrl") ChannelName=rsChannel("ChannelName") strChannel=strChannel & "" & ChannelName & " | " else strChannel=strChannel & "" & rsChannel("ChannelName") & " | " end if rsChannel.movenext loop rsChannel.close set rsChannel=nothing if trim(ChannelName)<>"" then strPath=strPath & " >> " & ChannelName & "" end if end if if ArticleID>0 then set rs=conn.execute("GetArticleInfo " & ArticleID) if rs.bof and rs.eof then FoundErr=True ErrMsg=ErrMsg & "
  • 你要找的文章不存在,或者已经被管理员删除!
  • " else if rs("Passed")=False then FoundErr=True ErrMsg=ErrMsg & "
  • 你要找的文章尚未被管理员审核!
  • " else ClassID=rs("ClassID") SpecialID=rs("SpecialID") SkinID=rs("SkinID") LayoutID=rs("LayoutID") ArticleTitle=rs("Title") ArticleID=rs("ArticleID") dim Author,CopyFrom,hits Author=rs("Author") CopyFrom=rs("CopyFrom") Hits=rs("Hits") conn.execute("update Article set Hits=Hits+1 where ArticleID=" & ArticleID) if rs("hits")>=HitsOfHot then conn.execute("update Article set Hot=1 where ArticleID=" & ArticleID) end if end if end if end if if FoundErr=True then Call WriteErrMsg() response.end end if if ClassID>0 then set tClass=conn.execute("RGetArticleClassInfo " & ClassID) if tClass.bof and tClass.eof then FoundErr=True ErrMsg=ErrMsg & "
  • 找不到指定的栏目
  • " else if tClass(9)
  • 对不起,你没有浏览本栏目的权限!
  • " ErrMsg=ErrMsg & "你不是" & CheckLevel(tClass(9)) & "!" else ClassName=tClass(0) RootID=tClass(1) ParentID=tClass(2) Depth=tClass(3) ParentPath=tClass(4) Child=tClass(5) if ArticleID<=0 then SkinID=tClass(6) LayoutID=tClass(7) end if LayoutFileName=tClass(8) url=tclass(10) strPath=strPath & " >> " if ParentID>0 then dim sqlPath,rsPath sqlPath="select C.ClassID,C.ClassName,L.LayoutFileName,L.LayoutID,C.url From ArticleClass2 C" sqlPath= sqlPath & " inner join Layout L on C.LayoutID=L.LayoutID where C.ClassID in (" & ParentPath & ") order by C.Depth" set rsPath=server.createobject("adodb.recordset") rsPath.open sqlPath,conn,1,1 do while not rsPath.eof strPath=strPath & "" & rsPath(1) & " >> " strPageTitle=strPageTitle & ">>" rsPath.movenext loop rsPath.close set rsPath=nothing end if strPath=strPath & "" & ClassName & "" strPageTitle=strPageTitle & ClassName end if end if end if if FoundErr=True then Call WriteErrMsg() response.end end if if SpecialID>0 then set tSpecial=conn.execute("RGetSpecialInfo " & SpecialID) if tSpecial.bof and tSpecial.eof then founderr=True ErrMsg=ErrMsg & "
  • 找不到指定的栏目
  • " else if tSpecial(5)
  • 对不起,你没有浏览本专题的权限!
  • " ErrMsg=ErrMsg & "你不是" & CheckLevel(tSpecial(5)) & "!" else SpecialName=tSpecial(1) if ArticleID<=0 then SkinID=tSpecial(2) LayoutID=tSpecial(3) end if LayoutFilename=tSpecial(4) strPath=strPath & " >> [专题]" & SpecialName & "" strPageTitle=strPageTitle & " >> [专题]" & SpecialName end if end if end if if FoundErr=True then Call WriteErrMsg() response.end end if if keyword<>"" then keyword=ReplaceBadChar(keyword) end if if request("page")<>"" then currentPage=cint(request("page")) else currentPage=1 end if sub ShowChildClass(ShowType) dim sqlChild,rsChild,i set rsChild=conn.execute("RGetChildClass_Article_Menu " & ClassID) if rsChild.bof and rsChild.eof then response.write "没有任何子栏目" else if ShowType=1 then do while not rsChild.eof if rsChild(5)<>"" then response.write "" & rsChild(1) & "" else response.Write "" & rsChild(1) & "" end if if rsChild(6)>0 then response.write "(" & rsChild(6) & ")" end if rsChild.movenext loop else i=0 do while not rsChild.eof if rsChild(5)<>"" then response.write "  " & rsChild(1) & "" else response.Write "  " & rsChild(1) & "" end if if rsChild(6)>0 then response.write "(" & rsChild(6) & ")" end if rsChild.movenext i=i+1 if i mod 5=0 then response.write "
    " end if loop end if end if rsChild.close set rsChild=nothing end sub sub ShowArticle(TitleLen) if TitleLen<0 or TitleLen>200 then TitleLen=50 end if sqlArticle=sqlArticle & "select A.ArticleID,A.ClassID,L.LayoutID,L.LayoutFileName,A.Title,A.Keyword,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType," sqlArticle=sqlArticle & "A.Hits,A.OnTop,A.Hot,A.elite2,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl,A.filename,A.filepath from Article A" sqlArticle=sqlArticle & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=0 and A.Passed=1 " if SpecialID>0 then sqlArticle=sqlArticle & " and A.SpecialID=" & SpecialID end if if ClassId>0 then sqlArticle=sqlArticle & " and A.ClassID=" & ClassID end if sqlArticle=sqlArticle & " order by A.OnTop desc,A.ArticleID desc" Set rsArticle= Server.CreateObject("ADODB.Recordset") rsArticle.open sqlArticle,conn,1,1 'set rsArticle=conn.execute("RGetArticleList2 " & SpecialID & "," & ClassID) if rsArticle.bof and rsArticle.eof then totalput=0 response.Write("
  • 没有任何文章
  • ") else totalput=rsArticle.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then call ArticleContent(50,True,false,false,0,false,false) else if (currentPage-1)*MaxPerPage200 then TitleLen=50 end if sqlArticle=sqlArticle & "select A.ArticleID,A.ClassID,L.LayoutID,L.LayoutFileName,A.Title,A.Keyword,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType," sqlArticle=sqlArticle & "A.Hits,A.OnTop,A.Hot,A.elite2,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl,A.filename,A.filepath from Article A" sqlArticle=sqlArticle & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=0 and A.Passed=1 " if SpecialID>0 then sqlArticle=sqlArticle & " and A.SpecialID=" & SpecialID end if if ClassId>0 then sqlArticle=sqlArticle & " and A.ClassID=" & ClassID end if sqlArticle=sqlArticle & " order by A.OnTop desc,A.ArticleID desc" Set rsArticle= Server.CreateObject("ADODB.Recordset") rsArticle.open sqlArticle,conn,1,1 'set rsArticle=conn.execute("RGetArticleList2 " & SpecialID & "," & ClassID) if rsArticle.bof and rsArticle.eof then totalput=0 response.Write("
  • 没有任何文章
  • ") else totalput=rsArticle.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then call ArticleContent(50,True,false,false,0,false,false) else if (currentPage-1)*MaxPerPage» " elseif rsArticle("elite2")=true then strTemp = strTemp & "» " else strTemp = strTemp & "» " end if end if if ShowIncludePic=True and rsArticle("IncludePic")=true then strTemp = strTemp & "[图]" end if Author=rsArticle("Author") if instr(Author,"|")>0 then AuthorName=left(Author,instr(Author,"|")-1) AuthorEmail=right(Author,len(Author)-instr(Author,"|")-1) else AuthorName=Author AuthorEmail="" end if strTemp = strTemp & "" TitleStr=gotTopic(rsArticle("title"),intTitleLen) if rsArticle("TitleFontType")=1 then TitleStr="" & TitleStr & "" elseif rsArticle("TitleFontType")=2 then TitleStr="" & TitleStr & "" elseif rsArticle("TitleFontType")=3 then TitleStr="" & TitleStr & "" end if if rsArticle("TitleFontColor")<>"" then TitleStr="" & TitleStr & "" end if strTemp=strTemp & TitleStr & "" if ShowAuthor=True or ShowDateType>0 or ShowHits=True then strTemp = strTemp & " (" if ShowAuthor=True then if AuthorEmail="" then strTemp=strTemp & AuthorName else strTemp=strTemp & "" & AuthorName & "" end if end if if ShowDateType>0 then if ShowAuthor=True then strTemp=strTemp & "," end if if CDate(FormatDateTime(rsArticle("UpdateTime"),2))=date() then strTemp = strTemp & "" else strTemp= strTemp & "" end if if ShowDateType=1 then strTemp= strTemp & month(rsArticle("UpdateTime")) & "月" & day(rsArticle("UpdateTime")) & "日" else strTemp=strTemp & FormatDateTime(rsArticle("UpdateTime"),1) & "" end if end if if ShowHits=True then if ShowAuthor=True or ShowDateType>0 then strTemp=strTemp & "," end if strTemp=strTemp & rsArticle("Hits") end if strTemp=strTemp & ")" end if if ShowHot=True and rsArticle("Hits")>=HitsOfHot then strTemp= strTemp & "热点文章" end if strTemp= strTemp & "
    " response.write strTemp rsArticle.movenext i=i+1 if i>=MaxPerPage then exit do loop end sub sub ShowPicArticle(intClassID,ArticleNum,TitleLen,ShowType,Cols,ImgWidth,ImgHeight,ContentLen,Hot,elite2) dim sqlPic,i,tClass,trs,arrClassID sqlPic="select top 4 A.ArticleID,A.ClassID,A.Title,A.filepath,A.filename," sqlPic=sqlPic & " A.Hot,A.Passed,A.DefaultPicUrl from Article A" sqlPic=sqlPic & " where A.Deleted=0 and DefaultPicUrl<>''" if intClassID>0 then set tClass=conn.execute("select ClassID,Child,ParentPath from ArticleClass2 where ClassID=" & intClassID) if not(tClass.bof and tClass.eof) then if tClass(1)>0 then arrClassID=ClassID set trs=conn.execute("select ClassID from ArticleClass2 where ParentID=" & tClass(0) & " or ParentPath like '%" & tClass(2) & "," & tClass(0) & ",%' and Child=0") do while not trs.eof arrClassID=arrClassID & "," & trs(0) trs.movenext loop set trs=nothing sqlPic=sqlPic & " and A.ClassID in (" & arrClassID & ")" else sqlPic=sqlPic & " and A.ClassID=" & tClass(0) end if set trs=nothing else sqlPic=sqlPic & " and A.ClassID=" & tClass(0) end if set tClass=nothing end if sqlPic=sqlPic & " and A.Hits>=500" sqlPic=sqlPic & " order by A.ArticleID desc" set rsPic=Server.CreateObject("ADODB.Recordset") rsPic.open sqlPic,conn,1,1 strPic= "" if rsPic.bof and rsPic.eof then strPic= strPic & "" else i=0 do while not rsPic.eof strPic=strPic & "" rsPic.movenext i=i+1 if ((i mod Cols=0) and (not rsPic.eof)) then strPic=strPic & "" loop end if strPic=strPic & "

    没有任何图片文章
    " call GetPicArticleTitle(TitleLen,ImgWidth,ImgHeight) strPic=strPic & "
    " response.write strPic rsPic.close end sub sub ShowPicArticle9(intClassID,ArticleNum,TitleLen,ShowType,Cols,ImgWidth,ImgHeight,ContentLen,Hot,elite2) dim sqlPic,i,tClass,trs,arrClassID sqlPic="select top "&ArticleNum&" A.ArticleID,A.ClassID,A.Title,A.filepath,A.filename," sqlPic=sqlPic & " A.Hot,A.Passed,A.DefaultPicUrl from Article A" sqlPic=sqlPic & " where A.Deleted=0 and DefaultPicUrl<>''" if intClassID>0 then set tClass=conn.execute("select ClassID,Child,ParentPath from ArticleClass2 where ClassID=" & intClassID) if not(tClass.bof and tClass.eof) then if tClass(1)>0 then arrClassID=ClassID set trs=conn.execute("select ClassID from ArticleClass2 where ParentID=" & tClass(0) & " or ParentPath like '%" & tClass(2) & "," & tClass(0) & ",%' and Child=0") do while not trs.eof arrClassID=arrClassID & "," & trs(0) trs.movenext loop set trs=nothing sqlPic=sqlPic & " and A.ClassID in (" & arrClassID & ")" else sqlPic=sqlPic & " and A.ClassID=" & tClass(0) end if set trs=nothing else sqlPic=sqlPic & " and A.ClassID=" & tClass(0) end if set tClass=nothing end if sqlPic=sqlPic & " and A.Hits>=500" sqlPic=sqlPic & " order by A.ArticleID desc" set rsPic=Server.CreateObject("ADODB.Recordset") rsPic.open sqlPic,conn,1,1 strPic= "" if rsPic.bof and rsPic.eof then strPic= strPic & "" else i=0 do while not rsPic.eof strPic=strPic & "" rsPic.movenext i=i+1 if ((i mod Cols=0) and (not rsPic.eof)) then strPic=strPic & "" loop end if strPic=strPic & "

    没有任何图片文章
    " call GetPicArticleTitle(TitleLen,ImgWidth,ImgHeight) strPic=strPic & "
    " response.write strPic rsPic.close end sub sub GetPicArticleTitle(intTitleLen,intImgWidth,intImgHeight) dim FileType,TitleStr FileType=right(lcase(rsPic("DefaultPicUrl")),3) TitleStr=gotTopic(rsPic("Title"),intTitleLen) strPic=strPic & "" if fileType="jpg" or fileType="bmp" or fileType="png" or fileType="gif" then strPic=strPic & "" else strPic=strPic & "" end if strPic=strPic & "
    " & TitleStr & "
    " end sub %> <% '出国频道===》AbroadFunction.asp 'order by 固顶 时间 desc function gotTopic(str,strlen) if str="" then gotTopic="" exit function end if dim l,t,c, i str=replace(replace(replace(replace(str," "," "),""",chr(34)),">",">"),"<","<") l=len(str) t=0 for i=1 to l c=Abs(Asc(Mid(str,i,1))) if c>255 then t=t+2 else t=t+1 end if if t>=strlen then gotTopic=left(str,i) & "…" exit for else gotTopic=str end if next gotTopic=replace(replace(replace(replace(gotTopic," "," "),chr(34),"""),">",">"),"<","<") end function Function ShowNews(IClassID,RecordNum) '针对每个项目的新闻 IClassID = Replace(cint(IClassID),"'","") RecordNum = Replace(cint(RecordNum),"'","") If IClassID <> "" and RecordNum <> "" Then Set rsArticle2= Server.CreateObject("ADODB.Recordset") set tClass=Server.CreateObject("ADODB.Recordset") 'IClassID '显示文章列表的classid If ChildID <> "" Then ChildID= "" End if set tClass=conn.execute("select ClassID from ArticleClass2 where ParentID=" & IClassID ) do while not tClass.eof if ChildID="" then ChildID=tClass(0) else ChildID=ChildID & "," & tClass(0) end if tClass.movenext loop tClass.close arrClassID=ChildID sql="select top "&RecordNum&" A.ArticleID,A.ClassID,A.Title,A.UpdateTime," sql=sql & "A.Hits,A.OnTop,A.passed,A.filename,A.filepath,A.TitleFontColor,A.IncludePic from Article A" sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=0 and A.Passed=1 and A.ClassID " sql=sql & "in (" & arrClassID & ") order by A.OnTop desc,A.ArticleID desc,A.Hits desc" 'Response.Write(sql) rsArticle2.open sql,conn,1,1 if rsArticle2.bof and rsArticle2.eof then response.write arrClassID else do while not rsArticle2.eof strTemp1 = "
  • " if rsArticle2("IncludePic")=true then strTemp1 = strTemp1 & "[图]" end if strTemp1 = strTemp1 & "" TitleStr=gotTopic(rsArticle2("title"),32) if rsArticle2("TitleFontColor")<>"" then TitleStr="" & TitleStr & "" end if strTemp1=strTemp1 & TitleStr & "" 'strTemp1=strTemp1 & "("&month(rsArticle2("UpdateTime")) 'strTemp1=strTemp1 & "月" & day(rsArticle2("UpdateTime")) & "日)
  • " strTemp1=strTemp1 & "" Response.Write(strTemp1) strTemp1="" rsArticle2.movenext loop end if rsArticle2.close set rsArticle2=nothing Else Response.Write("
  • 缺少参数
  • ") End if End Function Function ShowAbroadNews(IClassID,RecordNum,TitleLen) '针对整个出国版面的新闻 IClassID = Replace(cint(IClassID),"'","") RecordNum = Replace(cint(RecordNum),"'","") If IClassID <> "" and RecordNum <> "" Then Set rsArticle2= Server.CreateObject("ADODB.Recordset") set tClass=Server.CreateObject("ADODB.Recordset") 'IClassID '显示文章列表的classid If ChildID <> "" Then ChildID= "" End if set tClass=conn.execute("select ClassID from ArticleClass2 where RootID=" & IClassID ) do while not tClass.eof if ChildID="" then ChildID=tClass(0) else ChildID=ChildID & "," & tClass(0) end if tClass.movenext loop tClass.close arrClassID=ChildID sql="select top "&RecordNum&" A.ArticleID,A.ClassID,A.Title,A.UpdateTime," sql=sql & "A.Hits,A.OnTop,A.passed,A.filename,A.filepath,A.TitleFontColor,A.IncludePic from Article A" sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=0 and A.Passed=1 and A.ClassID " sql=sql & "in (" & arrClassID & ") order by A.OnTop desc,A.ArticleID desc,A.Hits desc" rsArticle2.open sql,conn,1,1 if rsArticle2.bof and rsArticle2.eof then response.write arrClassID else do while not rsArticle2.eof strTemp1 = "
  • " 'if rsArticle2("IncludePic")=true then 'strTemp1 = strTemp1 & "[图]" 'end if strTemp1 = strTemp1 & "" If TitleLen = "" Then TitleStr=gotTopic(rsArticle2("title"),32) Else TitleStr=gotTopic(rsArticle2("title"),TitleLen) End if if rsArticle2("TitleFontColor")<>"" then TitleStr="" & TitleStr & "" end if strTemp1=strTemp1 & TitleStr & "" 'strTemp1=strTemp1 & "("&month(rsArticle2("UpdateTime")) 'strTemp1=strTemp1 & "月" & day(rsArticle2("UpdateTime")) & "日)
  • " strTemp1=strTemp1 & "" Response.Write(strTemp1) strTemp1="" rsArticle2.movenext loop end if rsArticle2.close set rsArticle2=nothing Else Response.Write("
  • 缺少参数
  • ") End if End Function Function ShowHotNews(IClassID,RecordNum,TitleLen) '出国热点文章,点击率高的文章 IClassID = Replace(cint(IClassID),"'","") RecordNum = Replace(cint(RecordNum),"'","") If IClassID <> "" and RecordNum <> "" Then Set rsArticle2= Server.CreateObject("ADODB.Recordset") set tClass=Server.CreateObject("ADODB.Recordset") 'IClassID '显示文章列表的classid If ChildID <> "" Then ChildID= "" End if set tClass=conn.execute("select ClassID from ArticleClass2 where RootID=" & IClassID ) do while not tClass.eof if ChildID="" then ChildID=tClass(0) else ChildID=ChildID & "," & tClass(0) end if tClass.movenext loop tClass.close arrClassID=ChildID sql="select top "&RecordNum&" A.ArticleID,A.ClassID,A.Title,A.UpdateTime," sql=sql & "A.Hits,A.OnTop,A.passed,A.filename,A.filepath,A.TitleFontColor,A.IncludePic from Article A" sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=0 and A.Passed=1 " sql=sql & "and (A.Hits >= 500) and A.ClassID " sql=sql & "in (" & arrClassID & ") order by A.ArticleID desc,A.Hits desc" 'Response.Write(sql) rsArticle2.open sql,conn,1,1 if rsArticle2.bof and rsArticle2.eof then response.write arrClassID else do while not rsArticle2.eof strTemp1 = "
  • " 'if rsArticle2("IncludePic")=true then 'strTemp1 = strTemp1 & "[图]" 'end if strTemp1 = strTemp1 & "" If TitleLen = "" Then TitleStr=gotTopic(rsArticle2("title"),18) Else TitleStr=gotTopic(rsArticle2("title"),TitleLen) End if if rsArticle2("TitleFontColor")<>"" then TitleStr="" & TitleStr & "" end if strTemp1=strTemp1 & TitleStr & "" 'strTemp1=strTemp1 & "("&month(rsArticle2("UpdateTime")) 'strTemp1=strTemp1 & "月" & day(rsArticle2("UpdateTime")) & "日)
  • " strTemp1=strTemp1 & "" Response.Write(strTemp1) strTemp1="" rsArticle2.movenext loop end if rsArticle2.close set rsArticle2=nothing Else Response.Write("
  • 缺少参数
  • ") End if End Function Function ShowElite2News(IClassID,RecordNum,TitleLen) '出国推荐文章 IClassID = Replace(cint(IClassID),"'","") RecordNum = Replace(cint(RecordNum),"'","") If IClassID <> "" and RecordNum <> "" Then Set rsArticle2= Server.CreateObject("ADODB.Recordset") set tClass=Server.CreateObject("ADODB.Recordset") 'IClassID '显示文章列表的classid If ChildID <> "" Then ChildID= "" End if set tClass=conn.execute("select ClassID from ArticleClass2 where RootID=" & IClassID ) do while not tClass.eof if ChildID="" then ChildID=tClass(0) else ChildID=ChildID & "," & tClass(0) end if tClass.movenext loop tClass.close arrClassID=ChildID sql="select top "&RecordNum&" A.ArticleID,A.ClassID,A.Title,A.UpdateTime," sql=sql & "A.Hits,A.OnTop,A.passed,A.filename,A.filepath,A.TitleFontColor,A.IncludePic ,a.elite2 from Article A" sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=0 and A.Passed=1 and A.elite2=1 and A.ClassID " sql=sql & "in (" & arrClassID & ") order by A.ArticleID desc" 'Response.Write(sql) rsArticle2.open sql,conn,1,1 if rsArticle2.bof and rsArticle2.eof then response.write arrClassID else do while not rsArticle2.eof strTemp1 = "
  • " 'if rsArticle2("IncludePic")=true then 'strTemp1 = strTemp1 & "[图]" 'end if strTemp1 = strTemp1 & "" If TitleLen = "" Then TitleStr=gotTopic(rsArticle2("title"),18) Else TitleStr=gotTopic(rsArticle2("title"),TitleLen) End if if rsArticle2("TitleFontColor")<>"" then TitleStr="" & TitleStr & "" end if strTemp1=strTemp1 & TitleStr & "" 'strTemp1=strTemp1 & "("&month(rsArticle2("UpdateTime")) 'strTemp1=strTemp1 & "月" & day(rsArticle2("UpdateTime")) & "日)
  • " strTemp1=strTemp1 & "" Response.Write(strTemp1) strTemp1="" rsArticle2.movenext loop end if rsArticle2.close set rsArticle2=nothing Else Response.Write("
  • 缺少参数
  • ") End if End Function Function ShowTrainNews(PClassID,RecordNum) PClassID = Replace(cint(PClassID),"'","") RecordNum = Replace(cint(RecordNum),"'","") If PClassID <> "" and RecordNum <> "" Then Set rsArticle2= Server.CreateObject("ADODB.Recordset") set tClass=Server.CreateObject("ADODB.Recordset") 'IClassID '显示文章列表的classid If ChildID <> "" Then ChildID= "" End if set tClass=conn.execute("select ClassID from ArticleClass where ParentID=" & PClassID ) do while not tClass.eof if ChildID="" then ChildID=tClass(0) else ChildID=ChildID & "," & tClass(0) end if tClass.movenext loop tClass.close arrClassID=ChildID sql="select top "&RecordNum&" A.ArticleID,A.ClassID,A.Title,A.UpdateTime," sql=sql & "A.Hits,A.OnTop,A.passed,A.filename,A.filepath,A.TitleFontColor,A.IncludePic from Article A" sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=0 and A.Passed=1 and A.ClassID " sql=sql & "in (" & arrClassID & ") order by A.OnTop desc,A.ArticleID desc,A.Hits desc" 'Response.Write(sql) rsArticle2.open sql,conn,1,1 if rsArticle2.bof and rsArticle2.eof then response.write arrClassID else do while not rsArticle2.eof strTemp1 = "
  • " if rsArticle2("IncludePic")=true then strTemp1 = strTemp1 & "[图]" end if strTemp1 = strTemp1 & "" TitleStr=gotTopic(rsArticle2("title"),60) if rsArticle2("TitleFontColor")<>"" then TitleStr="" & TitleStr & "" end if strTemp1=strTemp1 & TitleStr & "" 'strTemp1=strTemp1 & "("&month(rsArticle2("UpdateTime")) 'strTemp1=strTemp1 & "月" & day(rsArticle2("UpdateTime")) & "日)
  • " strTemp1=strTemp1 & "" Response.Write(strTemp1) strTemp1="" rsArticle2.movenext loop end if rsArticle2.close set rsArticle2=nothing Else Response.Write("
  • 缺少参数
  • ") End if End Function %> <% dim UserLogined,UserName,UserLevel,ChargeType,UserPoint,ValidDays function gotTopic(str,strlen) if str="" then gotTopic="" exit function end if dim l,t,c, i str=replace(replace(replace(replace(str," "," "),""",chr(34)),">",">"),"<","<") l=len(str) t=0 for i=1 to l c=Abs(Asc(Mid(str,i,1))) if c>255 then t=t+2 else t=t+1 end if if t>=strlen then gotTopic=left(str,i) & "…" exit for else gotTopic=str end if next gotTopic=replace(replace(replace(replace(gotTopic," "," "),chr(34),"""),">",">"),"<","<") end function function JoinChar(strUrl) if strUrl="" then JoinChar="" exit function end if if InStr(strUrl,"?")1 then if InStr(strUrl,"&")" & totalnumber & " " & strUnit & "  " end if strUrl=JoinChar(sfilename) if CurrentPage<2 then strTemp=strTemp & "首页 上一页 " else strTemp=strTemp & "首页 " strTemp=strTemp & "上一页 " end if if n-currentpage<1 then strTemp=strTemp & "下一页 尾页" else strTemp=strTemp & "下一页 " strTemp=strTemp & "尾页" end if strTemp=strTemp & " 页次:" & CurrentPage & "/" & n & "页 " strTemp=strTemp & " " & maxperpage & "" & strUnit & "/页" if ShowAllPages=True then strTemp=strTemp & " 转到:" end if strTemp=strTemp & "" response.write strTemp end sub function IsValidEmail(email) dim names, name, i, c IsValidEmail = true names = Split(email, "@") if UBound(names) <> 1 then IsValidEmail = false exit function end if for each name in names if Len(name) <= 0 then IsValidEmail = false exit function end if for i = 1 to Len(name) c = Lcase(Mid(name, i, 1)) if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then IsValidEmail = false exit function end if next if Left(name, 1) = "." or Right(name, 1) = "." then IsValidEmail = false exit function end if next if InStr(names(1), ".") <= 0 then IsValidEmail = false exit function end if i = Len(names(1)) - InStrRev(names(1), ".") if i <> 2 and i <> 3 then IsValidEmail = false exit function end if if InStr(email, "..") > 0 then IsValidEmail = false end if end function Function IsObjInstalled(strClassString) On Error Resume Next IsObjInstalled = False Err = 0 Dim xTestObj Set xTestObj = Server.CreateObject(strClassString) If 0 = Err Then IsObjInstalled = True Set xTestObj = Nothing Err = 0 End Function function strLength(str) ON ERROR RESUME NEXT dim WINNT_CHINESE WINNT_CHINESE = (len("中国")=2) if WINNT_CHINESE then dim l,t,c dim i l=len(str) t=l for i=1 to l c=asc(mid(str,i,1)) if c<0 then c=c+65536 if c>255 then t=t+1 end if next strLength=t else strLength=len(str) end if if err.number<>0 then err.clear end function Function CheckDir(FolderPath) dim fso folderpath=Server.MapPath(".")&"\"&folderpath Set fso1 = Server.CreateObject("Scripting.FileSystemObjectfl") If fso.FolderExists(FolderPath) then CheckDir = True Else CheckDir = False End if Set fso = nothing End Function Function MakeNewsDir(foldername) dim fso,f Set fso = Server.CreateObject("Scripting.FileSystemObjectfl") Set f = fso.CreateFolder(foldername) MakeNewsDir = True Set fso = nothing End Function function SendMail(MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority) on error resume next Dim JMail Set JMail=Server.CreateObject("JMail.Message") if err then SendMail= "
  • 没有安装JMail组件
  • " err.clear exit function end if JMail.Charset="gb2312" '邮件编码 JMail.silent=true JMail.ContentType = "text/html" '邮件正文格式 'JMail.ServerAddress=MailServer '用来发送邮件的SMTP服务器 '如果服务器需要SMTP身份验证则还需指定以下参数 JMail.MailServerUserName = MailServerUserName '登录用户名 JMail.MailServerPassWord = MailServerPassword '登录密码 JMail.MailDomain = MailDomain '域名(如果用“name@domain.com”这样的用户名登录时,请指明domain.com JMail.AddRecipient MailtoAddress,MailtoName '收信人 JMail.Subject=Subject '主题 JMail.HMTLBody=MailBody '邮件正文(HTML格式) JMail.Body=MailBody '邮件正文(纯文本格式) JMail.FromName=FromName '发信人姓名 JMail.From = MailFrom '发信人Email JMail.Priority=Priority '邮件等级,1为加急,3为普通,5为低级 JMail.Send(MailServer) SendMail =JMail.ErrorMessage JMail.Close Set JMail=nothing end function sub WriteErrMsg() dim strErr strErr=strErr & "错误信息" & vbcrlf strErr=strErr & "

    " & vbcrlf strErr=strErr & "" & vbcrlf strErr=strErr & " " & vbcrlf strErr=strErr & " " & vbcrlf strErr=strErr & " " & vbcrlf strErr=strErr & "
    错误信息
    产生错误的可能原因:" & errmsg &"
    << 返回上一页
    " & vbcrlf strErr=strErr & "" & vbcrlf response.write strErr end sub sub WriteSuccessMsg(SuccessMsg) dim strSuccess strSuccess=strSuccess & "成功信息" & vbcrlf strSuccess=strSuccess & "

    " & vbcrlf strSuccess=strSuccess & "" & vbcrlf strSuccess=strSuccess & " " & vbcrlf strSuccess=strSuccess & " " & vbcrlf strSuccess=strSuccess & " " & vbcrlf strSuccess=strSuccess & "
    恭喜你!

    " & SuccessMsg &"
     
    " & vbcrlf strSuccess=strSuccess & "" & vbcrlf response.write strSuccess end sub function CheckUserLogined() dim Logined,Password,rsLogin,sqlLogin,diaryNum Logined=True UserName=request.cookies("asp1632")("UserName") Password=request.cookies("asp1632")("Password") UserLevel=request.cookies("asp1632")("UserLevel") if UserName="" then Logined=False end if if Password="" then Logined=False end if if UserLevel="" then 'Logined=False UserLevel=999 end if if Logined=True then username=replace(trim(username),"'","") password=replace(trim(password),"'","") UserLevel=Cint(trim(UserLevel)) set rsLogin=server.createobject("adodb.recordset") sqlLogin="select top 1 * from " & db_User_Table & " where " & db_User_LockUser & "=0 and " & db_User_Name & "='" & username & "' and " & db_User_Password & "='" & password &"'" rsLogin.open sqlLogin,Conn_User,1,1 if rsLogin.bof and rsLogin.eof then Logined=False else if password<>rsLogin(db_User_Password) or UserLevel"" then response.write "" if lcase(right(LogoUrl,3))<>"swf" then response.write "" else Response.Write "" end if response.write "" else response.write "" end if end sub sub ShowBanner() if BannerUrl<>"" then if lcase(right(BannerUrl,3))="swf" then Response.Write "" else response.Write "" end if else call ShowAD(1) end if end sub sub ShowVote() dim sqlVote,rsVote,i sqlVote="select top 1 * from vote2 where IsSelected=1" sqlVote=sqlVote& " and (ChannelID=0 or ChannelID=" & ChannelID & ") order by ID Desc" Set rsVote= Server.CreateObject("ADODB.Recordset") rsVote.open sqlVote,conn,1,1 if rsVote.bof and rsVote.eof then response.Write " 没有任何调查" else response.write "
    " response.write "    " & rsVote("Title") & "
    " if rsVote("VoteType")="Single" then for i=1 to 8 if trim(rsVote("Select" & i) & "")="" then exit for response.Write "" & rsVote("Select" & i) & "
    " next else for i=1 to 8 if trim(rsVote("Select" & i) & "")="" then exit for response.Write "" & rsVote("Select" & i) & "
    " next end if response.write "
    " response.write "" response.write "" response.write "
    " response.write "  " response.write "" response.write "
    " end if rsVote.close set rsVote=nothing end sub sub ShowAnnounce(ShowType,AnnounceNum) dim sqlAnnounce,rsAnnounce,i set rsAnnounce=conn.execute("RGetAnnounce " & ChannelID) if rsAnnounce.bof and rsAnnounce.eof then AnnounceCount=0 response.write "

      没有通告

    " else AnnounceCount=rsAnnounce.recordcount if ShowType=1 then do while not rsAnnounce.eof response.Write "    " & rsAnnounce("title") & "
    " & rsAnnounce("Author") & "  
    " & FormatDateTime(rsAnnounce("DateAndTime"),1) & "
    " rsAnnounce.movenext i=i+1 if i" loop else do while not rsAnnounce.eof response.Write "    " & rsAnnounce("title") & "  [" & rsAnnounce("Author") & "  " & FormatDateTime(rsAnnounce("DateAndTime"),1) & "]        " rsAnnounce.movenext loop end if end if rsAnnounce.close set rsAnnounce=nothing end sub sub ShowFriendSite(LinkType,SiteNum,Cols,ShowType) dim sqlLink,rsLink,SiteCount,i,j,strLink if LinkType<>1 and LinkType<>2 then LinkType=1 else LinkType=Cint(LinkType) end if if SiteNum<=0 or SiteNum>100 then SiteNum=10 end if if Cols<=0 or Cols>20 then Cols=10 end if if ShowType=1 then strLink=strLink & "