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

数据库编程

开发平台:

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 str_CurrPath,FileName,str_FileName,rs_sys,str_FileExtName
  9. str_CurrPath = Replace("/"&G_VIRTUAL_ROOT_DIR &"/"&G_USERFILES_DIR&"/"&Session("FS_UserNumber"),"//","/")
  10. if Request.Form("Action") = "Save" then
  11. If len(Request.Form("strDescription"))>1000 Then
  12. strShowErr = "<li>站点描述不能超过1000个字符</li>"
  13. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  14. Response.end
  15. End If
  16. Dim RsAddParaObj
  17. Set RsAddParaObj = server.CreateObject(G_FS_RS)
  18. if Trim(Request.Form("state")) = "nodata" then
  19. RsAddParaObj.open "select  * From FS_ME_MySysPara where 1=0",User_Conn,1,3
  20. RsAddParaObj.addNew
  21. RsAddParaObj("UserNumber") = Fs_User.UserNumber
  22. Elseif Trim(Request.Form("state")) = "data" then
  23. RsAddParaObj.open "select  * From FS_ME_MySysPara where UserNumber='"& Fs_User.UserNumber &"'",User_Conn,1,3
  24. End if
  25. RsAddParaObj("DownFileRule") = ",,,,"
  26. RsAddParaObj("NewsFileRule") = ",,,,"
  27. RsAddParaObj("ProductFileRule") = ",,,,"
  28. RsAddParaObj("ilogFileRule") = ",,,,"
  29. RsAddParaObj("mysiteName") = NoSqlHack(Request.Form("mysiteName"))
  30. RsAddParaObj("visitePassword") = NoSqlHack(Request.Form("visitePassword"))
  31. RsAddParaObj("Keywords") = NoSqlHack(Request.Form("Keywords"))
  32. RsAddParaObj("Description") = NoHtmlHackInput(Request.Form("strDescription"))
  33. RsAddParaObj("NaviPic") = NoSqlHack(Request.Form("NaviPic"))
  34. RsAddParaObj("RedirectUrl") = NoSqlHack(Request.Form("RedirectUrl"))
  35. if Request.Form("hideIP") <> "" then
  36. RsAddParaObj("hideIP") = 1
  37. Else
  38. RsAddParaObj("hideIP") = 0
  39. End if
  40. RsAddParaObj.Update
  41. RsAddParaObj.close
  42. set RsAddParaObj=nothing
  43. strShowErr = "<li>站点参数保存成功</li>"
  44. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  45. Response.end
  46. End if
  47. %>
  48. <html xmlns="http://www.w3.org/1999/xhtml">
  49. <title>站点设置-网站内容管理系统</title>
  50. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  51. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  52. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  53. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  54. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  55. <head>
  56. <body>
  57. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  58.   <tr>
  59.     <td>
  60.       <!--#include file="top.asp" -->
  61.     </td>
  62.   </tr>
  63. </table>
  64. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  65.     <tr class="back"> 
  66.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  67.     </tr>
  68.     <tr class="back"> 
  69.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  70.           <!--#include file="menu.asp" -->
  71.         </div></td>
  72.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  73.           <tr class="hback"> 
  74.             
  75.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  76.             <a href="main.asp">会员首页</a> &gt;&gt; 站点设置</td>
  77.           </tr>
  78.         </table>
  79. <%
  80. Dim RsParaObj,strstate,mysiteName,visitePassword,Keywords,strDescription,NaviPic,isHtml,RedirectUrl,hideIP
  81. Set RsParaObj = server.CreateObject(G_FS_RS)
  82. RsParaObj.open "select  * From FS_ME_MySysPara where UserNumber='"& Fs_User.UserNumber &"'",User_Conn,1,3
  83. if RsParaObj.eof then
  84. strstate = "nodata"
  85. mysiteName = "我的个人空间"
  86. visitePassword = ""
  87. Keywords = "风讯,CMS,Foosun"
  88. strDescription = "风讯,CMS,Foosun"
  89. NaviPic = ""
  90. 'isHtml = RsParaObj("isHtml")
  91. RedirectUrl = ""
  92. hideIP = 0
  93. Else
  94. strstate = "data"
  95. mysiteName = RsParaObj("mysiteName")
  96. visitePassword = RsParaObj("visitePassword") 
  97. Keywords = RsParaObj("Keywords")
  98. strDescription = NoHtmlHackInput(RsParaObj("Description"))
  99. NaviPic = RsParaObj("NaviPic")
  100. 'isHtml = RsParaObj("isHtml")
  101. RedirectUrl = RsParaObj("RedirectUrl")
  102. hideIP = RsParaObj("hideIP")
  103. End if
  104. RsParaObj.Close
  105. set RsParaObj = nothing
  106. %>
  107.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  108.         <form name="form1" method="post" action="">
  109.           <tr class="hback"> 
  110.             <td width="15%" class="hback_1"><div align="right">我的站点名称 </div></td>
  111.             <td width="39%" class="hback"><input name="mysiteName" type="text" id="mysiteName" value="<% = mysiteName %>" size="30"></td>
  112.             <td width="46%" class="hback">&nbsp;</td>
  113.           </tr>
  114.           <tr class="hback"> 
  115.             <td class="hback_1"><div align="right">站点密码</div></td>
  116.             <td class="hback"><input name="visitePassword" type="text" id="visitePassword" value="<% = visitePassword%>" size="30"></td>
  117.             <td class="hback">不设置密码请保持为空,不能出现非法字符</td>
  118.           </tr>
  119.           <tr class="hback"> 
  120.             <td class="hback_1"><div align="right">站点关键字</div></td>
  121.             <td class="hback"><input name="Keywords" type="text" value="<% = Keywords %>" size="30"></td>
  122.             <td class="hback">最多100字符</td>
  123.           </tr>
  124.           <tr class="hback"> 
  125.             <td class="hback_1"><div align="right">站点描述</div></td>
  126.             <td class="hback"><textarea name="strDescription" cols="40" rows="6" id="strDescription"><% = strDescription %></textarea></td>
  127.             <td class="hback">最多1000字符</td>
  128.           </tr>
  129.           <tr class="hback"> 
  130.             <td class="hback_1"><div align="right">站点导航图片</div></td>
  131.             <td class="hback"><input name="NaviPic" type="text" id="NaviPic" value="<% = NaviPic %>" size="30">
  132.             <img  src="Images/upfile.gif" width="44" height="22" onClick="OpenWindowAndSetValue('CommPages/SelectPic.asp?CurrPath=<% = str_CurrPath %>&f_UserNumber=<% = session("FS_UserNumber")%>',500,320,window,document.form1.NaviPic);" style="cursor:hand;"></td>
  133.             <td class="hback">&nbsp;</td>
  134.           </tr>
  135.           <tr class="hback"> 
  136.             <td class="hback_1"><div align="right">站点转向地址</div></td>
  137.             <td class="hback"><input name="RedirectUrl" type="text" id="RedirectUrl" value="<% = RedirectUrl %>" size="30"></td>
  138.             <td class="hback">&nbsp;</td>
  139.           </tr>
  140.           <tr class="hback">
  141.             <td class="hback_1"><div align="right">隐藏IP</div></td>
  142.             <td colspan="2" class="hback"><input name="hideIP" type="checkbox" id="hideIP" value="1" <% if hideIP =1 then response.Write("checked")%>>
  143.               开启</td>
  144.           </tr>
  145.           <tr class="hback"> 
  146.             <td class="hback_1"><div align="right"></div></td>
  147.             <td colspan="2" class="hback"><input type="button" name="Submit" value="保存设置"  onClick="{if(confirm('确认保存您所修改的参数吗?')){this.document.form1.submit();return true;}return false;}"> 
  148.               <input name="state" type="hidden" id="state" value="<% = strstate %>">
  149.               <input name="Action" type="hidden" id="Action" value="Save"></td>
  150.           </tr>
  151.         </form>
  152.       </table>
  153.       </td>
  154.     </tr>
  155.     <tr class="back"> 
  156.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  157.           <!--#include file="Copyright.asp" -->
  158.         </div></td>
  159.     </tr>
  160.  
  161. </table>
  162. </body>
  163. </html>
  164. <%
  165. Set Fs_User = Nothing
  166. %>
  167. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->