コード例 #1
0
<?php

ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
use NERDZ\Core\User;
use NERDZ\Core\System;
$user = new User();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
if (!$user->isLogged()) {
    die($user->lang('REGISTER'));
}
$vals = [];
$vals['tok_n'] = NERDZ\Core\Security::getCsrfToken('edit');
$longlangs = System::getAvailableLanguages(1);
$vals['langs_a'] = [];
$i = 0;
foreach ($longlangs as $id => $val) {
    $vals['langs_a'][$i]['longlang_n'] = $val;
    $vals['langs_a'][$i]['shortlang_n'] = $id;
    ++$i;
}
$vals['mylang_n'] = $user->getLanguage($_SESSION['id']);
$vals['myboardlang_n'] = $user->getBoardLanguage($_SESSION['id']);
$user->getTPL()->assign($vals);
$user->getTPL()->draw('preferences/language');
コード例 #2
0
ファイル: banned.php プロジェクト: RoxasShadow/nerdz.eu
<?php

ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
use NERDZ\Core\User;
$user = new User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="author" content="Paolo Galeone" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName();
?>
 - <?php 
echo $user->lang('BANNED');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('banned');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>