kartero.org

kartero.org

Git

This blob has been accessed 292 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.         $header_date = preg_replace("/\([^\)]+\)/","",$header_date);
  25.         $header_date = trim($header_date);
  26.         $header_date_age = time_elapsed_string(strtotime($header_date));
  27.  
  28.         $header_ccaddress = header_mime2text($header->ccaddress);
  29.         $header_ccaddress = htmlentities($header_ccaddress,ENT_QUOTES);
  30.  
  31.         $header_bccaddress = header_mime2text($header->bccaddress);
  32.         $header_bccaddress = htmlentities($header_bccaddress,ENT_QUOTES);
  33.  
  34.         $header_fetch = imap_fetchheader($mbox,$msgno,FT_UID|FT_PREFETCHTEXT);
  35.  
  36.         $header_raw_lines = explode("\r\n",$header_fetch);
  37.  
  38.         foreach ($header_raw_lines as $header_raw_line) {
  39.  
  40.                 if (strstr($header_raw_line,"X-Mailer:")) {
  41.                         $header_mailer = $header_raw_line;
  42.                 }
  43.  
  44.                 if (strstr($header_raw_line,"User-Agent:")) {
  45.                         $header_user_agent = $header_raw_line;
  46.                 }
  47.  
  48.                 if (strstr($header_raw_line,"X-Priority: 1")) {
  49.                         $header_priority = $header_raw_line;
  50.                 }
  51.  
  52.                 if (strstr($header_raw_line,"Importance: High")) {
  53.                         $header_priority = $header_raw_line;
  54.                 }
  55.  
  56.                 if (strstr($header_raw_line,"X-Confirm-Reading-To:")) {
  57.                         $header_rr = $header_raw_line;
  58.                 }
  59.  
  60.                 if (strstr($header_raw_line,"Disposition-Notification-To:")) {
  61.                         $header_rr = $header_raw_line;
  62.                 }
  63.  
  64.                 if (strstr($header_raw_line,"Return-Receipt-To:")) {
  65.                         $header_dr = $header_raw_line;
  66.                 }
  67.         }
  68.  
  69.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  70.  
  71.                 $imap_search_query = $_POST['imap_search_query'];
  72.                 $imap_search_where = $_POST['imap_search_where'];
  73.                 $imap_search_criteria = $imap_search_where . ' "'. $imap_search_query . '"';
  74.                 $mbox_sort = imap_search($mbox,$imap_search_criteria,SE_UID);
  75.  
  76.                 rsort($mbox_sort);
  77.  
  78.                 if ($mbox_sort) {
  79.                         $msgCount = count($mbox_sort);
  80.                 }
  81.                 else {
  82.                         $msgCount = 0;
  83.                 }
  84.         }
  85.         else {
  86.                 $mbox_sort = imap_sort($mbox,SORTARRIVAL,1,SE_UID|SE_NOPREFETCH);
  87.         }
  88.  
  89.         $mbox_row = array_search($msgno, $mbox_sort);
  90.  
  91.         $mbox_row_prev = $mbox_row - 1;
  92.         $mbox_row_next = $mbox_row + 1;
  93.  
  94.         $msgno_next = $mbox_sort[$mbox_row_prev];
  95.         $msgno_prev = $mbox_sort[$mbox_row_next];
  96.  
  97.         echo "<title>Kartero - $folder - $header_subject</title>";
  98.  
  99.         echo "<table border=\"0\" cellspacing=\"0\" callpadding=\"0\" width=\"100%\"><tr><td valign=\"top\">";
  100.  
  101.         echo "<div class=\"message\">";
  102.  
  103.         $fileFrom = extract_emails_from($header_fromaddress);
  104.         $fileFrom = $fileFrom[0];
  105.         $fileFrom = sha1($fileFrom);
  106.  
  107.         $filePic = "";
  108.  
  109.         if (file_exists("images/contacts/$fileUsr/{$fileFrom}.gif") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.jpg") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.png")) {
  110.                 $filePic = "images/contacts/$fileUsr/{$fileFrom}.gif";
  111.         }
  112.  
  113.         if (!file_exists("images/contacts/$fileUsr/{$fileFrom}.gif") and file_exists("images/contacts/$fileUsr/{$fileFrom}.jpg") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.png")) {
  114.                 $filePic = "images/contacts/$fileUsr/{$fileFrom}.jpg";
  115.         }
  116.  
  117.         if (!file_exists("images/contacts/$fileUsr/{$fileFrom}.gif") and !file_exists("images/contacts/$fileUsr/{$fileFrom}.jpg") and file_exists("images/contacts/$fileUsr/{$fileFrom}.png")) {
  118.                 $filePic = "images/contacts/$fileUsr/{$fileFrom}.png";
  119.         }
  120.  
  121.         if ($filePic != "") {
  122.  
  123.                 $filePicSize = getimagesize($filePic);
  124.  
  125.                 if (($filePicSize[0] > 0) and ($filePicSize[1] > 0)) {
  126.  
  127.                         //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>";
  128.                         echo "<img class=\"apic\" src=\"$filePic\" border=\"0\" width=\"{$filePicSize[0]}\" height=\"{$filePicSize[1]}\" align=\"right\">";
  129.                 }
  130.         }
  131.  
  132.         if ($header_priority != "") {
  133.                 echo "<b style=\"color: red; text-shadow: 0.1em 0.1em #dedede;\">!</b> ";
  134.         }
  135.  
  136.         echo "<b>Subject: $header_subject</b>";
  137.         echo "<br><br>From: $header_fromaddress";
  138.         echo "<br>To: $header_toaddress";
  139.  
  140.         if ($header_ccaddress != "") {
  141.                 echo "<br>Cc: $header_ccaddress";
  142.         }
  143.  
  144.         if ($header_bccaddress != "") {
  145.                 echo "<br>Bcc: $header_bccaddress";
  146.         }
  147.  
  148.         if (strlen($header_date) > 0) {
  149.                 echo "<br>Date: $header_date ($header_date_age ago)";
  150.         }
  151.         else {
  152.                 echo "<br>Date: <font color=\"red\">Missing! Sender is non-standards compliant or message is probably spam.</font>";
  153.         }
  154.  
  155.         if ($header_mailer != "") {
  156.                 echo "<br>$header_mailer";
  157.         }
  158.  
  159.         if (($header_user_agent != "") and ($header_mailer == "")) {
  160.                 echo "<br>$header_user_agent";
  161.         }
  162.  
  163.         echo "<a style=\"float: right;\" id=\"headerM\" onclick=\"document.getElementById('header1').className ='message';document.getElementById('header2').className='spacer';document.getElementById('headerL').style.display='inline';document.getElementById('headerM').style.display='none'\">...</a>";
  164.         echo "<a class=\"hide\" style=\"float: right;\" id=\"headerL\" onclick=\"document.getElementById('header1').className ='hide';document.getElementById('header2').className='hide';document.getElementById('headerL').style.display='none';document.getElementById('headerM').style.display='inline'\">...</a>";
  165.  
  166.         echo "</div>";
  167.  
  168.         echo "<div class=\"spacer\"></div>";
  169.  
  170.         echo "<div id=\"header1\" class=\"hide\">";
  171.         echo nl2br(htmlentities(preg_replace('/^\n+|^[\t\s]*\n+/m','',$header_fetch),ENT_QUOTES));
  172.         echo "</div>";
  173.  
  174.         echo "<div id=\"header2\" class=\"hide\"></div>";
  175.  
  176.         $fileDir = sha1(microtime(true));
  177.  
  178.         echo "<div class=\"message\" style=\"padding: 2px;\">";
  179.  
  180.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>";
  181.  
  182.         echo "<form method=\"post\"><td class=\"label\">";
  183.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  184.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  185.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  186.  
  187.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  188.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  189.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  190.         }
  191.  
  192.         if ($folder == "Trash") {
  193.                 echo "<input type=\"hidden\" name=\"del\" value=\"0\">";
  194.                 echo "<input type=\"image\" src=\"images/trashcan_full.png\">";
  195.         }
  196.         else {
  197.                 echo "<input type=\"hidden\" name=\"del\" value=\"1\">";
  198.                 echo "<input type=\"image\" src=\"images/trashcan_empty.png\">";
  199.         }
  200.  
  201.         echo "</td></form>";
  202.  
  203.         echo "<td></td>";
  204.  
  205.         echo "<form method=\"post\"><td class=\"label\">";
  206.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  207.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  208.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  209.         echo "<input type=\"hidden\" name=\"not\" value=\"1\">";
  210.  
  211.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  212.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  213.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  214.         }
  215.  
  216.         echo "<input type=\"image\" src=\"images/mail-unread.png\">";
  217.         echo "</td></form>";
  218.        
  219.         echo "<td width=\"5\"></td>";
  220.  
  221.         echo "<form method=\"post\"><td class=\"label\">";
  222.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  223.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  224.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  225.         echo "<input type=\"hidden\" name=\"rep\" value=\"4\">";
  226.  
  227.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  228.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  229.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  230.         }
  231.  
  232.         echo "<input type=\"image\" src=\"images/mail-redirect.png\">";
  233.         echo "</td></form>";
  234.  
  235.         echo "<td width=\"5\"></td>";
  236.  
  237.         echo "<form method=\"post\"><td class=\"label\">";
  238.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  239.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  240.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  241.         echo "<input type=\"hidden\" name=\"rep\" value=\"2\">";
  242.  
  243.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  244.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  245.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  246.         }
  247.  
  248.         echo "<input type=\"image\" src=\"images/mail-forward.png\">";
  249.         echo "</td></form>";
  250.  
  251.         echo "<td width=\"5\"></td>";
  252.  
  253.         if (strpos($header->toaddress,",")) {
  254.  
  255.                 echo "<form method=\"post\"><td class=\"label\">";
  256.                 echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  257.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  258.                 echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  259.                 echo "<input type=\"hidden\" name=\"rep\" value=\"3\">";
  260.  
  261.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  262.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  263.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  264.                 }
  265.  
  266.                 echo "<input type=\"image\" src=\"images/mail-reply-all.png\">";
  267.                 echo "</td></form>";
  268.  
  269.                 echo "<td width=\"5\"></td>";
  270.         }
  271.  
  272.         echo "<form method=\"post\"><td class=\"label\">";
  273.         echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  274.         echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  275.         echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno\">";
  276.         echo "<input type=\"hidden\" name=\"rep\" value=\"1\">";
  277.  
  278.         if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  279.                 echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  280.                 echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  281.         }
  282.  
  283.         echo "<input type=\"image\" src=\"images/mail-reply.png\">";
  284.         echo "</td></form>";
  285.  
  286.         echo "<td width=\"5\"></td>";
  287.  
  288.         if ($msgno_next != "") {
  289.                 echo "<form method=\"post\"><td class=\"label\">";
  290.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  291.                 echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno_next\">";
  292.                 echo "<input type=\"hidden\" name=\"get\" value=\"1\">";
  293.  
  294.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  295.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  296.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  297.                 }
  298.  
  299.                 echo "<input type=\"image\" src=\"images/mail-next.png\">";
  300.                 echo "</td></form>";
  301.  
  302.                 echo "<td width=\"5\"></td>";
  303.         }
  304.  
  305.         if ($msgno_prev != "") {
  306.                 echo "<form method=\"post\"><td class=\"label\">";
  307.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  308.                 echo "<input type=\"hidden\" name=\"msg\" value=\"$msgno_prev\">";
  309.                 echo "<input type=\"hidden\" name=\"get\" value=\"1\">";
  310.  
  311.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  312.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  313.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  314.                 }
  315.  
  316.                 echo "<input type=\"image\" src=\"images/mail-prev.png\">";
  317.                 echo "</td></form>";
  318.         }
  319.  
  320.         echo "</tr><tr>";
  321.  
  322.         if ($folder == "Trash") {
  323.                 echo "<td class=\"label\">undelete</td>";
  324.         }
  325.         else {
  326.                 echo "<td class=\"label\">delete</td>";
  327.         }
  328.  
  329.         echo "<td></td>";
  330.  
  331.         echo "<td class=\"label\">unread</td>";
  332.         echo "<td width=\"5\"></td>";
  333.  
  334.         echo "<td class=\"label\">redirect</td>";
  335.         echo "<td width=\"5\"></td>";
  336.  
  337.         echo "<td class=\"label\">forward</td>";
  338.         echo "<td width=\"5\"></td>";
  339.  
  340.         if (strpos($header->toaddress,",")) {
  341.                 echo "<td class=\"label\"><nobr>reply all</nobr></td>";
  342.                 echo "<td width=\"5\"></td>";
  343.         }
  344.  
  345.         echo "<td class=\"label\">reply</td>";
  346.         echo "<td width=\"5\"></td>";
  347.  
  348.         if ($msgno_next != "") {
  349.                 echo "<td class=\"label\"><nobr>prev msg</nobr></td>";
  350.                 echo "<td width=\"5\"></td>";
  351.         }
  352.  
  353.         if ($msgno_prev != "") {
  354.                 echo "<td class=\"label\"><nobr>next msg</nobr></td>";
  355.         }
  356.  
  357.         echo "</tr></table>";  
  358.        
  359.         echo "</div>";
  360.        
  361.         echo "<div class=\"spacer\"></div>";
  362.  
  363.         $usr_mbox = kartero_sort_folders($imap_host,imap_list($mbox,$imap_host,"*"));
  364.        
  365.         if ((count($usr_mbox) > 0) and ($folder != "Sent") and ($folder != "Trash")) {
  366.        
  367.                 echo "<div class=\"message\">";
  368.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
  369.                 echo "<form method=\"post\">";
  370.                 echo "<input type=\"hidden\" name=\"move_msg\" value=\"$msgno\">";
  371.                 echo "<input type=\"hidden\" name=\"mbox_min\" value=\"$mbox_min\">";
  372.                 echo "<input type=\"hidden\" name=\"box\" value=\"$folder\">";
  373.        
  374.                 if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
  375.                         echo "<input type=\"hidden\" name=\"imap_search_query\" value=\"{$_POST['imap_search_query']}\">";
  376.                         echo "<input type=\"hidden\" name=\"imap_search_where\" value=\"{$_POST['imap_search_where']}\">";
  377.                 }
  378.  
  379.                 echo "<tr><td><select name=\"move_box\" onchange=\"this.form.submit();\">";
  380.                 echo "<option value=\"\" selected>$folder</option>";
  381.  
  382.                 foreach ($usr_mbox as $move_box) {
  383.        
  384.                         $move_box = str_replace($imap_host,"",$move_box);
  385.        
  386.                         if ($folder == $move_box) {
  387.                                 continue;
  388.                         }
  389.  
  390.                         if ($move_box == "Sent") {
  391.                                 continue;
  392.                         }
  393.  
  394.                         if ($move_box == "Trash") {
  395.                                 continue;
  396.                         }
  397.  
  398.                         echo "<option value=\"$move_box\">$move_box</option>";
  399.                 }
  400.  
  401.                 echo "</select></td>";
  402.                 echo "<noscript><td><input type=\"submit\" value=\"move\"></td></noscript>";
  403.                 echo "</tr></form></table>";
  404.                 echo "</div>";
  405.        
  406.                 echo "<div class=\"spacer\"></div>";
  407.         }
  408.  
  409.         echo "<div class=\"message\">";
  410.  
  411.         $filePath = "attach/o/$fileUsr/$fileDir";
  412.  
  413.         $emailMessage = new EmailMessage($mbox, imap_msgno($mbox,$msgno));
  414.         $emailMessage->fetch();
  415.  
  416.         if (count($emailMessage->attachments > 0)) {
  417.  
  418.                 if (!file_exists($filePath)) {
  419.                         mkdir($filePath,0700,1);
  420.                 }
  421.        
  422.                 foreach ($emailMessage->attachments as $key => $attachment) {
  423.  
  424.                         $fileContent = $attachment[data];
  425.  
  426.                         if (($fileContent != "") and (($attachment[inline] == 1) or ($attachment[filename] == ""))) {
  427.                                 $fileName = $key;
  428.                         }      
  429.                         else {
  430.                                 $fileName = $attachment[filename];
  431.                         }
  432.  
  433.                         $fileName = str_replace(" ", "_", $fileName);
  434.                         $fileName = preg_replace("/[^a-zA-Z0-9.\-_@]/u", "", $fileName);
  435.  
  436.                         if (!file_exists("$filePath/$fileName") and (mb_strlen($fileContent,"8bit") > 0)) {
  437.                                 file_put_contents("$filePath/$fileName",$fileContent);
  438.                         }
  439.                 }
  440.         }
  441.  
  442.         $bodyTEXT = get_part($mbox, $msgno, "TEXT/PLAIN");
  443.         $bodyHTML = get_part($mbox, $msgno, "TEXT/HTML");
  444.  
  445.         if ($bodyHTML != "") {
  446.  
  447.                 $msgBody = $bodyHTML;
  448.  
  449.                 if (stristr($msgBody,'src="cid:')) {
  450.                         $msgBody = str_ireplace('src="cid:',"src=\"$filePath/",$msgBody);
  451.                 }
  452.  
  453.                 if (stristr($msgBody,'src=cid:')) {
  454.                         $msgBody = str_ireplace('src=cid:',"src=$filePath/",$msgBody);
  455.                 }
  456.         }
  457.         else {
  458.                 $msgBody = trim($bodyTEXT);
  459.                 $msgBody = nl2br($msgBody);
  460.                 $msgBody = preg_replace("/([^\w\/])(www\.[a-z0-9\-]+\.[a-z0-9\-]+)/i","$1http://$2",$msgBody);
  461.                 $msgBody = preg_replace("/([\w]+:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/i","<a target=\"_blank\" href=\"$1\">$1</a>",$msgBody);
  462.                 $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);
  463.         }
  464.  
  465.         $msgBody = mb_convert_encoding($msgBody,"UTF-8","auto");
  466.         $msgBody = mb_convert_encoding($msgBody,"UTF-8","UTF-8");
  467.  
  468.         $get_fromaddress = extract_emails_from($header->fromaddress);
  469.         $get_fromaddress = explode("@",$get_fromaddress[0]);
  470.  
  471.         if (strtoupper($get_fromaddress[0]) == "MAILER-DAEMON") {
  472.                 echo nl2br(htmlentities(imap_body($mbox,$msgno,FT_UID)));
  473.         }
  474.         else {
  475.                 echo $msgBody;
  476.         }
  477.  
  478.         echo "</div>";
  479.  
  480.         if (file_exists("$filePath")) {
  481.                
  482.                 $fileAttachments = glob("$filePath/*");
  483.  
  484.                 if (count($fileAttachments) > 0) {
  485.  
  486.                         sort($fileAttachments);
  487.                         reset($fileAttachments);
  488.        
  489.                         echo "<div class=\"spacer\"></div>";
  490.        
  491.                         echo "<div class=\"message\" style=\"position: relative;\">";
  492.        
  493.                         echo "<div style=\"position: absolute; top: -15; right: -15;\"><img src=\"images/attach.png\" border=\"0\" width=\"48\" height=\"48\"></div>";
  494.        
  495.                         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\">";
  496.                
  497.                         foreach ($fileAttachments as $fileAttachment) {
  498.  
  499.                                 $fileName = str_replace("$filePath/","",$fileAttachment);
  500.  
  501.                                 $fileSize = filesize($fileAttachment);
  502.                                 $fileSize = HumanReadableFilesize($fileSize);
  503.  
  504.                                 $fileScan = "";
  505.  
  506.                                 $scanFile = exec("clamdscan -i --no-summary $fileAttachment",$scanResult,$scanErr);
  507.  
  508.                                 if ($scanErr == "1") {
  509.  
  510.                                         $fileScan = explode(" ", $scanFile);
  511.                                         $fileScan = " <font color=\"red\">{$fileScan[1]}</font>";
  512.                                 }
  513.  
  514.                                 if (is_image($fileAttachment)) {
  515.  
  516.                                         $img_size = getimagesize($fileAttachment);
  517.  
  518.                                         $imgSize = "";
  519.  
  520.                                         if (($img_size[0] > 0) and ($img_size[1] > 0)) {
  521.  
  522.                                                 $imgSize = ", {$img_size[0]}x{$img_size[1]} pixels";
  523.  
  524.                                                 if ($img_size[bits] > 0) {
  525.  
  526.                                                         $imgSize = "$imgSize, {$img_size[bits]}-bit image";
  527.                                                 }
  528.                                         }
  529.  
  530.                                         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";
  531.                                 }
  532.                                 else {
  533.                                         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";
  534.                                 }
  535.                         }
  536.        
  537.                         echo "</table>";
  538.                         echo "</div>";
  539.  
  540.                         $_SESSION['clean_up_o'] = $fileDir;
  541.                 }
  542.                 else {
  543.                         rmdirr($filePath);
  544.                 }
  545.         }
  546.  
  547.         echo "</td></tr></table>";
  548. }
  549.  
  550. if (isset($header_rr) and (strlen($header_rr) > 0)) {
  551.  
  552.         $rcpt_mail = extract_emails_from($header_rr);
  553.         $rcpt_mail = $rcpt_mail[0];
  554.  
  555.         $header_ov = imap_fetch_overview($mbox,$msgno,FT_UID);
  556.  
  557.         if ((strlen($rcpt_mail) > 0) and ($folder != "Sent") and ($folder != "Trash") and ($folder != "Spam") and ($folder != "Junk") and ($header_ov[0]->answered == "0")) {
  558.  
  559.                 $header_message_id = header_mime2text($header->message_id);
  560.  
  561.                 echo "<form id=\"receipt\" method=\"post\" action=\"rcpt.php\" target=\"rcpt\" style=\"display: none;\">";
  562.                 echo "<input type=\"hidden\" name=\"rcpt_mail\" value=\"$rcpt_mail\">";
  563.                 echo "<input type=\"hidden\" name=\"rcpt_subj\" value=\"$header_subject\">";
  564.                 echo "<input type=\"hidden\" name=\"rcpt_date\" value=\"$header_date\">";
  565.                 echo "<input type=\"hidden\" name=\"rcpt_omid\" value=\"$header_message_id\">";
  566.                 echo "<input type=\"hidden\" name=\"rcpt_omno\" value=\"$msgno\">";
  567.                
  568.                 echo "<iframe id=\"rcpt\" name=\"rcpt\" src=\"rcpt.php\" frameborder=\"0\" scrolling=\"0\" width=\"0\" height=\"0\" style=\"display: none;\"></iframe>";
  569.  
  570.                 echo "</form>";
  571.  
  572.                 echo "<script>if (confirm('The message sender has requested a response to indicate that you have read this message.\\nWould you like to send a receipt?')) { document.getElementById('receipt').submit(); }</script>";
  573.         }
  574. }
  575.        
  576. ?>
  577.  
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