<!-- #include file="setup.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>申请友情链接 - POWER BY YEBBS</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>

<body>
<%
select case Request("link")
case ""
show

case "add"
add

end select

sub show
%>
<form name="form1" method="post" action="link.asp?link=add">
  <p align="center"><br>
  友情链接</p>
  <table width="328" border="0" align="center" cellpadding="1" cellspacing="1" class="a2">
<tr class="a1">
      <td height="20" colspan="2"><div align="left">■ 友情链接申请</div>        <div align="left">        </div></td>
    </tr>
    <tr class="a3">
      <td width="85"><div align="center">网站名称：</div></td>
      <td width="227">
        <div align="left">
          <input name="name" type="text" id="name" size="31">
        </div></td>
    </tr>
    <tr class="a3">
      <td><div align="center">链接地址：</div></td>
      <td>
        <div align="left">
          <input name="url" type="text" id="url" value="http://" size="31">
        </div></td>
    </tr>
    <tr class="a3">
      <td><div align="center">LOGO地址：</div></td>
      <td>
        <div align="left">
          <input name="logo" type="text" id="logo" value="http://" size="31">
        </div></td>
    </tr>
    <tr class="a3">
      <td valign="top"><div align="center">网站说明：</div></td>
      <td>
        <div align="left">
          <input name="intro" type="text" id="intro" value="" size="31" maxlength="20">
        </div></td></tr>
    <tr class="a3">
      <td colspan="2"><div align="center"></div>                <div align="center">
           <input type="submit" name="Submit" value="提交"> 
           　
          <input type="reset" name="Submit2" value="重置">
      </div></td>
    </tr>
  </table>
</form>
<center>
<% end sub %>
<% sub add
name=HTMLEncode(Request("name"))
url=HTMLEncode(Request("url"))
logo=HTMLEncode(Request("logo"))
intro=HTMLEncode(Request("intro"))
if name="" then
error2("站点名称不能为空！")
end if
if url="" then
error2("站点链接不能为空！")
end if
If conn.Execute("Select id From [BBSXP_link] where name='"&name&"'" ).eof then
sql="insert into [BBSXP_link] (name,url,logo,intro,Review) values ('"&name&"','"&url&"','"&logo&"','"&intro&"','0')"
conn.execute(sql)
%>
<br>
<br><br>
<center>
申　请 成 功 ！<br><br><a href=link.asp>< 返 回 ></a><br><br>请等待管理员审核！谢谢！感谢您对我论坛的支持</center>
<% else %>
<br>
<br><br>
<center>
对不起 ！<br><br>您已经申请过了，请不要重复申请！<br><br><a href=link.asp>< 返 回 ></a><br><br>等待管理员审核！谢谢！感谢您对我论坛的支持</center>
<% end if %>
<%
end sub
%>
</body>
</html>
