当前位置: 首页>>代码示例>>PHP>>正文


PHP get_utheme函数代码示例

本文整理汇总了PHP中get_utheme函数的典型用法代码示例。如果您正苦于以下问题:PHP get_utheme函数的具体用法?PHP get_utheme怎么用?PHP get_utheme使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_utheme函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: lateral_menu

function lateral_menu()
{
    global $LANG, $CONFIG;
    $tpl = new Template('admin/menus/panel.tpl');
    $tpl->assign_vars(array('L_MENUS_MANAGEMENT' => $LANG['menus_management'], 'L_ADD_CONTENT_MENUS' => $LANG['menus_content_add'], 'L_ADD_LINKS_MENUS' => $LANG['menus_links_add'], 'L_ADD_FEED_MENUS' => $LANG['menus_feed_add'], 'L_MANAGE_THEME_COLUMNS' => $LANG['manage_theme_columns'], 'THEME_NAME' => get_utheme()));
    $tpl->parse();
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:7,代码来源:lateral_menu.php

示例2: menu_themeswitcher_themeswitcher

function menu_themeswitcher_themeswitcher($position, $block)
{
    global $CONFIG, $THEME_CONFIG, $User, $LANG, $Session;
    $switchtheme = !empty($_GET['switchtheme']) ? urldecode($_GET['switchtheme']) : '';
    if (!empty($switchtheme)) {
        if ($User->check_level(MEMBER_LEVEL)) {
            $Session->csrf_get_protect();
        }
        if (preg_match('`[ a-z0-9_-]{3,20}`i', $switchtheme) && strpos($switchtheme, '\'') === false) {
            $User->update_user_theme($switchtheme);
            if (QUERY_STRING != '') {
                redirect(trim(HOST . SCRIPT . '?' . preg_replace('`switchtheme=[^&]+`', '', QUERY_STRING), '?'));
            } else {
                redirect(HOST . SCRIPT);
            }
        }
    }
    $tpl = new Template('menus/themeswitcher/themeswitcher.tpl');
    import('core/menu_service');
    MenuService::assign_positions_conditions($tpl, $block);
    $utheme = get_utheme();
    foreach ($THEME_CONFIG as $theme => $array_info) {
        if ($User->check_level($array_info['secure']) && $theme != 'default') {
            $selected = $utheme == $theme ? ' selected="selected"' : '';
            $info_theme = @parse_ini_file(PATH_TO_ROOT . '/templates/' . $theme . '/config/' . get_ulang() . '/config.ini');
            $tpl->assign_block_vars('themes', array('NAME' => $info_theme['name'], 'IDNAME' => $theme, 'SELECTED' => $selected));
        }
    }
    $tpl->assign_vars(array('DEFAULT_THEME' => $CONFIG['theme'], 'L_SWITCHTHEME' => 'Changer le thème', 'L_DEFAULT_THEME' => 'Thème par défaut', 'L_SUBMIT' => $LANG['submit']));
    return $tpl->parse(TEMPLATE_STRING_MODE);
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:themeswitcher.php

示例3: generate_select

 static function generate_select($auth_bit, $array_auth = array(), $array_ranks_default = array(), $idselect = '', $disabled = '', $disabled_advanced_auth = false)
 {
     global $Sql, $LANG, $CONFIG, $array_ranks, $Group;
     $array_ranks = is_array($array_ranks) ? $array_ranks : array('-1' => $LANG['guest'], '0' => $LANG['member'], '1' => $LANG['modo'], '2' => $LANG['admin']);
     $idselect = (string) $idselect == '' ? $auth_bit : $idselect;
     $Template = new Template('framework/groups_auth.tpl');
     $Template->assign_vars(array('C_NO_ADVANCED_AUTH' => $disabled_advanced_auth ? true : false, 'C_ADVANCED_AUTH' => $disabled_advanced_auth ? false : true, 'THEME' => get_utheme(), 'PATH_TO_ROOT' => TPL_PATH_TO_ROOT, 'IDSELECT' => $idselect, 'DISABLED_SELECT' => empty($disabled) ? 'if (disabled == 0)' : '', 'L_USERS' => $LANG['member_s'], 'L_ADD_USER' => $LANG['add_member'], 'L_REQUIRE_PSEUDO' => addslashes($LANG['require_pseudo']), 'L_RANKS' => $LANG['ranks'], 'L_GROUPS' => $LANG['groups'], 'L_GO' => $LANG['go'], 'L_ADVANCED_AUTHORIZATION' => $LANG['advanced_authorization'], 'L_SELECT_ALL' => $LANG['select_all'], 'L_SELECT_NONE' => $LANG['select_none'], 'L_EXPLAIN_SELECT_MULTIPLE' => $LANG['explain_select_multiple']));
     ##### Génération d'une liste à sélection multiple des rangs et membres #####
     //Liste des rangs
     $j = -1;
     foreach ($array_ranks as $idrank => $group_name) {
         //Si il s'agit de l'administrateur, il a automatiquement l'autorisation
         if ($idrank == 2) {
             $Template->assign_block_vars('ranks_list', array('ID' => $j, 'IDRANK' => $idrank, 'RANK_NAME' => $group_name, 'DISABLED' => '', 'SELECTED' => ' selected="selected"'));
         } else {
             $selected = '';
             if (array_key_exists('r' . $idrank, $array_auth) && ((int) $array_auth['r' . $idrank] & (int) $auth_bit) !== 0 && empty($disabled)) {
                 $selected = ' selected="selected"';
             }
             $selected = isset($array_ranks_default[$idrank]) && $array_ranks_default[$idrank] === true && empty($disabled) ? 'selected="selected"' : $selected;
             $Template->assign_block_vars('ranks_list', array('ID' => $j, 'IDRANK' => $idrank, 'RANK_NAME' => $group_name, 'DISABLED' => !empty($disabled) ? 'disabled = "disabled" ' : '', 'SELECTED' => $selected));
         }
         $j++;
     }
     foreach ($Group->get_groups_array() as $idgroup => $group_name) {
         $selected = '';
         if (array_key_exists($idgroup, $array_auth) && ((int) $array_auth[$idgroup] & (int) $auth_bit) !== 0 && empty($disabled)) {
             $selected = ' selected="selected"';
         }
         $Template->assign_block_vars('groups_list', array('IDGROUP' => $idgroup, 'GROUP_NAME' => $group_name, 'DISABLED' => $disabled, 'SELECTED' => $selected));
     }
     ##### Génération du formulaire pour les autorisations membre par membre. #####
     $array_auth_members = array();
     if (is_array($array_auth)) {
         foreach ($array_auth as $type => $auth) {
             if (substr($type, 0, 1) == 'm') {
                 if (array_key_exists($type, $array_auth) && ((int) $array_auth[$type] & (int) $auth_bit) !== 0) {
                     $array_auth_members[$type] = $auth;
                 }
             }
         }
     }
     $advanced_auth = count($array_auth_members) > 0;
     $Template->assign_vars(array('ADVANCED_AUTH_STYLE' => $advanced_auth ? 'display:block;' : 'display:none;'));
     if ($advanced_auth) {
         $result = $Sql->query_while("SELECT user_id, login\n\t\t\tFROM " . PREFIX . "member\n\t\t\tWHERE user_id IN(" . implode(str_replace('m', '', array_keys($array_auth_members)), ', ') . ")", __LINE__, __FILE__);
         while ($row = $Sql->fetch_assoc($result)) {
             $Template->assign_block_vars('members_list', array('USER_ID' => $row['user_id'], 'LOGIN' => $row['login']));
         }
         $Sql->query_close($result);
     }
     return $Template->parse(TEMPLATE_STRING_MODE);
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:53,代码来源:authorizations.class.php

示例4: handler_php

    function handler_php($errno, $errstr, $errfile, $errline)
    {
        global $LANG, $CONFIG;
        if (!($errno & ERROR_REPORTING)) {
            return true;
        }
        if (!DISPLAY_ALL_ERROR && error_reporting() == 0) {
            return true;
        }
        switch ($errno) {
            case E_USER_NOTICE:
            case E_NOTICE:
            case E_STRICT:
                $errdesc = $LANG['e_notice'];
                $errimg = 'notice';
                $errclass = 'error_notice';
                break;
            case E_USER_WARNING:
            case E_WARNING:
                $errdesc = $LANG['e_warning'];
                $errimg = 'important';
                $errclass = 'error_warning';
                break;
            case E_USER_ERROR:
            case E_ERROR:
                $errdesc = $LANG['error'];
                $errimg = 'stop';
                $errclass = 'error_fatal';
                break;
            default:
                $errdesc = $LANG['e_unknow'];
                $errimg = 'question';
                $errclass = 'error_unknow';
        }
        echo '<div class="' . $errclass . '" style="width:500px;margin:auto;padding:15px;">
			<img src="' . PATH_TO_ROOT . '/templates/' . get_utheme() . '/images/' . $errimg . '.png" alt="" style="float:left;padding-right:6px;" />
			<strong>' . $errdesc . '</strong> : ' . $errstr . ' ' . $LANG['infile'] . ' <strong>' . $errfile . '</strong> ' . $LANG['atline'] . ' <strong>' . $errline . '</strong>
			<br />
		</div>';
        $this->_error_log($errfile, $errline, $errno, $errstr, true);
        if ($errno == E_USER_ERROR) {
            exit;
        }
        return true;
    }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:45,代码来源:errors.class.php

示例5: show_cat_contents

function show_cat_contents($id_cat, $cats, $id, $display_select_link, $user_id)
{
    global $Sql, $CONFIG;
    $line = '';
    $result = $Sql->query_while("SELECT id, name\n\tFROM " . PREFIX . "upload_cat\n\tWHERE user_id = '" . $user_id . "'\n\tAND id_parent = '" . $id_cat . "'\n\tORDER BY name", __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        if (in_array($row['id'], $cats)) {
            $line .= '<li><a href="javascript:show_cat_contents(' . $row['id'] . ', ' . ($display_select_link != 0 ? 1 : 0) . ');"><img src="../templates/' . get_utheme() . '/images/upload/minus.png" alt="" id="img2_' . $row['id'] . '" style="vertical-align:middle" /></a> <a href="javascript:show_cat_contents(' . $row['id'] . ', ' . ($display_select_link != 0 ? 1 : 0) . ');"><img src="../templates/' . get_utheme() . '/images/upload/opened_cat.png" alt="" id="img_' . $row['id'] . '" style="vertical-align:middle" /></a>&nbsp;<span id="class_' . $row['id'] . '" class="' . ($row['id'] == $id ? 'upload_selected_cat' : '') . '"><a href="javascript:' . ($display_select_link != 0 ? 'select_cat' : 'open_cat') . '(' . $row['id'] . ');">' . $row['name'] . '</a></span><span id="cat_' . $row['id'] . '">
			<ul style="margin:0;padding:0;list-style-type:none;line-height:normal;padding-left:30px;">' . show_cat_contents($row['id'], $cats, $id, $display_select_link, $user_id) . '</ul></span></li>';
        } else {
            $sub_cats_number = $Sql->query("SELECT COUNT(*) FROM " . DB_TABLE_UPLOAD_CAT . " WHERE id_parent = '" . $row['id'] . "'", __LINE__, __FILE__);
            if ($sub_cats_number > 0) {
                $line .= '<li><a href="javascript:show_cat_contents(' . $row['id'] . ', ' . ($display_select_link != 0 ? 1 : 0) . ');"><img src="../templates/' . get_utheme() . '/images/upload/plus.png" alt="" id="img2_' . $row['id'] . '" style="vertical-align:middle" /></a> <a href="javascript:show_cat_contents(' . $row['id'] . ', ' . ($display_select_link != 0 ? 1 : 0) . ');"><img src="../templates/' . get_utheme() . '/images/upload/closed_cat.png" alt="" id="img_' . $row['id'] . '" style="vertical-align:middle" /></a>&nbsp;<span id="class_' . $row['id'] . '" class="' . ($row['id'] == $id ? 'upload_selected_cat' : '') . '"><a href="javascript:' . ($display_select_link != 0 ? 'select_cat' : 'open_cat') . '(' . $row['id'] . ');">' . $row['name'] . '</a></span><span id="cat_' . $row['id'] . '"></span></li>';
            } else {
                $line .= '<li style="padding-left:17px;"><img src="../templates/' . get_utheme() . '/images/upload/closed_cat.png" alt=""  style="vertical-align:middle" />&nbsp;<span id="class_' . $row['id'] . '" class="' . ($row['id'] == $id ? 'upload_selected_cat' : '') . '"><a href="javascript:' . ($display_select_link != 0 ? 'select_cat' : 'open_cat') . '(' . $row['id'] . ');">' . $row['name'] . '</a></span></li>';
            }
        }
    }
    $Sql->query_close($result);
    return "\n" . $line;
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:21,代码来源:upload_functions.php

示例6: poll_mini

function poll_mini($position, $block)
{
    global $Cache, $LANG, $CONFIG_POLL, $_array_poll;
    $Cache->load('poll');
    if (!empty($CONFIG_POLL['poll_mini']) && $CONFIG_POLL['poll_mini'] != array() && strpos(SCRIPT, '/poll/poll.php') === false) {
        load_module_lang('poll');
        $poll_mini = $_array_poll[array_rand($_array_poll)];
        $tpl = new Template('poll/poll_mini.tpl');
        import('core/menu_service');
        MenuService::assign_positions_conditions($tpl, $block);
        #####################R�sultats######################
        $array_cookie = isset($_COOKIE[$CONFIG_POLL['poll_cookie']]) ? explode('/', $_COOKIE[$CONFIG_POLL['poll_cookie']]) : array();
        if (in_array($poll_mini['id'], $array_cookie)) {
            $tpl->assign_vars(array('THEME' => get_utheme(), 'MODULE_DATA_PATH' => $tpl->get_module_data_path('poll'), 'L_MINI_POLL' => $LANG['mini_poll'], 'L_VOTE' => $poll_mini['total'] > 1 ? $LANG['poll_vote_s'] : $LANG['poll_vote']));
            $tpl->assign_block_vars('result', array('QUESTION' => $poll_mini['question'], 'VOTES' => $poll_mini['total']));
            foreach ($poll_mini['votes'] as $answer => $width) {
                $tpl->assign_block_vars('result.answers', array('ANSWERS' => $answer, 'WIDTH' => number_round($width, 0), 'PERCENT' => $width));
            }
        } else {
            #####################Questions######################
            $tpl->assign_vars(array('L_MINI_POLL' => $LANG['mini_poll'], 'L_VOTE' => $LANG['poll_vote'], 'L_POLL_RESULT' => $LANG['poll_result'], 'U_POLL_RESULT' => url('.php?id=' . $poll_mini['id'] . '&amp;r=1', '-' . $poll_mini['id'] . '-1.php')));
            global $Session;
            $tpl->assign_block_vars('question', array('ID' => url('.php?id=' . $poll_mini['id'] . '&amp;token=' . $Session->get_token(), '-' . $poll_mini['id'] . '.php?token=' . $Session->get_token()), 'QUESTION' => $poll_mini['question']));
            $z = 0;
            if ($poll_mini['type'] == '1') {
                foreach ($poll_mini['votes'] as $answer => $width) {
                    $tpl->assign_block_vars('question.radio', array('NAME' => $z, 'ANSWERS' => $answer));
                    $z++;
                }
            } elseif ($poll_mini['type'] == '0') {
                foreach ($poll_mini['votes'] as $answer => $width) {
                    $tpl->assign_block_vars('question.checkbox', array('NAME' => $z, 'ANSWERS' => $answer));
                    $z++;
                }
            }
        }
        return $tpl->parse(TEMPLATE_STRING_MODE);
    }
    return '';
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:40,代码来源:poll_mini.php

示例7: while

    $Template->set_filenames(array('admin_articles_cat_add' => 'articles/admin_articles_cat_add.tpl'));
    $galleries = '<option value="0" id="img_default_select" checked="checked">' . $LANG['root'] . '</option>';
    $result = $Sql->query_while("SELECT id, name, level\n\tFROM " . PREFIX . "articles_cats \n\tORDER BY id_left", __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $margin = $row['level'] > 0 ? str_repeat('--------', $row['level']) : '--';
        $galleries .= '<option value="' . $row['id'] . '">' . $margin . ' ' . $row['name'] . '</option>';
    }
    $Sql->query_close($result);
    $rep = './';
    $image_list = '';
    if (is_dir($rep)) {
        $img_array = array();
        $dh = @opendir($rep);
        while (!is_bool($lang = @readdir($dh))) {
            if (preg_match('`\\.(gif|png|jpg|jpeg|tiff)+$`i', $lang)) {
                $img_array[] = $lang;
            }
        }
        @closedir($dh);
        foreach ($img_array as $key => $img_path) {
            $image_list .= '<option value="' . $img_path . '">' . $img_path . '</option>';
        }
    }
    $get_error = retrieve(GET, 'error', '');
    if ($get_error == 'incomplete') {
        $Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
    }
    $Template->assign_vars(array('THEME' => get_utheme(), 'MODULE_DATA_PATH' => $Template->get_module_data_path('articles'), 'CATEGORIES' => $galleries, 'AUTH_READ' => Authorizations::generate_select(READ_CAT_ARTICLES, array(), array(-1 => true, 0 => true, 1 => true, 2 => true)), 'IMG_LIST' => $image_list, 'L_REQUIRE_TITLE' => $LANG['require_title'], 'L_ARTICLES_MANAGEMENT' => $LANG['articles_management'], 'L_ARTICLES_ADD' => $LANG['articles_add'], 'L_ARTICLES_CAT' => $LANG['cat_management'], 'L_ARTICLES_CONFIG' => $LANG['articles_config'], 'L_ARTICLES_CAT_ADD' => $LANG['articles_cats_add'], 'L_REQUIRE' => $LANG['require'], 'L_APROB' => $LANG['aprob'], 'L_ICON' => $LANG['icon_cat'], 'L_ICON_EXPLAIN' => $LANG['icon_cat_explain'], 'L_OR_DIRECT_PATH' => $LANG['or_direct_path'], 'L_RANK' => $LANG['rank'], 'L_DELETE' => $LANG['delete'], 'L_PARENT_CATEGORY' => $LANG['parent_category'], 'L_NAME' => $LANG['name'], 'L_DESC' => $LANG['description'], 'L_RESET' => $LANG['reset'], 'L_YES' => $LANG['yes'], 'L_NO' => $LANG['no'], 'L_LOCK' => $LANG['lock'], 'L_UNLOCK' => $LANG['unlock'], 'L_GUEST' => $LANG['guest'], 'L_USER' => $LANG['member'], 'L_MODO' => $LANG['modo'], 'L_ADMIN' => $LANG['admin'], 'L_ADD' => $LANG['add'], 'L_AUTH_READ' => $LANG['auth_read']));
    $Template->pparse('admin_articles_cat_add');
}
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_articles_cat_add.php

示例8: define

<?php

require_once '../admin/admin_begin.php';
define('TITLE', $LANG['administration']);
require_once '../admin/admin_header.php';
$template = new Template('admin/admin_system_report.tpl');
$template->assign_vars(array('L_YES' => $LANG['yes'], 'L_NO' => $LANG['no'], 'L_UNKNOWN' => $LANG['unknown'], 'L_SYSTEM_REPORT' => $LANG['system_report'], 'L_SERVER' => $LANG['server'], 'L_PHPINFO' => $LANG['phpinfo'], 'L_PHP_VERSION' => $LANG['php_version'], 'L_DBMS_VERSION' => $LANG['dbms_version'], 'L_GD_LIBRARY' => $LANG['dg_library'], 'L_URL_REWRITING' => $LANG['url_rewriting'], 'L_REGISTER_GLOBALS_OPTION' => $LANG['register_globals_option'], 'L_SERVER_URL' => $LANG['serv_name'], 'L_SITE_PATH' => $LANG['serv_path'], 'L_PHPBOOST_CONFIG' => $LANG['phpboost_config'], 'L_KERNEL_VERSION' => $LANG['kernel_version'], 'L_DEFAULT_THEME' => $LANG['default_theme'], 'L_DEFAULT_LANG' => $LANG['default_language'], 'L_DEFAULT_EDITOR' => $LANG['choose_editor'], 'L_START_PAGE' => $LANG['start_page'], 'L_OUTPUT_GZ' => $LANG['output_gz'], 'L_COOKIE_NAME' => $LANG['cookie_name'], 'L_SESSION_LENGTH' => $LANG['session_time'], 'L_SESSION_GUEST_LENGTH' => $LANG['session invit'], 'L_DIRECTORIES_AUTH' => $LANG['directories_auth'], 'L_SUMMERIZATION' => $LANG['system_report_summerization'], 'L_SUMMERIZATION_EXPLAIN' => $LANG['system_report_summerization_explain']));
$temp_var = function_exists('apache_get_modules') ? apache_get_modules() : array();
$server_path = !empty($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
if (!$server_path) {
    $server_path = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
}
$server_path = trim(str_replace('/admin', '', dirname($server_path)));
$server_name = 'http://' . (!empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : getenv('HTTP_HOST'));
$lang_ini_file = load_ini_file('../lang/', get_ulang());
$template_ini_file = load_ini_file('../templates/' . get_utheme() . '/config/', get_ulang());
$directories_summerization = '';
$directories_list = array('/', '/cache', '/cache/backup', '/cache/syndication/', '/cache/tpl', '/images/avatars', '/images/group', '/images/maths', '/images/smileys', '/lang', '/menus', '/templates', '/upload');
foreach ($directories_list as $dir) {
    $dir_status = is_dir('..' . $dir) && is_writable('..' . $dir);
    $template->assign_block_vars('directories', array('NAME' => $dir, 'C_AUTH_DIR' => $dir_status));
    $directories_summerization .= $dir . str_repeat(' ', 25 - strlen($dir)) . ": " . (int) $dir_status . "\n";
}
$summerization = "---------------------------------System report---------------------------------\n-----------------------------generated by PHPBoost-----------------------------\n\nSERVER CONFIGURATION-----------------------------------------------------------\n\nphp version              : " . phpversion() . "\ndbms version             : " . $Sql->get_dbms_version() . "\ngd library               : " . (int) @extension_loaded('gd') . "\nurl rewriting            : " . (function_exists('apache_get_modules') ? (int) (!empty($temp_var[5])) : "?") . "\nregister globals         : " . (int) (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') . "\nserver url               : " . $server_name . "\nsite path                : " . $server_path . "\n\nPHPBOOST CONFIGURATION---------------------------------------------------------\n\nphpboost version         : " . phpboost_version() . "\nserver url               : " . $CONFIG['server_name'] . "\nsite path                : " . $CONFIG['server_path'] . "\ndefault theme            : " . $template_ini_file['name'] . "\ndefault language         : " . get_ulang() . "\ndefault editor           : " . $CONFIG['editor'] . "\nstart page               : " . $CONFIG['start_page'] . "\nurl rewriting            : " . $CONFIG['rewrite'] . "\noutput gz                : " . $CONFIG['ob_gzhandler'] . "\nsession cookie name      : " . $CONFIG['site_cookie'] . "\nsession length           : " . $CONFIG['site_session'] . "\nguest session length     : " . $CONFIG['site_session_invit'] . "\n\nDIRECTORIES AUTHORIZATIONS-----------------------------------------------------\n\n" . $directories_summerization;
$template->assign_vars(array('PHP_VERSION' => phpversion(), 'DBMS_VERSION' => $Sql->get_dbms_version(), 'C_SERVER_GD_LIBRARY' => @extension_loaded('gd'), 'C_URL_REWRITING_KNOWN' => function_exists('apache_get_modules'), 'C_SERVER_URL_REWRITING' => function_exists('apache_get_modules') ? !empty($temp_var[5]) : false, 'C_REGISTER_GLOBALS' => @ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on', 'SERV_SERV_URL' => $server_name, 'SERV_SITE_PATH' => $server_path, 'KERNEL_VERSION' => phpboost_version(), 'KERNEL_SERV_URL' => $CONFIG['server_name'], 'KERNEL_SITE_PATH' => $CONFIG['server_path'], 'KERNEL_DEFAULT_THEME' => $template_ini_file['name'], 'KERNEL_DEFAULT_LANGUAGE' => $lang_ini_file['name'], 'KERNEL_DEFAULT_EDITOR' => $CONFIG['editor'] == 'tinymce' ? 'TinyMCE' : 'BBCode', 'KERNEL_START_PAGE' => $CONFIG['start_page'], 'C_KERNEL_URL_REWRITING' => (bool) $CONFIG['rewrite'], 'C_KERNEL_OUTPUT_GZ' => (bool) $CONFIG['ob_gzhandler'], 'COOKIE_NAME' => $CONFIG['site_cookie'], 'SESSION_LENGTH' => $CONFIG['site_session'], 'SESSION_LENGTH_GUEST' => $CONFIG['site_session_invit'], 'SUMMERIZATION' => $summerization));
$template->parse();
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:27,代码来源:admin_system_report.php

示例9: redirect

    ###### Régénération du cache des rangs #######
    $Cache->Generate_file('ranks');
    redirect(HOST . SCRIPT);
} else {
    $Template->set_filenames(array('admin_ranks' => 'admin/admin_ranks.tpl'));
    $Template->assign_vars(array('THEME' => get_utheme(), 'L_REQUIRE_RANK_NAME' => $LANG['require_rank_name'], 'L_REQUIRE_NBR_MSG_RANK' => $LANG['require_nbr_msg_rank'], 'L_CONFIRM_DEL_RANK' => $LANG['confirm_del_rank'], 'L_RANKS_MANAGEMENT' => $LANG['rank_management'], 'L_ADD_RANKS' => $LANG['rank_add'], 'L_RANK_NAME' => $LANG['rank_name'], 'L_NBR_MSG' => $LANG['nbr_msg'], 'L_IMG_ASSOC' => $LANG['img_assoc'], 'L_DELETE' => $LANG['delete'], 'L_UPDATE' => $LANG['update'], 'L_RESET' => $LANG['reset'], 'L_ADD' => $LANG['add']));
    import('io/filesystem/folder');
    $rank_options_array = array();
    $image_folder_path = new Folder(PATH_TO_ROOT . '/templates/' . get_utheme() . '/images/ranks');
    foreach ($image_folder_path->get_files('`\\.(png|jpg|bmp|gif)$`i') as $image) {
        $file = $image->get_name();
        $rank_options_array[] = $file;
    }
    $result = $Sql->query_while("SELECT id, name, msg, icon, special\n\tFROM " . DB_TABLE_RANKS . " \n\tORDER BY msg", __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        if ($row['special'] == 0) {
            $del = '<a href="admin_ranks.php?del=1&amp;id=' . $row['id'] . '" onclick="javascript:return Confirm();"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/delete.png" alt="" title="" /></a>';
        } else {
            $del = $LANG['special_rank'];
        }
        $rank_options = '<option value="">--</option>';
        foreach ($rank_options_array as $icon) {
            $selected = $icon == $row['icon'] ? ' selected="selected"' : '';
            $rank_options .= '<option value="' . $icon . '"' . $selected . '>' . $icon . '</option>';
        }
        $Template->assign_block_vars('rank', array('ID' => $row['id'], 'RANK' => $row['name'], 'MSG' => $row['special'] == 0 ? '<input type="text" maxlength="6" size="6" name="' . $row['id'] . 'msg" value="' . $row['msg'] . '" class="text" />' : $LANG['special_rank'], 'RANK_OPTIONS' => $rank_options, 'IMG_RANK' => $row['icon'], 'DELETE' => $del));
    }
    $Sql->query_close($result);
    $Template->pparse('admin_ranks');
}
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_ranks.php

示例10: ceil

        $img_announce .= $row['type'] == '1' ? '_post' : '';
        $img_announce .= $row['type'] == '2' ? '_top' : '';
        $img_announce .= $row['status'] == '0' && $row['type'] == '0' ? '_lock' : '';
        if (!empty($row['last_view_id'])) {
            $last_msg_id = $row['last_view_id'];
            $last_page = 'idm=' . $row['last_view_id'] . '&amp;';
            $last_page_rewrite = '-0-' . $row['last_view_id'];
        } else {
            $last_msg_id = $row['last_msg_id'];
            $last_page = ceil($row['nbr_msg'] / $CONFIG_FORUM['pagination_msg']);
            $last_page_rewrite = $last_page > 1 ? '-' . $last_page : '';
            $last_page = $last_page > 1 ? 'pt=' . $last_page . '&amp;' : '';
        }
        $rewrited_title = $CONFIG['rewrite'] == 1 ? '+' . url_encode_rewrite($row['title']) : '';
        $last_msg = '<a href="topic' . url('.php?' . $last_page . 'id=' . $row['id'], '-' . $row['id'] . $last_page_rewrite . $rewrited_title . '.php') . '#m' . $last_msg_id . '" title=""><img src="../templates/' . get_utheme() . '/images/ancre.png" alt="" /></a>' . ' ' . $LANG['on'] . ' ' . gmdate_format('date_format', $row['last_timestamp']) . '<br /> ' . $LANG['by'] . ' ' . (!empty($row['last_login']) ? '<a class="small_link" href="../member/member' . url('.php?id=' . $row['last_user_id'], '-' . $row['last_user_id'] . '.php') . '">' . wordwrap_html($row['last_login'], 13) . '</a>' : '<em>' . $LANG['guest'] . '</em>');
        $new_ancre = '<a href="topic' . url('.php?' . $last_page . 'id=' . $row['id'], '-' . $row['id'] . $last_page_rewrite . $rewrited_title . '.php') . '#m' . $last_msg_id . '" title=""><img src="../templates/' . get_utheme() . '/images/ancre.png" alt="" /></a>';
        $Template->assign_block_vars('topics', array('C_IMG_POLL' => !empty($row['question']), 'C_IMG_TRACK' => !empty($row['idtrack']), 'C_DISPLAY_MSG' => $CONFIG_FORUM['activ_display_msg'] && $CONFIG_FORUM['icon_activ_display_msg'] && $row['display_msg'], 'C_HOT_TOPIC' => $row['type'] == '0' && $row['status'] != '0' && $row['nbr_msg'] > $CONFIG_FORUM['pagination_msg'], 'IMG_ANNOUNCE' => $img_announce, 'ANCRE' => $new_ancre, 'TYPE' => $type[$row['type']], 'TITLE' => ucfirst($row['title']), 'AUTHOR' => !empty($row['login']) ? '<a href="../member/member' . url('.php?id=' . $row['user_id'], '-' . $row['user_id'] . '.php') . '" class="small_link">' . $row['login'] . '</a>' : '<em>' . $LANG['guest'] . '</em>', 'DESC' => $row['subtitle'], 'PAGINATION_TOPICS' => $Pagination->display('topic' . url('.php?id=' . $row['id'] . '&amp;pt=%d', '-' . $row['id'] . '-%d.php'), $row['nbr_msg'], 'pt', $CONFIG_FORUM['pagination_msg'], 2, 10, false), 'MSG' => $row['nbr_msg'] - 1, 'VUS' => $row['nbr_views'], 'U_TOPIC_VARS' => url('.php?id=' . $row['id'], '-' . $row['id'] . $rewrited_title . '.php'), 'U_LAST_MSG' => $last_msg, 'L_DISPLAY_MSG' => $CONFIG_FORUM['activ_display_msg'] && $row['display_msg'] ? $CONFIG_FORUM['display_msg'] : ''));
    }
    $Sql->query_close($result);
    $nbr_topics = $Sql->query("SELECT COUNT(*)\n\tFROM " . PREFIX . "forum_view v\n\tLEFT JOIN " . PREFIX . "forum_topics t ON t.id = v.idtopic\n\tWHERE t.last_timestamp >= '" . $max_time . "' AND v.user_id = '" . $User->get_attribute('user_id') . "'", __LINE__, __FILE__);
    if ($nbr_topics == 0) {
        $Template->assign_vars(array('C_NO_TOPICS' => true, 'L_NO_TOPICS' => '0 ' . $LANG['no_last_read']));
    }
    $Template->assign_vars(array('FORUM_NAME' => $CONFIG_FORUM['forum_name'], 'SID' => SID, 'MODULE_DATA_PATH' => $Template->get_module_data_path('forum'), 'PAGINATION' => $Pagination->display('lastread' . url('.php?p=%d'), $nbr_topics, 'p', $CONFIG_FORUM['pagination_topic'], 3), 'LANG' => get_ulang(), 'U_CHANGE_CAT' => 'unread.php' . SID . '&amp;token=' . $Session->get_token(), 'U_ONCHANGE' => url(".php?id=' + this.options[this.selectedIndex].value + '", "-' + this.options[this.selectedIndex].value + '.php"), 'U_ONCHANGE_CAT' => url("index.php?id=' + this.options[this.selectedIndex].value + '", "cat-' + this.options[this.selectedIndex].value + '.php"), 'U_FORUM_CAT' => '<a href="../forum/lastread.php' . SID . '">' . $LANG['show_last_read'] . '</a>', 'U_POST_NEW_SUBJECT' => '', 'L_FORUM_INDEX' => $LANG['forum_index'], 'L_FORUM' => $LANG['forum'], 'L_AUTHOR' => $LANG['author'], 'L_TOPIC' => $nbr_topics > 1 ? $LANG['topic_s'] : $LANG['topic'], 'L_MESSAGE' => $LANG['replies'], 'L_ANSWERS' => $LANG['answers'], 'L_VIEW' => $LANG['views'], 'L_LAST_MESSAGE' => $LANG['last_message']));
    list($users_list, $total_admin, $total_modo, $total_member, $total_visit, $total_online) = forum_list_user_online("AND s.session_script = '/forum/lastread.php'");
    $Template->assign_vars(array('TOTAL_ONLINE' => $total_online, 'USERS_ONLINE' => $total_online - $total_visit == 0 ? '<em>' . $LANG['no_member_online'] . '</em>' : $users_list, 'ADMIN' => $total_admin, 'MODO' => $total_modo, 'MEMBER' => $total_member, 'GUEST' => $total_visit, 'SELECT_CAT' => forum_list_cat(0, 0), 'L_USER' => $total_online > 1 ? $LANG['user_s'] : $LANG['user'], 'L_ADMIN' => $total_admin > 1 ? $LANG['admin_s'] : $LANG['admin'], 'L_MODO' => $total_modo > 1 ? $LANG['modo_s'] : $LANG['modo'], 'L_MEMBER' => $total_member > 1 ? $LANG['member_s'] : $LANG['member'], 'L_GUEST' => $total_visit > 1 ? $LANG['guest_s'] : $LANG['guest'], 'L_AND' => $LANG['and'], 'L_ONLINE' => strtolower($LANG['online'])));
    $Template->pparse('forum_topics');
} else {
    redirect(HOST . DIR . '/forum/index.php' . SID2);
}
include '../kernel/footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:lastread.php

示例11: while

    $query = "SELECT * FROM " . $table . $Sql->limit($Pagination->get_first_msg(30, 'p'), 30);
    $result = $Sql->query_while($query, __LINE__, __FILE__);
    $i = 1;
    while ($row = $Sql->fetch_assoc($result)) {
        $Template->assign_block_vars('line', array());
        if ($i == 1) {
            $Template->assign_block_vars('line.field', array('FIELD' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'CLASS' => 'row1', 'STYLE' => ''));
            foreach ($row as $field_name => $field_value) {
                $Template->assign_block_vars('line.field', array('FIELD' => '<strong>' . $field_name . '</strong>', 'CLASS' => 'row1'));
            }
            $Template->assign_block_vars('line', array());
        }
        $j = 0;
        foreach ($row as $field_name => $field_value) {
            if ($j == 0 && !empty($primary_key)) {
                $Template->assign_block_vars('line.field', array('FIELD' => '<a href="admin_database_tools.php?table=' . $table . '&amp;field=' . $field_name . '&amp;value=' . $field_value . '&amp;action=update&amp;token=' . $Session->get_token() . '" title="' . $LANG['update'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/edit.png" alt="" class="valign_middle" /></a> <a href="admin_database_tools.php?table=' . $table . '&amp;field=' . $field_name . '&amp;value=' . $field_value . '&amp;action=delete&amp;token=' . $Session->get_token() . '" onclick="javascript:return Confirm_del_entry()" title="' . $LANG['delete'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/delete.png" alt="" class="valign_middle" /></a>', 'CLASS' => 'row1', 'STYLE' => ''));
            }
            $Template->assign_block_vars('line.field', array('FIELD' => str_replace("\n", '<br />', strprotect($field_value, HTML_PROTECT, ADDSLASHES_NONE)), 'CLASS' => 'row2', 'STYLE' => is_numeric($field_value) ? 'text-align:right;' : ''));
            $j++;
        }
        $i++;
    }
    $Template->assign_vars(array('C_DATABASE_TABLE_DATA' => true, 'C_DATABASE_TABLE_STRUCTURE' => false, 'QUERY' => Sql::indent_query($query), 'QUERY_HIGHLIGHT' => Sql::highlight_query($query), 'PAGINATION' => $Pagination->display('admin_database_tools.php?table=' . $table . '&amp;action=data&amp;p=%d', $nbr_lines, 'p', 30, 3), 'L_REQUIRE' => $LANG['require'], 'L_EXPLAIN_QUERY' => $LANG['db_query_explain'], 'L_CONFIRM_QUERY' => $LANG['db_confirm_query'], 'L_EXECUTE' => $LANG['db_submit_query'], 'L_RESULT' => $LANG['db_query_result'], 'L_PAGE' => $LANG['page'], 'L_EXECUTED_QUERY' => $LANG['db_executed_query']));
} elseif (!empty($table) && $action == 'delete') {
    $Session->csrf_get_protect();
    $field = retrieve(GET, 'field', '');
    $value = retrieve(GET, 'value', '');
    if (!empty($value) && !empty($field)) {
        $Sql->query_inject("DELETE FROM " . $table . " WHERE " . $field . " = '" . $value . "'", __LINE__, __FILE__);
    }
    redirect(HOST . DIR . '/database/admin_database_tools.php?table=' . $table . '&action=data');
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_database_tools.php

示例12: strlen

                $name_cut = strlen(html_entity_decode($row['name'], ENT_COMPAT, 'ISO-8859-1')) > 22 ? htmlentities(substr(html_entity_decode($row['name'], ENT_COMPAT, 'ISO-8859-1'), 0, 22), ENT_COMPAT, 'ISO-8859-1') . '...' : $row['name'];
                $name = html_entity_decode($row['name'], ENT_COMPAT, 'ISO-8859-1');
                $name = strlen($name) > 20 ? substr($name, 0, 20) . '...' : $name;
                $tr_start = is_int($j / $nbr_column_pics) ? '<tr>' : '';
                $j++;
                $tr_end = is_int($j / $nbr_column_pics) ? '</tr>' : '';
                if ($CONFIG_GALLERY['display_pics'] == 3) {
                    $display_link = HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&amp;cat=' . $row['idcat']);
                } elseif ($CONFIG_GALLERY['display_pics'] == 2) {
                    $display_link = 'javascript:display_pics_popup(\'' . HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&amp;cat=' . $row['idcat']) . '\', \'' . $row['width'] . '\', \'' . $row['height'] . '\')';
                } elseif ($CONFIG_GALLERY['display_pics'] == 1) {
                    $display_link = 'javascript:display_pics(' . $row['id'] . ', \'' . HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&amp;cat=' . $row['idcat']) . '\', 0)';
                } else {
                    $display_link = 'admin_gallery.php?cat=' . $row['idcat'] . '&amp;id=' . $row['id'] . '#pics_max';
                }
                $cat_list = '';
                foreach ($array_cat_list as $key_cat => $option_value) {
                    $cat_list .= $key_cat == $row['idcat'] ? sprintf($option_value, 'selected="selected"') : sprintf($option_value, '');
                }
                $Template->assign_block_vars('pics.list', array('ID' => $row['id'], 'IMG' => '<img src="pics/thumbnails/' . $row['path'] . '" alt="' . $name . '" />', 'PATH' => $row['path'], 'NAME' => $name_cut, 'TITLE' => str_replace('"', '\\"', $row['name']), 'RENAME_FILE' => '<span id="fihref' . $row['id'] . '"><a href="javascript:display_rename_file(\'' . $row['id'] . '\', \'' . addslashes($row['name']) . '\', \'' . addslashes($name_cut) . '\');"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/edit.png" alt="' . $LANG['edit'] . '" class="valign_middle" /></a></span>', 'IMG_APROB' => $row['aprob'] == 1 ? 'unvisible.png' : 'visible.png', 'TR_START' => $tr_start, 'TR_END' => $tr_end, 'CAT' => $cat_list, 'L_APROB_IMG' => $row['aprob'] == 1 ? $LANG['unaprob'] : $LANG['aprob'], 'U_DISPLAY' => $display_link, 'U_POSTOR' => $LANG['by'] . ' <a class="com" href="../member/member' . url('.php?id=' . $row['user_id'], '-' . $row['user_id'] . '.php') . '">' . $row['login'] . '</a>'));
            }
            $Sql->query_close($result);
            while (!is_int($j / $nbr_column_pics)) {
                $j++;
                $Template->assign_block_vars('pics.end_td_pics', array('TD_END' => '<td class="row2" style="width:' . $column_width_pics . '%">&nbsp;</td>', 'TR_END' => is_int($j / $nbr_column_pics) ? '</tr>' : ''));
            }
        }
    }
    $Template->pparse('admin_gallery_management');
}
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_gallery.php

示例13: ceil

        $img_announce .= $row['type'] == '1' ? '_post' : '';
        $img_announce .= $row['type'] == '2' ? '_top' : '';
        $img_announce .= $row['status'] == '0' && $row['type'] == '0' ? '_lock' : '';
        if (!empty($row['last_view_id'])) {
            $last_msg_id = $row['last_view_id'];
            $last_page = 'idm=' . $row['last_view_id'] . '&amp;';
            $last_page_rewrite = '-0-' . $row['last_view_id'];
        } else {
            $last_msg_id = $row['last_msg_id'];
            $last_page = ceil($row['nbr_msg'] / $CONFIG_FORUM['pagination_msg']);
            $last_page_rewrite = $last_page > 1 ? '-' . $last_page : '';
            $last_page = $last_page > 1 ? 'pt=' . $last_page . '&amp;' : '';
        }
        $rewrited_title = $CONFIG['rewrite'] == 1 ? '+' . url_encode_rewrite($row['title']) : '';
        $last_msg = '<a href="topic' . url('.php?' . $last_page . 'id=' . $row['id'], '-' . $row['id'] . $last_page_rewrite . $rewrited_title . '.php') . '#m' . $last_msg_id . '" title=""><img src="../templates/' . get_utheme() . '/images/ancre.png" alt="" /></a>' . ' ' . $LANG['on'] . ' ' . gmdate_format('date_format', $row['last_timestamp']) . '<br /> ' . $LANG['by'] . ' ' . (!empty($row['last_login']) ? '<a class="small_link" href="../member/member' . url('.php?id=' . $row['last_user_id'], '-' . $row['last_user_id'] . '.php') . '">' . wordwrap_html($row['last_login'], 13) . '</a>' : '<em>' . $LANG['guest'] . '</em>');
        $new_ancre = $new_msg === true && $User->get_attribute('user_id') !== -1 ? '<a href="topic' . url('.php?' . $last_page . 'id=' . $row['id'], '-' . $row['id'] . $last_page_rewrite . $rewrited_title . '.php') . '#m' . $last_msg_id . '" title=""><img src="../templates/' . get_utheme() . '/images/ancre.png" alt="" /></a>' : '';
        $Template->assign_block_vars('topics', array('C_HOT_TOPIC' => $row['type'] == '0' && $row['status'] != '0' && $row['nbr_msg'] > $CONFIG_FORUM['pagination_msg'], 'ID' => $row['id'], 'INCR' => $nbr_topics_compt, 'CHECKED_PM' => $row['pm'] == 1 ? 'checked="checked"' : '', 'CHECKED_MAIL' => $row['mail'] == 1 ? 'checked="checked"' : '', 'IMG_ANNOUNCE' => $img_announce, 'ANCRE' => $new_ancre, 'POLL' => !empty($row['question']) ? '<img src="' . $Template->get_module_data_path('forum') . '/images/poll_mini.png" class="valign_middle" alt="" />' : '', 'TRACK' => '<img src="' . $Template->get_module_data_path('forum') . '/images/track_mini.png" class="valign_middle" alt="" />', 'DISPLAY_MSG' => $CONFIG_FORUM['activ_display_msg'] && $CONFIG_FORUM['icon_activ_display_msg'] && $row['display_msg'] ? '<img src="' . $Template->get_module_data_path('forum') . '/images/msg_display_mini.png" alt="" style="vertical-align:middle;" />' : '', 'TYPE' => $type[$row['type']], 'TITLE' => ucfirst($row['title']), 'AUTHOR' => !empty($row['login']) ? '<a href="../member/member' . url('.php?id=' . $row['user_id'], '-' . $row['user_id'] . '.php') . '" class="small_link">' . $row['login'] . '</a>' : '<em>' . $LANG['guest'] . '</em>', 'DESC' => $row['subtitle'], 'PAGINATION_TOPICS' => $Pagination->display('topic' . url('.php?id=' . $row['id'] . '&amp;pt=%d', '-' . $row['id'] . '-%d.php'), $row['nbr_msg'], 'pt', $CONFIG_FORUM['pagination_msg'], 2, 10, false), 'MSG' => $row['nbr_msg'] - 1, 'VUS' => $row['nbr_views'], 'U_TOPIC_VARS' => url('.php?id=' . $row['id'], '-' . $row['id'] . $rewrited_title . '.php'), 'U_LAST_MSG' => $last_msg, 'L_DISPLAY_MSG' => $CONFIG_FORUM['activ_display_msg'] && $row['display_msg'] ? $CONFIG_FORUM['display_msg'] : ''));
        $nbr_topics_compt++;
    }
    $Sql->query_close($result);
    $nbr_topics = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "forum_topics t\n\tLEFT JOIN " . PREFIX . "forum_track tr ON tr.idtopic = t.id\n\tWHERE tr.user_id = '" . $User->get_attribute('user_id') . "'", __LINE__, __FILE__);
    if ($nbr_topics == 0) {
        $Template->assign_vars(array('C_NO_TRACKED_TOPICS' => true, 'L_NO_TRACKED_TOPICS' => '0 ' . $LANG['show_topic_track']));
    }
    $l_topic = $nbr_topics > 1 ? $LANG['topic_s'] : $LANG['topic'];
    $Template->assign_vars(array('NBR_TOPICS' => $nbr_topics, 'FORUM_NAME' => $CONFIG_FORUM['forum_name'], 'SID' => SID, 'MODULE_DATA_PATH' => $Template->get_module_data_path('forum'), 'PAGINATION' => $Pagination->display('track' . url('.php?p=%d'), $nbr_topics, 'p', $CONFIG_FORUM['pagination_topic'], 3), 'LANG' => get_ulang(), 'U_MSG_SET_VIEW' => '<a class="small_link" href="../forum/action' . url('.php?read=1&amp;favorite=1', '') . '" title="' . $LANG['mark_as_read'] . '" onclick="javascript:return Confirm_read_topics();">' . $LANG['mark_as_read'] . '</a>', 'U_CHANGE_CAT' => 'track.php' . SID . '&amp;token=' . $Session->get_token(), 'U_ONCHANGE' => url(".php?id=' + this.options[this.selectedIndex].value + '", "-' + this.options[this.selectedIndex].value + '.php"), 'U_ONCHANGE_CAT' => url("index.php?id=' + this.options[this.selectedIndex].value + '", "cat-' + this.options[this.selectedIndex].value + '.php"), 'U_FORUM_CAT' => '<a href="../forum/track.php' . SID . '">' . $LANG['show_topic_track'] . '</a>', 'U_POST_NEW_SUBJECT' => '', 'U_TRACK_ACTION' => url('.php?p=' . $page . '&amp;token=' . $Session->get_token()), 'L_FORUM_INDEX' => $LANG['forum_index'], 'L_AUTHOR' => $LANG['author'], 'L_FORUM' => $LANG['forum'], 'L_DELETE' => $LANG['delete'], 'L_MAIL' => $LANG['mail'], 'L_PM' => $LANG['pm'], 'L_EXPLAIN_TRACK' => $LANG['explain_track'], 'L_TOPIC' => $l_topic, 'L_MESSAGE' => $LANG['replies'], 'L_VIEW' => $LANG['views'], 'L_LAST_MESSAGE' => $LANG['last_message'], 'L_SUBMIT' => $LANG['submit']));
    list($users_list, $total_admin, $total_modo, $total_member, $total_visit, $total_online) = forum_list_user_online("AND s.session_script = '/forum/track.php'");
    $Template->assign_vars(array('TOTAL_ONLINE' => $total_online, 'USERS_ONLINE' => $total_online - $total_visit == 0 ? '<em>' . $LANG['no_member_online'] . '</em>' : $users_list, 'ADMIN' => $total_admin, 'MODO' => $total_modo, 'MEMBER' => $total_member, 'GUEST' => $total_visit, 'SELECT_CAT' => forum_list_cat(0, 0), 'L_USER' => $total_online > 1 ? $LANG['user_s'] : $LANG['user'], 'L_ADMIN' => $total_admin > 1 ? $LANG['admin_s'] : $LANG['admin'], 'L_MODO' => $total_modo > 1 ? $LANG['modo_s'] : $LANG['modo'], 'L_MEMBER' => $total_member > 1 ? $LANG['member_s'] : $LANG['member'], 'L_GUEST' => $total_visit > 1 ? $LANG['guest_s'] : $LANG['guest'], 'L_AND' => $LANG['and'], 'L_ONLINE' => strtolower($LANG['online'])));
    $Template->pparse('forum_track');
} else {
    redirect(HOST . DIR . '/forum/index.php' . SID2);
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:track.php

示例14: elseif

        $Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
    } elseif (!empty($get_error) && isset($LANG[$get_error])) {
        $Errorh->handler($LANG[$get_error], E_USER_WARNING);
    }
    $i = 0;
    $array_modules = array();
    $array_info_module = array();
    $array_ranks = array(-1 => $LANG['guest'], 0 => $LANG['member'], 1 => $LANG['modo'], 2 => $LANG['admin']);
    $result = $Sql->query_while("SELECT id, name, auth, activ\n\tFROM " . PREFIX . "modules\n\tORDER BY name", __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $array_info_module[$row['name']] = load_ini_file('../' . $row['name'] . '/lang/', get_ulang());
        $array_modules[$array_info_module[$row['name']]['name']] = array('id' => $row['id'], 'name' => $row['name'], 'auth' => $row['auth'], 'activ' => $row['activ']);
    }
    $Sql->query_close($result);
    ksort($array_modules);
    foreach ($array_modules as $name => $array_config) {
        $row = $array_modules[$name];
        $info_module = $array_info_module[$array_config['name']];
        $array_auth = !empty($row['auth']) ? unserialize($row['auth']) : array();
        $l_tables = $info_module['sql_table'] > 1 ? $LANG['tables'] : $LANG['table'];
        $Template->assign_block_vars('installed', array('ID' => $row['id'], 'NAME' => ucfirst($info_module['name']), 'ICON' => $row['name'], 'VERSION' => $info_module['version'], 'AUTHOR' => !empty($info_module['author_mail']) ? '<a href="mailto:' . $info_module['author_mail'] . '">' . $info_module['author'] . '</a>' : $info_module['author'], 'AUTHOR_WEBSITE' => !empty($info_module['author_link']) ? '<a href="' . $info_module['author_link'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/user_web.png" alt="" /></a>' : '', 'DESC' => $info_module['info'], 'COMPAT' => $info_module['compatibility'], 'ADMIN' => $info_module['admin'] ? $LANG['yes'] : $LANG['no'], 'USE_SQL' => $info_module['sql_table'] > 0 ? $LANG['yes'] : $LANG['no'], 'SQL_TABLE' => $info_module['sql_table'] > 0 ? '(' . $info_module['sql_table'] . ' ' . $l_tables . ')' : '', 'USE_CACHE' => $info_module['cache'] ? $LANG['yes'] : $LANG['no'], 'ALTERNATIVE_CSS' => $info_module['css'] ? $LANG['yes'] : $LANG['no'], 'STARTEABLE_PAGE' => $info_module['starteable_page'] ? $LANG['yes'] : $LANG['no'], 'ACTIV_ENABLED' => $row['activ'] == 1 ? 'checked="checked"' : '', 'ACTIV_DISABLED' => $row['activ'] == 0 ? 'checked="checked"' : '', 'AUTH_MODULES' => Authorizations::generate_select(ACCESS_MODULE, $array_auth, array(2 => true), $row['id'])));
        $i++;
    }
    if ($i == 0) {
        $Template->assign_vars(array('C_NO_MODULE_INSTALLED' => true));
    } else {
        $Template->assign_vars(array('C_MODULES_INSTALLED' => true));
    }
    $Template->pparse('admin_modules_management');
}
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_modules.php

示例15: display_img

 static function display_img($note, $notation_scale, $num_stars_display = 0)
 {
     global $CONFIG;
     if ($notation_scale == 0) {
         return '';
     }
     $display_note = '';
     if ($num_stars_display > 0) {
         $note *= $num_stars_display / $notation_scale;
         $notation_scale = $num_stars_display;
     }
     for ($i = 1; $i <= $notation_scale; $i++) {
         $star_img = 'stars.png';
         if ($note < $i) {
             $decimal = $i - $note;
             if ($decimal >= 1) {
                 $star_img = 'stars0.png';
             } elseif ($decimal >= 0.75) {
                 $star_img = 'stars1.png';
             } elseif ($decimal >= 0.5) {
                 $star_img = 'stars2.png';
             } else {
                 $star_img = 'stars3.png';
             }
         }
         $display_note .= '<img src="../templates/' . get_utheme() . '/images/' . $star_img . '" alt="" class="valign_middle" />';
     }
     return $display_note;
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:29,代码来源:note.class.php


注:本文中的get_utheme函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。