📄 admin_link.asp
字号:
<!--#include file="Include/conn.asp"-->
<!--#include file="include/char.asp" -->
<!--#include file="Include/check.asp"-->
<!--#include FILE="Include/Admin_Function.asp"-->
<%
'* 个人版价格:500元 商业版价格:700元
'* 演示:http://Demo.wenday.com
'* 版本:Engine_WenDay网站信息系统 Ver 2.0 演示版
'* 版权所有: 一奔网络工作室(Wenday.Com)
'* 联系QQ: 42367091
'* Email :wenday@21cn.com
'* 程序开发: Wenday
%>
<% CheckAdmin2%>
<%
Set Rs = Server.CreateObject("ADODB.Recordset")
'sql = "SELECT * FROM links Order BY id"
sql="SELECT links.id, link_Sort.name as LinkType, links.name, links.note, links.link, links.time FROM links INNER JOIN link_Sort ON links.Style = link_Sort.types ORDER BY links.id DESC"
'SELECT links.id, link_Sort.name, links.name, links.note, links.link, links.time FROM links INNER JOIN link_Sort ON links.Style = link_Sort.types ORDER BY links.id DESC;
set rs=conn.execute(sql)
if Request.QueryString("no")="yes" then
id= Trim(Request("id"))
Set Rs = Server.CreateObject("ADODB.Recordset")
sql = "DELETE FROM links Where id="&id
set rs=conn.execute(sql)
Set Rs= Nothing
Set Conn = Nothing
Response.Redirect "Admin_Link.asp"
end if
if Request.QueryString("no")="eshop" then
Style=request.form("Style")
note=request.form("note")
link=request.form("link")
name=request.form("name")
If name="" or note="http://"Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入网站名称,请返回检查!!"");history.go(-1);</script>")
response.end
end if
If note="" or note="http://"Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入图标连接,请返回检查!!"");history.go(-1);</script>")
response.end
end if
If link="" or link="http://" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没有输入超连接,请返回检查!!"");history.go(-1);</script>")
response.end
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from links"
rs.open sql,conn,1,3
rs.addnew
rs("Style")=Style
rs("name")=name
rs("note")=note
rs("link")=link
rs.update
Response.Redirect "Admin_Link.asp"
end if
%>
<link href="Img/Admin.css" rel="stylesheet" type="text/css">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<form method="post" action="Admin_Link.asp?no=eshop">
<td> <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="28" colspan="2" bgcolor="#EAEAEA">
<div align="center"><strong>链接管理(首页显示10个链接)</strong></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23">
<div align="center">链接分类:</div></td>
<td height="23">
<select name="Style" id="Style" >
<%
Sql2 = "Select * from Link_sort"
Set Rs2= Conn.Execute(Sql2 )
do while not Rs2.eof
%>
<option value="<%=Rs2("types")%>"><%=Rs2("name")%></option>
<%
Rs2.movenext
loop
Rs2.close
set Rs2=nothing
%>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20%" height="23">
<div align="center">网站名称:</div></td>
<td width="80%" height="23">
<input type="text" name="name" size="40" maxlength="40"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23">
<div align="center">网站说明:</div></td>
<td height="23">
<input type="text" name="note" size="40" maxlength="120"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23">
<div align="center">连接地址:</div></td>
<td height="23">
<input type="text" name="link" size="40" maxlength="50" value="http://"></td>
</tr>
<tr bgcolor="#EAEAEA">
<td height="22" colspan="2"> <div align="center">
<input type="submit" name="Submit" value=" 提交 ">
<input type="reset" name="Submit2" value=" 重置 ">
</div></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EAEAEA">
<td width="27%" height="25" bgcolor="#EAEAEA"> <div align="center">网站名称</div></td>
<td width="37%" bgcolor="#EAEAEA"> <div align="center">网站说明</div></td>
<td width="12%" bgcolor="#EAEAEA"><div align="center">网站类型</div></td>
<td width="12%" bgcolor="#EAEAEA"> <div align="center">加入时间</div></td>
<td colspan="2" bgcolor="#EAEAEA"> <div align="center">操作</div></td>
</tr>
<% do while not Rs.eof %>
<tr bgcolor="#FFFFFF">
<td height="22"> <a href="<%=Rs("link")%>" target="_blank"><%=rs("name")%></a></td>
<td> <%=Rs("note")%></td>
<td> <div align="center">
<%=Rs("LinkType")%></div></td>
<td> <div align="center"><%= FormatDateTime(rs("time"),2) %></div></td>
<td width="6%"><div align="center"><a href="Admin_EditLink.asp?id=<%=Rs("id")%>">修改</a></div></td>
<td width="6%"> <div align="center"><a href="Admin_Link.asp?id=<%=Rs("id")%>&no=yes">删除</a></div></td>
</tr>
<%Rs.MoveNext
loop
%>
</table>
<% Set Rs = Nothing
Set Conn = Nothing
%> </td>
</form>
</tr>
<tr>
<td height="22"><div align="right"></div></td>
</tr>
</table>
<!-- #include file="Include/Foot.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -