<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="css/stylesheets.css" rel="stylesheet" type="text/css" />
</head>
<body> 

        <div class="body">
            
            <div class="content">
                
            <ul class="navigation">
                <li>
                    <a class="button" href="./index.php">
                        <div class="icon">
                            <span class="ico-monitor"></span>
                        </div>                    
                        <div class="name">返回首页</div>
                    </a>                
                </li>
               
            </ul>

                <div class="row-fluid">
                    <div class="span12">
                        <div class="block">
                            <div class="head blue">
                                <h2>查看QQ信息！</h2>
 </div> 
<?php
//判断上下线
function qqpanduan($qq)
{
$url = 'http://wpa.qq.com/pa?p=9:'.$qq.':1';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$output = curl_exec($ch);
curl_close($ch);
$l = strlen($output);
if($l == 2262)
{
$on="目前离线";
}
elseif($l == 2329)
{
$on="目前在线";
}
return $on;
}
//判断上下线

if(empty($_GET['q'])){
echo '
<table width="818" height="121" border="1" align="center">
  <tr>
    <td height="85"><center>
    <form action="" method="get">
    查询的QQ号码:<input type="text" name="q"><input type="submit" value="查询">
    </form></center>
    </td>
  </tr>

</table>
';
}
else
{
$q=$_GET['q'];
echo '

                                <div class="data-fluid">
                                    <table class="table dtable lcnp" cellpadding="0" cellspacing="0" width="100%">
                                        <thead>
                                            <tr>
                                                <th width="13%">QQ号码</th>
                                                <th width="13%">QQ头像</th>
                                                <th width="13%">QQ秀</th>
                                                <th width="13%">QQ状态</th>
                                                <th width="13%">强制对话</th>
                                                <th width="4%">QQ空间</th>
                                            </tr>
                                        </thead>
                                        <tbody>                 
	<tr>
         <td>'.$q.'</td>
         <td align="center"><img src="http://q2.qlogo.cn/headimg_dl?bs=qq&amp;dst_uin='.$q.'&amp;src_uin='.$q.'&amp;fid='.$q.'&amp;spec=100&amp;url_enc=0&amp;referer=bu_interface&amp;term_type=PC" alt="QQ:'.$q.'" title="QQ:'.$q.'"></td>
         <td align="center"><img src="http://qqshow-user.tencent.com/'.$q.'/22/00/1.gif?fr=mobileqq"></td>
         <td align="center">'.qqpanduan($q).'</td>
		 <td align="center"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin='.$q.'&amp;site=qq&amp;menu=yes">发送消息</a></td>
		 <td align="center"><a target="_blank" href="http://user.qzone.qq.com/'.$q.'">浏览QQ空间</a></td>
      </tr>



						
                                        </tbody>
                                    </table>                    
                                </div> 
';
}
?>
</div>
                    </div>
                </div>  
            </div>
            
        </div>
        
    </div>
    <div class="dialog" id="source" style="display: none;" title="Source"></div>  
</body>
</html>