當前位置: 首頁>>代碼示例>>PHP>>正文


PHP isadminloggedin函數代碼示例

本文整理匯總了PHP中isadminloggedin函數的典型用法代碼示例。如果您正苦於以下問題:PHP isadminloggedin函數的具體用法?PHP isadminloggedin怎麽用?PHP isadminloggedin使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了isadminloggedin函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: collaboration_pagesetup

function collaboration_pagesetup()
{
    global $CONFIG;
    if (get_context() == 'admin' && isadminloggedin()) {
        add_submenu_item('Manage external sites', $CONFIG->wwwroot . 'pg/collaboration/admin');
    }
}
開發者ID:rkvsraman,項目名稱:elgg_external_sites,代碼行數:7,代碼來源:start.php

示例2: vazco_avatar_init

function vazco_avatar_init()
{
    global $CONFIG;
    define('VAZCO_AVATAR_PATH', 'vazco_avatars');
    //set admin user ID to 2 - the default admin. TODO: do it cleaner.
    // Since we use ElggFile here, the ID has to belong to the user that is in the system all the time.
    define('VAZCO_AVATAR_ADMIN', 2);
    extend_view('profile/editicon', 'vazco_avatar/select', 601);
    extend_view('css', 'vazco_avatar/css', 601);
    register_action("vazco_avatar/upload", false, $CONFIG->pluginspath . "vazco_avatar/actions/upload.php");
    register_action("vazco_avatar/select", false, $CONFIG->pluginspath . "vazco_avatar/actions/select.php");
    register_action("vazco_avatar/delete", false, $CONFIG->pluginspath . "vazco_avatar/actions/delete.php");
    register_plugin_hook('action', 'profile/cropicon', 'vazco_avatar_cropicon', 600);
    if (isadminloggedin() && get_context() == 'admin' || get_context() == 'vazco_avatar') {
        add_submenu_item(elgg_echo('vazco_avatar:menu'), $CONFIG->wwwroot . 'pg/vazco_avatar/edit');
    }
    if (isadminloggedin() && get_context() == 'vazco_avatar') {
        add_submenu_item(elgg_echo('avatars:upload'), $CONFIG->wwwroot . 'pg/vazco_avatar/upload');
    }
    if (isloggedin()) {
        //update current user's avatar for topbar and edit icon page
        setUserIcon($_SESSION['user'], 'topbar');
        setUserIcon($_SESSION['user'], 'medium');
    }
}
開發者ID:portokallidis,項目名稱:Metamorphosis-Meducator,代碼行數:25,代碼來源:start.php

示例3: categories_pagesetup

/**
 * Set up menu items
 *
 */
function categories_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('categories:settings'), $CONFIG->wwwroot . 'mod/categories/settings.php');
    }
}
開發者ID:eokyere,項目名稱:elgg,代碼行數:11,代碼來源:start.php

示例4: ckeditor_pagesetup

function ckeditor_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('ckeditor:admin_title'), $CONFIG->wwwroot . 'mod/CKEditor/admin.php');
    }
}
開發者ID:portokallidis,項目名稱:Metamorphosis-Meducator,代碼行數:7,代碼來源:start.php

示例5: dreamfish_admin_pagesetup

function dreamfish_admin_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('dreamfish_admin:admin_title'), $CONFIG->wwwroot . 'mod/dreamfish_admin/admintasks.php');
    }
}
開發者ID:eokyere,項目名稱:elgg,代碼行數:7,代碼來源:start.php

示例6: theme_editable_pagesetup

/**
 * Set up menu items
 */
function theme_editable_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('theme_editable:settings'), $CONFIG->wwwroot . 'mod/theme_editable/settings.php');
    }
}
開發者ID:psndcsrv,項目名稱:theme_editable,代碼行數:10,代碼來源:start.php

示例7: diagnostics_pagesetup

/**
 * Adding the diagnostics to the admin menu
 *
 */
function diagnostics_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('diagnostics'), $CONFIG->wwwroot . 'pg/diagnostics/');
    }
}
開發者ID:ashwiniravi,項目名稱:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代碼行數:11,代碼來源:start.php

示例8: reportedcontent_pagesetup

/**
 * Adding the reported content to the admin menu
 *
 */
function reportedcontent_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('reportedcontent'), $CONFIG->wwwroot . 'pg/reportedcontent/');
    }
}
開發者ID:eokyere,項目名稱:elgg,代碼行數:11,代碼來源:start.php

示例9: blog_get_page_content_read

/**
 * Returns HTML for a blog post.
 *
 * @param int $guid of a blog entity.
 * @return string html
 */
function blog_get_page_content_read($owner_guid = NULL, $guid = NULL)
{
    $content = elgg_view('page_elements/content_header', array('context' => $context, 'type' => 'blog'));
    if ($guid) {
        $blog = get_entity($guid);
        if (!elgg_instanceof($blog, 'object', 'blog') && $blog->status == 'final') {
            $content .= elgg_echo('blog:error:post_not_found');
        } else {
            elgg_push_breadcrumb($blog->title, $blog->getURL());
            $content .= elgg_view_entity($blog, TRUE);
        }
    } else {
        $options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => FALSE, 'order_by_metadata' => array('name' => 'publish_date', 'direction' => 'DESC', 'as' => 'int'));
        if ($owner_guid) {
            $options['owner_guid'] = $owner_guid;
        }
        // show all posts for admin or users looking at their own blogs
        // show only published posts for other users.
        if (!(isadminloggedin() || isloggedin() && $owner_guid == get_loggedin_userid())) {
            $options['metadata_name_value_pairs'] = array(array('name' => 'status', 'value' => 'published'), array('name' => 'publish_date', 'operand' => '<', 'value' => time()));
        }
        $content .= elgg_list_entities_from_metadata($options);
    }
    return array('content' => $content);
}
開發者ID:adamboardman,項目名稱:Elgg,代碼行數:31,代碼來源:blog_lib.php

示例10: removewidget_pagesetup

function removewidget_pagesetup()
{
    global $CONFIG;
    if (get_context() == 'admin' && isadminloggedin()) {
        add_submenu_item(elgg_echo('remove_widgets'), $CONFIG->wwwroot . 'pg/removewidget/');
    }
}
開發者ID:CashElgg,項目名稱:remove_widget,代碼行數:7,代碼來源:start.php

示例11: logbrowser_pagesetup

/**
 * Adding the log browser to the admin menu
 *
 */
function logbrowser_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('logbrowser'), $CONFIG->wwwroot . 'pg/logbrowser/');
    }
}
開發者ID:ashwiniravi,項目名稱:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代碼行數:11,代碼來源:start.php

示例12: vazco_topbar_submenus

function vazco_topbar_submenus()
{
    global $CONFIG;
    if (isadminloggedin() && get_context() == 'admin' || get_context() == 'vazco_topbar') {
        add_submenu_item(elgg_echo('vazco_topbar:menu:short'), $CONFIG->wwwroot . 'mod/vazco_topbar/edit.php');
    }
}
開發者ID:portokallidis,項目名稱:Metamorphosis-Meducator,代碼行數:7,代碼來源:start.php

示例13: sw_admin_pagesetup

function sw_admin_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('sw:title'), $CONFIG->wwwroot . 'pg/sticky_widgets/admin/edit.php', "s");
        // This will allow editing of default settings of sticky widgets
        //		add_submenu_item(elgg_echo('sw:title:defaults'), $CONFIG->wwwroot . 'pg/sticky_widgets/admin/defaults.php',"s");
    }
}
開發者ID:ssuppe,項目名稱:sticky_widgets,代碼行數:9,代碼來源:start.php

示例14: plugin_installer_pagesetup

function plugin_installer_pagesetup()
{
    global $CONFIG;
    if (isadminloggedin()) {
        if (get_context() == "admin") {
            add_submenu_item(elgg_echo("plugin_installer:title"), $CONFIG->wwwroot . "mod/plugin_installer/index.php");
            // fast tool admin
            extend_view("admin/plugins", "plugin_installer/plugin_admin", 400);
        }
    }
}
開發者ID:portokallidis,項目名稱:Metamorphosis-Meducator,代碼行數:11,代碼來源:start.php

示例15: action

/**
 * Loads an action script, if it exists, then forwards elsewhere
 *
 * @param string $action The requested action
 * @param string $forwarder Optionally, the location to forward to
 */
function action($action, $forwarder = "")
{
    global $CONFIG;
    $query = parse_url($_SERVER['REQUEST_URI']);
    if (isset($query['query'])) {
        $query = $query['query'];
        $query = rawurldecode($query);
        $query = explode('&', $query);
        if (sizeof($query) > 0) {
            foreach ($query as $queryelement) {
                $vals = explode('=', $queryelement, 2);
                if (sizeof($vals) > 1) {
                    set_input(trim($vals[0]), trim($vals[1]));
                }
            }
        }
    }
    $forwarder = str_replace($CONFIG->url, "", $forwarder);
    $forwarder = str_replace("http://", "", $forwarder);
    $forwarder = str_replace("@", "", $forwarder);
    if (substr($forwarder, 0, 1) == "/") {
        $forwarder = substr($forwarder, 1);
    }
    if (isset($CONFIG->actions[$action])) {
        if (isadminloggedin() || !$CONFIG->actions[$action]['admin']) {
            if ($CONFIG->actions[$action]['public'] || $_SESSION['id'] != -1) {
                // Trigger action event TODO: This is only called before the primary action is called. We need to rethink actions for 1.5
                $event_result = true;
                $event_result = trigger_plugin_hook('action', $action, null, $event_result);
                // Include action
                if ($event_result) {
                    /** Refs #749: We now warn if action token is missing. Later this will be replaced with action_gatekeeper() as detailed in #750 */
                    if (!validate_action_token(false)) {
                        // Display a temporary warning message - in future versions this will be a hard fail via an action gatekeeper.
                        $message = "WARNING: Action {$action} was called without an action token. It is stongly recommended that you consider doing this. Plugin authors should use 'input/form' or pass is_action=true to 'output/confirmlink' or 'output/url'.";
                        //if ((!isset($CONFIG->disable_action_token_warning)) || (!$CONFIG->disable_action_token_warning))
                        //	register_error($message);
                        error_log($message);
                    }
                    if (include $CONFIG->actions[$action]['file']) {
                    } else {
                        register_error(sprintf(elgg_echo('actionundefined'), $action));
                    }
                }
            } else {
                register_error(elgg_echo('actionloggedout'));
            }
        }
    } else {
        register_error(sprintf(elgg_echo('actionundefined'), $action));
    }
    forward($CONFIG->url . $forwarder);
}
開發者ID:portokallidis,項目名稱:Metamorphosis-Meducator,代碼行數:59,代碼來源:actions.php


注:本文中的isadminloggedin函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。