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

📄 adminsetting.jsp

📁 主要功能: 支持UBB; 屏蔽HTML; 加入表情; 发言
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.tiandinet.HiMessage.Conf" %>

<%
	String errorInfo = (String)request.getAttribute("errorInfo");
	
	Conf conf = (Conf)request.getAttribute("conf");
	
	int pageShow = (conf.getPageshow()).intValue();
	String title = conf.getTitle();
	int showIp = (conf.getShowIp()).intValue();
	
	String showIpChecked = "";
	if (showIp == 1) {
		showIpChecked = " checked";
	}
	
	String adminServletURL = response.encodeURL("AdminServlet");
	String indexServletURL = response.encodeURL("IndexServlet");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Setting - <%=title%></title>
    <link href="css_js/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">  
<%
	if (errorInfo != null && !errorInfo.equals("")) {
		out.println("alert('" + errorInfo + "');");
	}  
%>

	function confFormCheck()
	{
		var f = document.confForm;
		if (f.title.value == "")
		{
			alert("Please enter Site Title!");
			return false;
		}
		
		if (f.pageshow.value == "")
		{
			alert("Please enter Message shown per Page!");
			return false;
		}
		
		return true;
	}
	
	function passwordFormCheck()
	{
		var f = document.passwordForm;
		
		if (f.old_psw.value == "")
		{
			alert("Please enter Old Password!");
			return false;
		}
		
		if (f.psw.value == "")
		{
			alert("Please enter New Password!");
			return false;
		}
		
		if (f.confirm_psw.value != f.psw.value)
		{
			alert("Invalid Confirm Password!");
			return false;
		}
		
		return true;
	}

</script>
  </head>
  
<body>
<a name="top" />
<div id="mainDiv">
	<div id="titleDiv">
		<div id="titleImageDiv">
			<img src="images/title.gif" border="0" width="234" height="88" />
		</div>
		<div id="poweredByDiv"><br /><img src="images/tiandinet.com.gif" border="0" width="140" height="65" /></div>
	</div>
	<div id="navBarDiv"><a href="<%=indexServletURL%>">Back</a>&nbsp;&nbsp;</div>
	<div id="messagesDiv">

<table width="100%"  border="0" cellspacing="5" cellpadding="5">
  <tr>
    <td align="center"><form name="confForm" id="confForm" method="post" action="<%=adminServletURL%>" onsubmit="return confFormCheck();">
      <table width="60%"  border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td colspan="2"><strong>System Setting</strong></td>
          </tr>
        <tr>
          <td height="2" colspan="2" bgcolor="#BCAE79"></td>
          </tr>
        <tr>
          <td width="35%" height="25" align="right">Site Title </td>
          <td width="65%" height="25" align="left">&nbsp;&nbsp;<input name="title" type="text" id="title" value="<%=title%>" /></td>
        </tr>
        <tr>
          <td width="35%" height="25" align="right">Message shown per Page </td>
          <td width="65%" height="25" align="left">&nbsp;&nbsp;<input name="pageshow" type="text" id="pageshow" maxlength="3" value="<%=pageShow%>" /></td>
        </tr>
        <tr>
          <td width="35%" height="25" align="right">Show IP Address </td>
          <td width="65%" height="25" align="left">&nbsp;&nbsp;<input name="show_ip" type="checkbox" id="show_ip" value="yes"<%=showIpChecked%> /></td>
        </tr>
        <tr>
          <td width="35%" align="right">&nbsp;</td>
          <td width="65%" align="left">&nbsp;</td>
        </tr>
        <tr>
          <td width="35%" align="right"><input name="action" type="hidden" id="action" value="updateConf" /></td>
          <td width="65%" align="center"><input type="submit" name="Submit" /> &nbsp; <input type="button" value="Back" onclick="JavaScript:window.location.href='<%=indexServletURL%>';" /></td>
        </tr>
      </table>
    </form></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><form name="passwordForm" id="passwordForm" method="post" action="<%=adminServletURL%>" onsubmit="return passwordFormCheck();">
      <table width="60%"  border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td height="25" colspan="2"><strong>Change Password </strong></td>
        </tr>
        <tr>
          <td height="2" colspan="2" bgcolor="#BCAE79"></td>
          </tr>
        <tr>
          <td width="35%" height="25" align="right">Username </td>
          <td width="65%" height="25" align="left">&nbsp;&nbsp;<input name="username" type="text" id="username" /></td>
        </tr>
        <tr>
          <td width="35%" height="25" align="right">Old Password </td>
          <td width="65%" height="25" align="left">&nbsp;&nbsp;<input name="old_psw" type="password" id="old_psw" /></td>
        </tr>
        <tr>
          <td width="35%" height="25" align="right">New Password </td>
          <td width="65%" height="25" align="left">&nbsp;&nbsp;<input name="psw" type="password" id="psw" /></td>
        </tr>
        <tr>
          <td width="35%" height="25" align="right">Confirm Password </td>
          <td width="65%" height="25" align="left">&nbsp;&nbsp;<input name="confirm_psw" type="password" id="confirm_psw" /></td>
        </tr>
        <tr>
          <td width="35%" align="right">&nbsp;</td>
          <td width="65%" align="left">&nbsp;</td>
        </tr>
        <tr>
          <td width="35%" align="right"><input name="action" type="hidden" id="action" value="updatePassword" /></td>
          <td width="65%" align="center"><input type="submit" name="Submit2" /> &nbsp; <input type="button" value="Back" onclick="JavaScript:window.location.href='<%=indexServletURL%>';" /></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>

	</div>
	<div id="bottomNavBarDiv">&nbsp;</div>
	<div id="copyrightDiv">
		<div id="copyrightFontDiv">&nbsp;&copy;&nbsp;Since&nbsp;2003&nbsp;<a href="http://www.tiandinet.com" target="_blank">天地网络</a>&nbsp;All&nbsp;Rights&nbsp;Reserved&nbsp;&nbsp;<strong>Powered</strong>&nbsp;by&nbsp;<a href="mailto:tiandinet_support@hotmail.com">Tiandi</a></div>
		<div id="hibernateLog"><a href="http://www.hibernate.org" target="_blank"><img src="images/hibernate.gif" border="0" width="226" height="40" /></a></div>
	</div>
</div>
</body>
</html>

⌨️ 快捷键说明

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