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

📄 config_m.jsp

📁 这是论坛原代码,希望大家能好好看看,说明需要的太多了吧
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page import="java.util.Enumeration"%>
<%@ page import="cn.js.fan.util.*"%>
<%@ page import="cn.js.fan.web.*"%>
<%@ page import="java.util.*"%>
<%@ page import="org.jdom.*"%>
<%@ page import="org.jdom.Element"%>
<%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
<jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
<title><lt:Label res="res.label.cms.config" key="config_mgr"/></title>
<%@ include file="../inc/nocache.jsp" %>
<LINK href="default.css" type=text/css rel=stylesheet>
<script>
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
}
.STYLE1 {color: #FF0000}
-->
</style>
<body bgcolor="#FFFFFF">
<jsp:useBean id="cfgparser" scope="page" class="cn.js.fan.util.CFGParser"/>
<jsp:useBean id="myconfig" scope="page" class="com.redmoon.forum.Config"/>
<jsp:useBean id="privilege" scope="page" class="cn.js.fan.module.pvg.Privilege"/>
<%
String priv = "admin";
if (!privilege.isUserPrivValid(request,priv)) {
    out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
	return;
}
%>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
  <TBODY>
    <TR>
      <TD class=head><lt:Label res="res.label.cms.config" key="config_mgr"/></TD>
    </TR>
  </TBODY>
</TABLE>
<br>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe" style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" >
  <tr> 
    <td width="100%" height="23" class="thead"><lt:Label res="res.label.cms.config" key="config_mgr"/></td>
  </tr>
  <tr class=row style="BACKGROUND-COLOR: #fafafa"> 
    <td valign="top" bgcolor="#FFFFFF">
<%
XMLConfig cfg = new XMLConfig("config_cws.xml", false, "gb2312");
String op = ParamUtil.get(request, "op");
if (op.equals("setup")) {
	Enumeration e = request.getParameterNames();
	while (e.hasMoreElements()) {
		String fieldName = (String)e.nextElement();
		if (fieldName.startsWith("Application") || fieldName.startsWith("i18n")) {
			String value = ParamUtil.get(request, fieldName);
			cfg.set(fieldName, value);
		}
		if (fieldName.equals("locale")) {
			String value = ParamUtil.get(request, fieldName);
			String[] ary = StrUtil.split(value, "_");
			if (ary!=null) {
				cfg.set("i18n.lang", ary[0]);
				cfg.set("i18n.country", ary[1]);
			}
		}
	}
	cfg.writemodify();
	Global.init();
	out.print(StrUtil.Alert_Redirect(SkinUtil.LoadString(request,"info_op_success"), "config_m.jsp"));
	return;
}
%>
<table cellpadding="6" cellspacing="0" border="0" width="100%">
<tr>
<td width="1%" valign="top"></td>
<td width="100%" align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0">
	<form name=form1 action="?op=setup" method=post>
      
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="server"/></td>
        <td align="left"><input name="Application.server" value="<%=Global.server%>"/></td>
      </tr>
      
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="port"/></td>
        <td align="left"><input name="Application.port" value="<%=Global.port%>"/></td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="app_name"/></td>
        <td align="left">
          <input type="text" name="Application.name" value="<%=Global.AppName%>"/>&nbsp;</td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="title"/></td>
        <td align="left"><input type="text" name="Application.title" value="<%=Global.title%>"/></td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="desc"/></td>
        <td align="left"><input type="text" name="Application.desc" value="<%=Global.desc%>"/>
          ( <lt:Label res="res.label.cms.config" key="desc_rss"/> )</td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="virtual_path"/></td>
        <td align="left"><input type="text" name="Application.virtualPath" value="<%=Global.virtualPath%>"/></td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="real_Path"/></td>
        <td align="left"><input type="text" name="Application.realPath" value="<%=Global.getRealPath()%>"/>
        ( <lt:Label res="res.label.cms.config" key="use_character"/> )</td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="contact"/></td>
        <td align="left"><input type="text" name="Application.contact" value="<%=StrUtil.toHtml(Global.contact)%>"/></td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="if_has_blog"/></td>
        <td align="left"><select name="Application.hasBlog">
            <option value="true"><lt:Label res="res.label.cms.config" key="yes"/></option>
            <option value="false"><lt:Label res="res.label.cms.config" key="no"/></option>
          </select>
            <script>
		var obj = findObj("Application.hasBlog");
		obj.value = "<%=Global.hasBlog?"true":"false"%>";
		</script>        </td>
      </tr>
      <tr>
        <td height="24" align="right"><lt:Label res="res.label.cms.config" key="bak_path"/></td>

⌨️ 快捷键说明

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