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

📄 postedit.jsp

📁 jsp bbs源代码
💻 JSP
字号:
<%
/*##################################################################**
**#  LyBBS ver 1.2.b2 (1.2.beta-2版) / 凌云论坛 ver 1.2.b2         #**
**#                                                                #**
**#  版权所有: 凌云工作室 (原流星电脑工作室)                       #**
**#                                                                #**
**#  制作人  : 星语凌 『teddy (Yongshan Ye)』                      #**
**#                                                                #**
**#  主页地址: http://www.unix-now.com/lybbs   凌云论坛主页        #**
**#            http://www.ierp.info/lybbs      凌云论坛镜像站      #**
**#            http://horseye@sina.com/        凌云论坛支持信箱    #**
**#                                                                #**
**##################################################################*/
%>
<%
boolean isauthor=false;
if(!postauthor.equals("") && !postauthor.equals("客人") && postauthor.equals(cookiename))
  isauthor=true;
else
  isauthor=false;
if(topic==0)
  response.sendRedirect("errorPage.jsp");
if(!isauthor)
  errorinfo="只有注册用户可以修改并只可以修改自己发表的帖子!";
else if(!postcontent.equals("")) {
  rs=connect.executeQuery("select orderby from posts where id="+postid);
  if(rs.next())
    orderby=rs.getInt(1);
  rs=connect.executeQuery("select max(orderby) from posts where db="+db);
  if(rs.next())
    maxorderby=rs.getInt(1);
  if(maxorderby>orderby) {
    orderby=maxorderby+1;
  }
  if(orderby>maxorderby)
    connect.executeUpdate("update posts set orderby="+orderby+" where db="+db+" and groupid="+topic);
  postok=connect.executeUpdate("update posts set title='"+posttitle+"',content='"+postcontent+"',postat=now(),ipfrom='"+postipfrom+"',titleimage='"+posticon+"' where id="+postid);
}
else
  errorinfo="必须输入内容!";
%>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebordercolor%> align=center>
 <tr>
  <td>
   <table cellpadding=6 cellspacing=1 border=0 width=100%>
    <tr>
     <td bgcolor=<%=miscbacktwo%> align=center>
      <font color=<%=fontcolormisc%>><b>
<%
if(postok) {
    out.println("谢谢,"+cookiename+"!您的帖子已经修改成功!");
}
else {
    out.println("错误: 修改帖子!");
}
%>
      </b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=<%=miscbackone%>>
      <font color=<%=fontcolormisc%>>
<%
if(postok) {
%>
        如果浏览器没有自动返回,请点击下面的链接!
        <ul>
         <li><a href="topic.jsp?db=<%=db%>&topic=<%=topic%>">返回修改帖</a>
         <li><a href="db.jsp?db=<%=db%>">返回论坛</a>
         <li><a href="index.jsp">返回论坛首页</a>
         <li><a href="postings.jsp?action=lock&db=<%=db%>&topic=<%=topic%>&checked=yes">锁定贴子</a>
        </ul>
        <meta http-equiv="refresh" content="3; url=db.jsp?db=<%=db%>">
<%
}
else {
%>
        <b>关于发表新回复错误的详细原因:</b>
        <ul>
         <li><b><%=errorinfo%></b>
         <li>您是否需要查看<a href="javascript:openScript('help.jsp',500,400)">帮助文件</a>?
        </ul>
        <b>产生发表新回复错误的可能原因:</b>
        <ul>
         <li>密码错误
         <li>用户名错误
         <li>您不是<a href="register.jsp" >注册</a>用户
        </ul>
        <br><br>
        <center> << <a href="javascript:history.go(-1)">返回上一页</a></center>
<%
}
%>
      </font>
     </td>
    </tr>
   </table>
  </td>
 </tr>
</table>

⌨️ 快捷键说明

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