Example #1
0
    adminlog(lang('content_auto_output'));
    amessage('conautoutfin');
} elseif ($action == 'allauto' && $gsid) {
    empty($gmissions[$gsid]) && amessage('choosegatmis');
    if (empty($confirm)) {
        $message = lang('choose_allauto') . "<br><br>";
        $message .= lang('confirmclick') . ">><a href=?entry=gmissions&action=allauto&gsid=" . $gsid . "&confirm=1&use_push=1{$param_suffix}>" . lang('start') . "</a>";
        amessage($message);
    }
    $gmission = read_cache('gmission', $gsid, '', $sid);
    $c_upload = new cls_upload();
    $gather = new cls_gather();
    $gather->set_mission($gsid);
    $progress = new Progress();
    if (empty($deal)) {
        $surls = $gather->fetch_surls();
        foreach ($surls as $surl) {
            $gather->fetch_gurls($surl);
        }
        $progress->hide();
        amessage('toautogather', "?entry=gmissions&action=allauto&gsid={$gsid}&deal=gather&confirm=1&use_push=1{$param_suffix}");
    } elseif ($deal == 'gather') {
        //已采集但未完结的合辑中的子内容也需要采集
        $wheresql = "WHERE gsid='{$gsid}' AND " . ($gmission['sonid'] ? 'abover=0' : 'gatherdate=0');
        if (empty($pages)) {
            if (!($nums = $db->result_one("SELECT COUNT(*) FROM {$tblprefix}gurls {$wheresql}"))) {
                amessage('nogatheritem');
            }
            $pages = @ceil($nums / $atpp);
            $npage = $fromid = 0;
        }