📄 link_img.asp
字号:
<!--#include file="conn.asp"-->
<%if session("china_admin")="" then
response.redirect "login.asp"
end if
dim action,id,dname
id=request.QueryString("id")
action=request.querystring("action")
dweb=trim(request("web"))
dsm=trim(request("sm"))
if dweb<>"" and clng(id)>0 then conn.execute("update link_img set web='"&dweb&"' where id="&clng(id)&"")
select case action
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from link_img",conn,1,3
rs.AddNew
rs("web")=dweb
rs("sm")=dsm
rs("link")=trim(request("link"))
rs.Update
rs.Close:set rs=nothing
case "edit"
conn.execute("update link_img set sm='"&dsm&"',link='"&trim(request("link"))&"' where id="&id&"")
case "del"
conn.execute ("delete from link_img where id="&id)
conn.close:set conn=nothing
response.Redirect "link_img.asp"
end select
%>
<html>
<head>
<title>友情链接管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
<tr>
<td height="20" bgcolor="#799AE1" align="center"><a href="link.asp"><font color="#FFFFFF" style="font-size:14px">
文 字 友 情 链 接 管 理</font></a></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> <br>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
<tr align="center" bgcolor="#FFFFFF" height="20">
<td width="30">编号</td>
<td>网址链接</td>
<td>文字说明</td>
<td>管理操作</td>
<td>图片地址(链接有效)</td>
<td>上传图片</td>
</tr>
<%set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from link_img order by id",conn,1,1
dim follows
if rs.EOF and rs.BOF then
response.write"<tr bgcolor=#FFFFFF><td colspan='4'><p align='center'><font color='red'>暂无友情链接!</font></td></tr></table><br>"
follows=0
else
i=0
do while not rs.EOF
i=i+1
%>
<tr bgcolor="#FFFFFF" align="center">
<td><%=i%></td><form name="form1" method="post" action="?action=edit&id=<%=int(rs("id"))%>">
<td>
<input name="link" type="text" id="link" value="<%=trim(rs("link"))%>" size="15">
</td>
<td>
<input name="sm" type="text" id="sm" value="<%=trim(rs("sm"))%>" size="10">
</td>
<td>
<input type="submit" name="Submit" value="修 改">
<input type="button" name="DEL" onclick="{if(confirm('确定要删除这个友情链接吗?\n此操作不可以恢复!')){location.href='?id=<%=rs("id")%>&action=del';}return false;}" value="删除" >
</td>
</form>
<td><input name="web2" type="text" id="web2" value="<%=trim(rs("web"))%>" size="15"></td>
<form name="form1" method="post" action="../upfile_photo.asp?id=<%=rs("id")%>" enctype="multipart/form-data">
<td align="center">
<input type="file" name="file1" size=15 class="an">
<input type="submit" name="Submit" value="上传" class="an" style="font-size: 12px">
<input name="PhotoUrlID" type="hidden" id="PhotoUrlID" value=2>
</td>
</form>
</tr>
<%rs.MoveNext
loop
follows=rs.RecordCount
end if%>
</table>
<br></td>
</tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
<tr>
<td height="20" bgcolor="#799AE1" align="center"><font color="#FFFFFF" style="font-size:14px">添
加 文 字 友 情 链 接</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<br>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
<tr align="center" bgcolor="#FFFFFF" height="20">
<td width="30">编号 </td>
<td>图片地址</td>
<td>网址链接</td>
<td>文字说明</td>
<td>确定操作</td>
</tr>
<form name="form1" method="post" action="?action=add">
<tr align="center" bgcolor="#FFFFFF">
<td><%=rs.RecordCount+1%></td>
<td>
<input name="web" type="text" id="web" size="30">
</td>
<td>
<input name="link" type="text" id="link" size="20">
</td>
<td>
<input name="sm" type="text" id="sm" size="20">
</td>
<td>
<input type="submit" name="Submit3" value="添 加">
</td>
</tr>
</form>
</table>
<br></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -