- <!--插入html头部分以及数据库接口-->
- <!--#include file="in_conn.asp"-->
- <body>
- <!--插入网站置顶-->
- <% if u_name="" then
- Response.Redirect "log_err.asp"
- else
- %>
- <!--#include file="in_topmb.asp"-->
- <% end if %>
- <%
- if u_power<2 OR u_name<>DEF_sysadm then
- Response.Redirect "resp.asp?cmd=adm_bigpower"
- end if
- %>
- <%
- '获取表单值
- dim vskinID
- dim vctrl
- vskinID=CLng(Request.Form("selskin"))
- vctrl=trim(Request.Form("ctrl"))
- %>
- <table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0" class="rdbar"><tr>
- <td width="100%" height="100%">
- <a href="index.asp">[首页]</a>-<a href="sys.asp">后台维护</a>-<font class="ft1">模板管理</font>
- </td>
- </tr></table>
- <table align="center" width="700" height="101" border="0" cellspacing="0" cellpadding="6" class="rdd">
- <tr>
- <td width="150" valign="top" class="rdk2">
- <!--插入左部分-->
- <!--#include file="in_sys_left.asp"-->
- </td>
- <td valign="top">
- <%
- '设置FSO实例
- dim myskn
- Set myskn=Server.CreateObject("Scripting.FileSystemObject")
- '进行处理
- IF vctrl="app" THEN
- '应用处理
- sqlstr="SELECT ID,sty_name,sty_def FROM tblstyle WHERE sty_def=true OR ID="&vskinID&" ORDER BY sty_def DESC"
- rs.open sqlstr,conn,1,2
- if rs.eof AND rs.bof then
- rs.close
- Response.Redirect "resp.asp"
- else
- skinok=true
- rs.MoveFirst
- DO WHILE NOT rs.eof
- IF rs("ID")=vskinID THEN
- vskndir=rs("sty_name")
- if myskn.FolderExists(Server.MapPath("img/skin/"&vskndir)) then
- rs("sty_def")=true
- rs.update
- else
- rs.delete
- rs.update
- Response.Write "该模板文件夹并不存在,同时已删除该模板在数据库中的数据!<br><a href='skn_gl.asp'>[点击这里<Font color=red>返回</Font>]</a><br>"
- skinok=false
- EXIT DO
- end if
- ELSE
- rs("sty_def")=false
- rs.update
- END IF
- rs.MoveNext
- LOOP
- rs.close
- IF skinok=true THEN
- Response.Redirect "rego.asp?cmd=skin_ok"
- END IF
- end if
- ELSEIF vctrl="kill" THEN
- '删除处理
- sqlstr="SELECT sty_name,sty_def FROM tblstyle WHERE ID="&vskinID
- rs.open sqlstr,conn,1,2
- if rs.eof AND rs.bof then
- Response.Redirect "resp.asp"
- else
- vskndir=rs("sty_name")
- if rs("sty_def")<>true then
- rs.delete
- rs.update
- else
- Response.Redirect "resp.asp?cmd=skindef"
- end if
- end if
- rs.close
- Response.Write "<font class='ft1'>"&vskndir&"</font>模板的数据已成功删除!<br>请手动清理服务器上img/skin/目录下关于该模板的文件夹!<a href='skn_gl.asp'>[点击这里<Font color=red>返回</Font>]</a><br>"
- END IF
- %>
- </td>
- </tr>
- </table>
- <!--插入在线统计-->
- <!--#include file="in_online.asp"-->
- <!--插入网站置底-->
- <!--#include file="in_bottom.asp"-->
- </body>
- </html>