} } else { if (empty($selectid)) { amessage('pchoosecontent', M_REFERER); } $aedit = new cls_arcedit(); $actuser = new cls_userinfo(); $query = $db->query("SELECT aid,mid,checked FROM {$tblprefix}answers WHERE cid " . multi_str($selectid)); while ($row = $db->fetch_array($query)) { $aedit->set_aid($row['aid']); $row['checked'] && $aedit->arc_nums('adopts', -1, 0); $aedit->arc_nums('answers', -1, 1); $aedit->init(); $actuser->activeuser($row['mid']); $actuser->basedeal('answer', 0, 1, 1); $actuser->init(); } $db->query("DELETE FROM {$tblprefix}answers WHERE cid " . multi_str($selectid), 'UNBUFFERED'); adminlog(lang('answersetsucceed'), lang('answersetsucceed')); amessage('contentsetsucceed', "?entry=inarchive&action=answers&aid={$aid}{$param_suffix}&page={$page}{$filterstr}"); } } else { include M_ROOT . $u_tplname; } } elseif ($action == 'purchases') { echo '1111111111111111111111111111111'; } elseif ($action == 'reports') { //分析页面设置 $niuid = empty($niuid) ? 0 : $niuid; if ($niuid && ($u_url = read_cache('inurl', $niuid))) { $u_tplname = $u_url['tplname'];
$db->query("DELETE FROM {$tblprefix}pays WHERE pid " . multi_str($selectid) . " AND (receivedate=0 OR transdate>0)", 'SILENT'); } else { if (!empty($arcdeal['receive'])) { $db->query("UPDATE {$tblprefix}pays SET receivedate='" . (empty($arcreceive) ? 0 : $timestamp) . "' WHERE pid " . multi_str($selectid) . " AND transdate=0", 'SILENT'); } if (!empty($arcdeal['trans'])) { $auser = new cls_userinfo(); $query = $db->query("SELECT * FROM {$tblprefix}pays WHERE pid " . multi_str($selectid)); while ($item = $db->fetch_array($query)) { if (!$item['amount'] || !$item['receivedate'] || $item['transdate']) { continue; } $auser->activeuser($item['mid']); $auser->updatecrids(array(0 => $item['amount']), 1, lang('cashsav')); $db->query("UPDATE {$tblprefix}pays SET transdate='{$timestamp}' WHERE pid='{$item['pid']}'", 'SILENT'); $auser->init(); } unset($actuser); } } if (!empty($select_all)) { $npage++; if ($npage <= $pages) { $fromid = min($selectid); $transtr = ''; $transtr .= "&select_all=1"; $transtr .= "&pages={$pages}"; $transtr .= "&npage={$npage}"; $transtr .= "&barcsedit=1"; $transtr .= "&fromid={$fromid}"; amessage('operating', "?entry=pays&action=paysedit&page={$page}{$filterstr}{$transtr}{$parastr}&dealstr={$dealstr}", $pages, $npage, "<a href=\"?entry=pays&action=paysedit&page={$page}{$filterstr}\">", '</a>');