* $Id$
*/
-require_once('../functions/imap.php');
-require_once('../functions/attachment_common.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/attachment_common.php');
/* --------------------------------------------------------------------------------- */
/* MIME DECODING */
$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" .
global $where, $what; /* from searching */
global $color; /* color theme */
- require_once('../functions/url_parser.php');
+ require_once(SM_PATH . 'functions/url_parser.php');
$body_ary = explode("\n", $body);
for ($i=0; $i < count($body_ary); $i++) {
}
/* This function trys to locate the entity_id of a specific mime element */
-
function find_ent_id($id, $message) {
- $ret = '';
- for ($i = 0; $ret == '' && $i < count($message->entities); $i++) {
- if ($message->entities[$i]->header->type0 != 'multipart') {
+ for ($i = 0, $ret = ''; $ret == '' && $i < count($message->entities); $i++) {
+ if ($message->entities[$i]->header->type0 == 'multipart') {
$ret = find_ent_id($id, $message->entities[$i]);
} else {
if (strcasecmp($message->entities[$i]->header->id, $id) == 0) {
if (sq_check_save_extension($message->entities[$i])) {
- $ret = $message->entities[$i]->entity_id;
- }
+ return $message->entities[$i]->entity_id;
+ }
}
}
}
"html",
"head",
"base",
- "link"
+ "link",
+ "frame",
+ "iframe"
);
$rm_tags_with_content = Array(