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

数据库编程

开发平台:

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. <!--#include file="../../FS_Inc/Func_page.asp" -->
  6. <%
  7. response.buffer=true
  8. Response.CacheControl = "no-cache"
  9. Dim Conn,User_Conn
  10. MF_Default_Conn
  11. 'session判断
  12. MF_Session_TF 
  13. if not MF_Check_Pop_TF("WS002") then Err_Show
  14. Dim i,Style
  15. dim ConfigRs,sql,IsUser,PageS,Title,UserMember,strShowErr,RepUserMember
  16. Set ConfigRs= server.CreateObject (G_FS_RS)
  17. sql="select top 1 Title,isUser,PageSize,Style,UserMember,RepUserMember From FS_WS_Config"
  18. ConfigRs.open sql,conn,1,1
  19. if not ConfigRS.eof then
  20. IsUser=ConfigRs("IsUser")
  21. PageS=Cint(ConfigRs("PageSize"))
  22. Style=ConfigRs("Style")
  23. Title=ConfigRs("Title")
  24. UserMember=ConfigRs("UserMember")
  25. RepUserMember = ConfigRs("RepUserMember")
  26. End if
  27. Set ConfigRs=nothing
  28. %>
  29. <html>
  30. <HEAD>
  31. <TITLE>FoosunCMS</TITLE>
  32. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  33. </HEAD>
  34. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  35. <script language="javascript">
  36. function checknum(obj){
  37. if (isNaN(obj.value)|| obj.value<0){
  38. alert("格式不对!");
  39. obj.focus();
  40. }
  41. }
  42. </script>
  43. <BODY>
  44. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  45.   <form action="?Action=save" method="post" name="SysParaForm" id="SysParaForm"><tr class="hback"> 
  46.     <td class="xingmu" colspan="4">参数设置&nbsp;&nbsp;&nbsp;
  47. <a href="../../help?Lable=Message" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  48.   </tr>
  49.   <tr class="hback">
  50. <td width="17%" align="right">留言系统名称:</td>
  51. <br>
  52. <td width="83%"><label>
  53.   <input name="Title" type="text" id="Title" value="<%=Title%>" size="40">
  54.   <font color="#FF0000">*</font></label></td>
  55.   </tr>
  56.   
  57.     <tr class="hback"> 
  58.       <td align="right">允许未注册用户留言:</td> 
  59.       <td width="85%">
  60.   <%if IsUser="0" then%>
  61.   <input type="radio" name="IsUser" value="0" checked>
  62.       允许&nbsp;&nbsp;<input type="radio" name="IsUser" value="1">禁止
  63.   <%else%>
  64.    <input type="radio" name="IsUser" value="0" >
  65.       允许&nbsp;&nbsp;<input type="radio" name="IsUser" value="1" checked>禁止
  66.   <%End if %>   </td> 
  67.     </tr> 
  68. <tr>
  69. <td class="hback" align="right">发贴成功增加会员积分:</td>
  70. <td class="hback"><input type="text" name="UserMember" value="<%=UserMember%>" onKeyUp="checknum(this)">
  71. <label>填写正整数</label></tr>
  72. <tr class="hback">
  73.   <td align="right">回复帖子积分:</td>
  74.   <td><label>
  75.         <input name="RepUserMember" type="text" id="RepUserMember" value="<% = RepUserMember %>">
  76.         </label>        填写正整数</tr>
  77. <tr class="hback">
  78. <td align="right">每页显示留言条数:</td>
  79.   <td width="85%">
  80.   <select name="PageS">
  81.   <%
  82.   for i=10 to 50 step 2
  83.    if i=PageS then
  84.   %>
  85.    <option value="<%=i%>" selected><%=i%></option>
  86.   <% 
  87.    else
  88. %>
  89. <option value="<%=i%>"><%=i%></option>
  90. <%
  91.    end if
  92.   Next 
  93.   %>
  94.     </select> </tr>
  95. <tr class="hback">
  96. <td align="right">选择样式:</td>
  97. <td>
  98. <select name="Style">
  99. <option value="1" <%if Style="1" then response.Write"selected"%>>默认样式</option>
  100. <option value="2" <%if Style="2" then response.Write"selected"%>>银色风格</option>
  101. <option value="3" <%if Style="3" then response.Write"selected"%>>蓝色海洋</option>
  102. <option value="4" <%if Style="4" then response.Write"selected"%>>紫色回忆</option>
  103. <option value="5" <%if Style="5" then response.Write"selected"%>>绿色心情</option>
  104. </select> </td>
  105. </tr>
  106.       <tr class="hback"> 
  107.       <td align="right">&nbsp;</td> 
  108.       <td><input type="Submit" name="btn_SetSysParam" value=" 保存 " /> 
  109.         <input type="reset" name="sub_rest" value=" 重置 " /></td> 
  110.     </tr></form>  
  111. </table> 
  112. <%
  113. if NoSqlHack(Request.QueryString("Action"))="save" Then
  114. IsUser=Request.Form("IsUser")
  115. PageS=Request.Form("PageS")
  116. Style=Request.Form("Style")
  117. Title=NoSqlHack(trim(Replace(Request.Form("Title"),"'","")))
  118. UserMember=NoSqlHack(Trim(Request.form("UserMember")))
  119. RepUserMember = NoSqlHack(Trim(Request.form("RepUserMember")))
  120. if Title="" then
  121. strShowErr="<li>留言系统名称不能为空</li>"
  122. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"")
  123. Response.end
  124. end if
  125. if IsNumeric(UserMember) then
  126. UserMember=int(abs(UserMember))
  127. else
  128. strShowErr = "<li>增加会员积分不对</li>"
  129. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"")
  130. Response.end
  131. end if
  132. if IsNumeric(RepUserMember) then
  133. RepUserMember=int(abs(RepUserMember))
  134. else
  135. strShowErr = "<li>增加会员积分不对</li>"
  136. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"")
  137. Response.end
  138. end if
  139. if IsUser<>"" and PageS<>"" then
  140. Conn.Execute("Update FS_WS_Config set Title='"&Title&"',IsUser='"&IsUser&"',PageSize="&PageS&",Style='"&Style&"',UserMember="&UserMember&",RepUserMember="&RepUserMember&"")
  141. strShowErr = "<li>修改成功</li>"
  142. Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"")
  143. Response.end
  144. else
  145. strShowErr = "<li>参数错误</li>"
  146. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"")
  147. Response.end
  148. End if
  149. End if
  150. Set Conn=Nothing
  151. %>
  152. </body>
  153. </html>
  154. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->