function renderModal($titulo, $contenido) { $modal = new templateEngine(); $modal->error = false; $modal->titulo = "<p class='lead'>" . $titulo . "</p>"; $modal->contenido = $contenido; return $modal->render('modal_v.php'); }
<?php /* * ------------------------------------------------------- * ALL RIGHTS RESERVED! * ------------------------------------------------------- */ include_once 'PHP/user.php'; include_once 'PHP/friend.php'; include_once 'PHP/templateEngine.php'; session_start(); $pages = ['index.html', 'index_2.html', 'register.html', 'stream.html', 'user.html', 'animelist.html', 'admin.html']; $user = new user(); $user->getCurrentUser(); $templateEngine = new templateEngine(); if (isset($user->userType) && $user->userType !== null && $user->userType && $user->userType !== 'anon') { $page = 'index_2.html'; } else { $page = 'index.html'; } if (isset($_GET['page']) && in_array($_GET['page'], $pages) && $user->hasPrivilege($_GET['page'])) { $page = $_GET['page']; } print_r($templateEngine->renderPage($page));
} //////////////////////////////////////////// // HARD CONF //////////////////////////////////////////// ini_set('session.use_trans_sid', '0'); //enlever le PHPSSID ini_set('url_rewriter.tags', ''); //enlever le PHPSSID //////////////////////////////////////////// // FUNCTIONS //////////////////////////////////////////// include ROOT_DIR . 'inc/function.php'; //////////////////////////////////////////// // EXEC STATS //////////////////////////////////////////// $start_time = microtime_float(); $sql_time = 0; //////////////////////////////////////////// // CLASS //////////////////////////////////////////// include ROOT_DIR . 'inc/class/templateEngine.php'; include ROOT_DIR . 'inc/class/mysqlDatabase.php'; $tpl = new templateEngine(); $db = new mysqlDatabase(); $tpl->cacheTimeCoef = CACHE_TIMECOEF; //////////////////////////////////////////// // MIS //////////////////////////////////////////// session_start(); $page = isOk($_GET['page']) ? $_GET['page'] : 'homepage'; $tpl->assignVar(array('PAGE_TITLE' => PAGE_TITLE, 'PAGE_DESCRIPTION' => PAGE_DESCRIPTION, 'PAGE_KEYWORDS' => PAGE_KEYWORDS, 'ROOT_PATH' => ROOT_PATH, 'VERSION' => VERSION));
function anhoRenderComboBox() { $render = new templateEngine(); return $render->render('anhoCB_v.php'); }
header('Location: ' . ROOT_PATH . 'recherche/' . urlencode(preg_replace('#[./]#isU', ' ', $_POST['q']))); } //////////////////////////////////////////// // HARD CONF //////////////////////////////////////////// ini_set('session.use_trans_sid', '0'); //enlever le PHPSSID ini_set('url_rewriter.tags', ''); //enlever le PHPSSID //////////////////////////////////////////// // FUNCTIONS //////////////////////////////////////////// require ROOT_DIR . 'inc/function.php'; //////////////////////////////////////////// // EXEC STATS //////////////////////////////////////////// $start_time = microtime_float(); $sql_time = 0; //////////////////////////////////////////// // CLASS //////////////////////////////////////////// include ROOT_DIR . 'inc/class/templateEngine.php'; include ROOT_DIR . 'inc/class/mysqlDatabase.php'; $tpl = new templateEngine(); $db = new mysqlDatabase(); $tpl->cacheTimeCoef = CACHE_TIMECOEF; //////////////////////////////////////////// // MISC //////////////////////////////////////////// $page = isOk($_GET['page']) ? $_GET['page'] : 'homepage'; $tpl->assignVar(array('ROOT_PATH' => ROOT_PATH, 'VERSION' => VERSION));