<!--#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 COUNTER (1,1)")
	response.write("成功重置表：ad<br>"&Chr(10))
	'重置catalogs表
    conn.execute("delete from catalogs")
	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))
	'重置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))
	'重置Log表
    conn.execute("delete from Log")
    conn.execute("ALTER TABLE Log ALTER COLUMN id int")
    conn.execute("ALTER TABLE Log ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：Log<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))
	'重置news_count表
    conn.execute("delete from news_count")
    conn.execute("ALTER TABLE news_count ALTER COLUMN id int")
    conn.execute("ALTER TABLE news_count ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：news_count<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_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_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))
	'重置t_task表
    conn.execute("delete from t_task")
    conn.execute("ALTER TABLE t_task ALTER COLUMN id int")
    conn.execute("ALTER TABLE t_task ALTER COLUMN id COUNTER (1,1)")
	response.write("成功重置表：t_task<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))

	'重置vote表
    conn.execute("delete from vote")
	response.write("成功重置表：vote<br>"&Chr(10))

	'重置voteitem表
    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()
%>
