/* Use this if you wanna have a global address book */
if (isset($address_book_global_filename)) {
- include_once('../functions/abook_global_file.php');
+ include_once(SM_PATH . 'functions/abook_global_file.php');
}
/* Only load database backend if database is configured */
if(isset($addrbook_dsn) && !empty($addrbook_dsn)) {
- include_once('../functions/abook_database.php');
+ include_once(SM_PATH . 'functions/abook_database.php');
}
/*
/* Make sure that the preference file now DOES exist. */
if (!file_exists($filename)) {
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . 'functions/display_messages.php');
logout_error( sprintf( _("Preference file, %s, does not exist. Log out, and log back in to create a default preference file."), $filename) );
exit;
}
/* Open the file, or else display an error to the user. */
if(!$file = @fopen($filename, 'r'))
{
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . 'functions/display_messages.php');
logout_error( sprintf( _("Preference file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) );
exit;
}
/* Open the file for writing, or else display an error to the user. */
if(!$file = @fopen($filename, 'w'))
{
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . 'functions/display_messages.php');
logout_error( sprintf( _("Preference file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) );
exit;
}
/* If it is not there, check the internal data directory. */
if (!@file_exists($default_pref)) {
- $default_pref = '../data/default_pref';
+ $default_pref = SM_PATH . 'data/default_pref';
}
/* Otherwise, report an error. */
$errString = $errTitle . "<br>\n" .
_("Default preference file not found!") . "<br>\n" .
_("Please contact your system administrator and report this error.") . "<br>\n";
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . 'functions/display_messages.php' );
logout_error( $errString, $errTitle );
exit;
} else if (!@copy($default_pref, $filename)) {
_("Could not create initial preference file!") . "<br>\n" .
sprintf( _("%s should be writable by user %s"), $data_dir, $uid ) .
"<br>\n" . _("Please contact your system administrator and report this error.") . "<br>\n";
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . 'functions/display_messages.php' );
logout_error( $errString, $errTitle );
exit;
}
/* Open the file for writing, or else display an error to the user. */
if(!$file = @fopen($filename, 'w'))
{
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . '/functions/display_messages.php' );
logout_error( sprintf( _("Signature file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) );
exit;
}
/* Open the file, or else display an error to the user. */
if(!$file = @fopen($filename, 'r'))
{
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . 'functions/display_messages.php');
logout_error( sprintf( _("Signature file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) );
exit;
}
*/
set_up_language($squirrelmail_language, true);
- include_once( '../functions/display_messages.php' );
- logout_error( _("Unknown user or password incorrect.") );
+ include_once(SM_PATH . 'functions/display_messages.php' );
+ logout_error( _("Unknown user or password incorrect.") );
session_destroy();
exit;
}
$res = $msg->parseStructure($read);
$msg = $res[0];
if (!is_object($msg)) {
- include_once( '../functions/display_messages.php' );
+ include_once(SM_PATH . 'functions/display_messages.php');
global $color, $mailbox;
displayPageHeader( $color, urldecode($mailbox) );
echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n\n" .
/* This function adds a plugin. */
function use_plugin ($name) {
- if (file_exists("../plugins/$name/setup.php")) {
- include_once("../plugins/$name/setup.php");
+ if (file_exists(SM_PATH . "plugins/$name/setup.php")) {
+ include_once(SM_PATH . "plugins/$name/setup.php");
$function = "squirrelmail_plugin_init_$name";
if (function_exists($function)) {
$function();
$real_hash_dir = getHashedDir($username, $dir, $hash_dirs);
/* Set the value of our real data file. */
- $result = "$real_hash_dir/$datafile";
+ $result = SM_PATH . "$real_hash_dir/$datafile";
/* Check for this file in the real hash directory. */
if ($hash_search && !@file_exists($result)) {
}
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);
* QUITE remote.
*/
do {
- $floc = "$attachment_dir/" . md5($sqspell_new_text . microtime());
+ $floc = SM_PATH . "$attachment_dir/" . md5($sqspell_new_text . microtime());
} while (file_exists($floc));
/**
* Write the contents to the file.
require_once(SM_PATH . 'include/load_prefs.php');
require_once(SM_PATH . 'functions/strings.php');
require_once(SM_PATH . 'functions/page_header.php');
-require_once($SQSPELL_DIR . 'sqspell_config.php');
-require_once($SQSPELL_DIR . 'sqspell_functions.php');
+require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php');
+require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
/**
* $MOD is the name of the module to invoke.
}
/* Load the stuff already. */
-require_once($SQSPELL_DIR . "modules/$MOD.mod");
+require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
?>
"\n". '<strong>' . _("Update address") . '</strong>' ."\n",
'center', $color[0] )
),
- 'center', '', 'width="100%" ' ) .
+ 'center', '', 'width="100%" ' );
address_form("editaddr", _("Update address"), $olddata);
echo '<INPUT TYPE=hidden NAME=oldnick VALUE="' .
htmlspecialchars($olddata["nickname"]) . "\">\n" .