clubInfo.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:16k
- <%@ page language="java" contentType="text/html;charset=UTF-8" %>
- <%@ include file="../GVinc/gvInclude.jsp" %>
- <%@ include file="clubMasterPass.jsp" %>
- <jsp:useBean id="ci" scope="page" class="com.gamvan.club.ClubInfo" />
- <jsp:useBean id="ce" scope="request" class="com.gamvan.club.ClubInfoEdit"/>
- <jsp:useBean id="fo" scope="page" class="com.gamvan.tools.FileOperate" />
- <%
- boolean ispass = false;
- ArrayEdit ae2 = new ArrayEdit();
- ispass = ae2.txtsArray(gvcmgTxt,1,"|");
- if(!ispass){
- out.print(prtCenter("您无权进行此项操作!","",2));
- out.close();
- }
- //权限判断代码结束
- //out.print("23424");
- String clubName, clubUrl, clubTitle, clubMeta, clubSmtp, clubEmail, clubSmtpID, clubSmtpPass;
- String clubEmailSend, clubYear, clubUpfileExt, clubCopyRight;
- String clubSmtpPort = "";
- String clubUpfileDomain="";
- hm = null;
- hm = ci.clubInfoHashMap();
- clubName = ci.getClubInfo(hm,"clubName");
- clubUrl = ci.getClubInfo(hm,"clubUrl");
- clubTitle = ci.getClubInfo(hm,"clubTitle");
- clubMeta = ci.getClubInfo(hm,"clubMeta");
- clubEmail = ci.getClubInfo(hm,"clubEmail");
- clubEmailSend = ci.getClubInfo(hm,"clubEmailSend");
- clubSmtp = ci.getClubInfo(hm,"clubSmtp");
- clubSmtpID = ci.getClubInfo(hm,"clubSmtpID");
- clubSmtpPass = ci.getClubInfo(hm,"clubSmtpPass");
- clubUpfileExt = ci.getClubInfo(hm,"clubUpfileExt");
- clubCopyRight = ci.getClubInfo(hm,"clubCopyRight");
- clubCopyRight = clubCopyRight.replaceAll("&","&");
- clubYear = ci.getClubInfo(hm,"clubYear");
- clubSmtpPort = (ci.getClubInfo(hm,"clubSmtpPort"));
- clubUpfileDomain = ci.getClubInfo(hm,"clubUpfileDomain");
- int clubMenu=0, clubSmtpUsePass=0, clubUpfileOpen=0, clubUpfileUser=0
- , clubUpfileMax=0, clubUserPic=0;
- int clubSmtpSSL = 0;
- int clubRefreshPage = 900;
- int clubHotTopic=0, clubHotRe=0;
- //获取int类型数据
- clubUpfileOpen = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUpfileOpen"));
- clubUpfileUser = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUpfileUser"));
- clubUpfileMax = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUpfileMax"));
- clubMenu = TypeChange.stringToInt(ci.getClubInfo(hm,"clubMenu"));
- clubSmtpUsePass = TypeChange.stringToInt(ci.getClubInfo(hm,"clubSmtpUsePass"));
- clubUserPic = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUserPic"));
- clubSmtpSSL = TypeChange.stringToInt(ci.getClubInfo(hm,"clubSmtpSSL"));
- clubRefreshPage = TypeChange.stringToInt(ci.getClubInfo(hm,"clubRefreshPage"));
- clubHotTopic = TypeChange.stringToInt(ci.getClubInfo(hm,"clubHotTopic"));
- clubHotRe = TypeChange.stringToInt(ci.getClubInfo(hm,"clubHotRe"));
- //clubTopicIsPass = TypeChange.stringToBoolean(ci.getClubInfo(hm,"clubTopicIsPass"));
- if(request.getMethod().equals("POST")){
- clubName = request.getParameter("clubName");
- clubUrl = request.getParameter("clubUrl");
- clubTitle = request.getParameter("clubTitle");
- clubMeta = request.getParameter("clubMeta");
- clubSmtp = request.getParameter("clubSmtp");
- clubSmtpID = request.getParameter("clubSmtpID");
- clubSmtpPass = request.getParameter("clubSmtpPass");
- clubEmail = request.getParameter("clubEmail");
- clubEmailSend = request.getParameter("clubEmailSend");
- clubMenu = TypeChange.stringToInt(request.getParameter("clubMenu"));
- clubSmtpUsePass = TypeChange.stringToInt(request.getParameter("clubSmtpUsePass"));
- clubUpfileOpen = TypeChange.stringToInt(request.getParameter("clubUpfileOpen"));
- clubUpfileMax = TypeChange.stringToInt(request.getParameter("clubUpfileMax"));
- clubUpfileUser = TypeChange.stringToInt(request.getParameter("clubUpfileUser"));
- clubUpfileExt = request.getParameter("clubUpfileExt");
- clubCopyRight = request.getParameter("clubCopyRight");
- clubYear = request.getParameter("clubYear");
- clubUserPic = TypeChange.stringToInt(request.getParameter("clubUserPic"));
- clubSmtpPort = request.getParameter("clubSmtpPort");
- clubSmtpSSL = TypeChange.stringToInt(request.getParameter("clubSmtpSSL"));
- clubRefreshPage = TypeChange.stringToInt(request.getParameter("clubRefreshPage"));
- clubHotTopic = TypeChange.stringToInt(request.getParameter("clubHotTopic"));
- clubHotRe = TypeChange.stringToInt(request.getParameter("clubHotRe"));
- clubUpfileDomain = request.getParameter("clubUpfileDomain").trim();
- clubTopicIsPass = TypeChange.stringToBoolean(request.getParameter("clubTopicIsPass"));
- //if(clubUpfileDomain.lastIndexOf("/")!=-1){
- //clubUpfileDomain = clubUpfileDomain.substring(0,clubUpfileDomain.length()-1);
- //}
- ce.setClubMenu(clubMenu);
- ce.setClubName(clubName);
- ce.setClubUrl(clubUrl);
- ce.setClubTitle(clubTitle);
- ce.setClubMeta(clubMeta);
- ce.setClubSmtp(clubSmtp);
- ce.setClubSmtpID(clubSmtpID);
- ce.setClubSmtpPass(clubSmtpPass);
- ce.setClubEmail(clubEmail);
- ce.setClubEmailSend(clubEmailSend);
- ce.setClubSmtpUsePass(clubSmtpUsePass);
- ce.setClubUpfileOpen(clubUpfileOpen);
- ce.setClubUpfileMax(clubUpfileMax);
- ce.setClubUpfileUser(clubUpfileUser);
- ce.setClubUpfileExt(clubUpfileExt);
- ce.setClubCopyRight(clubCopyRight);
- ce.setClubYear(clubYear);
- ce.setClubUserPic(clubUserPic);
- ce.setClubSmtpPort(clubSmtpPort);
- //out.print(clubSmtpSSL);
- ce.setClubSmtpSSL(clubSmtpSSL);
- ce.setClubRefreshPage(clubRefreshPage);
- ce.setClubHotTopic(clubHotTopic);
- ce.setClubHotRe(clubHotRe);
- ce.setClubUpfileDomain(clubUpfileDomain);
- ce.setClubTopicIsPass(clubTopicIsPass);
- //out.print(clubHotTopic);
- ce.setClubInfoEdit();
- //out.print(ce.getMessage());
- //==================生成文件部分===========================
- String filePathAndName=request.getRealPath("") + File.separator+ "club" + File.separator+ "GVfilesInc" + File.separator+ "gvData.jsp"; //绝对路径
- String filePathAndName2=request.getRealPath("") + File.separator+ "club" + File.separator+ "GVfilesInc" + File.separator+ "gvData_GB2312.jsp"; //绝对路径
- StringBuffer fileContent=new StringBuffer("");
- StringBuffer fileContent1=new StringBuffer("");
- fileContent1.append("<");
- fileContent1.append("%@ page language="java" contentType="text/html;charset=UTF-8" errorPage="err.jsp"");
- fileContent1.append("%");
- fileContent1.append(">");//
- StringBuffer fileContent2=new StringBuffer("");
- fileContent2.append("<");
- fileContent2.append("%@ page language="java" contentType="text/html;charset=gb2312" errorPage="err.jsp"");
- fileContent2.append("%");
- fileContent2.append(">");//
- fileContent.append("<");
- fileContent.append("%r");
- fileContent.append("refreshPage="+ request.getParameter("clubRefreshPage") +";r");
- fileContent.append("clubName = ""+ request.getParameter("clubName") +"";r");
- fileContent.append("clubUrl = ""+ request.getParameter("clubUrl") +"";r");
- fileContent.append("clubTitle = ""+ request.getParameter("clubTitle") +"";r");
- fileContent.append("clubMeta = ""+ request.getParameter("clubMeta") +"";r");
- fileContent.append("clubEmail = ""+ request.getParameter("clubEmail") +"";r");
- fileContent.append("clubEmailSend = ""+ request.getParameter("clubEmailSend") +"";r");
- fileContent.append("clubSmtp = ""+ request.getParameter("clubSmtp") +"";r");
- fileContent.append("clubSmtpID = ""+ request.getParameter("clubSmtpID")+"";r");
- fileContent.append("clubSmtpPass = ""+ request.getParameter("clubSmtpPass")+"";r");
- fileContent.append("clubUpfileExt = ""+ request.getParameter("clubUpfileExt") +"";r");
- fileContent.append("clubCopyRight = ""+ request.getParameter("clubCopyRight") +"";r");
- fileContent.append("clubYear = ""+ request.getParameter("clubYear") +"";r");
- fileContent.append("clubUpfileOpen = "+ request.getParameter("clubUpfileOpen") +";r");
- fileContent.append("clubUpfileUser = "+ request.getParameter("clubUpfileUser") +";r");
- fileContent.append("clubUpfileMax = "+ request.getParameter("clubUpfileMax") +";r");
- fileContent.append("clubMenu = "+ request.getParameter("clubMenu") +";r");
- fileContent.append("clubSmtpUsePass = "+ request.getParameter("clubSmtpUsePass") +";r");
- fileContent.append("clubUserPic = "+ request.getParameter("clubUserPic")+";r");
- fileContent.append("clubSmtpSSL = "+ request.getParameter("clubSmtpSSL")+";r");
- fileContent.append("clubSmtpPort = ""+ request.getParameter("clubSmtpPort") +"";r");
- fileContent.append("clubHotTopic = "+ request.getParameter("clubHotTopic")+ ";r");
- fileContent.append("clubHotRe = "+ (request.getParameter("clubHotRe")) +";r");
- fileContent.append("clubUpfileDomain = ""+ (clubUpfileDomain) +"";r");
- fileContent.append("clubTopicIsPass = "+ (clubTopicIsPass) +";r");
- fileContent.append("Gb clubgb = new Gb();r ");//
- fileContent.append("EncodeString es = new EncodeString();r");//
- fileContent.append("ArrayEdit ae = new ArrayEdit();r");//
- fileContent.append("%");
- fileContent.append(">");//
-
- fo.createFile(filePathAndName,fileContent1.toString()+fileContent.toString(),"UTF-8");
- fo.createFile(filePathAndName2,fileContent2.toString()+fileContent.toString(),"gb2312");
-
- out.print(prtCenter2(ce.getMessage(),"./clubInfo.jsp",1));
- out.close();
- return;
- }
- %>
- <html>
- <head>
- <title>今晚在线-社区管理</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="css.css" rel="stylesheet" type="text/css">
- <style type="text/css">
- <!--
- .style1 {color: #999999}
- -->
- </style>
- </head>
- <body>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#e6e6e6">
- <tr>
- <td align="center"><strong>配置社区基本信息</strong></td>
- </tr>
- </table>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#e6e6e6">
- <form name="form1" method="post" action=""><tr bgcolor="#f6f6f6">
- <td width="150" height="22" bgcolor="#f6f6f6"><strong>社区名称</strong></td>
- <td>
- <input name="clubName" type="text" id="clubName" value="<%=clubName%>" size="30" maxlength="30">
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="1" bgcolor="#f6f6f6"><strong>访问网址</strong></td>
- <td><input name="clubUrl" type="text" id="clubUrl" value="<%=clubUrl%>" size="30" maxlength="50"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="2" bgcolor="#f6f6f6"><strong>Title网页标题</strong></td>
- <td><input name="clubTitle" type="text" id="clubTitle" value="<%=clubTitle%>" size="30"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="5" bgcolor="#f6f6f6"><strong>META关键词</strong></td>
- <td><input name="clubMeta" type="text" id="clubMeta" value="<%=clubMeta%>" size="30"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>邮件SMTP服务器</strong></td>
- <td><input name="clubSmtp" type="text" id="clubSmtp" value="<%=clubSmtp%>" size="30" maxlength="50"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>SMTP身份验证</strong></td>
- <td>
- <input type="radio" name="clubSmtpUsePass" value="0" <% if(clubSmtpUsePass==0){out.print("checked");}%>>不需要
-
- <input type="radio" name="clubSmtpUsePass" value="1" <% if(clubSmtpUsePass==1){out.print("checked");}%>>需要</td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>系统信件Email</strong></td>
- <td><input name="clubEmail" type="text" id="clubEmail" value="<%=clubEmail%>" size="30" maxlength="50"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>系统信件用户名</strong></td>
- <td><input name="clubEmailSend" type="text" id="clubEmailSend" value="<%=clubEmailSend%>" size="30" maxlength="50"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP登陆ID</strong></td>
- <td><input name="clubSmtpID" type="text" id="clubSmtpID" value="<%=clubSmtpID%>" size="30" maxlength="50"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP登陆密码</strong></td>
- <td>
- <input name="clubSmtpPass" type="text" id="clubSmtpPass" value="<%=clubSmtpPass%>" size="30" maxlength="50">
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP端口</strong></td>
- <td>
- <input name="clubSmtpPort" type="text" id="clubSmtpPort" value="<%=clubSmtpPort%>" size="30" maxlength="50">无端口号请置空
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP是否需要SSL</strong></td>
- <td>
- <input name="clubSmtpSSL" type="radio" value="0" <% if(clubSmtpSSL==0){out.print("checked");}%> >默认关闭
-
- <input name="clubSmtpSSL" type="radio" value="1" <% if(clubSmtpSSL==1){out.print("checked");}%> >默认打开
- (目前Gmail的SMTP服务是需要SSL验证的)</td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>社区左侧菜单</strong></td>
- <td>
- <input name="clubMenu" type="radio" value="0" <% if(clubMenu==0){out.print("checked");}%> >默认关闭
-
- <input type="radio" name="clubMenu" value="1" <% if(clubMenu==1){out.print("checked");}%> >默认打开
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="10" bgcolor="#f6f6f6"><strong>社区上传</strong></td>
- <td>
- <input type="radio" name="clubUpfileOpen" value="0" <% if(clubUpfileOpen==0){out.print("checked");}%> >关闭
-
- <input type="radio" name="clubUpfileOpen" value="1" <% if(clubUpfileOpen==1){out.print("checked");}%> >开通
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="10" bgcolor="#f6f6f6"><strong>个人形象上传</strong></td>
- <td>
- <input type="radio" name="clubUserPic" value="0" <% if(clubUserPic==0){out.print("checked");}%> >关闭
-
- <input type="radio" name="clubUserPic" value="1" <% if(clubUserPic==1){out.print("checked");}%> >开通
- </td>
- <tr bgcolor="#f6f6f6">
- <td height="10" bgcolor="#f6f6f6"><strong>是否开启帖子审核机制</strong></td>
- <td>
- <input type="radio" name="clubTopicIsPass" value="false" <% if(!clubTopicIsPass){out.print("checked");}%> >开启
-
- <input type="radio" name="clubTopicIsPass" value="true" <% if(clubTopicIsPass){out.print("checked");}%> >不开启
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="11" bgcolor="#f6f6f6"><strong>最大上传</strong></td>
- <td><input name="clubUpfileMax" type="text" id="clubUpfileMax" value="<%=clubUpfileMax%>" size="20">
- (单位 Kb)</td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>默认的用户上传空间</strong></td>
- <td><input name="clubUpfileUser" type="text" id="clubUpfileUser" value="<%=clubUpfileUser%>" size="20">(单位 Kb)
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6">
- <p><strong>允许的上传类型</strong><br><span class="style1">只需填入文件扩展名 </span></p>
- </td>
- <td><textarea name="clubUpfileExt" cols="50" rows="2" id="clubUpfileExt"><%=clubUpfileExt%></textarea></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>访问上传文件的域名</strong></td>
- <td>
- <input name="clubUpfileDomain" type="text" id="clubUpfileDomain" value="<%=clubUpfileDomain%>" size="50">
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6">热贴</td>
- <td>
- 浏览大于登陆<input name="clubHotTopic" type="text" id="clubHotTopic" value="<%=clubHotTopic%>" size="3">
-
- 回复大于等于<input name="clubHotRe" type="text" id="clubHotRe" value="<%=clubHotRe%>" size="3">
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>版权归属</strong></td>
- <td><textarea name="clubCopyRight" cols="50" rows="2" id="clubCopyRight"><%=clubCopyRight%></textarea></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>软件版本</strong></td>
- <td><input name="clubYear" type="text" id="clubYear" value="<%=clubYear%>" size="10" maxlength="10">
- 输入软件版本号,如:3.0
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>默认刷新时间</strong></td>
- <td><input name="clubRefreshPage" type="text" id="clubRefreshPage" value="<%=clubRefreshPage%>" size="10" maxlength="10">
- 单位秒</td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"> </td>
- <td><input name="gvSubmit" type="submit" id="gvSubmit" value="确定更新"></td>
- </tr></form></table>
- </body>
- </html>