SiteSave.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:5k
源码类别:

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

开发平台:

ASP/ASPX

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
  4. <TITLE>网站信息设置</TITLE>
  5. <link rel="stylesheet" href="Images/CssAdmin.css">
  6. <script language="javascript" src="../skweb/JS/Admin.js"></script>
  7. </HEAD>
  8. <!--#include file="../skweb/ConnSiteData.asp" -->
  9. <!--#include file="../skweb/Const.asp" -->
  10. <!--#include file="CheckAdmin.asp"-->
  11. <%
  12. if Instr(session("AdminPurview"),"|112,")=0 then 
  13.   response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  14.   response.end
  15. end if
  16. '========判断是否具有管理权限
  17. %>
  18. <body>
  19. <%
  20.   if len(trim(request.Form("SiteTitle")))<3 then
  21.     response.write ("<script language=javascript> alert('SK提示:网站标题必填且不能少于3个字符!');history.back(-1);</script>")
  22.     response.end
  23.   end if
  24.    if len(trim(request.Form("SiteUrl")))<10 then
  25.     response.write ("<script language=javascript> alert('网站网址不能为空,且不少于10个字符!');history.back(-1);</script>")
  26.     response.end
  27.   end if 
  28.   if left(trim(request.Form("SiteUrl")),7)<>"http://" then
  29.     response.write ("<script language=javascript> alert('网站网址请加上""http://""!');history.back(-1);</script>")
  30.     response.end
  31.   end if
  32.   if len(trim(request.Form("ComName")))<3 then
  33.     response.write ("<script language=javascript> alert('SK提示:公司名称必填且不能少于3个字符!');history.back(-1);</script>")
  34.     response.end
  35.   end if 
  36.   if len(trim(request.Form("Address")))<3 then
  37.     response.write ("<script language=javascript> alert('SK提示:公司地址必填且不能少于3个字符!');history.back(-1);</script>")
  38.     response.end
  39.   end if
  40.   if len(trim(request.Form("ZipCode")))<6 then
  41.     response.write ("<script language=javascript> alert('邮政编码必填且不能少于6个字符!');history.back(-1);</script>")
  42.     response.end
  43.   end if
  44.   if len(trim(request.Form("Telephone")))<11 then
  45.     response.write ("<script language=javascript> alert('电话号码必填且不能少于11个字符!');history.back(-1);</script>")
  46.     response.end
  47.   end if
  48.   if len(trim(request.Form("Fax")))<11 then
  49.     response.write ("<script language=javascript> alert('传真号码必填且不能少于11个字符!');history.back(-1);</script>")
  50.     response.end
  51.   end if
  52.   if len(trim(request.Form("Email")))<6 then
  53.     response.write ("<script language=javascript> alert('电子邮箱必填具不能少于6个字符!');history.back(-1);</script>")
  54.     response.end
  55.   end if
  56.   dim rs,sql
  57.   set rs = server.createobject("adodb.recordset")
  58.   sql="select top 1 * from sk_Site"
  59.   rs.open sql,conn,1,3
  60.      if Request.Form("miewFlag")=1 then
  61.         rs("miewFlag")=1
  62.   else
  63.         rs("miewFlag")=0
  64.   end if  
  65.   if Request.Form("Verify")=1 then
  66.         rs("Verify")=1
  67.   else
  68.         rs("Verify")=0
  69.   end if  
  70.   rs("SiteTitle")=trim(Request.Form("SiteTitle"))
  71.   rs("SiteUrl")=trim(Request.Form("SiteUrl"))
  72.   rs("ComName")=trim(Request.Form("ComName"))
  73.   rs("Sitenum")=trim(Request.form("Sitenum"))
  74.   rs("Address")=trim(Request.Form("Address"))
  75.   rs("ZipCode")=trim(Request.Form("ZipCode"))
  76.   rs("Telephone")=trim(Request.Form("Telephone"))
  77.   rs("Fax")=trim(Request.Form("Fax"))
  78.   rs("Email")=trim(Request.Form("Email"))
  79.   rs("Keywords")=trim(Request.Form("Keywords"))
  80.   rs("Descriptions")=trim(Request.Form("Descriptions"))
  81.   rs("IcpNumber")=trim(Request.Form("IcpNumber"))
  82.   if Request.Form("MesViewFlag")=1 then
  83.     rs("MesViewFlag")=Request.Form("MesViewFlag")
  84.     Conn.execute "ALTER TABLE sk_Message ALTER COLUMN  ViewFlag bit default 1"
  85.   else
  86.     rs("MesViewFlag")=0
  87.     Conn.execute "ALTER TABLE sk_Message ALTER COLUMN  ViewFlag bit default 0"
  88.   end if
  89.     if Request.Form("userAudit")=1 then
  90.     rs("userAudit")=Request.Form("userAudit")
  91.     Conn.execute "ALTER TABLE sk_Members ALTER COLUMN  Working bit default 1"
  92.   else
  93.     rs("userAudit")=0
  94.     Conn.execute "ALTER TABLE sk_Members ALTER COLUMN  Working bit default 0"
  95.   end if
  96.     rs("n_in")=trim(Request.Form("n_in"))
  97. rs("writesql")=trim(Request.Form("writesql"))
  98. rs("alert_url")=trim(Request.Form("alert_url"))
  99. rs("alert_info")=trim(Request.Form("alert_info"))
  100. rs("kill_info")=trim(Request.Form("kill_info"))
  101. rs("n_type")=trim(Request.Form("n_type"))
  102. rs("sec_forms")=trim(Request.Form("sec_forms"))
  103. rs("sec_form_open")=trim(Request.Form("sec_form_open"))
  104. rs("kill_ip")=trim(Request.Form("kill_ip"))
  105.   rs.update
  106.   rs.close
  107.   set rs=nothing 
  108.   Response.Redirect("Tips/Permissions.asp")
  109.   %>
  110.   </body>
  111. </html>