kartero.org

kartero.org

Git

This blob has been accessed 369 times via Git panel.

  1. <?php
  2.  
  3. require_once("core.php");
  4.  
  5. if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
  6.         exit;
  7. }
  8.  
  9. if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])) {
  10.  
  11.         $msgno = trim(strip_tags($_POST['msg']));
  12.  
  13.         $header = imap_rfc822_parse_headers(imap_fetchbody($mbox,$msgno,0,FT_UID));
  14.  
  15.         $header_subject = header_mime2text($header->subject);
  16.  
  17.         $header_fromaddress = header_mime2text($header->fromaddress);
  18.         $header_fromaddress = htmlentities($header_fromaddress,ENT_QUOTES);
  19.  
  20.         $header_toaddress = header_mime2text($header->toaddress);
  21.         $header_toaddress = htmlentities($header_toaddress,ENT_QUOTES);
  22.  
  23.         $header_date = header_mime2text($header->date);
  24.  
  25.         $header_date_age = time_elapsed_string(strtotime($header_date));
  26.  
  27.         $header_ccaddress = header_mime2text($header->ccaddress);
  28.         $header_ccaddress = htmlentities($header_ccaddress,ENT_QUOTES);
  29.  
  30.         $header_bccaddress = header_mime2text($header->bccaddress);
  31.         $header_bccaddress = htmlentities($header_bccaddress,ENT_QUOTES);
  32.  
  33.         $header_fetch = imap_fetchheader($mbox,$msgno,FT_UID|FT_PREFETCHTEXT);
  34.  
  35.         $header_raw_lines = explode("\r\n",$header_fetch);
  36.  
  37.         foreach ($header_raw_lines as $header_raw_line) {
  38.  
  39.                 if (strstr($header_raw_line,"X-Mailer:")) {
  40.                         $header_mailer = $header_raw_line;
  41.                 }
  42.  
  43.                 if (strstr($header_raw_line,"User-Agent:")) {
  44.                         $header_user_agent = $header_raw_line;
  45.                 }
  46.  
  47.                 if (strstr($header_raw_line,"X-Priority: 1")) {
  48.                         $header_priority = $header_raw_line;
  49.                 }
  50.  
  51.                 if (strstr($header_raw_line,"Importance: High")) {
  52.                         $header_priority = $header_raw_line;
  53.                 }
  54.  
  55.                 if (strstr($header_raw_line,"X-Confirm-Reading-To:")) {
  56.                         $header_rr = $header_raw_line;
  57.                 }
  58.  
  59.                 if (strstr($header_raw_line,"Disposition-Notification-To:")) {
  60.                         $header_rr = $header_raw_line;
  61.                 }
  62.  
  63.                 if (strstr($header_raw_line,"Return-Receipt-To:")) {
  64.                         $header_dr = $header_raw_line;
  65.                 }
  66.         }
  67.  
  68.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  69.  
  70.                 $imap_search_query = $_POST['imap_search_query'];
  71.                 $imap_search_where = $_POST['imap_search_where'];
  72.                 $imap_search_criteria = $imap_search_where . ' "'. $imap_search_query . '"';
  73.                 $mbox_sort = imap_search($mbox,$imap_search_criteria,SE_UID);
  74.  
  75.                 rsort($mbox_sort);
  76.  
  77.                 if ($mbox_sort) {
  78.                         $msgCount = count($mbox_sort);
  79.                 }
  80.                 else {
  81.                         $msgCount = 0;
  82.                 }
  83.         }
  84.         else {
  85.                 $mbox_sort = imap_sort($mbox,SORTARRIVAL,1,SE_UID|SE_NOPREFETCH);
  86.         }
  87.  
  88.         $mbox_row = array_search($msgno, $mbox_sort);
  89.  
  90.         $mbox_row_prev = $mbox_row - 1;
  91.         $mbox_row_next = $mbox_row + 1;
  92.  
  93.         $msgno_next = $mbox_sort[$mbox_row_prev];
  94.         $msgno_prev = $mbox_sort[$mbox_row_next];
  95.  
  96.         echo "<title>Kartero - $folder - $header_subject</title>";
  97.  
  98.         echo "<table border=\"0\" cellspacing=\"0\" callpadding=\"0\" width=\"100%\"><tr><td valign=\"top\">";
  99.  
  100.         echo "<div class=\"message\">";
  101.  
  102.         $fileFrom = extract_emails_from($header_fromaddress);
  103.         $fileFrom = $fileFrom[0];
  104.         $fileFrom = sha1($fileFrom);
  105.  
  106.         $filePic = "";
  107.  
  108.         if (file_exists("images/contacts/$fileUsr/{$fileFrom}.gif") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.jpg") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.png")) {
  109.                 $filePic = "images/contacts/$fileUsr/{$fileFrom}.gif";
  110.         }
  111.  
  112.         if (!file_exists("images/contacts/$fileUsr/{$fileFrom}.gif") and file_exists("images/contacts/$fileUsr/{$fileFrom}.jpg") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.png")) {
  113.                 $filePic = "images/contacts/$fileUsr/{$fileFrom}.jpg";
  114.         }
  115.  
  116.         if (!file_exists("images/contacts/$fileUsr/{$fileFrom}.gif") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.jpg") and file_exists("images/contacts/$fileUsr/{$fileFrom}.png")) {
  117.                 $filePic = "images/contacts/$fileUsr/{$fileFrom}.png";
  118.         }
  119.  
  120.         if ($filePic != "") {
  121.  
  122.                 $filePicSize = getimagesize($filePic);
  123.  
  124.                 if (($filePicSize[0] > 0) and ($filePicSize[1] > 0)) {
  125.  
  126.                         //echo "<style> .apic { padding: 3px; background: #fff; -moz-box-shadow: 1px 1px 3px #222; -khtml-box-shadow: 1px 1px 3px #222; -webkit-box-shadow: 1px 1px 3px #222; box-shadow: 1px 1px 3px #222; } </style>";
  127.                         echo "<img class=\"apic\" src=\"$filePic\" border=\"0\" width=\"{$filePicSize[0]}\" height=\"{$filePicSize[1]}\" align=\"right\">";
  128.                 }
  129.         }
  130.  
  131.         if ($header_priority != "") {
  132.                 echo "<b style=\"color: red; text-shadow: 0.1em 0.1em #dedede;\">!</b> ";
  133.         }
  134.  
  135.         echo "<b>Subject: $header_subject</b>";
  136.         echo "<br><br>From: $header_fromaddress";
  137.         echo "<br>To: $header_toaddress";
  138.  
  139.         if ($header_ccaddress != "") {
  140.                 echo "<br>Cc: $header_ccaddress";
  141.         }
  142.  
  143.         if ($header_bccaddress != "") {
  144.                 echo "<br>Bcc: $header_bccaddress";
  145.         }
  146.  
  147.         echo "<br>Date: $header_date ($header_date_age ago)";
  148.  
  149.         if ($header_mailer != "") {
  150.                 echo "<br>$header_mailer";
  151.         }
  152.  
  153.         if (($header_user_agent != "") and ($header_mailer == "")) {
  154.                 echo "<br>$header_user_agent";
  155.         }
  156. /*
  157.         if ($header_rr != "") {
  158.                 echo "<br>$header_rr";
  159.         }
  160.  
  161.         if ($header_dr != "") {
  162.                 echo "<br>$header_dr";
  163.         }
  164. */
  165. echo " ";
  166.  
  167. echo "<span class=\"label\" id=\"headerM\" onclick=\"document.getElementById('header1').className ='message';document.getElementById('header2').className='spacer';document.getElementById('headerL').className='label';document.getElementById('headerM').className='hide'\">+</span>";
  168.  
  169. echo "<span class=\"hide\" id=\"headerL\" onclick=\"document.getElementById('header1').className ='hide';document.getElementById('header2').className='hide';document.getElementById('headerL').className='hide';document.getElementById('headerM').className='label'\">-</span>";
  170.  
  171.         echo "</div>";
  172.  
  173.         echo "<div class=\"spacer\"></div>";
  174.  
  175.         echo "<div id=\"header1\" class=\"hide\">";
  176.         echo nl2br(htmlentities(preg_replace('/^\n+|^[\t\s]*\n+/m','',$header_fetch),ENT_QUOTES));
  177.         echo "</div>";
  178.  
  179.         echo "<div id=\"header2\" class=\"hide\"></div>";
  180.  
  181.         $fileDir = sha1(microtime(true));
  182.  
  183.         echo "<div class=\"message\" style=\"padding: 2px;\">";
  184.  
  185.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>";
  186.  
  187.         echo "<form method=\"post\"><td class=\"label\">";
  188.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  189.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  190.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  191.  
  192.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  193.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  194.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  195.         }
  196.  
  197.         if ($folder == "Trash") {
  198.                 echo "<input type=\"hidden\" name=\"del\" value=\"0\">";
  199.                 echo "<input type=\"image\" src=\"images/trashcan_full.png\">";
  200.         }
  201.         else {
  202.                 echo "<input type=\"hidden\" name=\"del\" value=\"1\">";
  203.                 echo "<input type=\"image\" src=\"images/trashcan_empty.png\">";
  204.         }
  205.  
  206.         echo "</td></form>";
  207.  
  208.         echo "<td></td>";
  209.  
  210.         echo "<form method=\"post\"><td class=\"label\">";
  211.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  212.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  213.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  214.         echo "<input type=\"hidden\" name=\"not\" value=\"1\">";
  215.  
  216.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  217.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  218.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  219.         }
  220.  
  221.         echo "<input type=\"image\" src=\"images/mail-unread.png\">";
  222.         echo "</td></form>";
  223.        
  224.         echo "<td width=\"5\"></td>";
  225.  
  226.         echo "<form method=\"post\"><td class=\"label\">";
  227.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  228.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  229.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  230.         echo "<input type=\"hidden\" name=\"rep\" value=\"4\">";
  231.  
  232.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  233.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  234.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  235.         }
  236.  
  237.         echo "<input type=\"image\" src=\"images/mail-redirect.png\">";
  238.         echo "</td></form>";
  239.  
  240.         echo "<td width=\"5\"></td>";
  241.  
  242.         echo "<form method=\"post\"><td class=\"label\">";
  243.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  244.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  245.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  246.         echo "<input type=\"hidden\" name=\"rep\" value=\"2\">";
  247.  
  248.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  249.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  250.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  251.         }
  252.  
  253.         echo "<input type=\"image\" src=\"images/mail-forward.png\">";
  254.         echo "</td></form>";
  255.  
  256.         echo "<td width=\"5\"></td>";
  257.  
  258.         if (strpos($header->toaddress,",")) {
  259.  
  260.                 echo "<form method=\"post\"><td class=\"label\">";
  261.                 echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  262.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  263.                 echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  264.                 echo "<input type=\"hidden\" name=\"rep\" value=\"3\">";
  265.  
  266.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  267.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  268.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  269.                 }
  270.  
  271.                 echo "<input type=\"image\" src=\"images/mail-reply-all.png\">";
  272.                 echo "</td></form>";
  273.  
  274.                 echo "<td width=\"5\"></td>";
  275.         }
  276.  
  277.         echo "<form method=\"post\"><td class=\"label\">";
  278.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  279.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  280.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  281.         echo "<input type=\"hidden\" name=\"rep\" value=\"1\">";
  282.  
  283.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  284.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  285.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  286.         }
  287.  
  288.         echo "<input type=\"image\" src=\"images/mail-reply.png\">";
  289.         echo "</td></form>";
  290.  
  291.         echo "<td width=\"5\"></td>";
  292.  
  293.         if ($msgno_next != "") {
  294.                 echo "<form method=\"post\"><td class=\"label\">";
  295.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  296.                 echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno_next\">";
  297.                 echo "<input type=\"hidden\" name=\"get\" value=\"1\">";
  298.  
  299.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  300.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  301.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  302.                 }
  303.  
  304.                 echo "<input type=\"image\" src=\"images/mail-next.png\">";
  305.                 echo "</td></form>";
  306.  
  307.                 echo "<td width=\"5\"></td>";
  308.         }
  309.  
  310.         if ($msgno_prev != "") {
  311.                 echo "<form method=\"post\"><td class=\"label\">";
  312.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  313.                 echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno_prev\">";
  314.                 echo "<input type=\"hidden\" name=\"get\" value=\"1\">";
  315.  
  316.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  317.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  318.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  319.                 }
  320.  
  321.                 echo "<input type=\"image\" src=\"images/mail-prev.png\">";
  322.                 echo "</td></form>";
  323.         }
  324.  
  325.         echo "</tr><tr>";
  326.  
  327.         if ($folder == "Trash") {
  328.                 echo "<td class=\"label\">undelete</td>";
  329.         }
  330.         else {
  331.                 echo "<td class=\"label\">delete</td>";
  332.         }
  333.  
  334.         echo "<td></td>";
  335.  
  336.         echo "<td class=\"label\">unread</td>";
  337.         echo "<td width=\"5\"></td>";
  338.  
  339.         echo "<td class=\"label\">redirect</td>";
  340.         echo "<td width=\"5\"></td>";
  341.  
  342.         echo "<td class=\"label\">forward</td>";
  343.         echo "<td width=\"5\"></td>";
  344.  
  345.         if (strpos($header->toaddress,",")) {
  346.                 echo "<td class=\"label\"><nobr>reply all</nobr></td>";
  347.                 echo "<td width=\"5\"></td>";
  348.         }
  349.  
  350.         echo "<td class=\"label\">reply</td>";
  351.         echo "<td width=\"5\"></td>";
  352.  
  353.         if ($msgno_next != "") {
  354.                 echo "<td class=\"label\"><nobr>prev msg</nobr></td>";
  355.                 echo "<td width=\"5\"></td>";
  356.         }
  357.  
  358.         if ($msgno_prev != "") {
  359.                 echo "<td class=\"label\"><nobr>next msg</nobr></td>";
  360.         }
  361.  
  362.         echo "</tr></table>";  
  363.        
  364.         echo "</div>";
  365.        
  366.         echo "<div class=\"spacer\"></div>";
  367.  
  368.         $usr_mbox = imap_list($mbox,$host,"*");
  369.         $usr_mbox = array_diff($usr_mbox,array("{$host}INBOX","{$host}Sent","{$host}Trash"));
  370.  
  371.         if ((count($usr_mbox) > 0) and ($folder != "Sent") and ($folder != "Trash")) {
  372.        
  373.                 sort($usr_mbox);
  374.        
  375.                 array_unshift($usr_mbox,"{$host}INBOX");
  376.        
  377.                 echo "<div class=\"message\">";
  378.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
  379.                 echo "<form method=\"post\">";
  380.                 echo "<input type=\"hidden\" name=\"move_msg\" value=\"$msgno\">";
  381.                 echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  382.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  383.        
  384.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  385.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  386.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  387.                 }
  388.  
  389.                 echo "<tr><td><select name=\"move_box\" onchange=\"this.form.submit();\">";
  390.                 echo "<option value=\"\" selected>$folder</option>";
  391.  
  392.                 foreach ($usr_mbox as $move_box) {
  393.        
  394.                         $move_box = str_replace($host,"",$move_box);
  395.        
  396.                         if ($folder == $move_box) {
  397.                                 continue;
  398.                         }
  399.  
  400.                         echo "<option value=\"$move_box\">$move_box</option>";
  401.                 }
  402.  
  403.                 echo "</select></td>";
  404.                 echo "<noscript><td><input type=\"submit\" value=\"move\"></td></noscript>";
  405.                 echo "</tr></form></table>";
  406.                 echo "</div>";
  407.        
  408.                 echo "<div class=\"spacer\"></div>";
  409.         }
  410.  
  411.  
  412.  
  413.         echo "<div class=\"message\">";
  414.  
  415.         $filePath = "attach/o/$fileUsr/$fileDir";
  416.  
  417.         $emailMessage = new EmailMessage($mbox, imap_msgno($mbox,$msgno));
  418.         $emailMessage->fetch();
  419.  
  420.         if (count($emailMessage->attachments > 0)) {
  421.  
  422.                 if (!file_exists($filePath)) {
  423.                         mkdir($filePath,0700,1);
  424.                 }
  425.        
  426.                 foreach ($emailMessage->attachments as $key => $attachment) {
  427.  
  428.                         $fileContent = $attachment[data];
  429.  
  430.                         if (($fileContent != "") and (($attachment[inline] == 1) or ($attachment[filename] == ""))) {
  431.                                 $fileName = $key;
  432.                         }      
  433.                         else {
  434.                                 $fileName = $attachment[filename];
  435.                         }
  436.  
  437.                         $fileName = str_replace(" ", "_", $fileName);
  438.                         $fileName = preg_replace("/[^a-zA-Z0-9.\-_@]/u", "", $fileName);
  439.  
  440.                         if (!file_exists("$filePath/$fileName") and (mb_strlen($fileContent,"8bit") > 0)) {
  441.                                 file_put_contents("$filePath/$fileName",$fileContent);
  442.                         }
  443.                 }
  444.         }
  445.  
  446.         $bodyTEXT = get_part($mbox, $msgno, "TEXT/PLAIN");
  447.         $bodyHTML = get_part($mbox, $msgno, "TEXT/HTML");
  448.  
  449.         if ($bodyHTML != "") {
  450.  
  451.                 $msgBody = $bodyHTML;
  452.  
  453.                 if (stristr($msgBody,'src="cid:')) {
  454.                         $msgBody = str_ireplace('src="cid:',"src=\"$filePath/",$msgBody);
  455.                 }
  456.  
  457.                 if (stristr($msgBody,'src=cid:')) {
  458.                         $msgBody = str_ireplace('src=cid:',"src=$filePath/",$msgBody);
  459.                 }
  460.         }
  461.         else {
  462.                 $msgBody = trim($bodyTEXT);
  463.                 $msgBody = nl2br($msgBody);
  464.                 $msgBody = preg_replace("/([^\w\/])(www\.[a-z0-9\-]+\.[a-z0-9\-]+)/i","$1http://$2",$msgBody);
  465.                 $msgBody = preg_replace("/([\w]+:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/i","<a target=\"_blank\" href=\"$1\">$1</a>",$msgBody);
  466.                 $msgBody = preg_replace("/([\w-?&;#~=\.\/]+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?))/i","<a href=\"mailto:$1\">$1</a>",$msgBody);
  467.         }
  468.  
  469.         $msgBody = mb_convert_encoding($msgBody,"UTF-8","auto");
  470.         $msgBody = mb_convert_encoding($msgBody,"UTF-8","UTF-8");
  471.  
  472.         $get_fromaddress = extract_emails_from($header->fromaddress);
  473.         $get_fromaddress = explode("@",$get_fromaddress[0]);
  474.  
  475.         if (strtoupper($get_fromaddress[0]) == "MAILER-DAEMON") {
  476.                 echo nl2br(htmlentities(imap_body($mbox,$msgno,FT_UID)));
  477.         }
  478.         else {
  479.                 echo $msgBody;
  480.         }
  481.  
  482.         echo "</div>";
  483.  
  484.         if (file_exists("$filePath")) {
  485.                
  486.                 $fileAttachments = glob("$filePath/*");
  487.  
  488.                 if (count($fileAttachments) > 0) {
  489.  
  490.                         sort($fileAttachments);
  491.                         reset($fileAttachments);
  492.        
  493.                         echo "<div class=\"spacer\"></div>";
  494.        
  495.                         echo "<div class=\"message\" style=\"position: relative;\">";
  496.        
  497.                         echo "<div style=\"position: absolute; top: -15; right: -15;\"><img src=\"images/attach.png\" border=\"0\" width=\"48\" height=\"48\"></div>";
  498.        
  499.                         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\">";
  500.                
  501.                         foreach ($fileAttachments as $fileAttachment) {
  502.  
  503.                                 $fileName = str_replace("$filePath/","",$fileAttachment);
  504.  
  505.                                 $fileSize = filesize($fileAttachment);
  506.                                 $fileSize = HumanReadableFilesize($fileSize);
  507.  
  508.                                 $fileScan = "";
  509.  
  510.                                 $scanFile = exec("clamdscan -i --no-summary $fileAttachment",$scanResult,$scanErr);
  511.  
  512.                                 if ($scanErr == "1") {
  513.  
  514.                                         $fileScan = explode(" ", $scanFile);
  515.                                         $fileScan = " <font color=\"red\">{$fileScan[1]}</font>";
  516.                                 }
  517.  
  518.                                 if (is_image($fileAttachment)) {
  519.  
  520.                                         $img_size = getimagesize($fileAttachment);
  521.  
  522.                                         $imgSize = "";
  523.  
  524.                                         if (($img_size[0] > 0) and ($img_size[1] > 0)) {
  525.  
  526.                                                 $imgSize = ", {$img_size[0]}x{$img_size[1]} pixels";
  527.  
  528.                                                 if ($img_size[bits] > 0) {
  529.  
  530.                                                         $imgSize = "$imgSize, {$img_size[bits]}-bit image";
  531.                                                 }
  532.                                         }
  533.  
  534.                                         echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}{$fileScan}</td></tr>\r\n";
  535.                                 }
  536.                                 else {
  537.                                         echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
  538.                                 }
  539.                         }
  540.        
  541.                         echo "</table>";
  542.                         echo "</div>";
  543.  
  544.                         $_SESSION['clean_up_o'] = $fileDir;
  545.                 }
  546.                 else {
  547.                         rmdirr($filePath);
  548.                 }
  549.         }
  550.  
  551.         echo "</td></tr></table>";
  552. }
  553.  
  554. ?>
  555.  
filedropkartero.git-41992ae.tar.bz2 new
412.12 KB
28 downloads
filedropkartero.git-41992ae.zip
448.41 KB
12 downloads
filedropkartero.git-b404ba2.tar.bz2
411.70 KB
26 downloads
filedropkartero.git-b404ba2.zip
447.96 KB
9 downloads
filedropkartero.git-a7684d9.tar.bz2
411.72 KB
261 downloads
filedropkartero.git-a7684d9.zip
447.96 KB
373 downloads
filedropkartero.git-83512be.tar.bz2
410.26 KB
252 downloads
filedropkartero.git-83512be.zip
445.30 KB
208 downloads
filedropkartero.git-1954b25.tar.bz2
410.21 KB
245 downloads
filedropkartero.git-1954b25.zip
445.30 KB
205 downloads
filedropkartero.git-2f7c910.tar.bz2
410.25 KB
236 downloads
filedropkartero.git-2f7c910.zip
445.29 KB
191 downloads
filedropkartero.git-6317ffb.tar.bz2
410.40 KB
218 downloads
filedropkartero.git-6317ffb.zip
445.28 KB
173 downloads
filedropkartero.git-60ccd7a.tar.bz2
410.40 KB
205 downloads
filedropkartero.git-60ccd7a.zip
445.20 KB
169 downloads
filedropkartero.git-ea6f885.tar.bz2
410.47 KB
9 downloads
filedropkartero.git-ea6f885.zip
445.26 KB
149 downloads
filedropkartero.git-7f580e5.zip
445.17 KB
139 downloads
filedropkartero.git-7f580e5.tar.bz2
410.18 KB
163 downloads
filedropkartero.git-b9364de.tar.bz2
409.41 KB
153 downloads
filedropkartero.git-b9364de.zip
444.09 KB
396 downloads
filedropkartero.git-e9bcd78.zip
444.03 KB
377 downloads
filedropkartero.git-e9bcd78.tar.bz2
409.39 KB
422 downloads
filedropkartero.git-96c60ff.tar.bz2
407.96 KB
416 downloads
filedropkartero.git-96c60ff.zip
441.87 KB
350 downloads
filedropkartero.git-4357b59.tar.bz2
407.17 KB
408 downloads
filedropkartero.git-4357b59.zip
440.69 KB
352 downloads
filedropkartero.git-c6ff319.tar.bz2
407.28 KB
407 downloads
filedropkartero.git-c6ff319.zip
440.70 KB
333 downloads
filedropkartero.git-8b87a29.tar.bz2
407.27 KB
388 downloads
filedropkartero.git-8b87a29.zip
440.71 KB
332 downloads
filedropkartero.git-ee42942.tar.bz2
406.49 KB
347 downloads
filedropkartero.git-ee42942.zip
439.92 KB
310 downloads
filedropkartero.git-867e7e6.tar.bz2
406.75 KB
370 downloads
filedropkartero.git-867e7e6.zip
440.03 KB
313 downloads
filedropkartero.git-3f3fc02.tar.bz2
406.38 KB
365 downloads
filedropkartero.git-3f3fc02.zip
439.71 KB
337 downloads
filedropkartero.git-b6f779d.tar.bz2
406.55 KB
384 downloads
filedropkartero.git-b6f779d.zip
440.00 KB
297 downloads
filedropkartero.git-83f24b0.zip
439.12 KB
279 downloads
filedropkartero.git-52316ec.tar.bz2
406.17 KB
340 downloads
filedropkartero.git-52316ec.zip
439.18 KB
303 downloads
filedropkartero.git-83f24b0.tar.bz2
405.84 KB
336 downloads
filedropkartero.git-8a42d47.tar.bz2
405.73 KB
302 downloads
filedropkartero.git-8a42d47.zip
439.02 KB
275 downloads
filedropkartero.git-830c9cb.tar.bz2
406.08 KB
305 downloads
filedropkartero.git-830c9cb.zip
439.08 KB
273 downloads
filedropkartero.git-ebec1be.tar.bz2
406.16 KB
308 downloads
filedropkartero.git-ebec1be.zip
439.09 KB
303 downloads
filedropkartero.git-7c0b70f.tar.bz2
402.43 KB
292 downloads
filedropkartero.git-7c0b70f.zip
435.91 KB
266 downloads
filedropkartero.git-80edc03.tar.bz2
402.75 KB
306 downloads
filedropkartero.git-80edc03.zip
435.84 KB
278 downloads
filedropkartero.git-b408c23.tar.bz2
402.19 KB
298 downloads
filedropkartero.git-b408c23.zip
435.59 KB
282 downloads
filedropkartero.git-29c0e1f.tar.bz2
401.84 KB
301 downloads
filedropkartero.git-29c0e1f.zip
435.25 KB
294 downloads
filedropkartero.git-9086094.tar.bz2
401.94 KB
302 downloads
filedropkartero.git-9086094.zip
435.34 KB
295 downloads
filedropkartero.git-47ca624.tar.bz2
402.10 KB
300 downloads
filedropkartero.git-47ca624.zip
435.51 KB
262 downloads
filedropkartero.git-81314a5.zip
435.53 KB
282 downloads
filedropkartero.git-81314a5.tar.bz2
402.25 KB
297 downloads
filedropkartero.git-cae7074.zip
435.20 KB
278 downloads
filedropkartero.git-cae7074.tar.bz2
401.98 KB
313 downloads
filedropkartero.git-cc68e56.tar.bz2
402.07 KB
295 downloads
filedropkartero.git-cc68e56.zip
435.16 KB
308 downloads
filedropkartero.git-230f35d.tar.bz2
401.43 KB
281 downloads
filedropkartero.git-230f35d.zip
434.68 KB
295 downloads
filedropkartero.git-5ae58a2.tar.bz2
401.54 KB
284 downloads
filedropkartero.git-5ae58a2.zip
434.68 KB
268 downloads
filedropkartero.git-a591f4b.tar.bz2
401.76 KB
282 downloads
filedropkartero.git-a591f4b.zip
435.17 KB
276 downloads
filedropkartero.git-36876c8.tar.bz2
400.44 KB
280 downloads
filedropkartero.git-36876c8.zip
432.36 KB
298 downloads
filedropkartero.git-a34c9ed.tar.bz2
400.57 KB
304 downloads
filedropkartero.git-a34c9ed.zip
432.27 KB
289 downloads
filedropkartero.git-e828148.zip
433.58 KB
268 downloads
filedropkartero.git-e828148.tar.bz2
400.88 KB
291 downloads
filedropkartero.git-476cdda.tar.bz2
400.60 KB
321 downloads
filedropkartero.git-476cdda.zip
432.26 KB
281 downloads
filedropkartero.git-054c286.tar.bz2
98.09 KB
366 downloads
filedropkartero.git-054c286.zip
109.53 KB
341 downloads
filedropkartero.git-071b099.tar.bz2
98.76 KB
369 downloads
filedropkartero.git-071b099.zip
110.21 KB
341 downloads
filedropkartero.git-551c38d.tar.bz2
98.51 KB
374 downloads
filedropkartero.git-551c38d.zip
110.20 KB
333 downloads
filedropkartero.git-569dc0c.tar.bz2
98.40 KB
369 downloads
filedropkartero.git-569dc0c.zip
109.86 KB
325 downloads
filedropkartero.git-58a052b.tar.bz2
97.95 KB
368 downloads
filedropkartero.git-58a052b.zip
109.36 KB
337 downloads
filedropkartero.git-43a5af3.tar.bz2
97.80 KB
362 downloads
filedropkartero.git-43a5af3.zip
109.30 KB
335 downloads
filedropkartero.git-bbe069d.tar.bz2
98.03 KB
376 downloads
filedropkartero.git-bbe069d.zip
109.19 KB
339 downloads
filedropkartero.git-02f97e1.tar.bz2
97.76 KB
342 downloads
filedropkartero.git-02f97e1.zip
109.24 KB
431 downloads
filedropkartero.git-d82e393.tar.bz2
97.74 KB
374 downloads
filedropkartero.git-d82e393.zip
109.24 KB
340 downloads
filedropkartero.git-7cdd1f5.tar.bz2
98.03 KB
357 downloads
filedropkartero.git-7cdd1f5.zip
109.24 KB
321 downloads
filedropkartero.git-40825aa.tar.bz2
97.71 KB
358 downloads
filedropkartero.git-40825aa.zip
109.16 KB
358 downloads
filedropkartero.git-3dd941b.tar.bz2
97.69 KB
356 downloads
filedropkartero.git-3dd941b.zip
109.12 KB
332 downloads
filedropkartero.git-50f1e46.tar.bz2
97.65 KB
365 downloads
filedropkartero.git-50f1e46.zip
109.02 KB
335 downloads
filedropkartero.git-fdf9225.tar.bz2
93.19 KB
396 downloads
filedropkartero.git-fdf9225.zip
104.25 KB
345 downloads
filedropkartero.git-21415da.tar.bz2
93.24 KB
353 downloads
filedropkartero.git-21415da.zip
104.22 KB
346 downloads
filedropkartero.git-aff5e89.tar.bz2
93.17 KB
373 downloads
filedropkartero.git-aff5e89.zip
104.22 KB
337 downloads
filedropkartero.git-b27ef39.tar.bz2
91.97 KB
373 downloads
filedropkartero.git-b27ef39.zip
102.80 KB
362 downloads
filedropkartero.git-3d6e8a2.tar.bz2
91.99 KB
355 downloads
filedropkartero.git-3d6e8a2.zip
102.77 KB
359 downloads
filedropkartero.git-1442b69.tar.bz2
91.79 KB
351 downloads
filedropkartero.git-1442b69.zip
102.50 KB
362 downloads
filedropkartero.git-6d15918.tar.bz2
91.56 KB
374 downloads
filedropkartero.git-6d15918.zip
102.28 KB
330 downloads
filedropkartero.git-45140d8.tar.bz2
91.52 KB
376 downloads
filedropkartero.git-45140d8.zip
102.23 KB
335 downloads
filedropkartero.git-d5b48e5.tar.bz2
91.35 KB
364 downloads
filedropkartero.git-d5b48e5.zip
102.01 KB
347 downloads
filedropkartero.git-e007e55.tar.bz2
91.35 KB
376 downloads
filedropkartero.git-e007e55.zip
102.01 KB
319 downloads
filedropkartero.git-30fd7e3.tar.bz2
90.87 KB
352 downloads
filedropkartero.git-30fd7e3.zip
101.44 KB
348 downloads
filedropkartero.git-421a4a7.tar.bz2
88.02 KB
91 downloads
filedropkartero.git-421a4a7.zip
97.96 KB
323 downloads
filedropkartero.git-b49b8bc.tar.bz2
88.09 KB
394 downloads
filedropkartero.git-b49b8bc.zip
97.99 KB
340 downloads
filedropkartero.git-1cc9571.tar.bz2
87.74 KB
371 downloads
filedropkartero.git-1cc9571.zip
97.70 KB
344 downloads
filedropkartero.git-159152f.tar.bz2
87.60 KB
369 downloads
filedropkartero.git-159152f.zip
97.52 KB
350 downloads
filedropkartero.git-35caaf3.tar.bz2
87.74 KB
353 downloads
filedropkartero.git-35caaf3.zip
97.57 KB
333 downloads
filedropkartero.git-3c9d305.zip
96.67 KB
336 downloads
filedropkartero.git-3c9d305.tar.bz2
86.77 KB
359 downloads
filedropkartero.git-14cb2af.tar.bz2
86.41 KB
358 downloads
filedropkartero.git-14cb2af.zip
96.13 KB
340 downloads
filedropkartero.git-e8f00cb.tar.bz2
86.46 KB
378 downloads
filedropkartero.git-e8f00cb.zip
96.21 KB
329 downloads
filedropkartero.git-bdab380.tar.bz2
86.14 KB
371 downloads
filedropkartero.git-bdab380.zip
95.79 KB
332 downloads
filedropkartero.git-48f9134.tar.bz2
85.78 KB
375 downloads
filedropkartero.git-48f9134.zip
95.48 KB
343 downloads
filedropkartero.git-adb9757.tar.bz2
85.67 KB
364 downloads
filedropkartero.git-adb9757.zip
95.37 KB
334 downloads
filedropkartero.git-1601cbd.zip
95.30 KB
346 downloads
filedropkartero.git-1601cbd.tar.bz2
85.69 KB
346 downloads
filedropkartero.git-18a5106.tar.bz2
85.72 KB
347 downloads
filedropkartero.git-18a5106.zip
95.48 KB
349 downloads
filedropkartero.git-a5b1caa.tar.bz2
85.61 KB
381 downloads
filedropkartero.git-a5b1caa.zip
95.36 KB
342 downloads
filedropkartero.git-effff82.zip
97.06 KB
355 downloads
filedropkartero.git-effff82.tar.bz2
87.13 KB
369 downloads
filedropkartero.git-b70d364.tar.bz2
84.09 KB
407 downloads
filedropkartero.git-b70d364.zip
93.67 KB
348 downloads
filedropkartero.git-48f0e53.tar.bz2
84.16 KB
381 downloads
filedropkartero.git-48f0e53.zip
93.66 KB
342 downloads
filedropkartero.git-c17135e.tar.bz2
84.09 KB
364 downloads
filedropkartero.git-c17135e.zip
93.57 KB
328 downloads
filedropkartero.git-a2e2848.tar.bz2
85.59 KB
367 downloads
filedropkartero.git-a2e2848.zip
100.10 KB
341 downloads
filedropkartero.git-1f683db.tar.bz2
83.55 KB
367 downloads
filedropkartero.git-1f683db.zip
93.24 KB
337 downloads
filedropkartero.git-d342596.tar.bz2
83.57 KB
367 downloads
filedropkartero.git-d342596.zip
93.28 KB
328 downloads
filedropkartero.git-e0131d5.tar.bz2
83.55 KB
368 downloads
filedropkartero.git-e0131d5.zip
93.27 KB
345 downloads
filedropkartero.git-ad467e8.tar.bz2
83.13 KB
377 downloads
filedropkartero.git-ad467e8.zip
92.78 KB
334 downloads
filedropkartero.git-b20e27d.tar.bz2
83.46 KB
382 downloads
filedropkartero.git-b20e27d.zip
93.19 KB
360 downloads
filedropkartero.git-eefd8fe.zip
92.67 KB
366 downloads
filedropkartero.git-eefd8fe.tar.bz2
83.01 KB
368 downloads
filedropkartero.git-bea685a.zip
96.88 KB
341 downloads
filedropkartero.git-bea685a.tar.bz2
84.44 KB
361 downloads
filedropkartero.git-a8bd019.tar.bz2
84.25 KB
377 downloads
filedropkartero.git-a8bd019.zip
96.60 KB
336 downloads
filedropkartero.git-cbc914d.tar.bz2
84.38 KB
370 downloads
filedropkartero.git-cbc914d.zip
96.64 KB
325 downloads
filedropkartero.git-09a2e70.tar.bz2
84.40 KB
349 downloads
filedropkartero.git-09a2e70.zip
96.70 KB
349 downloads
filedropkartero.git-641dc05.tar.bz2
84.37 KB
369 downloads
filedropkartero.git-641dc05.zip
96.73 KB
337 downloads
filedropkartero.git-cde49c6.tar.bz2
84.26 KB
379 downloads
filedropkartero.git-cde49c6.zip
96.59 KB
340 downloads
filedropkartero.git-1d004e0.tar.bz2
77.42 KB
380 downloads
filedropkartero.git-1d004e0.zip
87.56 KB
22 downloads
filedropkartero.git-1f0bf17.tar.bz2
77.47 KB
377 downloads
filedropkartero.git-1f0bf17.zip
87.56 KB
336 downloads
filedropkartero.git-265e63c.tar.bz2
77.43 KB
358 downloads
filedropkartero.git-265e63c.zip
87.52 KB
369 downloads
filedropkartero.git-635a5db.zip
87.60 KB
338 downloads
filedropkartero.git-a041f85.tar.bz2
77.37 KB
382 downloads
filedropkartero.git-a041f85.zip
87.52 KB
368 downloads
filedropkartero.git-ae049a7.tar.bz2
77.44 KB
379 downloads
filedropkartero.git-ae049a7.zip
87.52 KB
338 downloads
filedropkartero.git-eef571a.tar.bz2
20.56 KB
491 downloads
filedropkartero.git-eef571a.zip
25.69 KB
468 downloads
filedropkartero.git-0bc16f5.tar.bz2
82.61 KB
398 downloads
filedropkartero.git-0bc16f5.zip
94.75 KB
375 downloads
filedropkartero.git-2afc0f7.tar.bz2
83.61 KB
397 downloads
filedropkartero.git-2afc0f7.zip
96.00 KB
392 downloads
filedropkartero.git-3529bdf.tar.bz2
77.72 KB
363 downloads
filedropkartero.git-3529bdf.zip
87.92 KB
369 downloads
filedropkartero.git-49aac92.tar.bz2
78.98 KB
408 downloads
filedropkartero.git-49aac92.zip
90.01 KB
371 downloads
filedropkartero.git-5d48f21.tar.bz2
78.65 KB
11 downloads
filedropkartero.git-5d48f21.zip
89.51 KB
400 downloads
filedropkartero.git-635a5db.tar.bz2
77.50 KB
420 downloads
filedropkartero.git-6e34786.tar.bz2
77.76 KB
430 downloads
filedropkartero.git-6e34786.zip
88.09 KB
413 downloads
filedropkartero.git-7dc2fd2.tar.bz2
83.51 KB
478 downloads
filedropkartero.git-7dc2fd2.zip
95.99 KB
419 downloads
filedropkartero.git-9cad005.tar.bz2
78.85 KB
474 downloads
filedropkartero.git-9cad005.zip
90.00 KB
462 downloads
filedropkartero.git-b303f61.tar.bz2
82.57 KB
511 downloads
filedropkartero.git-b303f61.zip
94.78 KB
135 downloads
filedropkartero.git-c15ef85.tar.bz2
77.76 KB
166 downloads
filedropkartero.git-c15ef85.zip
88.16 KB
156 downloads
filedropkartero.git-c99e84d.tar.bz2
83.58 KB
188 downloads
filedropkartero.git-c99e84d.zip
96.01 KB
170 downloads
filedropkartero.git-e5009e6.tar.bz2
78.73 KB
198 downloads
filedropkartero.git-e5009e6.zip
89.69 KB
184 downloads
filedropkartero.git-0502d01.tar.bz2
83.54 KB
213 downloads
filedropkartero.git-0502d01.zip
96.00 KB
195 downloads
filedropkartero.git-44ca46d.tar.bz2
83.73 KB
226 downloads
filedropkartero.git-44ca46d.zip
96.20 KB
204 downloads
filedropkartero.git-834f923.tar.bz2
83.75 KB
229 downloads
filedropkartero.git-834f923.zip
96.14 KB
214 downloads