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


PHP COM_getLanguageName函数代码示例

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


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

示例1: fncDisplay

function fncDisplay()
{
    global $_CONF;
    global $LANG_ASSIST_ADMIN;
    global $_ASSIST_CONF;
    global $_DB_dbms;
    $retval = "";
    $pi_name = "assist";
    $tmplfld = assist_templatePath('admin', 'default', $pi_name);
    $T = new Template($tmplfld);
    $lang = COM_getLanguageName();
    $path = $_CONF['site_admin_url'] . '/plugins/assist/docs/';
    //$path = 'docs/';
    if (!file_exists($path . $lang . '/')) {
        $lang = 'japanese';
        //'english';
    }
    $document_url = $path . $lang . '/';
    $T->set_file('admin', 'information.thtml');
    $T->set_var('pi_name', $pi_name);
    $T->set_var('version', $_ASSIST_CONF['version']);
    $T->set_var('dbms', $_DB_dbms);
    $T->set_var('dbversion', DB_getVersion());
    $T->set_var('php_os', PHP_OS);
    $T->set_var('phpversion', phpversion());
    if ($_CONF['facebook_consumer_key'] == "") {
        $T->set_var('fbid', $LANG_ASSIST_ADMIN['err_fbid']);
    } else {
        $T->set_var('fbid', $_CONF['facebook_consumer_key']);
    }
    $T->set_var('piname', $LANG_ASSIST_ADMIN['piname']);
    $T->set_var('about_thispage', $LANG_ASSIST_ADMIN['about_admin_information']);
    $T->set_var('lang_document', $LANG_ASSIST_ADMIN['document']);
    $T->set_var('document_url', $document_url);
    $T->set_var('online', $LANG_ASSIST_ADMIN['online']);
    $T->set_var('lang_configuration', $LANG_ASSIST_ADMIN['configuration']);
    $T->set_var('lang_autotags', $LANG_ASSIST_ADMIN['autotags']);
    $T->set_var('lang_templatesetvar', $LANG_ASSIST_ADMIN['templatesetvar']);
    $T->set_var('site_url', $_CONF['site_url']);
    $T->set_var('site_admin_url', $_CONF['site_admin_url']);
    $T->parse('output', 'admin');
    $retval .= $T->finish($T->get_var('output'));
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:44,代码来源:information.php

示例2: sprintf

    if ($pwdRoot > 0) {
        $retval .= '<li>' . sprintf($LANG_SECTEST['fix_password'], $pwdRoot) . '</li>';
        $failed_tests++;
    } else {
        $retval .= '<li>' . $LANG_SECTEST['password_okay'] . '</li>';
    }
    return $retval;
}
// MAIN
$display = COM_siteHeader('menu', $LANG_SECTEST['sectest']);
$display .= COM_startBlock($LANG_SECTEST['results']);
$url = urlToCheck();
if (!empty($url)) {
    $display .= '<ol>';
    if (strpos($_SERVER['PHP_SELF'], 'public_html') !== false) {
        $doclang = COM_getLanguageName();
        $docs = 'docs/' . $doclang . '/install.html';
        if (file_exists($_CONF['path_html'] . $docs)) {
            $instUrl = $_CONF['site_url'] . '/' . $docs;
        } else {
            $instUrl = $_CONF['site_url'] . '/docs/english/install.html';
        }
        $instUrl .= '#public_html';
        $display .= '<li>' . sprintf($LANG_SECTEST['public_html'], COM_createLink($LANG_SECTEST['installation'], $instUrl)) . '</li>' . LB;
        $failed_tests++;
    }
    $display .= checkInstallDir();
    $urls = array(array('db-config.php', 'db-config.php'), array('logs/error.log', 'logs ' . $LANG_SECTEST['directory']), array('plugins/staticpages/functions.inc', 'plugins ' . $LANG_SECTEST['directory']), array('system/lib-security.php', 'system ' . $LANG_SECTEST['directory']));
    foreach ($urls as $tocheck) {
        $display .= doTest($url, $tocheck[0], $tocheck[1]);
    }
开发者ID:hostellerie,项目名称:nexpro,代码行数:31,代码来源:sectest.php

示例3: COM_adminMenu


//.........这里部分代码省略.........
            $link_array[$LANG01[96]] = $menu_item;
        }
        if (SEC_hasRights('user.mail')) {
            $url = $_CONF['site_admin_url'] . '/mail.php';
            $adminmenu->set_var('option_url', $url);
            $adminmenu->set_var('option_label', $LANG01[105]);
            $adminmenu->set_var('option_count', $LANG_ADMIN['na']);
            $menu_item = $adminmenu->parse('item', $thisUrl == $url ? 'current' : 'option');
            $link_array[$LANG01[105]] = $menu_item;
        }
        if ($_CONF['backend'] == 1 && SEC_hasRights('syndication.edit')) {
            $url = $_CONF['site_admin_url'] . '/syndication.php';
            $adminmenu->set_var('option_url', $url);
            $adminmenu->set_var('option_label', $LANG01[38]);
            $count = COM_numberFormat(DB_count($_TABLES['syndication']));
            $adminmenu->set_var('option_count', $count);
            $menu_item = $adminmenu->parse('item', $thisUrl == $url ? 'current' : 'option');
            $link_array[$LANG01[38]] = $menu_item;
        }
        if (($_CONF['trackback_enabled'] || $_CONF['pingback_enabled'] || $_CONF['ping_enabled']) && SEC_hasRights('story.ping')) {
            $url = $_CONF['site_admin_url'] . '/trackback.php';
            $adminmenu->set_var('option_url', $url);
            $adminmenu->set_var('option_label', $LANG01[116]);
            if ($_CONF['ping_enabled']) {
                $count = COM_numberFormat(DB_count($_TABLES['pingservice']));
                $adminmenu->set_var('option_count', $count);
            } else {
                $adminmenu->set_var('option_count', $LANG_ADMIN['na']);
            }
            $menu_item = $adminmenu->parse('item', $thisUrl == $url ? 'current' : 'option');
            $link_array[$LANG01[116]] = $menu_item;
        }
        if (SEC_hasRights('plugin.edit')) {
            $url = $_CONF['site_admin_url'] . '/plugins.php';
            $adminmenu->set_var('option_url', $url);
            $adminmenu->set_var('option_label', $LANG01[77]);
            $adminmenu->set_var('option_count', COM_numberFormat(DB_count($_TABLES['plugins'], 'pi_enabled', 1)));
            $menu_item = $adminmenu->parse('item', $thisUrl == $url ? 'current' : 'option');
            $link_array[$LANG01[77]] = $menu_item;
        }
        // This will show the admin options for all installed plugins (if any)
        for ($i = 0; $i < $num_plugins; $i++) {
            $plg = current($plugin_options);
            $adminmenu->set_var('option_url', $plg->adminurl);
            $adminmenu->set_var('option_label', $plg->adminlabel);
            if (isset($plg->numsubmissions) && is_numeric($plg->numsubmissions)) {
                $adminmenu->set_var('option_count', COM_numberFormat($plg->numsubmissions));
            } elseif (!empty($plg->numsubmissions)) {
                $adminmenu->set_var('option_count', $plg->numsubmissions);
            } else {
                $adminmenu->set_var('option_count', $LANG_ADMIN['na']);
            }
            $menu_item = $adminmenu->parse('item', $thisUrl == $plg->adminurl ? 'current' : 'option', true);
            $link_array[$plg->adminlabel] = $menu_item;
            next($plugin_options);
        }
        if ($_CONF['allow_mysqldump'] == 1 and $_DB_dbms == 'mysql' and SEC_inGroup('Root')) {
            $url = $_CONF['site_admin_url'] . '/database.php';
            $adminmenu->set_var('option_url', $url);
            $adminmenu->set_var('option_label', $LANG01[103]);
            $adminmenu->set_var('option_count', $LANG_ADMIN['na']);
            $menu_item = $adminmenu->parse('item', $thisUrl == $url ? 'current' : 'option');
            $link_array[$LANG01[103]] = $menu_item;
        }
        if ($_CONF['link_documentation'] == 1) {
            $doclang = COM_getLanguageName();
            $docs = 'docs/' . $doclang . '/index.html';
            if (file_exists($_CONF['path_html'] . $docs)) {
                $adminmenu->set_var('option_url', $_CONF['site_url'] . '/' . $docs);
            } else {
                $adminmenu->set_var('option_url', $_CONF['site_url'] . '/docs/english/index.html');
            }
            $adminmenu->set_var('option_label', $LANG01[113]);
            $adminmenu->set_var('option_count', $LANG_ADMIN['na']);
            $menu_item = $adminmenu->parse('item', 'option');
            $link_array[$LANG01[113]] = $menu_item;
        }
        if ($_CONF['link_versionchecker'] == 1 and SEC_inGroup('Root')) {
            $adminmenu->set_var('option_url', 'http://www.geeklog.net/versionchecker.php?version=' . VERSION);
            $adminmenu->set_var('option_label', $LANG01[107]);
            $adminmenu->set_var('option_count', VERSION);
            $menu_item = $adminmenu->parse('item', 'option');
            $link_array[$LANG01[107]] = $menu_item;
        }
        if ($_CONF['sort_admin']) {
            uksort($link_array, 'strcasecmp');
        }
        $url = $_CONF['site_admin_url'] . '/moderation.php';
        $adminmenu->set_var('option_url', $url);
        $adminmenu->set_var('option_label', $LANG01[10]);
        $adminmenu->set_var('option_count', COM_numberFormat($modnum));
        $menu_item = $adminmenu->finish($adminmenu->parse('item', $thisUrl == $url ? 'current' : 'option'));
        $link_array = array($menu_item) + $link_array;
        foreach ($link_array as $link) {
            $retval .= $link;
        }
        $retval .= COM_endBlock(COM_getBlockTemplate('admin_block', 'footer', $position));
    }
    return $retval;
}
开发者ID:alxstuart,项目名称:ajfs.me,代码行数:101,代码来源:lib-common.php

示例4: getHelpUrl

/**
* Get URL of the help file (trackback.html)
*
* @return   string  full URL of trackback.html
*
*/
function getHelpUrl()
{
    global $_CONF;
    $retval = '';
    $doclang = COM_getLanguageName();
    $docs = 'docs/' . $doclang . '/trackback.html';
    if (file_exists($_CONF['path_html'] . $docs)) {
        $retval = $_CONF['site_url'] . '/' . $docs;
    } else {
        $retval = $_CONF['site_url'] . '/docs/english/trackback.html';
    }
    return $retval;
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:19,代码来源:trackback.php

示例5: _set_ConfigHelp

 /**
  * Helper function: Set the URL to the help section for a config option
  *
  * @param    string  $t          Template
  * @param    string  $group      'Core' or plugin name
  * @param    string  $option     name of the config option
  *
  */
 function _set_ConfigHelp(&$t, $group, $option)
 {
     static $docUrl;
     if (!isset($docUrl)) {
         $docUrl = array();
     }
     $retval = '';
     $configtext = PLG_getConfigTooltip($group, $option);
     if (empty($configtext)) {
         if ($group == 'Core') {
             $configtext = NULL;
             if (!empty($GLOBALS['_CONF']['site_url']) && !empty($GLOBALS['_CONF']['path_html'])) {
                 $baseUrl = $GLOBALS['_CONF']['site_url'];
                 $doclang = COM_getLanguageName();
                 $cfg = 'docs/' . $doclang . '/config.html';
                 if (file_exists($GLOBALS['_CONF']['path_html'] . $cfg)) {
                     $url = $baseUrl . '/' . $cfg;
                 } else {
                     $url = $baseUrl . '/docs/english/config.html';
                 }
             } else {
                 $url = 'http://www.geeklog.net/docs/english/config.html';
             }
             $docUrl['Core'] = $url;
         } else {
             // plugin
             $docUrl[$group] = PLG_getDocumentationUrl($group, 'config');
         }
         $descUrl = $docUrl[$group];
         if (!empty($descUrl)) {
             if (strpos($descUrl, '#') === false) {
                 $descUrl .= '#desc_' . $option;
             }
             $t->set_var('doc_url', $descUrl);
             // Does hack need to be used?
             if (gettype($configtext) == "NULL") {
                 $t->set_var('doc_link', '(<a href="' . $descUrl . '" target="help" class="tooltip">?</a>)');
             } else {
                 $t->set_var('doc_link', '(<a href="' . $descUrl . '" target="help">?</a>)');
             }
         }
     } else {
         $t->set_var('doc_url', '');
         $retval = "(" . COM_getTooltip("?", $configtext, '', $option, 'information') . ")";
         $t->set_var('doc_link', $retval);
     }
 }
开发者ID:alxstuart,项目名称:ajfs.me,代码行数:55,代码来源:config.class.php

示例6: commandcontrol

/**
* Prints the command & control block at the top
*
* @param    string  $token  CSRF token
* @return   string          HTML for the C&C block
* @todo The moderation items should be displayed with the help of ul/li
* instead of div's. 
*
*/
function commandcontrol($token)
{
    global $_CONF, $_TABLES, $LANG01, $LANG29, $LANG_LOGVIEW, $_IMAGE_TYPE, $_DB_dbms;
    $retval = '';
    $admin_templates = new Template($_CONF['path_layout'] . 'admin/moderation');
    $admin_templates->set_file(array('cc' => 'moderation.thtml', 'ccrow' => 'ccrow.thtml', 'ccitem' => 'ccitem.thtml'));
    $admin_templates->set_var('xhtml', XHTML);
    $admin_templates->set_var('layout_url', $_CONF['layout_url']);
    $admin_templates->set_var('site_url', $_CONF['site_url']);
    $admin_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $retval .= COM_startBlock('Geeklog ' . VERSION . ' -- ' . $LANG29[34], '', COM_getBlockTemplate('_admin_block', 'header'));
    $showTrackbackIcon = ($_CONF['trackback_enabled'] || $_CONF['pingback_enabled'] || $_CONF['ping_enabled']) && SEC_hasRights('story.ping');
    $cc_arr = array(array('condition' => SEC_hasRights('story.edit'), 'url' => $_CONF['site_admin_url'] . '/story.php', 'lang' => $LANG01[11], 'image' => '/images/icons/story.'), array('condition' => SEC_hasRights('block.edit'), 'url' => $_CONF['site_admin_url'] . '/block.php', 'lang' => $LANG01[12], 'image' => '/images/icons/block.'), array('condition' => SEC_hasRights('topic.edit'), 'url' => $_CONF['site_admin_url'] . '/topic.php', 'lang' => $LANG01[13], 'image' => '/images/icons/topic.'), array('condition' => SEC_hasRights('user.edit'), 'url' => $_CONF['site_admin_url'] . '/user.php', 'lang' => $LANG01[17], 'image' => '/images/icons/user.'), array('condition' => SEC_hasRights('group.edit'), 'url' => $_CONF['site_admin_url'] . '/group.php', 'lang' => $LANG01[96], 'image' => '/images/icons/group.'), array('condition' => SEC_hasRights('user.mail'), 'url' => $_CONF['site_admin_url'] . '/mail.php', 'lang' => $LANG01[105], 'image' => '/images/icons/mail.'), array('condition' => SEC_hasRights('syndication.edit'), 'url' => $_CONF['site_admin_url'] . '/syndication.php', 'lang' => $LANG01[38], 'image' => '/images/icons/syndication.'), array('condition' => $showTrackbackIcon, 'url' => $_CONF['site_admin_url'] . '/trackback.php', 'lang' => $LANG01[116], 'image' => '/images/icons/trackback.'), array('condition' => SEC_hasRights('plugin.edit'), 'url' => $_CONF['site_admin_url'] . '/plugins.php', 'lang' => $LANG01[98], 'image' => '/images/icons/plugins.'), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/logview.php', 'lang' => $LANG_LOGVIEW['logview'], 'image' => '/images/icons/logview.'));
    $admin_templates->set_var('cc_icon_width', floor(100 / ICONS_PER_ROW));
    for ($i = 0; $i < count($cc_arr); $i++) {
        if ($cc_arr[$i]['condition']) {
            $item = render_cc_item($admin_templates, $cc_arr[$i]['url'], $_CONF['layout_url'] . $cc_arr[$i]['image'] . $_IMAGE_TYPE, $cc_arr[$i]['lang']);
            $items[$cc_arr[$i]['lang']] = $item;
        }
    }
    // now add the plugins
    $plugins = PLG_getCCOptions();
    for ($i = 0; $i < count($plugins); $i++) {
        $cur_plugin = current($plugins);
        $item = render_cc_item($admin_templates, $cur_plugin->adminurl, $cur_plugin->plugin_image, $cur_plugin->adminlabel);
        $items[$cur_plugin->adminlabel] = $item;
        next($plugins);
    }
    // and finally, add the remaining admin items
    $docsUrl = $_CONF['site_url'] . '/docs/english/index.html';
    if ($_CONF['link_documentation'] == 1) {
        $doclang = COM_getLanguageName();
        $docs = 'docs/' . $doclang . '/index.html';
        if (file_exists($_CONF['path_html'] . $docs)) {
            $docsUrl = $_CONF['site_url'] . '/' . $docs;
        }
    }
    $cc_arr = array(array('condition' => $_CONF['allow_mysqldump'] == 1 && $_DB_dbms == 'mysql' && SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/database.php', 'lang' => $LANG01[103], 'image' => '/images/icons/database.'), array('condition' => $_CONF['link_documentation'] == 1, 'url' => $docsUrl, 'lang' => $LANG01[113], 'image' => '/images/icons/docs.'), array('condition' => SEC_inGroup('Root') && $_CONF['link_versionchecker'] == 1, 'url' => 'http://www.geeklog.net/versionchecker.php?version=' . VERSION, 'lang' => $LANG01[107], 'image' => '/images/icons/versioncheck.'), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/configuration.php', 'lang' => $LANG01[129], 'image' => '/images/icons/configuration.'));
    for ($i = 0; $i < count($cc_arr); $i++) {
        if ($cc_arr[$i]['condition']) {
            $item = render_cc_item($admin_templates, $cc_arr[$i]['url'], $_CONF['layout_url'] . $cc_arr[$i]['image'] . $_IMAGE_TYPE, $cc_arr[$i]['lang']);
            $items[$cc_arr[$i]['lang']] = $item;
        }
    }
    if ($_CONF['sort_admin']) {
        uksort($items, 'strcasecmp');
    }
    // logout is always the last entry
    $item = render_cc_item($admin_templates, $_CONF['site_url'] . '/users.php?mode=logout', $_CONF['layout_url'] . '/images/icons/logout.' . $_IMAGE_TYPE, $LANG01[35]);
    $items[$LANG01[35]] = $item;
    reset($items);
    $cols = 0;
    $cc_main_options = '';
    foreach ($items as $key => $val) {
        $cc_main_options .= $val . LB;
        $cols++;
        if ($cols == ICONS_PER_ROW) {
            $admin_templates->set_var('cc_main_options', $cc_main_options);
            $admin_templates->parse('cc_rows', 'ccrow', true);
            $admin_templates->clear_var('cc_main_options');
            $cc_main_options = '';
            $cols = 0;
        }
    }
    if ($cols > 0) {
        // "flush out" any unrendered entries
        $admin_templates->set_var('cc_main_options', $cc_main_options);
        $admin_templates->parse('cc_rows', 'ccrow', true);
        $admin_templates->clear_var('cc_main_options');
    }
    $retval .= $admin_templates->finish($admin_templates->parse('output', 'cc'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    if (SEC_hasRights('story.moderate')) {
        $retval .= itemlist('story', $token);
    }
    if ($_CONF['listdraftstories'] == 1) {
        if (SEC_hasRights('story.edit')) {
            $retval .= draftlist($token);
        }
    }
    if ($_CONF['commentsubmission'] == 1) {
        if (SEC_hasRights('comment.moderate')) {
            $retval .= itemlist('comment', $token);
        }
    }
    if ($_CONF['usersubmission'] == 1) {
        if (SEC_hasRights('user.edit') && SEC_hasRights('user.delete')) {
            $retval .= userlist($token);
        }
    }
    $retval .= PLG_showModerationList($token);
//.........这里部分代码省略.........
开发者ID:hostellerie,项目名称:nexpro,代码行数:101,代码来源:moderation.php

示例7: COM_commandControl


//.........这里部分代码省略.........
                            $submissioncount += DB_count($_TABLES['commentsubmissions']);
                        }
                        if ($_CONF['usersubmission'] == 1) {
                            if (SEC_hasRights('user.edit') && SEC_hasRights('user.delete')) {
                                $submissioncount += DB_count($_TABLES['users'], 'status', '2');
                            }
                        }
                    }
                    // now handle submissions for plugins
                    $submissioncount += PLG_getSubmissionCount();
                    // Find num of syndication
                    if ($_CONF['backend'] == 1 && SEC_hasRights('syndication.edit')) {
                        $syndicationcount = COM_numberFormat(DB_count($_TABLES['syndication']));
                    }
                    // Find num of trackback
                    if ($_CONF['ping_enabled'] && SEC_hasRights('story.ping')) {
                        $trackbackcount = COM_numberFormat(DB_count($_TABLES['pingservice']));
                    }
                }
                $cc_arr = array(array('condition' => SEC_hasRights('topic.edit'), 'url' => $_CONF['site_admin_url'] . '/topic.php', 'lang' => $LANG01[13], 'num' => COM_numberFormat($topiccount), 'image' => $_CONF['layout_url'] . '/images/icons/topic.' . $_IMAGE_TYPE), array('condition' => SEC_hasRights('block.edit'), 'url' => $_CONF['site_admin_url'] . '/block.php', 'lang' => $LANG01[12], 'num' => COM_numberFormat($blockcount), 'image' => $_CONF['layout_url'] . '/images/icons/block.' . $_IMAGE_TYPE), array('condition' => SEC_hasRights('story.edit'), 'url' => $_CONF['site_admin_url'] . '/story.php', 'lang' => $LANG01[11], 'num' => COM_numberFormat($storycount), 'image' => $_CONF['layout_url'] . '/images/icons/story.' . $_IMAGE_TYPE), array('condition' => SEC_hasModerationAccess(), 'url' => $_CONF['site_admin_url'] . '/moderation.php', 'lang' => $LANG01[10], 'num' => COM_numberFormat($submissioncount), 'image' => $_CONF['layout_url'] . '/images/icons/moderation.' . $_IMAGE_TYPE), array('condition' => SEC_hasRights('syndication.edit'), 'url' => $_CONF['site_admin_url'] . '/syndication.php', 'lang' => $LANG01[38], 'num' => $syndicationcount, 'image' => $_CONF['layout_url'] . '/images/icons/syndication.' . $_IMAGE_TYPE), array('condition' => $showTrackbackIcon, 'url' => $_CONF['site_admin_url'] . '/trackback.php', 'lang' => $LANG01[116], 'num' => $trackbackcount, 'image' => $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE));
                // Merge any items that belong to this group from plugins
                $cc_arr = array_merge($cc_arr, $cc_core);
                break;
                // Plugins - All ungrouped plugins
            // Plugins - All ungrouped plugins
            case 'plugins':
                $cc_arr = $cc_plugins;
                break;
                // Tools - Db backups, Clear cache, Log Viewer, GL Version Test, Plugins, Configuration, Documentation, SPAM-X Plugin
            // Tools - Db backups, Clear cache, Log Viewer, GL Version Test, Plugins, Configuration, Documentation, SPAM-X Plugin
            case 'tools':
                $docsUrl = $_CONF['site_url'] . '/docs/english/index.html';
                if ($_CONF['link_documentation'] == 1) {
                    $doclang = COM_getLanguageName();
                    $docs = 'docs/' . $doclang . '/index.html';
                    if (file_exists($_CONF['path_html'] . $docs)) {
                        $docsUrl = $_CONF['site_url'] . '/' . $docs;
                    }
                }
                $pluginscount = 0;
                if ($adminMenu) {
                    // Find num of plugins
                    if (SEC_hasRights('plugin.edit')) {
                        $pluginscount = COM_numberFormat(DB_count($_TABLES['plugins'], 'pi_enabled', 1));
                    }
                }
                $cc_arr = array(array('condition' => SEC_hasRights($_CONF_FT, 'OR'), 'url' => $_CONF['site_admin_url'] . '/configuration.php', 'lang' => $LANG01[129], 'num' => count($config->_get_groups()), 'image' => $_CONF['layout_url'] . '/images/icons/configuration.' . $_IMAGE_TYPE), array('condition' => $_CONF['link_documentation'] == 1, 'url' => $docsUrl, 'lang' => $LANG01[113], 'image' => $_CONF['layout_url'] . '/images/icons/docs.' . $_IMAGE_TYPE), array('condition' => SEC_inGroup('Root') && $_CONF['link_versionchecker'] == 1, 'url' => 'http://www.geeklog.net/versionchecker.php?version=' . VERSION, 'lang' => $LANG01[107], 'num' => VERSION, 'image' => $_CONF['layout_url'] . '/images/icons/versioncheck.' . $_IMAGE_TYPE), array('condition' => SEC_hasRights('plugin.edit'), 'url' => $_CONF['site_admin_url'] . '/plugins.php', 'lang' => $LANG01[98], 'num' => $pluginscount, 'image' => $_CONF['layout_url'] . '/images/icons/plugins.' . $_IMAGE_TYPE), array('condition' => $_CONF['allow_mysqldump'] == 1 && $_DB_dbms == 'mysql' && SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/database.php', 'lang' => $LANG01[103], 'num' => '', 'image' => $_CONF['layout_url'] . '/images/icons/database.' . $_IMAGE_TYPE), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/clearctl.php', 'lang' => $LANG01['ctl'], 'num' => '', 'image' => $_CONF['layout_url'] . '/images/icons/ctl.' . $_IMAGE_TYPE), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/envcheck.php', 'lang' => $LANG_ENVCHECK['env_check'], 'num' => '', 'image' => $_CONF['layout_url'] . '/images/icons/envcheck.' . $_IMAGE_TYPE), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/logviewer.php', 'lang' => $LANG_LOGVIEW['log_viewer'], 'num' => '', 'image' => $_CONF['layout_url'] . '/images/icons/log_viewer.' . $_IMAGE_TYPE), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_url'] . '/filemanager/index.php?Type=Root', 'lang' => $LANG01['filemanager'], 'num' => '', 'image' => $_CONF['layout_url'] . '/images/icons/filemanager.' . $_IMAGE_TYPE, 'target' => '_blank'), array('condition' => true, 'url' => $_CONF['site_url'] . '/users.php?mode=logout', 'lang' => $LANG01[35], 'num' => '', 'image' => $_CONF['layout_url'] . '/images/icons/logout.' . $_IMAGE_TYPE));
                // Merge any items that belong to this group from plugins
                $cc_arr = array_merge($cc_arr, $cc_tools);
                break;
                // Users - Groups, Users, Mail Users
            // Users - Groups, Users, Mail Users
            case 'users':
                $groupcount = 0;
                $usercount = 0;
                if ($adminMenu) {
                    // Find num of groups
                    if (SEC_inGroup('Root')) {
                        $grpFilter = '';
                    } else {
                        $thisUsersGroups = SEC_getUserGroups();
                        $grpFilter = 'WHERE (grp_id IN (' . implode(',', $thisUsersGroups) . '))';
                    }
                    $result = DB_query("SELECT COUNT(*) AS count FROM {$_TABLES['groups']} {$grpFilter};");
                    $A = DB_fetchArray($result);
                    $groupcount = $A['count'];
开发者ID:mistgrass,项目名称:geeklog-japan,代码行数:67,代码来源:lib-common.php

示例8: getAdminMenu


//.........这里部分代码省略.........
                } else {
                    $elementUsersGroups = SEC_getUserGroups();
                    $grpFilter = 'WHERE (grp_id IN (' . implode(',', $elementUsersGroups) . '))';
                }
                $result = DB_query("SELECT COUNT(*) AS count FROM {$_TABLES['groups']} {$grpFilter};");
                $A = DB_fetchArray($result);
                $url = $_CONF['site_admin_url'] . '/group.php';
                $label = $LANG01[96] . ' (' . COM_numberFormat($A['count']) . ')';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_hasRights('social.admin')) {
                $url = $_CONF['site_admin_url'] . '/social.php';
                $label = $LANG_SOCIAL['label'];
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_inGroup('Root')) {
                $url = $_CONF['site_admin_url'] . '/envcheck.php';
                $label = $LANG01['env_check'];
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_hasRights('user.mail')) {
                $url = $_CONF['site_admin_url'] . '/mail.php';
                $label = $LANG01[105] . ' (N/A)';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if ($_CONF['backend'] == 1 && SEC_hasRights('syndication.edit')) {
                $url = $_CONF['site_admin_url'] . '/syndication.php';
                $label = $LANG01[38] . ' (' . COM_numberFormat(DB_count($_TABLES['syndication'])) . ')';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (($_CONF['trackback_enabled'] || $_CONF['pingback_enabled'] || $_CONF['ping_enabled']) && SEC_hasRights('story.ping')) {
                $url = $_CONF['site_admin_url'] . '/trackback.php';
                $label = $LANG01[116] . ' (' . COM_numberFormat(DB_count($_TABLES['pingservice'])) . ')';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_hasRights('plugin.edit')) {
                $url = $_CONF['site_admin_url'] . '/plugins.php';
                $label = $LANG01[77] . ' (' . COM_numberFormat(DB_count($_TABLES['plugins'])) . ')';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_inGroup('Root')) {
                $url = $_CONF['site_admin_url'] . '/configuration.php';
                $label = $LANG01[129] . ' (' . COM_numberFormat(count($config->_get_groups())) . ')';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            // This will show the admin options for all installed plugins (if any)
            for ($i = 0; $i < $num_plugins; $i++) {
                $plg = current($plugin_options);
                $url = $plg->adminurl;
                $label = $plg->adminlabel;
                if (empty($plg->numsubmissions)) {
                    $label .= '';
                } else {
                    $label .= ' (' . COM_numberFormat($plg->numsubmissions) . ')';
                }
                $item_array[] = array('label' => $label, 'url' => $url);
                next($plugin_options);
            }
            if (SEC_inGroup('Root')) {
                $url = $_CONF['site_admin_url'] . '/database.php';
                $label = $LANG01[103] . '';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_inGroup('Root')) {
                $url = $_CONF['site_admin_url'] . '/logview.php';
                $label = $LANG01['logview'] . '';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if ($_CONF['link_documentation'] == 1) {
                $doclang = COM_getLanguageName();
                if (@file_exists($_CONF['path_html'] . 'docs/' . $doclang . '/index.html')) {
                    $docUrl = $_CONF['site_url'] . '/docs/' . $doclang . '/index.html';
                } else {
                    $docUrl = $_CONF['site_url'] . '/docs/english/index.html';
                }
                $url = $docUrl;
                $label = $LANG01[113] . '';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_inGroup('Root')) {
                $url = $_CONF['site_admin_url'] . '/vercheck.php';
                $label = $LANG01[107] . ' (' . GVERSION . PATCHLEVEL . ')';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if (SEC_isModerator()) {
                $url = $_CONF['site_admin_url'] . '/moderation.php';
                $label = $LANG01[10] . ' (' . COM_numberFormat($modnum) . ')';
                $item_array[] = array('label' => $label, 'url' => $url);
            }
            if ($_CONF['sort_admin']) {
                usort($item_array, '_mb_cmp');
            }
            $url = $_CONF['site_admin_url'] . '/index.php';
            $label = $LANG29[34];
            $cc_item = array('label' => $LANG29[34], 'url' => $url);
            $item_array = array_merge(array($cc_item), $item_array);
        }
    }
    return $item_array;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:101,代码来源:lib-menu.php

示例9: _get_ConfigHelp

 /**
  * Helper function: Get the URL to the help section for a config option
  *
  * @param    string  $group      'Core' or plugin name
  * @param    string  $option     name of the config option
  * @return   string              full URL to help or empty string
  *
  */
 function _get_ConfigHelp($group, $option)
 {
     global $_CONF;
     static $coreUrl;
     $retval = '';
     $descUrl = '';
     $doclang = COM_getLanguageName();
     if ($group == 'Core') {
         if (isset($coreUrl)) {
             $descUrl = $coreUrl;
         } elseif (!empty($GLOBALS['_CONF']['site_url']) && !empty($GLOBALS['_CONF']['path_html'])) {
             $baseUrl = $GLOBALS['_CONF']['site_url'];
             $cfg = 'docs/' . $doclang . '/config.html';
             if (@file_exists($GLOBALS['_CONF']['path_html'] . $cfg)) {
                 $descUrl = $baseUrl . '/' . $cfg;
             } else {
                 $descUrl = $baseUrl . '/docs/english/config.html';
             }
             $coreUrl = $descUrl;
         } else {
             $descUrl = 'http://www.glfusion.org/docs/english/config.html';
         }
         if (!empty($descUrl)) {
             $helpUrl = $descUrl . '#desc_' . $option;
         }
         $retval = '<a href="#" onclick="popupWindow(\'' . $helpUrl . '\', \'Help\', 640, 480, 1)" class="toolbar"><img src="' . $_CONF['layout_url'] . '/images/button_help.png" alt=""' . XHTML . '></a>';
     } else {
         list($doc_url, $popuptype) = PLG_getConfigElementHelp($group, $option, $doclang);
         if ($doc_url != '') {
             if ($popuptype == 2) {
                 $retval = '<a href="' . $doc_url . '" onclick="window.open(this.href);return false;" class="toolbar"><img src="' . $_CONF['layout_url'] . '/images/button_help.png" alt=""' . XHTML . '></a>';
             } else {
                 $retval = '<a href="#" onclick="popupWindow(\'' . $doc_url . '\', \'Help\', 640, 480, 1)" class="toolbar"><img src="' . $_CONF['layout_url'] . '/images/button_help.png" alt=""' . XHTML . '></a>';
             }
         } else {
             if (@file_exists($_CONF['path_html'] . 'docs/' . $doclang . '/' . $group . '.html')) {
                 $baseUrl = $GLOBALS['_CONF']['site_url'];
                 $descUrl = $baseUrl . '/docs/' . $doclang . '/' . $group . '.html#desc_' . $option;
                 $retval = '<a href="#" onclick="popupWindow(\'' . $descUrl . '\', \'Help\', 640, 480, 1)" class="toolbar"><img src="' . $_CONF['layout_url'] . '/images/button_help.png" alt=""' . XHTML . '></a>';
             } else {
                 $retval = '';
             }
         }
     }
     return $retval;
 }
开发者ID:spacequad,项目名称:glfusion,代码行数:54,代码来源:config.class.php

示例10: _get_ConfigHelp

 /**
  * Helper function: Get the URL to the help section for a config option
  *
  * @param    string  $group      'Core' or plugin name
  * @param    string  $option     name of the config option
  * @return   string              full URL to help or empty string
  *
  */
 function _get_ConfigHelp($group, $option)
 {
     static $coreUrl;
     $retval = '';
     $descUrl = '';
     if ($group == 'Core') {
         if (isset($coreUrl)) {
             $descUrl = $coreUrl;
         } elseif (!empty($GLOBALS['_CONF']['site_url']) && !empty($GLOBALS['_CONF']['path_html'])) {
             $baseUrl = $GLOBALS['_CONF']['site_url'];
             $doclang = COM_getLanguageName();
             $cfg = 'docs/' . $doclang . '/config.html';
             if (file_exists($GLOBALS['_CONF']['path_html'] . $cfg)) {
                 $descUrl = $baseUrl . '/' . $cfg;
             } else {
                 $descUrl = $baseUrl . '/docs/english/config.html';
             }
             $coreUrl = $descUrl;
         } else {
             $descUrl = 'http://www.geeklog.net/docs/english/config.html';
         }
     } else {
         $descUrl = PLG_getDocumentationUrl($group, 'config');
     }
     if (!empty($descUrl)) {
         $retval = $descUrl . '#desc_' . $option;
     }
     return $retval;
 }
开发者ID:Geeklog-Core,项目名称:test-framework,代码行数:37,代码来源:config.class.php

示例11: LIB_Edit


//.........这里部分代码省略.........
            if ($edt_flg == FALSE) {
                $delflg = true;
            }
        }
    }
    if ($mode === "copy") {
        $id = 0;
        //作成日付
        $created = 0;
        //
        $delflg = false;
    }
    $tmplfld = DATABOX_templatePath('admin', 'default', $pi_name);
    $templates = new Template($tmplfld);
    $templates->set_file('editor', "field_editor.thtml");
    //--
    $templates->set_var('about_thispage', $lang_box_admin['about_admin_field']);
    $templates->set_var('lang_must', $lang_box_admin['must']);
    $templates->set_var('site_url', $_CONF['site_url']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
    $templates->set_var('gltoken', $token);
    $templates->set_var('xhtml', XHTML);
    $templates->set_var('script', THIS_SCRIPT);
    //
    $templates->set_var('lang_link_admin', $lang_box_admin['link_admin']);
    $templates->set_var('lang_link_admin_top', $lang_box_admin['link_admin_top']);
    //id
    $templates->set_var('lang_field_id', $lang_box_admin['field_id']);
    $templates->set_var('id', $id);
    //document link
    $lang = COM_getLanguageName();
    $path = 'admin/plugins/' . strtolower($pi_name) . '/docs/';
    if (!file_exists($_CONF['path_html'] . $path . $lang . '/')) {
        $lang = 'japanese';
        //'english';
    }
    $document_url = $_CONF['site_url'] . '/' . $path . $lang . '/';
    $templates->set_var('document_url', $document_url);
    $templates->set_var('lang_document', $LANG_DATABOX_ADMIN['document']);
    //名前&テンプレート変数&説明
    $templates->set_var('lang_name', $lang_box_admin['name']);
    $templates->set_var('name', $name);
    $templates->set_var('lang_templatesetvar', $lang_box_admin['templatesetvar']);
    $templates->set_var('templatesetvar', $templatesetvar);
    $templates->set_var('lang_description', $lang_box_admin['description']);
    $templates->set_var('description', $description);
    $templates->set_var('lang_allow_display', $lang_box_admin['allow_display']);
    $list_allow_display = DATABOX_getoptionlistary($lang_box_allow_display, "allow_display", $allow_display, $pi_name);
    $templates->set_var('list_allow_display', $list_allow_display);
    $templates->set_var('lang_allow_edit', $lang_box_admin['allow_edit']);
    $list_allow_edit = DATABOX_getoptionlistary($lang_box_allow_edit, "allow_edit", $allow_edit, $pi_name);
    $templates->set_var('list_allow_edit', $list_allow_edit);
    //textcheck
    $templates->set_var('lang_textcheck', $lang_box_admin['textcheck']);
    $list_textcheck = DATABOX_getoptionlistary($lang_box_textcheck, "textcheck", $textcheck, $pi_name);
    $templates->set_var('list_textcheck', $list_textcheck);
    //textconv
    $templates->set_var('lang_textconv', $lang_box_admin['textconv']);
    $list_textconv = DATABOX_getoptionlistary($lang_box_textconv, "textconv", $textconv, $pi_name);
    $templates->set_var('list_textconv', $list_textconv);
    //searchtarget
    $templates->set_var('lang_searchtarget', $lang_box_admin['searchtarget']);
    $list_searchtarget = DATABOX_getradiolist($lang_box_noyes, "searchtarget", $searchtarget);
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:67,代码来源:lib_field.php

示例12: _set_ConfigHelp

 /**
  * Helper function: Set the URL to the help section for a config option
  *
  * @param    Template $t      Template object
  * @param    string   $group  'Core' or plugin name
  * @param    string   $option name of the config option
  */
 private function _set_ConfigHelp(&$t, $group, $option)
 {
     global $_SCRIPTS;
     static $docUrl;
     if (!isset($docUrl)) {
         $docUrl = array();
     }
     $configText = PLG_getConfigTooltip($group, $option);
     if (empty($configText)) {
         if ($group === 'Core') {
             $configText = null;
         }
         if (empty($docUrl[$group])) {
             if ($group === 'Core') {
                 if (!empty($GLOBALS['_CONF']['site_url']) && !empty($GLOBALS['_CONF']['path_html'])) {
                     $baseUrl = $GLOBALS['_CONF']['site_url'];
                     $docLang = COM_getLanguageName();
                     $cfg = 'docs/' . $docLang . '/config.html';
                     if (file_exists($GLOBALS['_CONF']['path_html'] . $cfg)) {
                         $url = $baseUrl . '/' . $cfg;
                     } else {
                         $url = $baseUrl . '/docs/english/config.html';
                     }
                 } else {
                     $url = 'https://www.geeklog.net/docs/english/config.html';
                 }
                 $docUrl['Core'] = $url;
             } else {
                 // plugin
                 $docUrl[$group] = PLG_getDocumentationUrl($group, 'config');
             }
             $_SCRIPTS->setJavaScript('var glConfigDocUrl = "' . $docUrl[$group] . '";', true);
         }
         $descUrl = $docUrl[$group];
         if (!empty($descUrl)) {
             if (strpos($descUrl, '#') === false) {
                 $descUrl .= '#desc_' . $option;
             }
             $t->set_var('doc_url', $descUrl);
             if ($this->flag_version_2 == true) {
                 // Does hack need to be used?
                 if (gettype($configText) == "NULL") {
                     $t->set_var('doc_link', '(<a href="javascript:void(0);" id="desc_' . $option . '" class="tooltip">?</a>)');
                 } else {
                     $t->set_var('doc_link', '(<a href="javascript:void(0);" id="desc_' . $option . '">?</a>)');
                 }
             } else {
                 // Does hack need to be used?
                 if (gettype($configText) == "NULL") {
                     $t->set_var('doc_link', '(<a href="' . $descUrl . '" target="help" class="tooltip">?</a>)');
                 } else {
                     $t->set_var('doc_link', '(<a href="' . $descUrl . '" target="help">?</a>)');
                 }
             }
         }
     } else {
         $t->set_var('doc_url', '');
         $retval = "(" . COM_getTooltip("?", $configText, '', $option, 'information') . ")";
         $t->set_var('doc_link', $retval);
     }
 }
开发者ID:mystralkk,项目名称:geeklog,代码行数:68,代码来源:config.class.php

示例13: commandcontrol

/**
* Prints the command & control block at the top
*
* TODO: The moderation items should be displayed with the help of <ul><li>
* instead of div's.
*
*/
function commandcontrol()
{
    global $_CONF, $_TABLES, $LANG01, $LANG_MB01, $LANG_AM, $LANG_LOGO, $LANG29, $LANG_LOGVIEW, $_IMAGE_TYPE, $_DB_dbms;
    $retval = '';
    $admin_templates = new Template($_CONF['path_layout'] . 'admin/moderation');
    $admin_templates->set_file(array('cc' => 'moderation.thtml', 'ccrow' => 'ccrow.thtml', 'ccitem' => 'ccitem.thtml'));
    $admin_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $admin_templates->set_var('title', 'glFusion ' . GVERSION . PATCHLEVEL . ' -- ' . $LANG29[34]);
    $retval .= '<h2>glFusion ' . GVERSION . PATCHLEVEL . ' -- ' . $LANG29[34] . '</h2>';
    $showTrackbackIcon = ($_CONF['trackback_enabled'] || $_CONF['pingback_enabled'] || $_CONF['ping_enabled']) && SEC_hasRights('story.ping');
    $cc_arr = array(array('condition' => SEC_hasRights('story.edit'), 'url' => $_CONF['site_admin_url'] . '/story.php', 'lang' => $LANG01[11], 'image' => '/images/icons/story.'), array('condition' => SEC_hasRights('block.edit'), 'url' => $_CONF['site_admin_url'] . '/block.php', 'lang' => $LANG01[12], 'image' => '/images/icons/block.'), array('condition' => SEC_hasRights('topic.edit'), 'url' => $_CONF['site_admin_url'] . '/topic.php', 'lang' => $LANG01[13], 'image' => '/images/icons/topic.'), array('condition' => SEC_hasRights('user.edit'), 'url' => $_CONF['site_admin_url'] . '/user.php', 'lang' => $LANG01[17], 'image' => '/images/icons/user.'), array('condition' => SEC_hasRights('group.edit'), 'url' => $_CONF['site_admin_url'] . '/group.php', 'lang' => $LANG01[96], 'image' => '/images/icons/group.'), array('condition' => SEC_hasRights('user.mail'), 'url' => $_CONF['site_admin_url'] . '/mail.php', 'lang' => $LANG01[105], 'image' => '/images/icons/mail.'), array('condition' => SEC_hasRights('syndication.edit'), 'url' => $_CONF['site_admin_url'] . '/syndication.php', 'lang' => $LANG01[38], 'image' => '/images/icons/syndication.'), array('condition' => $showTrackbackIcon, 'url' => $_CONF['site_admin_url'] . '/trackback.php', 'lang' => $LANG01[116], 'image' => '/images/icons/trackback.'), array('condition' => SEC_hasRights('plugin.edit'), 'url' => $_CONF['site_admin_url'] . '/plugins.php', 'lang' => $LANG01[98], 'image' => '/images/icons/plugins.'), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/clearctl.php', 'lang' => $LANG01['ctl'], 'image' => '/images/icons/ctl.'), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/envcheck.php', 'lang' => $LANG01['env_check'], 'image' => '/images/icons/envcheck.'), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/logview.php', 'lang' => $LANG_LOGVIEW['logview'], 'image' => '/images/icons/logview.'), array('condition' => SEC_hasRights('menu.admin'), 'url' => $_CONF['site_admin_url'] . '/menu.php', 'lang' => $LANG_MB01['menu_builder'], 'image' => '/images/icons/menubuilder.'), array('condition' => SEC_hasRights('logo.admin'), 'url' => $_CONF['site_admin_url'] . '/logo.php', 'lang' => $LANG_LOGO['logo_admin'], 'image' => '/images/icons/logo.'), array('condition' => SEC_hasRights('autotag.admin'), 'url' => $_CONF['site_admin_url'] . '/autotag.php', 'lang' => $LANG_AM['title'], 'image' => '/images/icons/autotag.'), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/sfs.php', 'lang' => 'SFS User Check', 'image' => '/images/icons/sfs.'));
    $admin_templates->set_var('cc_icon_width', floor(100 / ICONS_PER_ROW));
    for ($i = 0; $i < count($cc_arr); $i++) {
        if ($cc_arr[$i]['condition']) {
            $item = render_cc_item($admin_templates, $cc_arr[$i]['url'], $_CONF['layout_url'] . $cc_arr[$i]['image'] . $_IMAGE_TYPE, $cc_arr[$i]['lang']);
            $items[$cc_arr[$i]['lang']] = $item;
        }
    }
    // now add the plugins
    $plugins = PLG_getCCOptions();
    for ($i = 0; $i < count($plugins); $i++) {
        $cur_plugin = current($plugins);
        $item = render_cc_item($admin_templates, $cur_plugin->adminurl, $cur_plugin->plugin_image, $cur_plugin->adminlabel);
        $items[$cur_plugin->adminlabel] = $item;
        next($plugins);
    }
    // and finally, add the remaining admin items
    $doclang = COM_getLanguageName();
    if (@file_exists($_CONF['path_html'] . 'docs/' . $doclang . '/index.html')) {
        $docUrl = $_CONF['site_url'] . '/docs/' . $doclang . '/index.html';
    } else {
        $docUrl = $_CONF['site_url'] . '/docs/english/index.html';
    }
    $cc_arr = array(array('condition' => $_CONF['allow_mysqldump'] == 1 && $_DB_dbms == 'mysql' && SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/database.php', 'lang' => $LANG01[103], 'image' => '/images/icons/database.'), array('condition' => $_CONF['link_documentation'] == 1, 'url' => $docUrl, 'lang' => $LANG01[113], 'image' => '/images/icons/docs.'), array('condition' => SEC_inGroup('Root') && $_CONF['link_versionchecker'] == 1, 'url' => $_CONF['site_admin_url'] . '/vercheck.php', 'lang' => $LANG01[107], 'image' => '/images/icons/versioncheck.'), array('condition' => SEC_inGroup('Root'), 'url' => $_CONF['site_admin_url'] . '/configuration.php', 'lang' => $LANG01[129], 'image' => '/images/icons/configuration.'), array('condition' => SEC_isModerator(), 'url' => $_CONF['site_admin_url'] . '/moderation.php', 'lang' => $LANG01[10], 'image' => '/images/icons/moderation.'));
    for ($i = 0; $i < count($cc_arr); $i++) {
        if ($cc_arr[$i]['condition']) {
            $item = render_cc_item($admin_templates, $cc_arr[$i]['url'], $_CONF['layout_url'] . $cc_arr[$i]['image'] . $_IMAGE_TYPE, $cc_arr[$i]['lang']);
            $items[$cc_arr[$i]['lang']] = $item;
        }
    }
    if ($_CONF['sort_admin']) {
        uksort($items, 'strcasecmp');
    }
    // logout is always the last entry
    $item = render_cc_item($admin_templates, $_CONF['site_url'] . '/users.php?mode=logout', $_CONF['layout_url'] . '/images/icons/logout.' . $_IMAGE_TYPE, $LANG01[35]);
    $items[$LANG01[35]] = $item;
    reset($items);
    $cols = 0;
    $cc_main_options = '';
    foreach ($items as $key => $val) {
        $cc_main_options .= $val . LB;
        $cols++;
        if ($cols == ICONS_PER_ROW) {
            $admin_templates->set_var('cc_main_options', $cc_main_options);
            $admin_templates->parse('cc_rows', 'ccrow', true);
            $admin_templates->clear_var('cc_main_options');
            $cc_main_options = '';
            $cols = 0;
        }
    }
    if ($cols > 0) {
        // "flush out" any unrendered entries
        $admin_templates->set_var('cc_main_options', $cc_main_options);
        $admin_templates->parse('cc_rows', 'ccrow', true);
        $admin_templates->clear_var('cc_main_options');
    }
    $retval .= $admin_templates->finish($admin_templates->parse('output', 'cc'));
    return $retval;
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:76,代码来源:index.php

示例14: _get_ConfigHelp

 /**
  * Helper function: Get the URL to the help section for a config option
  *
  * @param    string  $group      'Core' or plugin name
  * @param    string  $option     name of the config option
  * @return   string              full URL to help or empty string
  *
  */
 function _get_ConfigHelp($group, $option)
 {
     static $docUrl;
     if (!isset($docUrl)) {
         $docUrl = array();
     }
     $retval = '';
     if (!isset($docUrl[$group])) {
         if ($group == 'Core') {
             if (!empty($GLOBALS['_CONF']['site_url']) && !empty($GLOBALS['_CONF']['path_html'])) {
                 $baseUrl = $GLOBALS['_CONF']['site_url'];
                 $doclang = COM_getLanguageName();
                 $cfg = 'docs/' . $doclang . '/config.html';
                 if (file_exists($GLOBALS['_CONF']['path_html'] . $cfg)) {
                     $url = $baseUrl . '/' . $cfg;
                 } else {
                     $url = $baseUrl . '/docs/english/config.html';
                 }
             } else {
                 $url = 'http://www.geeklog.net/docs/english/config.html';
             }
             $docUrl['Core'] = $url;
         } else {
             // plugin
             $docUrl[$group] = PLG_getDocumentationUrl($group, 'config');
         }
     }
     $retval = $docUrl[$group];
     if (!empty($retval)) {
         if (strpos($retval, '#') === false) {
             $retval .= '#desc_' . $option;
         }
     }
     return $retval;
 }
开发者ID:hostellerie,项目名称:nexpro,代码行数:43,代码来源:config.class.php


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