本文整理汇总了PHP中error_box函数的典型用法代码示例。如果您正苦于以下问题:PHP error_box函数的具体用法?PHP error_box怎么用?PHP error_box使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了error_box函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: sq_get_attach_tempfile
/**
* Get a new file to write an attachment to.
* This function makes sure it doesn't overwrite other attachments,
* preventing collisions and race conditions.
*
* @return filename of the tempfile only (not full path)
* @since 1.5.2
*/
function sq_get_attach_tempfile()
{
global $username, $attachment_dir;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
// using PHP >= 4.3.2 we can be truly atomic here
$filemods = check_php_version(4, 3, 2) ? 'x' : 'w';
// give up after 1000 tries
$TMP_MAX = 1000;
for ($try = 0; $try < $TMP_MAX; ++$try) {
$localfilename = GenerateRandomString(32, '', 7);
$full_localfilename = "{$hashed_attachment_dir}/{$localfilename}";
// filename collision. try again
if (file_exists($full_localfilename)) {
continue;
}
// try to open for (binary) writing
$fp = @fopen($full_localfilename, $filemods);
if ($fp !== FALSE) {
// success! make sure it's not readable, close and return filename
chmod($full_localfilename, 0600);
fclose($fp);
return $localfilename;
}
}
// we tried 1000 times but didn't succeed.
error_box(_("Could not open temporary file to store attachment. Contact your system administrator to resolve this issue."));
return FALSE;
}
开发者ID:teammember8,项目名称:roundcube,代码行数:36,代码来源:compose.php
示例2: cpw_template_init
/**
* Use this function to do any backend-specific initialization,
* e.g. checking requirements, before the password change form
* is displayed to the user.
*/
function cpw_template_init()
{
global $oTemplate;
// plugin is not configured. Handle error gracefully.
error_box(_("No valid backend defined."));
// close html and stop script execution
$oTemplate->display('footer.tpl');
exit;
}
开发者ID:teammember8,项目名称:roundcube,代码行数:14,代码来源:template.php
示例3: folders_checkname
/**
* Helper function for the functions below; checks if the user entered
* folder name is valid according to the IMAP standard. If not, it
* bails out with an error and cleanly terminates the IMAP connection.
*/
function folders_checkname($imapConnection, $folder_name, $delimiter)
{
if (substr_count($folder_name, '"') || substr_count($folder_name, "\\") || substr_count($folder_name, $delimiter) || $folder_name == '') {
global $color, $oTemplate;
error_box(_("Illegal folder name.") . "<br />\n" . sprintf(_("The name may not contain any of the following: %s"), '<tt>" \\ ' . $delimiter . '</tt>') . "<br />\n" . _("Please select a different name.") . '<br /><a href="folders.php">' . _("Click here to go back") . '</a>.');
sqimap_logout($imapConnection);
$oTemplate->display('footer.tpl');
exit;
}
}
开发者ID:teammember8,项目名称:roundcube,代码行数:15,代码来源:folder_manip.php
示例4: cpw_merak_init
/**
* Check if php install has all required extensions.
*/
function cpw_merak_init()
{
global $oTemplate;
if (!function_exists('curl_init')) {
// user_error('Curl module NOT available!', E_USER_ERROR);
error_box(_("PHP Curl extension is NOT available! Unable to change password!"));
// close html and stop script execution
$oTemplate->display('footer.tpl');
exit;
}
}
开发者ID:teammember8,项目名称:roundcube,代码行数:14,代码来源:merak.php
示例5: translate_read_form_function
/**
* Shows translation box in message display window
* @access private
*/
function translate_read_form_function()
{
global $color, $translate_server;
global $message, $translate_dir;
global $translate_show_read;
global $imapConnection, $wrap_at, $passed_id, $mailbox;
global $translate_gpltrans_url;
global $translate_babelfish_enabled, $translate_go_enabled, $translate_dictionary_enabled, $translate_google_enabled, $translate_gpltrans_enabled, $translate_intertran_enabled, $translate_promt_enabled, $translate_otenet_enabled;
global $translate_custom_enabled;
if (!$translate_show_read) {
return;
}
$translate_server_option = 'translate_' . $translate_server . '_enabled';
if ($translate_server == 'gpltrans' && $translate_gpltrans_url == '' || !${$translate_server_option} || !function_exists('translate_form_' . $translate_server)) {
error_box(_("Selected translation engine is disabled. Please update your translation preferences."));
return;
}
$translate_dir = 'to';
$trans_ar = $message->findDisplayEntity(array(), array('text/plain'));
$body = '';
$final_body = '';
if (!empty($trans_ar[0])) {
for ($i = 0; $i < count($trans_ar); $i++) {
/* reduced version of formatBody and translateText functions */
// get message entity information
$body_message = getEntity($message, $trans_ar[$i]);
// get message body
$body = mime_fetch_body($imapConnection, $passed_id, $trans_ar[$i]);
// convert encoded messages
$body = decodeBody($body, $body_message->header->encoding);
/*
* if message part is html formated - convert spaces, html line feeds,
* less than and greater than html entities and remove tags
*/
if ($body_message->header->type1 == 'html') {
$entity_conv = array(' ' => ' ', '<p>' => "\n", '<P>' => "\n", '<br>' => "\n", '<BR>' => "\n", '<br />' => "\n", '<BR />' => "\n", '>' => '>', '<' => '<');
$body = strtr($body, $entity_conv);
$body = strip_tags($body);
}
// remove whitespace
$body = trim($body);
// save processed text and parse other entity
$final_body .= charset_decode($body_message->header->getParameter('charset'), $body);
}
// add form if message is not empty
if (!empty($final_body)) {
$function = 'translate_form_' . $translate_server;
$function($final_body);
}
}
}
开发者ID:teammember8,项目名称:roundcube,代码行数:55,代码来源:functions.php
示例6: sqimap_asearch_error_box
function sqimap_asearch_error_box($response, $query, $message, $link = '')
{
global $color;
// Error message titles according to imap server returned code
$imap_error_titles = array('OK' => '', 'NO' => _("ERROR : Could not complete request."), 'BAD' => _("ERROR : Bad or malformed request."), 'BYE' => _("ERROR : Imap server closed the connection."), '' => _("ERROR : Connection dropped by imap-server."));
if (!array_key_exists($response, $imap_error_titles)) {
$title = _("ERROR : Unknown imap response.");
} else {
$title = $imap_error_titles[$response];
}
if ($link == '') {
$message_title = _("Reason Given: ");
} else {
$message_title = _("Possible reason : ");
}
if (function_exists('sqimap_error_box')) {
sqimap_error_box($title, $query, $message_title, $message, $link);
} else {
//Straight copy of 1.5 imap_general.php:sqimap_error_box(). Can be removed at a later time
global $color;
require_once SM_PATH . 'functions/display_messages.php';
$string = "<font color=\"{$color['2']}\"><b>\n" . $title . "</b><br />\n";
if ($query != '') {
$string .= _("Query:") . ' ' . htmlspecialchars($query) . '<br />';
}
if ($message_title != '') {
$string .= $message_title;
}
if ($message != '') {
$string .= htmlspecialchars($message);
}
if ($link != '') {
$string .= $link;
}
$string .= "</font><br />\n";
error_box($string, $color);
}
}
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:38,代码来源:imap_asearch.php
示例7: define
* @copyright (c) 1999-2004 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: printer_friendly_main.php,v 1.20 2004/10/02 17:21:32 jervfors Exp $
* @package squirrelmail
*/
/**
* Path for SquirrelMail required files.
* @ignore
*/
define('SM_PATH', '../');
/* SquirrelMail required files. */
require_once SM_PATH . 'include/validate.php';
/* get those globals into gear */
global $color;
if (!sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET)) {
$passed_ent_id = 0;
}
if (!sqgetGlobalVar('mailbox', $mailbox, SQ_GET) || !sqgetGlobalVar('passed_id', $passed_id, SQ_GET)) {
error_box(_("Invalid URL"), $color);
} else {
$passed_id = (int) $passed_id;
/* end globals */
displayHtmlHeader(_("Printer Friendly"), '', false, true);
echo '<frameset rows="60, *">' . "\n";
echo '<frame src="printer_friendly_top.php" name="top_frame" ' . 'scrolling="no" noresize="noresize" frameborder="0" />' . "\n";
echo '<frame src="printer_friendly_bottom.php?passed_ent_id=' . urlencode($passed_ent_id) . '&mailbox=' . urlencode($mailbox) . '&passed_id=' . $passed_id . '" name="bottom_frame" frameborder="0" />' . "\n";
echo "</frameset>\n";
}
?>
</html>
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:30,代码来源:printer_friendly_main.php
示例8: plain_error_message
function plain_error_message($message, $color)
{
error_box($message, $color);
}
开发者ID:innomatic-libs,项目名称:squirrelmaillib,代码行数:4,代码来源:display_messages.php
示例9: getHashedDir
/**
* Helper function for getHashedFile, given a username returns the hashed
* dir for that username.
*
* @param string username the username of the current user
* @param string dir the SquirrelMail datadir
* @param string hash_dirs default ''
* @return the path to the hash dir for username
* @since 1.2.0
*/
function getHashedDir($username, $dir, $hash_dirs = '')
{
global $dir_hash_level;
/* Remove trailing slash from $dir if found */
if (substr($dir, -1) == '/') {
$dir = substr($dir, 0, strlen($dir) - 1);
}
/* If necessary, populate the hash dir variable. */
if ($hash_dirs == '') {
$hash_dirs = computeHashDirs($username);
}
/* Make sure the full hash directory exists. */
$real_hash_dir = $dir;
for ($h = 0; $h < $dir_hash_level; ++$h) {
$real_hash_dir .= '/' . $hash_dirs[$h];
if (!@is_dir($real_hash_dir)) {
//FIXME: When safe_mode is turned on, the error suppression below makes debugging safe_mode UID/GID restrictions tricky... for now, I will add a check in configtest
if (!@mkdir($real_hash_dir, 0770)) {
error_box(sprintf(_("Error creating directory %s."), $real_hash_dir) . "\n" . _("Could not create hashed directory structure!") . "\n" . _("Please contact your system administrator and report this error."));
exit;
}
}
}
/* And return that directory. */
return $real_hash_dir;
}
开发者ID:teammember8,项目名称:roundcube,代码行数:36,代码来源:prefs.php
示例10: addressbook_init
//.........这里部分代码省略.........
$abook = new AddressBook();
/* Create empty error message */
$abook_init_error = '';
/*
Always add a local backend. We use *either* file-based *or* a
database addressbook. If $addrbook_dsn is set, the database
backend is used. If not, addressbooks are stores in files.
*/
if (isset($addrbook_dsn) && !empty($addrbook_dsn)) {
/* Database */
if (!isset($addrbook_table) || empty($addrbook_table)) {
$addrbook_table = 'address';
}
$r = $abook->add_backend('database', array('dsn' => $addrbook_dsn, 'owner' => $username, 'table' => $addrbook_table));
if (!$r && $showerr) {
$abook_init_error .= _("Error initializing address book database.") . ' ' . $abook->error;
}
} else {
/* File */
$filename = getHashedFile($username, $data_dir, "{$username}.abook");
$r = $abook->add_backend('local_file', array('filename' => $filename, 'line_length' => $abook_file_line_length, 'create' => true));
if (!$r && $showerr) {
$abook_init_error .= sprintf(_("Error opening file %s"), $filename);
}
}
/* This would be for the global addressbook */
if (isset($abook_global_file) && isset($abook_global_file_writeable) && trim($abook_global_file) != '') {
// Detect place of address book
if (!preg_match("/[\\/\\\\]/", $abook_global_file)) {
/* no path chars, address book stored in data directory
* make sure that there is a slash between data directory
* and address book file name
*/
$abook_global_filename = $data_dir . (substr($data_dir, -1) != '/' ? '/' : '') . $abook_global_file;
} elseif (preg_match("/^\\/|\\w:/", $abook_global_file)) {
// full path is set in options (starts with slash or x:)
$abook_global_filename = $abook_global_file;
} else {
$abook_global_filename = SM_PATH . $abook_global_file;
}
$r = $abook->add_backend('local_file', array('filename' => $abook_global_filename, 'name' => _("Global address book"), 'detect_writeable' => false, 'line_length' => $abook_file_line_length, 'writeable' => $abook_global_file_writeable, 'listing' => $abook_global_file_listing));
if (!$r && $showerr) {
if ($abook_init_error != '') {
$abook_init_error .= "\n";
}
$abook_init_error .= _("Error initializing global address book.") . "\n" . $abook->error;
}
}
/* Load global addressbook from SQL if configured */
if (isset($addrbook_global_dsn) && !empty($addrbook_global_dsn)) {
/* Database configured */
if (!isset($addrbook_global_table) || empty($addrbook_global_table)) {
$addrbook_global_table = 'global_abook';
}
$r = $abook->add_backend('database', array('dsn' => $addrbook_global_dsn, 'owner' => 'global', 'name' => _("Global address book"), 'writeable' => $addrbook_global_writeable, 'listing' => $addrbook_global_listing, 'table' => $addrbook_global_table));
if (!$r && $showerr) {
if ($abook_init_error != '') {
$abook_init_error .= "\n";
}
$abook_init_error .= _("Error initializing global address book.") . "\n" . $abook->error;
}
}
/*
* hook allows to include different address book backends.
* plugins should extract $abook and $r from arguments
* and use same add_backend commands as above functions.
* @since 1.5.1 and 1.4.5
*/
$hookReturn = do_hook('abook_init', $abook, $r);
$abook = $hookReturn[1];
$r = $hookReturn[2];
if (!$onlylocal) {
/* Load configured LDAP servers (if PHP has LDAP support) */
if (isset($ldap_server) && is_array($ldap_server) && function_exists('ldap_connect')) {
reset($ldap_server);
while (list($undef, $param) = each($ldap_server)) {
if (is_array($param)) {
$r = $abook->add_backend('ldap_server', $param);
if (!$r && $showerr) {
if ($abook_init_error != '') {
$abook_init_error .= "\n";
}
$abook_init_error .= sprintf(_("Error initializing LDAP server %s:") . "\n", $param['host']);
$abook_init_error .= $abook->error;
}
}
}
}
}
// end of remote abook backends init
/**
* display address book init errors.
*/
if ($abook_init_error != '' && $showerr) {
$abook_init_error = htmlspecialchars($abook_init_error);
error_box($abook_init_error, $color);
}
/* Return the initialized object */
return $abook;
}
开发者ID:jin255ff,项目名称:company_website,代码行数:101,代码来源:addressbook.php
示例11: sqgetGlobalVar
sqgetGlobalVar('send_to', $send_to, SQ_GET);
sqgetGlobalVar('subject', $subject, SQ_GET);
sqgetGlobalVar('body', $body, SQ_GET);
sqgetGlobalVar('action', $action, SQ_GET);
switch ($action) {
case 'help':
$out_string = _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below.");
break;
case 'subscribe':
$out_string = _("This will send a message to %s requesting that you will be subscribed to this list. You will be subscribed with the address below.");
break;
case 'unsubscribe':
$out_string = _("This will send a message to %s requesting that you will be unsubscribed from this list. It will try to unsubscribe the adress below.");
break;
default:
error_box(sprintf(_("Unknown action: %s"), htmlspecialchars($action)), $color);
exit;
}
echo html_tag('p', '', 'left') . html_tag('table', '', 'center', $color[0], 'border="0" width="75%"') . "\n" . html_tag('tr', html_tag('th', _("Mailinglist") . ' ' . _($action), '', $color[9])) . html_tag('tr') . html_tag('td', '', 'left');
printf($out_string, htmlspecialchars($send_to));
echo '<form method="post" action="../../src/compose.php">';
$idents = get_identities();
echo html_tag('p', '', 'center') . _("From:") . ' ';
if (count($idents) > 1) {
echo '<select name="identity">';
foreach ($idents as $nr => $data) {
echo '<option value="' . $nr . '">' . htmlspecialchars($data['full_name'] . ' <' . $data['email_address'] . ">\n");
}
echo '</select>' . "\n";
} else {
echo htmlspecialchars('"' . $idents[0]['full_name'] . '" <' . $idents[0]['email_address'] . '>');
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:mailout.php
示例12: _
* Update/modify address *
***********************************************/
if (!empty($editaddr)) {
/* Stage one: Copy data into form */
if (isset($sel) && sizeof($sel) > 0) {
if (sizeof($sel) > 1) {
$formerror = _("You can only edit one address at the time");
$showaddrlist = true;
$defselected = $sel;
} else {
$abortform = true;
list($ebackend, $enick) = explode('_', current($sel), 2);
$olddata = $abook->lookup($enick, $ebackend);
// Test if $olddata really contains anything and return an error message if it doesn't
if (!$olddata) {
error_box(nl2br(sm_encode_html_special_chars($abook->error)));
} else {
/* Display the "new address" form */
echo abook_create_form($form_url, 'editaddr', _("Update address"), _("Update address"), $current_backend, $olddata);
echo addHidden('oldnick', $olddata['nickname']) . addHidden('backend', $olddata['backend']) . addHidden('doedit', '1') . '</form>';
}
}
} elseif ($doedit == 1) {
/* Stage two: Write new data */
$newdata = $editaddr;
$r = $abook->modify($oldnick, $newdata, $backend);
/* Handle error messages */
if (!$r) {
/* Display error */
plain_error_message(nl2br(sm_encode_html_special_chars($abook->error)));
/* Display the "new address" form again */
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:addressbook.php
示例13: set_up_language
$nbsp = $oTemplate->fetch('non_breaking_space.tpl');
$br = $oTemplate->fetch('line_break.tpl');
/**
* Set up the language.
*
* This code block corresponds to the *default* block of the switch
* statement above, but the language cannot be set up until after the
* template is instantiated, so we set $set_up_langage_after_template_setup
* above and do the linguistic stuff now.
*/
if ($set_up_langage_after_template_setup) {
$err = set_up_language(getPref($data_dir, $username, 'language'));
// Japanese translation used without mbstring support
if ($err == 2) {
$sError = "<p>Your administrator needs to have PHP installed with the multibyte string extension enabled (using configure option --enable-mbstring).</p>\n" . "<p>This system has assumed that you accidently switched to Japanese and has reverted your language preference to English.</p>\n" . "<p>Please refresh this page in order to continue using your webmail.</p>\n";
error_box($sError);
}
}
/**
* Initialize our custom error handler object
*/
$oErrorHandler = new ErrorHandler($oTemplate, 'error_message.tpl');
/**
* Activate custom error handling
*/
if (version_compare(PHP_VERSION, "4.3.0", ">=")) {
$oldErrorHandler = set_error_handler(array($oErrorHandler, 'SquirrelMailErrorhandler'));
} else {
$oldErrorHandler = set_error_handler('SquirrelMailErrorhandler');
}
// ============================================================================
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:init.php
示例14: sqimap_mailbox_select
/**
* Selects a mailbox
*/
function sqimap_mailbox_select($imap_stream, $mailbox)
{
global $auto_expunge;
if (empty($mailbox)) {
return;
}
/**
* Default UW IMAP server configuration allows to access other files
* on server. $imap_server_type is not checked because interface can
* be used with 'other' or any other server type setting. $mailbox
* variable can be modified in any script that uses variable from GET
* or POST. This code blocks all standard SquirrelMail IMAP API requests
* that use mailbox with full path (/etc/passwd) or with ../ characters
* in path (../../etc/passwd)
*/
if (strstr($mailbox, '../') || substr($mailbox, 0, 1) == '/') {
global $color;
include_once SM_PATH . 'functions/display_messages.php';
error_box(sprintf(_("Invalid mailbox name: %s"), htmlspecialchars($mailbox)), $color);
sqimap_logout($imap_stream);
die('</body></html>');
}
// cleanup $mailbox in order to prevent IMAP injection attacks
$mailbox = str_replace(array("\r", "\n"), array("", ""), $mailbox);
$read = sqimap_run_command($imap_stream, "SELECT \"{$mailbox}\"", true, $response, $message);
$result = array();
for ($i = 0, $cnt = count($read); $i < $cnt; $i++) {
if (preg_match('/^\\*\\s+OK\\s\\[(\\w+)\\s(\\w+)\\]/', $read[$i], $regs)) {
$result[strtoupper($regs[1])] = $regs[2];
} else {
if (preg_match('/^\\*\\s([0-9]+)\\s(\\w+)/', $read[$i], $regs)) {
$result[strtoupper($regs[2])] = $regs[1];
} else {
if (preg_match("/PERMANENTFLAGS(.*)/i", $read[$i], $regs)) {
$regs[1] = trim(preg_replace(array("/\\(/", "/\\)/", "/\\]/"), '', $regs[1]));
$result['PERMANENTFLAGS'] = $regs[1];
} else {
if (preg_match("/FLAGS(.*)/i", $read[$i], $regs)) {
$regs[1] = trim(preg_replace(array("/\\(/", "/\\)/"), '', $regs[1]));
$result['FLAGS'] = $regs[1];
}
}
}
}
}
if (preg_match('/^\\[(.+)\\]/', $message, $regs)) {
$result['RIGHTS'] = $regs[1];
}
if ($auto_expunge) {
$tmp = sqimap_run_command($imap_stream, 'EXPUNGE', false, $a, $b);
}
return $result;
}
开发者ID:jprice,项目名称:EHCP,代码行数:56,代码来源:imap_mailbox.php
示例15: sqspell_ckMOD
* @subpackage squirrelspell
*/
/**
* Include the SquirrelMail initialization file.
*/
require '../../include/init.php';
/**
* Set a couple of constants and defaults. Don't change these,
* the configurable stuff is in sqspell_config.php
* @todo do we really need $SQSPELL_DIR var?
*/
$SQSPELL_DIR = 'plugins/squirrelspell/';
$SQSPELL_CRYPTO = FALSE;
include_once SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php';
/**
* $MOD is the name of the module to invoke.
* If $MOD is unspecified, assign "options_main" to it. Else check for
* security breach attempts.
*/
if (!sqgetGlobalVar('MOD', $MOD, SQ_FORM)) {
$MOD = 'options_main';
}
sqspell_ckMOD($MOD);
/* Load the stuff already. */
if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/{$MOD}.mod")) {
require_once SM_PATH . $SQSPELL_DIR . "modules/{$MOD}.mod";
} else {
error_box(_("Invalid SquirrelSpell module."));
// display footer (closes html tags)
$oTemplate->display('footer.tpl');
}
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:sqspell_options.php
示例16: list_addr
/**
* List all addresses
* @return array list of all addresses
*/
function list_addr()
{
// check if listing is not disabled
if (isset($this->listing) && !$this->listing) {
return array();
}
$res = array();
$this->open();
@rewind($this->filehandle);
while ($row = @fgetcsv($this->filehandle, $this->line_length, '|')) {
if (count($row) < 5) {
/** address book is corrupted. */
global $color;
error_box(_("Address book is corrupted. Required fields are missing."), $color);
die('</body></html>');
} else {
array_push($res, array('nickname' => $row[0], 'name' => $row[1] . ' ' . $row[2], 'firstname' => $row[1], 'lastname' => $row[2], 'email' => $row[3], 'label' => $row[4], 'backend' => $this->bnum, 'source' => &$this->sname));
}
}
return $res;
}
开发者ID:jin255ff,项目名称:company_website,代码行数:25,代码来源:abook_local_file.php
示例17: define
* @package squirrelmail
* @subpackage prefs
* @since 1.1.3
*/
/** This is the options_identities page */
define('PAGE_NAME', 'options_identities');
/**
* Include the SquirrelMail initialization file.
*/
require '../include/init.php';
/* SquirrelMail required files. */
require_once SM_PATH . 'functions/identity.php';
require_once SM_PATH . 'functions/forms.php';
/* make sure that page is not available when $edit_identity is false */
if (!$edit_identity) {
error_box(_("Editing identities is disabled."));
$oTemplate->display('footer.tpl');
die;
}
if (!sqgetGlobalVar('identities', $identities, SQ_SESSION)) {
$identities = get_identities();
}
sqgetGlobalVar('newidentities', $newidentities, SQ_POST);
sqgetGlobalVar('smaction', $smaction, SQ_POST);
sqgetGlobalVar('return', $return, SQ_POST);
sqgetGlobalVar('smtoken', $submitted_token, SQ_POST, '');
// First lets see if there are any actions to perform //
if (!empty($smaction) && is_array($smaction)) {
// first do a security check
sm_validate_security_token($submitted_token, -1, TRUE);
$doaction = '';
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:options_identities.php
示例18: cpw_peardb_init
/**
* Checks if configuration is correct
*/
function cpw_peardb_init()
{
global $oTemplate, $cpw_peardb_detect, $cpw_peardb_dsn, $cpw_peardb_table;
if (!$cpw_peardb_detect) {
error_box(_("Plugin is unable to use PHP Pear DB libraries. PHP Pear includes must be available in your PHP include_path setting."));
$oTemplate->display('footer.tpl');
exit;
}
// Test required settings
if (is_string($cpw_peardb_dsn) && trim($cpw_peardb_dsn) == '' || trim($cpw_peardb_table) == '') {
error_box(_("Required change password backend configuration options are missing."));
$oTemplate->display('footer.tpl');
exit;
}
}
开发者ID:teammember8,项目名称:roundcube,代码行数:18,代码来源:peardb.php
示例19: define
* @since 1.1.3
*/
/** Unknown database */
define('SMDB_UNKNOWN', 0);
/** MySQL */
define('SMDB_MYSQL', 1);
/** PostgreSQL */
define('SMDB_PGSQL', 2);
require_once SM_PATH . 'config/config.php';
if (!(include_once 'DB.php')) {
// same error also in abook_database.php
require_once SM_PATH . 'functions/display_messages.php';
$error = _("Could not include PEAR database functions required for the database backend.") . "<br />\n";
$error .= sprintf(_("Is PEAR installed, and is the include path set correctly to find %s?"), '<tt>DB.php</tt>') . "<br />\n";
$error .= _("Please contact your system administrator and report this error.");
error_box($error, $color);
exit;
}
global $prefs_are_cached, $prefs_cache;
/**
* @ignore
*/
function cachePrefValues($username)
{
global $prefs_are_cached, $prefs_cache;
sqgetGlobalVar('prefs_are_cached', $prefs_are_cached, SQ_SESSION);
if ($prefs_are_cached) {
sqgetGlobalVar('prefs_cache', $prefs_cache, SQ_SESSION);
return;
}
sqsession_unregister('prefs_cache');
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:db_prefs.php
示例20: sqimap_append_checkresponse
function sqimap_append_checkresponse($response, $folder)
{
if (preg_match("/(.*)(BAD|NO)(.*)\$/", $response, $regs)) {
global $squirrelmail_language, $color;
set_up_language($squirrelmail_language);
require_once SM_PATH . 'functions/display_messages.php';
$reason = $regs[3];
if ($regs[2] == 'NO') {
$string = "<b><font color=\"{$color['2']}\">\n" . _("ERROR: Could not append message to") . " {$folder}." . "</b><br />\n" . _("Server responded:") . ' ' . $reason . "<br />\n";
if (preg_match("/(.*)(quota)(.*)\$/i", $reason, $regs)) {
$string .= _("Solution:") . ' ' . _("Remove unneccessary messages from your folders. Start with your Trash folder.") . "<br />\n";
}
$string .= "</font>\n";
error_box($string, $color);
} else {
$string = "<b><font color=\"{$color['2']}\">\n" . _("ERROR: Bad or malformed request.") . "</b><br />\n" . _("Server responded:") . ' ' . $reason . "</font><br />\n";
error_box($string, $color);
exit;
}
}
}
开发者ID:tavo1981,项目名称:phpbar,代码行数:21,代码来源:imap_general.php
注:本文中的error_box函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论