• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_ulang函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: ModuleInterface

 function ModuleInterface($moduleId = '', $error = 0)
 {
     global $CONFIG, $MODULES;
     $this->id = $moduleId;
     $this->name = $this->id;
     $this->attributes = array();
     $this->infos = array();
     $this->functionalities = array();
     $this->enabled = !empty($MODULES[strtolower($this->get_id())]) && $MODULES[strtolower($this->get_id())]['activ'] == '1';
     $this->infos = load_ini_file(PATH_TO_ROOT . '/' . $this->id . '/lang/', get_ulang());
     if (isset($this->infos['name'])) {
         $this->name = $this->infos['name'];
     }
     if ($error == 0) {
         $class = ucfirst($moduleId) . 'Interface';
         $module_methods = get_class_methods($class);
         $generics_methods = get_class_methods('ModuleInterface');
         $generics_methods[] = $class;
         $methods_diff = array_diff($module_methods, $generics_methods);
         foreach ($methods_diff as $method) {
             if (substr($method, 0, 1) != '_') {
                 $this->functionalities[] = $method;
             }
         }
         $this->functionalities[] = 'none';
     }
     $this->errors = $error;
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:28,代码来源:module_interface.class.php


示例3: Template

 function Template($tpl = '', $auto_load_vars = AUTO_LOAD_FREQUENT_VARS)
 {
     if (!empty($tpl)) {
         global $User, $Session;
         $this->tpl = $this->_check_file($tpl);
         $this->files[$this->tpl] = $this->tpl;
         if ($auto_load_vars) {
             $member_connected = $User->check_level(MEMBER_LEVEL);
             $this->assign_vars(array('SID' => SID, 'THEME' => get_utheme(), 'LANG' => get_ulang(), 'C_USER_CONNECTED' => $member_connected, 'C_USER_NOTCONNECTED' => !$member_connected, 'PATH_TO_ROOT' => TPL_PATH_TO_ROOT, 'PHP_PATH_TO_ROOT' => PATH_TO_ROOT, 'TOKEN' => !empty($Session) ? $Session->get_token() : ''));
         }
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:12,代码来源:template.class.php


示例4: _add_update_alert

 function _add_update_alert(&$app)
 {
     import('events/administrator_alert_service');
     $identifier = $app->get_identifier();
     if (AdministratorAlertService::find_by_identifier($identifier, 'updates', 'kernel') === null) {
         $alert = new AdministratorAlert();
         global $LANG, $CONFIG;
         require_once PATH_TO_ROOT . '/lang/' . get_ulang() . '/admin.php';
         if ($app->get_type() == APPLICATION_TYPE__KERNEL) {
             $alert->set_entitled(sprintf($LANG['kernel_update_available'], $app->get_version()));
         } else {
             $alert->set_entitled(sprintf($LANG['update_available'], $app->get_type(), $app->get_name(), $app->get_version()));
         }
         $alert->set_fixing_url('admin/updates/detail.php?identifier=' . $identifier);
         $alert->set_priority($app->get_priority());
         $alert->set_properties(serialize($app));
         $alert->set_type('updates');
         $alert->set_identifier($identifier);
         AdministratorAlertService::save_alert($alert);
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:21,代码来源:updates.class.php


示例5: list

                case 'gif':
                case 'bmp':
                    list($width_source, $height_source) = @getimagesize('../upload/' . $row['path']);
                    $size_img = ' (' . $width_source . 'x' . $height_source . ')';
                    $width_source = !empty($width_source) ? $width_source + 30 : 0;
                    $height_source = !empty($height_source) ? $height_source + 30 : 0;
                    $bbcode = '[img]/upload/' . $row['path'] . '[/img]';
                    $link = '<a class="com" href="javascript:popup_upload(\'' . $row['id'] . '\', ' . $width_source . ', ' . $height_source . ', \'yes\')">';
                    break;
                case 'mp3':
                    $bbcode = '[sound]/upload/' . $row['path'] . '[/sound]';
                    $link = '<a class="com" href="javascript:popup_upload(\'' . $row['id'] . '\', 220, 10, \'no\')">';
                    break;
                default:
                    $bbcode = '[url=/upload/' . $row['path'] . ']' . $row['name'] . '[/url]';
                    $link = '<a class="com" href="../upload/' . $row['path'] . '">';
            }
            $Template->assign_block_vars('files', array('ID' => $row['id'], 'IMG' => '<img src="../templates/' . get_utheme() . '/images/upload/' . $get_img_mimetype['img'] . '" alt="" />', 'URL' => $link, 'NAME' => $name_cut, 'RENAME_FILE' => '<span id="fihref' . $row['id'] . '"><a href="javascript:display_rename_file(\'' . $row['id'] . '\', \'' . addslashes($row['name']) . '\', \'' . addslashes($name_cut) . '\');" title="' . $LANG['edit'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/edit.png" alt="" style="vertical-align:middle;" /></a></span>', 'FILETYPE' => $get_img_mimetype['filetype'] . $size_img, 'BBCODE' => '<input size="25" type="text" class="text" onclick="select_div(\'text_' . $row['id'] . '\');" id="text_' . $row['id'] . '" style="margin-top:2px;cursor:pointer;" value="' . $bbcode . '" />', 'SIZE' => $row['size'] > 1024 ? number_round($row['size'] / 1024, 2) . ' ' . $LANG['unit_megabytes'] : number_round($row['size'], 0) . ' ' . $LANG['unit_kilobytes'], 'DATE' => gmdate_format('date_format', $row['timestamp']), 'LOGIN' => '<a href="../member/member.php?id=' . $row['user_id'] . '">' . $row['login'] . '</a>', 'U_MOVE' => '.php?movefi=' . $row['id'] . '&amp;f=' . $folder . '&amp;fm=' . $row['user_id']));
            $total_folder_size += $row['size'];
            $total_files++;
        }
        $Sql->query_close($result);
    }
    $total_size = $Sql->query("SELECT SUM(size) FROM " . PREFIX . "upload", __LINE__, __FILE__);
    $Template->assign_vars(array('TOTAL_SIZE' => $total_size > 1024 ? number_round($total_size / 1024, 2) . ' ' . $LANG['unit_megabytes'] : number_round($total_size, 0) . ' ' . $LANG['unit_kilobytes'], 'TOTAL_FOLDER_SIZE' => $total_folder_size > 1024 ? number_round($total_folder_size / 1024, 2) . ' ' . $LANG['unit_megabytes'] : number_round($total_folder_size, 0) . ' ' . $LANG['unit_kilobytes'], 'TOTAL_FOLDERS' => $total_directories, 'TOTAL_FILES' => $total_files));
    if ($total_directories == 0 && $total_files == 0 && (!empty($folder) || !empty($show_member))) {
        $Template->assign_vars(array('C_EMPTY_FOLDER' => true, 'L_EMPTY_FOLDER' => $LANG['empty_folder']));
    }
    $Template->pparse('admin_files_management');
}
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_files.php


示例6: 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


示例7: 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


示例8: foreach

 for ($i = -12; $i <= 14; $i++) {
     $selected = $i == $CONFIG['timezone'] ? 'selected="selected"' : '';
     $name = !empty($i) ? $i > 0 ? ' + ' . $i : ' - ' . -$i : '';
     $select_timezone .= '<option value="' . $i . '" ' . $selected . '> [GMT' . $name . ']</option>';
 }
 $Template->assign_vars(array('JS_LANG_IDENTIFIER' => $array_identifier, 'IMG_LANG_IDENTIFIER' => $lang_identifier, 'SELECT_EDITORS' => $select_editors, 'SELECT_TIMEZONE' => $select_timezone, 'L_REQUIRE_MAIL' => $LANG['require_mail'], 'L_REQUIRE_PSEUDO' => $LANG['require_pseudo'], 'L_REQUIRE_PASSWORD' => $LANG['require_password'], 'L_REGISTER' => $LANG['register'], 'L_REQUIRE' => $LANG['require'], 'L_PASSWORD_SAME' => $LANG['e_pass_same'], 'L_MAIL_INVALID' => $LANG['e_mail_invalid'], 'L_PSEUDO_AUTH' => $LANG['e_pseudo_auth'], 'L_MAIL_AUTH' => $LANG['e_mail_auth'], 'L_MAIL' => $LANG['mail'], 'L_VALID' => $LANG['valid'], 'L_PSEUDO' => $LANG['pseudo'], 'L_PSEUDO_HOW' => $LANG['pseudo_how'], 'L_PASSWORD' => $LANG['password'], 'L_PASSWORD_HOW' => $LANG['password_how'], 'L_CONFIRM_PASSWORD' => $LANG['confirm_password'], 'L_VERIF_CODE' => $LANG['verif_code'], 'L_VERIF_CODE_EXPLAIN' => $LANG['verif_code_explain'], 'L_LANG_CHOOSE' => $LANG['choose_lang'], 'L_OPTIONS' => $LANG['options'], 'L_THEME_CHOOSE' => $LANG['choose_theme'], 'L_EDITOR_CHOOSE' => $LANG['choose_editor'], 'L_TIMEZONE_CHOOSE' => $LANG['timezone_choose'], 'L_TIMEZONE_CHOOSE_EXPLAIN' => $LANG['timezone_choose_explain'], 'L_HIDE_MAIL' => $LANG['hide_mail'], 'L_HIDE_MAIL_WHO' => $LANG['hide_mail_who'], 'L_INFO' => $LANG['info'], 'L_WEB_SITE' => $LANG['web_site'], 'L_LOCALISATION' => $LANG['localisation'], 'L_JOB' => $LANG['job'], 'L_HOBBIES' => $LANG['hobbies'], 'L_SEX' => $LANG['sex'], 'L_MALE' => $LANG['male'], 'L_FEMALE' => $LANG['female'], 'L_DATE_OF_BIRTH' => $LANG['date_of_birth'], 'L_DATE_FORMAT' => $LANG['date_birth_format'], 'L_SIGN' => $LANG['sign'], 'L_SIGN_WHERE' => $LANG['sign_where'], 'L_CONTACT' => $LANG['contact'], 'L_AVATAR_MANAGEMENT' => $LANG['avatar_gestion'], 'L_AVATAR_LINK' => $LANG['avatar_link'], 'L_AVATAR_LINK_WHERE' => $LANG['avatar_link_where'], 'L_WEIGHT_MAX' => $LANG['weight_max'], 'L_UPLOAD_AVATAR' => $LANG['upload_avatar'], 'L_UPLOAD_AVATAR_WHERE' => $LANG['upload_avatar_where'], 'L_SUBMIT' => $LANG['submit'], 'L_PREVIOUS_PASS' => $LANG['previous_password'], 'L_EDIT_JUST_IF_MODIF' => $LANG['fill_only_if_modified'], 'L_NEW_PASS' => $LANG['new_password'], 'L_CONFIRM_PASS' => $LANG['confirm_password'], 'L_LANG_CHOOSE' => $LANG['choose_lang'], 'L_HIDE_MAIL' => $LANG['hide_mail'], 'L_HIDE_MAIL_WHO' => $LANG['hide_mail_who'], 'L_INFO' => $LANG['info'], 'L_SITE_WEB' => $LANG['web_site'], 'L_LOCALISATION' => $LANG['localisation'], 'L_HEIGHT_MAX' => $LANG['height_max'], 'L_WIDTH_MAX' => $LANG['width_max']));
 if ($CONFIG_USER['force_theme'] == 0) {
     foreach ($THEME_CONFIG as $theme => $array_info) {
         if ($CONFIG['theme'] == $theme || $array_info['secure'] == -1 && $theme != 'default') {
             $selected = $CONFIG['theme'] == $theme ? ' selected="selected"' : '';
             $info_theme = load_ini_file('../templates/' . $theme . '/config/', $CONFIG['lang']);
             $Template->assign_block_vars('select_theme', array('NAME' => $info_theme['name'], 'IDNAME' => $theme, 'SELECTED' => $selected));
         }
     }
 } else {
     $theme_info = load_ini_file('/config/', get_ulang());
     $Template->assign_block_vars('select_theme', array('NAME' => !empty($theme_info['name']) ? $theme_info['name'] : $CONFIG['theme'], 'IDNAME' => $CONFIG['theme']));
 }
 $extend_field_exist = $Sql->query("SELECT COUNT(*) FROM " . DB_TABLE_MEMBER_EXTEND_CAT . " WHERE display = 1", __LINE__, __FILE__);
 if ($extend_field_exist > 0) {
     $Template->assign_vars(array('L_MISCELLANEOUS' => $LANG['miscellaneous']));
     $Template->assign_block_vars('miscellaneous', array());
     $result = $Sql->query_while("SELECT exc.name, exc.contents, exc.field, exc.required, exc.field_name, exc.possible_values, exc.default_values\n\t\t\tFROM " . DB_TABLE_MEMBER_EXTEND_CAT . " AS exc\n\t\t\tWHERE exc.display = 1\n\t\t\tORDER BY exc.class", __LINE__, __FILE__);
     while ($row = $Sql->fetch_assoc($result)) {
         $field = '';
         switch ($row['field']) {
             case 1:
                 $field = '<input type="text" size="30" name="' . $row['field_name'] . '" id="' . $row['field_name'] . '" class="text" value="' . $row['default_values'] . '" />';
                 break;
             case 2:
                 $field = '<textarea class="post" rows="4" cols="27" name="' . $row['field_name'] . '" id="' . $row['field_name'] . '">' . unparse($row['default_values']) . '</textarea>';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:register.php


示例9: array

        $creation_date = $this_contribution->get_creation_date();
        $fixing_date = $this_contribution->get_fixing_date();
        if ($User->check_auth($this_contribution->get_auth(), CONTRIBUTION_AUTH_BIT) || $User->get_attribute('user_id') == $this_contribution->get_poster_id()) {
            if ($num_contributions > CONTRIBUTIONS_PER_PAGE * ($pagination->get_current_page() - 1) && $num_contributions <= CONTRIBUTIONS_PER_PAGE * $pagination->get_current_page()) {
                $template->assign_block_vars('contributions', array('ENTITLED' => $this_contribution->get_entitled(), 'MODULE' => $this_contribution->get_module_name(), 'STATUS' => $this_contribution->get_status_name(), 'CREATION_DATE' => $creation_date->format(DATE_FORMAT_SHORT), 'FIXING_DATE' => $fixing_date->format(DATE_FORMAT_SHORT), 'POSTER' => $this_contribution->get_poster_login(), 'FIXER' => $this_contribution->get_fixer_login(), 'ACTIONS' => '', 'U_FIXER_PROFILE' => PATH_TO_ROOT . '/member/' . url('member.php?id=' . $this_contribution->get_fixer_id(), 'member-' . $this_contribution->get_fixer_id() . '.php'), 'U_POSTER_PROFILE' => PATH_TO_ROOT . '/member/' . url('member.php?id=' . $this_contribution->get_poster_id(), 'member-' . $this_contribution->get_poster_id() . '.php'), 'U_CONSULT' => PATH_TO_ROOT . '/member/' . url('contribution_panel.php?id=' . $this_contribution->get_id()), 'C_FIXED' => $this_contribution->get_status() == EVENT_STATUS_PROCESSED, 'C_PROCESSING' => $this_contribution->get_status() == EVENT_STATUS_BEING_PROCESSED));
            }
            $num_contributions++;
        }
    }
    if ($num_contributions > 1) {
        $template->assign_vars(array('PAGINATION' => $pagination->display('contribution_panel.php?p=%d&criteria=' . $criteria . '&order=' . $order, $num_contributions - 1, 'p', CONTRIBUTIONS_PER_PAGE, 3)));
    } else {
        $template->assign_vars(array('C_NO_CONTRIBUTION' => true, 'L_NO_CONTRIBUTION_TO_DISPLAY' => $LANG['no_contribution']));
    }
    define('NUMBER_OF_MODULES_PER_LINE', 4);
    $i_module = 0;
    foreach ($MODULES as $module_name => $module_infos) {
        $module_ini = load_ini_file(PATH_TO_ROOT . '/' . $module_name . '/lang/', get_ulang());
        if (!empty($module_ini['contribution_interface'])) {
            if ($i_module % NUMBER_OF_MODULES_PER_LINE == 0) {
                $template->assign_block_vars('row', array());
            }
            $template->assign_block_vars('row.module', array('WIDTH' => (int) (100.0 / NUMBER_OF_MODULES_PER_LINE), 'U_MODULE_LINK' => PATH_TO_ROOT . '/' . $module_name . '/' . url($module_ini['contribution_interface']), 'MODULE_ID' => $module_name, 'MODULE_NAME' => $module_ini['name'], 'LINK_TITLE' => sprintf($LANG['contribute_in_module_name'], $module_ini['name'])));
            $i_module++;
        }
    }
    $template->assign_vars(array('L_ENTITLED' => $LANG['contribution_entitled'], 'L_STATUS' => $LANG['contribution_status'], 'L_POSTER' => $LANG['contributor'], 'L_CREATION_DATE' => $LANG['contribution_creation_date'], 'L_FIXER' => $LANG['contribution_fixer'], 'L_FIXING_DATE' => $LANG['contribution_fixing_date'], 'L_MODULE' => $LANG['contribution_module'], 'L_CONTRIBUTION_PANEL' => $LANG['contribution_panel'], 'L_CONTRIBUTION_LIST' => $LANG['contribution_list'], 'L_CONTRIBUTE' => $LANG['contribute'], 'L_CONTRIBUTE_EXPLAIN' => $LANG['contribute_in_modules_explain'], 'L_NO_MODULE_IN_WHICH_CONTRIBUTE' => $LANG['no_module_to_contribute'], 'C_NO_MODULE_IN_WHICH_CONTRIBUTE' => $i_module == 0));
    $template->assign_vars(array('C_ORDER_ENTITLED_ASC' => $criteria == 'entitled' && $order == 'asc', 'U_ORDER_ENTITLED_ASC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=entitled&amp;order=asc'), 'C_ORDER_ENTITLED_DESC' => $criteria == 'entitled' && $order == 'desc', 'U_ORDER_ENTITLED_DESC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=entitled&amp;order=desc'), 'C_ORDER_MODULE_ASC' => $criteria == 'module' && $order == 'asc', 'U_ORDER_MODULE_ASC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=module&amp;order=asc'), 'C_ORDER_MODULE_DESC' => $criteria == 'module' && $order == 'desc', 'U_ORDER_MODULE_DESC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=module&amp;order=desc'), 'C_ORDER_STATUS_ASC' => $criteria == 'current_status' && $order == 'asc', 'U_ORDER_STATUS_ASC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=current_status&amp;order=asc'), 'C_ORDER_STATUS_DESC' => $criteria == 'current_status' && $order == 'desc', 'U_ORDER_STATUS_DESC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=current_status&amp;order=desc'), 'C_ORDER_CREATION_DATE_ASC' => $criteria == 'creation_date' && $order == 'asc', 'U_ORDER_CREATION_DATE_ASC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=creation_date&amp;order=asc'), 'C_ORDER_CREATION_DATE_DESC' => $criteria == 'creation_date' && $order == 'desc', 'U_ORDER_CREATION_DATE_DESC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=creation_date&amp;order=desc'), 'C_ORDER_FIXING_DATE_ASC' => $criteria == 'fixing_date' && $order == 'asc', 'U_ORDER_FIXING_DATE_ASC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=fixing_date&amp;order=asc'), 'C_ORDER_FIXING_DATE_DESC' => $criteria == 'fixing_date' && $order == 'desc', 'U_ORDER_FIXING_DATE_DESC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=fixing_date&amp;order=desc'), 'C_ORDER_POSTER_ASC' => $criteria == 'poster_id' && $order == 'asc', 'U_ORDER_POSTER_ASC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=poster_id&amp;order=asc'), 'C_ORDER_POSTER_DESC' => $criteria == 'poster_id' && $order == 'desc', 'U_ORDER_POSTER_DESC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=poster_id&amp;order=desc'), 'C_ORDER_FIXER_ASC' => $criteria == 'fixer_id' && $order == 'asc', 'U_ORDER_FIXER_ASC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=fixer_id&amp;order=asc'), 'C_ORDER_FIXER_DESC' => $criteria == 'fixer_id' && $order == 'desc', 'U_ORDER_FIXER_DESC' => url('contribution_panel.php?p=' . $pagination->_get_var_page('p') . '&amp;criteria=fixer_id&amp;order=desc')));
}
$template->parse();
require_once '../kernel/footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:contribution_panel.php


示例10: array

 $CONFIG['mail_exp'] = '';
 $CONFIG['mail'] = '';
 $CONFIG['sign'] = $LANG['site_config_mail_signature'];
 $CONFIG['anti_flood'] = 0;
 $CONFIG['delay_flood'] = 7;
 $CONFIG['unlock_admin'] = '';
 $CONFIG['pm_max'] = 50;
 $CONFIG['search_cache_time'] = 30;
 $CONFIG['search_max_use'] = 100;
 $CONFIG['html_auth'] = array('r2' => 1);
 $CONFIG['forbidden_tags'] = array();
 require_once 'functions.php';
 load_db_connection();
 $Sql->query_inject("UPDATE " . DB_TABLE_CONFIGS . " SET value = '" . addslashes(serialize($CONFIG)) . "' WHERE name = 'config'", __LINE__, __FILE__);
 $Sql->query_inject("INSERT INTO " . DB_TABLE_LANG . " (lang, activ, secure) VALUES ('" . strprotect($CONFIG['lang']) . "', 1, -1)", __LINE__, __FILE__);
 $info_theme = load_ini_file('../templates/' . $CONFIG['theme'] . '/config/', get_ulang());
 $Sql->query_inject("INSERT INTO " . DB_TABLE_THEMES . " (theme, activ, secure, left_column, right_column) VALUES ('" . strprotect($CONFIG['theme']) . "', 1, -1, '" . $info_theme['left_column'] . "', '" . $info_theme['right_column'] . "')", __LINE__, __FILE__);
 include '../kernel/framework/core/cache.class.php';
 include '../lang/' . $lang . '/main.php';
 $Cache = new Cache();
 import('modules/packages_manager');
 foreach ($DISTRIBUTION_MODULES as $module_name) {
     $Cache->load('modules', RELOAD_CACHE);
     PackagesManager::install_module($module_name, true, DO_NOT_GENERATE_CACHE_AFTER_THE_OPERATION);
 }
 $Cache->generate_file('modules');
 $Cache->load('modules', RELOAD_CACHE);
 import('core/menu_service');
 MenuService::enable_all(true);
 $modules_menu = MenuService::website_modules(VERTICAL_MENU);
 MenuService::move($modules_menu, BLOCK_POSITION__LEFT, false);
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:install.php


示例11: define

<?php

require_once '../admin/admin_begin.php';
define('TITLE', $LANG['administration']);
require_once '../admin/admin_header.php';
$Template->set_filenames(array('admin_extend' => 'admin/admin_extend.tpl'));
$Template->assign_vars(array('LANG' => get_ulang(), 'THEME' => get_utheme(), 'L_CONFIGURATION' => $LANG['configuration'], 'L_INDEX_SITE' => $LANG['site'], 'L_INDEX_ADMIN' => $LANG['administration'], 'L_SITE_LINK' => $LANG['link_management'], 'L_SITE_MENU' => $LANG['menu_management'], 'L_MODERATION' => $LANG['moderation'], 'L_MAINTAIN' => $LANG['maintain'], 'L_USER' => $LANG['member'], 'L_EXTEND_FIELD' => $LANG['extend_field'], 'L_RANKS' => $LANG['ranks'], 'L_GROUP' => $LANG['group'], 'L_THEME' => $LANG['themes'], 'L_SMILEY' => $LANG['smile'], 'L_ROBOTS' => $LANG['robots'], 'L_ERRORS' => $LANG['errors'], 'L_COM' => $LANG['com'], 'L_UPDATER' => $LANG['updater'], 'L_MODULES' => $LANG['modules'], 'L_CACHE' => $LANG['cache'], 'U_INDEX_SITE' => substr($CONFIG['start_page'], 0, 1) == '/' ? '..' . $CONFIG['start_page'] : $CONFIG['start_page'], 'L_WEBSITE_UPDATES' => $LANG['website_updates']));
$i = 1;
$nbr_modules = count($modules_config);
foreach ($modules_config as $module_name => $auth) {
    if (is_array($modules_config[$module_name])) {
        $name = $modules_config[$module_name]['module_name'];
        if (!empty($modules_config[$module_name]['admin'])) {
            $Template->assign_block_vars('modules_extend', array('NAME' => $module_name, 'IMG' => '../' . $name . '/' . $name . '.png', 'START_TR' => ($i - 1) % 5 == 0 || $i == 1 ? '<tr style="text-align:center;">' : '', 'END_TR' => $i % 5 == 0 && $i != 1 || $i == $nbr_modules ? '</tr>' : '', 'U_ADMIN_MODULE' => '../' . $name . '/admin_' . $name . '.php'));
            $i++;
        }
    }
}
if ($i != 0) {
    $i--;
    while ($i % 5 != 0) {
        $Template->assign_block_vars('modules_extend.td', array('TD' => '<td class="row2" style="width:20%;">&nbsp;</td>'));
        $i++;
    }
}
$Template->pparse('admin_extend');
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:27,代码来源:admin_extend.php


示例12: define

define('PATH_TO_ROOT', '../../..');
define('NO_SESSION_LOCATION', true);
$get_brw = !empty($_GET['browsers']) ? true : false;
$get_os = !empty($_GET['os']) ? true : false;
$get_lang = !empty($_GET['lang']) ? true : false;
$get_bot = !empty($_GET['bot']) ? true : false;
$get_theme = !empty($_GET['theme']) ? true : false;
$get_sex = !empty($_GET['sex']) ? true : false;
$get_visit_month = !empty($_GET['visit_month']) ? true : false;
$get_visit_year = !empty($_GET['visit_year']) ? true : false;
$get_pages_day = !empty($_GET['pages_day']) ? true : false;
$get_pages_month = !empty($_GET['pages_month']) ? true : false;
$get_pages_year = !empty($_GET['pages_year']) ? true : false;
include_once PATH_TO_ROOT . '/kernel/begin.php';
include_once PATH_TO_ROOT . '/lang/' . get_ulang() . '/stats.php';
import('util/images_stats');
$Stats = new Stats();
$array_stats = array('other' => 0);
if ($get_visit_month) {
    $year = !empty($_GET['year']) ? numeric($_GET['year']) : '';
    $month = !empty($_GET['month']) ? numeric($_GET['month']) : '1';
    $array_stats = array();
    $result = $Sql->query_while("SELECT nbr, stats_day\n\tFROM " . DB_TABLE_STATS . " WHERE stats_year = '" . $year . "' AND stats_month = '" . $month . "' \n\tORDER BY stats_day", __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $array_stats[$row['stats_day']] = $row['nbr'];
    }
    $Sql->query_close($result);
    $bissextile = date("L", mktime(0, 0, 0, 1, 1, $year)) == 1 ? 29 : 28;
    $array_month = array(31, $bissextile, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
    for ($i = 1; $i <= $array_month[$month - 1]; $i++) {
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:30,代码来源:display_stats.php


示例13: get_module_name

 function get_module_name()
 {
     global $CONFIG;
     if (!empty($this->module)) {
         $module_ini = load_ini_file(PATH_TO_ROOT . '/' . $this->module . '/lang/', get_ulang());
         return isset($module_ini['name']) ? $module_ini['name'] : '';
     } else {
         return '';
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:10,代码来源:contribution.class.php


示例14: add_mini_module

 function add_mini_module($module, $generate_cache = true)
 {
     $info_module = load_ini_file(PATH_TO_ROOT . '/' . $module . '/lang/', get_ulang());
     if (empty($info_module) || empty($info_module['mini_module'])) {
         return false;
     }
     $mini_modules_menus = parse_ini_array($info_module['mini_module']);
     if (empty($mini_modules_menus)) {
         return false;
     }
     $installed = false;
     foreach ($mini_modules_menus as $filename => $location) {
         if (file_exists(PATH_TO_ROOT . '/' . $module . '/' . $filename)) {
             $file = explode('.', $filename, 2);
             if (!is_array($file) || count($file) < 1) {
                 continue;
             }
             include_once PATH_TO_ROOT . '/' . $module . '/' . $filename;
             if (!function_exists($file[0])) {
                 continue;
             }
             $menu = new ModuleMiniMenu($module, $file[0]);
             $menu->enabled(false);
             $menu->set_auth(array('r1' => MENU_AUTH_BIT, 'r0' => MENU_AUTH_BIT, 'r-1' => MENU_AUTH_BIT));
             $menu->set_block(MenuService::str_to_location($location));
             MenuService::save($menu);
             if ($generate_cache) {
                 MenuService::generate_cache();
             }
             $installed = true;
         }
     }
     return $installed;
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:34,代码来源:menu_service.class.php


示例15: _get_installed_version

 function _get_installed_version()
 {
     global $CONFIG;
     switch ($this->type) {
         case APPLICATION_TYPE__KERNEL:
             return $CONFIG['version'];
         case APPLICATION_TYPE__MODULE:
             $infos = get_ini_config(PATH_TO_ROOT . '/' . $this->id . '/lang/', get_ulang());
             return !empty($infos['version']) ? $infos['version'] : '0';
         case APPLICATION_TYPE__THEME:
             $infos = get_ini_config(PATH_TO_ROOT . '/templates/' . $this->id . '/config/', get_ulang());
             return !empty($infos['version']) ? $infos['version'] : '0';
         default:
             return '0';
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:16,代码来源:application.class.php


示例16: retrieve

            $sort = 'user_aprob';
            break;
        default:
            $sort = 'timestamp';
    }
    $get_mode = retrieve(GET, 'mode', '');
    $mode = $get_mode == 'asc' ? 'ASC' : 'DESC';
    $unget = !empty($get_sort) && !empty($mode) ? '&amp;sort=' . $get_sort . '&amp;mode=' . $get_mode : '';
    $Template->assign_vars(array('PAGINATION' => $Pagination->display('admin_members.php?p=%d' . $unget, $nbr_membre, 'p', 25, 3), 'THEME' => get_utheme(), 'LANG' => get_ulang(), 'KERNEL_EDITOR' => display_editor(), 'L_REQUIRE_MAIL' => $LANG['require_mail'], 'L_REQUIRE_PASS' => $LANG['require_pass'], 'L_REQUIRE_RANK' => $LANG['require_rank'], 'L_REQUIRE_LOGIN' => $LANG['require_pseudo'], 'L_REQUIRE_TEXT' => $LANG['require_text'], 'L_CONFIRM_DEL_USER' => $LANG['confirm_del_member'], 'L_CONFIRM_DEL_ADMIN' => $LANG['confirm_del_admin'], 'L_CONTENTS' => $LANG['content'], 'L_SUBMIT' => $LANG['submit'], 'L_UPDATE' => $LANG['update'], 'L_USERS_MANAGEMENT' => $LANG['members_management'], 'L_USERS_ADD' => $LANG['members_add'], 'L_USERS_CONFIG' => $LANG['members_config'], 'L_USERS_PUNISHMENT' => $LANG['members_punishment'], 'L_PSEUDO' => $LANG['pseudo'], 'L_PASSWORD' => $LANG['password'], 'L_MAIL' => $LANG['mail'], 'L_RANK' => $LANG['rank'], 'L_APROB' => $LANG['aprob'], 'L_USER' => $LANG['member'], 'L_MODO' => $LANG['modo'], 'L_ADMIN' => $LANG['admin'], 'L_SEARCH_USER' => $LANG['search_member'], 'L_JOKER' => $LANG['joker'], 'L_SEARCH' => $LANG['search'], 'L_WEBSITE' => $LANG['website'], 'L_REGISTERED' => $LANG['registered'], 'L_DELETE' => $LANG['delete']));
    $result = $Sql->query_while("SELECT login, user_id, user_mail, timestamp, user_web, level, user_aprob\n\tFROM " . DB_TABLE_MEMBER . " \n\tORDER BY " . $sort . " " . $mode . $Sql->limit($Pagination->get_first_msg(25, 'p'), 25), __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        switch ($row['level']) {
            case 0:
                $rank = $LANG['member'];
                break;
            case 1:
                $rank = $LANG['modo'];
                break;
            case 2:
                $rank = $LANG['admin'];
                break;
            default:
                0;
        }
        $user_web = !empty($row['user_web']) ? '<a href="' . $row['user_web'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/user_web.png" alt="' . $row['user_web'] . '" title="' . $row['user_web'] . '" /></a>' : '';
        $Template->assign_block_vars('member', array('IDMBR' => $row['user_id'], 'NAME' => $row['login'], 'RANK' => $rank, 'MAIL' => $row['user_mail'], 'WEB' => $user_web, 'LEVEL' => $row['level'], 'DATE' => gmdate_format('date_format_short', $row['timestamp']), 'APROB' => $row['user_aprob'] == 0 ? $LANG['no'] : $LANG['yes']));
    }
    $Sql->query_close($result);
    $Template->pparse('admin_members_management');
}
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_members.php


示例17: time

    if (!$lock_file->exists()) {
        $lock_file->write('');
        $lock_file->flush();
    }
    $lock_file->lock(false);
    $yesterday_timestamp = time() - 86400;
    if ((int) $Sql->query("\n\t    SELECT COUNT(*)\n            FROM " . DB_TABLE_STATS . "\n            WHERE stats_year = '" . gmdate_format('Y', $yesterday_timestamp, TIMEZONE_SYSTEM) . "' AND\n                stats_month = '" . gmdate_format('m', $yesterday_timestamp, TIMEZONE_SYSTEM) . "' AND\n                stats_day = '" . gmdate_format('d', $yesterday_timestamp, TIMEZONE_SYSTEM) . "'", __LINE__, __FILE__) == 0) {
        $Cache->generate_file('day');
        require_once PATH_TO_ROOT . '/kernel/changeday.php';
        change_day();
    }
    $lock_file->close();
}
define('MODULE_NAME', get_module_name());
if (isset($MODULES[MODULE_NAME])) {
    if ($MODULES[MODULE_NAME]['activ'] == 0) {
        $Errorh->handler('e_unactivated_module', E_USER_REDIRECT);
    } else {
        if (!$User->check_auth($MODULES[MODULE_NAME]['auth'], ACCESS_MODULE)) {
            $Errorh->handler('e_auth', E_USER_REDIRECT);
        }
    }
} elseif (!in_array(MODULE_NAME, array('member', 'admin', 'kernel', ''))) {
    $array_info_module = load_ini_file(PATH_TO_ROOT . '/' . MODULE_NAME . '/lang/', get_ulang());
    if (!empty($array_info_module['name'])) {
        $Errorh->handler('e_uninstalled_module', E_USER_REDIRECT);
    }
}
if ($User->check_level(MEMBER_LEVEL)) {
    $Session->csrf_post_protect();
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:begin.php


示例18: retrieve

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_ultimate_font_family函数代码示例发布时间:2022-05-15
下一篇:
PHP get_uid函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap