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


PHP MessageManager::addError方法代码示例

本文整理汇总了PHP中MessageManager::addError方法的典型用法代码示例。如果您正苦于以下问题:PHP MessageManager::addError方法的具体用法?PHP MessageManager::addError怎么用?PHP MessageManager::addError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MessageManager的用法示例。


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

示例1: getAdminByName

 /**
  * Get admin object by (account-)name.
  * @param $username account name
  * @return array admin object or null
  */
 public function getAdminByName($username)
 {
     if (file_exists($this->filepath_admins)) {
         $fd = fopen($this->filepath_admins, 'r') or MessageManager::addError('could not open ' . self::$filename_admins . ' file');
         while ($line = fgets($fd)) {
             $admin = $this->createAdminFromString($line);
             if ($admin['name'] == $username) {
                 fclose($fd);
                 return $admin;
             }
         }
     }
     return null;
 }
开发者ID:nicolasjoly,项目名称:MumPI,代码行数:19,代码来源:DBManager.php

示例2: tr

                break;
            case -1:
                MessageManager::addWarning(tr('login_wronglogininformation'));
                break;
            default:
                // login success
                $_SESSION['serverid'] = $_POST['serverid'];
                $_SESSION['userid'] = $tmpUid;
                $_SESSION['userLoggedIn'] = true;
                echo '<script type="text/javascript">location.replace("?page=profile")</script>';
                echo tr('login_success');
                break;
        }
    } else {
        // missing mandatory data
        MessageManager::addError(tr('login_missing_data'));
    }
} else {
    // no login-action, thus show login form
    ?>

		<div id="content">
			<h1><?php 
    echo tr('login_head');
    ?>
</h1>
			<form action="./?page=login&amp;action=dologin" method="post" style="width:400px;">
				<table class="fullwidth">
					<tr>
						<td class="formitemname"><?php 
    echo tr('server');
开发者ID:nicolasjoly,项目名称:MumPI,代码行数:31,代码来源:login.template.php

示例3: updateUserTexture

 function updateUserTexture($srvid, $uid, $newTexture)
 {
     try {
         if (is_string($newTexture)) {
             // conversation string -> byte array (PHP5)
             $newTexture = str_split($newTexture);
         }
         $this->getServer($srvid)->setTexture($uid, $newTexture);
         return true;
     } catch (Murmur_InvalidTextureException $exc) {
         MessageManager::addError(tr('error_invalidTexture'));
         return false;
     }
 }
开发者ID:nicolasjoly,项目名称:MumPI,代码行数:14,代码来源:ServerInterface.php

示例4: error_reporting

require_once MUMPHPI_MAINDIR . '/classes/Logger.php';
require_once MUMPHPI_MAINDIR . '/classes/SessionManager.php';
SessionManager::startSession();
require_once MUMPHPI_MAINDIR . '/classes/TranslationManager.php';
require_once MUMPHPI_MAINDIR . '/classes/ServerInterface.php';
require_once MUMPHPI_MAINDIR . '/classes/HelperFunctions.php';
require_once MUMPHPI_MAINDIR . '/classes/TemplateManager.php';
require_once MUMPHPI_MAINDIR . '/classes/ServerViewer.php';
if (SettingsManager::getInstance()->isDebugMode()) {
    error_reporting(E_ALL);
}
// Check for running Ice with Murmur
try {
    ServerInterface::getInstance();
} catch (Ice_UnknownLocalException $ex) {
    MessageManager::addError(tr('error_noIce'));
    MessageManager::echoAll();
    exit;
}
if (isset($_GET['ajax'])) {
    require_once MUMPHPI_MAINDIR . '/ajax/' . MUMPHPI_SECTION . '.ajax.php';
    if (is_callable('Ajax_' . MUMPHPI_SECTION . '::' . $_GET['ajax'])) {
        eval('Ajax_' . MUMPHPI_SECTION . '::' . $_GET['ajax'] . '();');
    }
    MessageManager::echoAll();
    exit;
}
$serverId = isset($_GET['serverId']) ? intval($_GET['serverId']) : 1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
开发者ID:Cierce,项目名称:seventh-root.com,代码行数:31,代码来源:index.php

示例5: meta_server_information_update

 public static function meta_server_information_update()
 {
     $serverId = isset($_POST['serverid']) ? intval($_POST['serverid']) : null;
     // user has rights?
     if (PermissionManager::getInstance()->serverCanEditConf($serverId)) {
         if ($serverId != null && isset($_POST['name']) && isset($_POST['allowlogin']) && isset($_POST['allowregistration']) && isset($_POST['forcemail']) && isset($_POST['authbymail'])) {
             $serverId = intval($_POST['serverid']);
             $name = $_POST['name'];
             $allowLogin = $_POST['allowlogin'];
             $allowRegistration = $_POST['allowregistration'];
             $forcemail = $_POST['forcemail'];
             $authByMail = $_POST['authbymail'];
             SettingsManager::getInstance()->setServerInformation($serverId, $name, $allowLogin, $allowRegistration, $forcemail, $authByMail);
         } else {
             MessageManager::addError(TranslationManager::getInstance()->getText('error_missing_values'));
         }
     } else {
         MessageManager::addError('You don’t have permission to do this.');
     }
 }
开发者ID:nicolasjoly,项目名称:MumPI,代码行数:20,代码来源:admin.ajax.php


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