index.asp

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

ASP
186
字号
<% data_path="../../../" 'ACC连接数据库路径,对SQL无效 %>
<!--#include file="../../../conn/conn.asp"-->
 <!--#include file="../../../inc/filesystem.asp"-->
<!--#include file="../../../inc/safe.asp"-->
<!--#include file="../../../inc/classcount.asp"-->
<!--#include file="temp_inc.asp"-->
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charSet=gb2312">
	<title>生成各大栏目首页</title>
	<style type="text/css">
	<!--
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
		background-color: #E4EDF9;
	}
	body,td,th {font-size: 12px;}
	
	a:link{
	text-decoration: none;
	color: #000000;
	font-size: 12px;
}
	a:visited{
	text-decoration: none;
	color: #000000;
	font-size: 12px;
}
	a:hover{
	text-decoration: underline;
	color: #FFFFFF;
	font-weight: bold;
	font-size: 12px;
}
	a:active{
	text-decoration: none;
	font-size: 12px;
}
	-->
	</style>
	</head>
<body>

<%
		'全局权限验证 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
		If Session("globalecmaster")=""   or Session("adminid")="" Then
              Response.write "<script language='javascript'>"
              Response.write"alert('对不起!请重新登陆!');parent.location.href='"&HOPE_InstallDir&"';</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
         '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		 
		Dim action
		  action=Request.QueryString("act")
	    If action<>"" Then
	
	 '获取模板^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		Set rs=Server.createobject("ADODB.RecordSet")
		rs.Open ("select home_index,vipinfo_index,help_index,tradeinfo_index,seller_index,job_index,info_index,corporation_index,productshow_index,expo_index from [Yixiang_worldec_Temp] where yx_selected=1"),conn,1,1
	If rs.Eof Then
	Response.Write("<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>对不起!该模版不存在!</font><a href='#' onclick='javascript:history.back(-1);'>返回</a>")
	Response.End()
	End If
	If Not rs.Eof Then 
		Select Case action
			Case "index"
			Which_page=HOPE_InstallDir&"index.html"               '生成的网站首页文件名(或路径)

			Code_index=rs("home_index")                           '模版内容
			autourl="<script src="&HOPE_InstallDir&"autoindex/index_html.asp></script>"
			
			Case "trade"
			Which_page=HOPE_InstallDir&"tradeinfo/index.html"     '供应首页
			Code_index=rs("tradeinfo_index")
			autourl="<script src="&HOPE_InstallDir&"autoindex/index_tradeinfo.asp></script>"
			
			Case "seller"
			Which_page=HOPE_InstallDir&"seller/index.html"        '求购首页
			Code_index=rs("seller_index")
			autourl="<script src="&HOPE_InstallDir&"autoindex/index_sellerinfo.asp></script>"
			
			Case "expo"
			Which_page=HOPE_InstallDir&"service/expo/index.html"  '展会首页
			Code_index=rs("expo_index")
			autourl="<script src="&HOPE_InstallDir&"autoindex/index_expoinfo.asp></script>"
			
			Case "info"
			Which_page=HOPE_InstallDir&"info/index.html"          '以商会友首页
			Code_index=rs("info_index")
			autourl="<script src="&HOPE_InstallDir&"autoindex/index_newsinfo.asp></script>"
			
			Case "corporation"
			Which_page=HOPE_InstallDir&"corporation/index.html"   '公司库首页
			Code_index=rs("corporation_index")
			autourl="<script src="&HOPE_InstallDir&"autoindex/index_cominfo.asp></script>"
			
			Case "product"
			Which_page=HOPE_InstallDir&"productshow/index.html"   '产品库首页
			Code_index=rs("productshow_index")
			autourl="<script src="&HOPE_InstallDir&"autoindex/index_proinfo.asp></script>"
			
			Case "job"
			Which_page=HOPE_InstallDir&"job/index.html"           '人才库首页
			Code_index=rs("job_index")
			
 			Case Else
		End Select
		rs.Close
		Set rs=Nothing
		End if
		
  		'替换标签生成html页^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
			
		 str=Hope_HtmlResult(Code_index)
	 
		 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
		'处理生成页面^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
		Set fso = YXFSO
		 Set sort_save = fso.CreateTextFile(Server.Mappath(Which_page))
		   sort_save.Write str&autourl
		 sort_save.Close
		'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
		   Response.Write "<br><br>生成完毕。<a href="&Which_page&" target=blank><font color=red>点击查看</font></a>&nbsp;&nbsp;<a href=index.asp>返回</a>"
		conn.Close
		Set conn=Nothing
		
     Else

%>
	<table width="100%" border="0">
	<tr><td colspan="5" height="30" align="center"><br><font style="font-size:14px; font-weight:bold">生成各首页静态页面操作</font>:请点击相关项进行生成操作!</td></tr>
	<tr><td colspan="5" height="30"></td></tr>
	  <tr bgcolor="#FDFEFF">
		<td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=index" >生成网站首页</a></td>
		<td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=trade">生成我要采购首页</a></td>
		<td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=seller">生成我要销售首页</a></td>
		<td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=expo">生成展会首页</a></td>
		<td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=info">生成行业资讯首页</a></td>
		</tr>
		<tr>
		<td colspan="5" height="30"></td>
		</tr>
		<tr  bgcolor="#FDFEFF">
		<td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=corporation">生成公司库首页</a></td>
		 <td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=product">生成产品库首页</a></td>
		 <td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="?act=job">生成人才招聘首页</a></td>
		 <td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="../help/makeindex.asp">生成帮助首页</a></td>
		  <td height="35" align="center"   onMouseOut="this.style.backgroundColor='#FDFEFF'" onMouseOver="this.style.backgroundColor='#87D2FC'"><a href="../corporation/makelist_all.asp">生成整站导航首页</a></td>
 	  </tr>
	  <tr>
		<td colspan="5" height="50" align="center"><a href="#" onClick="javascript:history.back(-1);">返回</a></td>
		</tr>
	  <tr  >
		<td height="35" align="center"  ></td>
		 <td height="35" align="center" ></td>
		 <td height="35" align="center"   > </td>
		 <td height="35" align="center"  > </td>
		  <td height="35" align="center"   > </td>
 	  </tr>
	  	<tr>
		<td colspan="5" height="50"></td>
		</tr>

</table>
<%
 End If 
%>

⌨️ 快捷键说明

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