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

PHP system_message函数代码示例

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

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



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

示例1: handle

 /**
  * {@inheritdoc}
  */
 protected function handle()
 {
     $plugins = elgg_get_plugins('inactive');
     if (empty($plugins)) {
         system_message('All plugins are active');
         return;
     }
     $ids = array_map(function (ElggPlugin $plugin) {
         return $plugin->getID();
     }, $plugins);
     $ids = array_values($ids);
     if ($this->option('all')) {
         $activate_ids = $ids;
     } else {
         $helper = $this->getHelper('question');
         $question = new ChoiceQuestion('Please select plugins you would like to activate (comma-separated list of indexes)', $ids);
         $question->setMultiselect(true);
         $activate_ids = $helper->ask($this->input, $this->output, $question);
     }
     if (empty($activate_ids)) {
         throw new \RuntimeException('You must select at least one plugin');
     }
     $plugins = [];
     foreach ($activate_ids as $plugin_id) {
         $plugins[] = elgg_get_plugin_from_id($plugin_id);
     }
     do {
         $additional_plugins_activated = false;
         foreach ($plugins as $key => $plugin) {
             if ($plugin->isActive()) {
                 unset($plugins[$key]);
                 continue;
             }
             if (!$plugin->activate()) {
                 // plugin could not be activated in this loop, maybe in the next loop
                 continue;
             }
             $ids = array('cannot_start' . $plugin->getID(), 'invalid_and_deactivated_' . $plugin->getID());
             foreach ($ids as $id) {
                 elgg_delete_admin_notice($id);
             }
             // mark that something has changed in this loop
             $additional_plugins_activated = true;
             unset($plugins[$key]);
             system_message("Plugin {$plugin->getFriendlyName()} has been activated");
         }
         if (!$additional_plugins_activated) {
             // no updates in this pass, break the loop
             break;
         }
     } while (count($plugins) > 0);
     if (count($plugins) > 0) {
         foreach ($plugins as $plugin) {
             $msg = $plugin->getError();
             $string = $msg ? 'admin:plugins:activate:no_with_msg' : 'admin:plugins:activate:no';
             register_error(elgg_echo($string, array($plugin->getFriendlyName())));
         }
     }
     elgg_flush_caches();
 }
开发者ID:hypejunction,项目名称:elgg-cli,代码行数:63,代码来源:PluginsActivateCommand.php


示例2: pla_rdelete

function pla_rdelete($server, $dn)
{
    # We delete all children, not only the visible children in the tree
    $children = $server->getContainerContents($dn, null, 0, '(objectClass=*)', LDAP_DEREF_NEVER);
    if (!is_array($children) || count($children) == 0) {
        printf('<span style="white-space: nowrap;">%s %s...', _('Deleting'), $dn);
        if ($server->delete($dn)) {
            printf(' <span style="color:green">%s</span></span><br />', _('Success'));
            return true;
        } else {
            system_message(array('title' => _('Could not delete the entry.') . sprintf(' (%s)', pretty_print_dn($dn)), 'body' => ldap_error_msg($server->getErrorMessage(null), $server->getErrorNum(null)), 'type' => 'error'));
        }
    } else {
        foreach ($children as $child_dn) {
            pla_rdelete($server, $child_dn);
        }
        printf('<span style="white-space: nowrap;">%s %s...', _('Deleting'), $dn);
        if ($server->delete($dn)) {
            printf(' <span style="color:green">%s</span></span><br />', _('Success'));
            return true;
        } else {
            system_message(array('title' => _('Could not delete the entry.') . sprintf(' (%s)', pretty_print_dn($dn)), 'body' => ldap_error_msg($server->getErrorMessage(null), $server->getErrorNum(null)), 'type' => 'error'));
        }
    }
}
开发者ID:dannylsl,项目名称:phpLDAPadmin,代码行数:25,代码来源:rdelete.php


示例3: cas_insertUser

/**
 * insert user into elgg user table
 *
 * Get user info from db
 * Tries to insert, otherwise return error
 *
 * @return user
 */
function cas_insertUser($username, $casUser, $config)
{
    //     $name = $attr['cn'];
    //     $uname = !empty($attr['textuid']) ? $attr['textuid'] : str_replace(".", "",$username);
    //     $email = $attr['mail'];
    $name = $casUser->name;
    $uname = !empty($casUser->username) ? $casUser->username : $username;
    $email = $casUser->email;
    $password = md5($uname . $email);
    $user = new ElggUser();
    $user->username = $uname;
    $user->email = $email;
    $user->name = $name;
    $user->access_id = 2;
    $user->salt = generate_random_cleartext_password();
    // Note salt generated before password!
    $user->password = generate_user_password($user, $password);
    $user->save();
    $guid = $user->guid;
    $obj = get_entity($guid);
    if (isset($config->casadminuser) && $config->casadminuser == $username) {
        if ($obj instanceof ElggUser && $obj->canEdit()) {
            $obj->admin = 'yes';
            if ($obj->admin) {
                system_message(elgg_echo('admin:user:makeadmin:yes'));
            } else {
                register_error(elgg_echo('admin:user:makeadmin:no'));
            }
        } else {
            register_error(elgg_echo('admin:user:makeadmin:no'));
        }
    }
    return $user;
}
开发者ID:duanhv,项目名称:mdg-social,代码行数:42,代码来源:lib.php


示例4: LoginUser

function LoginUser($tool_provider)
{
    // Clear any existing sessions
    if (elgg_is_logged_in()) {
        logout();
    }
    $values = GetPluginSettings();
    $userprovision = $values['userprovision'];
    $user_id = $tool_provider->user->getID(BasicLTI_Tool_Provider::ID_SCOPE_GLOBAL);
    $consumer_key = $tool_provider->consumer->guid;
    $context_id = $tool_provider->user->context->id;
    // Does user exist
    $user = CheckLTIUser($user_id);
    // Provision user, if on and needed
    if (empty($user)) {
        if ($userprovision) {
            $user = CreateLTIUser($consumer_key, $context_id, $tool_provider->user);
            if (empty($user)) {
                forward();
            }
        } else {
            system_message(elgg_echo('LTI:info:noprovision'));
            forward();
            exit;
        }
    }
    // Set up current context id
    $user->context_id = $context_id;
    $user->email = $tool_provider->user->email;
    $user->name = $tool_provider->user->fullname;
    $user->save();
    // Login
    $result = login($user, false);
    return $result;
}
开发者ID:vsheokeen,项目名称:Elgg-Plugins,代码行数:35,代码来源:LTIUser.php


示例5: show_next_celebrations

function show_next_celebrations()
{
    $ViewReminder = elgg_get_plugin_setting("ViewReminder", "celebrations");
    if (!$ViewReminder) {
        $ViewReminder = "no";
    }
    if ($ViewReminder = "yes") {
        $nextdaysCelebrations = elgg_get_plugin_setting("nextdaysCelebrations", "celebrations");
        if (!$nextdaysCelebrations) {
            $nextdaysCelebrations = 7;
        }
        $celebrations = user_celebrations($nextdaysCelebrations, 'next', 0);
        //draw celebrations
        if (!empty($celebrations)) {
            foreach ($celebrations as $key => $val) {
                if ($val['rest'] == 0) {
                    $days = elgg_echo('next_celebrations:today');
                } elseif ($val['rest'] == 1) {
                    $days = elgg_echo('next_celebrations:dayleft');
                } else {
                    $days = elgg_echo('next_celebrations:in') . ' ' . $val['rest'] . ' ' . elgg_echo('next_celebrations:daysleft');
                }
                system_message($days . elgg_echo('next_celebrations:celebrate') . $val['fullname'] . elgg_echo('next_celebrations:genitive') . elgg_echo('today_celebrations:' . $val['type']) . '.');
            }
        }
    }
    return true;
}
开发者ID:iionly,项目名称:celebrations,代码行数:28,代码来源:start.php


示例6: au_landing_user_login

function au_landing_user_login($event, $type, $object)
{
    if (elgg_instanceof($object, 'user')) {
        if (!is_email_address($object->email)) {
            system_message(elgg_echo('au_landing:invalidemail'));
        }
    }
}
开发者ID:AU-Landing-Project,项目名称:au_landing,代码行数:8,代码来源:events.php


示例7: cclite_revoke

function cclite_revoke()
{
    // unregister user's access tokens
    set_plugin_usersetting('access_key', NULL);
    set_plugin_usersetting('access_secret', NULL);
    system_message(elgg_echo('cclite:revoke:success'));
    forward('pg/settings/plugins');
}
开发者ID:hbarnard,项目名称:cclite,代码行数:8,代码来源:oauthservice_lib.php


示例8: elgg_gatekeeper

/**
 * Used at the top of a page to mark it as logged in users only.
 *
 * @return void
 * @since 1.9.0
 */
function elgg_gatekeeper()
{
    if (!elgg_is_logged_in()) {
        _elgg_services()->session->set('last_forward_from', current_page_url());
        system_message(elgg_echo('loggedinrequired'));
        forward('/login', 'login');
    }
}
开发者ID:nooshin-mirzadeh,项目名称:web_2.0_benchmark,代码行数:14,代码来源:pagehandler.php


示例9: gvgroups_leave_group

function gvgroups_leave_group($group, $user)
{
    if ($group->leave($user)) {
        system_message(elgg_echo("gvgroups:localgroups:unsubscribe", array($group->name)));
    } else {
        register_error(elgg_echo("gvgroups:localgroups:error_unsubscribe", array($group->name)));
    }
}
开发者ID:remy40,项目名称:gvrs,代码行数:8,代码来源:start.php


示例10: log_event

function log_event(&$sql, $date, $user_id, $user_name, $action, $comment)
{
    $query = "insert into syslog (date, user_id, user_name, action, comment) values ('{$date}', '{$user_id}', '{$user_name}', '{$action}', '{$comment}')";
    $rs = $sql->Execute($query);
    if (!$rs) {
        system_message($sql->ErrorMsg());
    }
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:8,代码来源:system-log.php


示例11: doConnect

function doConnect($tool_provider)
{
    $result = LoginUser($tool_provider);
    if (!$result && !empty($tool_provider->return_url)) {
        $urlencode = urlencode(sprintf(elgg_echo('LTI:error:login'), elgg_get_config('sitename')));
        forward($tool_provider->return_url . '&lti_msg=' . $urlencode);
        return false;
    }
    if (!$result && empty($tool_provider->return_url)) {
        system_message(sprintf(elgg_echo('LTI:error:login'), elgg_get_config('sitename')));
        forward();
        return false;
    }
    // Send login time to consumer if has setting service and can handle freetext
    $freetext = strpos(strtolower($tool_provider->context->getSetting('ext_ims_lis_resultvalue_sourcedids')), 'freetext');
    if ($tool_provider->context->hasSettingService() && $freetext) {
        $consumer_name_array = explode("-", $tool_provider->consumer->consumer_name, 2);
        $consumer_name = $consumer_name_array[0];
        $version = strtolower($consumer_name_array[1]);
        $outcome = new LTI_Outcome($tool_provider->context->getSetting('lis_result_sourcedid'), '');
        $outcome->type = 'freetext';
        $result = $tool_provider->context->doOutcomesService(LTI_Context::EXT_READ, $outcome);
        $count = 1;
        switch ($consumer_name) {
            case 'moodle':
                if (!empty($result)) {
                    system_message(sprintf('LTI:last:login'), $result);
                }
                $outcome = new LTI_Outcome($tool_provider->context->getSetting("lis_result_sourcedid"), date('d-M-Y'));
                $outcome->type = 'freetext';
                $outcome->status = 'final';
                break;
            default:
                if (!empty($result)) {
                    $pieces = explode(' ', $result);
                    $count = intval($pieces[0]);
                    $count++;
                    $last_login = $pieces[1] . ' ' . $pieces[2] . ' - Logins: ' . $count;
                    system_message(sprintf('LTI:last:login'), $last_login);
                }
                // Assume freetext available and send back date/count
                $outcome = new LTI_Outcome($tool_provider->context->getSetting('lis_result_sourcedid'), $count . ' ' . date('d-M-Y H:i'));
                $outcome->type = 'freetext';
                $outcome->status = 'interim';
                break;
        }
        $result = $tool_provider->context->doOutcomesService(LTI_Context::EXT_WRITE, $outcome);
    }
    // Store return URL for later use, if present
    if (!empty($tool_provider->return_url)) {
        $_SESSION['return_url'] = $tool_provider->return_url;
        $_SESSION['return_name'] = 'Return to ' . $tool_provider->consumer->name;
    }
    ProvisionLTIGroup($tool_provider);
    system_messages('Forwarded to Profile');
    forward();
    return false;
}
开发者ID:vsheokeen,项目名称:Elgg-Plugins,代码行数:58,代码来源:register.php


示例12: register_user

function register_user($uname, $upass)
{
    global $sql;
    global $cfg;
    $timestamp = time();
    if ($cfg['DB_TYPE'] === 'mysql') {
        $query = "select admin_id, admin_pass, admin_type, created_by from admin where binary admin_name = ?";
    }
    $rs = exec_query($sql, $query, array($uname));
    if ($rs->RecordCount() != 1) {
        write_log("Login error, <b><i>" . htmlspecialchars($uname, ENT_QUOTES, "UTF-8") . "</i></b> unknown username");
        return false;
    }
    $udata = $rs->FetchRow();
    if (crypt($_POST['upass'], $udata[1]) === $udata[1] || md5($_POST['upass']) === $udata[1]) {
        if (isset($_SESSION['user_logged'])) {
            write_log($_SESSION['user_logged'] . " user already logged or session sharing problem! Aborting...");
            system_message(tr('User already logged or session sharing problem! Aborting...'));
        } else {
            if ($udata['admin_type'] == "user") {
                $domain_admin_id = $udata['admin_id'];
                $query = <<<SQL_QUERY
                          select
                                domain_status
                          from
                                domain
                          where
                                domain_admin_id = ?;
SQL_QUERY;
                $rs = exec_query($sql, $query, array($domain_admin_id));
                $user_dom_data = $rs->FetchRow();
                if ($user_dom_data['domain_status'] != $cfg['ITEM_OK_STATUS']) {
                    write_log(htmlspecialchars($uname, ENT_QUOTES, "UTF-8") . " Domain status is not OK - user can not login");
                    return false;
                }
            }
            // all is OK let's login the user
            $user_login_time = time();
            $query = <<<SQL_QUERY
        insert into login
            (session_id, lastaccess)
        values
            (?, ?)
SQL_QUERY;
            $rs = exec_query($sql, $query, array($uname, $user_login_time));
            $_SESSION['user_logged'] = $uname;
            $_SESSION['user_type'] = $udata['admin_type'];
            $_SESSION['user_id'] = $udata['admin_id'];
            $_SESSION['user_created_by'] = $udata['created_by'];
            $_SESSION['user_login_time'] = $user_login_time;
            write_log(htmlspecialchars($uname, ENT_QUOTES, "UTF-8") . " user logged in.");
            return true;
        }
    } else {
        write_log(htmlspecialchars($uname, ENT_QUOTES, "UTF-8") . " bad password login data.");
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:58,代码来源:login.php


示例13: exec_query

function exec_query(&$sql, $query, $data)
{
    $stmt = $sql->Prepare($query);
    $rs = $sql->Execute($query, $data);
    if (!$rs) {
        system_message($sql->ErrorMsg());
    }
    return $rs;
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:9,代码来源:sql.php


示例14: handle

 /**
  * {@inheritdoc}
  */
 protected function handle()
 {
     $upgrader = _elgg_services()->upgrades;
     $result = $upgrader->run();
     if ($result['failure'] == true) {
         register_error($result['reason']);
     } else {
         system_message('Upgrade script ran without failures');
     }
 }
开发者ID:hypejunction,项目名称:elgg-cli,代码行数:13,代码来源:SiteUpgradeCommand.php


示例15: gen_packages_list

function gen_packages_list(&$tpl, &$sql, $user_id)
{
    global $cfg;
    if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin') {
        $query = <<<SQL_QUERY
\t\t\tselect
\t\t\t\tt1.*,
\t\t\t\tt2.admin_id, t2.admin_type
\t\t\tfrom
\t\t\t\thosting_plans as t1,
\t\t\t\tadmin as t2
\t\t\twhere
\t\t\t\tt2.admin_type=?
\t\t\tand
\t\t\t\tt1.reseller_id = t2.admin_id
\t\t\tand
\t\t\t\tt1.status=1
\t\t\torder by
\t\t\t\tt1.id
SQL_QUERY;
        $rs = exec_query($sql, $query, array('admin'));
    } else {
        $query = <<<SQL_QUERY
\t\t\t\tselect
\t\t\t\t\t*
\t\t\t\tfrom
\t\t\t\t\thosting_plans
\t\t\t\twhere
\t\t\t\t\treseller_id = ?
\t\t\t\t  and
\t\t\t\t\tstatus = '1'
SQL_QUERY;
        $rs = exec_query($sql, $query, array($user_id));
    }
    if ($rs->RecordCount() == 0) {
        system_message(tr('No available hosting packages'));
    } else {
        while (!$rs->EOF) {
            $description = $rs->fields['description'];
            if ($description == '') {
                $description = '';
            }
            $price = $rs->fields['price'];
            if ($price == 0 || $price == '') {
                $price = "/ " . tr('free of charge');
            } else {
                $price = "/ " . $price . " " . $rs->fields['value'] . " " . $rs->fields['payment'];
            }
            $tpl->assign(array('PACK_NAME' => $rs->fields['name'], 'PACK_ID' => $rs->fields['id'], 'USER_ID' => $user_id, 'PURCHASE' => tr('Purchase'), 'PACK_INFO' => $description, 'PRICE' => $price));
            $tpl->parse('PURCHASE_LIST', '.purchase_list');
            $rs->MoveNext();
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:54,代码来源:index.php


示例16: elgg_modifications_generate_digischool_menu_page_handler

function elgg_modifications_generate_digischool_menu_page_handler($page)
{
    admin_gatekeeper();
    if (elgg_is_active_plugin("menu_builder")) {
        // remove current menu items
        $current_options = array("type" => "object", "subtype" => "menu_builder_menu_item", "limit" => false);
        if ($current_items = elgg_get_entities($current_options)) {
            foreach ($current_items as $current_item) {
                $current_item->delete();
            }
        }
        // 			var_dump($current_items);
        // 			exit();
        // add the new ones
        $site = elgg_get_site_entity();
        $site_acl = $site->getACL();
        $menu_items = array(array("title" => "Voorpagina", "url" => "[wwwroot]", "access_id" => ACCESS_PUBLIC, "children" => array(array("title" => "Alle blogs", "url" => "[wwwroot]blog/all", "access_id" => ACCESS_PUBLIC), array("title" => "Alle activiteiten", "url" => "[wwwroot]activity", "access_id" => ACCESS_LOGGED_IN))), array("title" => "Statische pagina's", "url" => "[wwwroot]lidworden", "access_id" => ACCESS_LOGGED_IN), array("title" => "Archief", "url" => "Zelf in te vullen", "access_id" => ACCESS_PUBLIC), array("title" => "Leermiddelen", "url" => "#", "access_id" => ACCESS_PUBLIC, "children" => array(array("title" => "Vakpagina", "url" => "hier de link naar uw vakp", "access_id" => ACCESS_PUBLIC), array("title" => "Leermiddelenbank Digischool", "url" => "[wwwroot]", "access_id" => ACCESS_PUBLIC), array("title" => "Leden keurmerkgroepen", "url" => "zelf te vullen", "access_id" => ACCESS_PUBLIC))), array("title" => "Leden", "url" => "#", "access_id" => ACCESS_LOGGED_IN, "children" => array(array("title" => "Mijn groepen", "url" => "[wwwroot]groups/member/[username]", "access_id" => $site_acl), array("title" => "Mijn profielpagina", "url" => "[wwwroot]profile/[username]", "access_id" => $site_acl), array("title" => "Alle groepen", "url" => "[wwwroot]groups/all/?filter=pop", "access_id" => $site_acl), array("title" => "Lid worden", "url" => "[wwwroot]lidworden", "access_id" => ACCESS_PUBLIC), array("title" => "Content toevoegen", "url" => "[wwwroot]add", "access_id" => $site_acl), array("title" => "Mijn dashboard", "url" => "[wwwroot]dashboard", "access_id" => $site_acl), array("title" => "Zoeken leden", "url" => "[wwwroot]members", "access_id" => $site_acl), array("title" => "Mijn contacten", "url" => "[wwwroot]friends/[username]", "access_id" => $site_acl), array("title" => "Contactverzoeken", "url" => "[wwwroot]friend_request/", "access_id" => $site_acl), array("title" => "Mijn instellingen", "url" => "[wwwroot]settings", "access_id" => $site_acl), array("title" => "Nieuwe groep maken", "url" => "[wwwroot]groups/add", "access_id" => $site_acl))), array("title" => "Beheer", "url" => "[wwwroot]admin", "access_id" => ACCESS_PRIVATE, "children" => array(array("title" => "Gebruikersbeheer", "url" => "[wwwroot]admin/users/newest", "access_id" => ACCESS_PRIVATE), array("title" => "Nodig leden uit", "url" => "[wwwroot]admin/users/invite", "access_id" => ACCESS_PRIVATE), array("title" => "Pluginbeheer", "url" => "[wwwroot]admin/plugins", "access_id" => ACCESS_PRIVATE), array("title" => "Beheer template", "url" => "[wwwroot]admin/appearance/template", "access_id" => ACCESS_PRIVATE))));
        $i = 0;
        foreach ($menu_items as $main_item) {
            $item = new ElggObject();
            $item->subtype = "menu_builder_menu_item";
            $item->owner_guid = $site->getGUID();
            $item->container_guid = $site->getGUID();
            $item->site_guid = $site->getGUID();
            $item->access_id = $main_item["access_id"];
            $item->parent_guid = 0;
            $item->title = $main_item["title"];
            $item->url = $main_item["url"];
            $item->order = $i;
            $i++;
            $item->save();
            if (array_key_exists("children", $main_item)) {
                foreach ($main_item["children"] as $sub_item) {
                    $submenu_item = new ElggObject();
                    $submenu_item->subtype = "menu_builder_menu_item";
                    $submenu_item->owner_guid = $site->getGUID();
                    $submenu_item->container_guid = $site->getGUID();
                    $submenu_item->site_guid = $site->getGUID();
                    $submenu_item->access_id = $sub_item["access_id"];
                    $submenu_item->parent_guid = $item->getGUID();
                    $submenu_item->title = $sub_item["title"];
                    $submenu_item->url = $sub_item["url"];
                    $submenu_item->order = $i;
                    $i++;
                    $submenu_item->save();
                }
            }
        }
        system_message("menu created");
    } else {
        register_error("plugin menu_builder not activated");
    }
    forward();
}
开发者ID:pleio,项目名称:elgg_modifications,代码行数:54,代码来源:page_handlers.php


示例17: apply_event_rules

/**
 * Check if the event qualifies for points and award them to the user
 *
 * @param string $event
 * @param string $type
 * @param mixed $object
 * @return boolean
 */
function apply_event_rules($event, $type, $object)
{
    // Subject
    $user = elgg_get_logged_in_user_entity();
    if (!$user) {
        return true;
    }
    if ($user->isAdmin()) {
        return true;
    }
    // Object
    if (is_object($object)) {
        $entity = $object;
    } else {
        if (is_array($object)) {
            $entity = elgg_extract('entity', $object, null);
            if (!$entity) {
                $entity = elgg_extract('user', $object, null);
            }
            if (!$entity) {
                $entity = elgg_extract('group', $object, null);
            }
        }
    }
    if (!is_object($entity)) {
        // Terminate early, nothing to act upon
        return true;
    }
    // Get rules associated with events
    $rules = get_scoring_rules('events');
    // Apply rules
    foreach ($rules as $rule_name => $rule_options) {
        $rule_options['name'] = $rule_name;
        $gmRule = gmRule::applyRule($entity, $rule_options, "{$event}::{$type}");
        $errors = $gmRule->getErrors();
        if ($errors) {
            foreach ($errors as $error) {
                register_error($error);
            }
        }
        $messages = $gmRule->getMessages();
        if ($messages) {
            foreach ($messages as $message) {
                system_message($message);
            }
        }
        //error_log(print_r($gmRule->getLog(), true));
        if ($gmRule->terminateEvent()) {
            return false;
        }
    }
    return true;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:61,代码来源:events.php


示例18: uncaptcha_register_user

function uncaptcha_register_user($hook, $entity_type, $returnvalue, $params)
{
    if (get_plugin_setting('instant_enable', 'uncaptcha')) {
        $params->enable();
    }
    if (get_plugin_setting('login_after', 'uncaptcha')) {
        if (login($params)) {
            system_message(elgg_echo('uncaptcha:register:auto_login'));
        }
    }
    return true;
}
开发者ID:eokyere,项目名称:elgg,代码行数:12,代码来源:start.php


示例19: event_create_object

function event_create_object($event, $type, \ElggObject $object)
{
    if (!is_on_probation($object->getOwnerEntity())) {
        return true;
    }
    $object->{QUARANTINED} = '1';
    if (elgg_get_plugin_setting(QUARANTINE_PRIVATE, PLUGIN_ID)) {
        system_message(elgg_echo('probation:moderated:private'));
    } else {
        system_message(elgg_echo('probation:moderated'));
    }
    State::$entities_quarantined[$object->guid] = $object;
}
开发者ID:Elgg,项目名称:probation,代码行数:13,代码来源:events.php


示例20: white_list_admin

function white_list_admin($hook, $type, $value, $params)
{
    $pluginId = get_input('plugin_id');
    if ($pluginId != 'white_list') {
        return $value;
    }
    $company_emails = get_input('company_email');
    $company_emails = string_to_tag_array($company_emails);
    $site = elgg_get_site_entity();
    $site->company_emails = $company_emails;
    system_message(elgg_echo("filters:save:success"));
    forward(REFERER);
}
开发者ID:elainenaomi,项目名称:labxp2014,代码行数:13,代码来源:start.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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