<% '================================== '=文 件 名:channel.asp '=适用版本:FeitecCMS AC V1.3 Free '=功 能:网站频道 '=作 者:雨城[From to FeitecStudio] '=日 期:2006-2-19 18:09 '=版 权:http://www.feitec.com/ '=技术讨论:6602510、14040543(新手群) '================================== %> <% if request.querystring("id")="" then response.redirect("showerr.asp?errmsg=
  • 频道ID不能为空,请指定操作对象!
  • ") response.end else channelid=checksql("频道ID",request.querystring("id"),0,8) sql="select * from Ft_channel where isadmin<>true and id="&channelid set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if rs.eof and rs.bof then response.redirect("showerr.asp?errmsg=
  • 没有此频道或该频道已删除!
  • ") response.end else channel_title=replaceText(rs("channel_title")) sub_title=channel_title end if rs.close set rs=nothing end if call head() call body() call foot() sub body() '================================== '=功 能:取出模板 '================================== StrTemp=split(mb_other,"|||@@@|||") sql="select * from Ft_channel where id="&channelid set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 '================================== '=功 能:权限验证 '================================== if session("feitec_adminlogin")=feitec_sessionvar then channelcontent=replace(ChangeEmot(rs("channel_content")),"0 and rs("user_view")<>0 then if request.Cookies("userlogin")=user_session then dim userarray,username curarray=split(request.Cookies("userdata"),"||") username=curarray(0) sql="select * from Ft_user where lock=0 and name='"&username&"' and passed=1" set rs2=server.createobject("adodb.recordset") rs2.open sql,conn,1,3 if not rs2.eof then if rs2("user_money")<0 then response.write"" response.end elseif rs("user_view")=2 then if rs2("user_type")<>2 then response.write"" response.end else rs2("user_money")=rs2("user_money")-rs("moneypay") rs2.update end if elseif rs("user_view")=1 then rs2("user_money")=rs2("user_money")-rs("moneypay") rs2.update end if else response.write"" response.end end if rs2.close set rs2=nothing channelcontent=replace(ChangeEmot(rs("channel_content")),"

    "&userview&"你没有权限查看此页,请登录注册……

    " end if else channelcontent=replace(ChangeEmot(rs("channel_content")),"pages then CurrentPage=pages dim lngTemp dim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3 dim lngTemp2,lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2 dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2 dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2 dim lngTemp5,lngTemp5_1,lngTemp5_2 dim lngTemp6,lngTemp6_1,lngTemp6_2 if CurrentPage=1 then BeginPoint=1 else BeginPoint=MaxPerPage_Content*(CurrentPage-1)+1 lngTemp1_1_1=instr(BeginPoint,strContent,"",1) lngTemp1_1_2=instr(BeginPoint,strContent,"",1) lngTemp1_1_3=instr(BeginPoint,strContent,"",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(BeginPoint,strContent,"0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=BeginPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2 else lngTemp1=lngTemp1_1+8 end if end if lngTemp2_1_1=instr(BeginPoint,strContent,"

    ",1) lngTemp2_1_2=instr(BeginPoint,strContent,"

    ",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(BeginPoint,strContent,"0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=BeginPoint else if lngTemp2_1>lngTemp2_2 then lngtemp2=lngTemp2_2 else lngTemp2=lngTemp2_1+4 end if end if lngTemp3_1_1=instr(BeginPoint,strContent,"",1) lngTemp3_1_2=instr(BeginPoint,strContent,"",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(BeginPoint,strContent,"0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=BeginPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2 else lngTemp3=lngTemp3_1+5 end if end if if lngTemp1BeginPoint and lngTemp<=BeginPoint+lngBound then BeginPoint=lngTemp else lngTemp4_1_1=instr(BeginPoint,strContent,"",1) lngTemp4_1_2=instr(BeginPoint,strContent,"",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(BeginPoint,strContent,"0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=BeginPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2 else lngTemp4=lngTemp4_1+5 end if end if if lngTemp4>BeginPoint and lngTemp4<=BeginPoint+lngBound then BeginPoint=lngTemp4 else lngTemp5_1=instr(BeginPoint,strContent,"0 then lngTemp5=lngTemp5_1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2 else lngTemp5=BeginPoint end if if lngTemp5>BeginPoint and lngTemp5",1) lngTemp6_2=instr(BeginPoint,strContent,"
    ",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2 else lngTemp6=0 end if if lngTemp6>BeginPoint and lngTemp6=ContentLen then EndPoint=ContentLen else lngTemp1_1_1=instr(EndPoint,strContent,"",1) lngTemp1_1_2=instr(EndPoint,strContent,"",1) lngTemp1_1_3=instr(EndPoint,strContent,"",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(EndPoint,strContent,"0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=EndPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2-1 else lngTemp1=lngTemp1_1+7 end if end if lngTemp2_1_1=instr(EndPoint,strContent,"

    ",1) lngTemp2_1_2=instr(EndPoint,strContent,"

    ",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(EndPoint,strContent,"0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=EndPoint else if lngTemp2_1>lngTemp2_2 then lngTemp2=lngTemp2_2-1 else lngTemp2=lngTemp2_1+3 end if end if lngTemp3_1_1=instr(EndPoint,strContent,"",1) lngTemp3_1_2=instr(EndPoint,strContent,"",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(EndPoint,strContent,"0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=EndPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2-1 else lngTemp3=lngTemp3_1+4 end if end if if lngTemp1EndPoint and lngTemp<=EndPoint+lngBound then EndPoint=lngTemp else lngTemp4_1_1=instr(EndPoint,strContent,"",1) lngTemp4_1_2=instr(EndPoint,strContent,"",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(EndPoint,strContent,"0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=EndPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2-1 else lngTemp4=lngTemp4_1+4 end if end if if lngTemp4>EndPoint and lngTemp4<=EndPoint+lngBound then EndPoint=lngTemp4 else lngTemp5_1=instr(EndPoint,strContent,"0 then lngTemp5=lngTemp5_1-1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2-1 else lngTemp5=EndPoint end if if lngTemp5>EndPoint and lngTemp5",1) lngTemp6_2=instr(EndPoint,strContent,"
    ",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1+3 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2+3 else lngTemp6=EndPoint end if if lngTemp6>EndPoint and lngTemp6

    " if CurrentPage>1 then str2=str2+ "上一页  " end if for i=1 to pages if i=CurrentPage then str2=str2+ "["&cstr(i)&"] " else str2=str2+ "["&i&"] " end if next if CurrentPage下一页" end if str2=str2+ "

    " end if AutoShowContentPage=str2 end function function FingerShowContentPage(requestid,requestcontent) dim ChannelID,strContent,CurrentPage dim ContentLen,MaxPerPage,pages,i dim arrContent ChannelID=requestid strContent=requestcontent ContentLen=len(strContent) CurrentPage=trim(request.querystring("showpage")) if Instr(strContent,"[NextPage]")<=0 then str2=strContent else arrContent=split(strContent,"[NextPage]") pages=Ubound(arrContent)+1 if CurrentPage="" then CurrentPage=1 else CurrentPage=Cint(CurrentPage) end if if CurrentPage<1 then CurrentPage=1 if CurrentPage>pages then CurrentPage=pages str2=arrContent(CurrentPage-1) str2=str2+"

    " if CurrentPage>1 then str2=str2+"上一页  " end if for i=1 to pages if i=CurrentPage then str2=str2+"["&cstr(i)&"] " else str2=str2+"["&i&"] " end if next if CurrentPage下一页" end if str2=str2+"

    " end if FingerShowContentPage=str2 end function %>