about.cs
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:4k
- <%
- if request.QueryString("ID")="" then
- sk_aboutTitle="SK企业网站管理系统"
- elseif not IsNumeric(request.QueryString("ID")) then
- sk_aboutTitle="Parameter Error"
- elseif conn.execute("select * from sk_About Where ViewFlag and ID="&request.QueryString("ID")).eof then
- sk_aboutTitle="Parameter Error"
- else
- set rs = server.createobject("adodb.recordset")
- sql="select * from sk_About where ViewFlag and ID="&request.QueryString("ID")
- rs.open sql,conn,1,1
- sk_aboutTitle=rs("AboutName")
- rs.close
- set rs=nothing
- end if
- %>
- <%
- function WebMenu()
- dim rs,sql,i
- set rs = server.createobject("adodb.recordset")
- sql="select ID,AboutName from sk_About where ViewFlag and not ChildFlag order by Sequence asc"
- rs.open sql,conn,1,1
- response.write" "
- if rs.bof and rs.eof then
- response.write " 暂无相关信息"
- else
- do
- response.write " "
- response.write "<div class='l2'><a href='About.sk.asp?ID="&rs("ID")&"'>"&rs("AboutName")&"</a></div>"
- rs.movenext
- loop until rs.eof
- end if
- rs.close
- set rs=nothing
- end function
- function WebLocation()
- dim ID
- ID=request.QueryString("ID")
- dim rs,sql
- set rs = server.createobject("adodb.recordset")
- if request.QueryString("ID")="" then
- sql="select top 1 ID,AboutName,Content,GroupID,Exclusive,ClickNumber from sk_About where ViewFlag and not ChildFlag order by Sequence asc"
- else
- sql="select ID,AboutName,Content,GroupID,Exclusive,ClickNumber from sk_About where ViewFlag and not ChildFlag and ID="&ID
- end if
- rs.open sql,conn,1,1
- if rs.bof and rs.eof then
- WebLocation="<img src='../img/Arrow_02.gif' align='absmiddle'>错误"
- else
- WebLocation="<img src='../img/Arrow_02.gif' align='absmiddle'>"&rs("AboutName")
- end if
- rs.close
- set rs=nothing
- end function
- function WebContent()
- dim ID
- ID=request.QueryString("ID")
- dim rs,sql
- set rs = server.createobject("adodb.recordset")
- if request.QueryString("ID")="" then
- sql="select top 1 ID,AboutName,Source,Content,GroupID,Exclusive,ClickNumber,AddTime from sk_About where ViewFlag and not ChildFlag order by Sequence asc"
- else
- sql="select ID,AboutName,Source,Content,GroupID,Exclusive,ClickNumber,AddTime from sk_About where ViewFlag and not ChildFlag and ID="&ID
- end if
- rs.open sql,conn,1,3
- if not rs.eof then
- numbers=len(rs("content")) '总字节数
- pagenum=Sitenum '每页显示的数量
- maxpage=-int(-numbers/pagenum)'总页数
- requestpage=clng(request("p"))'接收页码
- if requestpage="" or requestpage=0 then'获取默认页码
- requestpage=1
- end if
- if requestpage>maxpage then '当前页的页码大于最大页码时,使当前页码等于最大页码
- requestpage=maxpage
- end if
- if not requestpage=1 then '当前页码不等于1时,向下移动相应的字节数
- content=mid(rs("content"),(requestpage-1)*pagenum+1,Sitenum)
- else
- content=left(rs("content"),Sitenum) '当页码等于1时,截取相应文本
- end if
- if isempty(requestpage) then
- thispage=1
- else
- thispage=cint(requestpage)
- end if
- if ViewNoRight(rs("GroupID"),rs("Exclusive")) then
- %>
- <%=Replace(content,chr(13),"<br>")%>
- <%
- rs("ClickNumber")=rs("ClickNumber")+1
- else
- WebContent="<div align='center'><img src='../img/NoRight.jpg'></div>"
- end if
- response.write "<div align='right'><br>总页数:<font color=red>"&maxpage&"</font> 第 "
- for i=1 to maxpage
- if thispage=i then
- response.write ""&i&" "
- else
- response.write "<a href='?p="&i&"&ID="&ID&"'>"&i&"</a> "
- ' response.write "<a href='?p="&i&"'>"&i&"</a> "
- end if
- next
- response.write "页 <a href='#TOP'><img src='../img/Button_top_01.gif' align='absbottom' border='0'></a></div>"
- rs.update
- rs.close
- else
- response.write "<div align='center'>暂无相关信息</div>"
- end if
- set rs=nothing
- end function
- %>