<?php
include("admin.php");
$rst=mysql_query("SELECT * FROM `".$ad."sjadmin` WHERE `name` LIKE '{$_SESSION['name']}'");
$rwt=mysql_fetch_assoc($rst);
if($_POST['name']&&$_POST['url']){
mysql_query("INSERT INTO `".$ad."lisk` (`id` ,`name` ,`url` ,`qq` ,`time` )
VALUES (NULL , '{$_POST['name']}', '{$_POST['url']}', '{$_POST['qq']}', NOW( ) )");
echo "<script language=javascript>  
alert( \"恭喜你，连接添加成功\"  );
location.href = \"lisk_view.php\"
</script>";
}
?>
<html>
<head>
<title> 欢迎光临手机靓号发布管理系统-管理面版 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Css.css" rel="stylesheet" type="text/css" />
<script src="js/time.js"></script>
</head>
<script language="javascript">
function checklogin(){
if (document.ad3.pic.value==""){
	alert('广告图片网址不能为空！');
	document.ad3.pic.focus();
	return false;
}
if (document.ad3.cid.value==""){
	alert('广告排顺的位置不能为空！');
	document.ad3.cid.focus();
	return false;
}
if (document.ad3.mtime.value==""){
	alert('广告到期时间不能为空！');
	document.ad3.mtime.focus();
	return false;
}
if (document.ad3.url.value==""){
	alert('广告连接网址不能为空！');
	document.ad3.url.focus();
	return false;
}
	return true;
}
</script>
<body  >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="30" background="images/Mypic_top15.gif"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><img src="images/Mypic_top14.gif" width="14" height="14" align="absmiddle"> 
            欢迎光临手机靓号发布管理系统</td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellspacing="4" cellpadding="0">
        <tr> 
          <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9FD74E">
              <tr> 
                <td height="26" background="images/Mypic_top12.gif"> <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td><img src="images/Mypic_top13.gif" width="18" height="9" align="absmiddle"> 
                        添加友情链接 </td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="4" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#EBEBEB" class="tableoutline">
                          <form method="post" name="adyq" action="" onSubmit="return checklogin()">
                            <tr bgcolor="#F5F5F5" id="cat"> 
                              <td colspan="2" class="tbhead"> <b>友情链接添加：</b> <input name="id" type="hidden" id="id" value="<?=$rw['id']?>"></td>
                            </tr>
                            <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">网站名称：</td>
                              <td width="80%"> 
                                <input name="name"  type="text" id="name" value="" size="35">
                              </td>
                            </tr>
							 <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">网站排序：</td>
                              <td width="80%"> 
                                <input name="cid"  type="text" id="cid" value="" size="35">
                              </td>
                            </tr>
                            <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">网站地址：</td>
                            <td width="80%"> 
                                <input name="url"  type="text" id="url" value="" size="35" >
                              </td>
                            </tr>
                            <tr nowrap bgcolor="#FFFFFF" class="secondalt">
                              <td align="right">站长 QQ：</td>
                              <td><input name="qq"  type="text" id="qq" value="" size="35"></td>
                            </tr>
                            <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                              <td width="20%" align="right">&nbsp;</td>
                              <td> 
                                <span id="errMsg_admin[pwd2]" class="errmsg"></span> 
                              </td>
                            </tr>
                            <tr bgcolor="#FFFFFF" class="tbhead"> 
                              <td colspan="2" align="center"> 
                                <input class="bginput" type="submit" name="submit" value=" 确定添加 " > 
                                <input class="bginput" type="reset" name="Input" value=" 重新填写 " > 
                              </td>
                            </tr>
                          </form>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<center>Powered by: <a href="http://www.126php.com" target="_blank">www.126php.com</a> 程序开发:*!!杨公子 联系QQ:61709225</center>
</body>
</html>