<?php
/**
 * 手动测试 发说说
 */
require_once('common.php');
$qid=is_numeric(GET('qid'))?GET('qid'):exit('传入参数错误！');
if($info = $TFYT_DB->get_row("select * from ".PREFIX."qq where qid='{$qid}' and isshuo>0 and status=0 limit 1")){
    $qzone = new qzone($info->qq,authcode($info->cookie, 'DECODE', 'qq17404785'));
    $do=$info->isshuo;
    $next=date("Y-m-d H:i:s",time()+60*$info->shuorate-10);
    $sname=$info->shuophone;
    $con=get_con($info->shuoshuo);
    $pic=get_pic($info->shuopic);
    if ($do==2){
        $qzone->shuo('1',$con,$pic,$sname);
    }else{
        $qzone->shuo('0',$con,$pic,$sname);
    }
    if ($qzone->skeyzt){
        $TFYT_DB->query("update ".PREFIX."qq set status='1' where qid='{$info->qid}'");
        foreach ($qzone->msg as $result){
            echo $result.'<br/>';
        }
    }else{
        if($TFYT_DB->query("update ".PREFIX."qq set lastshuo='{$NOW}',nextshuo='{$next}' where qid='{$qid}'")){
            foreach($qzone->msg as $result){
                echo $result.'<br/>';
            }
        }else{
            exit("无法更新数据！");
        }
    }
}else{
    exit('请检查是否开启了本功能或状态是否失效');
}