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


PHP displayHtmlHeader函数代码示例

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


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

示例1: sqspell_makeWindow

/**
 * Function similar to the one above. This one is a general wrapper
 * for the Squirrelspell pop-up window. It's called form nearly
 * everywhere, except the check_me module, since that one is highly
 * customized.
 *
 * @param  string $onload    Used to indicate and pass the name of a js function
 *                    to call in a <body onload="function()" for automatic
 *                    onload script execution.
 * @param  string $title     Title of the page.
 * @param  string $scriptsrc If defined, link this javascript source page into
 *                    the document using <script src="file.js"> format.
 * @param  string $body      The content to include.
 * @return            void
 */
function sqspell_makeWindow($onload, $title, $scriptsrc, $body)
{
    global $color, $SQSPELL_VERSION;
    displayHtmlHeader($title, $scriptsrc ? "\n<script type=\"text/javascript\" src=\"js/{$scriptsrc}\"></script>\n" : '');
    echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['4']}\" link=\"{$color['7']}\" " . "vlink=\"{$color['7']}\" alink=\"{$color['7']}\"";
    /**
     * Provide an onload="jsfunction()" if asked to.
     */
    if ($onload) {
        echo " onload=\"{$onload}\"";
    }
    /**
     * Draw the rest of the page.
     */
    echo ">\n" . html_tag('table', "\n" . html_tag('tr', "\n" . html_tag('td', '<strong>' . $title . '</strong>', 'center', $color[9])) . "\n" . html_tag('tr', "\n" . html_tag('td', '<hr />', 'left')) . "\n" . html_tag('tr', "\n" . html_tag('td', $body, 'left')) . "\n" . html_tag('tr', "\n" . html_tag('td', '<hr />', 'left')) . "\n" . html_tag('tr', "\n" . html_tag('td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9])), '', '', 'width="100%" border="0" cellpadding="2"') . "</body>\n</html>\n";
}
开发者ID:jprice,项目名称:EHCP,代码行数:31,代码来源:sqspell_functions.php

示例2: 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

示例3: sqgetGlobalVar

sqgetGlobalVar('fold', $fold, SQ_GET);
sqgetGlobalVar('unfold', $unfold, SQ_GET);
sqgetGlobalVar('auto_create_done', $auto_create_done, SQ_SESSION);
/* end globals */
// open a connection on the imap port (143)
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10);
// the 10 is to hide the output
/**
 * Using stristr since older preferences may contain "None" and "none".
 */
if (isset($left_refresh) && $left_refresh != '' && !stristr($left_refresh, 'none')) {
    $xtra = "\n<meta http-equiv=\"Expires\" content=\"Thu, 01 Dec 1994 16:00:00 GMT\">\n" . "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n" . "<meta http-equiv=\"REFRESH\" content=\"{$left_refresh};URL=left_main.php\">\n";
} else {
    $xtra = '';
}
displayHtmlHeader($org_title, $xtra);
/* If requested and not yet complete, attempt to autocreate folders. */
if ($auto_create_special && !$auto_create_done) {
    $autocreate = array($sent_folder, $trash_folder, $draft_folder);
    foreach ($autocreate as $folder) {
        if ($folder != '' && $folder != 'none') {
            if (!sqimap_mailbox_exists($imapConnection, $folder)) {
                sqimap_mailbox_create($imapConnection, $folder, '');
            } else {
                if (!sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
                    sqimap_subscribe($imapConnection, $folder);
                }
            }
        }
    }
    /* Let the world know that autocreation is complete! Hurrah! */
开发者ID:jprice,项目名称:EHCP,代码行数:31,代码来源:left_main.php

示例4: 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) . '&amp;mailbox=' . urlencode($mailbox) . '&amp;passed_id=' . $passed_id . '" name="bottom_frame" frameborder="0" />' . "\n";
    echo "</frameset>\n";
}
?>
</html>
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:30,代码来源:printer_friendly_main.php

示例5: displayHtmlHeader

     padding-right:4px;
     margin-left:4px;
     padding-left:4px;
     border: groove;
     border-width:0.1em;
     border-color:{$color['9']};
     background: {$color['0']};
  }

-->

</style>

ECHO;
}
displayHtmlHeader('SquirrelMail', $xtra);
sqgetGlobalVar('auto_create_done', $auto_create_done, SQ_SESSION);
/* If requested and not yet complete, attempt to autocreate folders. */
if ($auto_create_special && !isset($auto_create_done)) {
    $autocreate = array($sent_folder, $trash_folder, $draft_folder);
    foreach ($autocreate as $folder) {
        if ($folder != '' && $folder != 'none') {
            if (!sqimap_mailbox_exists($imapConnection, $folder)) {
                sqimap_mailbox_create($imapConnection, $folder, '');
            } else {
                //if (!sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
                // check for subscription is useless and expensive  just
                // surpress the NO response
                sqimap_subscribe($imapConnection, $folder, false);
            }
        }
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:left_main.php

示例6: define

<?php

/**
 * Message Details plugin - top frame with buttons
 *
 * Plugin to view the RFC822 raw message output and the bodystructure of a message
 *
 * @author Marc Groot Koerkamp
 * @copyright Copyright &copy; 2002 Marc Groot Koerkamp, The Netherlands
 * @copyright Copyright &copy; 2004-2009 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: message_details_top.php 13549 2009-04-15 22:00:49Z jervfors $
 * @package plugins
 * @subpackage message_details
 */
/** @ignore */
define('SM_PATH', '../../');
/* SquirrelMail required files. */
require_once SM_PATH . 'include/validate.php';
displayHtmlHeader(_("Message Details"), "<script language=\"javascript\">\n" . "<!--\n" . "function printPopup() {\n" . "parent.frames[1].focus();\n" . "parent.frames[1].print();\n" . "}\n" . "-->\n" . "</script>\n", FALSE);
sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
if (!sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET)) {
    $passed_ent_id = 0;
}
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['3']}\" link=\"{$color['7']}\" vlink=\"{$color['7']}\" alink=\"{$color['7']}\">\n" . '<center><b>' . '<form action="' . SM_PATH . 'src/download.php" method="GET">' . '<input type="button" value="' . _("Print") . '" onClick="printPopup()" />&nbsp;&nbsp;' . '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()" />&nbsp;&nbsp;' . '<input type="submit" value="' . _("Save Message") . '" /> ' . '<input type="hidden" name="mailbox" value="' . urlencode($mailbox) . '" />' . '<input type="hidden" name="passed_id" value="' . urlencode($passed_id) . '" />' . '<input type="hidden" name="ent_id" value="' . urlencode($passed_ent_id) . '" />' . '<input type="hidden" name="absolute_dl" value="true" />' . '</form>' . '</b>' . '</body>' . "</html>\n";
开发者ID:jprice,项目名称:EHCP,代码行数:26,代码来源:message_details_top.php

示例7: error_box

/**
 * Displays error message
 * 
 * Since 1.4.1 function checks if page header is already displayed.
 * 
 * Since 1.4.3 and 1.5.1, this function contains the error_box hook.
 * Use plain_error_message() and make sure that page header is created,
 * if you want compatibility with 1.4.0 and older.
 *
 * In 1.5.2 second function argument is changed. Older functions used it
 * for $color array, new function uses it for optional link data. Function 
 * will ignore color array and use standard colors instead.
 *
 * The $return_output argument was added in 1.5.2
 *
 * @param string $string Error message to be displayed
 * @param array $link Optional array containing link details to be displayed.
 *  Array uses three keys. 'URL' key is required and should contain link URL.
 *  'TEXT' key is optional and should contain link name. 'FRAME' key is 
 *  optional and should contain link target attribute.
 * @param boolean $return_output When TRUE, output is returned to caller
 *                               instead of being sent to browser (OPTIONAL;
 *                               default = FALSE)
 *
 * @since 1.3.2
 */
function error_box($string, $link = NULL, $return_output = FALSE)
{
    global $pageheader_sent, $oTemplate, $org_title;
    $err = _("ERROR");
    do_hook('error_box', $string);
    if (!isset($org_title)) {
        $org_title = 'SquirrelMail';
    }
    // check if the page header has been sent; if not, send it!
    //
    // (however, if $return_output is turned on, the output of this
    // should be being used in some other page, so we don't have
    // to worry about page headers in that case)
    //
    if (!$return_output && empty($pageheader_sent)) {
        displayHtmlHeader($org_title . ': ' . $err);
        $pageheader_sent = TRUE;
        echo create_body();
        // this is template-safe (see create_body() function)
    }
    // Double check the link for everything we need
    if (!is_null($link)) {
        // safety check for older code
        if (isset($link['URL'])) {
            if (!isset($link['FRAME'])) {
                $link['FRAME'] = '';
            }
            if (!isset($link['TEXT'])) {
                $link['TEXT'] = $link['URL'];
            }
        } else {
            // somebody used older error_box() code
            $link = null;
        }
    }
    /** ERROR is pre-translated to avoid multiple translation calls. **/
    $oTemplate->assign('error', $err);
    $oTemplate->assign('errorMessage', $string);
    $oTemplate->assign('link', $link);
    $output = $oTemplate->fetch('error_box.tpl');
    if ($return_output) {
        return $output;
    }
    echo $output;
}
开发者ID:teammember8,项目名称:roundcube,代码行数:71,代码来源:display_messages.php

示例8: pf_clean_string

    //    $body = pf_clean_string($body, 0);
    // clean up everything else...
    $subject = pf_clean_string($subject, $num_leading_spaces);
    $from = pf_clean_string($from, $num_leading_spaces);
    $date = pf_clean_string($date, $num_leading_spaces);
}
// end cleanup
$to = decodeHeader($to);
$cc = decodeHeader($cc);
$from = decodeHeader($from);
$subject = decodeHeader($subject);
// load attachments
$attachments = pf_show_attachments($message, $ent_ar, $mailbox, $passed_id);
// --end display setup--
/* --start browser output-- */
displayHtmlHeader($subject, '', FALSE);
echo '<body text="#000000" bgcolor="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">' . "\n" . html_tag('table', '', 'center', '', 'cellspacing="0" cellpadding="0" border="0" width="100%"') . html_tag('tr', html_tag('td', _("From") . ':&nbsp;', 'left', '', 'valign="top"') . html_tag('td', $from, 'left')) . "\n" . html_tag('tr', html_tag('td', _("Subject") . ':&nbsp;', 'left', '', 'valign="top"') . html_tag('td', $subject, 'left')) . "\n" . html_tag('tr', html_tag('td', _("Date") . ':&nbsp;', 'left') . html_tag('td', htmlspecialchars($date), 'left')) . "\n" . html_tag('tr', html_tag('td', _("To") . ':&nbsp;', 'left', '', 'valign="top"') . html_tag('td', $to, 'left')) . "\n";
if (strlen($cc) > 0) {
    /* only show Cc: if it's there... */
    echo html_tag('tr', html_tag('td', _("Cc") . ':&nbsp;', 'left', '', 'valign="top"') . html_tag('td', $cc, 'left'));
}
/* body */
echo html_tag('tr', html_tag('td', '<hr noshade size="1" /><br />' . "\n" . $body, 'left', '', 'colspan="2"')) . "\n";
if (!empty($attachments)) {
    // attachments title
    echo html_tag('tr', html_tag('td', '<b>' . _("Attachments:") . '</b>', 'left', '', 'colspan="2"')) . "\n";
    // list of attachments
    echo html_tag('tr', html_tag('td', $attachments, 'left', '', 'colspan="2"')) . "\n";
    // add separator line
    echo html_tag('tr', html_tag('td', '<hr style="height: 1px;" />', 'left', '', 'colspan="2"')) . "\n";
}
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:printer_friendly_bottom.php

示例9: elseif

global $plugins;
if (!in_array('newmail', $plugins)) {
    exit;
}
/** load default config */
if (file_exists(SM_PATH . 'plugins/newmail/config_default.php')) {
    include_once SM_PATH . 'plugins/newmail/config_default.php';
}
/** load config */
if (file_exists(SM_PATH . 'config/newmail_config.php')) {
    include_once SM_PATH . 'config/newmail_config.php';
} elseif (file_exists(SM_PATH . 'plugins/newmail/config.php')) {
    include_once SM_PATH . 'plugins/newmail/config.php';
}
sqGetGlobalVar('numnew', $numnew, SQ_GET);
$numnew = (int) $numnew;
global $username, $org_title, $newmail_popup_title_bar_singular, $newmail_popup_title_bar_plural;
// make sure default strings are in pot file
$ignore = _("New Mail");
$singular_title = "New Mail";
$plural_title = "New Mail";
if (!empty($newmail_popup_title_bar_singular)) {
    $singular_title = $newmail_popup_title_bar_singular;
}
if (!empty($newmail_popup_title_bar_plural)) {
    $plural_title = $newmail_popup_title_bar_plural;
}
list($singular_title, $plural_title) = str_replace(array('###USERNAME###', '###ORG_TITLE###'), array($username, $org_title), array($singular_title, $plural_title));
$title = sprintf(ngettext($singular_title, $plural_title, $numnew), $numnew);
displayHtmlHeader($title, '', FALSE);
echo '<body bgcolor="' . $color[4] . '" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">' . "\n" . '<div style="text-align: center;">' . "\n" . html_tag('table', "\n" . html_tag('tr', "\n" . html_tag('td', '<b>' . sprintf(_("%s notice:"), $org_name) . '</b>', 'center', $color[0])) . html_tag('tr', "\n" . html_tag('td', '<br /><big><font color="' . $color[2] . '">' . sprintf(ngettext("You have %s new message", "You have %s new messages", $numnew), $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"') . '</div>' . "<script type=\"text/javascript\">\n" . "<!--\n" . "document.nm.bt.focus();\n" . "-->\n" . "</script>\n" . "</body></html>\n";
开发者ID:teammember8,项目名称:roundcube,代码行数:31,代码来源:newmail.php

示例10: error_box

function error_box($string, $color)
{
    global $pageheader_sent;
    if (!isset($color)) {
        $color = array();
        $color[0] = '#dcdcdc';
        /* light gray    TitleBar               */
        $color[1] = '#800000';
        /* red                                  */
        $color[2] = '#cc0000';
        /* light red     Warning/Error Messages */
        $color[4] = '#ffffff';
        /* white         Normal Background      */
        $color[7] = '#0000cc';
        /* blue          Links                  */
        $color[8] = '#000000';
        /* black         Normal text            */
        $color[9] = '#ababab';
        /* mid-gray      Darker version of #0   */
    }
    $err = _("ERROR");
    $ret = concat_hook_function('error_box', $string);
    if ($ret != '') {
        $string = $ret;
    }
    /* check if the page header has been sent; if not, send it! */
    if (!isset($pageheader_sent) && !$pageheader_sent) {
        /* include this just to be sure */
        include_once SM_PATH . 'functions/page_header.php';
        displayHtmlHeader('SquirrelMail: ' . $err);
        $pageheader_sent = TRUE;
        echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['4']}\" link=\"{$color['7']}\" vlink=\"{$color['7']}\" alink=\"{$color['7']}\">\n\n";
    }
    echo '<table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="' . $color[9] . '">' . '<tr><td>' . '<table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="' . $color[4] . '">' . '<tr><td align="center" bgcolor="' . $color[0] . '">' . '<font color="' . $color[2] . '"><b>' . $err . ':</b></font>' . '</td></tr><tr><td>' . '<table cellpadding="1" cellspacing="5" align="center" border="0">' . '<tr>' . html_tag('td', $string . "\n", 'left') . '</tr></table>' . '</td></tr></table></td></tr></table>';
}
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:35,代码来源:display_messages.php

示例11: displayHtmlHeader

}

.header {
  display:inline;
}

.entheader {
  display:inline;
  width:99%;
}
//-->

</style>

ECHO;
displayHtmlHeader(_("Message Details"), $xtra, FALSE);
/* body */
echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['4']}\" link=\"{$color['7']}\" vlink=\"{$color['7']}\" alink=\"{$color['7']}\">\n";
echo '<code>' . "\n";
echo '<font face = "monospace">' . "\n";
echo '<br />' . "\n";
if (count($content) > 0) {
    echo '<h2>' . _("Bodystructure") . "</h2>\n\n";
    echo '<table border=1 width="98%"><thead>' . '<tr bgcolor="' . "{$color['7']}" . '">' . '<td><b><font color="' . "{$color['5']}" . '">' . _("Entity") . '</font></b></td>' . '<td><b><font color="' . "{$color['5']}" . '">' . _("Content-Type") . '</font></b></td>' . '<td><b><font color="' . "{$color['5']}" . '">' . _("Name") . '</font></b></td>' . '<td><b><font color="' . "{$color['5']}" . '">' . _("Encoding") . '</font></b></td>' . '</tr>' . '</thead><tbody>';
    for ($i = 0; $i < count($content); $i++) {
        echo '<tr><td>';
        echo $content[$i]['ent'] . '</td><td>';
        if (isset($content[$i]['type'])) {
            echo $content[$i]['type'];
        } else {
            echo 'TEXT/PLAIN';
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:message_details_bottom.php

示例12: define

<?php

/**
 * printer_friendly top frame
 *
 * top frame of printer_friendly_main.php
 * displays some javascript buttons for printing & closing
 *
 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: printer_friendly_top.php 12127 2007-01-13 20:07:24Z kink $
 * @package squirrelmail
 */
/**
 * Path for SquirrelMail required files.
 * @ignore
 */
define('SM_PATH', '../');
/* SquirrelMail required files. */
require_once SM_PATH . 'include/validate.php';
displayHtmlHeader(_("Printer Friendly"), "<script language=\"javascript\" type=\"text/javascript\">\n" . "<!--\n" . "function printPopup() {\n" . "parent.frames[1].focus();\n" . "parent.frames[1].print();\n" . "}\n" . "-->\n" . "</script>\n", FALSE);
echo '<body text="' . $color[8] . '" bgcolor="' . $color[3] . '" link="' . $color[7] . '" vlink="' . $color[7] . '" alink="' . $color[7] . "\">\n" . html_tag('div', '<b>' . '<form>' . '<input type="button" value="' . _("Print") . '" onclick="printPopup()" /> ' . '<input type="button" value="' . _("Close") . '" onclick="window.parent.close()" />' . '</form>' . '</b>', 'right');
?>
</body></html>
开发者ID:jin255ff,项目名称:company_website,代码行数:24,代码来源:printer_friendly_top.php

示例13: compose_Header

function compose_Header($color, $mailbox)
{
    global $delimiter, $hide_sm_attributions, $base_uri, $data_dir, $username, $frame_top, $compose_new_win;
    if (!isset($frame_top)) {
        $frame_top = '_top';
    }
    /*
        Locate the first displayable form element
    */
    if (!defined('PAGE_NAME')) {
        define('PAGE_NAME', NULL);
    }
    switch (PAGE_NAME) {
        case 'search':
            $pos = getPref($data_dir, $username, 'search_pos', 0) - 1;
            $onload = "onload=\"document.forms[{$pos}].elements[2].focus();\"";
            displayHtmlHeader(_("Compose"));
            break;
        default:
            $js = '<script language="JavaScript" type="text/javascript">' . "\n<!--\n" . "var alreadyFocused = false;\n" . "function checkForm() {\n" . "\n    if (alreadyFocused) return;\n";
            global $action, $reply_focus;
            if (strpos($action, 'reply') !== FALSE && $reply_focus) {
                if ($reply_focus == 'select') {
                    $js .= "document.forms['compose'].body.select();}\n";
                } else {
                    if ($reply_focus == 'focus') {
                        $js .= "document.forms['compose'].body.focus();}\n";
                    } else {
                        if ($reply_focus == 'none') {
                            $js .= "}\n";
                        }
                    }
                }
            } else {
                if ($reply_focus == 'none') {
                    $js .= "}\n";
                } else {
                    $js .= "var f = document.forms.length;\n" . "var i = 0;\n" . "var pos = -1;\n" . "while( pos == -1 && i < f ) {\n" . "var e = document.forms[i].elements.length;\n" . "var j = 0;\n" . "while( pos == -1 && j < e ) {\n" . "if ( document.forms[i].elements[j].type == 'text' ) {\n" . "pos = j;\n" . "}\n" . "j++;\n" . "}\n" . "i++;\n" . "}\n" . "if( pos >= 0 ) {\n" . "document.forms[i-1].elements[pos].focus();\n" . "}\n" . "}\n";
                }
            }
            $js .= "// -->\n" . "</script>\n";
            $onload = 'onload="checkForm();"';
            displayHtmlHeader(_("Compose"), $js);
            break;
    }
    echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['4']}\" link=\"{$color['7']}\" vlink=\"{$color['7']}\" alink=\"{$color['7']}\" {$onload}>\n\n";
}
开发者ID:jprice,项目名称:EHCP,代码行数:47,代码来源:page_header.php

示例14: SquirrelMailErrorhandler


//.........这里部分代码省略.........
         /*
          * The following errors cannot be handled by a user defined error handler:
          * E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING
          */
         switch ($iErrNo) {
             case E_STRICT:
                 $iType = is_null($iType) ? SQM_STRICT : $iType;
             case E_NOTICE:
                 $iType = is_null($iType) ? SQM_NOTICE : $iType;
             case E_WARNING:
                 $iType = is_null($iType) ? SQM_WARNING : $iType;
                 $aErrorCategory[] = 'PHP';
                 $aError['message'] = $sErrStr;
                 $aError['extra'] = array('FILE' => $sErrFile, 'LINE' => $iErrLine);
                 // what todo with $aContext?
                 break;
             case E_USER_ERROR:
                 $iType = is_null($iType) ? SQM_ERROR : $iType;
             case E_USER_NOTICE:
                 $iType = is_null($iType) ? SQM_NOTICE : $iType;
             case E_USER_WARNING:
                 $iType = is_null($iType) ? SQM_WARNING : $iType;
                 if ($sErrFile == __FILE__) {
                     // Error is triggered in this file and probably by sqm_trigger_error
                     $aErrorTemp = @unserialize($sErrStr);
                     if (!is_array($aErrorTemp)) {
                         $aError['message'] = $sErrStr;
                         $aErrorCategory[] = 'UNDEFINED';
                     } else {
                         $aError = array_merge($aError, $aErrorTemp);
                         // special error handling below
                         if ($aError['category'] & SQM_ERROR_IMAP) {
                             $aErrorCategory[] = 'IMAP';
                             // imap related error handling inside
                         }
                         if ($aError['category'] & SQM_ERROR_FS) {
                             $aErrorCategory[] = 'FILESYSTEM';
                             // filesystem related error handling inside
                         }
                         if ($aError['category'] & SQM_ERROR_SMTP) {
                             $aErrorCategory[] = 'SMTP';
                             // smtp related error handling inside
                         }
                         if ($aError['category'] & SQM_ERROR_LDAP) {
                             $aErrorCategory[] = 'LDAP';
                             // ldap related error handling inside
                         }
                         if ($aError['category'] & SQM_ERROR_DB) {
                             $aErrorCategory[] = 'DATABASE';
                             // db related error handling inside
                         }
                         if ($aError['category'] & SQM_ERROR_PLUGIN) {
                             $aErrorCategory[] = 'PLUGIN';
                             do_hook('error_handler_plugin', $aError);
                             // plugin related error handling inside
                         }
                         //if ($aError['category'] & SQM_ERROR_X) {
                         //     $aErrorCategory[] = 'X';
                         // place holder for a new category
                         //}
                     }
                     unset($aErrorTemp);
                 } else {
                     $aError['message'] = $sErrStr;
                     $aErrorCategory[] = 'SQM_NOTICE';
                 }
                 break;
             default:
                 break;
         }
         /**
          * If delayed error handling is enabled, always record the location
          * and tag the error is delayed to make debugging easier.
          */
         if (isset($this->Template->values['delayed_errors']) && $this->Template->values['delayed_errors']) {
             $aErrorCategory[] = 'Delayed';
             $aError['extra'] = array('FILE' => $sErrFile, 'LINE' => $iErrLine);
         }
         $aErrorTpl = array('type' => $iType, 'category' => $aErrorCategory, 'message' => $aError['message'], 'link' => $aError['link'], 'tip' => $aError['tip'], 'extra' => $aError['extra']);
         // Add the notice/warning/error to the existing list of notices/warnings
         $this->aErrors[] = $aErrorTpl;
         $this->Template->assign('aErrors', $this->aErrors);
     }
     // Show the error immediate in case of fatal errors
     if ($iType == SQM_ERROR) {
         if (isset($this->Template->values['header_sent']) && !$this->Template->values['header_sent']) {
             // TODO replace this with template that can be assigned
             // UPDATE: displayHtmlHeader() no longer sends anything
             //         directly to the browser itself and instead
             //         displays all output through the template file
             //         "protocol_header" as well as calls to the
             //         template's header() method, so perhaps the
             //         above TODO is alleviated?? (however, I don't fully
             //         understand the problem behind the TODO comment myself (Paul))
             displayHtmlHeader(_("Error"), '', false);
         }
         $this->DisplayErrors();
         exit(_("Terminating SquirrelMail due to a fatal error"));
     }
 }
开发者ID:teammember8,项目名称:roundcube,代码行数:101,代码来源:error.class.php

示例15: set_time_limit

// This Report uses the both the queue logs and the cdr logs to populate data
include 'php/config.php';
set_time_limit(600);
$curTime = time();
global $DB;
$DB = str_replace("\"", "", $DB);
$connection_string = odbc_connect($DB, "", "");
$conn = mysql_connect('localhost', 'root', 'Summer01');
if (!$conn) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db("usi_misc", $conn);
echo "<h1>Daily Report</h1><br>";
echo "<body >";
displayHtmlHeader();
echo "<div id=\"divCallReport\" style=\"width:1150px\">";
displayPage($curDate);
echo "</div>";
displayDates();
echo "</body>";
echo "</html>";
function displayPage($date)
{
    global $DB, $connection_string, $conn;
    // ******************************************************************************************************
    // *****		 						DAILY CALL ACTIVITY REPORT 									*****
    // ******************************************************************************************************
    echo "<div id=\"tabs\" class=\"tabs\" style=\"font-size:x-small; visibility:visible\">";
    echo "<h4 style=\"font-variant: small-caps; font-size:large\">daily call center flash activity report</h4>";
    // ******************* Create All The Tabs *************************
开发者ID:jasmith152,项目名称:plexis,代码行数:30,代码来源:dailyCallsReport.php


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