<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;
}
</SCRIPT>
<%
response.cachecontrol="no-cache"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "SELECT * FROM links  order by paixv desc,id desc",Conn,1,1

if Request.QueryString("no")="yes" then
id= Trim(Request("id"))
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "DELETE FROM links Where id="&id,Conn,2,3,1

Set Rs= Nothing
Set Conn = Nothing
Response.Redirect "Manage_Link.asp"
end if

if Request.QueryString("mark")="southidc" then

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 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"

Set rsid = Server.CreateObject("ADODB.Recordset")
sqlid="select max(paixv) as curpaixvid from links"
rsid.open sqlid,conn,1,1

rs.open sql,conn,1,3
rs.addnew
rs("name")=name

rs("link")=link

rs("paixv")=rsid("curpaixvid")+1

rs.update
rsid.close
Response.Redirect "Manage_Link.asp"
end if
%>
<script language="javascript">
<!--
function openwin(href)
{
	window.open(href,'answerwin','location=no,height=350, width=450, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}
//-->
</script>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="68" align="center" valign="top" bgcolor="#A0CCD8"><!--#include file="adminleft.asp"--></td>
    <td width="925" align="center" valign="top">      <div align="center">
        <table width="100%" height="0"  border="0" cellpadding="5" cellspacing="0">
          <tr>
            <td height="24" background="image/usercenter_3.jpg"><div align="center"><font color="#FFFFFF"><strong>友 情 链 接 管 理</strong> </font> </div></td>
          </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="table_southidc">
          <tr>
            <form method="post" name="DailynForm" action="Manage_Link.asp?mark=southidc">
              <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                  <tr>
                    <td width="21%" height="22" bgcolor="#C2DAE1"><div align="center">网站名称</div></td>
                    <td width="79%" bgcolor="#EFEEE9"><input type="text" name="name" size="40" maxlength="40">                    </td>
                  </tr>
                  <tr>
                    <td height="22" bgcolor="#C2DAE1"><div align="center">链接地址</div></td>
                    <td bgcolor="#EFEEE9"><input name="link" type="text" size="40" maxlength="200">
                      此项不要改动。</td>
                  </tr>
                  <tr bgcolor="#A4B6D7">
                    <td height="30" colspan="2" bgcolor="#C2DAE1"><div align="center">
						<%call man_r4("submit","提交","Submit","","Sys_linksMan")%>
                        &nbsp;&nbsp; 
                        <input type="reset" name="Submit2" value="重置">
                    </div></td>
                  </tr>
                </table>
                  <br>
                  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                    <tr bgcolor="#ECF5FF">
                      <td width="150" height="25" bgcolor="#EFEEE9"><div align="center">网站名称</div></td>
                      <td bgcolor="#EFEEE9"><div align="center">链接地址</div></td>
                      <td bgcolor="#EFEEE9"><div align="center">加入时间</div></td>
                      <td colspan="2" bgcolor="#EFEEE9"><div align="center">操作</div>                        </td>
                    </tr>
                    <% do while not Rs.eof %>
                     <tr bgcolor="#EFEEE9" onMouseOver=this.bgColor='#ffffff' onmouseout=this.bgColor='#EFEEE9'> 
                      <td height="22">&nbsp;
                      <%call man_r("setlinkpaixv.asp?Id="&rs("Id")&"&Action=up","<font color='red'>↑</font>","Sys_linksMan")%></a>&nbsp;<a href="<%=Rs("link")%>" target="_blank"><%=rs("name")%></a>&nbsp;</td>
                      <td><div align="center"><%=Rs("link")%></div></td>
                      <td><div align="center"><%= FormatDateTime(rs("time"),2) %></div></td>
                      <td width="50"><div align="center"><%call man_r("Manage_editlink.asp?id="&Rs("id")&"","修改","Sys_linksMan")%></div></td>
                      <td width="50"><div align="center"><%call man_rdel("Manage_Link.asp?id="&Rs("id")&"&amp;no=yes","删除","Sys_linksMan")%></div></td>
                    </tr>
                    <%Rs.MoveNext 
loop 
%>
                </table>
                <%  
Set Rs = Nothing 
Set Conn = Nothing 
%>
              </td>
            </form>
          </tr>
          <tr>
            <td>首页最多可显示10条友情链接</td>
          </tr>
        </table>
    </div></td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->