⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_sitecolorsave.asp

📁 庐江二中
💻 ASP
字号:
<!--#include file="session.asp"-->
<%checkAdmin3%>
<!--#include file="conn.asp"-->
<%
ID=request("id")
act=request("act")
ColorName=trim(request.form("ColorName"))
founerr=false

if ColorName="" then
errmsg="<li>方案名称不能为空</li>"
founderr=true
end if

if trim(request.form("ColorName"))="" then
errmsg="<li>CSS方案不能为空</li>"
founderr=true
end if

TableWidth=trim(request.form("TableWidth"))
if right(TableWidth,1)<>"%" then
if Not IsNumeric(TableWidth) then
errmsg="<li>表格宽度输入的不是数字或百分数</li>"
founderr=true
end if
end if

if act="add" then
sql="select ColorName from SiteColor"
rs.open sql,conn,3,3
do while not rs.eof
if rs("ColorName")=ColorName then
	errmsg=errmsg+"<li>已存在这个方案名称"
	founderr=true
end if
rs.movenext
loop
rs.close
end if

if founderr=true then
call error()
else
	
if act="edit" then
if request("ColorName")="系统默认" then
errmsg=errmsg+"<li>不能修改系统默认方案,请增加新方案!"
call error()
Response.End
end if
sql="select * from SiteColor where ID="&ID
elseif act="add" then
sql="select * from SiteColor"
else
errmsg="<li>操作错误!请联系管理员</li>"
call error()
Response.End
end if

rs.open sql,conn,1,3
if act="add" or act="edit" then
if act="edit" then
if rs.eof then
errmsg="<li>操作错误!请联系管理员</li>"
call error()
Response.End
end if
end if

if act="add" then rs.addnew
rs("ColorName")=ColorName
if trim(request.form("BgColor"))="" then
rs("BgColor")=null
else
rs("BgColor")=request.form("BgColor")
end if
if trim(request.form("TdFColor"))="" then
rs("TdFColor")=null
else
rs("TdFColor")=request.form("TdFColor")
end if
if trim(request.form("ALinkFColor"))="" then
rs("ALinkFColor")=null
else
rs("ALinkFColor")=request.form("ALinkFColor")
end if
if trim(request.form("AHoverFColor"))="" then
rs("AHoverFColor")=null
else
rs("AHoverFColor")=request.form("AHoverFColor")
end if
if trim(request.form("AVisitedFColor"))="" then
rs("AVisitedFColor")=null
else
rs("AVisitedFColor")=request.form("AVisitedFColor")
end if
if trim(request.form("AlertFColor"))="" then
rs("AlertFColor")=null
else
rs("AlertFColor")=request.form("AlertFColor")
end if
if trim(request.form("InputBgColor"))="" then
rs("InputBgColor")=null
else
rs("InputBgColor")=request.form("InputBgColor")
end if
if trim(request.form("InputBorderColor"))="" then
rs("InputBorderColor")=null
else
rs("InputBorderColor")=request.form("InputBorderColor")
end if
if trim(request.form("SelectBgColor"))="" then
rs("SelectBgColor")=null
else
rs("SelectBgColor")=request.form("SelectBgColor")
end if
'<-------公告论坛------------
if trim(request.form("GongGao_img"))="" then
rs("GongGao_img")=null
else
rs("GongGao_img")=request.form("GongGao_img")
end if
if trim(request.form("GongGao_color"))="" then
rs("GongGao_color")=null
else
rs("GongGao_color")=request.form("GongGao_color")
end if
if trim(request.form("BBS_img"))="" then
rs("BBS_img")=null
else
rs("BBS_img")=request.form("BBS_img")
end if
if trim(request.form("BBS_color"))="" then
rs("BBS_color")=null
else
rs("BBS_color")=request.form("BBS_color")
end if
'----------公告论坛结束---------->
if trim(request.form("MainBColor"))="" then
rs("MainBColor")=null
else
rs("MainBColor")=request.form("MainBColor")
end if
if trim(request.form("MainBgColor"))="" then
rs("MainBgColor")=null
else
rs("MainBgColor")=request.form("MainBgColor")
end if
if trim(request.form("MainTColor"))="" then
rs("MainTColor")=null
else
rs("MainTColor")=request.form("MainTColor")
end	if
if trim(request.form("MainCColor"))="" then
rs("MainCColor")=null
else
rs("MainCColor")=request.form("MainCColor")
end if
if trim(request.form("TopBColor"))="" then
rs("TopBColor")=null
else
rs("TopBColor")=request.form("TopBColor")
end if
if trim(request.form("Top1BgColor"))="" then
rs("Top1BgColor")=null
else
rs("Top1BgColor")=request.form("Top1BgColor")
'<---------------------
end if
if trim(request.form("HHB1_img"))="" then
rs("HHB1_img")=null
else
rs("HHB1_img")=request.form("HHB1_img")
'---------------->
end if
if trim(request.form("Top2BgColor"))="" then
rs("Top2BgColor")=null
else
rs("Top2BgColor")=request.form("Top2BgColor")
end if
if trim(request.form("Top3BgColor"))="" then
rs("Top3BgColor")=null
else
rs("Top3BgColor")=request.form("Top3BgColor")
end if
'<----------------------
if trim(request.form("HHB3_img"))="" then
rs("HHB3_img")=null
else
rs("HHB3_img")=request.form("HHB3_img")
end if
'-------------------------->
if trim(request.form("Out1Color"))="" then
rs("Out1Color")=null
else
rs("Out1Color")=request.form("Out1Color")
end if
if trim(request.form("Out2Color"))="" then
rs("Out2Color")=null
else
rs("Out2Color")=request.form("Out2Color")
end if
if trim(request.form("Out2Width"))="" then
rs("Out2Width")=0
else
rs("Out2Width")=request.form("Out2Width")
end if
if trim(request.form("Out3Color"))="" then
rs("Out3Color")=null
else
rs("Out3Color")=request.form("Out3Color")
end if

if trim(request.form("LeftLColor"))="" then
rs("LeftLColor")=null
else
rs("LeftLColor")=request.form("LeftLColor")
end if
if trim(request.form("LeftBColor"))="" then
rs("LeftBColor")=null
else
rs("LeftBColor")=request.form("LeftBColor")
end if
if trim(request.form("LeftBImg"))="" then
rs("LeftBImg")=null
else
rs("LeftBImg")=request.form("LeftBImg")
end if

if trim(request.form("LeftBgColor"))="" then
rs("LeftBgColor")=null
else
rs("LeftBgColor")=request.form("LeftBgColor")
end if
if trim(request.form("LeftTColor"))="" then
rs("LeftTColor")=null
else
rs("LeftTColor")=request.form("LeftTColor")
end if	
if trim(request.form("LeftTImg"))="" then
rs("LeftTImg")=null
else
rs("LeftTImg")=request.form("LeftTImg")
end if	
if trim(request.form("LeftCColor"))="" then
rs("LeftCColor")=null
else
rs("LeftCColor")=request.form("LeftCColor")
end if
if trim(request.form("LeftCImg"))="" then
rs("LeftCImg")=null
else
rs("LeftCImg")=request.form("LeftCImg")
end if	
if trim(request.form("LeftRColor"))="" then
rs("LeftRColor")=null
else
rs("LeftRColor")=request.form("LeftRColor")
end if
if trim(request.form("LeftRImg"))="" then
rs("LeftRImg")=null
else
rs("LeftRImg")=request.form("LeftRImg")
end if	

if trim(request.form("CenterBColor"))="" then
rs("CenterBColor")=null
else
rs("CenterBColor")=request.form("CenterBColor")
end if
if trim(request.form("CenterBImg"))="" then
rs("CenterBImg")=null
else
rs("CenterBImg")=request.form("CenterBImg")
end if
if trim(request.form("CenterBgColor"))="" then
rs("CenterBgColor")=null
else
rs("CenterBgColor")=request.form("CenterBgColor")
end if

'添加导读块界面设置开始'
if trim(request.form("DaoDu_color"))="" then
rs("DaoDu_color")=null
else
rs("DaoDu_color")=request.form("DaoDu_color")
end if
if trim(request.form("DaoDu_img"))="" then
rs("DaoDu_img")=null
else
rs("DaoDu_img")=request.form("DaoDu_img")
end if
'添加导读块界面设置开始'

if trim(request.form("CenterTColor"))="" then
rs("CenterTColor")=null
else
rs("CenterTColor")=request.form("CenterTColor")
end if
if trim(request.form("CenterTImg"))="" then
rs("CenterTImg")=null
else
rs("CenterTImg")=request.form("CenterTImg")
end if
if trim(request.form("CenterCColor"))="" then
rs("CenterCColor")=null
else
rs("CenterCColor")=request.form("CenterCColor")
end if
if trim(request.form("CenterCImg"))="" then
rs("CenterCImg")=null
else
rs("CenterCImg")=request.form("CenterCImg")
end if

if trim(request.form("RightLColor"))="" then
rs("RightLColor")=null
else
rs("RightLColor")=request.form("RightLColor")
end if
if trim(request.form("RightLImg"))="" then
rs("RightLImg")=null
else
rs("RightLImg")=request.form("RightLImg")
end if
if trim(request.form("RightBColor"))="" then
rs("RightBColor")=null
else
rs("RightBColor")=request.form("RightBColor")
end if
if trim(request.form("RightBImg"))="" then
rs("RightBImg")=null
else
rs("RightBImg")=request.form("RightBImg")
end if
if trim(request.form("RightTColor"))="" then
rs("RightTColor")=null
else
rs("RightTColor")=request.form("RightTColor")
end if
if trim(request.form("RightTImg"))="" then
rs("RightTImg")=null
else
rs("RightTImg")=request.form("RightTImg")
end if
if trim(request.form("RightBgColor"))="" then
rs("RightBgColor")=null
else
rs("RightBgColor")=request.form("RightBgColor")
end if		
if trim(request.form("RightCColor"))="" then
rs("RightCColor")=null
else
rs("RightCColor")=request.form("RightCColor")
end if
if trim(request.form("RightCImg"))="" then
rs("RightCImg")=null
else
rs("RightCImg")=request.form("RightCImg")
end if
if trim(request.form("RightRColor"))="" then
rs("RightRColor")=null
else
rs("RightRColor")=request.form("RightRColor")
end if

if trim(request.form("BottomBgcolor"))="" then
rs("BottomBgcolor")=null
else
rs("BottomBgcolor")=request.form("BottomBgcolor")
end if
if trim(request.form("BottomBgImg"))="" then
rs("BottomBgImg")=null
else
rs("BottomBgImg")=request.form("BottomBgImg")
end if

if trim(request.form("BgImg"))="" then
rs("BgImg")=null
else
rs("BgImg")=request.form("BgImg")
end if

rs("TableWidth")=TableWidth
rs("ColorCss")=trim(request.form("ColorCss"))

rs.update
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
Application.Lock
Application("ColorName")=""
Application.UnLock
Response.Redirect "admin_SiteColorMana.asp"
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -