📄 adminstyle.asp
字号:
<%dim nowplace
nowplace="style"
dim dbpath
dbpath="../"
%>
<!--#include file="chk.asp"-->
<!--#include file="../db_conn.asp" -->
<!--#include file="../comm/my_lib.asp" -->
<%
dim webstyle,Sbgfile
set rs=conn.execute ("select webstyle,Sbgfile,Sadindex from system_setup where id=1")
webstyle=rs(0)
Sbgfile=rs(1)
Sadindex=rs(2)
rs.close
set rs=nothing
Sbgfiles=split(Sbgfile,"‖")
Sadindexs=split(Sadindex,"‖")
action=my_request("action",0)
if action="save" then
call save()
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站样式设置</title>
<link href=AdminStyle.css rel=stylesheet type=text/css>
<script src="edit.js" type="text/javascript"></script>
<script language=javascript>
function showlist(dd){
if(dd=="a"){
linkimg.style.display="none";
}else{
linkimg.style.display="";
}
}
</script>
<script language=javascript>
function upfile(){
if(form1.filetxt.options[0].selected)
{
form1.pic.disabled=false
swf1.style.display="none";
pic1.style.display="";
form1.swf.disabled=true
url.style.display="";
}else if(form1.filetxt.options[1].selected){
form1.swf.disabled=false
swf1.style.display="";
pic1.style.display="none";
form1.pic.disabled=true
url.style.display="none";
}
}
</script>
<script language="JavaScript">
<!--
function check(f){
var r=f.elements['flag']
var v;
for(i=0;i<r.length;i++)if(r[i].checked){v=r[i].value;break}
if(i==r.length){alert('没有选');return false}
else{
if (v=='1' && form1.bgpath.value=='')
{
alert("选择了设置背景,请上传背景图片.");
return false;//方便演示写为false,就为true
}
document.form1.B1.disabled=true
document.form1.B1.value="正在保存数据……"
}
}
//-->
</script>
</head>
<body>
<table border="0" width="100%" cellpadding="4" style="border:1px solid #183789; border-collapse: collapse; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" cellspacing="1">
<form action=AdminStyle.asp method=post name=form1 onsubmit="return check(this)">
<input type=hidden name=action value=save>
<tr>
<td width="100%" colspan="3" background="Image/admin_bg_1.gif" height="25">
<font color="#FFFFFF"><b>网站样式设置:</b></font></td>
</tr>
<tr>
<td width="140">选择网站色彩样式:</td>
<td width="825" colspan="2"> </td>
</tr>
<tr>
<td width="140">样式一:</td>
<td><input type="radio" value="style1" <%if webstyle="style1" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#3672AE"> </td>
</tr>
<tr>
<td width="140">样式二:</td>
<td width="20"><input type="radio" value="style2" <%if webstyle="style2" then response.write "checked"%> name="style"></td>
<td bgcolor="#FF9000"> </td>
</tr>
<tr>
<td>样式三:</td>
<td width="20"><input type="radio" value="style3" <%if webstyle="style3" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#E1569A"> </td>
</tr>
<tr>
<td width="140">样式四:</td>
<td width="20"><input type="radio" value="style4" <%if webstyle="style4" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#99A2B1"> </td>
</tr>
<tr>
<td width="140">样式五:</td>
<td width="20">
<input type="radio" value="style5" <%if webstyle="style5" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#965BB9"> </td>
</tr>
<tr>
<td width="140">样式六:</td>
<td width="20"><input type="radio" value="style6" <%if webstyle="style6" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#1F9A8C"> </td>
</tr>
<tr>
<td width="140">样式七:</td>
<td width="20"><input type="radio" value="style7" <%if webstyle="style7" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#AFC326"> </td>
</tr>
<tr>
<td width="140">样式八:</td>
<td width="20"><input type="radio" value="style8" <%if webstyle="style8" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#C34B26"> </td>
</tr>
<tr>
<td width="140">样式九:</td>
<td width="20"><input type="radio" value="style9" <%if webstyle="style9" then response.write "checked"%> name="style"></td>
<td width="786" bgcolor="#88605F"> </td>
</tr>
<tr>
<td width="969" colspan="3"><hr size="1"></td>
</tr>
<tr>
<td width="140">首页顶部横幅广告:</td>
<td width="825" colspan="2">
<select size="1" name="filetxt" onchange=upfile();>
<option value="1" <%if Sadindexs(0)=1 then response.write "selected"%>>图片</option>
<option value="2" <%if Sadindexs(0)=2 then response.write "selected"%>>Flash</option>
</select><span id=pic1><input type="text" id=pic name="topad" size="30" maxlength="100" readonly value="<%=Sadindexs(1)%>"><input type="button" value="上传文件" name="B3" onclick="javascript:openWin('upload1.asp?Fname=pic','upload','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=410,height=230')">
<font color="#FF0000">「请选择匹配的文件类型」</font></span><font color="#FF0000"><span id=swf1 style='display:none'><input disabled type="text" name="topad" size="46" id=swf value="<%=Sadindexs(1)%>">填写Flash绝对地址,如http://www.ssort.com/logo.swf</span><br>
</font><span id=url>连接地址
<input type="text" name="linkurl" size="30" value="<%=Sadindexs(2)%>">
<font color="#FF0000">「有就填写(仅仅针对图片,注意填写“http://”),没有就不填写」</font></span></td>
</tr>
<tr>
<td width="140">网站是否设背景图片:</td>
<td width="825" colspan="2">
<input type="radio" name="flag" value="0" <%if Sbgfiles(1)=0 then response.write "checked"%> onClick='showlist("a");'>不设置
<input type="radio" name="flag" value="1" <%if Sbgfiles(1)=1 then response.write "checked"%> onClick='showlist("b");'>设置</td>
</tr>
<tr>
<td width="969" colspan="3">
<table border="0" width="100%" id="linkimg" cellspacing="0" cellpadding="0" style='display:none'>
<tr>
<td width="143">背景图片上传:</td>
<td> <input type="text" name="bgpath" size="25" readonly maxlength="50" value="<%=Sbgfiles(0)%>"><font color="#330000" size="2"><a href="javascript:openWin('upload1.asp?Fname=bgpath','upload','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=410,height=230')"><img src="image/upload.gif" alt="上传图片" width="60" height="18" border="0" align="middle" style="cursor: hand;" onMouseOver="window.status='使用系统自带的上传程序上传图片';return true;" onMouseOut="window.status='';return true;"></a></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="140"> </td>
<td width="825" colspan="2"><input type="submit" value="保存数据" name="B1"></td>
</tr></form>
</table>
</body>
</html>
<%
sub save()
style=my_request("style",0)
flag=my_request("flag",1)
bgpath=my_request("bgpath",0)
filetxt=my_request("filetxt",0)
topad=my_request("topad",0)
linkurl=my_request("linkurl",0)
Sbgfile=bgpath&"‖"&flag
Sadindex=filetxt&"‖"&topad&"‖"&linkurl
conn.execute ("update system_setup set webstyle='"&style&"',Sbgfile='"&Sbgfile&"',Sadindex='"&Sadindex&"' where id=1")
response.redirect "AdminStyle.asp"
end sub
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -