* $Id$
*/
-session_start();
define('SM_PATH','../../');
-require_once(SM_PATH . 'config/config.php');
-require_once(SM_PATH . 'functions/strings.php');
-require_once(SM_PATH . 'functions/page_header.php');
-require_once(SM_PATH . 'functions/display_messages.php');
-require_once(SM_PATH . 'functions/imap.php');
-require_once(SM_PATH . 'functions/array.php');
-require_once(SM_PATH . 'functions/i18n.php');
-require_once(SM_PATH . 'include/load_prefs.php');
+require_once(SM_PATH . 'include/validate.php');
+
displayPageHeader($color, 'None');
"(Optional) I got really bored and here's a fix:\n\n\n" .
"----------------------------------------------\n" .
"\nMy browser information:\n" .
- " $HTTP_USER_AGENT\n" .
+ ' '.$_SERVER['HTTP_USER_AGENT'] . "\n" .
" get_browser() information (List)\n" .
Show_Array((array) $browser) .
"\nMy web server information:\n" .
function bug_report_save() {
global $username,$data_dir;
- global $bug_report_bug_report_visible;
- if (isset($bug_report_bug_report_visible)) {
+ if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ global $_POST;
+ }
+
+ if(isset($_POST['bug_report_bug_report_visible'])) {
setPref($data_dir, $username, 'bug_report_visible', '1');
} else {
setPref($data_dir, $username, 'bug_report_visible', '');
echo '> ' . _("Show button in toolbar") . "</td></tr>\n";
}
-?>
\ No newline at end of file
+?>
global $color, $uid_support;
+$passed_id = $_GET['passed_id'];
+$mailbox = $_GET['mailbox'];
+
+$username = $_SESSION['username'];
+$key = $_COOKIE['key'];
+$onetimepad = $_SESSION['onetimepad'];
+
+
function CalcEntity($entString, $direction) {
$result = $entString;
if ($direction == -1) {
displayHtmlHeader( _("Message details"), '', FALSE );
+$mailbox = $_GET['mailbox'];
+$passed_id = $_GET['passed_id'];
+
echo "<frameset rows=\"60, *\" noresize border=\"0\">\n";
echo '<frame src="message_details_top.php?mailbox=' . urlencode($mailbox) .'&passed_id=' . "$passed_id". '" name="top_frame" scrolling="off">';
echo '<frame src="message_details_bottom.php?mailbox=' . urlencode($mailbox) .'&passed_id=' . "$passed_id" . '" name="bottom_frame">';
"-->\n".
"</script>\n", FALSE );
+$passed_id = $_GET['passed_id'];
+$mailbox = $_GET['mailbox'];
echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
'<center><b>'.
{
global $squirrelmail_plugin_hooks;
- do_hook("read_body_header_right");
- $squirrelmail_plugin_hooks['read_body_header_right']['message_details'] = "show_message_details";
+ do_hook('read_body_header_right');
+ $squirrelmail_plugin_hooks['read_body_header_right']['message_details'] = 'show_message_details';
}
function show_message_details() {
global $passed_id, $mailbox, $ent_num, $color,
- $pf_subtle_link,
$javascript_on;
if (strlen(trim($mailbox)) < 1) {
$print_text = _("View Message details");
-
$result = '';
/* Output the link. */
if ($javascript_on) {
- $result = '<script language="javascript">' . "\n" .
+ $result = '<script type="text/javascript" language="javascript">' . "\n" .
'<!--' . "\n" .
" function MessageSource() {\n" .
' window.open("../plugins/message_details/message_details_main.php' .
- $params . '","Print","width=800,height=600");' . "\n".
+ $params . '","MessageDetails","width=800,height=600");' . "\n".
" }\n" .
"// -->\n" .
"</script>\n" .
}
echo $result;
}
-
\ No newline at end of file
+
+?>
function newmail_sav() {
- global $username,$data_dir;
- global $submit_newmail,$media_file,$media_reset,$media_enable,$media_popup;
- global $media_recent,$media_sel;
- global $media_allbox, $media_changetitle;
-
- if ( isset($submit_newmail) ) {
-
- if(isset($media_enable)) {
- setPref($data_dir,$username,'newmail_enable',$media_enable);
+ global $data_dir, $username, $_POST;
+
+ if ( isset($_POST['submit_newmail']) ) {
+
+ if(isset($_POST['media_enable'])) {
+ setPref($data_dir,$username,'newmail_enable',$_POST['media_enable']);
} else {
setPref($data_dir,$username,'newmail_enable','');
}
- if(isset($media_popup)) {
- setPref($data_dir,$username,'newmail_popup',$media_popup);
+ if(isset($_POST['media_popup'])) {
+ setPref($data_dir,$username,'newmail_popup',$_POST['media_popup']);
} else {
setPref($data_dir,$username,'newmail_popup','');
}
- if(isset($media_allbox)) {
- setPref($data_dir,$username,'newmail_allbox',$media_allbox);
+ if(isset($_POST['media_allbox'])) {
+ setPref($data_dir,$username,'newmail_allbox',$_POST['media_allbox']);
} else {
setPref($data_dir,$username,'newmail_allbox','');
}
- if(isset($media_recent)) {
- setPref($data_dir,$username,'newmail_recent',$media_recent);
+ if(isset($_POST['media_recent'])) {
+ setPref($data_dir,$username,'newmail_recent',$_POST['media_recent']);
} else {
setPref($data_dir,$username,'newmail_recent','');
}
- if(isset($media_changetitle)) {
- setPref($data_dir,$username,'newmail_changetitle',$media_changetitle);
+ if(isset($_POST['media_changetitle'])) {
+ setPref($data_dir,$username,'newmail_changetitle',$_POST['media_changetitle']);
} else {
setPref($data_dir,$username,'newmail_changetitle','');
}
- if(isset($media_sel)) {
- if($media_sel == '(local media)') {
- setPref($data_dir,$username,'newmail_media',StripSlashes($media_file));
+ if(isset($_POST['media_sel'])) {
+ if($_POST['media_sel'] == '(local media)') {
+ setPref($data_dir,$username,'newmail_media',StripSlashes($_POST['media_file']));
} else {
- setPref($data_dir,$username,'newmail_media',$media_sel);
+ setPref($data_dir,$username,'newmail_media',$_POST['media_sel']);
}
} else {
setPref($data_dir,$username,'newmail_media','');
* Copyright (c) 1999-2002 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
- * Displays all options relating to new mail sounds
- *
* $Id$
*/
require_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/html.php');
-$sound = (!isset($sound) ? 'Click.wav' : $sound);
+if (!isset($_GET['sound'])) {
+ $sound = 'Click.wav';
+} else {
+ $sound = $_GET['sound'];
+}
+
$sound = str_replace('../plugins/newmail/', '', $sound);
$sound = str_replace('../', '', $sound);
$sound = str_replace("..\\", '', $sound);
function sent_subfolders_check_handleAsSent() {
global $handleAsSent_result, $sent_subfolders_base,
- $use_sent_subfolders, $delimiter;
+ $use_sent_subfolders;
+ if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ global $_SESSION;
+ }
$sent_subfolders_base = 'INBOX.Sent';
$args = func_get_arg(0);
+ $delimiter = $_SESSION['delimiter'];
/* Only check the folder string if we have been passed a mailbox. */
if ($use_sent_subfolders && (count($args) > 1)) {
}
function sent_subfolders_optpage_loadhook_folders() {
- global $optpage_data, $username, $key, $imapServerAddress, $imapPort;
+ global $optpage_data, $imapServerAddress, $imapPort;
+
+ if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ global $_SESSION, $_COOKIE;
+ }
+ $username = $_SESSION['username'];
+ $key = $_COOKIE['key'];
/* Get some imap data we need later. */
$imapConnection =
}
function sent_subfolders_update_sentfolder() {
- global $sent_folder, $delimiter, $auto_create_special, $auto_create_done;
+ global $sent_folder, $auto_create_special, $auto_create_done;
global $sent_subfolders_base, $sent_subfolders_setting;
- global $username, $data_dir, $key, $imapServerAddress, $imapPort;
+ global $data_dir, $imapServerAddress, $imapPort;
global $use_sent_subfolders, $move_to_sent, $imap_server_type;
+ if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ global $_SESSION, $_COOKIE;
+ }
+ $username = $_SESSION['username'];
+ $key = $_COOKIE['key'];
+ $delimiter = $_SESSION['delimiter'];
+
if ($use_sent_subfolders || $move_to_sent) {
$year = date('Y');
$month = date('m');
<?php
+ /**
+ ** options.php -- SpamCop options page
+ **
+ ** Copyright (c) 1999-2002 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** $Id$
+ **/
+
define('SM_PATH','../../');
require_once(SM_PATH . 'include/validate.php');
-displayPageHeader($color, "None");
+displayPageHeader($color, 'None');
+
+/* globals */
+sqextractGlobalVar('action');
+sqextractGlobalVar('meth');
+sqextractGlobalVar('ID');
+extract($_SESSION);
+/* end of globals */
$action = (!isset($action) ? '' : $action);
<?php
-
+ /**
+ ** setup.php -- SpamCop plugin
+ **
+ ** Copyright (c) 1999-2002 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** $Id$
+ **/
/* Initialize the plugin */
function squirrelmail_plugin_init_spamcop() {
'spamcop_load';
$squirrelmail_plugin_hooks['read_body_header_right']['spamcop'] =
'spamcop_show_link';
+
+ sqextractGlobalVar('spamcop_is_composing');
if (isset($spamcop_is_composing)) {
$squirrelmail_plugin_hooks['compose_send']['spamcop'] =
// Show the link on the read-a-message screen
function spamcop_show_link() {
- global $passed_id, $mailbox, $ent_num, $spamcop_enabled, $startMessage,
- $spamcop_method;
-
- // This was stolen from printer_friendly
- // Do I really need/want it?
- if (!trim($mailbox))
- $mailbox = 'INBOX';
+ global $spamcop_enabled, $spamcop_method;
if (! $spamcop_enabled)
return;
+ /* GLOBALS */
+ $passed_id = $_GET['passed_id'];
+ $mailbox = $_GET['mailbox'];
+ $startMessage = $_GET['startMessage'];
+ /* END GLOBALS */
+
echo "<br>\n";
if ($spamcop_method == 'web_form') {
<?php
+ /**
+ ** spamcop.php -- SpamCop plugin
+ **
+ ** Copyright (c) 1999-2002 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** $Id$
+ **/
define('SM_PATH','../../');
/* SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/imap.php');
+
+ /* GLOBALS */
+
+ $username = $_SESSION['username'];
+ $key = $_COOKIE['key'];
+ $onetimepad = $_SESSION['onetimepad'];
+
+ $mailbox = $_GET['mailbox'];
+ $passed_id = $_GET['passed_id'];
+ $startMessage = $_GET['startMessage'];
+
+ /* END GLOBALS */
displayPageHeader($color, $mailbox);
// Use email-based reporting -- save as an attachment
if(!isset($composesession)) {
$composesession = 0;
- session_register('composesession');
+ sqsession_register($composesession, 'composesession');
}
if (!isset($session)) {
$session = "$composesession" +1;
if (!isset($attachments)) {
$attachments = array();
- session_register('attachments');
+ sqsession_register($attachments, 'attachments');
}
foreach ($attachments as $info) {
foreach ($read as $line) {
fputs($fp, $line);
}
+ sqsession_unregister('attachments');
$attachments[] = $newAttachment;
-
+ sqsession_register($attachments , 'attachments');
+
$fn = getPref($data_dir, $username, 'full_name');
$em = getPref($data_dir, $username, 'email_address');
displayPageHeader($color, 'None');
- if (isset($submit_translate) && $submit_translate ) {
- if (isset($translate_translate_server)) {
- setPref($data_dir, $username, 'translate_server', $translate_translate_server);
+ if (isset($_POST['submit_translate']) && $_POST['submit_translate'] ) {
+ if (isset($_POST['translate_translate_server'])) {
+ setPref($data_dir, $username, 'translate_server', $_POST['translate_translate_server']);
} else {
setPref($data_dir, $username, 'translate_server', 'babelfish');
}
- if (isset($translate_translate_location)) {
- setPref($data_dir, $username, 'translate_location', $translate_translate_location);
+ if (isset($_POST['translate_translate_location'])) {
+ setPref($data_dir, $username, 'translate_location', $_POST['translate_translate_location']);
} else {
setPref($data_dir, $username, 'translate_location', 'center');
}
- if (isset($translate_translate_show_read)) {
+ if (isset($_POST['translate_translate_show_read'])) {
setPref($data_dir, $username, 'translate_show_read', '1');
} else {
setPref($data_dir, $username, 'translate_show_read', '');
}
- if (isset($translate_translate_show_send)) {
+ if (isset($_POST['translate_translate_show_send'])) {
setPref($data_dir, $username, 'translate_show_send', '1');
} else {
setPref($data_dir, $username, 'translate_show_send', '');
}
- if (isset($translate_translate_same_window)) {
+ if (isset($_POST['translate_translate_same_window'])) {
setPref($data_dir, $username, 'translate_same_window', '1');
} else {
setPref($data_dir, $username, 'translate_same_window', '');
<center><b><?php echo _("Options") . ' - '. _("Translator"); ?></b></center>
</td></tr></table>
+ <?php if (isset($_POST['submit_translate']) && $_POST['submit_translate'] ) {
+ print "<center><h4>"._("Saved Translation Options")."</h4></center>\n";
+ }?>
+
<p><?php echo _("Your server options are as follows:"); ?></p>
<ul>
sprintf( _("%s to %s"),
_("Spanish"),
_("English"))) .
- '<\SELECT>'.
+ '</SELECT>'.
'Dictionary.com: <INPUT TYPE="submit" VALUE="'._("Translate").'">';
translate_table_end();