当前位置: 首页>>代码示例>>PHP>>正文


PHP tpl::out方法代码示例

本文整理汇总了PHP中tpl::out方法的典型用法代码示例。如果您正苦于以下问题:PHP tpl::out方法的具体用法?PHP tpl::out怎么用?PHP tpl::out使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tpl的用法示例。


在下文中一共展示了tpl::out方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_ini_menu

/**
 * Die Adminnavigation aus der angegeben XML-Datei auslesen
 *
 * @param  $file die zu lesende XML-Datei
 */
function get_ini_menu($file)
{
    $menus = simplexml_load_file($file);
    $umenu = '';
    $tpl = new tpl('adminsubmenu', 1);
    if ($menus->attributes()->hide == 'true') {
        $tpl->out(4);
        return $umenu;
    }
    foreach ($menus->list as $liste) {
        $tpl->set_out('headline', $liste->attributes()->title, 0);
        $tpl->out(1);
        foreach ($liste->modul as $mod) {
            // wenn der nutzer die nötigen rechte hat
            if ($mod->right >= $_SESSION['authright'] or !isset($mod->right)) {
                $tpl->set_ar_out(array('url' => $mod->url, 'title' => utf8_decode($mod->title)), 2);
            }
        }
        $tpl->out(3);
    }
    return $umenu;
}
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:27,代码来源:adminsubmenu.php

示例2: search_finduser

function search_finduser()
{
    $design = new design('Finduser', '', 0);
    $design->header();
    $tpl = new tpl('search_finduser');
    $tpl->out(0);
    if (isset($_POST['sub']) and !empty($_POST['name'])) {
        $name = str_replace('*', "%", $_POST['name']);
        $name = escape($name, 'string');
        $q = "SELECT `name`,`name` FROM `prefix_user` WHERE `name` LIKE '" . $name . "'";
        $tpl->set('username', dbliste('', $tpl, 'username', $q));
        $tpl->out(1);
    }
    $tpl->out(2);
    $design->footer();
}
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:16,代码来源:search.php

示例3: sharchiv

 function sharchiv()
 {
     $tpl = new tpl('shbox4', 0);
     echo '<div>
              <h4 align="center" class="Chead">' . $this->version . ' Archiv</h4>
           </div>';
     $erg = db_query('SELECT * FROM `prefix_shbox4` ORDER BY `id` DESC');
     while ($row = db_fetch_assoc($erg)) {
         $text = $row['txt'];
         $text = $this->shtext($text);
         $ar = array('AUSGABE' => '<p class="Cdark" style="margin:0;">' . $this->shdate($row['time'], $row['uid']) . '</p>
                                           <p class="Cnorm" style="margin:0;">' . $this->colortext($this->sh_usercheck($row['uid']), $text) . '</p>
                                           <br />');
         $tpl->set_ar_out($ar, 2);
     }
     $tpl->set_ar(array('VERS' => $this->version()));
     $tpl->out(3);
 }
开发者ID:NachtWolf82,项目名称:ShBox,代码行数:18,代码来源:shbox4class.php

示例4: bbcode

         $r['uname'] = $_SESSION['authname'];
         $r['text'] = bbcode($r['text']);
         $tpl->set_ar_out($r, 4);
         $i = 1;
         $erg = db_query("SELECT id, name, text FROM prefix_koms WHERE uid = " . $id . " AND cat = 'GBOOK' ORDER BY id DESC");
         $anz = db_num_rows($erg) + 1;
         while ($r1 = db_fetch_assoc($erg)) {
             $r1['zahl'] = $anz - $i;
             $r1['text'] = bbcode($r1['text']);
             if (has_right(-7, 'gbook')) {
                 $r1['text'] .= '<a href="index.php?gbook-show-' . $id . '-d' . $r1['id'] . '"><img src="include/images/icons/del.gif" alt="' . $lang['delete'] . '" border="0" title="' . $lang['delete'] . '" /></a>';
             }
             $tpl->set_ar_out($r1, 5);
             $i++;
         }
         $tpl->out(6);
     }
     break;
 default:
     $limit = $allgAr['gbook_posts_per_site'];
     // Limit
     $page = $menu->getA(1) == 'p' ? escape($menu->getE(1), 'integer') : 1;
     $MPL = db_make_sites($page, "", $limit, "?gbook", 'gbook');
     $anfang = ($page - 1) * $limit;
     $tpl = new tpl('gbook.htm');
     $ei1 = @db_query("SELECT COUNT(ID) FROM prefix_gbook");
     $ein = @db_result($ei1, 0);
     $ar = array('EINTRAGE' => $ein);
     $tpl->set_ar_out($ar, 0);
     $erg = db_query("SELECT * FROM prefix_gbook ORDER BY time DESC LIMIT " . $anfang . "," . $limit) or die(db_error());
     while ($row = db_fetch_object($erg)) {
开发者ID:kveldscholten,项目名称:Ilch-1.1,代码行数:31,代码来源:gbook.php

示例5: COUNT

 if ($menu->getA(2) == 'U' or $menu->getA(2) == 'O') {
     $pos = $menu->getE(2);
     $nps = $menu->getA(2) == 'U' ? $pos + 1 : $pos - 1;
     $anz = db_result(db_query("SELECT COUNT(*) FROM `prefix_loader`"), 0);
     if ($nps < $anz and $pos >= 0) {
         db_query("UPDATE `prefix_loader` SET `pos` = -1 WHERE `pos` = " . $pos);
         db_query("UPDATE `prefix_loader` SET `pos` = " . $pos . " WHERE `pos` = " . $nps);
         db_query("UPDATE `prefix_loader` SET `pos` = " . $nps . " WHERE `pos` = -1");
     }
 }
 // Class
 $class = 'Cmite';
 // Template laden
 $tpl = new tpl('modules/loader', 1);
 // Template-Header
 $tpl->out(0);
 // Module abfragen und Ausgeben
 $erg = db_query("SELECT `id`, `pos`, `task`, `file`, `description` FROM `prefix_loader` ORDER BY `pos` ASC");
 if (db_num_rows($erg) > 0) {
     $tpl->out(3);
     while ($row = db_fetch_assoc($erg)) {
         $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
         $row['class'] = $class;
         $tpl->set_ar_out($row, 4);
     }
 }
 // Tabellenuebergang
 $tpl->out(1);
 // Aendern oder Einfuegen
 if ($aid == 'edit') {
     $lid = $menu->get(3);
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:loader.php

示例6: showTooltips

            }
            showTooltips($tpl, $tooltips);
        } else {
            $aus['LIST_I'] = '-';
            $aus['LIST_D'] = '-';
            $aus['LIST_T'] = '-';
            $aus['LIST_CLASS'] = 'Cnorm';
            $tpl->set_ar_out($aus, 'listitem');
            unset($aus);
        }
    }
    $tpl->out('listend');
}
if (AJAXCALL) {
    kalender_listoutput();
} else {
    if ($eid != 0 and isset($data_id[$eid])) {
        list($day, $month, $year) = explode('.', date('d.m.Y', $data_id[$eid]['time']));
    } elseif ($gday == 0) {
        $day = '01';
    }
    // Template Ausgabe
    $tpl->set_ar_out(array('MONAT' => $month, 'TAG' => $day, 'YEAR' => $year, 'VIEW' => $view), 0);
    // Kalenderliste/-details etc
    kalender_listoutput();
    // Detailansicht
    // old calender
    // $tpl->set('calender', getCalendar($month, $year, 'index.php?kalender-v1-m{mon}-y{jahr}-d{tag}', 'index.php?kalender-v' . $view . '-m{mon}-y{jahr}', $data));
    $tpl->out('kalenderend');
}
$design->footer();
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:kalender.php

示例7: tpl

 $design->addheader('<script type="text/javascript" src="include/includes/js/uprofil.js"></script>');
 $design->addheader('<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>');
 $design->addheader('<script type="text/javascript" src="include/includes/js/jquery.textareaAutoResize.js"></script>');
 $design->addheader('<script type="text/javascript" src="include/includes/js/bbcode.js"></script>');
 $design->header();
 if (loggedin() and $menu->get(2) == $_SESSION['authid']) {
     //Header
     include __DIR__ . DIRECTORY_SEPARATOR . '../header.php';
     $tpl = new tpl('uprofil/fcheck.htm');
     $FAnzahl = db_count_query('SELECT count(id) FROM prefix_friendscheck WHERE fid = ' . $uid);
     $BAnzahl = db_count_query('SELECT count(id) FROM prefix_userblock WHERE uid = ' . $uid);
     $abfF = 'SELECT u.*, f.* FROM prefix_friendscheck f LEFT JOIN prefix_user u ON u.id = f.uid WHERE f.fid = ' . $uid . ' ORDER BY f.id ASC';
     $ergF = db_query($abfF);
     $abfBlock = 'SELECT u.*, f.* FROM prefix_userblock f LEFT JOIN prefix_user u ON u.id = f.bid WHERE f.uid = ' . $uid . ' ORDER BY f.id ASC';
     $ergBlock = db_query($abfBlock);
     $tpl->out(0);
     if ($FAnzahl > 0) {
         while ($rowF = db_fetch_assoc($ergF)) {
             $rowF['FNAME'] = '<a href="?user-details-' . $rowF['uid'] . '">' . $rowF['name'] . '</a>';
             if (file_exists($rowF['avatar'])) {
                 $rowF['AVATAR'] = '<img src="' . $rowF['avatar'] . '" width="80" height="80" border="0">';
             } else {
                 $rowF['AVATAR'] = '<img src="include/images/userprofil/avatar/nouser.png" width="75" height="75" border="0">';
             }
             $rowF['OTHER'] = '<br /><br /><div class="friendButton friendAccept" onclick="location.href = \'?user-fcheck-accept-' . $rowF['uid'] . '\';">Annehmen</div>';
             $rowF['OTHER'] .= '<div class="friendButton friendRefuse" onclick="location.href = \'?user-fcheck-refuse-' . $rowF['uid'] . '\';">Ablehnen</div>';
             $tpl->set_ar_out($rowF, 1);
         }
     } else {
         echo '<br /><div id="contenText" align="center">Keine Freundschaftsanfragen vorhanden.</div>';
     }
开发者ID:kveldscholten,项目名称:uProfile,代码行数:31,代码来源:fcheck.php

示例8: while

    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);
}
// sitemap fuer module
// - fourm
// - news
// - wars
// - downloads
// - links (cats)
// - faqs
switch ($menu->get(1)) {
    default:
        $tpl = new tpl('sitemap');
        $tpl->out(0);
        break;
    case 'forum':
        show_sitemap("SELECT `id`,`name` FROM `prefix_topics` ORDER BY `id` ASC", '?forum-showposts-{id}', 'topics', $menu, '', 'Forum');
        break;
    case 'downloads':
        show_sitemap("SELECT `id`, concat(`name`,' ',`version`) as `x` FROM `prefix_downloads` WHERE `cat` >= 0 ORDER BY `id` ASC", '?downloads-show-{id}', 'downloads', $menu, '', 'Downloads');
        break;
    case 'links':
        show_sitemap("SELECT `id`,`name` FROM `prefix_linkcats` ORDER BY `id` ASC", '?links-{id}', 'links', $menu, '', 'Links');
        break;
    case 'news':
        show_sitemap("SELECT `news_id`,`news_title` FROM `prefix_news` ORDER BY `news_id` ASC", '?news-{id}', 'news', $menu, "WHERE `news_recht` >= " . $_SESSION['authright'], 'News');
        break;
}
$design->footer();
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:sitemap.php

示例9: while

    } else {
        $id = $menu->getA(1) == 'S' ? $menu->getE(1) : (is_numeric($firstcat) ? $firstcat : 0);
    }
    $tpl->set_out('cid', $id, 0);
    $class = '';
    $erg = db_query("SELECT id, cid, name as cname, pos as cpos FROM prefix_forumcats WHERE id = {$id} ORDER BY pos");
    while ($row = db_fetch_assoc($erg)) {
        $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
        $row['class'] = $class;
        $tpl->set_ar_out($row, 1);
        $erg1 = db_query("SELECT\r\n      prefix_forums.id as fid,\r\n      prefix_forums.name as fname,\r\n      prefix_forums.pos as fpos,\r\n      case when view  <= 0 then vg.name else vt.name end as view,\r\n      case when reply <= 0 then rg.name else rt.name end as reply,\r\n      case when start <= 0 then sg.name else st.name end as start\r\n    FROM prefix_forums\r\n      LEFT JOIN prefix_grundrechte as vg ON prefix_forums.view = vg.id\r\n      LEFT JOIN prefix_grundrechte as rg ON rg.id = prefix_forums.reply\r\n      LEFT JOIN prefix_grundrechte as sg ON sg.id = prefix_forums.start\r\n\r\n\t\t\tLEFT JOIN prefix_groups as vt ON prefix_forums.view = vt.id\r\n      LEFT JOIN prefix_groups as rt ON rt.id = prefix_forums.reply\r\n      LEFT JOIN prefix_groups as st ON st.id = prefix_forums.start\r\n    WHERE prefix_forums.cid = " . $row['id'] . " ORDER BY prefix_forums.pos");
        while ($row1 = db_fetch_assoc($erg1)) {
            $row1['class'] = $row['class'];
            $row1['cid'] = $id;
            $tpl->set_ar_out($row1, 2);
        }
    }
    $tpl->out(3);
    forum_admin_showcats(0, '');
    $topcid = is_numeric($r->topcid) ? $r->topcid : 0;
    $Cout = array();
    $Cout['cid'] = $cid;
    $Cout['ak'] = $um == 'changeCategorie' ? 'change' : 'new';
    $Cout['sub'] = $um == 'changeCategorie' ? '&auml;ndern' : 'erstellen';
    $Cout['name'] = $um == 'changeCategorie' ? $r->name : '';
    forum_admin_selectcats('0', '', $Cout['cat'], $topcid);
    $Cout['cat'] = '<option value="0">Keine</option>' . $Cout['cat'];
    $tpl->set_ar_out($Cout, 4);
}
//-----------------------------------------------------------|
$design->footer();
开发者ID:kveldscholten,项目名称:Ilch-1.1,代码行数:31,代码来源:forum.php

示例10: get_news_since

 *
 * @param int $time die zeit (timestamp), ab der die news zurück gegeben werden sollen.
 */
function get_news_since($time)
{
    $erg = db_query("SELECT\n      `a`.`news_title` as `title`,\n      `a`.`news_id` as `id`,\n      DATE_FORMAT(`a`.`news_time`,'%d. %m. %Y') as `datum`,\n      DATE_FORMAT(`a`.`news_time`,'%W') as `dayofweek`,\n      `a`.`news_kat` as `kate`,\n      `a`.`news_text` as `text`,\n      `b`.`name` as `username`\n    FROM `prefix_news` as `a`\n    LEFT JOIN `prefix_user` as `b` ON `a`.`user_id` = `b`.`id`\n    WHERE (" . $_SESSION['authright'] . " <= `a`.`news_recht`\n       \t\t\tOR `a`.`news_recht` = 0)\n       AND `a`.`news_time` > FROM_UNIXTIME(" . $time . ")\n    ORDER BY `news_time` DESC\n    LIMIT 0,5");
    $news = array();
    while ($row = mysql_fetch_assoc($erg)) {
        $news[] = $row;
    }
    return $news;
}
// 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();
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:ucp.php

示例11: tpl

                 } else {
                     $bild = 'include/images/icons/admin/na.png';
                 }
             }
             $tpl->set_ar_out(array('url' => $row['url'], 'pic' => $bild, 'name' => $row['name']), 2);
         }
         if ($katname != '' and $katname != 'Admin') {
             $tpl->out(3);
         }
     }
     // Kategorie-Name
     $katname = '';
     // Template laden
     $tpl = new tpl('admin', 1);
     // Template-Header
     $tpl->out(0);
     // Module abfragen und Ausgeben
     $first_erg = db_query("SELECT * FROM `prefix_modules` WHERE `menu` = 'admin' ORDER BY  `pos` ASC");
     $second_erg = db_query("SELECT * FROM `prefix_modules` WHERE `menu` != '' AND `menu` != 'admin' ORDER BY `menu`, `pos` ASC");
     // Admin gesondert ausgeben
     make_menu_list($first_erg);
     // Restliche Module
     make_menu_list($second_erg, 'Admin');
     // Template-Footer
     $tpl->out(4);
     break;
 case 'versionsKontrolle':
     // ICON Anzeige...
     echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/version_check.png" /></td><td width="30"></td><td valign="bottom"><h1>Versionskontrolle</h1></td></tr></table>';
     echo 'Scripte Version: ' . $scriptVersion . '<br />Update Version: ' . $scriptUpdate . '<br /><br />';
     echo '<script language="JavaScript" type="text/javascript" src="http://www.ilch.de/down/ilchClan/update.php?version=' . $scriptVersion . '&update=' . $scriptUpdate . '"></script>';
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:admin.php

示例12: die

/**
 * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL)
 * @copyright (C) 2000-2010 ilch.de
 * @version $Id$
 */
defined('main') or die('no direct access');
$title = $allgAr['title'] . ' :: Forum :: Beitrag melden';
$hmenu = $extented_forum_menu . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
$topicId = escape($menu->get(2), "integer");
$postId = escape($menu->get(3), "integer");
$tpl = new tpl('forum/report_post');
// wenn einer der beiden parameter leer ist
if (empty($topicId) || empty($postId)) {
    $tpl->out("error_no_ids");
    // wenn dieser beitrag nicht existiert
} else {
    if (!post_exists($postId)) {
        $tpl->out("no_such_post");
    } else {
        // PM Versenden
        $getmodids = getmod_ids(get_forum_id($topicId));
        if (empty($getmodids)) {
            // An den Admin schicken
            if (isset($_SESSION["authid"])) {
                $fromUser = $_SESSION["authid"];
            } else {
                $fromUser = 0;
            }
            $tpl->set("NAME", get_n($fromUser));
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:report_post.php

示例13: escape

 if (isset($_POST['kommentar_fuer_last_wars'])) {
     if (loggedin()) {
         $name = $_SESSION['authname'];
         $userid = $_SESSION['authid'];
     } else {
         $name = escape($_POST['name'], 'string') . ' (Gast)';
         $userid = 0;
     }
     $text = escape($_POST['text'], 'string');
     db_query("INSERT INTO prefix_koms (name,userid,cat,time,text,uid) VALUES ('" . $name . "'," . $userid . ",'WARSLAST','" . time() . "','" . $text . "', " . $_GET['mehr'] . " )");
 }
 if (isset($_GET['kommentar_fuer_last_wars_loeschen']) and is_siteadmin('wars')) {
     db_query("DELETE FROM prefix_koms WHERE cat = 'WARSLAST' AND uid = " . $_GET['mehr'] . " AND id = " . $_GET['kommentar_fuer_last_wars_loeschen']);
 }
 // anzeigen
 $tpl->out("koms_on");
 $erg = db_query("SELECT `name`,`userid`,`text`,`time`,`id` FROM prefix_koms WHERE cat = 'WARSLAST' AND `uid` = " . $_GET['mehr'] . " ORDER BY id DESC");
 $anz = db_num_rows($erg);
 if ($anz == 0) {
     echo $lang['nocomments'];
 } else {
     while ($r = db_fetch_assoc($erg)) {
         if (is_siteadmin('wars')) {
             $del = ' <a href="index.php?wars-more-' . $_GET['mehr'] . '=0&amp;kommentar_fuer_last_wars_loeschen=' . $r['id'] . '"><img src="include/images/icons/del.gif" title="l&ouml;schen" alt="l&ouml;schen" border="0"></a>';
         }
         $r['zahl'] = $anz;
         $r['avatar'] = get_avatar($r['userid']);
         $r['time'] = post_date($r['time'], 1) . $del;
         $r['text'] = bbcode($r['text']);
         $tpl->set_ar_out($r, "koms_self");
         $anz--;
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:wars.php

示例14: die

<?php

/**
 * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL)
 * @copyright (C) 2000-2010 ilch.de
 * @version $Id$
 */
defined('main') or die('no direct access');
$title = $allgAr['title'] . ' :: Forum :: ' . aktForumCats($aktForumRow['kat'], 'title');
$hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b>' . aktForumCats($aktForumRow['kat']) . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
$tpl = new tpl('forum/show_cat');
$tpl->out(0);
$cid = escape($menu->get(2), 'integer');
$q = "SELECT\r\n  `a`.`id`, `a`.`cid`, `a`.`name`, `a`.`besch`,\r\n  `a`.`topics`, `a`.`posts`, `b`.`name` as `topic`,\r\n  `c`.`id` as `pid`, `c`.`tid`, `b`.`rep`, `c`.`erst`, `c`.`time`,\r\n  `a`.`cid`, `k`.`name` as `cname`\r\nFROM `prefix_forums` `a`\r\n  LEFT JOIN `prefix_forumcats` `k` ON `k`.`id` = `a`.`cid`\r\n  LEFT JOIN `prefix_posts` `c` ON `a`.`last_post_id` = `c`.`id`\r\n  LEFT JOIN `prefix_topics` `b` ON `c`.`tid` = `b`.`id`\r\n\r\n  LEFT JOIN `prefix_groupusers` `vg` ON `vg`.`uid` = " . $_SESSION['authid'] . " AND `vg`.`gid` = `a`.`view`\r\n  LEFT JOIN `prefix_groupusers` `rg` ON `rg`.`uid` = " . $_SESSION['authid'] . " AND `rg`.`gid` = `a`.`reply`\r\n  LEFT JOIN `prefix_groupusers` `sg` ON `sg`.`uid` = " . $_SESSION['authid'] . " AND `sg`.`gid` = `a`.`start`\r\n\r\nWHERE ((" . $_SESSION['authright'] . " <= `a`.`view` AND `a`.`view` < 1)\r\n   OR (" . $_SESSION['authright'] . " <= `a`.`reply` AND `a`.`reply` < 1)\r\n   OR (" . $_SESSION['authright'] . " <= `a`.`start` AND `a`.`start` < 1)\r\n\t OR `vg`.`fid` IS NOT NULL\r\n\t OR `rg`.`fid` IS NOT NULL\r\n\t OR `sg`.`fid` IS NOT NULL\r\n\t OR -9 >= " . $_SESSION['authright'] . ")\r\n  AND `k`.`id`     = " . $cid . "\r\nORDER BY `k`.`pos`, `a`.`pos`";
$erg1 = db_query($q);
$xcid = 0;
while ($r = db_fetch_assoc($erg1)) {
    $r['topicl'] = $r['topic'];
    $r['topic'] = html_enc_substr($r['topic'], 0, 23);
    $r['ORD'] = forum_get_ordner($r['time'], $r['id']);
    $r['mods'] = getmods($r['id']);
    $r['datum'] = post_date($r['time']);
    $r['page'] = ceil(($r['rep'] + 1) / $allgAr['Fpanz']);
    $tpl->set_ar($r);
    if ($r['cid'] != $xcid) {
        $tpl->out(1);
        // Unterkategorien
        $sql = db_query("SELECT DISTINCT `a`.`name` as `cname`, `a`.`id` as `cid` FROM `prefix_forumcats` `a` LEFT JOIN `prefix_forums` `b` ON `a`.`id` = `b`.`cid` WHERE `a`.`cid` = {$r['cid']} AND `a`.`id` = `b`.`cid` ORDER BY `a`.`pos`, `a`.`name`");
        while ($ucat = db_fetch_assoc($sql)) {
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:31,代码来源:show_cat.php

示例15: die

<?php

#   Copyright by: Manuel
#   Support: www.ilch.de
defined('main') or die('no direct access');
$title = $allgAr['title'] . ' :: Forum';
$hmenu = $extented_forum_menu . 'Forum' . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
if ($menu->get(1) == 'markallasread') {
    user_markallasread();
}
$tpl = new tpl('forum/showforum');
$tpl->out(0);
$category_array = array();
$forum_array = array();
$q = "SELECT\r\n  a.id, a.cid, a.name, a.besch,\r\n  a.topics, a.posts, b.name as topic,\r\n  c.id as pid, c.tid, b.rep, c.erst, c.time,\r\n  a.cid, k.name as cname\r\nFROM prefix_forums a\r\n  LEFT JOIN prefix_forumcats k ON k.id = a.cid\r\n  LEFT JOIN prefix_posts c ON a.last_post_id = c.id\r\n  LEFT JOIN prefix_topics b ON c.tid = b.id\r\n\t\r\n  LEFT JOIN prefix_groupusers vg ON vg.uid = " . $_SESSION['authid'] . " AND vg.gid = a.view\r\n  LEFT JOIN prefix_groupusers rg ON rg.uid = " . $_SESSION['authid'] . " AND rg.gid = a.reply\r\n  LEFT JOIN prefix_groupusers sg ON sg.uid = " . $_SESSION['authid'] . " AND sg.gid = a.start\r\n\t\r\nWHERE ((" . $_SESSION['authright'] . " <= a.view AND a.view < 1) \r\n   OR (" . $_SESSION['authright'] . " <= a.reply AND a.reply < 1)\r\n   OR (" . $_SESSION['authright'] . " <= a.start AND a.start < 1)\r\n\t OR vg.fid IS NOT NULL\r\n\t OR rg.fid IS NOT NULL\r\n\t OR sg.fid IS NOT NULL\r\n\t OR -9 = " . $_SESSION['authright'] . ")\r\n\t AND k.cid = 0\r\nORDER BY k.pos, a.pos";
$erg1 = db_query($q);
$xcid = 0;
while ($r = db_fetch_assoc($erg1)) {
    $r['topicl'] = $r['topic'];
    $r['topic'] = html_enc_substr($r['topic'], 0, 23);
    $r['ORD'] = forum_get_ordner($r['time'], $r['id']);
    $r['mods'] = getmods($r['id']);
    $r['datum'] = date('d.m.y - H:i', $r['time']);
    $r['page'] = ceil(($r['rep'] + 1) / $allgAr['Fpanz']);
    $tpl->set_ar($r);
    if ($r['cid'] != $xcid) {
        $tpl->out(1);
        //Unterkategorien
        $sql = db_query("SELECT DISTINCT a.name as cname, a.id as cid FROM `prefix_forumcats` a LEFT JOIN `prefix_forums` b ON a.id = b.cid WHERE a.cid = {$r['cid']} AND a.id = b.cid ORDER BY a.pos, a.name");
开发者ID:kveldscholten,项目名称:Ilch-1.1,代码行数:31,代码来源:show_forum.php


注:本文中的tpl::out方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。