Exemple #1
0
<?php

!function_exists('adminmsg') && exit('Forbidden');
include_once R_P . "require/postindex.php";
$repliesArray = array('1000', '5000', '10000', '20000');
$postIndexDB = new PostIndexDB();
$postIndexDB->setPerpage(5);
InitGP(array('sub'), 'G');
if (empty($sub)) {
    InitGP(array('replies', 'page'), 'GP');
    if (empty($action) || $action == "search") {
        $threads = $postIndexDB->getALLIndexedThreads($page);
    } elseif ($action == "reset") {
        InitGP(array('tid', 'step', 's_step'), 'G');
        !$step && ($step = 1);
        !$s_step && ($s_step = 1);
        $total = 2;
        if ($tid && $step <= $total) {
            $s_step = $postIndexDB->resetPostIndex($tid, $step, $s_step);
            $next = $s_step ? $step : $step + 1;
        }
        if ($next) {
            $j_url = "{$basename}&action=reset&step={$next}&s_step={$s_step}&tid={$tid}&page={$page}";
            adminmsg('updatecache_total_step', EncodeUrl($j_url));
        } else {
            $basename = "{$basename}&action=search&page={$page}";
            adminmsg("operate_success");
        }
    } elseif ($action == "delete") {
        InitGP(array('tids', 'step', 's_step'), 'GP');
        !is_array($tids) && ($tids = explode(',', $tids));