📄 admin_skin.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<title><%=txl_info(0)%>--管理页面</title>
<!-- #include file="inc/admin_css.asp" -->
<meta NAME=GENERATOR Content="Microsoft FrontPage 3.0" CHARSET=GB2312>
<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#DDEEFF">
<%
if not supermaster or session("flag")="" then
Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
call txl_error()
else
dim body
select case request("action")
case "news"
call step1()
case "step2"
call saveskin()
case "del"
call delskin()
case "active"
call active()
case else
call skininfo()
end select
conn.close
set conn=nothing
end if
sub delskin()
set rs=conn.execute("select skinname from config where active=1 and id="&request("nskinid"))
if rs.eof and rs.bof then
conn.execute("delete from config where id="&request("nskinid"))
response.write "删除成功。"
else
response.write "错误提示:当前使用的论坛模板不能删除,请先设置该模板为不是当前模板状态。"
end if
rs.close
set rs=nothing
end sub
sub skininfo
%>
<form method=post action="admin_skin.asp?action=active">
<table width="95%" border="0" cellspacing="1" cellpadding="3" align=center>
<tr>
<td height="23" colspan="2" ><b>同学录模板选择管理</b>:<BR>可点击相应模板进行统一查看和管理,可以设置某个模板为当前使用。由于相关的设置项目非常多,为了不至混淆,建议对当前使用的模板修改点击相应管理菜单进行修改,点击模板名称进行修改模板名。
</td>
</tr>
</table>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr>
<th width="83%" height=22>模板名称</th><th width="17%">当前是否使用</th>
</tr>
<%
set rs=conn.execute("select id,active,skinname from config order by id desc")
do while not rs.eof
%>
<tr>
<td height=25 class=txlrow> <a href="admin_skin.asp?action=edit&skinid=<%=rs("id")%>"><%=rs(2)%></a>( <a href="admin_color.asp?skinid=<%=rs("id")%>"><U>界面CSS设置</U></a> | <a href="admin_pic.asp?skinid=<%=rs("id")%>"><U>模板图片设置</U></a> | <a href="admin_skin.asp?action=del&nskinid=<%=rs("id")%>" onclick="{if(confirm('删除后不可恢复,确定删除吗?')){return true;}return false;}"><U>删除</U></font> )</td>
<td class=txlrow> <input type=radio name=skinid value="<%=rs(0)%>" <%if rs(1)=1 then%>checked<%end if%>></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
<tr>
<td width="80%" height=22 align=right class=txlrow> 当前同学录默认使用模板只能选择一个 </td>
<td width="50%" class=txlrow><input type=submit value="提 交" name=submit></td>
</tr>
</table>
</form>
<%
end sub
sub step1()
%>
<form method="POST" action=?action=step2>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr>
<th height="25" colspan="2" >添加新模板</th>
</tr>
<tr>
<td width="40%" class="txlrow">添加新模板说明</td>
<td width="60%" class="txlrow">1、先添加模板名称;<br>2、然后进入模板CSS修改页面,修改相应当CSS定义;<br>3、最后到模板图片设置项,修改当前模板下的图片。</td>
</tr>
<tr>
<td width="40%" class="txlrow"><B>模板名称</B></td>
<td width="60%" class="txlrow"> <input type="text" name="SkinName" size="35"></td>
</tr>
<tr>
<td width="40%" class="txlrow"> </td>
<td width="60%" class="txlrow"> <input type="submit" name="Submit" value="下一步"></td>
</tr>
</table>
</form>
<%
end sub
sub saveskin()
dim ars
dim skinname
skinName=request("skinname")
set Ars=conn.execute("select * from config where active=1")
set rs = server.CreateObject ("adodb.recordset")
sql="select * from config"
rs.open sql,conn,1,3
rs.addnew
rs("txl_info")=ars("txl_info")
rs("txl_set")=ars("txl_set")
rs("txl_user")=ars("txl_user")
rs("txl_copyright")=ars("txl_copyright")
rs("txl_ads")=ars("txl_ads")
rs("txl_body")=ars("txl_body")
rs("skinname")=skinname
rs("Cookiepath")=ars("Cookiepath")
rs("badwords")=ars("badwords")
rs("lastuser")=ars("lastuser")
rs("birthuser")=ars("birthuser")
rs("stopwhy")=ars("stopwhy")
rs("UserNum")=ars("UserNum")
rs("GbookNum")=ars("GbookNum")
rs("BbsNum")=ars("BbsNum")
rs("PhotoNum")=ars("PhotoNum")
rs("txl_ubb")=ars("txl_ubb")
rs("txl_skinpic")=ars("txl_skinpic")
rs("txl_userface")=ars("txl_userface")
rs("txl_postface")=ars("txl_postface")
rs("txl_emot")=ars("txl_emot")
rs("active")=0
rs.update
Response.Redirect "admin_color.asp?skinid="&rs("id")
rs.close
set rs=nothing
end sub
sub active()
set rs=conn.execute("select * from config where active=1")
conn.execute("update config set active=0 where id="&rs("id"))
conn.execute("update config set active=1 where id="&request("skinid"))
response.write "更新成功,<a href=admin_skin.asp>返回</a>。"
rs.close
set rs=nothing
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -