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; }
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); }
/** * 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')); }
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; }
} //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']]; //////////////////////////////