* $Id$
*/
-require_once('../functions/addressbook.php');
-require_once('../functions/plugin.php');
-require_once('../functions/prefs.php');
+require_once(SM_PATH . 'functions/addressbook.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/prefs.php');
global $username, $popuser, $domain;
/* Print all the needed RFC822 headers */
function write822Header ($fp, $t, $c, $b, $subject, $body, $more_headers, $session, $rn="\r\n") {
- global $REMOTE_ADDR, $SERVER_NAME, $REMOTE_PORT;
- global $data_dir, $username, $popuser, $domain, $version, $useSendmail;
- global $default_charset, $HTTP_VIA, $HTTP_X_FORWARDED_FOR;
- global $REMOTE_HOST, $identity;
+ global $data_dir, $username, $popuser, $domain, $version, $useSendmail,
+ $default_charset, $identity, $_SERVER;
/* Storing the header to make sure the header is the same
* everytime the header is printed.
*/
+
+ /* get those globals */
+ $REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
+ $SERVER_NAME = $_SERVER['SERVER_NAME'];
+ $REMOTE_PORT = $_SERVER['REMOTE_PORT'];
+
+ if(isset($_SERVER['REMOTE_HOST'])) {
+ $REMOTE_HOST = $_SERVER['REMOTE_HOST'];
+ }
+ if(isset($_SERVER['HTTP_VIA'])) {
+ $HTTP_VIA = $_SERVER['HTTP_VIA'];
+ }
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $HTTP_X_FORWARDED_FOR = $_SERVER['HTTP_X_FORWARDED_FOR'];
+ }
+
static $header, $headerlength, $headerrn;
if ($header == '') {
}
if ($status == 0) {
- include_once('../functions/page_header.php');
+ include_once(SM_PATH . 'functions/page_header.php');
if ($compose_new_win == '1') {
compose_Header($color, 'None');
}
else {
displayPageHeader($color, 'None');
}
- include_once('../functions/display_messages.php');
+ include_once(SM_PATH . 'functions/display_messages.php');
$lines = nl2br(htmlspecialchars($lines));
$msg = $message . "<br>\nServer replied: $lines";
plain_error_message($msg, $color);