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

📄 manage.jsp

📁 jsp设计的留言板,供大家参考,使用的是文本文件作为数据库
💻 JSP
字号:
<%@ page contentType="text/html; charset=Big5" %>
<%@ page import="bookutil.BookTools" %>
<html>
<head>
<title>
manage
</title>
<script src=../convert.js></script>
<script>
function delCheck(fm)
    {
      var str_del = fm.id.value;
      if(isSpace(str_del))
      {
        alert("Enter the number or numbers split with ',' !");
        fm.id.focus();
        return false;
      }
      else
      {
        var patrn = /^\d+(|,\d+)*$/;
        if(!patrn.exec(str_del))
        {
          alert("Enter the number or numbers split with ',' !");
          fm.id.focus();
          return false;
        }
      }
      return true;
    }
function repCheck(fm)
    {
      var str_rep = fm.reply.value;
      var str_id = fm.id.value;
      if(isSpace(str_id))
      {
        alert("Enter your reply id !");
        fm.id.focus();
        return false;
      }
      else
      {
        var patrn = /^\d+$/
        if(!patrn.exec(str_id))
        {
          alert("Enter the proper id you want to reply to !");
          fm.id.focus();
          return false;
        }
      }
      if(isSpace(str_rep))
      {
        alert("Enter your reply words !");
        fm.reply.focus();
        return false;
      }
      else
      {
        fm.reply.value = convert(str_rep);
      }
      return true;
    }
function modCheck(fm)
    {
      var str_name = fm.master_name.value;
      var str_psw = fm.master_psw.value;
      if(isSpace(str_name) || isSpace(str_psw))
      {
        alert("Please enter your name and password !");
        fm.master_name.focus();
        return false;
       }
       else
       {
	     fm.master_name.value = convert(str_name);
		 fm.master_psw.value = convert(str_psw);
       }
       return true;
    }
</script>
</head>
<body bgcolor="#ffffff">
<h1>
Manage
</h1><a href="../disp.beyondplus">displaylist</a>
<%
BookTools bt = new BookTools();
String name = bt.elicitCookie(request,"master").toString();
if(name == null || name.length() == 0){
  out.println("<script>window.location=\"masterlogin.jsp\"</script>");
  return;}
%>
<!--/////////////////// Delete Massage /////////////////////////-->
<hr align="left" width="60%">
Delete Massage&nbsp;&gt;&gt;
<form method="post" name=del_form action="../manage.beyondplus" onsubmit="return delCheck(this);">
<br>
Please enter ID that you want to delete:<input type="text" name="id">
<br><br>(Split id with "," then you can delete more once ! )<br><br>
<input type="submit" name="smdelete" value="Submit">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="Reset">
</form>
<!--/////////////////// Reply Massage /////////////////////////-->
<hr align="left" width="60%">
Reply Massage&nbsp;&gt;&gt;
<form method="post" name=rep_form action="../manage.beyondplus" onsubmit="return repCheck(this);">
<br>
Please enter ID that you want to reply:<input type="text" name="id">
<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Please enter reply words:<textarea  name="reply" style="width=200"></textarea>
<br><br>
<input type="submit" name="smreply" value="Submit">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="Reset">
</form>
<!--/////////////////// Modify Master /////////////////////////-->
<hr align="left" width="60%">
Modify Master&nbsp;&gt;&gt;
<form method="post" name=mod_form action="../manage.beyondplus" onsubmit="return modCheck(this);">
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Please modify your login name:<input type="text" name="master_name" maxlength="12" value="<%=name%>">
<br>
Please modify your login password:<input type="password" name="master_psw" maxlength="12" value="********">
<br><br>
<input type="submit" name="smmodify" value="Submit">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="Reset">
</form>
</body>
</html>

⌨️ 快捷键说明

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