$var['maxfilesize'] = intval($var['maxfilesize']) * 1024 * 1024 * 1024; } } print $atmail->parse("html/{$atmail->Language}/{$atmail->LoginType}/attachment.html", $var); } elseif ($var['func'] == "renameattach") { $sendmsg = new SendMsg(array('Account' => "{$atmail->username}@{$atmail->pop3host}")); $AttachmentList = $_REQUEST['Attachment']; // Loop through each attachment to rename on disk if (is_array($AttachmentList)) { foreach ($AttachmentList as $attach) { $attach = $atmail->myunescape($attach); $sendmsg->renameattach($var['unique'], $attach); } } echo "<ATTACH STATUS='OK'/>"; $atmail->end(); } elseif ($var['func'] == "attachmentmodallist") { $icon = $atmail->icon_hash(); $sendmsg = new SendMsg(array('Account' => "{$atmail->username}@{$atmail->pop3host}")); // Delete the selected attachment if ($var['delete']) { $var['status'] = $sendmsg->delete_attachment($var['delete'], $var['unique']); } // List the number of attachments . Based on the unique compose // window and our logged in account $h = $sendmsg->list_attachments($var['unique']); foreach ($h as $k => $v) { $var['filename'] = $k; if (preg_match('/\\.(\\w+)$/', $var['filename'], $match)) { $var['ext'] = $match[1]; }