<%
'程序名称：千纸鹤网站管理系统
'程序作者：千纸鹤
'作者邮箱：qzhxxw@sina.com
'作者 Q Q：138999501
'作者电话：0000000000
'官方主页：http://www.qqzzhh.com/
'官方论坛：http://www.qqzzhh.com/bbs
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<%call hacker()
if session("superlogin")<>yecao then
response.Write "<script>alert('您还没有登陆！');this.location.href='index.asp';</script>"
Response.End
elseif session("superadmin")<>"admin" then
response.Write "<script>alert('您不是超级管理员！您的权限不足！');this.location.href='index.asp';</script>"
Response.End
end if%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css">
<script src=img/adminjs.js></script>
</head>
<body>
<%
if request.form("edit")<>"" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_skin where id="&request("id")
rs.open sql,conn,1,3
rs("skinname")=request.Form("skinname")
rs("skinurl")=request.Form("skinurl")
rs.update
rs.close
response.Redirect"admin_skin.asp"
set rs=nothing
elseif  request.form("new")<>"" then
set rs=server.CreateObject("adodb.recordset")
rs.open "YC_skin",conn,1,3
rs.addnew
rs("skinname")=request.Form("skinname")
rs("skinurl")=request.Form("skinurl")
rs.update
rs.close
set rs=nothing
response.write"<script>location.href='admin_skin.asp';</script>"
elseif request("action")=""then
dim gg
sql="select * from YC_skin order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
gg=rs.recordcount%><%call br%>
<table width=400 align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22" colspan="3" class=title><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;皮肤管理 [当前共有<%=gg%>个皮肤]</b></td></tr>
<tr class=bg height="25">
<form  method="post" name="form" id="form" action="del.asp" onsubmit="return downdel();">
<td width="10%"  align=center>选定</td>
<td align=center width=80%>皮肤名称</td>
<td width="10%" align=center>操作</td></tr><tr><td class="hr" colspan="3"></td></tr>
<%
sql="select * from YC_skin order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr height=25 class=bg>
<td align=center>
<input name='SoftID' type='checkbox' onclick="unselectall()" id="SoftID" value='<%=rs("id")%>'></td>
<td><%=rs("skinname")%></td>
<td>&nbsp;<a href="?action=edit&id=<%=rs("id")%>">编辑</a>&nbsp;</td></tr>
<%
i=i+1
rs.movenext
loop
else
if rs.eof and rs.bof then
end if
end if%>
<tr><td class="hr" colspan="3"></td></tr>
<tr class=bg><td width="5%" height="23" align=center><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox"></td>
<td height="30" colspan="2">
<input name="submit" type='submit' onClick="document.form.Action.value='Del'" value="删 除" class="adminbutton">
<input name="Action" type="hidden" id="Action" value="Del">
<input name="tab" type="hidden" id="tab" value="YC_skin">
<input name="url" type="hidden" id="url" value="admin_skin.asp"></td>
          </tr>
		  </form>
  <tr height=25 class=foot >
<td align=center colspan=3>
</td></tr>
</table>
<%rs.close
set rs=nothing%></td></tr></table>
<%elseif request("action")="new"then%>
<script language="javascript">
function chk(){
if(document.form.title.value==""){
alert("皮肤不能为空");
document.form.title.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();">
<table width="400" align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d>
<tr class="title"  height="22"><td><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;导入皮肤</b></td></tr>	
<tr class=bg height="25"><td>&nbsp;皮肤名称：<input name="skinname" type="text" id="skinname"  class=yecao style="width:100px">&nbsp;&nbsp;&nbsp;皮肤地址：<input name="skinurl" type="text" id="skinurl"  class=yecao style="width:100px"><br></td></tr><tr>
<tr class=bg height="25"><td align=center>&nbsp;注：皮肤地址要添加SKIN文件夹里的文件夹名称。</td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td  align="center">
<input name="new" type="submit" class="adminbutton" id="new" value="发 布">&nbsp;<input name="Submit2" type="reset" class="adminbutton" value="清 空" ></td></tr>
</table> 
</form>
<%elseif request("action")="edit"then
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_skin where id="&request.QueryString("id")
rs.open sql,conn,1,3%>
<script language="javascript">
function chk(){
if(document.form.gg.value==""){
alert("皮肤不能为空");
document.form.gg.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();">
<table width="95%" align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22"  class=title><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;修改皮肤</b></td></tr>
<tr class=bg height="25"><td>&nbsp;皮肤名称：<input name="skinname" type="text" id="skinname" value="<%=rs("skinname")%>"  class=yecao style="width:100px"></td></tr>
<tr class=bg height="25"><td>&nbsp;皮肤地址：<input name="skinurl" type="text" id="skinurl" value="<%=rs("skinurl")%>"  class=yecao style="width:100px"></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td align="center">
<input name="edit" type="submit" class="adminbutton" id="edit" value="修 改">&nbsp;<input name="Submit2" type="reset" class="adminbutton" value="清 空"></td></tr></table></form>
<%rs.close
set rs=nothing
end if
call closedata()%>

