⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tools_updatecreathtml.asp

📁 完美政府版,正版网站解决方案
💻 ASP
字号:
<!--#include file=conn.asp -->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="md5.asp"-->

<%
On Error Resume Next
ThisFileName="Tools_UpdateCreatHTML.asp"
	function UpdateDBset()
		'更新表结构
		conn.execute("alter table System add CreatHTML int default 0")
		conn.execute("update "& db_System_Table &" Set CreatHTML=0")
		response.write "<DIV align=center>[System]表[CreatHTML]HTML新闻标识字段添加完毕!</DIV><BR>"


		conn.execute("alter table News add HTMLFileName varchar(250) default No")
		conn.execute("update News Set HTMLFileName='No'")
		response.write "<DIV align=center>[News]表[HTMLFileName]HTML新闻生成文件名标识字段添加完毕!</DIV><BR>"
	
		conn.execute("alter table Type add TypeFolderName varchar(20) default NewsType")
		conn.execute("update Type Set TypeFolderName='NewsType'")
		response.write "<DIV align=center>[Typ]表[TypeFolderName]HTML大类生成目录名标识字段添加完毕!</DIV><BR>"
	
		response.write "<DIV align=center><font color=red>全部更新完成,本文件会被自动删除,如未成功,请手工删除!</font></DIV><BR>"
		response.end
		conn.close
		set conn=nothing

		If Err Then
			err.Clear
			Response.Write "运行中有错,可能表字段已经存大。"
			Response.End
		End If
	end function
	%>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
<tr class="TDtop"> 
	<td  colspan="4" width="100%" height=25 align="center" valign="middle" height="24">
		┊ <strong>生成HTML数据库升级程序</strong> ┊
	</td>
</tr>
<tr> 
	<td colspan="4" align="center" width="100%" height=25 bgcolor="#FFFFFF">注意,运行此程序前请先备份数据库。切记!</td>
</tr>
<form method="post" action="<%=ThisFileName%>" name="type">
<tr> 
	<td align="center" colspan="4" width="100%"  height="34">
		<input name="action" type="hidden" value="OK">
		<input type="submit" name="Submit" value="更新" title="运行更新程序" onMouseOver="window.status='运行更新程序';return true;" onMouseOut="window.status='';return true;" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">&nbsp;&nbsp;
		<input type="reset" value="重置" name="B1" onMouseOver="window.status='重置填写内容';return true;" onMouseOut="window.status='';return true;" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
	</td>
</tr>
<tr> 
	<td colspan="4" align="center" width="100%" bgcolor="#FFFFFF">
	<%
	action=request("action")
	if action="OK" then
		'调用更新
		UpdateDBset()

		'删除本文件,以免重复运行发生问题。
		Set fso=Server.CreateObject("Scripting.FileSystemObject")
		If fso.FileExists(Server.Mappath(ThisFileName))=true Then
			fso.DeleteFile Server.MapPath(ThisFileName)
		End If
		Set fso=Nothing
	end if
	%>
	</td>
</tr>
</form>
</table>

⌨️ 快捷键说明

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