<?php
include_once("inc/config.php");
include_once("inc/ftbbsdbclass.php");
include_once("inc/publicfun.php");
include_once("conn.php");
include_once("ftbbs_nav.php");

$query = "SELECT * FROM {$tablepre}ftbbsmb";
$ftbbsmb=makecache('ftbbsmb.html',$query,$expire);
$defaulthome=$ftbbsmb[31];
$url=$ftbbsmb[10];
$bbsname=$ftbbsmb[11];

include_once("homeurl.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<title>友情链接</title>
<script language=javascript src="inc/cookies.js"></script>
<script>
//载入上次cookies记录的样式
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="main0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
</head>
<script language="javascript">
<!--
function check(form)
	{	
    if (form.name.value=="")
    	{
    		alert("网站名称不能为空！");
    		form.name.focus();
    		return false;
  	}
    if (form.url.value=="")
    	{
    		alert("网站地址不能为空！");
    		form.url.focus();
    		return false;
  	}
   return true;
	}
//-->
</script>
<body topmargin="2">
<table width="99%" border="0" align="center" cellpadding="1" cellspacing="1"  class="maintbbg">
  <tr>
    <td height="26" class="f12bg">&nbsp;<?=$userinfo?></td>
  </tr>
  <tr>
    <td height="26" class="maintbtr1">&nbsp;<a href="<?=$homepage?>">论坛首页</a> >> 友情链接</td>
  </tr>
  <tr> 
    <td height="150" class="maintbtr3"> 
      <div align="center">申请友情链接前，请先在贵站做上本站的文字链接(不做LOGO链接)<br>
        如果在贵站未发现本站文字链接或者贵站不符合本站要求,友情链接将不会生效<br>
        <br>
        <strong>本站链接代码</strong> <br>
        <br>
        <textarea name="textarea" cols="50" rows="3" id="textarea" onClick="select()"><a href="<?=$url?>" title="<?=$bbsname?>" target="_blank"><?=$bbsname?></a></textarea>
      </div></td>
  </tr>
  <tr> 
    <td valign="top" class="maintbtr3">
	<form action="link.php" method="post" name="myoe" id="myoe" style="MARGIN-BOTTOM: 0px" onsubmit="return check(this)">
        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="maintbtr3">
          <tr > 
            <td height="30" colspan="2"> 
              <div align="center"><strong>申请友情链接</strong></div></td>
          </tr>
          <tr> 
            <td width="31%"> <div align="right">链接类型：<font color="#FF0000">*</font></div></td>
            <td width="69%"> <input name="li" type="radio" value="1" checked>
              文字链接 
              <input type="radio" name="li" value="2">
              LOGO链接</td>
          </tr>
          <tr> 
            <td> <div align="right">网站名称：<font color="#FF0000">*</font></div></td>
            <td > <input name="name" type="text" id="name" size="50" maxlength="20"></td>
          </tr>
          <tr> 
            <td> <div align="right">网站地址：<font color="#FF0000">*</font></div></td>
            <td > <input name="url" type="text" id="url" value="http://" size="50"></td>
          </tr>
          <tr> 
            <td> <div align="right">LOGO地址：</div></td>
            <td > <input name="logo" type="text" id="logo" size="50"></td>
          </tr>
          <tr> 
            <td> <div align="right">QQ&nbsp; 号码：</div></td>
            <td > <input name="qq" type="text" id="zhu22" size="50" maxlength="11"></td>
          </tr>
          <tr> 
            <td> <div align="right">邮箱地址：</div></td>
            <td > <input name="mail" type="text" id="zhu32" size="50" maxlength="30"></td>
          </tr>
          <tr> 
            <td> <div align="right">给站长留言：</div></td>
            <td > <textarea name="zhu" cols="49" rows="7" id="zhu"></textarea></td>
          </tr>
          <tr > 
            <td height="50" colspan="2" align="center"> 
              <input type="submit" name="Submit" value="提交"> 
              &nbsp; <input type="reset" name="Submit2" value="重置">
            </td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
<?
include_once("inc/bbstail.php");
?>
</body>
</html>
