<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<%
'''''''''''''''''''''''''''''''''''''''''''''''
call checkPrevilege(Session("Name"),"p00")
'''''''''''''''''''''''''''''''''''''''''''''''
%>
<html>
<head>
<title>系统重置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #FFFFFF;
}
-->
</style>
<link href="cs.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
function ConfirmDel()
{
   if(confirm("系统重置后将删除系统中所有数据并回复到系统初使状态,你确认执行此操作吗？"))
     return true;
   else
     return false;
	 
}
</script>
</head>
<body>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><iframe src="right_top.htm" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" height="30" width="100%"></iframe></td>
  </tr>
</table>
<%
dim act
act=request.querystring("act")
if(act="do") then
	
	'重置ad表
	conn.execute("delete from ad")
	'conn.execute("ALTER TABLE ad ALTER COLUMN id int")
	'conn.execute("ALTER TABLE ad ALTER COLUMN id  int IDENTITY(1,1)")
	response.write("成功重置表：ad<br>"&Chr(10))
	'重置catalogs表
	conn.execute("delete from catalogs")
	'conn.execute("ALTER TABLE catalogs ALTER COLUMN id int")
	'conn.execute("ALTER TABLE catalogs ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：catalogs<br>"&Chr(10))
	'重置collect表
	conn.execute("delete from collect")
	'conn.execute("ALTER TABLE collect ALTER COLUMN id int")
	'conn.execute("ALTER TABLE collect ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：collect<br>"&Chr(10))
	'重置collect_his表
	conn.execute("delete from collect_his")
	'conn.execute("ALTER TABLE collect_his ALTER COLUMN id int")
	'conn.execute("ALTER TABLE collect_his ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：collect_his<br>"&Chr(10))
	'重置commen表
	conn.execute("delete from commen")
	'conn.execute("ALTER TABLE commen ALTER COLUMN id int")
	'conn.execute("ALTER TABLE commen ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：commen<br>"&Chr(10))
	'重置friendlink表
	conn.execute("delete from friendlink")
	'conn.execute("ALTER TABLE friendlink ALTER COLUMN id int")
	'conn.execute("ALTER TABLE friendlink ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：friendlink<br>"&Chr(10))
	'重置label表
	conn.execute("delete from label")
	'conn.execute("ALTER TABLE label ALTER COLUMN id int")
	'conn.execute("ALTER TABLE label ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：label<br>"&Chr(10))
	'重置news表
	conn.execute("delete from news")
	'conn.execute("ALTER TABLE news ALTER COLUMN id int")
	'conn.execute("ALTER TABLE news ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：news<br>"&Chr(10))
	'重置role表
	conn.execute("delete from role")
	'conn.execute("ALTER TABLE role ALTER COLUMN id int")
	'conn.execute("ALTER TABLE role ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：role<br>"&Chr(10))

	'重置t_author表
	conn.execute("delete from t_author")
	'conn.execute("ALTER TABLE t_author ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_author ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_author<br>"&Chr(10))

	'重置t_editor表
	conn.execute("delete from t_editor")
	'conn.execute("ALTER TABLE t_editor ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_editor ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_editor<br>"&Chr(10))

	'重置t_form表
	conn.execute("delete from t_form")
	'conn.execute("ALTER TABLE t_form ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_form ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_form<br>"&Chr(10))

	'重置t_from表
	conn.execute("delete from t_from")
	'conn.execute("ALTER TABLE t_from ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_from ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_from<br>"&Chr(10))

	'重置t_importdb表
	conn.execute("delete from t_importdb")
	'conn.execute("ALTER TABLE t_importdb ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_importdb ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_importdb<br>"&Chr(10))
	'重置t_innerkeys表
	conn.execute("delete from t_innerkeys")
	'conn.execute("ALTER TABLE t_innerkeys ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_innerkeys ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_innerkeys<br>"&Chr(10))

	'重置t_live表
	conn.execute("delete from t_live")
	'conn.execute("ALTER TABLE t_live ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_live ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_live<br>"&Chr(10))
	'重置t_log表
	conn.execute("delete from t_log")
	'conn.execute("ALTER TABLE t_log ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_log ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_log<br>"&Chr(10))

	'重置t_special表
	conn.execute("delete from t_special")
	'conn.execute("ALTER TABLE t_special ALTER COLUMN id int")
	'conn.execute("ALTER TABLE t_special ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_special<br>"&Chr(10))

	'重置templet表
	conn.execute("delete from templet")
	'conn.execute("ALTER TABLE templet ALTER COLUMN id int")
	'conn.execute("ALTER TABLE templet ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：templet<br>"&Chr(10))

	'重置voteitem表
	conn.execute("delete from vote")
	response.write("成功重置表:vote<br>")
	conn.execute("delete from voteitem")
	'conn.execute("ALTER TABLE voteitem ALTER COLUMN id int")
	'conn.execute("ALTER TABLE voteitem ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：voteitem<br>"&Chr(10))
else
%>
<form name="form2" method="post" action="?act=do" style="margin:0px;" onSubmit="return ConfirmDel()">
<table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#333333">
  <tr>
    <td width="100%" height="22" bgcolor="#FF9900"><div align="center"><span class="style1">◆ 系统数据重置 ◆</span></div></td>
  </tr>
  <tr>
    <td height="100" bgcolor="#FFFFFF">      
        <div align="center">&nbsp;&nbsp;      &nbsp;&nbsp;
        <input type="submit" name="Submit" value="执行操作=>" style="font-size:12px; ">
        </div>    </td>
  </tr>
</table>
</form>
<%end if%>
</body>
</html>
<%
call connclose()
%>
