Admin_Iask_Config.asp
上传用户:linjin119
上传日期:2017-05-01
资源大小:29568k
文件大小:5k
源码类别:

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

开发平台:

ASP/ASPX

  1. <!-- #Include File="Include/Admin_Onlogin.asp" -->
  2. <%
  3. index_url = "Channel_Config"
  4. Data_Name = "Channel"
  5. tit_fir="基本配置"
  6. tit="配置管理"
  7. Call Admin_Header(1)
  8. %>
  9. <tr><td align=center colspan=2 height=30>
  10.   <table border=0>
  11.   <tr>
  12.   <td><%Response.Write tit%></td>
  13.   <td width=10></td>
  14.   <td><a href='?ChannelIDs=<%=iChannelIDs%>'><%Response.Write tit_fir%></a></td>
  15.   </tr>
  16.   </table>
  17. </td></tr>
  18. </table>
  19. <%
  20. Call Admin_Table(1)
  21. %>
  22. <tr align=center>
  23. <td class=td width='18%'>设置名称</td>
  24. <td class=td width='70%'>基本参数设置</td>
  25. <td class=td width='12%'>相关信息</td>
  26. </tr>
  27. <%
  28. Iask_Config_Main()
  29. Call Admin_Ender(tit)
  30. '//* 软件基本配置 *//
  31. Sub Iask_Config_Main()
  32.  Dim Iask,ChannelOption
  33.   Dim UserPut, UserLevelName
  34. Dim Tii
  35.   SQL = "Select ChannelOption From ["&Data_Name&"] Where ChannelIDs="&iChannelIDs&""
  36.   Call Cls.Exe_Conn(Rs,SQL,3)
  37.   ChannelOption=Rs("ChannelOption")
  38.   If Chk() Then
  39.    Dim UserLevel
  40. Dim iUserPut, iLevelName
  41. For Each iUserPut in Request.form("UserPut")
  42. If iUserPut<>"" Then
  43. If Not Cls.Is_Int(iUserPut) Then
  44. Exit For
  45. Call Admin_Msg("积分数必须为整数!","?Action="&Action,1)
  46. Exit Sub
  47. End If
  48. UserPut=UserPut&iUserPut&":"
  49. End If
  50. Next
  51. For Each iLevelName in Request.form("UserLevelName")
  52. If iLevelName<>"" Then
  53. UserLevelName=UserLevelName&Code_Config(iLevelName)&":"
  54. End If
  55. Next
  56. If Ubound(Split(UserPut,":"))<>Ubound(Split(UserLevelName,":")) Then
  57. Call Admin_Msg("请正确填写用户等级!","?Action="&Action,1)
  58. Exit Sub
  59. End If
  60. ChannelOption=code_config(Cls.Code_Admin("Iask_0",1,0))&"|"&code_config(Cls.Code_Admin("Iask_1",1,0))&"|"&code_config(Cls.Code_Admin("Iask_2",1,0))&"|"&code_config(Cls.Code_Admin("Iask_3",1,0))&"|"&code_config(Cls.Code_Admin("Iask_4",1,0))&"|"&UserPut&"|"&UserLevelName
  61.     Rs("ChannelOption")=ChannelOption
  62. Rs.Update
  63. Rs.Close
  64. Call Cls.Cache_Del("Class_3")
  65. Call Cls.ReloadInfo(UserLevel,15)
  66. Call ReloadMenu(0)
  67. Call Admin_Msg("已成功编辑了"&tit_fir&"!","?ChannelIDs="&iChannelIDs,1)
  68. Exit Sub
  69.    End If
  70. Call Form_First()
  71. Iask=split(ChannelOption,"|")
  72. %>
  73. <SCRIPT LANGUAGE="JavaScript">
  74. <!--
  75. function deldata(n){
  76. if (document.theform.delall[n].checked==true){
  77. document.theform.UserPut[n].disabled = true;
  78. document.theform.UserLevelName[n].disabled = true;
  79. }else{
  80. document.theform.UserPut[n].disabled = false;
  81. document.theform.UserLevelName[n].disabled = false;
  82. }
  83. }
  84. //-->
  85. </SCRIPT>
  86. <form name=theform action='?ChannelIDs=<%=iChannelIDs%>' method=post>
  87. <input type=hidden name=chk value=yes>
  88. <tr>
  89. <td>回答经验:</td>
  90. <td><input type=text name=Iask_0 value='<%Response.Write Iask(0)%>' size=62 maxlength=200></td>
  91. <td><%Call Admin_Read("","回答经验说明","每回答一次问题可获得经验")%></td>
  92. </tr>
  93. <tr>
  94. <td>过期天数:</td>
  95. <td><input type=text name=Iask_1 value='<%Response.Write Iask(1)%>' size=62 maxlength=200></td>
  96. <td><%Call Admin_Read("","过期天数说明","发布问题的过期天数不能小于此相的限制")%></td>
  97. </tr>
  98. <tr>
  99. <td>投票天数:</td>
  100. <td><input type=text name=Iask_2 value='<%Response.Write Iask(2)%>' size=62 maxlength=200></td>
  101. <td><%Call Admin_Read("","投票天数说明","离过期天数剩余答案的投票天数")%></td>
  102. </tr>
  103. <tr>
  104. <td>投票数量:</td>
  105. <td><input type=text name=Iask_3 value='<%Response.Write Iask(3)%>' size=62 maxlength=200></td>
  106. <td><%Call Admin_Read("","投票数量说明","采纳答案的票数")%></td>
  107. </tr>
  108. <tr>
  109. <td>悬赏分值:</td>
  110. <td><input type=text name=Iask_4 value='<%Response.Write Iask(4)%>' size=62 maxlength=200></td>
  111. <td><%Call Admin_Read("","悬赏分值说明","多个请用“:”隔开")%></td></tr><%
  112. UserPut = Split(Iask(5),":")
  113. UserLevelName = Split(Iask(6),":")
  114. For Tii = 0 To Ubound(UserPut)
  115. Response.Write VbCrlf&"<tr>"
  116. Response.Write VbCrlf&"<td>用户等级"&Tii+1&":</td>"
  117. Response.Write VbCrlf&"<td>&nbsp;回答问题被采纳&nbsp;<input type=text name=UserPut value='"&UserPut(Tii)&"' size=8 maxlength=5>&nbsp;个可升级为&nbsp;<input type=text name=UserLevelName value='"&UserLevelName(Tii)&"' size=28 maxlength=40>&nbsp;称号</td>"
  118.     If Tii<>Int(Ubound(UserPut)) Then
  119.   Response.Write VbCrlf&"<td class=gray>删除 "&Tii+1&":<input type=checkbox name=delall onclick=""deldata("&Tii&")""></td>"
  120.     Else
  121.       %><td><%call admin_read("","用户等级设置说明","你可以添加、修改、删除用户等级。<br><font class=red>添加用户等级</font>即在“增加新用户组”中按规则加入要新添的用户等级,只能单个的增加;<br><font class=red>修改用户等级</font>可修改所有的,如要排序,只要将其内容互换即可,但所需积分和等级名称要同时互换;<br><font class=red>删除用户等级</font>可一次删除一个或多个,方法为将要删除的用户等级框里的内容清空,再将栏目数较大的向较小的里转移。</font>")%></td><%
  122.     End if
  123. Response.Write VbCrlf&"</tr>"
  124. Next
  125. Erase UserPut
  126. Erase UserLevelName
  127. Submit_Config()
  128. End Sub
  129. %>