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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_InterFace/VS_Function.asp" -->
  5. <!--#include file="../../FS_Inc/Function.asp" -->
  6. <%'Copyright (c) 2006 Foosun Inc. Code by awen
  7. Response.Buffer = True
  8. Response.Expires = -1
  9. Response.ExpiresAbsolute = Now() - 1
  10. Response.Expires = 0
  11. Response.CacheControl = "no-cache"
  12. Dim Conn,Vs_Rs,Vs_Sql
  13. Dim AutoDelete,Months
  14. MF_Default_Conn 
  15. MF_Session_TF
  16. if not MF_Check_Pop_TF("VS_site") then Err_Show
  17. if not MF_Check_Pop_TF("VS001") then Err_Show
  18. Sub Save()
  19. Dim sysid,Str_Tmp,Arr_Tmp
  20. sysid = NoSqlHack(request.Form("sysid"))
  21. Str_Tmp = "IPInterView,IsSigned"
  22. Arr_Tmp = split(Str_Tmp,",")
  23. Vs_Sql = "select top 1 "&Str_Tmp&"  from FS_VS_SysPara"
  24. 'response.Write(Vs_Sql)
  25. Set Vs_Rs = CreateObject(G_FS_RS)
  26. Vs_Rs.Open Vs_Sql,Conn,3,3
  27. if Vs_Rs.eof then Vs_Rs.AddNew
  28. for each Str_Tmp in Arr_Tmp
  29. 'response.Write(Str_Tmp&":"&NoSqlHack(request.Form(Str_Tmp))&"<br>")
  30. Vs_Rs(Str_Tmp) = NoSqlHack(request.Form(Str_Tmp))
  31. next
  32. 'response.End()
  33. Vs_Rs.update
  34. Vs_Rs.close
  35. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Vote/FS_VS_SysPara.asp" )&"&ErrCodes=<li>恭喜,修改成功。</li>")
  36. End Sub
  37. %>
  38. <html xmlns="http://www.w3.org/1999/xhtml">
  39. <HEAD>
  40. <TITLE>FoosunCMS</TITLE>
  41. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  42. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  43. <script language="JavaScript" src="../../FS_Inc/PublicJS.js"></script>
  44. <script language="JavaScript" src="../../FS_Inc/CheckJs.js"></script>
  45. <script language="JavaScript">
  46. <!--
  47. function chkinput()
  48. {
  49. return isEmpty('IPInterView','IPInterView_Alt') && isNumber('IPInterView','IPInterView_Alt','必须数字',false) && isEmpty('IsSigned','IsSigned_Alt') && isNumber('IsSigned','IsSigned_Alt','必须数字',false) ;
  50. }
  51. -->
  52. </script>
  53. <head>
  54. <body>
  55. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  56.      <tr  class="hback"> 
  57.             <td colspan="10" align="left" class="xingmu" >系统参数设置</td>
  58. </tr>
  59.   <tr  class="hback"> 
  60.     <td colspan="10" height="25">
  61.  <a href="FS_VS_SysPara.asp">管理首页</a>
  62. </td>
  63.   </tr>
  64. </table>
  65. <%
  66. '******************************************************************
  67. if request.QueryString("Act")="Save" then 
  68. Call Save
  69. else
  70. Call Add_Edit_Search
  71. end if
  72. '******************************************************************
  73. Sub Add_Edit_Search()
  74. Dim Bol_IsEdit,IsSigned
  75. Bol_IsEdit = false
  76. Vs_Sql = "select top 1 sysid,IPInterView,IsSigned from FS_VS_SysPara"
  77. Set Vs_Rs = CreateObject(G_FS_RS)
  78. Vs_Rs.Open Vs_Sql,Conn,1,1
  79. if not Vs_Rs.eof then 
  80. Bol_IsEdit = True
  81. IsSigned = Vs_Rs("IsSigned")
  82. else
  83. IsSigned = 0
  84. end if
  85. %>
  86. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  87.   <form name="form1" id="form1" onSubmit="return chkinput();" method="post" action="?Act=Save">
  88.     <tr  class="hback"> 
  89.       <td colspan="3" align="left" class="xingmu" >系统参数设置信息</td>
  90. </tr>
  91.     <tr  class="hback"> 
  92.       <td width="140" align="right">IP时间间隔</td>
  93.       <td width="818">
  94. <input type="text" size="5" maxlength="5" name="IPInterView" id="IPInterView" value="<%if Bol_IsEdit then response.Write(Vs_Rs("IPInterView")) else response.Write("1") end if%>">
  95.         <span id="IPInterView_Alt"></span>&nbsp;<span class="tx">同一IP间隔多少时间才能再投票(单位分钟)</span></td>
  96.     </tr>
  97.     <tr  class="hback"> 
  98.       <td align="right">是否注册才能投票</td>
  99.       <td>
  100. <select name="IsSigned" id="IsSigned">
  101. <%=PrintOption(IsSigned,"0:否,1:是")%>
  102. </select>
  103.         <span id="IsSigned_Alt"></span> <span class="tx">默认为游客可以投票无特殊情况不要选是</span></td>
  104.     </tr>
  105.    <tr  class="hback"> 
  106.       <td colspan="4">
  107.   <table border="0" width="100%" cellpadding="0" cellspacing="0">
  108.           <tr> 
  109.             <td align="center"> <input type="submit"value=" 确定提交 "/> 
  110.               &nbsp; <input type="reset" value=" 重置 " />
  111.             </td>
  112.           </tr>
  113.         </table>
  114.       </td>
  115.     </tr>
  116.   </form>
  117. </table>
  118. <%
  119. End Sub
  120. set Vs_Rs = Nothing
  121. Conn.close
  122. %>
  123. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->