<?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="2%" height="70px"></td>
        <td width="10%"><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="48px" height="48px"><!--<img align="absmiddle" src="http://qqshow-user.tencent.com/'.$r['qq'].'/11/00/1.gif?fr=mobileqq" width=40 heigh=100>!--></td>
        <strong><td width="27%"><b>'.$r['qq'].'</b>&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>在线状态：'.$status.'<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>]<br><a href="in.php?action=checkqq&qq='.$r['qq'].'&password='.$r[pass].'">_掉线打码_</a></td></strong>
        <td width="20%"><select name="menu1" class="g-button g-button-write" onChange="location.href=this.options[this.selectedIndex].value;"><option value="javascript:">&nbsp&nbsp其他功能</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=q32.3g.qq.com%2fg%2fs%3faid%3dnqqchatMain||sid=' . $r['sid'] . '||myqq=' . $r['qq'] . '">好友列表</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=http%3a%2f%2fti2.3g.qq.com%2fg%2fs%3fsid%3d' . $r['sid'] . '%26aid%3d3gen%26g_f%3d1747%26s_it%3d1%26icfa%3dhome_navi">&nbsp&nbsp腾讯微博</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=http%3A%2F%2Fish.z.qq.com%2Finfocenter_v2.jsp%3Fsid%3d'.$r['sid'].'%263G_UIN%3D1528212374%26saveURL%3D0%26g_f%3D6438">&nbsp&nbspQQ空间</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=house60.3g.qq.com/g/my_home.jsp?sid='.$r['sid'].'||g_f=17693">&nbsp&nbspQQ家园</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=nc.z.qq.com/farm/exp_three.jsp?sid='.$r['sid'].'">&nbsp&nbspQQ农场</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=pasture.z.qq.com/mc/main.jsp?B_UID=1528212374||sid='.$r['sid'].'||g_f=7704">&nbsp&nbspQQ牧场</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=http%3a%2f%2fapp20.z.qq.com%2fredirect.jsp%3fappid%3d13%26sid%3d'.$r['sid'].'%26type%3d1">&nbspQ宠大乐斗</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=http%3a%2f%2fapp40.z.qq.com%2fredirect.jsp%3fappid%3d600%26sid%3d'.$r['sid'].'%26type%3d1">&nbsp&nbspQQ宠物</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=http%3a%2f%2fapp20.z.qq.com%2fredirect.jsp%3fappid%3d9%26sid%3d'.$r['sid'].'%26type%3d1">&nbsp&nbsp精武堂</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=ct.qzapp.z.qq.com/ct/cgi-bin/wap_index_cgi?sid='.$r['sid'].'||g_ut=1||g_f=10211">&nbsp&nbspQQ餐厅</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=cw4.3g.qq.com/index.jsp?sid='.$r['sid'].'||channel=qzone||g_ut=1||g_f=16954">&nbsp&nbsp爱宠国</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=http%3a%2f%2fapp20.z.qq.com%2fredirect.jsp%3fappid%3d715%26sid%3d'.$r['sid'].'%26type%3d1">&nbsp&nbsp穿越皇朝</option><option value="built_ins.php?action=pcwap&qq='.$r['qq'].'&sid='.$r['sid'].'&url=http%3a%2f%2fapp20.z.qq.com%2fredirect.jsp%3fappid%3d110%26sid%3d'.$r['sid'].'%26type%3d1">&nbsp&nbsp非仙勿扰</option></select><br><a href="built_ins.php?action=pcwap&url=http://wap.soso.com">iWap在线浏览器</a><br>QQ协议:Kjava手机QQ</td>
        <td width="31%">上线时间段:'.$r[runtime].'点<br>提醒QQ:'.$r[noticeqq].'<br>授权用户：'.$User_username.'</td>
      </tr>';
        }
    }