**/
if (!isset($strings_php))
- include ("../functions/strings.php");
- include("../config/config.php");
+ include ('../functions/strings.php');
+ include('../config/config.php');
// Before starting the session, the base URI must be known.
// Assuming that this file is in the src/ subdirectory (or
ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
$base_uri = $regs[1];
- header("Pragma: no-cache");
+ header('Pragma: no-cache');
$location = get_location();
session_set_cookie_params (0, $base_uri);
session_start();
- session_register ("base_uri");
+ session_register ('base_uri');
if(!isset($login_username)) {
exit;
// Refresh the language cookie.
if (isset($squirrelmail_language)) {
- setcookie("squirrelmail_language", $squirrelmail_language, time()+2592000);
+ setcookie('squirrelmail_language', $squirrelmail_language, time()+2592000);
}
- include ("../config/config.php");
- include ("../functions/prefs.php");
- include ("../functions/imap.php");
+ include ('../config/config.php');
+ include ('../functions/prefs.php');
+ include ('../functions/imap.php');
if (!isset($plugin_php))
- include ("../functions/plugin.php");
+ include ('../functions/plugin.php');
if (!isset($auth_php))
- include ("../functions/auth.php");
+ include ('../functions/auth.php');
if (!isset($strings_php))
- include ("../functions/strings.php");
+ include ('../functions/strings.php');
- if (!session_is_registered("user_is_logged_in") || $logged_in != 1) {
- do_hook ("login_before");
+ if (!session_is_registered('user_is_logged_in') || $logged_in != 1) {
+ do_hook ('login_before');
$onetimepad = OneTimePadCreate(strlen($secretkey));
$key = OneTimePadEncrypt($secretkey, $onetimepad);
- session_register("onetimepad");
+ session_register('onetimepad');
// verify that username and password are correct
if ($force_username_lowercase)
$login_username = strtolower($login_username);
}
sqimap_logout($imapConnection);
- setcookie("username", $login_username, 0, $base_uri);
- setcookie("key", $key, 0, $base_uri);
- setcookie("logged_in", 1, 0, $base_uri);
- do_hook ("login_verified");
+ setcookie('username', $login_username, 0, $base_uri);
+ setcookie('key', $key, 0, $base_uri);
+ setcookie('logged_in', 1, 0, $base_uri);
+ do_hook ('login_verified');
}
- session_register ("user_is_logged_in");
+ session_register ('user_is_logged_in');
$user_is_logged_in = true;
header("Location: $location/webmail.php");
**/
if (!isset($i18n_php))
- include("../functions/i18n.php");
+ include('../functions/i18n.php');
session_start();
if(!isset($logged_in) || !isset($username) || !isset($key)) {
- include ("../themes/default_theme.php");
- include ("../functions/display_messages.php");
+ include ('../themes/default_theme.php');
+ include ('../functions/display_messages.php');
printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
$color[8], $color[4], $color[7], $color[7], $color[7]);
plain_error_message(_("You need a valid user and password to access this page!")
- . "<br><a href=\"../src/login.php\">"
+ . '<br><a href="../src/login.php">'
. _("Click here to log back in.") . "</a>.", $color);
- echo "</body></html>";
+ echo '</body></html>';
exit;
}
if (!isset($strings_php))
- include("../functions/strings.php");
+ include('../functions/strings.php');
if (!isset($config_php))
- include("../config/config.php");
+ include('../config/config.php');
if (!isset($imap_php))
- include("../functions/imap.php");
+ include('../functions/imap.php');
if (!isset($date_php))
- include("../functions/date.php");
+ include('../functions/date.php');
if (!isset($page_header_php))
- include("../functions/page_header.php");
+ include('../functions/page_header.php');
if (!isset($array_php))
- include("../functions/array.php");
+ include('../functions/array.php');
if (!isset($mime_php))
- include("../functions/mime.php");
+ include('../functions/mime.php');
if (!isset($mailbox_display_php))
- include("../functions/mailbox_display.php");
+ include('../functions/mailbox_display.php');
if (!isset($display_messages_php))
- include("../functions/display_messages.php");
+ include('../functions/display_messages.php');
?>
<?php
/////////////////////////////////////////////////////////////////////////////////
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
/** If it was a successful login, lets load their preferences **/
- include("../src/load_prefs.php");
+ include('../src/load_prefs.php');
if (isset($newsort) && $newsort != $sort) {
- setPref($data_dir, $username, "sort", $newsort);
+ setPref($data_dir, $username, 'sort', $newsort);
}
// If the page has been loaded without a specific mailbox,
// send them to the inbox
if (!isset($mailbox)) {
- $mailbox = "INBOX";
+ $mailbox = 'INBOX';
$startMessage = 1;
}
// compensate for the UW vulnerability
- if ($imap_server_type == "uw" && strstr($mailbox, "../")) {
- $mailbox = "INBOX";
+ if ($imap_server_type == 'uw' && strstr($mailbox, '../')) {
+ $mailbox = 'INBOX';
}
sqimap_mailbox_select($imapConnection, $mailbox);
displayPageHeader($color, $mailbox);
- do_hook("right_main_after_header");
+ do_hook('right_main_after_header');
if (isset($just_logged_in) && $just_logged_in == 1 &&
strlen(trim($motd)) > 0) {
if (isset($newsort)) {
$sort = $newsort;
- session_register("sort");
+ session_register('sort');
}
// Check to see if we can use cache or not. Currently the only time when you wont use it is
// array in the registered session data. :)
if (! isset($use_mailbox_cache))
$use_mailbox_cache = 0;
- if ($use_mailbox_cache && session_is_registered("msgs")) {
+ if ($use_mailbox_cache && session_is_registered('msgs')) {
showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
} else {
- if (session_is_registered("msgs"))
+ if (session_is_registered('msgs'))
unset($msgs);
- if (session_is_registered("msort"))
+ if (session_is_registered('msort'))
unset($msort);
- if (session_is_registered("numMessages"))
+ if (session_is_registered('numMessages'))
unset($numMessages);
$numMessages = sqimap_get_num_messages ($imapConnection, $mailbox);
showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
- if (session_is_registered("msgs") && isset($msgs))
- session_register("msgs");
- if (session_is_registered("msort") && isset($msort))
- session_register("msort");
- session_register("numMessages");
+ if (session_is_registered('msgs') && isset($msgs))
+ session_register('msgs');
+ if (session_is_registered('msort') && isset($msort))
+ session_register('msort');
+ session_register('numMessages');
}
- do_hook("right_main_bottom");
+ do_hook('ight_main_bottom');
sqimap_logout ($imapConnection);
?>
</FONT>
exit;
}
if(!isset($username) || !isset($key)) {
- include ("../themes/default_theme.php");
- include ("../functions/display_messages.php");
+ include ('../themes/default_theme.php');
+ include ('../functions/display_messages.php');
printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
$color[8], $color[4], $color[7], $color[7], $color[7]);
plain_error_message(_("You need a valid user and password to access this page!")
- . "<br><a href=\"../src/login.php\">"
- . _("Click here to log back in.") . "</a>.", $color);
- echo "</body></html>";
+ . '<br><a href="../src/login.php">'
+ . _("Click here to log back in.") . '</a>.', $color);
+ echo '</body></html>';
exit;
}
if (!isset($strings_php))
- include("../functions/strings.php");
+ include('../functions/strings.php');
if (!isset($i18n_php))
- include("../functions/i18n.php");
+ include('../functions/i18n.php');
if (!isset($config_php))
- include("../config/config.php");
+ include('../config/config.php');
if (!isset($page_header_php))
- include("../functions/page_header.php");
+ include('../functions/page_header.php');
if (!isset($imap_php))
- include("../functions/imap.php");
+ include('../functions/imap.php');
if (!isset($imap_search_php))
- include("../functions/imap_search.php");
+ include('../functions/imap_search.php');
if (!isset($array_php))
- include("../functions/array.php");
+ include('../functions/array.php');
- include("../src/load_prefs.php");
+ include('../src/load_prefs.php');
displayPageHeader($color, $mailbox);
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
- do_hook("search_before_form");
+ do_hook('search_before_form');
echo "<br>\n";
echo " <table width=95% align=center cellpadding=2 cellspacing=0 border=0>\n";
echo " <tr><td bgcolor=\"$color[0]\">\n";
echo " <center><b>"._("Search")."</b></center>\n";
echo " </td></tr>\n";
- echo " <tr><td align=center>";
+ echo ' <tr><td align=center>';
echo "<FORM ACTION=\"search.php\" NAME=s>\n";
echo " <TABLE WIDTH=75%>\n";
echo " <TR>\n";
echo " <TD WIDTH=33%>\n";
- echo " <TT><SMALL><SELECT NAME=\"mailbox\">";
+ echo ' <TT><SMALL><SELECT NAME="mailbox">';
$boxes = sqimap_mailbox_list($imapConnection);
for ($i = 0; $i < count($boxes); $i++) {
- if (!in_array("noselect", $boxes[$i]["flags"])) {
- $box = $boxes[$i]["unformatted"];
- $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
+ if (!in_array('noselect', $boxes[$i]['flags'])) {
+ $box = $boxes[$i]['unformatted'];
+ $box2 = replace_spaces($boxes[$i]['unformatted-disp']);
if ($mailbox == $box)
echo " <OPTION VALUE=\"$box\" SELECTED>$box2\n";
else
echo " <OPTION VALUE=\"$box\">$box2\n";
}
}
- echo " </SELECT></SMALL></TT>";
+ echo ' </SELECT></SMALL></TT>';
echo " </TD>\n";
echo " <TD ALIGN=\"CENTER\" WIDTH=33%>\n";
if (!isset($what))
- $what = "";
- $what_disp = ereg_replace(",", " ", $what);
- $what_disp = str_replace("\\\\", "\\", $what_disp);
- $what_disp = str_replace("\\\"", "\"", $what_disp);
- $what_disp = str_replace("\"", """, $what_disp);
+ $what = '';
+ $what_disp = ereg_replace(',', ' ', $what);
+ $what_disp = str_replace('\\', '\', $what_disp);
+ $what_disp = str_replace('\"', '"', $what_disp);
+ $what_disp = str_replace('"', '"', $what_disp);
echo " <INPUT TYPE=\"TEXT\" SIZE=\"20\" NAME=\"what\" VALUE=\"$what_disp\">\n";
- echo " </TD>";
+ echo ' </TD>';
echo " <TD ALIGN=\"RIGHT\" WIDTH=33%>\n";
- echo " <SELECT NAME=\"where\">";
+ echo ' <SELECT NAME="where">';
- if (isset($where) && $where == "BODY") echo " <OPTION VALUE=\"BODY\" SELECTED>"._("Body")."\n";
- else echo " <OPTION VALUE=\"BODY\">"._("Body")."\n";
+ if (isset($where) && $where == 'BODY') echo ' <OPTION VALUE="BODY" SELECTED>'._("Body")."\n";
+ else echo ' <OPTION VALUE="BODY">'._("Body")."\n";
- if (isset($where) && $where == "TEXT") echo " <OPTION VALUE=\"TEXT\" SELECTED>"._("Everywhere")."\n";
- else echo " <OPTION VALUE=\"TEXT\">"._("Everywhere")."\n";
+ if (isset($where) && $where == 'TEXT') echo ' <OPTION VALUE="TEXT" SELECTED>'._("Everywhere")."\n";
+ else echo ' <OPTION VALUE="TEXT">'._("Everywhere")."\n";
- if (isset($where) && $where == "SUBJECT") echo " <OPTION VALUE=\"SUBJECT\" SELECTED>"._("Subject")."\n";
- else echo " <OPTION VALUE=\"SUBJECT\">"._("Subject")."\n";
+ if (isset($where) && $where == 'SUBJECT') echo ' <OPTION VALUE="SUBJECT" SELECTED>'._("Subject")."\n";
+ else echo ' <OPTION VALUE="SUBJECT">'._("Subject")."\n";
- if (isset($where) && $where == "FROM") echo " <OPTION VALUE=\"FROM\" SELECTED>"._("From")."\n";
- else echo " <OPTION VALUE=\"FROM\">"._("From")."\n";
+ if (isset($where) && $where == 'FROM') echo ' <OPTION VALUE="FROM" SELECTED>'._("From")."\n";
+ else echo ' <OPTION VALUE="FROM">'._("From")."\n";
- if (isset($where) && $where == "CC") echo " <OPTION VALUE=\"Cc\" SELECTED>"._("Cc")."\n";
- else echo " <OPTION VALUE=\"CC\">"._("Cc")."\n";
+ if (isset($where) && $where == 'CC') echo ' <OPTION VALUE="Cc" SELECTED>'._("Cc")."\n";
+ else echo ' <OPTION VALUE="CC">'._("Cc")."\n";
- if (isset($where) && $where == "TO") echo " <OPTION VALUE=\"TO\" SELECTED>"._("To")."\n";
- else echo " <OPTION VALUE=\"TO\">"._("To")."\n";
+ if (isset($where) && $where == 'TO') echo ' <OPTION VALUE="TO" SELECTED>'._("To")."\n";
+ else echo ' <OPTION VALUE="TO">'._("To")."\n";
echo " </SELECT>\n";
echo " </TD>\n";
session_start();
if (!isset($strings_php))
- include("../functions/strings.php");
+ include('../functions/strings.php');
- include ("../src/load_prefs.php");
+ include ('../src/load_prefs.php');
if (!isset($config_php))
- include("../config/config.php");
+ include('../config/config.php');
if (!isset($i18n_php))
- include("../functions/i18n.php");
+ include('../functions/i18n.php');
if (!isset($prefs_php))
- include ("../functions/prefs.php");
+ include ('../functions/prefs.php');
if (!isset($plugin_php))
- include ("../functions/plugin.php");
+ include ('../functions/plugin.php');
- set_up_language(getPref($data_dir, $username, "language"));
+ set_up_language(getPref($data_dir, $username, 'language'));
// If a user hits reload on the last page, $base_uri isn't set
// because it was deleted with the session.
$base_uri = $regs[1];
}
- do_hook("logout");
- setcookie("username", "", 0, $base_uri);
- setcookie("key", "", 0, $base_uri);
- setcookie("logged_in", "", 0, $base_uri);
+ do_hook('logout');
+ setcookie('username', '', 0, $base_uri);
+ setcookie('key', '', 0, $base_uri);
+ setcookie('logged_in', '', 0, $base_uri);
session_destroy();
?>
<HTML>
<HEAD>
<?php
- if ($theme_css != "") {
+ if ($theme_css != '') {
printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">',
$theme_css);
echo "\n";
echo "<TITLE>$org_title - Signout</TITLE>\n";
echo "</HEAD><BODY TEXT=$color[8] BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
- echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
+ echo '<BR><BR><TABLE BGCOLOR="FFFFFF" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0" CELLPADDING="2" ALIGN="CENTER">';
echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
- echo " <TD ALIGN=CENTER>";
- echo " <B>";
+ echo ' <TD ALIGN="CENTER">';
+ echo ' <B>';
echo _("Sign Out");
- echo "</B>";
- echo " </TD>";
- echo " </TR>";
+ echo '</B>';
+ echo ' </TD>';
+ echo ' </TR>';
echo " <TR BGCOLOR=$color[4] WIDTH=100%>";
- echo " <TD ALIGN=CENTER>";
- echo " <BR>";
+ echo ' <TD ALIGN=CENTER>';
+ echo ' <BR>';
echo _("You have been successfully signed out.");
- echo "<BR>";
- echo "<A HREF=\"login.php\" TARGET=_top>";
+ echo '<BR>';
+ echo '<A HREF="login.php" TARGET=_top>';
echo _("Click here to log back in.");
- echo "</A><BR><BR>";
- echo " </TD>";
- echo " </TR>";
+ echo '</A><BR><BR>';
+ echo ' </TD>';
+ echo ' </TR>';
echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
- echo " <TD ALIGN=CENTER>";
- echo " <br>";
- echo " </TD>";
- echo " </TR>";
- echo "</TABLE>";
- echo "<br><br>";
+ echo ' <TD ALIGN="CENTER">;
+ echo ' <br>';
+ echo ' </TD>';
+ echo ' </TR>';
+ echo '</TABLE>';
+ echo '<br><br>';
?>
</BODY>
</HTML>