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

PHP isadminloggedin函数代码示例

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

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



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


示例16: issuperadminloggedin

function issuperadminloggedin()
{
    $result = false;
    if (isadminloggedin()) {
        $user = get_loggedin_user();
        if ($user->superadmin == "yes") {
            $result = true;
        } elseif ($user->admin == 1) {
            $result = true;
        }
    }
    return $result;
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:13,代码来源:start.php


示例17: 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);
                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);
                //  $event_result = true;
                // Include action
                if ($event_result) {
                    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:eokyere,项目名称:elgg,代码行数:52,代码来源:actions.php


示例18: 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;
    // set GET params
    elgg_set_input_from_uri();
    // @todo REMOVE THESE ONCE #1509 IS IN PLACE.
    // Allow users to disable plugins without a token in order to
    // remove plugins that are imcompatible.
    // Installation cannot use tokens because it requires site secret to be
    // working. (#1462)
    // Login and logout are for convenience.
    $exceptions = array('systemsettings/install', 'admin/plugins/disable', 'logout', 'login');
    if (!in_array($action, $exceptions)) {
        // All actions require a token.
        action_gatekeeper();
    }
    $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
                // Event_result being false doesn't produce an error -
                // since i assume this will be handled in the hook itself.
                // TODO make this better!
                if ($event_result) {
                    if (!(include $CONFIG->actions[$action]['file'])) {
                        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:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:52,代码来源:actions.php


示例19: groups_from_members_submenus

function groups_from_members_submenus()
{
    global $CONFIG;
    $page_owner = page_owner_entity();
    // Submenu items for all group pages
    if ($page_owner instanceof ElggGroup && get_context() == 'groups' && get_loggedin_userid() != $page_owner->getOwner()) {
        if (isloggedin() && !isadminloggedin()) {
            $context = get_context();
            set_context('groupsfrommembers');
            if ($page_owner->canEdit()) {
                add_submenu_item(elgg_echo('groups:invite'), $CONFIG->wwwroot . "mod/groupsfrommembers/invite.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
                if (!$page_owner->isPublicMembership()) {
                    add_submenu_item(elgg_echo('groups:membershiprequests'), $CONFIG->wwwroot . "mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
                }
            }
            set_context($context);
        }
    }
}
开发者ID:eokyere,项目名称:elgg,代码行数:19,代码来源:start.php


示例20: admin_init

/**
 * Initialise the admin page.
 */
function admin_init()
{
    // Add plugin main menu option (last)
    extend_elgg_admin_page('admin/main_opt/statistics', 'admin/main');
    extend_elgg_admin_page('admin/main_opt/site', 'admin/main');
    extend_elgg_admin_page('admin/main_opt/user', 'admin/main');
    extend_elgg_admin_page('admin/main_opt/plugins', 'admin/main', 999);
    // Always last
    register_action('admin/user/ban', false, "", true);
    register_action('admin/user/unban', false, "", true);
    register_action('admin/user/delete', false, "", true);
    register_action('admin/user/resetpassword', false, "", true);
    register_action('admin/user/makeadmin', false, "", true);
    register_action('admin/user/removeadmin', false, "", true);
    // Register some actions
    register_action('admin/site/update_basic', false, "", true);
    // Register basic site admin action
    // Page handler
    register_page_handler('admin', 'admin_settings_page_handler');
    if (isadminloggedin()) {
        global $is_admin;
        $is_admin = true;
    }
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:27,代码来源:admin.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP isanyadmin函数代码示例发布时间:2022-05-15
下一篇:
PHP isadmin函数代码示例发布时间: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