?? 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 + -