<%dbs="../"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<%
act=request("act")
if act="del" then
old_linkpic=conn.execute("select linkpic from H_Link where ID="&request("id")&"")("linkpic")

						'''开始删除文件
								Dim objFSO         '声明一个名称为   objFSO   的变量以存放对象实例   
								Set objFSO   =   Server.CreateObject("Scripting.FileSystemObject")   
									objFSO.DeleteFile   Server.MapPath("../UpLoadUC/"&old_linkpic&""),True   
								Set objFSO   =   Nothing             '释放   FileSystemObject   对象实例内存空间  
						''删除文件结束
conn.execute("delete from H_Link where id="&request("id")&"")
response.Write "<script >alert('提示：\n\n删除成功,立即返回...');location.href='mylink.asp';</script>"
response.End()
end if
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<title><%=W_title%>,会员中心</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="style.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript src="images/jquery.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript src="images/function.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript type=text/javascript>
<!--


/*
function AddnewType()
*/
-->
</SCRIPT>

<META content="MSHTML 6.00.3790.4426" name=GENERATOR>
</HEAD>
<BODY><!--用户中心头部-->
<!--#include file="top.asp"-->
<table width="960" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="150" valign="top"><!--#include file="left.asp"--></td>
      <td width="810" align="right" valign="top"><table width="800" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="20" align="center"><img src="images/ico_4.gif" width="12" height="12"></td>
                <td height="30" align="left"><a href="index.asp" target="_self">用户中心</a> <span class="uc_huise">&gt; 友情连接管理</span></td>
            </tr>
            <tr>
                <td height="1" colspan="2" bgcolor="#EEEEEE"></td>
        </tr>
        </table>
            <table width="600" height="5" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
			<form name="form" action="mylink_save.asp" method="post"  enctype="multipart/form-data"   target="_self">
            <table width="800" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE">
                <tr>
                    <td height="30" colspan="2" align="left" bgcolor="#FFFFFF" class="uc_huise">增加友情连接                        </td>
                </tr>
                <tr>
                    <td width="128" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >主页名称：</td>
                    <td height="6" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="linkname" type="text" id="linkname"></td>
                </tr>
                <tr>
                  <td width="128" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >链接地址：</td>
                  <td height="7" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="linkurl" type="text" id="linkurl" value="http://yourname.com"></td>
                </tr>
                <tr>
                  <td width="128" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >链接形式：</td>
                  <td height="15" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input type="radio" name="LINKKEY" value="1">
                    文字链接 
                    <input type="radio" name="LINKKEY" value="2">
                    图片链接</td>
                </tr>
                <tr>
                  <td width="128" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >链接图片：</td>
                  <td height="90" align="left" bgcolor="#FFFFFF" class="uc_huise" ><img src="../images/xx2.gif?1230944324834" name="picview" class="biao" id="picview" onload='javascript:if(this.width>100){this.width=100}' /><br>
        <input name="linkpic" type="file" size="40" id="spaceimage" onChange="SeePic($Obj('picview'),$Obj('spaceimage'));" />					
		    <input type="hidden" name="oldimg" value="images/wh.jpg" /></td>
                </tr>
                <tr>
                  <td width="128" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >&nbsp;</td>
                  <td height="30" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="Submit" type="submit" class="biao" id="Submit" value="立即增加"></td>
                </tr>
            </table>
	        
			</form>
			
		    <table width="200" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
			
			
			
			
			
		    <table width="800" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE">
              <tr>
                <td height="30" colspan="5" align="left" bgcolor="#FFFFFF" class="uc_huise">友情连接管理</td>				
              </tr>
			  
			  <%
		set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_Link order by id desc"
	rs.open sql,conn,1,1
	if rs.eof then
	response.Write " <td class=uc_huise bgcolor=#FFFFFF height=30 align=center >没有增加友情连接</td>"
	else
	do while not rs.eof 
		%>
			  
			  
              <tr>
                <td width="128" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >链接名称：</td>
                <td width="166" height="30" align="left" bgcolor="#FFFFFF" class="uc_huise" ><%=rs("linkname")%></td>
                <td width="48" align="left" bgcolor="#FFFFFF" class="uc_huise" >地址</td>
                <td align="left" bgcolor="#FFFFFF" class="uc_huise" ><%=rs("linkurl")%></td>
                <td width="113" align="center" bgcolor="#FFFFFF" >
				<table width="66" height="23" border="0" cellpadding="0" cellspacing="0" class="biao">
                  <tr>
                    <td align="center"><a href="?act=del&id=<%=rs("id")%>" target="_self">删除</a></td>
                  </tr>
			  </table></td>				
              </tr>
			  
				
				<%
				rs.movenext 
				
				loop
				rs.close
				end if
				%>
            </table>
			
		
			
			
			
			
	  </td>
    </tr>
</table>
<!--#include file="end.asp"-->

</BODY></HTML>
