$smarty->assign('annot_chart', get_annot_stats_for_chart()); } $smarty->display('charts.tpl'); break; case 'pool_charts': $smarty->assign('main', get_extended_pools_stats()); $smarty->assign('moder', get_moderation_stats()); $smarty->display('ext_charts.tpl'); break; case 'export': $smarty->assign('active_page', 'downloads'); $smarty->display('static/doc/export.tpl'); break; case 'faq': $smarty->assign('active_page', 'about'); $smarty->assign('content', get_wiki_page('FAQ')); $smarty->assign('title', 'FAQ'); $smarty->display('static/faq.tpl'); break; case 'achievements': $am = new AchievementsManager($_SESSION['user_id']); $smarty->assign('stats', $am->pull_stats()); $smarty->assign('manager', $am); $smarty->display('achievements/all_achievements.tpl'); break; default: header("Location:index.php"); break; } } else { if (!is_admin()) {
<?php require_once 'lib/header.php'; require_once 'lib/lib_ne.php'; require_once 'lib/lib_users.php'; // TODO: permissions? check_logged(); $action = isset($_GET['act']) ? $_GET['act'] : ''; $tagset_id = get_current_tagset(); switch ($action) { case 'manual': $smarty->assign('content', get_wiki_page("nermanual/" . (int) $_GET['id'])); $smarty->display('static/doc/annotation.tpl'); break; default: $is_ner_mod = user_has_permission(PERM_NE_MODER); $smarty->assign('possible_guidelines', array(1 => "Default (2014)", 2 => "Dialogue Eval (2016)")); // TODO read from db $smarty->assign('is_ner_mod', $is_ner_mod); $smarty->assign('current_guideline', $tagset_id); $smarty->assign('page', get_books_with_NE($tagset_id, !$is_ner_mod)); $smarty->display($is_ner_mod ? 'ner/main-moderator.tpl' : 'ner/main.tpl'); } log_timing();
<?php require 'lib/header.php'; require_once 'lib/constants.php'; require_once 'lib/lib_xml.php'; require_once 'lib/lib_morph_pools.php'; $smarty->assign('active_page', 'tasks'); if (!is_logged()) { $smarty->assign('content', get_wiki_page("Инструкция по интерфейсу для снятия омонимии")); $smarty->display('qa/tasks_guest.tpl'); return; } $action = isset($_GET['act']) ? $_GET['act'] : ''; $smarty->assign('user_rating', get_user_rating($_SESSION['user_id'])); switch ($action) { case 'annot': if (!isset($_GET['pool_id']) || !$_GET['pool_id']) { throw new UnexpectedValueException('Wrong pool_id'); } $pool_size = 5; $opt = OPTION(OPT_SAMPLES_PER_PAGE); switch ($opt) { case 2: $pool_size = 10; break; case 3: $pool_size = 20; break; case 4: $pool_size = 50; }