?? del.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 © 重慶杰諾軟件版權所有 </td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -