X-Git-Url: https://reisub.nsupdate.info/git/?a=blobdiff_plain;f=mailbox%2Fmailb.php;fp=mailbox%2Fmailb.php;h=7138742b80d89a7c0d206ecd99f7233ef78edcb3;hb=aa35c1b421d8c57c9b81a1467ec6b90cda681232;hp=0000000000000000000000000000000000000000;hpb=a1232a2a92d7fe320aa358ea68de75706e35dcf0;p=saltmail.git%2F.git diff --git a/mailbox/mailb.php b/mailbox/mailb.php new file mode 100644 index 0000000..7138742 --- /dev/null +++ b/mailbox/mailb.php @@ -0,0 +1,85 @@ + +init();?> + + + + + + +

Mail Box - SpecialMail Box

+ '; + } + function scan_dir($dir) { + $ignored = array('.', '..', '.htaccess','mailb.php','getmail.php'); + $files = array(); + foreach (scandir($dir) as $file) { + if (in_array($file, $ignored)) continue; + $files[$file] = filemtime($dir . '/' . $file); + } + arsort($files); + $files = array_keys($files); + return ($files) ? $files : false; + } + if (isloged()==1){ + if (isset($_GET['channel'])){ + if (is_dir($_GET['channel']) and strpos($_GET['channel'],'/')==false and strpos($_GET['channel'],'..')==false or strpos($_GET['channel'],'\\')==false){ + $dirs=scan_dir(getcwd().'/'.$_GET['channel'].'/mails/'); + if (($dirs==false)==false){ + foreach ($dirs as $files){ + include getcwd().'/'.$_GET['channel'].'/mails/'.$files; + echo ''.substr($content,0,20).'... '.str_replace('-','/',$date).'
+'; + } + } + } + } + elseif (isset($_GET['box'])){ + if (is_dir(preg_split('/@/',$_SESSION['m_user'])[0].'/'.$_GET['box']) and strpos($_GET['box'],'/')==false and strpos($_GET['box'],'..')==false or strpos($_GET['box'],'\\')==false){ + $dirs=scan_dir(getcwd().'/'.preg_split('/@/',$_SESSION['m_user'])[0].'/'.$_GET['box']); + if (($dirs==false)==false){ + foreach ($dirs as $i){ + $date=''; + include preg_split('/@/',$_SESSION['m_user'])[0].'/mails/'.$i; + echo ''.$sender.' '.str_replace('-','/',$date).' Delete
+'; + } + } + } + } + else{ + $dirs=scan_dir(getcwd().'/'.preg_split('/@/',$_SESSION['m_user'])[0].'/mails/'); + if (($dirs==false)==false){ + foreach ($dirs as $i){ + $date=''; + include preg_split('/@/',$_SESSION['m_user'])[0].'/mails/'.$i; + echo ''.$sender.'
'.str_replace('-','/',$date).' Delete

+'; + } + } + else{ + echo ''.L::mbox_dhave.'
'; + } + } + } + else{ + http_response_code(404); + } + + ?> + +
+ +