📄 admin_skin.asp
字号:
<!--#include file="inc/CONN.asp"-->
<!--#include file="inc/Const.asp"-->
<%dim skinid
skinid=cfg(8)
if not isempty(request.querystring("skinid")) then skinid=Request.Querystring("skinid")
if skinid<>"add" then
Set rs = Conn.execute("Select SkinID,SkinName,TitleStyle,Td1,Td2,Td3,Font1,Font2,Font3,Link1,Link2,TableWidth,BorderColor,BodyStr,MsgsPerPage from [Skin] where SkinID =" & skinid)
For i=0 to 14
skin(i)=rs(i)
next
rs.close
end if
if request("action")="submit" then
for i=1 to 15
skin(i-1)=replace(request.form(i),"'","""")
if i<>1 and skin(i-1)="" then
response.write "<script language=javascript>alert( ""每一项都必须填写"");"&Chr(13)&"location.href=""javascript:history.back()"";</script>"
response.end
exit for
end if
next
select case request.form("submit")
case "添加模板"
if not isnumeric(skin(14)) then
response.write "<script language=javascript>alert( ""“留言本每页记录数”必须是数字!"");"&Chr(13)&"location.href=""javascript:history.back()"";</script>"
response.end
End If
conn.execute("insert into skin (SkinName,TitleStyle,Td1,Td2,Td3,Font1,Font2,Font3,Link1,Link2,TableWidth,BorderColor,BodyStr,MsgsPerPage)values('"&skin(1)&"','"&skin(2)&"','"&skin(3)&"','"&skin(4)&"','"&skin(5)&"','"&skin(6)&"','"&skin(7)&"','"&skin(8)&"','"&skin(9)&"','"&skin(10)&"','"&skin(11)&"','"&skin(12)&"','"&skin(13)&"',"&skin(14)&")")
set rs=conn.execute("select top 1 skinid from skin order by skinid desc")
newid=rs(0)
rs.close
response.write "<script language=javascript>alert( ""添加成功"");"&Chr(13)&"location.href=""admin_skin.asp?skinid="&newid&""";</script>"
response.end
case "修改此模板"
if not isnumeric(skin(14)) then
response.write "<script language=javascript>alert( ""每页显示留言数必须是数字!"");"&Chr(13)&"location.href=""javascript:history.back()"";</script>"
response.end
End If
conn.execute("update skin set skinname='"&skin(1)&"',titlestyle='"&skin(2)&"',td1='"&skin(3)&"',td2='"&skin(4)&"',td3='"&skin(5)&"',font1='"&skin(6)&"',font2='"&skin(7)&"',font3='"&skin(8)&"',link1='"&skin(9)&"',link2='"&skin(10)&"',tablewidth='"&skin(11)&"',bordercolor='"&skin(12)&"',bodystr='"&skin(13)&"',msgsperpage="&skin(14)&" where skinid="&cstr(skin(0)))
response.write "<script language=javascript>alert( ""修改成功"");"&Chr(13)&"location.href=""admin_skin.asp?skinid="&skin(0)&""";</script>"
response.end
case "删除"
conn.execute("delete from skin where skinid="&cstr(skin(0)))
response.write "<script language=javascript>alert( ""删除成功"");"&Chr(13)&"location.href=""admin_skin.asp"";</script>"
response.end
case "设为当前使用模板"
conn.execute("update config set skinid="&cstr(skin(0))&" where id=1")
response.write "<script language=javascript>alert( ""设置成功"");"&Chr(13)&"location.href=""admin_skin.asp?skinid="&skin(0)&""";</script>"
response.end
case else
response.write "<script language=javascript>alert( ""错误操作!"");"&Chr(13)&"location.href=""javascript:history.back()"";</script>"
response.end
end select
end if
Const Pagetitle="皮肤设置"%>
<!--#include file="inc/admin_head.asp"-->
<table align=center border=1 bordercolor=<%=skin(12)%> cellpadding=3 cellspacing=0 width=<%=skin(11)%>>
<tr class=TitleStyle>
<Td colspan=2><B>默认界面颜色修改</b></td>
</tr>
<tr bgcolor=<%=skin(4)%>>
<Td align=center height=45><B>模板</b>--点击选择<BR><font color=<%=skin(8)%>>★</font>着色并粗体者为当前操作模板</td>
<td> <%set rs=conn.execute("select skinname,skinid from skin order by skinid asc")
do until rs.eof
response.write "<a href=admin_skin.asp?skinid="&rs("SkinID")&">"
if cstr(rs("SkinID"))=cstr(skinid) then
response.write "<font color="&skin(8)&"><B>"&rs("SkinName")&"</b></font></a> | "
else
response.write rs("SkinName")&"</a> | "
end if
rs.movenext
loop
Clr.close:set Clr=nothing
if cstr(skinid)="add" then%>
<a href=admin_skin.asp?skinid=add><font color=<%=skin(8)%>><B>添加新模板<B></font></a></td>
<%else%>
<a href=admin_skin.asp?skinid=add>添加新模板</a></td>
<%end if%>
</tr>
<form name=theForm action=admin_skin.asp?action=submit method=post>
<input name=skinid type=hidden value=<%if skinid<>"add" then response.write skin(0)%>>
<tr bgcolor=<%=skin(5)%>>
<Td align=center width="34%"><font color=<%=skin(8)%>>!</font> 当前操作模板</td>
<td width="66%"><input name=skinname type=text size=40 <%if skinid<>"add" then response.write "value="&skin(1)%> maxlength=12></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>标题样式表</td>
<td><textarea name=titlestyle cols=49 rows=7><%if skinid<>"add" then response.write skin(2)%></textarea></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>单元格色一(深)</td>
<td><input name=Td1 type=text maxlength=7 size=40 <%if skinid<>"add" then response.write "value="&skin(3)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>单元格色二(中)</td>
<td><input name=Td2 type=text maxlength=7 size=40 <%if skinid<>"add" then response.write "value="&skin(4)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>单元格色三(浅)</td>
<td><input name=Td3 type=text maxlength=7 size=40 <%if skinid<>"add" then response.write "value="&skin(5)%>></td>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>访客留言字色 </td>
<td><input name=font1 type=text maxlength=7 size=40 <%if skinid<>"add" then response.write "value="&skin(6)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>斑竹回复字色 </td>
<td><input name=font2 type=text maxlength=7 size=40 <%if skinid<>"add" then response.write "value="&skin(7)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>特殊的颜色(显眼色)</td>
<td><input name=font3 type=text maxlength=7 size=40 <%if skinid<>"add" then response.write "value="&skin(8)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>普通超连接</td>
<td><textarea name=link1 cols=49 rows=7><%if skinid<>"add" then response.write skin(9)%></textarea></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>标题栏上的超连接</td>
<td><textarea name=link2 cols=49 rows=7><%if skinid<>"add" then response.write skin(10)%></textarea></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>表格的宽度(百分比或绝对值)</td>
<td><input name=tablewidth type=text maxlength=4 size=40 <%if skinid<>"add" then response.write "value="&skin(11)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>表格边框色</td>
<td><input name=bordercolor type=text maxlength=7 size=40 <%if skinid<>"add" then response.write "value="&skin(12)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center><body>标记的属性</td>
<td><textarea name=bodystr cols=49 rows=3 style="overflow:hidden"><%if skinid<>"add" then response.write skin(13)%></textarea></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center>留言本每页记录数</td>
<td><input name=MsgsPerPage type=text maxlength=3 size=40 <%if skinid<>"add" then response.write "value="&skin(14)%>></td>
</tr>
<tr bgcolor=<%=skin(5)%>>
<Td align=center></td>
<td> </td>
</tr>
<tr bgcolor=<%=skin(4)%>>
<td align=center colspan=2><input name=submit type=submit <%if request("skinid")="add" then%>value="添加模板"<%else%>value="修改此模板"<%end if%>> <%if Skinid<>cfg(8) and Skinid<>"add" then response.write "<input name=submit type=submit value=""删除"" onclick=""return chk()""> <input name=submit type=submit value=""设为当前使用模板"">"%></td>
</tr></form>
</table>
<!--#include file="inc/foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -