gusucode.com > 学校共青团组织网站源代码 > 学校共青团组织网站源代码/626/admin/admin_link_add_save.asp

    
<!--#include file = admin_chk.asp -->
<%
if Request.Cookies("admindj")<>"1" then
   Response.Write "<BR><BR><BR><BR><center>权限不足,你没有此功能的管理权限"
   Response.end
end if
%>
<!--#include file = admin_conn.asp -->
<html>

<head>
<!--#include file = language.asp -->
<title>网站名称</title>
<style>
<!--
a:link       { font-size: 10.5pt; font-family: 宋体; color: #0066CC;text-decoration: none; }
a:visited    { color: #0066CC; font-family: 宋体; font-size: 10.5pt;text-decoration: none; }
a:hover      { font-size: 10.5pt; font-family: 宋体; color: #0066CC;TEXT-DECORATION: underline; }
body         { font-family: 宋体; color: #000000; font-size: 10.5pt }
p            { color: #000000; font-family: 宋体; font-size: 10.5pt }
td           { font-size: 10.5pt; font-family: 宋体; color: #000000 }
input           { font-size: 10.5pt; font-family: 宋体; color: #000000 }
-->
</style>
</head>

<body>

<%

lb=trim(request("lb"))

if (not isNumeric(LB)) then
   Response.Write "<script>alert('请选择正确的分类。');</script> <meta http-equiv='refresh' content='0; url=javascript:window.history.go(-1);'>"
   Response.end
end if

if request("linkname")<>"" and request("url")<>"" then

  if request("id")="" then

  sql = "select top 1 * from link"
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,3
  
  rs.addnew
  
 else
 
  sql = "select * from link where id="&request("id")
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,3
   
end if


  rs("linkname")=request("linkname")
  rs("url")=trim(request("url"))
  rs("logo")=trim(request("logo"))
  rs("js")=trim(request("js"))
  rs("PIC")=trim(request("PIC"))
  rs("lb")=LB
  rs("sh")=trim(request("sh"))
  rs.update
  
  rs.close
  set rs=nothing
end if
%>
</body>
<%
conn.close
set conn=nothing


Response.Redirect "admin_link.asp"
%>
</html>