<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "setup.asp"-->
<!--#include file = "conn.asp"-->
<!--#include file = "md5.asp"-->
<%
Dim sAction, sErrMsg
Dim ytss_use, ytss_Pword
sAction = UCase(Trim(Request("action")))
sErrMsg = ""

Select Case sAction
Case "LOGIN"
	Set oRs = Server.CreateObject( "ADODB.Recordset" )
	ytss_use = HX_Replace(Trim(Request("usr")))
	ytss_Pword = HX_Replace(Trim(Request("pwd")))
	if Session("wumei_GetCode")= ytss_yan then
			If ytss_use <> "" And ytss_Pword <> "" Then
				sSql = "select * from deandata where deanno='"&ytss_use&"'"
				oRs.Open sSql, conn, 0, 1
				If Not oRs.Eof Then
					If oRs("deanno") = ytss_use And oRs("deanpass") = md5(ytss_Pword) Then
						Session("deanno") = oRs("deanno")
						Session("deanname") = oRs("deanname")
						Response.Redirect "admin/dean_book.asp"
						response.Write "<script LANGUAGE='javascript'>window.location.href = 'ck_manage.asp target=_top'</script>"
						Response.End
					End If
				End If
				oRs.Close
			End If
			sErrMsg = "提示：用户名或密码错误！"
	else 
		response.Write "<script LANGUAGE='javascript'>alert('请输入正确的验证码！');history.go(-1);</script>"
		response.end
	end if
Case "OUT"
End Select

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=site_name%>——领导入口</title>
<SCRIPT language=JavaScript>
function checklogin() {
	if (document.myform.usr.value=="") {
		alert("请输入用户名!");
		myform.usr.focus();
		return false;
	}
	if (document.myform.pwd.value=="") {
		alert("请输入密码!");
		myform.pwd.focus();
		return false;
	}
	if (document.myform.yan.value=="") {
		alert("请输入验证码!");
		myform.yan.focus();
		return false;
	}
}
</SCRIPT>
</head>

<body>
<!--#include file="top.asp" -->
<div id="box">
<div id="left">
  <div id="nav4">栏目导航</div>
  <div id="nav_content">
<ul class="cannel2">
<li><a href="gbwrite.asp">签写书信</a></li>
<li><a href="gindex.asp">信箱公开</a></li>
<li><a href="dean_Login.asp">领导入口</a></li>
</ul>
</div>
<div id="nav4">点击排行</div>
<div id="nav_content">
<ul>
<%
 Set rs = Server.CreateObject("ADODB.RecordSet")
rs.open "select top 6 * from news order by hit desc",conn,1,1
if rs.eof and rs.bof then
response.Write("")
else
do while not rs.eof
%>
<li>·<a href="list.asp?yiid=<%=rs("yiid")%>"><%=rs("title")%></a></li>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
 %>
</ul>
</div>
<div id="nav4">投票调查</div>
<div id="nav_content">
<script language="javascript" src="vote/votescript.asp?vid=7"></script>
</div>
</div>

<div id="right">
<div id="address">您的位置：本站首页→领导入口</div>

<div id="big_content">
<div id="content">
  <table width="70%" height="183" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#EEEEEE">
        <tr>
          <td width="458" height="31" align="center" valign="top"><br>
              <%response.Write("<font color=red>"&sErrMsg&"</font>")%>          </td>
        </tr>
        <tr>
          <td height="98" align="right" valign="top"><form name="myform" onSubmit="return checklogin()" method="post" action="?action=login">
            <table width="100%" height="159" border="0" cellpadding="3" cellspacing="0">
              <tr>
                <td width="19%" height="36">用户名</td>
                <td width="81%" align="left"><input name="usr" type="text" id="usr" size="20" maxlength="20" style="height:22px;border:1px solid #006699">                </td>
              </tr>
              <tr>
                <td height="38">密&nbsp; 码</td>
                <td align="left"><input name="pwd" type="password" id="pwd" size="20" maxlength="20" style="height:22px;border:1px solid #006699">                </td>
              </tr>
              
              <tr>
                <td></td>
                <td align="left">&nbsp;&nbsp;&nbsp;
                    <input name="Submit2" type="image" style="height:23px;width:70px;" value="登录" src="img/login.gif" width="70" height="23">
                    <br>
                    <span class="style5">演示领导用户名shuji,密码shuji</span><br>
                    <span class="style5">演示领导用户名yuanzhang,密码yuanzhang</span></td>
              </tr>
            </table>
          </form></td>
        </tr>
      </table>
</div>
</div>
</div>
</div>
<!--#include file="bottom.asp"-->
</body>
</html>
<%conn.close
set conn=nothing%>
