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

📄 del.jsp

📁 jsp+javabean留言本
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
<html>
<head>
<title>重庆杰诺软件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style" rel="stylesheet" type="text/css">
</head>
<%
{
=========================================================
                 重庆杰诺软件开发研究所开发制作
                   (http://www.cnkami.com)

     诚信,创新,你的最好选择。。。。。。。。。。。
==========================================================
                 解压密码:www.cnkami.com
==========================================================
****************************************************
*          杰诺供求信息发布系统 v1.5               *
****************************************************
1. 本系统运行环境: 
    WINW2000+IIS+jdk1.4+odbc
   由于本系统采用jsp写成,所以要求服务器支持jsp
   数据库采用ACCESS库,要求服务器具有ACCESS的驱动程序,
   ADO版本要求2.5以上,
   实际上,新装好的WINDOWS SERVER+IIS+SP3就可以很好的运行本系统
   本系统做有些修改时需要修改服务器上的文件,所以要求在服务器上有写文件的权限.
2. 系统默认状态下有一个系统管理员,用户名admin,密码admin.
3. 本程序商业版:商业用户:50元
4. 商业版在重写了系统核心以后新增了一些功能,界面美化,如果企业用户可提供更加人性化的修改!
5. 如果你使用本系统,请到http://www.cnkami.com/guestbook/留言,发表自已的看法,谢谢!
6. 如有其它要求请与系统作者联系。
7. 系统作者为可以为客户提供各类大型网站系统,OA系统,数据处理系统等。
8. 系统作者优惠为客户提供网站制作业务,为了让这套系统能发展更好,为了给朋友们写出更多,更好的程序,请大家支持作者。多给作者介绍一些商业客户,不胜感激。
9.使用之前请先配置odbc 名称为:faqaccess;
  请保留版权信息!谢谢!请支持作者的工作,!谢谢!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
有意请联系!:

  QQ:1801099
  QQ:171476439
  邮件:flycomesoho@hotmail.com
  电话:63700285 13608336048
如转载,请不要删除此信息!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}%>
<body bgcolor="#CCCCCC">
<%String action=request.getParameter("action");
if(action==null){%>
<blockquote>
  <form name="form1" method="post" action="del.jsp?action=del">
    <table width="345" height="99" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
      <tr align="center" background="images/table.gif"> 
        <td height="24" colspan="2"><strong><font color="#FFFFFF">删除留言</font></strong></td>
      </tr>
      <tr> 
        <td width="32%" height="22" align="center">用户名:</td>
        <td width="68%"><input name="username" type="text" id="username"></td>
      </tr>
      <tr> 
        <td align="center">密 码:</td>
        <td><input name="password" type="password" id="password"> <input name="id" type="hidden" id="id" value="<%=request.getParameter("id")%>"></td>
      </tr>
      <tr align="center"> 
        <td colspan="2"><input type="submit" name="Submit" value="删除">
           
<input type="button" name="Submit2" value="重写" onClick="javascript:history.go(-1)">
            
          <input type="button" name="Submit22" value="返回" onClick="window.location.href='index.jsp'"></td>
      </tr>
    </table>
  </form>
</blockquote>
<%}else{%>
<jsp:useBean class="guestbook.GuestBookJdbc" id="guestbook" scope="page"/>
<%
   String username=request.getParameter("username");
   String password=request.getParameter("password");
String myid=request.getParameter("id");
int yid=java.lang.Integer.parseInt(myid);
Connection Conn=guestbook.GetConn();
Statement stmt=Conn.createStatement();
   String sql="select count(*) from admin where username='"+username+"' and password='"+password+"'";
   try{
     ResultSet Rs=stmt.executeQuery(sql);
	 Rs.next();
     if(Rs.getInt(1)==0){
	   out.print("<script>");
       out.print("alert('用户名或密码出错!');");
       out.print("window.location.href='index.jsp';");
       out.print("</script>");
	 }
	 else
	 {
        String sqlr="delete  from Guestbook where id=" + yid;
    try{
//out.print(sql);
          stmt.executeUpdate(sqlr);
         out.print("<script>");
         out.print("alert('删除成功!');");
         out.print("window.location.href='index.jsp';");
         out.print("</script>");
      }catch(Exception e){
       out.print("出错了!");
     }
	
   }
 	 }catch(Exception e)
     {
	  out.print("出错了!");
	 }
}
%>
<table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="22" align="center">CopyRight 2003-2005 &copy; 重庆杰诺软件版权所有 </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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