iLog_SetParam.asp
Upload User: jisenq
Upload Date: 2014-06-29
Package Size: 7216k
Code Size: 6k
Category:

ADO-ODBC

Development Platform:

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. dim Conn,User_Conn,rs,str_c_isp,str_c_user,str_c_pass,str_c_url,str_domain,rs_param,str_c_gurl,strShowErr
  7. dim id,siteName,Domain,keywords,FileName,FileExtName,isCheck,isOpen,Kcontent,dir
  8. MF_Default_Conn
  9. MF_User_Conn
  10. MF_Session_TF
  11. if not MF_Check_Pop_TF("ME_Log") then Err_Show 
  12. if not MF_Check_Pop_TF("ME039") then Err_Show 
  13. set rs = Server.CreateObject(G_FS_RS)
  14. rs.open "select top 1 id,siteName,[Domain],dir,keywords,FileName,FileExtName,isCheck,isOpen,Kcontent From FS_ME_iLogSysParam",User_Conn,1,3
  15. if rs.eof then
  16. id=""
  17. siteName="风讯日志"
  18. Domain="www.foosun.cn"
  19. keywords="风讯,CMS,Foosun,FoosunCMS"
  20. FileName=0
  21. FileExtName="html"
  22. isCheck=0
  23. isOpen=1
  24. Kcontent="我日,我靠,Fuck you"
  25. dir="blog"
  26. else
  27. id=rs("id")
  28. siteName=rs("siteName")
  29. Domain=rs("Domain")
  30. keywords=rs("keywords")
  31. FileName=rs("FileName")
  32. FileExtName=rs("FileExtName")
  33. isCheck=rs("isCheck")
  34. isOpen=rs("isOpen")
  35. Kcontent=rs("Kcontent")
  36. dir=rs("dir")
  37. end if
  38. rs.close:set rs=nothing
  39. if Request.Form("Action")="save" then
  40. if Request.Form("siteName")="" or Request.Form("Domain")="" or Request.Form("dir")="" then
  41. strShowErr = "<li>带*号的必须填写</li>"
  42. Response.Redirect("../error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  43. Response.end
  44. end if
  45. set rs = Server.CreateObject(G_FS_RS)
  46. rs.open "select top 1 id,siteName,[Domain],dir,keywords,FileName,FileExtName,isCheck,isOpen,Kcontent From FS_ME_iLogSysParam",User_Conn,1,3
  47. if trim(Request.Form("id"))="" then
  48. rs.addnew
  49. end if
  50. rs("siteName")=Request.Form("siteName")
  51. rs("Domain")=Request.Form("Domain")
  52. rs("keywords")=Request.Form("keywords")
  53. rs("FileName")=cint(Request.Form("FileName"))
  54. rs("FileExtName")=trim(Request.Form("FileExtName"))
  55. if Request.Form("isCheck")<>"" then:rs("isCheck")=1:else:rs("isCheck")=0:end if
  56. if Request.Form("isOpen")<>"" then:rs("isOpen")=1:else:rs("isOpen")=0:end if
  57. rs("Kcontent")=Request.Form("Kcontent")
  58. rs("dir")=Request.Form("dir")
  59. rs.update
  60. rs.close:set rs=nothing
  61. set conn=nothing
  62. set user_conn=nothing
  63. strShowErr = "<li>更新成功</li>"
  64. Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=User/iLog_SetParam.asp")
  65. Response.end
  66. end if
  67. %>
  68. </HEAD>
  69. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  70. <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scroll=yes>
  71. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  72.   <tr> 
  73.     <td width="100%" class="xingmu">日志网摘管理</td>
  74.   </tr>
  75.   <tr> 
  76.     <td class="hback"><a href="iLog.asp">日志管理</a>┆<a href="iLog_Templet.asp">模板设置</a>┆<a href="iLog_Class.asp">系统栏目</a>┆<a href="iLog_SetParam.asp">参数设置</a></td>
  77.   </tr>
  78. </table>
  79.   
  80. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  81.   <form name="form1" method="post" action="">
  82.     <tr> 
  83.       <td width="20%" class="hback"><div align="right">站点名称</div></td>
  84.       <td width="80%" class="hback"><input name="siteName" type="text" id="siteName" value="<%=siteName%>" size="30">
  85.         <input name="id" type="hidden" id="id" value="<%=id%>">
  86.         *</td>
  87.     </tr>
  88.     <tr> 
  89.       <td class="hback"><div align="right">捆绑域名</div></td>
  90.       <td class="hback"><input name="domain" type="text" id="domain" value="<%=domain%>" size="30">
  91.         *</td>
  92.     </tr>
  93.     <tr> 
  94.       <td class="hback"><div align="right">日志关键字</div></td>
  95.       <td class="hback"><input name="keywords" type="text" id="keywords" value="<%=keywords%>" size="30">
  96.         100个字符</td>
  97.     </tr>
  98.     <tr> 
  99.       <td class="hback"><div align="right">日志前台目录</div></td>
  100.       <td class="hback"><input name="dir" type="text" id="dir" value="<%=dir%>" size="30">
  101.         *</td>
  102.     </tr>
  103.     <tr> 
  104.       <td class="hback"><div align="right">生成静态文件文件名</div></td>
  105.       <td class="hback"><input name="FileName" type="radio" value="0" <%if FileName=0 then response.Write"checked"%>>
  106.         8位随机数  <input type="radio" name="FileName" value="1" <%if FileName=1 then response.Write"checked"%>>
  107.         ID  
  108.         <input type="radio" name="FileName" value="2" <%if FileName=2 then response.Write"checked"%>>
  109.         时间*</td>
  110.     </tr>
  111.     <tr>
  112.       <td class="hback"><div align="right">扩展名</div></td>
  113.       <td class="hback"><select name="FileExtName" id="FileExtName">
  114.           <option value="html" <%if FileExtName="html" then response.Write"selected"%>>html</option>
  115.           <option value="htm" <%if FileExtName="htm" then response.Write"selected"%>>htm</option>
  116.           <option value="shtml" <%if FileExtName="shtml" then response.Write"selected"%>>shtml</option>
  117.           <option value="shtm" <%if FileExtName="shtm" then response.Write"selected"%>>shtm</option>
  118.           <option value="asp" <%if FileExtName="asp" then response.Write"selected"%>>asp</option>
  119.         </select></td>
  120.     </tr>
  121.     <tr> 
  122.       <td class="hback"><div align="right">发表日志需要审核</div></td>
  123.       <td class="hback"><input name="isCheck" type="checkbox" id="isCheck" value="1" <%if isCheck=1 then response.Write"checked"%>></td>
  124.     </tr>
  125.     <tr> 
  126.       <td class="hback"><div align="right">开放日志</div></td>
  127.       <td class="hback"><input name="isOpen" type="checkbox" id="isOpen" value="1" <%if isOpen=1 then response.Write"checked"%>></td>
  128.     </tr>
  129.     <tr> 
  130.       <td class="hback"><div align="right">敏感字过滤管理</div></td>
  131.       <td class="hback"><textarea name="Kcontent" rows="6" id="Kcontent" style="width:80%"><%=Kcontent%></textarea></td>
  132.     </tr>
  133.     <tr> 
  134.       <td class="hback">&nbsp;</td>
  135.       <td class="hback"><input type="submit" name="Submit" value="保存参数">
  136.         <input name="Action" type="hidden" id="Action" value="save"></td>
  137.     </tr>
  138.   </form>
  139. </table>
  140. </body>
  141. </html>
  142. <%
  143. Conn.close:set conn=nothing
  144. User_Conn.close:set User_Conn=nothing
  145. %>