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


PHP sqGetGlobalVar函数代码示例

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


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

示例1: refresh

 /**
  * Refresh values from the session
  */
 function refresh()
 {
     $this->wasSet = sqGetGlobalVar($this->name, $new_value, SQ_SESSION);
     if (!$this->wasSet) {
         return;
     }
     if ($new_value == NULL || $new_value == '') {
         $this->wasValid = $this->set(NULL, FALSE);
         return;
     }
     if ($this->base64) {
         $new_value = unserialize(base64_decode($new_value));
     }
     $this->wasValid = $this->set($new_value, FALSE);
 }
开发者ID:teammember8,项目名称:roundcube,代码行数:18,代码来源:input.session.php

示例2: input_checkbox

 /**
  * Constructs a new checkbox object.
  *
  * @param string name The name of the checkbox.
  * @param bool checked The initial checkbox state.
  * @param string caption The caption to display by the checkbox.
  */
 function input_checkbox($name, &$form, $checked = FALSE, $caption = NULL)
 {
     $this->caption = $caption;
     $this->name = $name;
     $this->regex = NULL;
     $this->required = FALSE;
     $this->default = $checked;
     $this->wasSet = FALSE;
     $this->wasValid = FALSE;
     $this->default = $checked;
     if ($form->submitted()) {
         $this->wasSet = TRUE;
         $this->wasValid = TRUE;
         $this->checked = sqGetGlobalVar($name, $new_value, SQ_FORM);
     } else {
         $this->set($checked);
     }
     $this->value = $this->checked;
 }
开发者ID:teammember8,项目名称:roundcube,代码行数:26,代码来源:input.checkbox.php

示例3: input_textarea

 /**
  * Constructs a new textarea object.
  *
  * @param string name The name of the textarea.
  * @param string regex The validation regular expression.
  * @param string value The initial contents value.
  * @param string caption The caption to display by the textarea.
  */
 function input_textarea($name, $regex = NULL, $value = NULL, $caption = NULL, $maxlength = FALSE)
 {
     $this->name = $name;
     $this->regex = $regex;
     $this->required = FALSE;
     $this->form = NULL;
     $this->caption = $caption;
     $this->maxlength = $maxlength;
     $this->default = $value;
     if (sqGetGlobalVar($name, $new_value, SQ_FORM)) {
         $this->wasSet = TRUE;
         $this->wasValid = $this->set($new_value);
     }
     // If either it wasn't set, or
     // Value was not null and it wasn't a string..
     // Then set to the default.
     if (!$this->wasSet || $value != NULL && !is_string($value)) {
         $this->value = $value;
     }
 }
开发者ID:teammember8,项目名称:roundcube,代码行数:28,代码来源:input.textarea.php

示例4: checkForJavascript

 function checkForJavascript($reset = FALSE)
 {
     global $data_dir, $username, $javascript_on, $javascript_setting;
     if (!$reset && sqGetGlobalVar('javascript_on', $javascript_on, SQ_SESSION)) {
         return $javascript_on;
     }
     if (($reset || !isset($javascript_setting)) && (sqGetGlobalVar('user_is_logged_in', $user_is_logged_in, SQ_SESSION) && $user_is_logged_in)) {
         $javascript_setting = getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT);
     }
     if (!sqGetGlobalVar('new_js_autodetect_results', $js_autodetect_results) && !sqGetGlobalVar('js_autodetect_results', $js_autodetect_results)) {
         $js_autodetect_results = SMPREF_JS_OFF;
     }
     if ($javascript_setting == SMPREF_JS_AUTODETECT) {
         $javascript_on = $js_autodetect_results;
     } else {
         $javascript_on = $javascript_setting;
     }
     sqsession_register($javascript_on, 'javascript_on');
     return $javascript_on;
 }
开发者ID:jprice,项目名称:EHCP,代码行数:20,代码来源:global.php

示例5: create_css_link

/**
 * Create stylesheet links that will work for multiple browsers
 *
 * @param string  $uri       The URI to the linked stylesheet.
 * @param string  $name      The title of the stylesheet (optional; default empty).
 * @param boolean $alt       Whether or not this is an alternate 
 *                           stylesheet (optional; default TRUE).
 * @param string  $mtype     The target media display type (optional; default "screen").
 *
 * @return string The full text of the stylesheet link.
 *
 */
function create_css_link($uri, $name = '', $alt = TRUE, $mtype = 'screen')
{
    // FIXME: Add closing / to link and meta elements only after
    //        switching to xhtml 1.0 Transitional.
    //        It is not compatible with html 4.01 Transitional
    if (empty($uri)) {
        return '';
    }
    // set to lower case to avoid errors
    //
    sqGetGlobalVar('HTTP_USER_AGENT', $browser_user_agent, SQ_SERVER);
    $browser_user_agent = strtolower($browser_user_agent);
    if (stristr($browser_user_agent, "msie 4")) {
        $browser = 'msie4';
        $dom_browser = false;
        $is_IE = true;
    } elseif (stristr($browser_user_agent, "msie") && stristr($browser_user_agent, 'opera') === FALSE) {
        $browser = 'msie';
        $dom_browser = true;
        $is_IE = true;
    }
    if (strpos($uri, '-ie') !== false and !$is_IE) {
        //not IE, so don't render this sheet
        return;
    }
    if (strpos($uri, 'print') !== false) {
        $mtype = 'print';
    }
    $href = 'href="' . $uri . '" ';
    $media = 'media="' . $mtype . '" ';
    if (empty($name)) {
        $title = '';
        $rel = 'rel="stylesheet" ';
    } else {
        $title = 'title="' . $name . '" ';
        $rel = 'rel="' . ($alt ? 'alternate ' : '') . 'stylesheet" ';
    }
    return '<link ' . $media . $title . $rel . 'type="text/css" ' . $href . " />\n";
}
开发者ID:teammember8,项目名称:roundcube,代码行数:51,代码来源:general_util.php

示例6: define

 *
 * This page tests the decodeHeader function.
 *
 * @copyright &copy; 2006 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id$
 * @package plugins
 * @subpackage test
 */
define('SM_PATH', '../../');
include_once SM_PATH . 'include/validate.php';
include_once SM_PATH . 'functions/mime.php';
global $oTemplate, $color;
displayPageHeader($color, 'none');
$header = array("< &  Ã", '=?iso-8859-1?Q?=3C_&__=C3?=', '=?iso-8859-1?B?PCAmICDD?=', '=?utf-8?Q?=3C_&__=C3=80?=', '=?utf-8?B?PCAmICDDgA==?=');
if (sqGetGlobalVar('lossy', $lossy, SQ_GET)) {
    if ($lossy) {
        $lossy_encoding = true;
    } else {
        if ($default_charset == 'utf-8') {
            $default_charset = 'iso-8859-1';
        }
        $lossy_encoding = false;
    }
}
echo "<strong>decodeHeader() Test:</strong>\n";
if ($default_charset == 'utf-8' || $lossy_encoding) {
    echo '<p><a href="decodeheader.php?lossy=0">Test with lossy_encoding OFF</a></p>';
} else {
    echo '<p><a href="decodeheader.php?lossy=1">Test with lossy_encoding ON</a></p>';
}
开发者ID:jprice,项目名称:EHCP,代码行数:31,代码来源:decodeheader.php

示例7: unset

}
if (!sqGetGlobalVar('event_hour', $event_hour, SQ_POST) || !is_numeric($event_hour)) {
    unset($event_hour);
}
if (!sqGetGlobalVar('event_minute', $event_minute, SQ_POST) || !is_numeric($event_minute)) {
    unset($event_minute);
}
if (!sqGetGlobalVar('event_length', $event_length, SQ_POST) || !is_numeric($event_length)) {
    unset($event_length);
}
if (!sqGetGlobalVar('event_priority', $event_priority, SQ_POST) || !is_numeric($event_priority)) {
    unset($event_priority);
}
sqGetGlobalVar('event_title', $event_title, SQ_POST);
sqGetGlobalVar('event_text', $event_text, SQ_POST);
sqGetGlobalVar('send', $send, SQ_POST);
/* got 'em */
//main form to gather event info
function show_event_form()
{
    global $color, $editor_size, $year, $day, $month, $hour;
    echo "\n<form name=\"eventscreate\" action=\"event_create.php\" method=\"post\">\n" . "      <input type=\"hidden\" name=\"year\" value=\"{$year}\" />\n" . "      <input type=\"hidden\" name=\"month\" value=\"{$month}\" />\n" . "      <input type=\"hidden\" name=\"day\" value=\"{$day}\" />\n" . html_tag('tr') . html_tag('td', _("Start time:"), 'right', $color[4]) . "\n" . html_tag('td', '', 'left', $color[4]) . "\n" . "      <select name=\"event_hour\">\n";
    select_option_hour($hour);
    echo "      </select>\n" . "      &nbsp;:&nbsp;\n" . "      <select name=\"event_minute\">\n";
    select_option_minute("00");
    echo "      </select>\n" . "      </td></tr>\n" . html_tag('tr') . html_tag('td', _("Length:"), 'right', $color[4]) . "\n" . html_tag('td', '', 'left', $color[4]) . "\n" . "      <select name=\"event_length\">\n";
    select_option_length("0");
    echo "      </select>\n" . "      </td></tr>\n" . html_tag('tr') . html_tag('td', _("Priority:"), 'right', $color[4]) . "\n" . html_tag('td', '', 'left', $color[4]) . "\n" . "      <select name=\"event_priority\">\n";
    select_option_priority("0");
    echo "      </select>\n" . "      </td></tr>\n" . html_tag('tr') . html_tag('td', _("Title:"), 'right', $color[4]) . "\n" . html_tag('td', '', 'left', $color[4]) . "\n" . "      <input type=\"text\" name=\"event_title\" value=\"\" size=\"30\" maxlength=\"50\" /><br />\n" . "      </td></tr>\n" . html_tag('tr', html_tag('td', "<textarea name=\"event_text\" rows=\"5\" cols=\"{$editor_size}\"></textarea>", 'left', $color[4], 'colspan="2"')) . "\n" . html_tag('tr', html_tag('td', '<input type="submit" name="send" value="' . _("Set Event") . '" />', 'left', $color[4], 'colspan="2"')) . "\n";
    echo "</form>\n";
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:event_create.php

示例8: save_option

/**
 * Saves the option value (this is the default save function
 * unless overridden by the user)
 *
 * @param object $option object that holds option name and new_value
 */
function save_option($option)
{
    // Can't save the pref if we don't have the username
    //
    if (!sqgetGlobalVar('username', $username, SQ_SESSION)) {
        return;
    }
    // if the widget is a selection list, make sure the new
    // value is actually in the selection list and is not an
    // injection attack
    //
    if ($option->type == SMOPT_TYPE_STRLIST && !array_key_exists($option->new_value, $option->possible_values)) {
        return;
    } else {
        if ($option->type != SMOPT_TYPE_TEXTAREA) {
            $option->new_value = str_replace(array("\r", "\n"), '', $option->new_value);
        }
    }
    global $data_dir;
    // edit lists: first add new elements to list, then
    // remove any selected ones (note that we must add
    // before deleting because the javascript that populates
    // the "add" textbox when selecting items in the list
    // (for deletion))
    //
    if ($option->type == SMOPT_TYPE_EDIT_LIST) {
        if (empty($option->possible_values)) {
            $option->possible_values = array();
        }
        if (!is_array($option->possible_values)) {
            $option->possible_values = array($option->possible_values);
        }
        // add element if given
        //
        if (isset($option->use_add_widget) && $option->use_add_widget && sqGetGlobalVar('add_' . $option->name, $new_element, SQ_POST)) {
            $new_element = trim($new_element);
            if (!empty($new_element) && !in_array($new_element, $option->possible_values)) {
                $option->possible_values[] = $new_element;
            }
        }
        // delete selected elements if needed
        //
        if (isset($option->use_delete_widget) && $option->use_delete_widget && is_array($option->new_value) && sqGetGlobalVar('delete_' . $option->name, $ignore, SQ_POST)) {
            $option->possible_values = array_diff($option->possible_values, $option->new_value);
        }
        // save full list (stored in "possible_values")
        //
        setPref($data_dir, $username, $option->name, serialize($option->possible_values));
        // associative edit lists are handled similar to
        // non-associative ones
        //
    } else {
        if ($option->type == SMOPT_TYPE_EDIT_LIST_ASSOCIATIVE) {
            if (empty($option->possible_values)) {
                $option->possible_values = array();
            }
            if (!is_array($option->possible_values)) {
                $option->possible_values = array($option->possible_values);
            }
            // add element if given
            //
            $new_element_key = '';
            $new_element_value = '';
            $retrieve_key = sqGetGlobalVar('add_' . $option->name . '_key', $new_element_key, SQ_POST);
            $retrieve_value = sqGetGlobalVar('add_' . $option->name . '_value', $new_element_value, SQ_POST);
            if (isset($option->use_add_widget) && $option->use_add_widget && ($retrieve_key || $retrieve_value)) {
                $new_element_key = trim($new_element_key);
                $new_element_value = trim($new_element_value);
                if ($option->poss_value_folders && empty($new_element_key)) {
                    $new_element_value = '';
                }
                if (!empty($new_element_key) || !empty($new_element_value)) {
                    if (empty($new_element_key)) {
                        $new_element_key = '0';
                    }
                    $option->possible_values[$new_element_key] = $new_element_value;
                }
            }
            // delete selected elements if needed
            //
            if (isset($option->use_delete_widget) && $option->use_delete_widget && is_array($option->new_value) && sqGetGlobalVar('delete_' . $option->name, $ignore, SQ_POST)) {
                if ($option->layout_type == SMOPT_EDIT_LIST_LAYOUT_SELECT) {
                    foreach ($option->new_value as $key) {
                        unset($option->possible_values[urldecode($key)]);
                    }
                } else {
                    $option->possible_values = array_diff($option->possible_values, $option->new_value);
                }
            }
            // save full list (stored in "possible_values")
            //
            setPref($data_dir, $username, $option->name, serialize($option->possible_values));
            // Certain option types need to be serialized because
            // they are not scalar
//.........这里部分代码省略.........
开发者ID:teammember8,项目名称:roundcube,代码行数:101,代码来源:options.php

示例9: set_up_language

function set_up_language($sm_language, $do_search = false, $default = false)
{
    static $SetupAlready = 0;
    global $use_gettext, $languages, $squirrelmail_language, $squirrelmail_default_language, $default_charset, $sm_notAlias;
    if ($SetupAlready) {
        return;
    }
    $SetupAlready = TRUE;
    sqgetGlobalVar('HTTP_ACCEPT_LANGUAGE', $accept_lang, SQ_SERVER);
    /**
     * detect preferred language from header when SquirrelMail asks for
     * it or when default language is set to empty string.
     */
    if (($do_search || empty($squirrelmail_default_language)) && !$sm_language && isset($accept_lang)) {
        $sm_language = substr($accept_lang, 0, 2);
    }
    /**
     * Use default language when it is not detected or when script
     * asks to use default language.
     */
    if ((!$sm_language || $default) && !empty($squirrelmail_default_language)) {
        $squirrelmail_language = $squirrelmail_default_language;
        $sm_language = $squirrelmail_default_language;
    }
    /** provide failsafe language when detection fails */
    if (!$sm_language) {
        $sm_language = 'en_US';
    }
    $sm_notAlias = $sm_language;
    /**
     * Catch removed translation
     * System reverts to English translation if user prefs contain translation
     * that is not available in $languages array
     */
    if (!isset($languages[$sm_notAlias])) {
        $sm_notAlias = "en_US";
    }
    while (isset($languages[$sm_notAlias]['ALIAS'])) {
        $sm_notAlias = $languages[$sm_notAlias]['ALIAS'];
    }
    if (isset($sm_language) && $use_gettext && $sm_language != '' && isset($languages[$sm_notAlias]['CHARSET'])) {
        bindtextdomain('squirrelmail', SM_PATH . 'locale/');
        textdomain('squirrelmail');
        if (function_exists('bind_textdomain_codeset')) {
            if ($sm_notAlias == 'ja_JP') {
                bind_textdomain_codeset("squirrelmail", 'EUC-JP');
            } else {
                bind_textdomain_codeset("squirrelmail", $languages[$sm_notAlias]['CHARSET']);
            }
        }
        // Use LOCALE key, if it is set.
        if (isset($languages[$sm_notAlias]['LOCALE'])) {
            $longlocale = $languages[$sm_notAlias]['LOCALE'];
        } else {
            $longlocale = $sm_notAlias;
        }
        // try setting locale
        $retlocale = sq_setlocale(LC_ALL, $longlocale);
        // check if locale is set and assign that locale to $longlocale
        // in order to use it in putenv calls.
        if (!is_bool($retlocale)) {
            $longlocale = $retlocale;
        } elseif (is_array($longlocale)) {
            // setting of all locales failed.
            // we need string instead of array used in LOCALE key.
            $longlocale = $sm_notAlias;
        }
        if (!(bool) ini_get('safe_mode') && getenv('LC_ALL') != $longlocale) {
            putenv("LC_ALL={$longlocale}");
            putenv("LANG={$longlocale}");
            putenv("LANGUAGE={$longlocale}");
            putenv("LC_NUMERIC=C");
            if ($sm_notAlias == 'tr_TR') {
                putenv("LC_CTYPE=C");
            }
        }
        // Workaround for plugins that use numbers with floating point
        // It might be removed if plugins use correct decimal delimiters
        // according to locale settings.
        setlocale(LC_NUMERIC, 'C');
        // Workaround for specific Turkish strtolower/strtoupper rules.
        // Many functions expect English conversion rules.
        if ($sm_notAlias == 'tr_TR') {
            setlocale(LC_CTYPE, 'C');
        }
        $squirrelmail_language = $sm_notAlias;
        if ($squirrelmail_language == 'ja_JP') {
            header('Content-Type: text/html; charset=EUC-JP');
            if (!function_exists('mb_internal_encoding')) {
                // don't display mbstring warning when user isn't logged
                // in because the user may not be using SM for Japanese;
                // also don't display on webmail page so user has the
                // chance to go back and revert their language setting
                // until admin can get their act together
                if (sqGetGlobalVar('user_is_logged_in', $user_is_logged_in, SQ_SESSION) && $user_is_logged_in && PAGE_NAME != 'webmail') {
                    echo _("You need to have PHP installed with the multibyte string function enabled (using configure option --enable-mbstring).");
                    // Revert to English link has to be added.
                    // stop further execution in order not to get php errors on mb_internal_encoding().
                }
                return;
//.........这里部分代码省略.........
开发者ID:jprice,项目名称:EHCP,代码行数:101,代码来源:i18n.php

示例10: unset

    unset($event_priority);
}
sqGetGlobalVar('confirmed', $confirmed, SQ_POST);
if (!sqGetGlobalVar('year', $year, SQ_FORM) || !is_numeric($year)) {
    unset($year);
}
if (!sqGetGlobalVar('month', $month, SQ_FORM) || !is_numeric($month)) {
    unset($month);
}
if (!sqGetGlobalVar('day', $day, SQ_FORM) || !is_numeric($day)) {
    unset($day);
}
if (!sqGetGlobalVar('hour', $hour, SQ_FORM) || !is_numeric($hour)) {
    unset($hour);
}
if (!sqGetGlobalVar('minute', $minute, SQ_FORM) || !is_numeric($minute)) {
    unset($minute);
}
/* got 'em */
/**
 * update event info
 * @return void
 * @access private
 */
function update_event_form()
{
    global $color, $editor_size, $year, $day, $month, $hour, $minute, $calendardata;
    $tmparray = $calendardata["{$month}{$day}{$year}"]["{$hour}{$minute}"];
    $tab = '    ';
    echo "\n<form name=\"eventupdate\" action=\"event_edit.php\" method=\"post\">\n" . $tab . addHidden('year', $year) . $tab . addHidden('month', $month) . $tab . addHidden('day', $day) . $tab . addHidden('hour', $hour) . $tab . addHidden('minute', $minute) . $tab . addHidden('updated', 'yes') . html_tag('tr') . html_tag('td', _("Date:"), 'right', $color[4]) . "\n" . html_tag('td', '', 'left', $color[4]) . "      <select name=\"event_year\">\n";
    select_option_year($year);
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:event_edit.php

示例11: sqgetGlobalVar

sqgetGlobalVar('smtoken', $submitted_token, SQ_POST, '');
sqgetGlobalVar('addaddr', $addaddr, SQ_POST);
sqgetGlobalVar('editaddr', $editaddr, SQ_POST);
sqgetGlobalVar('deladdr', $deladdr, SQ_POST);
sqgetGlobalVar('compose_to', $compose_to, SQ_POST);
sqgetGlobalVar('sel', $sel, SQ_POST);
sqgetGlobalVar('oldnick', $oldnick, SQ_POST);
sqgetGlobalVar('backend', $backend, SQ_POST);
sqgetGlobalVar('doedit', $doedit, SQ_POST);
$page_size = $abook_show_num;
if (!sqGetGlobalVar('page_number', $page_number, SQ_FORM)) {
    if (!sqGetGlobalVar('current_page_number', $page_number, SQ_FORM)) {
        $page_number = 1;
    }
}
if (!sqGetGlobalVar('show_all', $show_all, SQ_FORM)) {
    $show_all = 0;
}
/* Get sorting order */
$abook_sort_order = get_abook_sort();
// Create page header before addressbook_init in order to
// display error messages correctly, unless we might be
// redirecting the browser to the compose page.
//
if (empty($compose_to) || sizeof($sel) < 1) {
    displayPageHeader($color);
}
/* Open addressbook with error messages on.
 remote backends (LDAP) are enabled because they can be used. (list_addr function)
*/
$abook = addressbook_init(true, false);
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:addressbook.php

示例12: header

require_once SM_PATH . 'functions/strings.php';
require_once SM_PATH . 'functions/prefs.php';
require_once SM_PATH . 'functions/imap.php';
require_once SM_PATH . 'functions/plugin.php';
require_once SM_PATH . 'functions/constants.php';
require_once SM_PATH . 'functions/page_header.php';
header('Pragma: no-cache');
$location = get_location();
sqsession_is_active();
sqsession_unregister('user_is_logged_in');
sqsession_register($base_uri, 'base_uri');
/* get globals we me need */
sqGetGlobalVar('login_username', $login_username);
sqGetGlobalVar('secretkey', $secretkey);
sqGetGlobalVar('js_autodetect_results', $js_autodetect_results);
if (!sqGetGlobalVar('squirrelmail_language', $squirrelmail_language) || $squirrelmail_language == '') {
    $squirrelmail_language = $squirrelmail_default_language;
}
if (!sqgetGlobalVar('mailtodata', $mailtodata)) {
    $mailtodata = '';
}
/* end of get globals */
set_up_language($squirrelmail_language, true);
/* Refresh the language cookie. */
sqsetcookie('squirrelmail_language', $squirrelmail_language, time() + 2592000, $base_uri);
if (!isset($login_username)) {
    include_once SM_PATH . 'functions/display_messages.php';
    logout_error(_("You must be logged in to access this page."));
    exit;
}
if (!sqsession_is_registered('user_is_logged_in')) {
开发者ID:jprice,项目名称:EHCP,代码行数:31,代码来源:redirect.php

示例13: define

<?php

/**
 * newmail.php
 *
 * Copyright (c) 1999-2006 The SquirrelMail Project Team
 * Licensed under the GNU GPL. For full terms see the file COPYING.        
 *
 * Displays all options relating to new mail sounds
 *
 * $Id: newmail.php 10633 2006-02-03 22:27:56Z jervfors $
 * @package plugins
 * @subpackage newmail
 */
/** @ignore */
define('SM_PATH', '../../');
/* SquirrelMail required files. */
require_once SM_PATH . 'include/validate.php';
require_once SM_PATH . 'include/load_prefs.php';
require_once SM_PATH . 'functions/page_header.php';
sqGetGlobalVar('numnew', $numnew, SQ_GET);
$numnew = (int) $numnew;
displayHtmlHeader(_("New Mail"), '', FALSE);
echo '<body bgcolor="' . $color[4] . '" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">' . "\n" . '<center>' . "\n" . html_tag('table', "\n" . html_tag('tr', "\n" . html_tag('td', '<b>' . _("SquirrelMail Notice:") . '</b>', 'center', $color[0])) . html_tag('tr', "\n" . html_tag('td', '<br /><big><font color="' . $color[2] . '">' . sprintf($numnew == 1 ? _("You have %s new message") : _("You have %s new messages"), $numnew) . '</font><br /></big><br />' . "\n" . '<form name="nm">' . "\n" . '<input type="button" name="bt" value="' . _("Close Window") . '" onClick="javascript:window.close();" />' . "\n" . '</form>', 'center')), '', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"') . '</center>' . "<script language=javascript>\n" . "<!--\n" . "document.nm.bt.focus();\n" . "-->\n" . "</script>\n" . "</body></html>\n";
开发者ID:jin255ff,项目名称:company_website,代码行数:24,代码来源:newmail.php

示例14: checkForJavascript

/**
 * Javascript support detection function
 * @param boolean $reset recheck javascript support if set to true.
 * @return integer SMPREF_JS_ON or SMPREF_JS_OFF ({@see include/constants.php})
 * @since 1.5.1
 */
function checkForJavascript($reset = FALSE)
{
    global $data_dir, $username, $javascript_on, $javascript_setting;
    if (!$reset && sqGetGlobalVar('javascript_on', $javascript_on, SQ_SESSION)) {
        return $javascript_on;
    }
    //FIXME: this isn't used anywhere else in this function; can we remove it?  why is it here?
    $user_is_logged_in = FALSE;
    if ($reset || !isset($javascript_setting)) {
        $javascript_setting = getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT);
    }
    if (!sqGetGlobalVar('new_js_autodetect_results', $js_autodetect_results) && !sqGetGlobalVar('js_autodetect_results', $js_autodetect_results)) {
        $js_autodetect_results = SMPREF_JS_OFF;
    }
    if ($javascript_setting == SMPREF_JS_AUTODETECT) {
        $javascript_on = $js_autodetect_results;
    } else {
        $javascript_on = $javascript_setting;
    }
    sqsession_register($javascript_on, 'javascript_on');
    return $javascript_on;
}
开发者ID:teammember8,项目名称:roundcube,代码行数:28,代码来源:init.php

示例15: unset

if (!sqGetGlobalVar('dyear', $dyear, SQ_FORM) || !is_numeric($dyear)) {
    unset($dyear);
}
if (!sqGetGlobalVar('dmonth', $dmonth, SQ_FORM) || !is_numeric($dmonth)) {
    unset($dmonth);
}
if (!sqGetGlobalVar('dday', $dday, SQ_FORM) || !is_numeric($dday)) {
    unset($dday);
}
if (!sqGetGlobalVar('dhour', $dhour, SQ_FORM) || !is_numeric($dhour)) {
    unset($dhour);
}
if (!sqGetGlobalVar('dminute', $dminute, SQ_FORM) || !is_numeric($dminute)) {
    unset($dminute);
}
sqGetGlobalVar('confirmed', $confirmed, SQ_POST);
/* got 'em */
/**
 * Displays confirmation form when event is deleted
 * @return void
 */
function confirm_deletion()
{
    global $calself, $dyear, $dmonth, $dday, $dhour, $dminute, $calendardata, $color, $year, $month, $day;
    $tmparray = $calendardata["{$dmonth}{$dday}{$dyear}"]["{$dhour}{$dminute}"];
    echo html_tag('table', html_tag('tr', html_tag('th', _("Do you really want to delete this event?") . '<br />', '', $color[4], 'colspan="2"')) . html_tag('tr', html_tag('td', _("Date:"), 'right', $color[4]) . html_tag('td', date_intl(_("m/d/Y"), mktime(0, 0, 0, $dmonth, $dday, $dyear)), 'left', $color[4])) . html_tag('tr', html_tag('td', _("Time:"), 'right', $color[4]) . html_tag('td', date_intl(_("H:i"), mktime($dhour, $dminute, 0, $dmonth, $dday, $dyear)), 'left', $color[4])) . html_tag('tr', html_tag('td', _("Title:"), 'right', $color[4]) . html_tag('td', htmlspecialchars($tmparray['title']), 'left', $color[4])) . html_tag('tr', html_tag('td', _("Message:"), 'right', $color[4]) . html_tag('td', nl2br(htmlspecialchars($tmparray['message'])), 'left', $color[4])) . html_tag('tr', html_tag('td', "    <form name=\"delevent\" method=\"post\" action=\"{$calself}\">\n" . "       <input type=\"hidden\" name=\"dyear\" value=\"{$dyear}\" />\n" . "       <input type=\"hidden\" name=\"dmonth\" value=\"{$dmonth}\" />\n" . "       <input type=\"hidden\" name=\"dday\" value=\"{$dday}\" />\n" . "       <input type=\"hidden\" name=\"year\" value=\"{$year}\" />\n" . "       <input type=\"hidden\" name=\"month\" value=\"{$month}\" />\n" . "       <input type=\"hidden\" name=\"day\" value=\"{$day}\" />\n" . "       <input type=\"hidden\" name=\"dhour\" value=\"{$dhour}\" />\n" . "       <input type=\"hidden\" name=\"dminute\" value=\"{$dminute}\" />\n" . "       <input type=\"hidden\" name=\"confirmed\" value=\"yes\" />\n" . '       <input type="submit" value="' . _("Yes") . "\" />\n" . "    </form>\n", 'right', $color[4]) . html_tag('td', "    <form name=\"nodelevent\" method=\"post\" action=\"day.php\">\n" . "       <input type=\"hidden\" name=\"year\" value=\"{$year}\" />\n" . "       <input type=\"hidden\" name=\"month\" value=\"{$month}\" />\n" . "       <input type=\"hidden\" name=\"day\" value=\"{$day}\" />\n" . '       <input type="submit" value="' . _("No") . "\" />\n" . "    </form>\n", 'left', $color[4])), '', $color[0], 'border="0" cellpadding="2" cellspacing="1"');
}
if ($month <= 0) {
    $month = date('m');
}
if ($year <= 0) {
开发者ID:jprice,项目名称:EHCP,代码行数:31,代码来源:event_delete.php


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