html_page.asp

来自「实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员」· ASP 代码 · 共 114 行

ASP
114
字号
<%@ codepage ="936" %>
<%
	If Session("globalecmaster")="" OR Session("masterflag")="" Then
response.write "<script language='javascript'>"
response.write"parent.location.href='../login.asp';</SCRIPT>" 
response.end
	End If


'权限限制^^^^^^^^^^^^^^^^^^^^
 Dim ishavegant
 ishavegant=False
 in_str=Split(Session("masterflag"),",")
 For Each ins In in_str
 If Trim(ins)="101" Then 
 ishavegant=True
 End If
 next 
 If ishavegant=False Then
 Response.Redirect "../err.asp"
 Response.End
 End If
 '^^^
 %>
<% data_path="../../" 'ACC连接数据库路径,对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/filesystem.asp"-->
<!--#include file="../../inc/safe.asp"-->
<!--#include file="../../manage/makehtml/index/temp_inc.asp"-->
<style type="text/css">
body{
	font-size: 12px;
}
</style>
<% 
 Set rs=Server.Createobject("adodb.recordSet")
sql="select * from [yixiang_main]"
rs.Open sql,conn,1,1
Dim fso,html_save,html_page,html_content
	Set fso = YXFSO
	On Error Resume Next 
	Set html_save = fso.OpenTextFile(Server.Mappath(HOPE_InstallDir&"about/index_temp.html"),1)   '模版页面
	
  	html_content = html_save.ReadAll   '读出模版
	Select Case Request("act")
		Case "about"
			html_page=HOPE_InstallDir&"about/index.html"  '生成网页地址
			html_content=Replace(html_content,"#HOPE_Aboutname#","关于我们")   
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("aboutus"))   
          	html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)   

		Case "job"
			html_page=HOPE_InstallDir&"about/job.html"  '生成网页地址
			html_content=Replace(html_content,"#HOPE_Aboutname#","诚聘英才")  
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("job"))  
  			html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)   

		Case "map"
	    	html_page=HOPE_InstallDir&"about/sitemap.html"  '生成网页地址
 			html_content=Replace(html_content,"#HOPE_Aboutname#","网站地图")   
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("map"))  
  		    html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)  

		Case "hezuo"
 	 	  	html_page=HOPE_InstallDir&"about/products.html"  '生成网页地址
 			html_content=Replace(html_content,"#HOPE_Aboutname#","合作代理")  ' 
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("hezuo"))   
  		    html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)   
			
		Case "kefu"	
		    html_page=HOPE_InstallDir&"about/service.html"  '生成网页地址
 			html_content=Replace(html_content,"#HOPE_Aboutname#","客户服务")   
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("kefu"))  
 		    html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)   

		Case "shenming"
			html_page=HOPE_InstallDir&"about/copyright.html"  '生成网页地址
			html_content=Replace(html_content,"#HOPE_Aboutname#","网站声明")   
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("shenming"))   
             html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)   

		Case "ads"
			html_page=HOPE_InstallDir&"about/pop.html"  '生成网页地址
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("ads"))  
			html_content=Replace(html_content,"#HOPE_Aboutname#","广告服务")   
 		    html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)  

		Case "contact"
			html_page=HOPE_InstallDir&"about/contact.html"  '生成网页地址
			html_content=Replace(html_content,"#HOPE_Aboutname#","联系我们")   
			html_content=Replace(html_content,"#HOPE_Aboutus#",rs("lianxi"))  
 		    html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)   

		Case "link"
			html_page=HOPE_InstallDir&"about/link.html"  '生成网页地址
			html_content=Replace(html_content,"#HOPE_Aboutname#","友情连接")   
			html_content=Replace(html_content,"#HOPE_Aboutus#","#HOPE_ShowFriendSite(0,0,6,0,0,0)#")   
 		    html_content=Replace(html_content,"#HOPE_index#",HOPE_InstallDir)  
 						
		Case else
	End Select
	html_content=Hope_HtmlResult(html_content)
	On Error Resume Next 
	Set html_save = fso.CreateTextFile(Server.Mappath(html_page),True)  '创建生成文件,true为可覆盖
	If Err Then
	 Response.Write("<br><br><font color=red>生成失败! </font>注意该模版是否存在或网站的基本设置中的'网站所在文件夹'是否正确! <a href='javascript:window.close();'>关闭</a>")
  	Response.End()
  	End If
	html_save.Write html_content   '写数据
	html_save.Close
	Response.Write "生成完毕。<a href="&html_page&" target=blank>点击查看</a> <a href='javascript:window.close();'>关闭</a>"
 Set rs = Nothing
%>

⌨️ 快捷键说明

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