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

📄 admincenter.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/        凌云论坛支持信箱    #**
**#                                                                #**
**##################################################################*/
%>
<%@ include file="config.jsp"%>
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="../include/connect.jsp"%>
<%
int lastfoldindex=0;
String admindir="",installdir="";
boolean installdirex=true;
admindir=connect.ReplaceChar(request.getRealPath("/"),'\\','/');
lastfoldindex=admindir.lastIndexOf("/");
installdir=admindir.substring(0,lastfoldindex)+"/install";
File dir=new File(installdir);
File file1=new File(installdir+"/install.jsp");
File file2=new File(installdir+"/initdatabase.jsp");
File file3=new File(installdir+"/initstyle.jsp");
File file4=new File(installdir+"/initstyle2.jsp");
installdirex=dir.exists();
if(installdirex) {
%>
<HTML>
<HEAD><TITLE>安装错误</TITLE></HEAD>
<BODY BGCOLOR=#ffffff TEXT=#000000>
<%
  boolean filecanwrite=false;
  filecanwrite=dir.canWrite();
  if(filecanwrite) {
   try {
    file1.delete();
    file2.delete();
    file3.delete();
    file4.delete();
    if(dir.delete()) {
%>
提示:install文件夹删除成功!请重新刷新本页面!<br>
<%
    }
    else {
%>
提示:install文件夹删除失败!没有删除权限,请您立即ftp到服务器,手工删除掉install文件夹!<br>
切记:install文件夹留在服务器上将严重威胁您服务器的安全。您目前不能进入管理中心!<br>
<%
    }
   }
   catch(Exception e) {
      out.print("文件删除出错,请手动ftp删除文件!");
   }
  }
  else {
%>
提示:程序无法自动删除掉服务器上的install文件夹!如果您已经手工删除掉该文件夹,请刷新本页面!<br>
<%
  }
%>
 <H1>LyBBS 错误</H1>
 <FONT COLOR=#ff0000><B>安全警告</B>:
 <br>install 文件夹仍然在您的服务器上,请马上利用 FTP 来将其删除!!
 <br> 当你删除之后,刷新本页面重新进入管理中心。</FONT>
</body>
</html>
<%
return;
}
int number=0,allregisternumber=0,allreplynumber=0,allpostnumber=0;
String action="",tempSTR="";
tempSTR=request.getParameter("action");
if(tempSTR!=null && !tempSTR.equals(""))
  action=tempSTR;
%>
<!--//html from here-->
<%@ include file="boardprepare.jsp"%>
<%@ include file="head.jsp"%>
<body bgcolor="#555555" topmargin=5 leftmargin=5>
<table width=95% cellpadding=0 cellspacing=1 border=0 bgcolor=#000000 align=center>
 <tr>
  <td>
  <table width=100% cellpadding=0 cellspacing=1 border=0>
   <tr>
    <td width=28% valign=top bgcolor=#FFFFFF>
    <%@ include file="left.jsp"%>
  </td>
  <td width=70% valign=top bgcolor=#FFFFFF>
   <table width=100% cellpadding=6 cellspacing=0 border=0>
<%
if(action.equals("logout")) {
%>
<%@ include file="../include/delcookie.jsp"%>
    <tr>
     <td bgcolor="#333333">
      <font face=宋体 color=#FFFFFF><b>您已经成功退出了 LyBBS 论坛管理中心</b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=#EEEEEE valign=middle align=center>
      <font face=宋体 color=#333333><b>您已经成功退出了管理</b></font>
     </td>
    </tr>
<%
}
else if(action.equals("login")) {
  String supername="",superpassword="";
  tempSTR=request.getParameter("supername");
  if(tempSTR!=null && !tempSTR.equals(""))
    supername=togb.equals("1")?connect.toGB(tempSTR):tempSTR;
  tempSTR=request.getParameter("superpassword");
  if(tempSTR!=null && !tempSTR.equals(""))
    superpassword=togb.equals("1")?connect.toGB(tempSTR):tempSTR;
  number=connect.getRowNum("author where username='"+supername+"' and password='"+superpassword+"' and usermode=4");
  if(number>0) {
    rs=connect.executeQuery("select id from author where username='"+supername+"' and password='"+superpassword+"' and usermode=4");
    if(rs.next())
      cookieid=String.valueOf(rs.getInt(1));
    cookiename=supername;
    cookiemode="4";
%>
    <%@ include file="../include/setcookie.jsp"%>
<%
    allregisternumber=connect.getRowNum("author where usermode!=1");
    allpostnumber=connect.getRowNum("posts where parentid=0");
    allreplynumber=connect.getRowNum("posts where parentid!=0");
%>
    <tr>
     <td bgcolor=#333333">
      <font face=宋体 color=#FFFFFF><b>欢迎来到论坛管理中心</b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=#EEEEEE valign=middle align=center>
      <font face=宋体 color=#333333><b>欢迎 <%=cookiename%></b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF></td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF valign=middle align=left>
      <font face=宋体 color=#000000>
       <center><br>服务器时间:<b><%=now_time%></b><br></center>
       <hr>
       <p>
       <b>论坛数据摘要</b><br><br>
       <br>注册用户数:<%=allregisternumber%> 人
       <br>总发表主题:<%=allpostnumber%> 篇
       <br>总发表回复:<%=allreplynumber%> 篇<br><br>
       <br>注册用户平均发表主题数:<%=allpostnumber/allregisternumber%> 篇
       <br>注册用户平均回复主题数:<%=allreplynumber/allregisternumber%> 篇
       <br><br><br>
       程序制作:<a href="mailto:<%=programemail%>"><%=programmer%></a><BR>
       版权所有:<a href="<%=support%>"><%=title%></a>
      </font>
     </td>
    </tr>
<%
  }
  else {
%>
    <tr>
     <td bgcolor=#333333">
      <font face=宋体 color=#FFFFFF><b>登陆失败</b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=#EEEEEE valign=middle align=center>
      <font face=宋体 color=#333333><b>用户名和密码不正确!</b></font>
     </td>
    </tr>
<%
  }
}
else if(cookiemode.equals("4")) {
    allregisternumber=connect.getRowNum("author where usermode!=1");
    allpostnumber=connect.getRowNum("posts where parentid=0");
    allreplynumber=connect.getRowNum("posts where parentid!=0");
%>
    <tr>
     <td bgcolor=#333333">
      <font face=宋体 color=#FFFFFF><b>欢迎来到论坛管理中心</b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=#EEEEEE valign=middle align=center>
      <font face=宋体 color=#333333><b>欢迎 <%=cookiename%></b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF></td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF valign=middle align=left>
      <font face=宋体 color=#000000>
       <center><br>服务器时间:<b><%=now_time%></b><br></center>
       <hr>
       <p>
       <b>论坛数据摘要</b><br><br>
       <br>注册用户数:<%=allregisternumber%> 人
       <br>总发表主题:<%=allpostnumber%> 篇
       <br>总发表回复:<%=allreplynumber%> 篇<br><br>
       <br>注册用户平均发表主题数:<%=allpostnumber/allregisternumber%> 篇
       <br>注册用户平均回复主题数:<%=allreplynumber/allregisternumber%> 篇
       <br><br><br>
       程序制作:<a href="mailto:<%=programemail%>"><%=programmer%></a><BR>
       版权所有:<a href="<%=support%>"><%=title%></a>
      </font>
     </td>
    </tr>
<%
}
else {
%>
    <form action="admincenter.jsp" method="post">
    <input type=hidden name="action" value="login">
    <tr>
     <td bgcolor="#333333" colspan=2><font face=宋体 color=#FFFFFF>
      <b>欢迎来到 LyBBS 论坛管理中心</b>
     </td>
    </tr>
    <tr>
     <td bgcolor=#EEEEEE valign=middle colspan=2 align=center>
      <font face=宋体 color=#333333><b>请输入您的用户名、密码登陆</b></font>
     </td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF valign=middle width=40% align=right>
      <font face=宋体 color=#555555>请输入您的用户名</font>
     </td>
     <td bgcolor=#FFFFFF valign=middle>
      <input type=text name="supername" maxlength=15>
     </td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF valign=middle width=40% align=right>
      <font face=宋体 color=#555555>请输入您的密码</font>
     </td>
     <td bgcolor=#FFFFFF valign=middle>
      <input type=password name="superpassword" maxlength=20>
     </td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF valign=middle colspan=2 align=center>
      <input type=submit name="submit" value="登 陆">
     </td>
    </tr>
    <tr>
     <td bgcolor=#FFFFFF valign=middle align=left colspan=2>
      <font face=宋体 color=#555555>
       <blockquote><b>请注意</b>
        <p><b>只有论坛的坛主才能登陆论坛管理中心。<br>未经过授权的尝试登陆行为将会被记录在案!</b>
        <p>在进入论坛管理中心前,请确定你的浏览器打开了 Cookie 选项。
        <br> Cookie 只会存在于当前的浏览器进程中。为了安全起见,当你关闭了浏览器后,Cookie 会失效并被自动删除。
       </blockquote>
      </font>
     </td>
    </tr>
    </form>
<%
}
%>
   </table>
  </td>
 </tr>
</table>
  </td>
 </tr>
</table>
<%
rs.close();
connect.close();
%>
</body>
</html>

⌨️ 快捷键说明

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