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

📄 index.jsp

📁 eNews新闻发布系统v1.0试用版 开发者:王猛 使用jsp开发
💻 JSP
字号:
<%@page contentType="text/html; charset=gb2312" language="java" %>
<%
String go=request.getParameter("go");
if(go==null)
{go="";}
if(go.equals("ok"))
{
String login=request.getParameter("login");
String password=request.getParameter("password");
if(login==null)
{login="";}
if(password==null)
{password="";}
if(login.equals("login")||password.equals(""))
{
%>
<script>
alert("用户名和密码不能为空");history.go(-1);
</script>
<%
return;
}
%>
<jsp:useBean id=empire scope="page" class="Eclass.jdbc_sql" />
<%
java.sql.ResultSet rs=null;
rs=empire.query("select*from enews_admin where login='"+login+"' and password='"+password+"'");
if(!rs.next())
{rs.close();
empire.closestmt();
empire.closeconn();
%>
<script>
alert("用户名和密码有误");history.go(-1);
</script>
<%
return;
}
String addnews=rs.getInt("addnews")+"";
String listnews=rs.getInt("listnews")+"";
String getjs=rs.getInt("getjs")+"";
String morenews=rs.getInt("morenews")+"";
String listpicnews=rs.getInt("listpicnews")+"";
String search=rs.getInt("search")+"";
String addclass=rs.getInt("addclass")+"";
String listclass=rs.getInt("listclass")+"";
String addtemplate=rs.getInt("addtemplate")+"";
String listtemplate=rs.getInt("listtemplate")+"";
String adduser=rs.getInt("adduser")+"";
String listuser=rs.getInt("listuser")+"";
String bakdata=rs.getInt("bakdata")+"";
String loadin=rs.getInt("loadin")+"";
String movenews=rs.getInt("movenews")+"";
String deloldnews=rs.getInt("deloldnews")+"";
session.putValue("loginname",rs.getString("login"));
session.putValue("addnews",addnews);
session.putValue("listnews",listnews);
session.putValue("getjs",getjs);
session.putValue("morenews",morenews);
session.putValue("listpicnews",listpicnews);
session.putValue("search",search);
session.putValue("addclass",addclass);
session.putValue("listclass",listclass);
session.putValue("addtemplate",addtemplate);
session.putValue("listtemplate",listtemplate);
session.putValue("adduser",adduser);
session.putValue("listuser",listuser);
session.putValue("bakdata",bakdata);
session.putValue("loadin",loadin);
session.putValue("movenews",movenews);
session.putValue("deloldnews",deloldnews);
rs.close();
empire.closestmt();
empire.closeconn();
%>
<font color=red size=20>正在登陆......................</font>
<script>
parent.location.href="admin.htm";
</script>
<%
return;
}
%>
<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>eNews</title><style>body { font-size: 9pt; line-height: 13pt} a:link { font-size: 9pt;  color:#003399} A:hover {COLOR:#FFCC00; } a:visited { font-size: 9pt; line-height: 13pt; color:#800080;} table { font-size: 9pt; line-height: 13pt} td { font-size: 9pt; line-height: 13pt} font {  font-size: 9pt; line-height: 13pt}SELECT {BACKGROUND-COLOR: #ffffff; COLOR: #51485f; FONT-FAMILY: 宋? FONT-SIZE: 8pt}INPUT { COLOR: #000000; FONT-FAMILY: MS Shell Dlg,Tahoma, sans-serif; FONT-SIZE: 9pt}</style></head><body>
<form name=login method=post action=index.jsp><input type=hidden name=ebb value=login>
<input type=hidden name=go value=ok>
  <table width=60% border=0 cellspacing=1 cellpadding=0 align=center bgcolor=#0099CC>
    <tr>
      <td><div align="center"><font color=#FFFFFF>管理员登陆</font></div></td>
    </tr>
    <tr bgcolor=#FFFFFF> 
      <td><div align="center">帐号: 
          <input type=text name=login>
        </div></td>
    </tr>
    <tr bgcolor=#FFFFFF>
      <td><div align="center">密码: 
          <input type=password name=password>
        </div></td>
    </tr>
    <tr bgcolor=#FFFFFF> 
      <td> <div align="center">
          <input type=Submit name=Submit value=马上登陆>
        </div></td>
    </tr>
  </table>
</form>
</body></html>

⌨️ 快捷键说明

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