Example #1
0
function show_sitemap($q, $lv, $table, $menu, $where, $was)
{
    $limit = 200;
    $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1;
    $MPL = db_make_sites($page, $where, $limit, '?sitemap-' . $menu->get(1), $table);
    $anfang = ($page - 1) * $limit;
    $q = db_query($q . " LIMIT " . $anfang . "," . $limit);
    $tpl = new tpl('sitemap');
    $l = '';
    while ($r = db_fetch_row($q)) {
        $l .= $tpl->list_get('links', array(str_replace('{id}', $r[0], $lv), $r[1]));
    }
    $tpl->set_ar_out(array('MPL' => $MPL, 'site' => $was, 'links' => $l), 1);
}
Example #2
0
}
// checken, ob der nutzer eingeloggt ist
if (!loggedin()) {
    // Fehlermeldung ausgeben
    $tpl->out("please log in");
    $design->footer();
    exit;
}
$news = get_news_since($_SESSION["lastlogin"]);
// die neuen news holen
$newsout = "";
if (sizeof($news) == 0) {
    $newsout = $tpl->get("no news");
} else {
    foreach ($news as $new) {
        $newsout .= $tpl->list_get('news', array($new["id"], $new["title"]));
    }
}
// die neuen topics holen
$hottopics = get_topics_since_last_login();
$topicsout = "";
if (sizeof($hottopics) == 0) {
    $topicsout = $tpl->get("no topics");
} else {
    foreach ($hottopics as $hottopic) {
        $listar = array($hottopic["id"], $hottopic["title"], $hottopic["author"]);
        $listar[] = ceil(($hottopic['replies'] + 1) / $allgAr['Fpanz']);
        $listar[] = $hottopic["pid"];
        $topicsout .= $tpl->list_get('topics', $listar);
    }
}