<?php
 /*
　*　QQ任务列表
*/ 
if(!defined('IN_CRONLITE'))exit();
$title="QQ任务列表";
$time = time();
$breadcrumb='<li><a href="index.php?mod=user"><i class="icon fa fa-home"></i>首页</a></li>
<li><a href="index.php?mod=qqlist"><i class="icon fa fa-qq"></i>ＱＱ管理</a></li>
<li class="active"><a href="#"><i class="icon fa fa-list-alt"></i>'.$_GET['qq'].'</a></li>';
include TEMPLATE_ROOT."head.php";

echo '<div class="1" role="main">';
if($islogin==1){

if($conf['active']!=0)phone_check();

if(OPEN_QQOL==0) {
	showmsg('当前站点未开启此功能。',2);
}
$qq=daddslashes($_GET['qq']);
$gls=$DB->count("SELECT count(*) from ".DBQZ."_qqjob WHERE qq='{$qq}' and uid='{$uid}'");

$qqrow=$DB->get_row("SELECT * FROM ".DBQZ."_qq WHERE qq='{$qq}' limit 1");
if($qqrow['uid']!=$uid && $isadmin!=1 && $isdeputy!=1)
{showmsg('你只能操作自己的QQ哦！',3);
}
if($qqlevelapi==5)$qqlevellink='qqdg.php?qq='.$qq.'&md5='.md5(SYS_KEY.$qq.$time).'&s='.$time;
else $qqlevellink='index.php?mod=qqlevel&qq='.$qq;
echo '
<div class="col-md-10 col-md-offset-1 col-lg-7 col-lg-offset-2">

<div class="widget">
                                    <div class="widget-content themed-background-passion text-right clearfix">
                                        <a href="https://mz.isqq8.com/index.php?mod=search&q='.$qq.'" class="pull-left">
                                            <img src="//q1.qlogo.cn/g?b=qq&nk='.$qq.'&s=100&t='.date("Ymd").'" alt="QQ头像" alt="avatar" class="img-circle img-thumbnail img-thumbnail-avatar-2x">
                                        </a>
                                        <h5 class="widget-heading text-light">QQ:'.$qq.'</h5>
                                        <h5 class="widget-heading text-light-op">用户权限:'.usergroup().'</h5>
                                        <h5 class="widget-heading text-light-op">VIP状态：';if($isvip==1) echo'<font color="green">'.$row['vipdate'].'</font>';elseif($isvip==2) echo '<font color="red">永久VIP</font>';elseif($isvip==0) echo '非VIP';echo'</h5>
                                        <h6 class="widget-heading text-light-op">当前时间:'.$date.'</h6>
                                    </div>
                                    <div class="widget-content widget-content-mini themed-background-dark-default text-light text-center">
                                        <i class="fa fa-smile-o"></i> <strong>建议开启邮箱失效提醒，可及时更新QQ!</strong>
                                    </div>
                                    <div class="widget-content themed-background-muted text-center">
                                       <div class="btn-group">';
echo '<div id="qqfunc">
<span class="dropdown">
<button type="button" data-toggle="dropdown" class="btn dropdown-toggle btn-square btn-info btn-sm" aria-expanded="false"><em class="fa fa-plus"></em> 添加功能 <span class="caret"></span> </button>
   <ul class="dropdown-menu" role="menu">
	<li role="presentation"><a role="menuitem" tabindex="-1" data-toggle="modal" data-target="#qqjob" href="#" id="qqlist02">空间类任务</a></li>';
	if(OPEN_OTHE==1||OPEN_SHUA==1)echo '<li role="presentation"><a role="menuitem" tabindex="-1" data-toggle="modal" data-target="#qqjob" href="#" id="qqlist03">互刷类任务</a></li>';
	echo '<li role="presentation"><a role="menuitem" tabindex="-1" data-toggle="modal" data-target="#qqjob" href="#" id="qqlist04">普通签到类任务</a></li>
	<li role="presentation"><a role="menuitem" tabindex="-1" data-toggle="modal" data-target="#qqjob" href="#" id="qqlist05">会员签到类任务</a></li>';
	if(OPEN_LEVE==1)echo '<li role="presentation"><a role="menuitem" href="'.$qqlevellink.'">等级代挂类任务</a></li>';
	if(OPEN_QZDS==1)echo '<li role="presentation"><a role="menuitem" href="index.php?mod=shua&qq='.$qq.'">ＱＱ代刷类任务</a></li>';
	echo '<li role="presentation"><a role="menuitem" tabindex="-1" data-toggle="modal" data-target="#qqjob" href="#" id="qqlist01">其他类任务</a></li>';
   echo '</ul>
</span>
<span class="dropdown">

<button type="button" data-toggle="dropdown" class="btn dropdown-toggle btn-square btn-info btn-sm" aria-expanded="true">小工具 <span class="caret"></span> </button>
   <ul class="dropdown-menu" role="menu">
    <li role="presentation"><a role="menuitem" href="index.php?mod=dx&qq='.$qq.'" target="_blank">单向好友检测</a></li>
	<li role="presentation"><a role="menuitem" href="index.php?mod=mzjc&qq='.$qq.'" target="_blank">秒赞好友检测</a></li>
	<li role="presentation"><a role="menuitem" href="#" onclick="qqtool(\''.$qq.'\',\'qqz\')">刷圈圈赞99+</a></li>';
	if(OPEN_SHUAR==1)echo '<li role="presentation"><a role="menuitem" href="index.php?mod=reply&qq='.$qq.'" target="_blank">说说刷队形</a></li>';
	if(OPEN_SHUA==1)echo '<li role="presentation"><a role="menuitem" href="index.php?mod=sz&qq='.$qq.'" target="_blank">说说刷赞</a></li>
	<li role="presentation"><a role="menuitem" href="index.php?mod=rq&qq='.$qq.'" target="_blank">空间刷人气</a></li>';
	echo '<li role="presentation"><a role="menuitem" href="#" onclick="qqtool(\''.$qq.'\',\'ebook\')">领取图书VIP</a></li>
	<li role="presentation"><a role="menuitem" tabindex="-1" data-toggle="modal" data-target="#qqjob" href="#" id="qqlist07">>>更多小工具</a></li>
   </ul>
</span>
<span class="dropdown">
<button type="button" data-toggle="dropdown" class="btn dropdown-toggle btn-square btn-info btn-sm" aria-expanded="false">其他设置  </button>
<ul class="dropdown-menu" role="menu">
    <li role="presentation"><a role="menuitem" href="index.php?mod=set&my=qkqqrw&qq='.$qq.$link.'">清空所有</a></li>
	<li role="presentation"><a role="menuitem" href="#" onclick="job_edit(\'ztall\',\''.$qq.'\',\'qqjob\',\'1\')">一键暂停所有</a></li>
	<li role="presentation"><a role="menuitem" href="#" onclick="job_edit(\'kqall\',\''.$qq.'\',\'qqjob\',\'1\')">一键开启所有</a></li>
   </ul>
</span>';
echo '</div>
           </div>
                </div>
                   <div class="widget-content">
                     <div class="row text-center">
                        <div class="col-xs-4">
        <h3 class="widget-heading"><small>QQ状态码</small><br><a href="javascript:void(0)" class="themed-color-passion">ok</a></h3>
                          </div>
                   <div class="col-xs-4">
             <h3 class="widget-heading"><small>SuperKey状态</small><br><a href="javascript:void(0)" class="themed-color-passion">ok</a></h3>
             </div>
                         <div class="col-xs-4">
                 <h3 class="widget-heading"><small>是否秒赞</small><br><a href="javascript:void(0)" class="themed-color-passion">Yes</a></h3>
                            </div>
                               </div>
                                    </div>
                                        <hr>';
?>

<script>
function qqtool(qq,type) {
	if(type=='ebook')
		var url="qq/api/ebook.php?uin="+qq+"&skey=<?php echo urlencode($qqrow['skey']) ?>";
	else if(type=='qqz')
		var url="index.php?mod=qqz&qq="+qq;
	ajax.get(url, "json", function(arr) {
		alert(arr.msg);
	});
}
function showlist(type,page) {
	page = page || '1';
	$('#qqfunc').show();
	$('#list').html('<center><i class="fa fa-spinner fa-pulse"></i>正在加载...</center>');
	ajax.get("ajax.php?mod=list&act="+type+"&qq=<?php echo $qq ?>&page="+page, "html", function(data) {
		$('#list').html(data);
	});
}
function qqjob_edit(qq,type,jobid,page) {
	jobid = jobid || 0;
	page = page || 1;
	$('#qqjob').modal('hide');
	$('#qqfunc').hide();
	$('#list').html('<center><i class="fa fa-spinner fa-pulse"></i>请稍候...</center>');
	ajax.get("ajax.php?mod=qqjob&act=edit&qq="+qq+"&type="+type+"&jobid="+jobid+"&page="+page, "html", function(data) {
		$('#list').html(data);
	});
}
function qqjob_add(qq,type) {
	$('#qqjob').modal('hide');
	ajax.get("ajax.php?mod=qqjob&act=add&qq="+qq+"&type="+type, "json", function(arr) {
		if(arr.code==1){
			alert(arr.msg);
			showlist('qqtask',1);
		}else{
			alert(arr.msg);
		}
	});
}
function job_edit(act,jobid,table,page) {
	page = page || 1;
	if(act=='del') {
		if(!confirm('你确实要删除此任务吗？'))return false;
	}
	ajax.get("ajax.php?mod=edit&act="+act+"&jobid="+jobid+"&table="+table, "json", function(arr) {
		if(arr.code==1){
			alert(arr.msg);
			showlist('qqtask',page);
		}else{
			alert(arr.msg);
		}
	});
}
$(document).ready(function(){
$("#qqlist01").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=1&qq=<?php echo $qq ?>",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
$("#qqlist02").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=2&qq=<?php echo $qq ?>",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
$("#qqlist03").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=3&qq=<?php echo $qq ?>",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
$("#qqlist04").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=4&qq=<?php echo $qq ?>",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
$("#qdlist").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=5",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
$("#qqlist05").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=6&qq=<?php echo $qq ?>",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
$("#qqlist06").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=7&qq=<?php echo $qq ?>",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
$("#qqlist07").click(function(){
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=11&qq=<?php echo $qq ?>",async:false});
  $("#myDiv").html(htmlobj.responseText);
});
showlist('qqtask',1);
});
function showresult(surl) {
  htmlobj=$.ajax({url:"template/Ajax/display.php?list=8&url="+surl,async:false});
  $("#myDiv").html(htmlobj.responseText);
}
</script>

<style>
.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space: pre-wrap;}
</style>
<div id="list">
</div>

<?php

}
else{
showmsg('登录失败，可能是密码错误或者身份失效了，请<a href="index.php?mod=login">重新登录</a>！',3);
}

include TEMPLATE_ROOT."foot.php";
?>