clubInfo.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:16k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. <%@ page language="java" contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="../GVinc/gvInclude.jsp" %>
  3. <%@ include file="clubMasterPass.jsp" %>
  4. <jsp:useBean id="ci" scope="page" class="com.gamvan.club.ClubInfo" />
  5. <jsp:useBean id="ce" scope="request" class="com.gamvan.club.ClubInfoEdit"/>
  6. <jsp:useBean id="fo" scope="page" class="com.gamvan.tools.FileOperate" />
  7. <% 
  8. boolean ispass = false;
  9. ArrayEdit ae2 = new ArrayEdit();
  10. ispass = ae2.txtsArray(gvcmgTxt,1,"|");
  11. if(!ispass){
  12. out.print(prtCenter("您无权进行此项操作!","",2));
  13. out.close();
  14. }
  15. //权限判断代码结束
  16. //out.print("23424");
  17. String clubName, clubUrl, clubTitle, clubMeta, clubSmtp, clubEmail, clubSmtpID, clubSmtpPass;
  18. String clubEmailSend, clubYear, clubUpfileExt, clubCopyRight;
  19. String clubSmtpPort = "";
  20. String clubUpfileDomain="";
  21. hm = null;
  22. hm = ci.clubInfoHashMap();
  23. clubName = ci.getClubInfo(hm,"clubName");
  24. clubUrl = ci.getClubInfo(hm,"clubUrl");
  25. clubTitle = ci.getClubInfo(hm,"clubTitle");
  26. clubMeta = ci.getClubInfo(hm,"clubMeta");
  27. clubEmail = ci.getClubInfo(hm,"clubEmail");
  28. clubEmailSend = ci.getClubInfo(hm,"clubEmailSend");
  29. clubSmtp = ci.getClubInfo(hm,"clubSmtp");
  30. clubSmtpID = ci.getClubInfo(hm,"clubSmtpID");
  31. clubSmtpPass = ci.getClubInfo(hm,"clubSmtpPass");
  32. clubUpfileExt = ci.getClubInfo(hm,"clubUpfileExt");
  33. clubCopyRight = ci.getClubInfo(hm,"clubCopyRight");
  34. clubCopyRight = clubCopyRight.replaceAll("&","&amp;");
  35. clubYear = ci.getClubInfo(hm,"clubYear");
  36. clubSmtpPort = (ci.getClubInfo(hm,"clubSmtpPort"));
  37. clubUpfileDomain = ci.getClubInfo(hm,"clubUpfileDomain");
  38. int clubMenu=0, clubSmtpUsePass=0, clubUpfileOpen=0, clubUpfileUser=0
  39. , clubUpfileMax=0, clubUserPic=0;
  40. int clubSmtpSSL = 0;
  41. int clubRefreshPage = 900;
  42. int clubHotTopic=0, clubHotRe=0;
  43. //获取int类型数据
  44. clubUpfileOpen = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUpfileOpen"));
  45. clubUpfileUser = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUpfileUser"));
  46. clubUpfileMax = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUpfileMax"));
  47. clubMenu = TypeChange.stringToInt(ci.getClubInfo(hm,"clubMenu"));
  48. clubSmtpUsePass = TypeChange.stringToInt(ci.getClubInfo(hm,"clubSmtpUsePass"));
  49. clubUserPic = TypeChange.stringToInt(ci.getClubInfo(hm,"clubUserPic"));
  50. clubSmtpSSL = TypeChange.stringToInt(ci.getClubInfo(hm,"clubSmtpSSL"));
  51. clubRefreshPage = TypeChange.stringToInt(ci.getClubInfo(hm,"clubRefreshPage"));
  52. clubHotTopic = TypeChange.stringToInt(ci.getClubInfo(hm,"clubHotTopic"));
  53. clubHotRe = TypeChange.stringToInt(ci.getClubInfo(hm,"clubHotRe"));
  54. //clubTopicIsPass = TypeChange.stringToBoolean(ci.getClubInfo(hm,"clubTopicIsPass"));
  55. if(request.getMethod().equals("POST")){
  56. clubName = request.getParameter("clubName");
  57. clubUrl = request.getParameter("clubUrl");
  58. clubTitle = request.getParameter("clubTitle");
  59. clubMeta = request.getParameter("clubMeta");
  60. clubSmtp = request.getParameter("clubSmtp");
  61. clubSmtpID = request.getParameter("clubSmtpID");
  62. clubSmtpPass = request.getParameter("clubSmtpPass");
  63. clubEmail = request.getParameter("clubEmail");
  64. clubEmailSend = request.getParameter("clubEmailSend");
  65. clubMenu = TypeChange.stringToInt(request.getParameter("clubMenu"));
  66. clubSmtpUsePass = TypeChange.stringToInt(request.getParameter("clubSmtpUsePass"));
  67. clubUpfileOpen = TypeChange.stringToInt(request.getParameter("clubUpfileOpen"));
  68. clubUpfileMax = TypeChange.stringToInt(request.getParameter("clubUpfileMax"));
  69. clubUpfileUser = TypeChange.stringToInt(request.getParameter("clubUpfileUser"));
  70. clubUpfileExt = request.getParameter("clubUpfileExt");
  71. clubCopyRight = request.getParameter("clubCopyRight");
  72. clubYear = request.getParameter("clubYear");
  73. clubUserPic = TypeChange.stringToInt(request.getParameter("clubUserPic"));
  74. clubSmtpPort = request.getParameter("clubSmtpPort");
  75. clubSmtpSSL = TypeChange.stringToInt(request.getParameter("clubSmtpSSL"));
  76. clubRefreshPage = TypeChange.stringToInt(request.getParameter("clubRefreshPage"));
  77. clubHotTopic = TypeChange.stringToInt(request.getParameter("clubHotTopic"));
  78. clubHotRe = TypeChange.stringToInt(request.getParameter("clubHotRe"));
  79. clubUpfileDomain = request.getParameter("clubUpfileDomain").trim();
  80. clubTopicIsPass = TypeChange.stringToBoolean(request.getParameter("clubTopicIsPass"));
  81. //if(clubUpfileDomain.lastIndexOf("/")!=-1){
  82. //clubUpfileDomain = clubUpfileDomain.substring(0,clubUpfileDomain.length()-1);
  83. //}
  84. ce.setClubMenu(clubMenu);
  85. ce.setClubName(clubName);
  86. ce.setClubUrl(clubUrl);
  87. ce.setClubTitle(clubTitle);
  88. ce.setClubMeta(clubMeta);
  89. ce.setClubSmtp(clubSmtp);
  90. ce.setClubSmtpID(clubSmtpID);
  91. ce.setClubSmtpPass(clubSmtpPass);
  92. ce.setClubEmail(clubEmail);
  93. ce.setClubEmailSend(clubEmailSend);
  94. ce.setClubSmtpUsePass(clubSmtpUsePass);
  95. ce.setClubUpfileOpen(clubUpfileOpen);
  96. ce.setClubUpfileMax(clubUpfileMax);
  97. ce.setClubUpfileUser(clubUpfileUser);
  98. ce.setClubUpfileExt(clubUpfileExt);
  99. ce.setClubCopyRight(clubCopyRight);
  100. ce.setClubYear(clubYear);
  101. ce.setClubUserPic(clubUserPic);
  102. ce.setClubSmtpPort(clubSmtpPort);
  103. //out.print(clubSmtpSSL);
  104. ce.setClubSmtpSSL(clubSmtpSSL);
  105. ce.setClubRefreshPage(clubRefreshPage);
  106. ce.setClubHotTopic(clubHotTopic);
  107. ce.setClubHotRe(clubHotRe);
  108. ce.setClubUpfileDomain(clubUpfileDomain);
  109. ce.setClubTopicIsPass(clubTopicIsPass);
  110. //out.print(clubHotTopic);
  111. ce.setClubInfoEdit();
  112. //out.print(ce.getMessage());
  113. //==================生成文件部分===========================
  114. String filePathAndName=request.getRealPath("") + File.separator+ "club" + File.separator+ "GVfilesInc" + File.separator+ "gvData.jsp";  //绝对路径
  115. String filePathAndName2=request.getRealPath("") + File.separator+ "club" + File.separator+ "GVfilesInc" + File.separator+ "gvData_GB2312.jsp";  //绝对路径
  116. StringBuffer fileContent=new StringBuffer("");
  117. StringBuffer fileContent1=new StringBuffer("");
  118. fileContent1.append("<");
  119. fileContent1.append("%@ page language="java" contentType="text/html;charset=UTF-8" errorPage="err.jsp"");
  120. fileContent1.append("%");
  121. fileContent1.append(">");//
  122. StringBuffer fileContent2=new StringBuffer("");
  123. fileContent2.append("<");
  124. fileContent2.append("%@ page language="java" contentType="text/html;charset=gb2312" errorPage="err.jsp"");
  125. fileContent2.append("%");
  126. fileContent2.append(">");//
  127. fileContent.append("<");
  128. fileContent.append("%r");
  129. fileContent.append("refreshPage="+ request.getParameter("clubRefreshPage") +";r");
  130. fileContent.append("clubName = ""+ request.getParameter("clubName") +"";r");
  131. fileContent.append("clubUrl = ""+ request.getParameter("clubUrl") +"";r");
  132. fileContent.append("clubTitle = ""+ request.getParameter("clubTitle") +"";r");
  133. fileContent.append("clubMeta = ""+ request.getParameter("clubMeta") +"";r");
  134. fileContent.append("clubEmail = ""+ request.getParameter("clubEmail") +"";r");
  135. fileContent.append("clubEmailSend = ""+ request.getParameter("clubEmailSend") +"";r");
  136. fileContent.append("clubSmtp = ""+ request.getParameter("clubSmtp") +"";r");
  137. fileContent.append("clubSmtpID = ""+  request.getParameter("clubSmtpID")+"";r");
  138. fileContent.append("clubSmtpPass = ""+  request.getParameter("clubSmtpPass")+"";r");
  139. fileContent.append("clubUpfileExt = ""+ request.getParameter("clubUpfileExt") +"";r");
  140. fileContent.append("clubCopyRight = ""+ request.getParameter("clubCopyRight") +"";r");
  141. fileContent.append("clubYear = ""+ request.getParameter("clubYear") +"";r");
  142. fileContent.append("clubUpfileOpen = "+ request.getParameter("clubUpfileOpen") +";r");
  143. fileContent.append("clubUpfileUser = "+ request.getParameter("clubUpfileUser") +";r");
  144. fileContent.append("clubUpfileMax = "+ request.getParameter("clubUpfileMax") +";r");
  145. fileContent.append("clubMenu = "+ request.getParameter("clubMenu") +";r");
  146. fileContent.append("clubSmtpUsePass = "+ request.getParameter("clubSmtpUsePass") +";r");
  147. fileContent.append("clubUserPic = "+ request.getParameter("clubUserPic")+";r");
  148. fileContent.append("clubSmtpSSL = "+ request.getParameter("clubSmtpSSL")+";r");
  149. fileContent.append("clubSmtpPort = ""+ request.getParameter("clubSmtpPort") +"";r");
  150. fileContent.append("clubHotTopic = "+ request.getParameter("clubHotTopic")+ ";r");
  151. fileContent.append("clubHotRe = "+ (request.getParameter("clubHotRe")) +";r");
  152. fileContent.append("clubUpfileDomain = ""+ (clubUpfileDomain) +"";r");
  153. fileContent.append("clubTopicIsPass = "+ (clubTopicIsPass) +";r");
  154. fileContent.append("Gb clubgb = new Gb();r ");//
  155. fileContent.append("EncodeString es = new EncodeString();r");//
  156. fileContent.append("ArrayEdit ae = new ArrayEdit();r");//
  157. fileContent.append("%");
  158. fileContent.append(">");//
  159. fo.createFile(filePathAndName,fileContent1.toString()+fileContent.toString(),"UTF-8");
  160. fo.createFile(filePathAndName2,fileContent2.toString()+fileContent.toString(),"gb2312");
  161. out.print(prtCenter2(ce.getMessage(),"./clubInfo.jsp",1));
  162. out.close();
  163. return;
  164. }
  165. %>
  166. <html>
  167. <head>
  168. <title>今晚在线-社区管理</title>
  169. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  170. <link href="css.css" rel="stylesheet" type="text/css">
  171. <style type="text/css">
  172. <!--
  173. .style1 {color: #999999}
  174. -->
  175. </style>
  176. </head>
  177. <body>
  178. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#e6e6e6">
  179.   <tr>
  180.     <td align="center"><strong>配置社区基本信息</strong></td>
  181.   </tr>
  182. </table>
  183. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#e6e6e6">
  184. <form name="form1" method="post" action=""><tr bgcolor="#f6f6f6">
  185. <td width="150" height="22" bgcolor="#f6f6f6"><strong>社区名称</strong></td>
  186. <td>
  187. <input name="clubName" type="text" id="clubName" value="<%=clubName%>" size="30" maxlength="30">
  188. </td>
  189. </tr>
  190. <tr bgcolor="#f6f6f6">
  191. <td height="1" bgcolor="#f6f6f6"><strong>访问网址</strong></td>
  192. <td><input name="clubUrl" type="text" id="clubUrl" value="<%=clubUrl%>"  size="30" maxlength="50"></td>
  193. </tr>
  194. <tr bgcolor="#f6f6f6">
  195. <td height="2" bgcolor="#f6f6f6"><strong>Title网页标题</strong></td>
  196. <td><input name="clubTitle" type="text" id="clubTitle" value="<%=clubTitle%>" size="30"></td>
  197. </tr>
  198. <tr bgcolor="#f6f6f6">
  199. <td height="5" bgcolor="#f6f6f6"><strong>META关键词</strong></td>
  200. <td><input name="clubMeta" type="text" id="clubMeta" value="<%=clubMeta%>" size="30"></td>
  201. </tr>
  202. <tr bgcolor="#f6f6f6">
  203. <td height="22" bgcolor="#f6f6f6"><strong>邮件SMTP服务器</strong></td>
  204. <td><input name="clubSmtp" type="text" id="clubSmtp" value="<%=clubSmtp%>" size="30" maxlength="50"></td>
  205. </tr>
  206. <tr bgcolor="#f6f6f6">
  207. <td height="22" bgcolor="#f6f6f6"><strong>SMTP身份验证</strong></td>
  208. <td>
  209. <input type="radio" name="clubSmtpUsePass" value="0" <% if(clubSmtpUsePass==0){out.print("checked");}%>>不需要
  210. &nbsp;&nbsp;&nbsp;&nbsp;
  211. <input type="radio" name="clubSmtpUsePass" value="1" <% if(clubSmtpUsePass==1){out.print("checked");}%>>需要</td>
  212. </tr>
  213. <tr bgcolor="#f6f6f6">
  214. <td height="22" bgcolor="#f6f6f6"><strong>系统信件Email</strong></td>
  215. <td><input name="clubEmail" type="text" id="clubEmail"  value="<%=clubEmail%>" size="30" maxlength="50"></td>
  216. </tr>
  217. <tr bgcolor="#f6f6f6">
  218. <td height="22" bgcolor="#f6f6f6"><strong>系统信件用户名</strong></td>
  219. <td><input name="clubEmailSend" type="text" id="clubEmailSend" value="<%=clubEmailSend%>" size="30" maxlength="50"></td>
  220. </tr>
  221. <tr bgcolor="#f6f6f6">
  222. <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP登陆ID</strong></td>
  223. <td><input name="clubSmtpID" type="text" id="clubSmtpID" value="<%=clubSmtpID%>" size="30" maxlength="50"></td>
  224. </tr>
  225. <tr bgcolor="#f6f6f6">
  226. <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP登陆密码</strong></td>
  227. <td>
  228. <input name="clubSmtpPass" type="text" id="clubSmtpPass" value="<%=clubSmtpPass%>" size="30" maxlength="50">
  229. </td>
  230. </tr>
  231. <tr bgcolor="#f6f6f6">
  232. <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP端口</strong></td>
  233. <td>
  234. <input name="clubSmtpPort" type="text" id="clubSmtpPort" value="<%=clubSmtpPort%>" size="30" maxlength="50">无端口号请置空
  235. </td>
  236. </tr>  
  237. <tr bgcolor="#f6f6f6">
  238. <td height="22" bgcolor="#f6f6f6"><strong>系统SMTP是否需要SSL</strong></td>
  239. <td>
  240. <input name="clubSmtpSSL" type="radio" value="0" <% if(clubSmtpSSL==0){out.print("checked");}%> >默认关闭
  241. &nbsp;&nbsp;&nbsp;&nbsp;
  242. <input name="clubSmtpSSL" type="radio" value="1" <% if(clubSmtpSSL==1){out.print("checked");}%> >默认打开
  243. (目前Gmail的SMTP服务是需要SSL验证的)</td>
  244. </tr>
  245. <tr bgcolor="#f6f6f6">
  246. <td height="22" bgcolor="#f6f6f6"><strong>社区左侧菜单</strong></td>
  247. <td>
  248. <input name="clubMenu" type="radio" value="0" <% if(clubMenu==0){out.print("checked");}%> >默认关闭
  249. &nbsp;&nbsp;&nbsp;&nbsp;
  250. <input type="radio" name="clubMenu" value="1" <% if(clubMenu==1){out.print("checked");}%> >默认打开
  251. </td>
  252. </tr>
  253. <tr bgcolor="#f6f6f6">
  254. <td height="10" bgcolor="#f6f6f6"><strong>社区上传</strong></td>
  255. <td>
  256. <input type="radio" name="clubUpfileOpen" value="0" <% if(clubUpfileOpen==0){out.print("checked");}%> >关闭
  257. &nbsp;&nbsp;&nbsp;&nbsp;
  258. <input type="radio" name="clubUpfileOpen" value="1" <% if(clubUpfileOpen==1){out.print("checked");}%> >开通
  259. </td>
  260. </tr>
  261. <tr bgcolor="#f6f6f6">
  262. <td height="10" bgcolor="#f6f6f6"><strong>个人形象上传</strong></td>
  263. <td>
  264. <input type="radio" name="clubUserPic" value="0" <% if(clubUserPic==0){out.print("checked");}%> >关闭
  265. &nbsp;&nbsp;&nbsp;&nbsp;
  266. <input type="radio" name="clubUserPic" value="1" <% if(clubUserPic==1){out.print("checked");}%> >开通
  267. </td>
  268. <tr bgcolor="#f6f6f6">
  269. <td height="10" bgcolor="#f6f6f6"><strong>是否开启帖子审核机制</strong></td>
  270. <td>
  271. <input type="radio" name="clubTopicIsPass" value="false" <% if(!clubTopicIsPass){out.print("checked");}%> >开启
  272. &nbsp;&nbsp;&nbsp;&nbsp;
  273. <input type="radio" name="clubTopicIsPass" value="true" <% if(clubTopicIsPass){out.print("checked");}%> >不开启
  274. </td>
  275. </tr>
  276. <tr bgcolor="#f6f6f6">
  277. <td height="11" bgcolor="#f6f6f6"><strong>最大上传</strong></td>
  278. <td><input name="clubUpfileMax" type="text" id="clubUpfileMax" value="<%=clubUpfileMax%>" size="20">
  279. (单位 Kb)</td>
  280. </tr>
  281. <tr bgcolor="#f6f6f6">
  282. <td height="22" bgcolor="#f6f6f6"><strong>默认的用户上传空间</strong></td>
  283. <td><input name="clubUpfileUser" type="text" id="clubUpfileUser" value="<%=clubUpfileUser%>" size="20">(单位 Kb)
  284. </td>
  285. </tr>
  286. <tr bgcolor="#f6f6f6">
  287. <td height="22" bgcolor="#f6f6f6">
  288. <p><strong>允许的上传类型</strong><br><span class="style1">只需填入文件扩展名 </span></p>
  289. </td>
  290. <td><textarea name="clubUpfileExt" cols="50" rows="2" id="clubUpfileExt"><%=clubUpfileExt%></textarea></td>
  291. </tr>
  292. <tr bgcolor="#f6f6f6">
  293. <td height="22" bgcolor="#f6f6f6"><strong>访问上传文件的域名</strong></td>
  294. <td>
  295. <input name="clubUpfileDomain" type="text" id="clubUpfileDomain" value="<%=clubUpfileDomain%>" size="50">
  296. </td>
  297. </tr>
  298. <tr bgcolor="#f6f6f6">
  299. <td height="22" bgcolor="#f6f6f6">热贴</td>
  300. <td>
  301. 浏览大于登陆<input name="clubHotTopic" type="text" id="clubHotTopic" value="<%=clubHotTopic%>" size="3">  
  302. &nbsp;&nbsp;&nbsp;&nbsp;
  303. 回复大于等于<input name="clubHotRe" type="text" id="clubHotRe" value="<%=clubHotRe%>" size="3">  
  304. </td>
  305. </tr>  
  306. <tr bgcolor="#f6f6f6">
  307. <td height="22" bgcolor="#f6f6f6"><strong>版权归属</strong></td>
  308. <td><textarea name="clubCopyRight" cols="50" rows="2" id="clubCopyRight"><%=clubCopyRight%></textarea></td>
  309. </tr>
  310. <tr bgcolor="#f6f6f6">
  311. <td height="22" bgcolor="#f6f6f6"><strong>软件版本</strong></td>
  312. <td><input name="clubYear" type="text" id="clubYear" value="<%=clubYear%>" size="10" maxlength="10">
  313. 输入软件版本号,如:3.0 
  314. </td>
  315. </tr>
  316. <tr bgcolor="#f6f6f6">
  317. <td height="22" bgcolor="#f6f6f6"><strong>默认刷新时间</strong></td>
  318. <td><input name="clubRefreshPage" type="text" id="clubRefreshPage" value="<%=clubRefreshPage%>" size="10" maxlength="10">
  319. 单位秒</td>
  320. </tr>
  321. <tr bgcolor="#f6f6f6">
  322. <td height="22" bgcolor="#f6f6f6">&nbsp;</td>
  323. <td><input name="gvSubmit" type="submit" id="gvSubmit" value="确定更新"></td>
  324. </tr></form></table>
  325. </body>
  326. </html>