コード例 #1
0
ファイル: widget.php プロジェクト: KasaiDot/wp_afmng
function afmng_widget_status($args)
{
    extract($args);
    echo $before_widget;
    echo $before_title . 'Status' . $after_title;
    $ltpl = new LTemplate();
    $ltpl->render(afmng_get_tplfile('tpl.StatusWidget.php'));
    echo $after_widget;
}
コード例 #2
0
ファイル: Menu.php プロジェクト: BackupTheBerlios/gencms-svn
function CreateMenu($path, $depth, $template, $title)
{
    $TPL = new LTemplate();
    include_once GC_IPATH . "_base/site-index.php";
    $AllLinks = array();
    reset($SIndex);
    while ($SSite = current($SIndex)) {
        if (substr(key($SIndex), 0, strlen($path)) == $path) {
            $Link['Name'] = extractName(key($SIndex));
            $Link['File'] = GC_WEBPATH . 'show.php?p=' . key($SIndex);
            $AllLinks[] = $Link;
        }
        next($SIndex);
    }
    $TPL->set('Title', $title);
    $TPL->setBlock('Links', $AllLinks);
    $TPL->render($template);
}
コード例 #3
0
ファイル: menu.php プロジェクト: KasaiDot/wp_afmng
/**
* Render the User Manager Page
*/
function afmng_menu_usermng()
{
    if (afmng_check_post()) {
        afmng_menu_usermng_postback();
    }
    $ltpl = new LTemplate();
    $ltpl->users = afmng_db_get_users();
    $ltpl->caps = afmngdb::$caps;
    //render page
    $ltpl->render(afmng_get_tplfile('tpl.UserMng.php'));
}
コード例 #4
0
function ErrorHandler($errno, $errstr, $errfile, $errline)
{
    $TPL = new LTemplate();
    switch ($errno) {
        case E_ERROR:
            $TPL->set('ERRORTYPE', 'ERROR');
            break;
        case E_WARNING:
            $TPL->set('ERRORTYPE', 'WARNING');
            break;
        case E_PARSE:
            $TPL->set('ERRORTYPE', 'PARSING ERROR');
            break;
        default:
            return;
    }
    $TPL->set('ERRORSTR', $errstr);
    $TPL->set('ERRORFILE', $errfile);
    $TPL->set('ERRORLINE', $errline);
    $TPL->render(GC_PDEFTPL . 'error.tpl');
    exit;
}
コード例 #5
0
ファイル: index.php プロジェクト: BackupTheBerlios/gencms-svn
}
//global includes
include_once GC_PLIB . 'ltemplate.inc';
include_once GC_PLIB . 'libSession.inc';
include_once GC_IPATH . 'functions.php';
//admin includes
include_once GC_PADMIN . 'page-alias.php';
include_once GC_PADMIN . 'admin-functions.php';
////////////////////////////
//Objects
$TPL = new LTemplate();
$Session = new Session();
/////////////////////////////
//  check Session
if (!checkSession()) {
    $TPL->render($SPages['login']);
    exit;
}
if ($_GET['action'] == 'logout') {
    $Session->destroy();
    $TPL->render($SPages['login']);
    exit;
}
//////////////////////////////
//?p=site&s=/news
//TODO check for not available pages
if (empty($_GET['p'])) {
    $_GET['p'] = "example";
}
$Mod = $SPages[$_GET['p']];
//////////////////////////////