⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_link.asp

📁 政府网站集成OA办公考勤新闻发布网站信息管理会员管理
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%
if WS_S.MemberPriv("WS_FrontSetSystem")<>1 then HX_GoBack "对不起,您的权限不够!",""
dim adflperpage,Currentpage,totalfl,totalpages,showye
adflperpage=10 '修改的链接每页最多显示多少条
function strLength(str)
       ON ERROR RESUME NEXT
       dim WINNT_CHINESE
       WINNT_CHINESE    = (len("论坛")=2)
       if WINNT_CHINESE then
          dim l,t,c
          dim i
          l=len(str)
          t=l
          for i=1 to l
             c=asc(mid(str,i,1))
             if c<0 then c=c+65536
             if c>255 then
                t=t+1
             end if
          next
          strLength=t
       else 
          strLength=len(str)
       end if
       if err.number<>0 then err.clear
end function

dim founderr,flcatid,flname,flurl,fllogo
if request.form("MM_insert") then
if request.form("action")="newflcat" then
sql="select * from flcat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
dim flcatname
flcatname=trim(replace(request.form("flcat_name"),"'",""))
if flcatname="" then
  founderr=true
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
else
  rs("flcat_name")=flcatname
end if
if request.form("isimage")=1 then
  rs("isimage")=1
end if
if founderr then
  call diserror()
  response.end
else
  rs.update
  rs.close
  set rs=nothing
	conn.Close
	Set conn=nothing
  response.redirect "admin_link.asp"
end if
end if
if request.form("action")="editflcat" then
if request.Form("id")="" then
  founderr=true
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
'else
  'if not isInteger(request.form("id")) then
    'founderr=true
    'Response.Write("<script language=javascript>alert('非法的文章分类id参数。');history.back(1);</script>")
  'end if
end if
if founderr then
  call diserror()
  response.End
end if
sql="select * from flcat where flcat_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
flcatname=trim(replace(request.form("flcat_name"),"'",""))
if flcatname="" then
  founderr=true
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
else
  rs("flcat_name")=flcatname
end if
if request.form("isimage")<>"" then
  rs("isimage")=1
else
  rs("isimage")=0
end if
if founderr then
  call diserror()
  response.end
else
  rs.update
  rs.close
  set rs=nothing
	conn.Close
	Set conn=nothing
  response.redirect "admin_link.asp"
end if
end if
if request.form("action")="delflcat" then
if request.Form("id")="" then
  founderr=true
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
'else
  'if not isInteger(request.form("id")) then
    'founderr=true
    'Response.Write("<script language=javascript>alert('非法的分类id参数。');history.back(1);</script>")
  'end if
end if
if founderr then
  call diserror()
  response.End
end if
sql="select * from flcat where flcat_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
  rs.delete
  rs.close
  set rs=nothing
	conn.Close
	Set conn=nothing
  response.redirect "admin_link.asp"
end if
if request.form("action")="editfl" then
if request.Form("id")="" then
  founderr=true
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
'else
  'if not isInteger(request.form("id")) then
    'founderr=true
    'Response.Write("<script language=javascript>alert('非法的文章分类id参数。');history.back(1);</script>")
  'end if
end if
if founderr then
  call diserror()
  response.End
end if
sql="select * from friendlink where fl_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
flcatid=cint(request.form("flcat_id"))
flname=trim(replace(request.form("fl_name"),"'",""))
flurl=trim(replace(request.form("fl_url"),"'",""))
fllogo=trim(replace(request.form("fl_logo"),"'",""))
if flcatid<1 then
  founderr=true
  Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
else
  sql="select isimage from flcat where flcat_id="&cint(request.form("flcatid"))
   set rs2=server.createobject("adodb.recordset")
   rs2.open sql,conn,1,1
   if rs2("isimage")=1 then
     isimage=false
   end if
   rs2.close
   set rs2=nothing
   rs("flcat_id")=flcatid
end if
if flname="" then
   founderr=true
   Response.Write("<script language=javascript>alert('站点名称未填写!');history.back(1);</script>")
else
  if strLength(flname)>50 then
      founderr=true
	  Response.Write("<script language=javascript>alert('站点名称太长,不可以超过50个字符!');history.back(1);</script>")
  else
      rs("fl_name")=flname
  end if
end if
if flurl="" then
   founderr=true
   Response.Write("<script language=javascript>alert('站点地址未填写!');history.back(1);</script>")
else
  if strLength(flurl)>100 then
      founderr=true
	  Response.Write("<script language=javascript>alert('站点地址太长,不可以超过100个字符!');history.back(1);</script>")
  else
      rs("fl_url")=flurl
  end if
end if
rs("fl_logo")=fllogo
if founderr then
  call diserror()
  response.end
else
  rs.update
  rs.close
  set rs=nothing
	conn.Close
	Set conn=nothing
  response.redirect "admin_link.asp?action=link"
end if
end if
if request.form("action")="pass" then
if request.Form("id")="" then
  founderr=true
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
'else
  'if not isInteger(request.form("id")) then
    'founderr=true
    'Response.Write("<script language=javascript>alert('非法的分类id参数。');history.back(1);</script>")
  'end if
end if
if founderr then
  call diserror()
  response.End
end if
sql="select * from friendlink where fl_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
flcatid=cint(request.form("flcat_id"))
flname=trim(replace(request.form("fl_name"),"'",""))
flurl=trim(replace(request.form("fl_url"),"'",""))
fllogo=trim(replace(request.form("fl_logo"),"'",""))
if flcatid<1 then
  founderr=true
  Response.Write("<script language=javascript>alert('非法的分类参数!');history.back(1);</script>")
else
  sql="select isimage from flcat where flcat_id="&cint(request.form("flcatid"))
   set rs2=server.createobject("adodb.recordset")
   rs2.open sql,conn,1,1
   if rs2("isimage")=1 then
     isimage=false
   end if
   rs2.close
   set rs2=nothing
   rs("flcat_id")=flcatid
end if
if flname="" then
   founderr=true
   Response.Write("<script language=javascript>alert('站点名称未填写!');history.back(1);</script>")
else
  if strLength(flname)>50 then
      founderr=true
	  Response.Write("<script language=javascript>alert('站点名称太长,不可以超过50个字符!');history.back(1);</script>")
  else
      rs("fl_name")=flname
  end if
end if
if flurl="" then
   founderr=true
   Response.Write("<script language=javascript>alert('站点地址未填写!');history.back(1);</script>")
else
  if strLength(flurl)>100 then
      founderr=true
	  Response.Write("<script language=javascript>alert('站点地址太长,不可以超过100个字符!');history.back(1);</script>")
  else
      rs("fl_url")=flurl
  end if
end if
rs("fl_logo")=fllogo
if founderr then
  call diserror()
  response.end
else
  rs("passed")=0
  rs.update
  rs.close
  set rs=nothing
	conn.Close
	Set conn=nothing
  response.redirect "admin_link.asp?action=check"
end if
end if
if request.form("action")="lkpass" then
if request.Form("id")="" then
  founderr=true
  Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
'else
  'if not isInteger(request.form("id")) then
    'founderr=true
    'Response.Write("<script language=javascript>alert('非法的分类id参数。');history.back(1);</script>")
  'end if
end if
if founderr then
  call diserror()
  response.End
end if
sql="select * from friendlink where fl_id="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
  rs("lk")=0
  rs.update
  rs.close
  set rs=nothing
	conn.Close
	Set conn=nothing

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -