@@ -12,6 +12,8 @@
* $Id$
*/
+include_once('../functions/strings.php');
+
define('PG_SEL_MAX', 10); /* Default value for page_selector_max. */
function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start_msg, $where, $what) {
@@ -836,7 +836,7 @@ function encodeHeader ($string) {
function MagicHTML( $body, $id ) {
- global $message, $PHP_SELF, $HTTP_SERVER_VARS,
+ global $message, $HTTP_SERVER_VARS,
$attachment_common_show_images;
$attachment_common_show_images =
@@ -11,6 +11,8 @@
// Always set up the language before calling these functions
function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
@@ -134,4 +136,4 @@ function checkForm() {
"</TABLE>\n\n";
}
-?>
+?>
@@ -261,6 +261,20 @@ function find_mailbox_name ($mailbox) {
+function php_self () {
+ global $PHP_SELF, $HTTP_SERVER_VARS;
+ if (isset($PHP_SELF) && !empty($PHP_SELF)) {
+ return $PHP_SELF;
+ } else if (isset($HTTP_SERVER_VARS['PHP_SELF']) &&
+ !empty($HTTP_SERVER_VARS['PHP_SELF'])) {
+ return $HTTP_SERVER_VARS['PHP_SELF'];
+ } else {
+ return '';
+ }
+}
/**
* This determines the location to forward to relative to your server.
* If this doesnt work correctly for you (although it should), you can
@@ -589,4 +603,6 @@ function RemoveSlashes(&$array) {
+$PHP_SELF = php_self();
?>
@@ -23,6 +23,7 @@ require_once('../functions/smtp.php');
require_once('../functions/display_messages.php');
require_once('../functions/addressbook.php');
require_once('../functions/plugin.php');
/* Insert hidden data */
function addr_insert_hidden() {
@@ -15,6 +15,7 @@ require_once('../src/validate.php');
require_once('../functions/array.php');
/* Make an input field */
function adressbook_inp_field($label, $field, $name, $size, $values, $add) {
@@ -17,6 +17,7 @@ require_once('../functions/display_messages.php');
require_once('../functions/imap.php');
require_once('../functions/options.php');
/* Set the base uri. */
ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
@@ -16,6 +16,7 @@ require_once('../functions/display_messages.php');
function oh_opt( $val, $sel, $tit ) {
echo "<option value=\"$val\"";
@@ -13,6 +13,7 @@ require_once('../src/validate.php');
require_once('../functions/imap_search.php');
function s_opt( $val, $sel, $tit ) {
echo " <option value=\"$val\"";
@@ -145,4 +146,4 @@ sqimap_logout ($imapConnection);
echo '</body></html>';
@@ -30,6 +30,7 @@
require_once('../src/validate.php');
require_once('../functions/prefs.php');
// Erase any lingering attachments
if (! isset($attachments)) {
@@ -6,6 +6,9 @@
**/
// Note: The text distance is actually pre-squared
// Background range is from 24-64, all three colors are the same
// Text range is from 196 to 255