<!--#include file="../conn/conn_other.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	if Trim(Request.QueryString("action"))="add" then
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from ad_link"
		rs.open sql,conn,2,3
		rs.addnew
		rs("name")=Trim(Request.Form("title"))
		rs("type1")=Trim(Request.Form("type1"))
		rs("link")=Trim(Request.Form("link1"))
		if Trim(Request.Form("logo"))<>"" then rs("logo")=Trim(Request.Form("logo"))
		rs("link_art")=Trim(Request.Form("link_art"))
		rs("state")=0
		rs("shunxu")=0
		rs("maxfont")=0
		rs("type2")=1
		rs("TitleFontColor")="#000000"
		rs.update
		response.write"<script language=JavaScript>alert('您的操作已完成，我们正在对您的站点进行审核，请稍等');"    
		response.write"this.location.href='links.asp';</script>"
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
	end if	
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="Shortcut Icon" href="../images/person/favicon.ico">
<link rel="Bookmark" href="../images/person/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<TITLE><%= homename %>--在线留言</TITLE>
<meta name="Keywords" content="<%= webmeta %>">
<meta name="Description" content="<%= webmeta1 %>">
<link rel="stylesheet" href="css/css.css" type="text/css">
<style type="text/css">
<!--
.font12graylight {	font-size: 12px;
	color: #999999;
}
.font12white {	font-size: 12px;
	color: #FFFFFF;
}
.STYLE2 {	color: #666666;
	font-weight: bold;
}
.STYLE9 {color: #000000}
.STYLE6 {font-size: 12px; color: #000000; }
.STYLE7 {color: #FFFFFF}
.STYLE8 {color: #546ABD; font-weight: bold; }
.STYLE11 {color: #5066BB; font-weight: bold; }
.border03line {	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-top-color: #949494;
	border-right-color: #949494;
	border-bottom-color: #949494;
	border-left-color: #949494;
}
body,td,th {
	font-size: 12px;
}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
function check()
{
    if(document.userinfo.title.value==""){
		document.userinfo.title.focus();
    	alert("请输入网站名称！");
	return false;
  }
    if(document.userinfo.link1.value=="") {
	document.userinfo.link1.focus();
    alert("请输入连接地址！");
	return false;
  }
   if(document.userinfo.link_art.value=="") {
	document.userinfo.link_art.focus();
    alert("对不起，请填写站点说明！");
	return false;
  }
}
//-->
function showsubmenu()
{
whichEl = eval("submenu");
if (whichEl.style.display == "none")
{
eval("submenu.style.display=\"\";");
}
}

function closesubmenu()
{
whichEl = eval("submenu");
if (whichEl.style.display != "none")
{
eval("submenu.style.display=\"none\";");
}
}
</script>
</head>
<body>
<table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#ffffff" border="0" id="table49"> 
	<tr> 
		<td height="23" bgColor="#efefef" style="font-size: 12px"><b>&nbsp;图片链接</b></td> 
	</tr>
</table>
<table cellSpacing="0" width="100%" border="0" id="table53">
<tr>
 <td style="font-size: 12px">
   <div align="left" style="font-size: 12px"> 
	 <table width="99%" bgColor="" border="0" id="table54" cellspacing="4"> 
	   <tr> 
			<TD align=middle>
<%
	sql = "select top 14 * from ad_link where type1=0 and state=1 and type2=0 order by shunxu desc,id desc" 
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.OPEN sql,Conn,1,1
	Response.Write"<table border='0' cellspacing='0' cellpadding='5' align='center'>"
	top1=1
	if rs.bof and rs.eof then 
		response.write "<tr><td align='center'>没有任何图片链接</td></tr>" 
	else
		Response.Write"<tr align='center'>"
		do while not rs.eof
		for hangpicnum2=1 to 7
		if rs.eof then exit for
		Response.Write"<td>"
		Response.Write"<table border='0' align='center' cellspacing='0'><tr><td><div align='center'><a href='"&rs("link")&"'><img src='"&rs("logo")&"' width='88' height='31' border='0' ></a></div></td></tr></table></td>"
		rs.movenext
		top2=top2+1
		next
		Response.Write"</tr>"
		loop
	end if
	rs.Close
	set rs=nothing
	Response.Write"</table>"
%>
			</TD> 
		</tr> 
	 </table> 
   </div>
   </td>
 </tr>
</table>
<span style="font-size: 12px"></span>
<table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#ffffff" border="0" id="table56"> 
	<tr> 
		<td height="23" bgColor="#efefef" style="font-size: 12px"><b>&nbsp;文字链接</b></td> 
	</tr> 
</table> 
       
<table width="100%" border="0" id="table54" cellspacing="4"> 
	<tr> 
		<TD width="100%" align=left style="font-size: 12px">
<%
	sql = "select * from ad_link where type1=1 and state=1 and type2=0 order by shunxu desc,id desc" 
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.OPEN sql,Conn,1,1
	Response.Write"<table border='0' cellspacing='0' cellpadding='5' align='center'>"
	top1=1
	if rs.bof and rs.eof then 
		response.write "<tr><td align='center'>没有任何文字链接</td></tr>" 
	else
		Response.Write"<tr align='center'>"
		do while not rs.eof
		for hangpicnum1=1 to 9
		if rs.eof then exit for
		if rs("maxfont")=1 then
			ab="<b>"
			bc="</b>"
		else
			ab=""
			bc=""
		end if
		Response.Write"<td>"
		Response.Write"<table border='0' align='center' cellspacing='0'><tr><td><div align='center'><a href='"&rs("link")&"' target=_blank><font color='"&rs("titlefontcolor")&"'>"&ab&""&rs("name")&""&bc&"</font></a></div></td></tr><TR ><TD HEIGHT='2'><IMG HEIGHT=1 SRC='images/line1.jpg' WIDTH=70></TD></TR></table></td>"
		rs.movenext
		top1=top1+1
		next
		Response.Write"</tr>"
		loop
	end if
	rs.Close
	set rs=nothing
	Response.Write"</table>"
%>
		</TD>
	</tr>
</table>
<span style="font-size: 12px"></span>
<table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#ffffff" border="0" id="table63"> 
	<tr> 
	  <td bgColor="#efefef" height="23"><b>&nbsp;申请链接</b></td> 
	</tr> 
</table> 
<table cellspacing="1" cellpadding="4" width="100%" border="0" id="table68">
<form action="?action=add" method="post" onSubmit="return check()" name="userinfo">
  <tr> 
	<td align="right">链接类别：</td> 
	<td> <input style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" onClick="showsubmenu();" type="radio" value="0" name="type1"> 
	  图片链接
	  <input style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" onClick="closesubmenu();" type="radio" CHECKED value="1" name="type1"> 
	  文字链接</td> 
  </tr> 
  <tr> 
	<td width="29%" align="right">网站名称：</td> 
	<td width="67%"> <input name="title" type="text" id="title" size="40"> </td> 
  </tr> 
  <tr> 
	<td align="right">网站说明：</td> 
	<td> <input id="link_art" size="40" name="link_art"></td> 
  </tr> 
  <tr id="submenu" style="DISPLAY: none"> 
	<td align="right">链接图片：</td> 
	<td> <input id="logo" size="40" value="http://" name="logo"></td> 
  </tr> 
  <tr> 
	<td align="right">网站地址：</td> 
	<td> <input name="link1" type="text" id="link1" value="http://" size="40"></td> 
  </tr> 
  <tr> 
	<td colspan="2" align="center"><input type="submit" value="  提  交  " name="Submit"><input type="reset" value="  重 置  " name="Submit2"></td> 
  </tr> 
</form>
</table>
<span style="font-size: 12px"></span><br> 
<table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#ffffff" border="0" id="table70">
	<tr> 
	  <td bgColor="#efefef" height="23"><b>&nbsp;我们的链接</b></td> 
	</tr>
</table> 
<table cellSpacing="1" cellPadding="4" border="0" id="table75" width="100%"> 
	<tr> 
		<td colSpan="2" style="FONT-SIZE: 14px"> <span style="font-size: 12px">欢迎您成为我们的合作伙伴，请您在网站做好我们的链接后给我们发信，我们会在3个工作日内完成与您的合作。</span></td> 
	</tr> 
	<tr> 
		<td width="368" align="middle">图片链接效果:<br>
	    <br><a href="<%= homeurl %>" target="_blank"><img src="<%= homeurl %>/images/logo.gif" border="0" alt="<%= homename %>" /></a></td> 
	    <td width="848" align="middle"><textarea name="logolink1" rows="3" cols="59"><a href="<%= homeurl %>" target="_blank"><img src="<%= homeurl %>/images/logo.gif" border="0" alt="<%= homename %>" /></a></textarea></td>
	</tr>
	<tr>
	  <td align="middle">文字链接效果:<br><br><a href="<%= homeurl %>" target="_blank" title="<%= homename %>"><%= homename %></a></td>
      <td align="middle"><textarea name="textlink" rows="3" cols="59"><a href="<%= homeurl %>" target="_blank" title="<%= homename %>"><%= homename %></a></textarea></td>
  </tr> 
</table>
</body>
</HTML>
