$var['func'] = $_REQUEST['func']; // Check for an attachment upload that has gone over post_max_size // Set func to 'attachment' as $_POST will be empty. if (isset($_GET['sending_attachment']) && !count($_POST) && !count($_FILES)) { $var['func'] = 'attachment'; } // Load the account preferences $atmail->loadprefs(); // Parse the users custom stylesheet $var['atmailstyle'] = $atmail->parse("html/{$atmail->Language}/{$atmail->LoginType}/atmailstyle.css"); // Load the time to display in the compose window $var['localtime'] = strftime("%c"); // Create a unique number - Each compose screen is unique. Used to // reference which attachments are for what window. Based on the // PID and a random number. $var['unique'] = $atmail->param_escape('unique'); $var['delete'] = $_REQUEST['delete']; if (!$var['unique']) { $var['unique'] = getmypid() + rand(0, 1000); } // Avoid any fake/malformed unique ID, e.g ../ in pathname $var['unique'] = basename($var['unique']); // see if something is cached if (file_exists($atmail->tmpdir . ".ht{$auth->SessionID}")) { $var['PgpPass'] = 1; } // The From address of our $var['FromAddress'] = $atmail->loadpersonalities(); // Calculate the height of the menubar ( if the Webadmin user toggles off certain features ) $h = $atmail->calcmenu_height(); foreach ($h as $k => $v) {