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

📄 sysadm_theme.asp

📁 功能非常完整的校友录
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp" -->
<!--#include file=char.asp-->
<!--#include file=checkuser.asp-->
<title><%=SchoolmateName%>--管理页面</title>
<link rel="stylesheet" type="text/css" href="txl.css">

<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 bgcolor=<%=bodycolor%>>
<%
	if  issystemadmin(0)=false or session("adminlogin")<>"OK" then
		Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=sysadm_index.asp target=_top>登陆</a>后进入。"
		call Error(errmsg)
	else
		call main()
		set rs=nothing
		call endconnection()
end if

	sub main()
%><BR>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebordercolor%> align=center>
  <tr>
    <td>
      <table cellpadding=3 cellspacing=1 border=0 width=100%>
        <tr bgcolor='<%=Tabletitlecolor%>'>
        <td><font color="<%=TablefontColor%>">欢迎<b><%=membername%></b>进入管理页面</font>
        </td>
        </tr>
            <tr bgcolor=<%=tablebodycolor2%>>
              <td width="100%" valign=top><font color="<%=TableContentColor%>">
<%
if request("action")="list" then
	call themeform()
elseif request("action")="更新" then
	call updatetheme()
elseif request("action")="删除" then
	call removetheme()
elseif request("action")="add" then
	call addtheme()
elseif request("action")="save" then
	call savenewtheme()
else
	call themeform()
end if
%></font>
	      </td>
            </tr>
        </table>
        </td>
    </tr>
</table>
<%
end sub

sub ThemeList(byval mytheme) 
	%>
	<select name=themeid onchange='location.href="sysadm_theme.asp?themeid="+options[selectedIndex].value'>
	<%
	set tmprs=conn.execute("Select * from [theme] order by themeid") 
	i=1
	do until tmprs.eof 
	%>
	<option value=<%=tmprs("themeid")%> <%if tmprs("themeid")=mytheme then%> selected <%end if%>>〖配色方案<%=i%>〗</option><%
		tmprs.movenext
		i=i+1
	loop

	response.write "</select>"
	set tmprs=nothing 

end sub

function getonetheme()
set tmprs=conn.execute("select top 1 themeid from [theme] order by themeid") 
if not tmprs.eof then
getonetheme=tmprs(0)
end if
end function


sub themeform()
dim currenttheme
if not isempty(request("themeid")) then
	currenttheme=cint(request("themeid"))
else
	currenttheme=getonetheme()
end if
sql="select * from [theme] where themeid="&currenttheme
set rs=conn.execute(sql)
%>
<BR>
<form method="POST" action=sysadm_theme.asp>
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center bgcolor=#ffffff>
<tr><td width="50%" colspan=2>请选择配色方案</td><td><%call  themelist(currenttheme)%></td></tr>
<tr><td width="50%" colspan=2>配色方案名称</td><td><input type="text" name="themename" size="35" value="<%=rs("themename")%>">
</td></tr>

<tr> 
<td width="45%"><font color="<%=TableContentColor%>">表格边框颜色</font></td>
<td width="5%" bgcolor="<%=rs("Tablebordercolor")%>"></td>
<td width="50%"> 
<input type="text" name="Tablebordercolor" size="35" value="<%=rs("Tablebordercolor")%>">
</td>
</tr>
<tr> 
<td width="45%"><font color="<%=TableContentColor%>">表格体颜色一
</font></td>
<td width="5%" bgcolor="<%=rs("Tablebodycolor1")%>"></td>
<td width="50%"> 
<input type="text" name="Tablebodycolor1" size="35" value="<%=rs("Tablebodycolor1")%>">
</td>
</tr>
<tr> 
<td width="45%"><font color="<%=TableContentColor%>">表格体颜色二
</font></td>
<td width="5%" bgcolor="<%=rs("Tablebodycolor2")%>"></td>
<td width="50%"> 
<input type="text" name="Tablebodycolor2" size="35" value="<%=rs("Tablebodycolor2")%>">
</td>
</tr>

<tr> 
<td width="45%"><font color="<%=TableContentColor%>">表格标题栏背景颜色</font></td>
<td width="5%" bgcolor="<%=rs("Tabletitlecolor")%>"></td>
<td width="50%"> 
<input type="text" name="Tabletitlecolor" size="35" value="<%=rs("Tabletitlecolor")%>">
</td>
</tr>
<tr> 
<td width="45%"><font color="<%=TableContentColor%>">表格标题栏文字颜色</font></td>
<td width="5%" bgcolor="<%=rs("TablefontColor")%>"></td>
<td width="50%"> 
<input type="text" name="TablefontColor" size="35" value="<%=rs("TablefontColor")%>">
</td>
</tr>
<tr> 
<td width="45%"><font color="<%=TableContentColor%>">表格内容栏文字颜色</font></td>
<td width="5%" bgcolor="<%=rs("TablecontentColor")%>"></td>
<td width="50%"> 
<input type="text" name="TablecontentColor" size="35" value="<%=rs("TablecontentColor")%>">
</td>
</tr>
<tr> 
<td width="45%"><font color="<%=TableContentColor%>">页面背景颜色</font></td>
<td width="5%" bgcolor="<%=rs("bodycolor")%>"></td>
<td width="50%"> 
<input type="text" name="bodycolor" size="35" value="<%=rs("bodycolor")%>">
</td>
</tr>
<tr> 
<td width="45%"><font color="<%=TableContentColor%>">菜单背景颜色</font></td>
<td width="5%" bgcolor="<%=rs("MenuBackColor")%>"></td>
<td width="50%"> 
<input type="text" name="MenuBackColor" size="35" value="<%=rs("MenuBackColor")%>">
</td>
</tr>
<tr> 
<td width="45%"><font color="<%=TableContentColor%>">菜单文字颜色</font></td>
<td width="5%" bgcolor="<%=rs("MenuFontColor")%>"></td>
<td width="50%"> 
<input type="text" name="MenuFontColor" size="35" value="<%=rs("MenuFontColor")%>">
</td>
</tr>


<tr bgcolor=<%=Tabletitlecolor%>> 
<td height="23" colspan="3" align=right ><input type="submit" name="action" value="更新">&nbsp;&nbsp;
<input type="submit" name="action" value="删除">

</td>
</tr>
</table>
</form>
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center bgcolor=<%=rs("bodycolor")%>>
<TR>
	<TD align=center>
	
	配色方案效果<BR><p>

	<table width="80%"><tr><td align=center width="30%" bgcolor="<%=rs("menubackcolor")%>"><font color="<%=rs("menufontcolor")%>">菜单文字颜色</td><td width="70%">
<table width="100%" border="0" cellspacing="1" cellpadding="3"  align=center bgcolor=<%=rs("tablebordercolor")%>>
	<TR bgcolor=<%=rs("tabletitlecolor")%>>
		<TD height=20 align=center><font color=<%=rs("tablefontcolor")%>>表格标题栏文字颜色</font></TD>
	</TR>
	<TR bgcolor=<%=rs("tablebodycolor1")%>>
		<TD height=50 align=center><font color=<%=rs("tablecontentcolor")%>>表格内容栏文字颜色</font></TD>
	</TR>
	<TR bgcolor=<%=rs("tablebodycolor2")%>>
		<TD height=50></TD>
	</TR>

	</TABLE></td></tr></table>
	<br>
	</TD>
</TR>
</TABLE>
<br>



<%
end sub

sub updatetheme()

	set rs=server.createobject("adodb.recordset")
	sql="Select * from [theme] where themeid="&trim(request("themeid"))
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		errmsg=errmsg+"<br>"+"<li>该配色方案不存在。"
		call error(errmsg)
		exit sub
	end if
	rs("themename")=trim(request("themename"))
	rs("TableborderColor")=trim(request("TableborderColor"))
	rs("TablebodyColor1")=trim(request("TablebodyColor1"))
	rs("TablebodyColor2")=trim(request("TablebodyColor2"))
	rs("TabletitleColor")=trim(request("TabletitleColor"))
	rs("TablecontentColor")=trim(request("TablecontentColor"))
	rs("TablefontColor")=trim(request("TablefontColor"))
	rs("bodycolor")=trim(request("bodycolor"))
	rs("MenuBackColor")=trim(request("MenuBackColor"))
	rs("MenuFontColor")=trim(request("MenuFontColor"))
	rs.update
    rs.close
	set rs=nothing
%>
<center><p><b>更新配色方案成功!</b>
<%


end sub

sub removetheme()
	sql="select themeid from [theme] where themeid="&trim(request("themeid"))
	set rs=conn.execute(sql)
	if rs.eof and rs.bof then
		errmsg=errmsg+"<br>"+"<li>该配色方案不存在。"
		call error(errmsg)
		exit sub
	end if

	sql="delete from [theme] where themeid="&trim(request("themeid"))
	conn.execute(sql)
%>
<center><p><b>成功删除配色方案!</b>
<%
end sub


sub addtheme()

%>
<BR>
<form method="POST" action=sysadm_theme.asp>
<input type=hidden name=action value="save">
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center bgcolor="<%=tablebordercolor%>">
<tr  colspan="2" align="center" bgcolor="<%=tabletitlecolor%>"><td><b>添加配色方案</b><td></tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%">配色方案名称</td><td><input type="text" name="themename" size="35" >
</td></tr>

<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">表格边框颜色</font></td>
<td width="50%"> 
<input type="text" name="Tablebordercolor" size="35" >
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">表格体颜色一
</font></td>
<td width="50%"> 
<input type="text" name="Tablebodycolor1" size="35"> 
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">表格体颜色二
</font></td>
<td width="50%"> 
<input type="text" name="Tablebodycolor2" size="35" >
</td>
</tr>

<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">表格标题栏背景颜色</font></td>
<td width="50%"> 
<input type="text" name="Tabletitlecolor" size="35" >
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">表格标题栏文字颜色</font></td>
<td width="50%"> 
<input type="text" name="TablefontColor" size="35" >
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">表格内容栏文字颜色</font></td>
<td width="50%"> 
<input type="text" name="TablecontentColor" size="35" >
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">页面背景颜色</font></td>
<td width="50%"> 
<input type="text" name="bodycolor" size="35" >
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">菜单背景颜色</font></td>
<td width="50%"> 
<input type="text" name="MenuBackColor" size="35">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>><td width="50%"><font color="<%=TableContentColor%>">菜单文字颜色</font></td>
<td width="50%"> 
<input type="text" name="MenuFontColor" size="35" >
</td>
</tr>


<tr bgcolor=<%=Tabletitlecolor%>> 
<td height="23" colspan="2" align=right >
<input type="submit" name="submit" value="添加">
</td>
</tr>
</table>
</form>
<%
end sub

sub savenewtheme()

	set rs=server.createobject("adodb.recordset")
	rs.open "theme",conn,1,3
	rs.addnew
	rs("themename")=trim(request("themename"))
	rs("TableborderColor")=trim(request("TableborderColor"))
	rs("TablebodyColor1")=trim(request("TablebodyColor1"))
	rs("TablebodyColor2")=trim(request("TablebodyColor2"))
	rs("TabletitleColor")=trim(request("TabletitleColor"))
	rs("TablecontentColor")=trim(request("TablecontentColor"))
	rs("TablefontColor")=trim(request("TablefontColor"))
	rs("bodycolor")=trim(request("bodycolor"))
	rs("MenuBackColor")=trim(request("MenuBackColor"))
	rs("MenuFontColor")=trim(request("MenuFontColor"))
	rs.update
    rs.close
	set rs=nothing
%>
<center><p><b>添加配色方案成功!</b>
<%


end sub

%>



⌨️ 快捷键说明

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