PublicParam.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. <!--#include file="../lib/strlib.asp" -->
  6. <!--#include file="../lib/UserCheck.asp" -->
  7. <%
  8. Dim rs,ClassID
  9. Dim siteName,ShowContentNumber,ShowReviewNumber,ShowLogNumber,Content,ShowNewNumber,TempletID
  10. set rs= Server.CreateObject(G_FS_RS)
  11. rs.open "select * From FS_ME_InfoilogParam where UserNumber='"&Fs_User.UserNumber&"'",User_Conn,1,3
  12. if not rs.eof then
  13. siteName = rs("siteName")
  14. ClassID = rs("ClassID")
  15. Content = rs("Content")
  16. TempletID=rs("TempletID")
  17. else
  18. siteName = Fs_User.UserName&"的站点"
  19. ClassID = 1
  20. Content = Fs_User.UserName&"的站点"
  21. TempletID=2
  22. end if
  23. rs.close:set rs=nothing
  24. if Request.Form("Action")="Edit" then
  25. set rs= Server.CreateObject(G_FS_RS)
  26. rs.open "select * From FS_ME_InfoilogParam where UserNumber='"&Fs_User.UserNumber&"'",User_Conn,1,3
  27. if rs.eof then
  28. rs.addnew
  29. end if
  30. rs("siteName")= Request.Form("siteName")
  31. rs("ClassID") = cint(Request.Form("ClassID"))
  32. rs("Content") = NoHtmlHackInput(Request.Form("Content"))
  33. rs("UserNumber")=Fs_User.UserNumber
  34. rs("TempletID")=Request.Form("TempletID")
  35. rs.update
  36. rs.close:set rs=nothing
  37. dim templet_rs,u_tmplet_savepath
  38. 'set templet_rs = User_Conn.execute("select id,TempletSavePath From FS_ME_InfoiLogTemplet where id="&cint(Request.Form("TempletID")))
  39. u_tmplet_savepath = Request.Form("TempletID")
  40. 'templet_rs.close:set templet_rs = nothing
  41. dim u_FSO,u_savePath,rs_sys_blogobj,u_dir,u_FileExtName,u_savePath_index,u_savepath_list,u_savepath_page,u_savepath_photo,oStream
  42. set rs_sys_blogobj = User_Conn.execute("select Top 1 Dir,FileExtName From FS_ME_iLogSysParam")
  43. if rs_sys_blogobj.eof then
  44. response.Write("找不到系统配置信息,请与管理员联系。创建目录失败")
  45. response.End
  46. rs_sys_blogobj.close:set rs_sys_blogobj = nothing
  47. else
  48. u_dir = rs_sys_blogobj(0)
  49. u_FileExtName = rs_sys_blogobj(1)
  50. rs_sys_blogobj.close:set rs_sys_blogobj = nothing
  51. end if
  52. set U_FSO=server.CreateObject(G_FS_FSO)
  53. u_savePath = server.MapPath("../../"& u_dir & "/" & Fs_User.UserNumber)
  54. u_savePath_index = server.MapPath("../../"& u_dir & "/" & Fs_User.UserNumber & "/index."& u_FileExtName &"")
  55. u_savepath_list = server.MapPath("../../"& u_dir & "/" & Fs_User.UserNumber & "/list."& u_FileExtName &"")
  56. u_savepath_page = server.MapPath("../../"& u_dir & "/" & Fs_User.UserNumber & "/page."& u_FileExtName &"")
  57. u_savepath_photo = server.MapPath("../../"& u_dir & "/" & Fs_User.UserNumber & "/photo."& u_FileExtName &"")
  58. if U_FSO.FolderExists(u_savePath) = False Then U_FSO.CreateFolder(u_savePath)
  59. dim File_Obj,FileStreamObj,FileContent
  60. if U_FSO.FileExists(u_savePath_index) = False Then
  61. Set oStream = U_FSO.CreateTextFile(u_savePath_index, false)
  62. Set File_Obj = U_FSO.GetFile(server.MapPath(replace("/"&G_VIRTUAL_ROOT_DIR&u_tmplet_savepath&"/index.htm","//","/")))
  63. Set FileStreamObj = File_Obj.OpenAsTextStream(1)
  64. FileContent = FileStreamObj.ReadAll
  65. oStream.Write FileContent
  66. oStream.Close
  67. Set oStream = Nothing
  68. end if
  69. if U_FSO.FileExists(u_savepath_list) = False Then
  70. Set oStream = U_FSO.CreateTextFile(u_savepath_list, false)
  71. 'U_FSO.CreateFile(u_savepath_list)
  72. Set File_Obj = U_FSO.GetFile(server.MapPath(replace("/"&G_VIRTUAL_ROOT_DIR&u_tmplet_savepath&"/list.htm","//","/")))
  73. Set FileStreamObj = File_Obj.OpenAsTextStream(1)
  74. FileContent = FileStreamObj.ReadAll
  75. oStream.Write FileContent
  76. oStream.Close
  77. Set oStream = Nothing
  78. end if
  79. if U_FSO.FileExists(u_savepath_page) = False Then
  80. Set oStream = U_FSO.CreateTextFile(u_savepath_page, false)
  81. Set File_Obj = U_FSO.GetFile(server.MapPath(replace("/"&G_VIRTUAL_ROOT_DIR&u_tmplet_savepath&"/page.htm","//","/")))
  82. Set FileStreamObj = File_Obj.OpenAsTextStream(1)
  83. FileContent = FileStreamObj.ReadAll
  84. oStream.Write FileContent
  85. oStream.Close
  86. Set oStream = Nothing
  87. end if
  88. if U_FSO.FileExists(u_savepath_photo) = False Then
  89. Set oStream = U_FSO.CreateTextFile(u_savepath_photo, false)
  90. Set File_Obj = U_FSO.GetFile(server.MapPath(replace("/"&G_VIRTUAL_ROOT_DIR&u_tmplet_savepath&"/photo.htm","//","/")))
  91. Set FileStreamObj = File_Obj.OpenAsTextStream(1)
  92. FileContent = FileStreamObj.ReadAll
  93. oStream.Write FileContent
  94. oStream.Close
  95. Set oStream = Nothing
  96. end if
  97. set U_FSO = nothing
  98. strShowErr = "<li>保存参数成功!</li>"
  99. Response.Redirect("../lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../i_Blog/PublicParam.asp")
  100. Response.end
  101. end if
  102. %>
  103. <html xmlns="http://www.w3.org/1999/xhtml">
  104. <title>User Manage Center-网站内容管理系统</title>
  105. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  106. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  107. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  108. <link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  109. <head></head>
  110. <body>
  111. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  112.   <tr>
  113.     <td>
  114.       <!--#include file="../top.asp" -->
  115.     </td>
  116.   </tr>
  117. </table>
  118. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  119.     <tr class="back"> 
  120.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="../Top_navi.asp" -->
  121.     </td>
  122.     </tr>
  123.     <tr class="back"> 
  124.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  125.           <!--#include file="../menu.asp" -->
  126.         </div></td>
  127.       <td width="82%" valign="top" class="hback">
  128.   <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  129.         <tr class="hback"> 
  130.           <td  valign="top">你的位置:<a href="../../">网站首页</a> &gt;&gt; <a href="../main.asp">会员首页</a> 
  131.             &gt;&gt; <a href="index.asp">日志管理</a> &gt;&gt;日志管理</td>
  132.         </tr>
  133.         <tr class="hback"> 
  134.           <td  valign="top"><a href="index.asp">日志首页</a>┆<a href="PublicLog.asp">发表日志</a>┆<a href="index.asp?type=box">草稿箱</a>┆<a href="../PhotoManage.asp">相册管理</a>┆<a href="PublicParam.asp">参数设置</a>┆<a href="../Review.asp">评论管理</a></td>
  135.         </tr>
  136.       </table>
  137.         
  138.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  139.         <form name="s_form" method="post" action="">
  140.           <tr> 
  141.             <td colspan="2" class="xingmu">参数设置</td>
  142.           </tr>
  143.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)> 
  144.             <td class="hback"><div align="right">站点标题</div></td>
  145.             <td class="hback"><input name="siteName" type="text" id="siteName" onFocus="Do.these('siteName',function(){return CheckContentLen('siteName','span_siteName','3-50')})" onKeyUp="Do.these('siteName',function(){return CheckContentLen('siteName','span_siteName','3-50')})" value="<%=siteName%>" size="57" maxlength="100"> 
  146.               <span id="span_siteName"></span> </td>
  147.           </tr>
  148.           <tr> 
  149.             <td width="22%" class="hback"><div align="right">站点类别</div></td>
  150.             <td width="78%" class="hback"><select name="ClassID" id="ClassID">
  151.               <!--<option value="">选择系统分类</option>-->
  152.               <%
  153. dim c_rs
  154. set c_rs = Server.CreateObject(G_FS_RS)
  155. c_rs.open "select ID,ClassName From FS_ME_iLogClass Order by id asc",User_Conn,1,3
  156. do while not c_rs.eof
  157. if c_rs("Id")=ClassID then
  158. %>
  159.               <option value="<%=c_rs("id")%>" selected="selected"><%=c_rs("ClassName")%></option>
  160.   <%else%>
  161.               <option value="<%=c_rs("id")%>"><%=c_rs("ClassName")%></option>
  162.   <%end if%>
  163.                <%
  164. c_rs.movenext
  165. loop
  166. c_rs.close:set c_rs=nothing
  167. %>
  168.             </select></td>
  169.           </tr>
  170.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)> 
  171.             <td class="hback"><div align="right">站点描述</div></td>
  172.             <td class="hback"><textarea name="Content" rows="12" style="width:80%"><%=Content%></textarea></td>
  173.           </tr>
  174.           <tr>
  175.             <td class="hback"><div align="right">模板选择</div></td>
  176.             <td class="hback">
  177.  <select name="TempletID" id="TempletID">
  178. <%
  179. set rs = User_Conn.execute("select id,TempletName,TempletSavePath From FS_ME_InfoiLogTemplet Order by id desc")
  180. do while not rs.eof
  181. if TempletID=rs("TempletSavePath") then
  182. response.Write"<option value="""&rs("TempletSavePath")&""" selected>"&rs("TempletName")&"</option>"
  183. else
  184. response.Write"<option value="""&rs("TempletSavePath")&""">"&rs("TempletName")&"</option>"
  185. end if
  186. rs.movenext
  187. loop
  188. rs.close:set rs=nothing
  189. %>
  190.               </select>
  191.    预览模板
  192.  <select name="select_s" id="select_s">
  193.              <%
  194. set rs = User_Conn.execute("select TempletSavePath,TempletName From FS_ME_InfoiLogTemplet Order by id desc")
  195. do while not rs.eof
  196. response.Write"<option value="""&rs("TempletSavePath")&""">"&rs("TempletName")&"</option>"
  197. rs.movenext
  198. loop
  199. rs.close:set rs=nothing
  200. %>
  201.              </select>
  202.  <input name="button3" type="button" id="button" onClick="showModalDialog(''+document.s_form.select_s.value+'/Index.htm','WindowObj','dialogWidth:600pt;dialogHeight:500pt;status:yes;help:no;scroll:yes;');" value="查看"></td>
  203.           </tr>
  204.           <tr onMouseOver=overColor(this) onMouseOut=outColor(this)> 
  205.             <td class="hback"><div align="right"></div></td>
  206.             <td class="hback"><input name="Action" type="hidden" id="Action" value="Edit"> 
  207.               <input type="submit" name="Submit" value="保存站点设置"> </td>
  208.           </tr>
  209.         </form>
  210.       </table>
  211.       </td>
  212.     </tr>
  213.     <tr class="back"> 
  214.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  215.           <!--#include file="../Copyright.asp" -->
  216.         </div></td>
  217.     </tr>
  218. </table>
  219. </body>
  220. </html>
  221. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->