📄 left.asp
字号:
<!-- #include file="ConnDB.asp" -->
<!-- #include file="class/Person.asp" -->
<!-- #include file="class/PhotoType.asp" -->
<!-- #include file="class/Bulletin.asp" -->
<html>
<script language="javascript">
function newwin(url) {
var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=200,top=200";
oth = oth+",width=500,height=450";
var newwin = window.open(url,"newWin",oth);
newwin.focus();
return false;
}
</script>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-left: 0px;
}
.STYLE1 {color: #FFFFCC}
-->
</style>
<style>
<!--
.main { font-size: 9pt }
.STYLE3 {color: #FFFF66}
-->
</style>
<body>
<table width="167" border="1" align="left" cellspacing="0" valign="bottom">
<tr>
<th height="19" bordercolor="#9933FF" bgcolor="#9933FF" scope="row"><span class="main STYLE3 STYLE1">用户信息</span></th>
</tr>
<tr class="main">
<th width="161" height="76" bordercolor="#9900FF" bgcolor="#FFdeFF" class="main" scope="row"><table width="155" valign="top" height="88" border="0" cellspacing="0" class="main">
<%
'' 用户身份验证
set objPerson = new Person
if Session("UserName") = "" then ' 表示尚未登录
username = Request("txtUserName")
userpwd = Request("txtUserPwd")
' 读取用户信息
objPerson.GetPersonInfo(username)
if objPerson.UserId = "" or objPerson.UserPwd<>userpwd _
or objPerson.Status=0 then
Session("UserName") = ""
else
' 通过身份验证后,将当前用户的信息保存到相应的Session变量中
Session("UserName") = objPerson.UserId
Session("UserPwd") = objPerson.UserPwd
Session("Name") = objPerson.Name
Session("UserType") = objPerson.UserType
Session("Email") = objPerson.Email
end if
else
' 如果已经登录,则获取当前用户的信息,以便显示
objPerson.GetPersonInfo(Session("UserName"))
end if
' 使用Session("OldUser")记录原来的登录状态,如果发生变化,则刷新整个网页
if Session("OldUser") <> Session("UserName") then
%>
<script language="javascript">
parent.location.reload();
setTimeout("window.close()",800);
</script>
<%
Session("OldUser") = Session("UserName")
end if
' 用户名为空的用户不允许登录
if Session("UserName") = "" then %>
<form name="form1" method="post" action="left.asp">
<tr>
<th width="52" height="30" valign="middle" scope="row"><span class="STYLE5">
用户名</span></th>
<td width="99" valign="middle" class="main"><span class="STYLE5">
<label>
<input name="txtUserName" type="text" id="txtUserName" size="10" maxlength="50">
</label>
</span></td>
</tr>
<tr>
<th class="main STYLE5" scope="row">密 码</th>
<td class="main"><input name="txtUserPwd" type="password" id="txtUserPwd" size="10" maxlength="50"></td>
</tr>
<tr>
<th class="main STYLE5" scope="row"><label>
<div align="left">
<input type="submit" name="Submit" value="提交">
</label>
</div></th>
<td class="main STYLE5"><label>
<div align="left">
<input name="Reset" type="reset" id="Reset" value="重设">
<a target="_blank" href="user\UserAdd.asp" onclick="return newwin(this.href)">
我要加入</a></label>
</div></td>
</tr></form>
<% else '如果用户登录成功 %>
<td><span class="STYLE5">
<p>姓名: <%=objPerson.Name%> <br>
用户名: <%=objPerson.UserId%> <br>
类型:
<% if objPerson.UserType = 1 then %>
系统管理员
<% else %>
普通用户
<% end if %>
<br>
生日: <%=objPerson.Birthday%> <br>
</p>
<p>[<a href="user\PwdChange.asp" onClick="return newwin(this.href)">修改密码</a>] </p>
<p>[<a href="user\UserEdit.asp?uid=<%=Session("UserName")%>" onClick="return newwin(this.href)">修改个人信息</a>] <br>
</p>
<p>[<a href="LoginExit.asp">退出登录</a>]
<% end if %>
</p>
</table></th>
</tr>
<% if Session("IsPublic") = 1 or Session("UserName")<>"" then %>
<tr>
<th bordercolor="#9900FF" bgcolor="#9900FF" scope="row"><span class="main STYLE3">系统公告</span></th>
</tr>
<%
' 读取最近一周的公告分类信息
set objBul = new Bulletin
objBul.GetRecentBulletinlist
Do While Not objBul.rs.Eof
%>
<tr>
<td width="100%" height="14" align="center" bordercolor="#9900FF" bgcolor="#FFDEFF" class="main"><font color="#0000FF"><a href="BulletinView.asp?Id=<%=objBul.rs("Id")%>" target="mainFrame"><%=objBul.rs("Title")%></a></font></td>
</tr>
<%
objBul.rs.MoveNext
Loop
%>
<tr>
<th bordercolor="#9900FF" bgcolor="#FFDEFF" scope="row" class="main"><p><a href="user/BulletinList.asp" target="mainFrame">查看全部</a></p> </th>
</tr>
<tr>
<th bordercolor="#9900FF" bgcolor="#9900FF" scope="row"><span class="main STYLE3">查看照片</span></th>
</tr>
<tr>
<th bordercolor="#9900FF" bgcolor="#FFdeFF" class="main" scope="row"> <%
set obj = new PhotoType
' 读取所有照片分类信息
obj.GetPhotoTypelist
Do While Not obj.rs.Eof
%>
<tr>
<td width="100%" height="14" align="center" bordercolor="#9900FF" bgcolor="#FFDEFF" class="main"><font color="#0000FF"><a href="user\PhotoList.asp?TypeId=<%=obj.rs("TypeId")%>" target="mainFrame"><%=obj.rs("TypeName")%></a></font></td>
</tr>
<%
obj.rs.MoveNext
Loop
%></th><br>
</tr>
<tr>
<th bordercolor="#9900FF" bgcolor="#9900FF" scope="row"><span class="main STYLE3">近期生日</span></th>
</tr>
<tr>
<%
' 读取近期生日信息
objPerson.GetRecentBirthlist
If objPerson.rs.Eof Then %>
<tr>
<td width="100%" height="14" align="center" bordercolor="#9900FF" bgcolor="#FFDEFF">
<span class=main>近期没有人过生日</span></td></tr>
<%
End If
Do While Not objPerson.rs.Eof
%>
<tr>
<td width="100%" height="14" align="center" bordercolor="#9900FF" bgcolor="#FFDEFF" class="main"><p><font color="#0000FF"><%=objPerson.rs("Birthday")%> - <%=objPerson.rs("Name")%></font></p></td>
</tr>
<%
objPerson.rs.MoveNext
Loop
%>
</tr>
<tr>
<th bordercolor="#9900FF" bgcolor="#9900FF" scope="row"><span class="main STYLE3">留言板</span></th>
</tr>
<tr>
<th bordercolor="#9900FF" bgcolor="#FFdeFF" class="main" scope="row"><a href="user/ShowMsg.asp" target="mainFrame">查看留言板</a></th>
</tr>
<tr>
<th bordercolor="#9900FF" bgcolor="#9900FF" scope="row"><span class="main STYLE3">通讯录</span></th>
</tr>
<tr>
<th bordercolor="#9900FF" bgcolor="#FFdeFF" class="main" scope="row"><a href="user/Addresslist.asp" target="mainFrame">查看通讯录</a></th>
</tr>
<% end if %>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -