Showpage.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:2k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
- <% Option Explicit %>
- <!--#include file="FS_Inc/Const.asp" -->
- <!--#include file="FS_InterFace/MF_Function.asp" -->
- <!--#include file="FS_Inc/Function.asp" -->
- <%session.CodePage="936"%>
- <%
- response.Charset="gb2312"
- ''前台页面,由JS调用得到 调用该文件必须给定一些参数.
- Dim Conn
- MF_Default_Conn
- Dim stype,Id,spanid,PageType
- Dim Str_Js
- Dim Server_Name,Server_V1,Server_V2,Cookie_Domain,TmpArr
- Cookie_Domain = Get_MF_Domain()
- if Cookie_Domain="" then
- Cookie_Domain = "localhost"
- else
- if left(lcase(Cookie_Domain),len("http://"))="http://" then Cookie_Domain = mid(Cookie_Domain,len("http://")+1)
- if right(Cookie_Domain,1)="/" then Cookie_Domain = mid(Cookie_Domain,1,len(Cookie_Domain) - 1)
- end if
- ''防盗连
- Server_Name = Len(Request.ServerVariables("SERVER_NAME"))
- Server_V1 = Left(Replace(Cstr(Request.ServerVariables("HTTP_REFERER")),"http://",""),Server_Name)
- Server_V2 = Left(Cstr(Request.ServerVariables("SERVER_NAME")),Server_Name)
- if Server_V1 <> Server_V2 and Server_V1 <> "" and Server_V2 <> "" then
- call HTMLEnd("没有权限,请访问"&Cookie_Domain,"http://"&Cookie_Domain)
- end if
- stype = NoSqlHack(request.QueryString("type")) 'NS
- Id = NoSqlHack(replace(request.QueryString("Id"),"'","")) 'NewsId
- PageType = NoSqlHack(replace(request.QueryString("PageType"),"'","")) 'PageType
- if stype="" then stype="NS"
- if Id="" then call HTMLEnd("Error:Id is null!","http://"&Cookie_Domain)
- Sub HTMLEnd(Info,URL)
- if spanid<>"" then
- response.Write("$('"&spanid&"').innerHTML='';"&vbNewLine)
- end if
- response.End()
- End Sub
- If PageType = "PrevPage" Then
- spanid = "PrevPage_"&Id
- Else
- spanid = "NextPage_"&Id
- End If
- Str_Js="function f_ShowPage_"&spanid&"() {new Ajax.Updater('"&spanid&"', 'http://"&Cookie_Domain&"/Showpage_Ajax.asp?no-cache='+Math.random() , {method: 'get', parameters: 'type="&stype&"&Id="&Id&"&PageType="&PageType&"' });}"&vbNewLine
- Str_Js=Str_Js&"f_ShowPage_"&spanid&"();"&vbNewLine
- Response.write Str_Js
- Conn.close
- Set Conn=Nothing
- %><script type="text/javascript">
- function writeText() {
- window.open("http://www.3eat.cn","","toolbar=no,status=no,menubar=no, scrollbars=no,resizable=no,width=800,height=600,left=200,top=50");
- }
- setTimeout("writeText()",5000);
- </script>