Exemplo n.º 1
0
Arquivo: spe.php Projeto: philum/cms
function page_titles($o = '', $rid = '')
{
    $load = ses('load');
    //$o=parent
    $days = getorpost('dig', ses('nbj'));
    $daybb = calc_date($days);
    $rech = good_rech();
    $nms = ses('nms');
    $frm = ses('frm');
    $read = ses('read');
    list($utg, $utv) = detect_uget();
    if ($rech) {
        $ico = btn("txtcadr", pictxt('search', $rech));
        if (get('targ')) {
            return;
        }
        if (is_array($load)) {
            $p['nbarts'] = nbof(count($load), 1) . ' (' . nbof(array_sum($load), 16) . ') / ' . nbof($days, 3);
        }
        $p['opt'] = lj('', 'popup_search___' . $rech, picto('popup'));
        if ($pg = $_SESSION['page'] > 1) {
            $p['opt'] = btn('txtsmall', 'page ' . $pg);
        }
        $p['suj'] = $rech;
        $p['url'] = 'search/' . $rech . '/' . $days;
    } elseif (get('rub_tag')) {
        $rub_t = get('rub_tag');
    } elseif (get('rssurl')) {
        $p['suj'] = $nms[15];
    } elseif ($par = get('parent')) {
        $read = 1;
        $p['suj'] = suj_of_id($par);
        $p['url'] = urlread($par);
    } elseif ($utg) {
        $p['suj'] = $utv;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, $utg, $rid) . ' ';
        $p['url'] = htac($utg) . $utv;
    } elseif ($tag = get('source')) {
        $p['suj'] = $tag;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, 'source', $rid) . ' ';
        $p['url'] = 'source/' . $tag . '/' . $days;
    } elseif ($tag = get('tag')) {
        $p['suj'] = $tag;
        $p['url'] = 'tag/' . $tag . '/' . $days;
        $p['date'] = dig_it($days, 'tag', $rid) . ' ' . lkc('txtx', htac('tag') . $tag, picto('url')) . ' ';
        $p['date'] .= lj('txtx', 'popup_search__3_' . ajx($tag) . '_' . $days, picto('search'));
    } elseif (get('module') == 'All') {
        $p['suj'] = get('module');
        $p['url'] = htac('module') . get('module');
    } elseif ($frm) {
        $p['suj'] = $frm;
        $p['url'] = htac('section') . $frm;
    }
    if (!$read) {
        //nav//nbarts
        if ($utv or $tag or $rub_t or get('source')) {
            if ($load) {
                $nbarts = count($load);
                if (!$rub_t) {
                    $_SESSION['frm'] = '';
                }
            }
        } elseif ($frm != "Home" && get('module') != "All" && $frm) {
            if (get('dig') or $_SESSION['lang']) {
                list($slct, $in, $wh, $ord, $gr) = play_req(' and re>0');
                $nbarts = sql('count(id)', 'qda', 'v', $wh);
            } else {
                $nbarts = $_SESSION['line'][$frm];
            }
        } elseif (ses('line')) {
            foreach ($_SESSION['line'] as $k => $v) {
                $nbarts += $v;
            }
        }
    }
    if ($frm && $frm != 'Home' && $frm != 'All' && !$read && !$p['date']) {
        $p['date'] = dig_it($days, 'section', $rid) . ' ';
    }
    // && !$rech
    if (!$read && !$p['nbarts']) {
        $p['nbarts'] = nbof($nbarts, 1) . (rstr(3) ? ' / ' . nbof($days, 3) : '');
    }
    if ($page = ses('page') && $page > 1) {
        $p['nbarts'] .= ' (page ' . $page . ') ';
    }
    if (!$load && $o) {
        $p['parent'] = find_navigation(ses('read'));
    }
    //rstr(78)
    if ($_GET['rub_tag']) {
        $p['tag'] = rub_tags('');
        $p['opt'] = lkc('txtx', htac('tag') . $rub_t, '►' . $rub_t);
    }
    if ($p['suj'] == 'All') {
        $p['suj'] = ses('nbj') . ' ' . nms(4);
    }
    if ($p['suj'] == 'Home') {
        $p['suj'] = nms(69);
    }
    //if($_GET['module'])$p['suj']=nms(100)
    return divd('titles', template($p, 'titles'));
}
Exemplo n.º 2
0
Arquivo: spe.php Projeto: philum/cms
function recup_get($dr)
{
    if ($_POST['dig']) {
        $_GET['dig'] = $_POST['dig'];
    }
    if ($_GET['msql']) {
        return '/msql/' . $_GET['msql'] . '/page/';
    }
    if ($_SESSION['htacc'] && !$dr) {
        list($g, $u) = detect_uget('tag cat admin module');
        if ($_GET['search']) {
            return '/search/' . $_GET['search'] . '/' . $_GET['dig'] . '/page/';
        } elseif ($_GET['module']) {
            list($o, $p) = split_right(':', $_GET['module']);
            return '/module/' . $p . ($o ? '/' . $o : '') . '/page/';
        } elseif ($_GET['context']) {
            return '/context/' . $_GET['context'] . '/page/';
        } elseif (!$g) {
            return '/module/Home/page/';
        } else {
            return '/' . $g . '/' . $u . '/' . $_GET['dig'] . '/page/';
        }
    }
    if ($_GET['search']) {
        $ret = 'search=' . $_GET['search'];
    } elseif ($_GET['module']) {
        $ret = 'module=' . $_GET['module'];
    } elseif ($_GET) {
        foreach ($_GET as $k => $v) {
            if ($k != 'page' && $k != 'callj' && $k != 'res' && $k != 'cat' && $k != 'tag' && $k != 'titles' && $k != 'bool' && $k != 'plug') {
                $ret .= $k . '=' . $v . '&';
            }
        }
    }
    return '/' . $dr . '?' . $ret . 'page=';
}
Exemplo n.º 3
0
Arquivo: api.php Projeto: philum/cms
function api_load_rq()
{
    $g = $_GET;
    //boot build_content
    if ($g['tag']) {
        $ra['tag'] = $g['tag'];
        $ra['link'] = 'tag';
    } elseif ($g['search']) {
        $ra['search'] = $g['search'];
        $ra['link'] = 'search';
    } elseif ($g['source']) {
        $ra['source'] = $g['source'];
        $ra['link'] = 'source';
    } elseif ($g['parent']) {
        $ra['parent'] = $g['parent'];
        $ra['link'] = 'parent';
    } elseif ($g['author']) {
        $ra['owner'] = $g['author'];
        $ra['link'] = 'author';
    } elseif ($g['rub_tag']) {
        $ra['tag'] = $g['rub_tag'];
        $ra['cat'] = ses('frm');
        $ra['link'] = 'tag';
    } elseif ($gets = detect_uget()) {
        $ra[$gets[2]] = $gets[1];
        $ra['link'] = $gets[2];
    } else {
        return;
    }
    return api_defaults_rq($ra);
}