$nwheresql = !$wheresql ? $fromstr ? "WHERE {$fromstr}" : "" : $wheresql . ($fromstr ? " AND " : "") . $fromstr; $query = $db->query("SELECT cnid,ename {$fromsql} {$nwheresql} ORDER BY cnid DESC LIMIT 0,{$numperpic}"); while ($item = $db->fetch_array($query)) { $selectid[] = $item['cnid']; $cnstrarr[] = $item['ename']; } } include_once M_ROOT . "./include/mcn_static.fun.php"; if (!$staticmode) { foreach ($cnstrarr as $cnstr) { mcn_update_needstatic($cnstr, $ptypes); } } elseif ($staticmode == 1) { foreach ($cnstrarr as $cnstr) { for ($i = 0; $i <= $mcn_max_addno; $i++) { in_array($i, $ptypes) && mindex_static($cnstr, $i, 1); } } } elseif ($staticmode == 2) { foreach ($cnstrarr as $cnstr) { mcn_blank($cnstr, $ptypes); } } $npage++; if ($npage <= $pages) { $fromid = min($selectid); $transtr = "&pages={$pages}"; $transtr .= "&npage={$npage}"; $transtr .= "&bcnodes=1"; $transtr .= "&fromid={$fromid}"; amessage('operating', "?entry={$entry}&action={$action}{$param_suffix}{$filterstr}{$transtr}", $pages, $npage, "<a href=\"?entry={$entry}&action={$action}{$param_suffix}{$filterstr}\">", '</a>');
mexit(); } } else { if (!($needstatic = $db->result_one("SELECT value FROM {$tblprefix}mconfigs WHERE varname='ineedstatic'"))) { mexit(); } } } index_static($cnstr, $addno, 1); } elseif ($mode == 'mcnode') { include_once M_ROOT . './include/mcn_static.fun.php'; parse_str($_SERVER['QUERY_STRING'], $temparr); $cnstr = mcnstr($temparr); $addno = max(0, intval(@$addno)); if (!$debugtag) { if (!$cnstr) { if (!($needstatic = $db->result_one("SELECT value FROM {$tblprefix}mconfigs WHERE varname='mcnneedstatic'"))) { mexit(); } } else { if (!($needstatics = $db->result_one("SELECT needstatics FROM {$tblprefix}mcnodes WHERE ename='{$cnstr}'"))) { mexit(); } if (!($needstatics = explode(',', $needstatics)) || empty($needstatics[$addno]) || $needstatics[$addno] > $timestamp) { mexit(); } } } mindex_static($cnstr, $addno, 1); } mexit();