<?php 
require_once 'conn.php';
require_once 'function.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"/>
<title><?=$site['sitename']?></title>
<meta name="keywords" content="<?=$site['keywords']?>"/>
<meta name="description" content="<?=$site['description']?>"/>
<meta name="baidu-site-verification" content="Y99UPs6YIc" />
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="open.css">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
function squrl(id){
  $.get("user_squrl.php", { id: id },
  function(data){
    alert(data);
	
  });
}

function gourl(str){
window.open(str);
}
</script>
</head>
 
<body>  
<?php 
require_once 'head.php';
?>
<div class="container">
  <div class="box">  	
  
   <!-- 友情链接板块 -->
   <div class="row">
   
	   <table class="table table-bordered  table-responsive biaoge">
		  <caption>最新友情链接交换</caption>

		  <tbody>
		   <tr>
			  <td>站点名称</td>
			  <td>站点url</td>
			  <td>百度收录</td>
			  <td>百度权重</td>
			  <td>网站类别</td>
			  <td>扫码交换</td>
			  <td>QQ交换</td>
			  <td>交换要求</td>
			  <td>申请交换</td>
			</tr>
			
			<?php 
			
			$sql = "select * from url_data order by id desc limit 20"; 					
			$arr = listquery($sql);						
			foreach ($arr as $v) {			
			?>			
			<tr>
			  <td onClick="gourl('http://<?=$v['url']?>');"><?=$v['sitename']?></td>
			  <td onClick="gourl('http://<?=$v['url']?>');"><?=$v['url']?></td>
			  <td><?=$v['baidu']?></td>
			  <td><img src="images/qz/bds<?=$v['quanzhong']?>.gif" /></td>
			  <td>
				 <?=$v['type']?>
			  </td>
			  <td>
			  <?php 
			  $src=$v['weixin'];
			  if($src){
			  echo '<img src="'.$src.'" />';
			  }
			  ?>
			  </td>
			  <td><a href="http://wpa.qq.com/msgrd?v=3&uin=<?=$v['qq']?>&site=www.ttlinkw.com&menu=yes" class="l" target="_blank"><img src="http://wpa.qq.com/pa?p=1:<?=$v['qq']?>:4" title="QQ" /></a></td>
			  <td><?=$v['yaoqiu']?></td>
			  <td>
			  <button  class="btn btn-success" onClick="squrl('<?=$v[id]?>');">申请</button>
			   <?php
				  $taurl=$v['url'];
				  $pan=query("select * from url_huan where user='$user' and taurl='$taurl'");
				  if($pan){
				   echo '<font color=blue>已申请</font>';
				  }
			  ?>
			  </td>						 
			</tr>			
		   <?php
			}
			?>
			
		  </tbody>
		</table>
		
   </div>
   <!-- 友情链接板块 -->
   

   
   <div class="row">
     
        <div class="col-md-4">
           <div class="panel panel-default">
				<div class="panel-heading">互联网资讯</div>				
				<ul class="list-group xue">
				<?php				
				$sql = "select * from news where typename='创业动态' order by id desc limit 6";				
				$arr = listquery($sql);					
				foreach ($arr as $v) {
				?>
					<li class="list-group-item">					
					   <a href="show.php?id=<?=$v[id]?>"><?=mb_substr($v[title],0,24,'utf-8')?></a>			   
					</li>
				<?php }?>		
				</ul>
			</div>
        </div>
		<div class="col-md-4">
           <div class="panel panel-default">
				<div class="panel-heading">网站运营</div>				
				<ul class="list-group xue">
				<?php				
				$sql = "select * from news where typename='网站运营' order by id desc limit 6";				
				$arr = listquery($sql);					
				foreach ($arr as $v) {
				?>
					<li class="list-group-item">					
					   <a href="show.php?id=<?=$v[id]?>"><?=mb_substr($v[title],0,24,'utf-8')?></a>	   
					</li>
				<?php }?>		
				</ul>
			</div>
        </div>
        <div class="col-md-4">
           <div class="panel panel-default">
				<div class="panel-heading">建站经验</div>				
				<ul class="list-group xue">
				<?php				
				$sql = "select * from news where typename='建站经验' order by id desc limit 6";				
				$arr = listquery($sql);					
				foreach ($arr as $v) {
				?>
					<li class="list-group-item">					
					   <a href="show.php?id=<?=$v[id]?>"><?=mb_substr($v[title],0,24,'utf-8')?></a>	   
					</li>
				<?php }?>		
				</ul>
			</div>
        </div>
		
    </div>
	<!--文章类别-->
	
	<div class="row">
     
        <div class="col-md-4">
           <div class="panel panel-default">
				<div class="panel-heading">SEO</div>				
				<ul class="list-group xue">
				<?php				
				$sql = "select * from news where typename='SEO' order by id desc limit 6";				
				$arr = listquery($sql);					
				foreach ($arr as $v) {
				?>
					<li class="list-group-item">					
					   <a href="show.php?id=<?=$v[id]?>"><?=mb_substr($v[title],0,24,'utf-8')?></a>			   
					</li>
				<?php }?>		
				</ul>
			</div>
        </div>
		<div class="col-md-4">
           <div class="panel panel-default">
				<div class="panel-heading">网络推广</div>				
				<ul class="list-group xue">
				<?php				
				$sql = "select * from news where typename='网络推广' order by id desc limit 6";				
				$arr = listquery($sql);					
				foreach ($arr as $v) {
				?>
					<li class="list-group-item">					
					   <a href="show.php?id=<?=$v[id]?>"><?=mb_substr($v[title],0,24,'utf-8')?></a>	   
					</li>
				<?php }?>		
				</ul>
			</div>
        </div>
        <div class="col-md-4">
           <div class="panel panel-default">
				<div class="panel-heading">电商资讯</div>				
				<ul class="list-group xue">
				<?php				
				$sql = "select * from news where typename='电商资讯' order by id desc limit 6";				
				$arr = listquery($sql);					
				foreach ($arr as $v) {
				?>
					<li class="list-group-item">					
					   <a href="show.php?id=<?=$v[id]?>"><?=mb_substr($v[title],0,24,'utf-8')?></a>	   
					</li>
				<?php }?>		
				</ul>
			</div>
        </div>
		
    </div>
 
    <!--云南-->
	
	 
	 
	<?php 
	require_once 'foot.php';
	?>
	
	<!--我的代码结束-->
  </div>
</div>

	<!--txl2u--><!--3r9fw-->	 
</div>
</body>
</html>

