X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fnewmail%2Fnewmail.php;h=e5923031356718016093e529e66485e1fb722210;hb=aa9a9a86405156c73b3fc162896ffabc60b8b539;hp=240f78b33c4e30fda2432918491530dcf82231dd;hpb=a9aa7ab752b604cd0682b5eb45bc7bad9cb2919f;p=squirrelmail.git diff --git a/plugins/newmail/newmail.php b/plugins/newmail/newmail.php index 240f78b3..e5923031 100644 --- a/plugins/newmail/newmail.php +++ b/plugins/newmail/newmail.php @@ -1,41 +1,86 @@ \n". - '
'. - "\n". - "\n". - "\n". - "\n". - "
\n". - '
' . _("SquirrelMail Notice:") . "
\n". - "

" . - _("You have new mail!") . "

\n". - "
\n". - ''. - "
\n". - "\n". - "\n"; - -?> \ No newline at end of file +/** + * newmail.php - popup page + * + * Displays all options relating to new mail sounds + * + * @copyright 1999-2015 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage newmail + */ + +/** + * Path for SquirrelMail required files. + * @ignore + */ +require('../../include/init.php'); + +/** + * Make sure plugin is activated! + */ +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 ''."\n". + '
'. "\n" . + html_tag( 'table', "\n" . + html_tag( 'tr', "\n" . + // i18n: %s inserts the organisation name (typically SquirrelMail) + html_tag( 'td', '' . sprintf(_("%s notice:"), $org_name) . '', 'center', $color[0] ) + ) . + html_tag( 'tr', "\n" . + html_tag( 'td', + '
'. + sprintf(ngettext("You have %s new message","You have %s new messages",$numnew), $numnew ) . + '

' . "\n" . + '
' . "\n". + ''."\n". + '
', + 'center' ) + ) , + '', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' ) . + '
' . + "\n". + "\n";