?? info_delt.jsp
字號:
<%@ page contentType="text/html;charset=gb2312" %>
<%@include file="InfoComm.jsp"%>
<%
String userid,passwd;
// 從session中取用戶名和密碼
userid = (String)session.getValue("user_id");
passwd = (String)session.getValue("passwd");
// 只有系統用戶才可以有權限
if(IsUser(userid,passwd))
{
%>
<%!
String strid="",sCateid;
int cateid;
String url_mng;
%>
<html><%
try
{
url_mng = "InfoAdmin.jsp";
strid = request.getParameter("strid");
int lstr = strid.length();
if(strid.substring(lstr-1,lstr).equals(","))
strid = strid.substring(0,lstr-1);
if(strid==null)
{
%>
<script language=javascript>
alert("選擇要刪除的信息!");
history.go(-1);
</script>
<%
}
else
{
Information o_Info = new Information();
// 如果為管理員則直接刪除
if(getType(userid)==2)
o_Info.DeleteInformation(strid);
// 否則判斷是否為此用戶創建的信息
else if(getType(userid)==1)
o_Info.DeleteInformation(strid,userid);
response.sendRedirect(url_mng);
}
}catch(Exception e)
{ System.out.println(e.toString());}
%>
</html>
<%}
else
out.println("你沒有刪除的權限");
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -