<?php
    if(isset($_GET['qq'])){
    $qq_search=mysql_query("SELECT * FROM ".$table."online 
WHERE `username`='$User_username'and`qq` like '%".$_GET['qq']."%'",$con);
    }
    else{
    $qq_search=mysql_query("SELECT * FROM ".$table."online 
WHERE `uid`='$User_uid'",$con);
    }
    while($r=mysql_fetch_array($qq_search)){
        if($r['login']=='sj'){$xy='手机QQ协议';}
    elseif($r['login']=='3g'){$xy='3GQQ协议';}
    if($r['login_status']=='10'){
    $status='在线';
    }
    elseif($r['login_status']=='40'){
     $status='隐身';
    }
    else{
    $status='忙碌';
    }
    if($r['status']=='2'){
        echo '<tr>
        <td width="5%"><img src="http://q2.qlogo.cn/headimg_dl?bs=qq&dst_uin='.$r['qq'].'&src_uin='.$r['qq'].'&fid='.$r['qq'].'&spec=100&url_enc=0&referer=bu_interface&term_type=PC" width="58px" height="58px"><!--<img align="absmiddle" src="http://qqshow-user.tencent.com/'.$r['qq'].'/11/00/1.gif?fr=mobileqq" width=40 heigh=100>!--></td>
        <td width="2%"></td>
        <td width="27%">'.$r['qq'].'&nbsp;&nbsp;&nbsp;<a href="in.php?action=setqq&a=set&qq='.$r['qq'].'">设置</a>&nbsp;&nbsp;&nbsp;<span class="fc_gray"><a href="in.php?action=delqq&a=del&qq='.$r['qq'].'">删除</a><br>在线状态：待打码<br><div align=left>Qid:'.$r[qid].'</div></td>
        <td width="15%"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin='.$r['qq'].'&site=qq&menu=yes"><img align="absmiddle" border="0" src="http://wpa.qq.com/pa?p=2:'.$r['qq'].':41 &r=0.026558138197287917" alt="我在24小时挂QQ" title="我在24小时挂QQ"></a><br>[<a href="built_ins.php?action=history&a=history&qq='.$r['qq'].'">历史消息</a>]</td>
        <td width="20%"><a href="in.php?action=checkqq&qq='.$r['qq'].'&password='.$r[pass].'">_掉线打码_</a></td>
        <td width="31%">上线时间段:'.$r[runtime].'点<br>提醒QQ:'.$r[noticeqq].'<br>授权用户：'.$User_username.'</td>
      </tr>';
        }
    }