AddUserGroup.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:10k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_Inc/Function.asp" -->
  5. <%
  6. on error resume next
  7. Dim Conn,User_Conn,AddGroupRs,if_repage_RS
  8. Dim GroupName,AllowUpFile,UpfileNum,UpfileSize,GroupDate,GroupPoint,GroupMoney,GroupType,CorpTemplet,LimitInfoNum,GroupDebateNum,GroupDebateNum_Array,JuniorDomain,KeywordsNumber,Ishtml,BcardNumber,Templetwatermark
  9. Admin_Login_State
  10. '************************************Update
  11. if Request("Act")="addGroup" then
  12. MF_Default_Conn
  13. MF_User_Conn
  14. MF_Session_TF
  15. Set AddGroupRs=server.CreateObject(G_FS_RS)
  16. AddGroupRs.open "select GroupName,UpfileNum,UpfileSize,GroupDate,GroupPoint,GroupMoney,GroupType,CorpTemplet,LimitInfoNum,GroupDebateNum,JuniorDomain,KeywordsNumber,isHtml,BcardNumber,Templetwatermark From FS_ME_Group",User_Conn,1,3
  17. AddGroupRs.addNew
  18. AddGroupRs("GroupName")=Request.Form("GroupName")
  19. AddGroupRs("UpfileNum")=Request.Form("UpfileNum")
  20. AddGroupRs("UpfileSize")=Request.Form("UpfileSize")
  21. AddGroupRs("GroupDate")=Request.Form("GroupDate")
  22. AddGroupRs("GroupPoint")=Request.Form("GroupPoint")
  23. AddGroupRs("GroupMoney")=Request.Form("GroupMoney")
  24. AddGroupRs("GroupType")=Request.Form("GroupType")
  25. AddGroupRs("CorpTemplet")=Request.Form("CorpTemplet")
  26. AddGroupRs("LimitInfoNum")=Request.Form("LimitInfoNum")
  27. AddGroupRs("GroupDebateNum")=trim(Request.Form("GroupDebateNum_1"))&","&trim(Request.Form("GroupDebateNum_2"))
  28. AddGroupRs("JuniorDomain")=Request.Form("JuniorDomain")
  29. AddGroupRs("KeywordsNumber")=Request.Form("KeywordsNumber")
  30. AddGroupRs("isHtml")=Request.Form("isHtml")
  31. AddGroupRs("BcardNumber")=Request.Form("BcardNumber")
  32. AddGroupRs("Templetwatermark")=Request.Form("Templetwatermark")
  33. '判断是否名字重复
  34. Set if_repage_RS=User_Conn.execute("Select GroupName from FS_ME_Group where GroupName='"&trim(Request.Form("GroupName"))&"'")
  35. if not if_repage_RS.eof then
  36. Response.Redirect("../error.asp?ErrCodes=<li>组名不能重复</li>")
  37. Response.End()
  38. End if
  39. AddGroupRs.update
  40. if err.number=0 then 
  41. Response.Redirect("../success.asp?ErrCodes=操作成功")
  42. Response.End()
  43. else
  44. Response.Redirect("../error.asp?ErrCodes=<li>"&err.description&"</li>")
  45. Response.End()
  46. end if
  47. end if
  48. %>
  49. <html xmlns="http://www.w3.org/1999/xhtml">
  50. <HEAD>
  51. <TITLE>FoosunCMS</TITLE>
  52. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  53. <script language="JavaScript" type="text/JavaScript">
  54. <!--
  55. function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  56.   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
  57.     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  58.   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
  59. }
  60. MM_reloadPage(true);
  61. //-->
  62. function AddGroupSubmit()
  63. {
  64. var flag1=isEmpty('GroupName','GroupName_Alert')
  65. var flag2=isNumber('UpfileNum','UpfileNum_Alert','文件个数应为正整数',true)
  66. var flag3=isNumber('UpfileSize','UpfileSize_Alert','文件大小应为正整数',true)
  67. var flag4=isNumber('GroupDate','GroupDate_Alert','有效期限应为正整数',true)
  68. var flag5=isNumber('GroupPoint','GroupPoint_Alert','积分应为正整数',true)
  69. var flag6=isNumber('GroupMoney','GroupMoney_Alert','金币应为正整数',true)
  70. var flag7=isNumber('LimitInfoNum','CorpTemplet_Alert','金币应为正整数',true)
  71. var flag8=isNumber('GroupDebateNum_1','GroupDebateNum_Alert1','社群最大数量应为正整数',true)
  72. var flag9=isNumber('GroupDebateNum_2','GroupDebateNum_Alert2','社群最大人数应为正整数',true)
  73. var flag10=isNumber('KeywordsNumber','KeywordsNumber_Alert','关键字个数应为正整数',true)
  74. var flag11=isNumber('BcardNumber','BcardNumber_Alert','名片收藏个数应为正整数',true)
  75. var flag12=isEmpty('CorpTemplet','CorpTemplet_Alert')
  76. if(flag1&&flag2&&flag3&&flag4&&flag5&&flag6&&flag7&&flag8&&flag9&&flag10&&flag11&&flag12)
  77. document.AddGroup.submit();
  78. }
  79. </script>
  80. </HEAD>
  81. <script language="JavaScript" src="../../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
  82. <script language="JavaScript" src="UserJS.js" type="text/JavaScript"></script>
  83. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  84. <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scroll=yes  oncontextmenu="return false;"> 
  85. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> 
  86.   <tr class="hback"> 
  87.     <td align="right" class="xingmu" colspan="2"><div align="left">添加用户组</div></td></tr> 
  88.     <form action="?Act=addGroup" method="post" name="AddGroup" id="AddGroup">  
  89.         <tr class="hback"> 
  90.           <td width="150" align="right">组名称:</td> 
  91.           <td width="537"> <input name="GroupName" type="text" id="GroupName" size="50" />
  92.           <font color="#FF0000">*</font><span id="GroupName_Alert"></span></td> 
  93.         </tr> 
  94.       
  95. <tr class="hback">
  96.     <td align="right">文件个数限制: </td>
  97.     <td><input name="UpfileNum" type="text" id="UpfileNum"  value="0" size="50">
  98.     k<span id="UpfileNum_Alert"></span></td>
  99.   </tr>
  100. <tr class="hback">
  101.     <td align="right">文件大小限制:</td>
  102.     <td><input name="UpfileSize" type="text" id="UpfileSize" value="0" size="50">
  103.     <span id="UpfileSize_Alert"></span></td>
  104.   </tr>
  105. <tr class="hback"> 
  106.                 <td align="right">组有效期限:</td> 
  107.                 <td><input name="GroupDate" type="text" id="GroupDate"  value="0" size="50"/> 
  108.                 天 <span id="GroupDate_Alert"></span></td> 
  109.         </tr> 
  110.       <tr class="hback"> 
  111.           <td align="right">该组所需积分:</td> 
  112.           <td><input name="GroupPoint" type="text" id="GroupPoint" value="0" size="50"/>
  113.           <span id="GroupPoint_Alert"></span></td> 
  114.         </tr>
  115.         <tr class="hback">
  116.           <td align="right">该组所需金币:</td>
  117.           <td><input name="GroupMoney" type="text" id="GroupMoney" value="0" size="50"/>
  118.           <span id="GroupMoney_Alert"></span></td>
  119.         </tr> 
  120.       <tr class="hback"> 
  121.           <td align="right">组类型:</td> 
  122.           <td><label>
  123.             <input name="GroupType" type="radio" value="1" checked <%if GroupType=1 then response.Write("checked") end if%>> 
  124.             个人会员组</label>
  125.             <label>
  126.             <input type="radio" name="GroupType" value="0" <%if GroupType=0 then response.Write("checked") end if%>>
  127. 企业会员组</label></td> 
  128.         </tr> 
  129.       <tr class="hback"> 
  130.           <td align="right">信息发布数量上限:</td> 
  131.           <td><input name="LimitInfoNum" type="text" id="LimitInfoNum" value="10" size="50"/>
  132.           <span id="LimitInfoNum_Alert"></span></td> 
  133.         </tr>
  134.         <tr class="hback">
  135.           <td align="right">企业会员模板地址:</td>
  136.           <td><input name="CorpTemplet" type="text" size="50"><span id="CorpTemplet_Alert"></span></td>
  137.         </tr>
  138.         <tr class="hback">
  139.           <td align="right">社群参数:</td>
  140.           <td>社群最大数量:
  141.             <input name="GroupDebateNum_1" type="text" id="GroupDebateNum_1" value="0" size="15"> 
  142.           &nbsp;社群最大人数
  143.           <input name="GroupDebateNum_2" type="text" id="GroupDebateNum_2" value="0" size="15">
  144.           <span id="GroupDebateNum_Alert1"></span>&nbsp; <span id="GroupDebateNum_Alert2"></span></td>
  145.         </tr>
  146.         <tr class="hback">
  147.           <td align="right">开通二级域名:</td>
  148.           <td><p>
  149.             <label>
  150.             <input type="radio" name="JuniorDomain" value="1" <%if JuniorDomain=1 then Response.Write("checked") end if%>>
  151.   是</label>
  152.             <label>
  153.             <input type="radio" name="JuniorDomain" value="0" <%if JuniorDomain=0 then Response.Write("checked") end if%>>
  154.   否</label>
  155.             <br>
  156.           </p></td>
  157.         </tr>
  158.         <tr class="hback">
  159.           <td align="right">信息关键字个数:</td>
  160.           <td><input name="KeywordsNumber" type="text" id="KeywordsNumber"  value="0" size="50"/>
  161.           <span id="KeywordsNumber_Alert"></span></td>
  162.         </tr>
  163.         <tr class="hback">
  164.           <td align="right">生成静态文件:</td>
  165.           <td><label>
  166.             <input type="radio" name="Ishtml" value="1" <%if Ishtml=1 then Response.Write("checked") end if%>>
  167. 是</label>
  168.             <label>
  169.             <input type="radio" name="Ishtml" value="0" <%if Ishtml=0 then Response.Write("checked") end if%>>
  170. 否</label></td>
  171.         </tr>
  172.         <tr class="hback">
  173.           <td align="right">名片收藏个数限制:</td>
  174.           <td><input name="BcardNumber" type="text" id="BcardNumber" value="0" size="50"/>
  175.           <span id="BcardNumber_Alert"></span></td>
  176.         </tr>
  177.         <tr class="hback">
  178.           <td align="right">开通水印:</td>
  179.           <td><label>
  180.             <input type="radio" name="Templetwatermark" value="1" <%if Templetwatermark=1 then Response.Write("checked") end if%>>
  181. 是</label>
  182.             <label>
  183.             <input name="Templetwatermark" type="radio" value="0" checked <%if Templetwatermark=0 then Response.Write("checked") end if%>>
  184. 否</label></td>
  185.         </tr> 
  186.       <tr class="hback"> 
  187.           <td align="right">&nbsp;</td> 
  188.           <td><input type="Button" name="AddGroupButton" value=" 保存 " onClick="AddGroupSubmit()"/> 
  189.             <input type="reset" name="Submit2" value=" 重置 " /></td> 
  190.         </tr> 
  191.     </form> 
  192.   </tr> 
  193. </table> 
  194. </body>
  195. <%
  196. if Request("Act")="addGroup" then
  197. AddGroupRs.close
  198. set AddGroupRs=nothing
  199. Conn.close
  200. Set Conn=nothing
  201. User_Conn.close
  202. Set User_Conn=nothing
  203. if_repage_RS.close
  204. Set if_repage_RS=nothing
  205. end if
  206. %>
  207. </html>