<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
'*********************************************
'软件名称：电家企业网站内容管理系统
'软件开发：电脑家园工作室
'网    址：http://www.537600.cn
'服务  QQ：530051328
'服务邮箱：bbfhq@163.com
'微信公众号：diannaojiayuan
'*********************************************
%>
<%
Dim rs, sql, ID, SortName
ID = request.QueryString("ID")
SortName = request.QueryString("SortName")
set rs = server.CreateObject("adodb.recordset")
rs.open "select * from DianJiaCMS_Template where UseFlag and SortName='"&SortName&"'",conn,1,2
do until rs.eof
	rs("UseFlag") = 0
	rs.update
	rs.movenext
loop
rs.close

rs.open "select * from DianJiaCMS_Template where ID = "&ID,conn,1,2
rs("UseFlag") = -1
rs.update
rs.close
set rs = nothing

Response.redirect request.servervariables("http_referer")
%>