📄 u_myskin.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="md5.asp"-->
<!--#include file="inc/chkinput.asp"-->
<%
'=========================================================
' File: register.asp
' Date: 2006-04-06
' Script Written by Leibo
'=========================================================
' Copyright (C) 2002,2008 Mathren.com. All rights reserved.
' Web: http://www.hrbyydz.com
' Email: qa_90@hotmail.com
'=========================================================
response.buffer=true
stats="选择界面风格"
if not founduser then
Errmsg=Errmsg+"<br>"+"<li>您还没有登陆,请登陆后进行修改。"
founderr=true
end if
if Cint(GroupSetting(3))=1 then
Errmsg=Errmsg+"<br>"+"<li>您没有选择同学录界面风格的权限,请同管理员联系。"
founderr=true
end if
call head()
if founderr then
call head_var("","")
call txl_error()
else
call head_var("个人菜单","u_index.asp")
if request("action")="update" then
call update()
if founderr then
call txl_error()
else
sucmsg="<li>更改资料成功!"
call txl_suc()
end if
elseif request("action")="restore" then
call restore()
if founderr then
call txl_error()
else
sucmsg="<li>更改资料成功!"
call txl_suc()
end if
else
call skininfo()
if founderr then call txl_error()
end if
end if
call foot()
sub skininfo()
dim myskinid
set rs=server.createobject("adodb.recordset")
sql="Select * from [User] where userid="&userid
rs.open sql,conn,1,1
if rs.eof and rs.bof then
errmsg=errmsg+"<br>"+"<li>该用户名不存在。"
founderr=true
exit sub
else
myskinid=rs("skinid")
end if
rs.close
set rs=nothing
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">
<tr>
<td bgcolor=<%=txl_body(10)%> align="center" valign="top"><br>
<table cellpaddin=3 cellspacing=1 class=tableborder1 width=<%=txl_body(19)%> align=center>
<tr>
<th width=14% height=25 id=tabletitlelink><a href=u_index.asp>个人菜单首页</a></th>
<th width=14% id=tabletitlelink><a href=u_modifymy.asp>基本资料修改</a></th>
<th width=14% id=tabletitlelink><a href=u_modifypsw.asp>用户密码修改</a></th>
<th width=14% id=tabletitlelink><a href=u_modifyadd.asp>联系资料修改</a></th>
<th width=14% id=tabletitlelink><a href=u_myskin.asp>选择界面风格</a></th>
<th width=14% id=tabletitlelink><a href=usersms.asp>我的短信管理</a></th>
<th width=14% id=tabletitlelink><a href=d_index.asp>我的日记管理</a></th>
</tr>
</table>
<br>
<table cellpadding=5 cellspacing=1 border=0 class=tableborder1 width=<%=txl_body(19)%> align=center>
<form action="u_myskin.asp?action=update" method=POST name="theForm">
<tr>
<th height=25 colspan=2>选择界面风格</td>
</tr>
<tr>
<td height=50 class=tablebody2 style="line-height:150%">说明:1、同学录提供了多套界面风格,你可以在这里选择你喜欢的风格;<br> 2、如果你选择了自己的界面风格,以后登录都将为你说选择的;<br> 3、您也可以点击“恢复默认风格”,恢复到同学录的默认风格。</td>
</tr>
<tr>
<td height=50 class=tablebody1>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from config"
rs.open sql,conn,1,1
dim i
i=1
do while not rs.eof
%>
<input type=radio name=skinid value="<%=rs("id")%>" <%if rs("id")=myskinid then response.write"checked"%>><%=rs("skinname")%>
<%
if (i mod 6)=0 then response.write "<br>"
i=i+1
rs.movenext
loop
rs.close
%>
</td>
</tr>
<tr>
<td colspan="2" width="100%" class=tablebody2 align="center"> <input type=Submit value="提交修改" name="Submit"> <a href="?action=restore"><u>恢复默认风格</u></a></td>
</tr>
</form>
</table><br>
</td>
</tr>
</table>
<%
end sub
sub update()
if request("skinid")="" then
errmsg=errmsg+"<br>"+"<li>请选择您喜欢的界面风格。"
founderr=true
exit sub
else
skinid=request("skinid")
end if
'update
set rs=server.createobject("adodb.recordset")
sql="Select * from [User] where userid="&userid
rs.open sql,conn,1,3
if rs.eof and rs.bof then
errmsg=errmsg+"<br>"+"<li>该用户名不存在。"
founderr=true
exit sub
else
rs("skinid")=skinid
rs.Update
end if
Response.Cookies("mathren")("skinid") = rs("skinid")
Response.Cookies("mathren").path=cookiepath
rs.close
set rs=nothing
end sub
sub restore()
dim reskinid
sql="select id from config where active=1"
set rs=conn.execute(sql)
reskinid=rs("id")
conn.execute("update [user] set skinid="&reskinid&" where userid="&userid)
Response.Cookies("mathren")("skinid") = reskinid
Response.Cookies("mathren").path=cookiepath
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -