default: $fbMenu = KUNENA_get_menu(NULL, $fbConfig, $fbIcons, $my_id, 1, $view); break; } // display header $KunenaTemplate->addVar('kunena-header', 'menu', $fbMenu); $KunenaTemplate->addVar('kunena-header', 'board_title', stripslashes($board_title)); if (file_exists(KUNENA_JTEMPLATEPATH . '/css/kunena.forum.css')) { $KunenaTemplate->addVar('kunena-header', 'css_path', KUNENA_JTEMPLATEURL . '/template/' . $fbConfig->template . '/kunena.forum.css'); } else { $KunenaTemplate->addVar('kunena-header', 'css_path', KUNENA_DIRECTURL . '/template/' . $fbConfig->template . '/kunena.forum.css'); } $KunenaTemplate->addVar('kunena-header', 'offline_message', stripslashes($fbConfig->board_offline) ? '<span id="fbOffline">' . _FORUM_IS_OFFLINE . '</span>' : ''); $KunenaTemplate->addVar('kunena-header', 'searchbox', getSearchBox()); $KunenaTemplate->addVar('kunena-header', 'pb_imgswitchurl', KUNENA_URLIMAGESPATH . "shrink.gif"); $KunenaTemplate->displayParsedTemplate('kunena-header'); //BEGIN: PROFILEBOX if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/profilebox/profilebox.php')) { include KUNENA_ABSTMPLTPATH . '/plugin/profilebox/profilebox.php'; } else { include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/profilebox/profilebox.php'; } //FINISH: PROFILEBOX switch ($func) { case 'who': if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/who/who.php')) { include KUNENA_ABSTMPLTPATH . '/plugin/who/who.php'; } else { include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/who/who.php'; } break;
<? /********** globale Includedateien *******************/ include_once('patTemplate.inc'); // Templatklasse /******************* Testen Templat *************************/ if($HTTP_POST_VARS[testen] and $HTTP_POST_VARS[test]=='parsen'){ $tmpl = new patTemplate(); $tmpl->setBasedir('c:/php/gretenkord/templat_test'); $tmpl->readTemplatesFromFile($HTTP_POST_VARS[datei]); $tmpl->displayParsedTemplate(); } /**************** Erstellung Templat ***************************/ if($HTTP_POST_VARS[testen] and $HTTP_POST_VARS[test]=='erstellen'){ /********* Ausgabe der Uebersichtsdatei **********/ $datei_ausg=$HTTP_POST_VARS[datei]; $laenge=strlen($datei_ausg); $datei_eing=substr($datei_ausg,0,$laenge-5); $datei_eing=$datei_eing."html"; $inhalt="aaa"; $fp1=fopen($datei_eing,"w+"); $fp2=fopen($datei_ausg,"r"); $tabelle=0; // Startwert while(!feof($fp2)){ // Beginn Schleife $zeile=fgets($fp2,256); $zeile=trim($zeile); $zeile1=""; if(eregi("(<table*){1}",$zeile)){ // wenn vorher Tabelle $tabelle=1;
$tmpl = new patTemplate(); $crypt = new Enkripsi; $code=$crypt->decode($_SERVER['REQUEST_URI']); $id=$code['id']; //print_r($_GET); //print_r($code); $query=mysql_query("SELECT namaModule FROM pub_module WHERE idModule='$id'"); $modul=mysql_fetch_row($query); if($modul[0]){ $file="module/".$modul[0]."/main_view.php"; if(file_exists($file)){ require_once("{$file}"); $tmpl->displayParsedTemplate("article"); } }elseif($code['module']){ $file="module/".$code['module']."/".$code['file'].".php"; if(file_exists($file)){ require_once("{$file}"); $tmpl->displayParsedTemplate("article"); } } elseif($_GET['portal']==1){ $file="module/portal_siswa/main_view.php"; if(file_exists($file)){ require_once("{$file}"); $tmpl->displayParsedTemplate("article"); } }else { echo "<h3>Sistem Informasi Keuangan SMK N 2 Temanggung</h3>";
<?php include "../includes/structure.php"; include "../includes/mysql.php"; include "../includes/patTemplate.php"; // Read some database information about the current user... cookies anyone? db_connect(); $sql = sprintf("SELECT * FROM users WHERE id=1 LIMIT 1"); $result = db_query($sql); $user = mysql_fetch_assoc($result); // Setup the template... $template = new patTemplate(); $template->setBasedir("templates"); $template->readTemplatesFromFile("basic.tmpl.html"); // Add the default variables to the template (header section): $variables = array(); foreach ($user as $var => $val) { $variables[strtoupper($var)] = $val; $template->addGlobalVar(strtoupper($var), $val); } $template->addGlobalVar("FULLNAME", $user['fullname']); //$template->addVars ("header", $variables); if (!empty($user['website'])) { $template->setAttributes("websitev", array('visibility' => 'visible')); } $template->displayParsedTemplate();
function buildCFGFile($cacic_config) { $oTmpl = new patTemplate(); $oTmpl->setNamespace('cacicInstall'); $oTmpl->setRoot('templates'); $oTmpl->readTemplatesFromInput('install_navbar.tmpl'); $oTmpl->addVar('tmplCFGFile', 'cacic_path', addslashes(CACIC_PATH)); $oTmpl->addVar('tmplCFGFile', 'CACIC_URL', CACIC_URL); $oTmpl->addVar('tmplCFGFile', 'DB_SERVER', $cacic_config['db_host']); $oTmpl->addVar('tmplCFGFile', 'DB_PORT', $cacic_config['db_port']); $oTmpl->addVar('tmplCFGFile', 'DB_NAME', $cacic_config['db_name']); $oTmpl->addVar('tmplCFGFile', 'DB_USER', $cacic_config['db_user']); $oTmpl->addVar('tmplCFGFile', 'DB_USER_PASS', $cacic_config['db_pass']); $oTmpl->addVar('tmplCFGFile', 'CACIC_KEY', CACIC_KEY); $oTmpl->addVar('tmplCFGFile', 'CACIC_IV', CACIC_IV); $oTmpl->addVar('tmplCFGFile', 'CACIC_LANGUAGE', $_SESSION['cacic_language']); $oTmpl->addVar('tmplCFGFileCab', 'show_path', CACIC_PATH); $oTmpl->addVar('tmplCFGFileCab', 'cacic_ds', CACIC_DS); $oTmpl->displayParsedTemplate('tmplCFGFile'); }
$fbMenu = KUNENA_get_menu(KUNENA_CB_ITEMID, $fbConfig, $fbIcons, $my_id, 1); break; } // display header $obj_KUNENA_tmpl->readTemplatesFromFile("header.html"); $obj_KUNENA_tmpl->addVar('jb-header', 'menu', $fbMenu); $obj_KUNENA_tmpl->addVar('jb-header', 'board_title', stripslashes($board_title)); if (file_exists(KUNENA_JTEMPLATEPATH . '/css/kunena.forum.css')) { $obj_KUNENA_tmpl->addVar('jb-header', 'css_path', KUNENA_JTEMPLATEURL . '/template/' . $fbConfig->template . '/kunena.forum.css'); } else { $obj_KUNENA_tmpl->addVar('jb-header', 'css_path', KUNENA_DIRECTURL . '/template/' . $fbConfig->template . '/kunena.forum.css'); } $obj_KUNENA_tmpl->addVar('jb-header', 'offline_message', stripslashes($fbConfig->board_offline) ? '<span id="fbOffline">' . _FORUM_IS_OFFLINE . '</span>' : ''); $obj_KUNENA_tmpl->addVar('jb-header', 'searchbox', getSearchBox()); $obj_KUNENA_tmpl->addVar('jb-header', 'pb_imgswitchurl', KUNENA_URLIMAGESPATH . "shrink.gif"); $obj_KUNENA_tmpl->displayParsedTemplate('jb-header'); //BEGIN: PROFILEBOX if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/profilebox/profilebox.php')) { include KUNENA_ABSTMPLTPATH . '/plugin/profilebox/profilebox.php'; } else { include KUNENA_ABSPATH . '/template/default/plugin/profilebox/profilebox.php'; } //FINISH: PROFILEBOX switch ($func) { case 'who': if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/who/who.php')) { include KUNENA_ABSTMPLTPATH . '/plugin/who/who.php'; } else { include KUNENA_ABSPATH . '/template/default/plugin/who/who.php'; } break;