kartero.org

kartero.org

Git

This commit has been accessed 586 times via Git panel.

commit a6889934bb5014dccad08cfe66f53a8658fdd76a
tree bbe069d06420bd00fe14e537633c045d2d97c68a
parent 655702909064d7dd9790943ea3e58abb6ded92d6
author Engels Antonio <engels@majcms.org> 1340864066 +0800
committer Engels Antonio <engels@majcms.org> 1340864066 +0800

    Include attachments in forwarded messages

diff --git a/filedrop.php b/filedrop.php
index 42e6e0c..57f092a 100644
--- a/filedrop.php
+++ b/filedrop.php
@@ -2,18 +2,18 @@
 
 require_once("core.php");
 
-if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
+if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber") or !isset($_SESSION['filedrop_dir']) or empty($_SESSION['filedrop_dir'])) {
         exit;
 }
 
-if (isset($_FILES['filedrop_obj']) and !empty($_FILES['filedrop_obj']) and isset($_POST['filedrop_box']) and !empty($_POST['filedrop_box'])) {
+$filedrop_box = $_SESSION['filedrop_dir'];
+
+if (isset($_FILES['filedrop_obj']) and !empty($_FILES['filedrop_obj'])) {
 
        if (is_uploaded_file($_FILES['filedrop_obj']['tmp_name'])) {
 
                if ($_FILES['filedrop_obj']['size'] <= $max_file_size) {
               
-                       $filedrop_box = $_POST['filedrop_box'];
-          
                        $filedrop_nom = str_replace(" ", "_", $_FILES['filedrop_obj']['name']);
                        $filedrop_nom = preg_replace("/[^a-zA-Z0-9.\-_]/u", "", $filedrop_nom);
 
diff --git a/index.php b/index.php
index a1a3dcf..c3c37c4 100644
--- a/index.php
+++ b/index.php
@@ -157,6 +157,10 @@ unset($pw_mbox);
 
 if ($_SESSION['logged_lvl'] == "subscriber") {
 
+       $filedrop_box = sha1(microtime(true));
+
+       $_SESSION['filedrop_dir'] = $filedrop_box;
+
        if (isset($_SESSION['clean_up_i']) and file_exists("attach/i/$fileUsr/{$_SESSION['clean_up_i']}") and (!isset($_POST['filedrop_box']) or empty($_POST['filedrop_box']))) {
 
                rmdirr("attach/i/$fileUsr/{$_SESSION['clean_up_i']}");
@@ -169,7 +173,18 @@ if ($_SESSION['logged_lvl'] == "subscriber") {
 
        if (isset($_SESSION['clean_up_o']) and file_exists("attach/o/$fileUsr/{$_SESSION['clean_up_o']}")) {
                         
-               rmdirr("attach/o/$fileUsr/{$_SESSION['clean_up_o']}");
+               if ($_POST['rep'] == 2) {
+              
+                       if (!file_exists("attach/i/$fileUsr")) {
+                                mkdir("attach/i/$fileUsr",0700,1);
+                        }
+
+                       rename("attach/o/$fileUsr/{$_SESSION['clean_up_o']}","attach/i/$fileUsr/$filedrop_box");
+               }
+               else {
+                       rmdirr("attach/o/$fileUsr/{$_SESSION['clean_up_o']}");
+               }
+
                unset($_SESSION['clean_up_o']);
 
                if (count(glob("attach/o/$fileUsr/*")) == 0) {
@@ -942,8 +957,6 @@ if (isset($_SESSION['logged_uid'])) {
 
        if ($_SESSION['logged_lvl'] == "subscriber") {
 
-               $filedrop_box = sha1(microtime(true));
-
                $host = "{127.0.0.1:143/imap/notls/norsh}";
 
                if (!isset($_POST['box']) or empty($_POST['box'])) {
diff --git a/send.php b/send.php
index 054d630..782e26e 100644
--- a/send.php
+++ b/send.php
@@ -223,28 +223,6 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
                }
 
                echo $reply_quote;
-
-               $do_fromaddress = extract_emails_from($header->fromaddress);
-               $do_toaddress   = extract_emails_from($header->toaddress);
-
-               $filePath = $_SERVER['SERVER_NAME'] . $do_fromaddress[0] . $do_toaddress[0] . $header->subject;
-
-               $filePath = "filedrop/" . sha1($filePath);
-
-               if (file_exists("$filePath")) {
-
-                       $fileNames = glob("$filePath/*");
-
-                       if (count($fileNames) > 0) {
-
-                               foreach ($fileNames as $fileName) {
-
-                                       echo "\r\n\r\n" . str_replace("$filePath/","",$fileName) . " (" . HumanReadableFilesize(filesize($fileName)) . ")\r\n";
-                                       echo "http://" . $_SERVER['SERVER_NAME'] . "/$fileName";
-                               }
-                       }
-
-               }
        }
        else {
                $reply_personal = $header->fromaddress;
@@ -254,6 +232,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
                       
                        $reply_quote_line = "> $reply_quote_line";
                        $reply_quote_line = preg_replace("/(^> >)/",">>",$reply_quote_line);
+                       $reply_quote_line = preg_replace("/(^>> >)/",">>>",$reply_quote_line);
 
                        echo $reply_quote_line;
                }
 
filedropkartero.git-41992ae.tar.bz2 new
412.12 KB
24 downloads
filedropkartero.git-41992ae.zip
448.41 KB
10 downloads
filedropkartero.git-b404ba2.tar.bz2
411.70 KB
23 downloads
filedropkartero.git-b404ba2.zip
447.96 KB
8 downloads
filedropkartero.git-a7684d9.tar.bz2
411.72 KB
257 downloads
filedropkartero.git-a7684d9.zip
447.96 KB
361 downloads
filedropkartero.git-83512be.tar.bz2
410.26 KB
249 downloads
filedropkartero.git-83512be.zip
445.30 KB
207 downloads
filedropkartero.git-1954b25.tar.bz2
410.21 KB
242 downloads
filedropkartero.git-1954b25.zip
445.30 KB
203 downloads
filedropkartero.git-2f7c910.tar.bz2
410.25 KB
232 downloads
filedropkartero.git-2f7c910.zip
445.29 KB
189 downloads
filedropkartero.git-6317ffb.tar.bz2
410.40 KB
215 downloads
filedropkartero.git-6317ffb.zip
445.28 KB
171 downloads
filedropkartero.git-60ccd7a.tar.bz2
410.40 KB
202 downloads
filedropkartero.git-60ccd7a.zip
445.20 KB
167 downloads
filedropkartero.git-ea6f885.tar.bz2
410.47 KB
6 downloads
filedropkartero.git-ea6f885.zip
445.26 KB
148 downloads
filedropkartero.git-7f580e5.zip
445.17 KB
138 downloads
filedropkartero.git-7f580e5.tar.bz2
410.18 KB
160 downloads
filedropkartero.git-b9364de.tar.bz2
409.41 KB
150 downloads
filedropkartero.git-b9364de.zip
444.09 KB
395 downloads
filedropkartero.git-e9bcd78.zip
444.03 KB
376 downloads
filedropkartero.git-e9bcd78.tar.bz2
409.39 KB
418 downloads
filedropkartero.git-96c60ff.tar.bz2
407.96 KB
413 downloads
filedropkartero.git-96c60ff.zip
441.87 KB
349 downloads
filedropkartero.git-4357b59.tar.bz2
407.17 KB
405 downloads
filedropkartero.git-4357b59.zip
440.69 KB
351 downloads
filedropkartero.git-c6ff319.tar.bz2
407.28 KB
404 downloads
filedropkartero.git-c6ff319.zip
440.70 KB
332 downloads
filedropkartero.git-8b87a29.tar.bz2
407.27 KB
385 downloads
filedropkartero.git-8b87a29.zip
440.71 KB
331 downloads
filedropkartero.git-ee42942.tar.bz2
406.49 KB
344 downloads
filedropkartero.git-ee42942.zip
439.92 KB
309 downloads
filedropkartero.git-867e7e6.tar.bz2
406.75 KB
366 downloads
filedropkartero.git-867e7e6.zip
440.03 KB
312 downloads
filedropkartero.git-3f3fc02.tar.bz2
406.38 KB
362 downloads
filedropkartero.git-3f3fc02.zip
439.71 KB
336 downloads
filedropkartero.git-b6f779d.tar.bz2
406.55 KB
381 downloads
filedropkartero.git-b6f779d.zip
440.00 KB
296 downloads
filedropkartero.git-83f24b0.zip
439.12 KB
278 downloads
filedropkartero.git-52316ec.tar.bz2
406.17 KB
337 downloads
filedropkartero.git-52316ec.zip
439.18 KB
302 downloads
filedropkartero.git-83f24b0.tar.bz2
405.84 KB
332 downloads
filedropkartero.git-8a42d47.tar.bz2
405.73 KB
300 downloads
filedropkartero.git-8a42d47.zip
439.02 KB
274 downloads
filedropkartero.git-830c9cb.tar.bz2
406.08 KB
303 downloads
filedropkartero.git-830c9cb.zip
439.08 KB
272 downloads
filedropkartero.git-ebec1be.tar.bz2
406.16 KB
305 downloads
filedropkartero.git-ebec1be.zip
439.09 KB
302 downloads
filedropkartero.git-7c0b70f.tar.bz2
402.43 KB
290 downloads
filedropkartero.git-7c0b70f.zip
435.91 KB
265 downloads
filedropkartero.git-80edc03.tar.bz2
402.75 KB
304 downloads
filedropkartero.git-80edc03.zip
435.84 KB
277 downloads
filedropkartero.git-b408c23.tar.bz2
402.19 KB
296 downloads
filedropkartero.git-b408c23.zip
435.59 KB
281 downloads
filedropkartero.git-29c0e1f.tar.bz2
401.84 KB
297 downloads
filedropkartero.git-29c0e1f.zip
435.25 KB
293 downloads
filedropkartero.git-9086094.tar.bz2
401.94 KB
300 downloads
filedropkartero.git-9086094.zip
435.34 KB
294 downloads
filedropkartero.git-47ca624.tar.bz2
402.10 KB
298 downloads
filedropkartero.git-47ca624.zip
435.51 KB
261 downloads
filedropkartero.git-81314a5.zip
435.53 KB
281 downloads
filedropkartero.git-81314a5.tar.bz2
402.25 KB
294 downloads
filedropkartero.git-cae7074.zip
435.20 KB
277 downloads
filedropkartero.git-cae7074.tar.bz2
401.98 KB
310 downloads
filedropkartero.git-cc68e56.tar.bz2
402.07 KB
293 downloads
filedropkartero.git-cc68e56.zip
435.16 KB
307 downloads
filedropkartero.git-230f35d.tar.bz2
401.43 KB
278 downloads
filedropkartero.git-230f35d.zip
434.68 KB
294 downloads
filedropkartero.git-5ae58a2.tar.bz2
401.54 KB
282 downloads
filedropkartero.git-5ae58a2.zip
434.68 KB
267 downloads
filedropkartero.git-a591f4b.tar.bz2
401.76 KB
279 downloads
filedropkartero.git-a591f4b.zip
435.17 KB
275 downloads
filedropkartero.git-36876c8.tar.bz2
400.44 KB
278 downloads
filedropkartero.git-36876c8.zip
432.36 KB
297 downloads
filedropkartero.git-a34c9ed.tar.bz2
400.57 KB
301 downloads
filedropkartero.git-a34c9ed.zip
432.27 KB
288 downloads
filedropkartero.git-e828148.zip
433.58 KB
267 downloads
filedropkartero.git-e828148.tar.bz2
400.88 KB
288 downloads
filedropkartero.git-476cdda.tar.bz2
400.60 KB
319 downloads
filedropkartero.git-476cdda.zip
432.26 KB
280 downloads
filedropkartero.git-054c286.tar.bz2
98.09 KB
361 downloads
filedropkartero.git-054c286.zip
109.53 KB
339 downloads
filedropkartero.git-071b099.tar.bz2
98.76 KB
364 downloads
filedropkartero.git-071b099.zip
110.21 KB
339 downloads
filedropkartero.git-551c38d.tar.bz2
98.51 KB
369 downloads
filedropkartero.git-551c38d.zip
110.20 KB
331 downloads
filedropkartero.git-569dc0c.tar.bz2
98.40 KB
364 downloads
filedropkartero.git-569dc0c.zip
109.86 KB
323 downloads
filedropkartero.git-58a052b.tar.bz2
97.95 KB
363 downloads
filedropkartero.git-58a052b.zip
109.36 KB
335 downloads
filedropkartero.git-43a5af3.tar.bz2
97.80 KB
357 downloads
filedropkartero.git-43a5af3.zip
109.30 KB
333 downloads
filedropkartero.git-bbe069d.tar.bz2
98.03 KB
371 downloads
filedropkartero.git-bbe069d.zip
109.19 KB
337 downloads
filedropkartero.git-02f97e1.tar.bz2
97.76 KB
337 downloads
filedropkartero.git-02f97e1.zip
109.24 KB
429 downloads
filedropkartero.git-d82e393.tar.bz2
97.74 KB
369 downloads
filedropkartero.git-d82e393.zip
109.24 KB
338 downloads
filedropkartero.git-7cdd1f5.tar.bz2
98.03 KB
351 downloads
filedropkartero.git-7cdd1f5.zip
109.24 KB
319 downloads
filedropkartero.git-40825aa.tar.bz2
97.71 KB
352 downloads
filedropkartero.git-40825aa.zip
109.16 KB
356 downloads
filedropkartero.git-3dd941b.tar.bz2
97.69 KB
351 downloads
filedropkartero.git-3dd941b.zip
109.12 KB
330 downloads
filedropkartero.git-50f1e46.tar.bz2
97.65 KB
360 downloads
filedropkartero.git-50f1e46.zip
109.02 KB
333 downloads
filedropkartero.git-fdf9225.tar.bz2
93.19 KB
391 downloads
filedropkartero.git-fdf9225.zip
104.25 KB
343 downloads
filedropkartero.git-21415da.tar.bz2
93.24 KB
348 downloads
filedropkartero.git-21415da.zip
104.22 KB
344 downloads
filedropkartero.git-aff5e89.tar.bz2
93.17 KB
368 downloads
filedropkartero.git-aff5e89.zip
104.22 KB
335 downloads
filedropkartero.git-b27ef39.tar.bz2
91.97 KB
368 downloads
filedropkartero.git-b27ef39.zip
102.80 KB
360 downloads
filedropkartero.git-3d6e8a2.tar.bz2
91.99 KB
350 downloads
filedropkartero.git-3d6e8a2.zip
102.77 KB
357 downloads
filedropkartero.git-1442b69.tar.bz2
91.79 KB
346 downloads
filedropkartero.git-1442b69.zip
102.50 KB
360 downloads
filedropkartero.git-6d15918.tar.bz2
91.56 KB
369 downloads
filedropkartero.git-6d15918.zip
102.28 KB
328 downloads
filedropkartero.git-45140d8.tar.bz2
91.52 KB
371 downloads
filedropkartero.git-45140d8.zip
102.23 KB
333 downloads
filedropkartero.git-d5b48e5.tar.bz2
91.35 KB
359 downloads
filedropkartero.git-d5b48e5.zip
102.01 KB
345 downloads
filedropkartero.git-e007e55.tar.bz2
91.35 KB
370 downloads
filedropkartero.git-e007e55.zip
102.01 KB
317 downloads
filedropkartero.git-30fd7e3.tar.bz2
90.87 KB
346 downloads
filedropkartero.git-30fd7e3.zip
101.44 KB
346 downloads
filedropkartero.git-421a4a7.tar.bz2
88.02 KB
86 downloads
filedropkartero.git-421a4a7.zip
97.96 KB
321 downloads
filedropkartero.git-b49b8bc.tar.bz2
88.09 KB
388 downloads
filedropkartero.git-b49b8bc.zip
97.99 KB
338 downloads
filedropkartero.git-1cc9571.tar.bz2
87.74 KB
366 downloads
filedropkartero.git-1cc9571.zip
97.70 KB
342 downloads
filedropkartero.git-159152f.tar.bz2
87.60 KB
364 downloads
filedropkartero.git-159152f.zip
97.52 KB
348 downloads
filedropkartero.git-35caaf3.tar.bz2
87.74 KB
347 downloads
filedropkartero.git-35caaf3.zip
97.57 KB
331 downloads
filedropkartero.git-3c9d305.zip
96.67 KB
334 downloads
filedropkartero.git-3c9d305.tar.bz2
86.77 KB
354 downloads
filedropkartero.git-14cb2af.tar.bz2
86.41 KB
353 downloads
filedropkartero.git-14cb2af.zip
96.13 KB
338 downloads
filedropkartero.git-e8f00cb.tar.bz2
86.46 KB
372 downloads
filedropkartero.git-e8f00cb.zip
96.21 KB
327 downloads
filedropkartero.git-bdab380.tar.bz2
86.14 KB
366 downloads
filedropkartero.git-bdab380.zip
95.79 KB
330 downloads
filedropkartero.git-48f9134.tar.bz2
85.78 KB
370 downloads
filedropkartero.git-48f9134.zip
95.48 KB
341 downloads
filedropkartero.git-adb9757.tar.bz2
85.67 KB
359 downloads
filedropkartero.git-adb9757.zip
95.37 KB
332 downloads
filedropkartero.git-1601cbd.zip
95.30 KB
344 downloads
filedropkartero.git-1601cbd.tar.bz2
85.69 KB
341 downloads
filedropkartero.git-18a5106.tar.bz2
85.72 KB
342 downloads
filedropkartero.git-18a5106.zip
95.48 KB
347 downloads
filedropkartero.git-a5b1caa.tar.bz2
85.61 KB
376 downloads
filedropkartero.git-a5b1caa.zip
95.36 KB
340 downloads
filedropkartero.git-effff82.zip
97.06 KB
353 downloads
filedropkartero.git-effff82.tar.bz2
87.13 KB
364 downloads
filedropkartero.git-b70d364.tar.bz2
84.09 KB
402 downloads
filedropkartero.git-b70d364.zip
93.67 KB
346 downloads
filedropkartero.git-48f0e53.tar.bz2
84.16 KB
376 downloads
filedropkartero.git-48f0e53.zip
93.66 KB
340 downloads
filedropkartero.git-c17135e.tar.bz2
84.09 KB
358 downloads
filedropkartero.git-c17135e.zip
93.57 KB
326 downloads
filedropkartero.git-a2e2848.tar.bz2
85.59 KB
362 downloads
filedropkartero.git-a2e2848.zip
100.10 KB
339 downloads
filedropkartero.git-1f683db.tar.bz2
83.55 KB
362 downloads
filedropkartero.git-1f683db.zip
93.24 KB
335 downloads
filedropkartero.git-d342596.tar.bz2
83.57 KB
362 downloads
filedropkartero.git-d342596.zip
93.28 KB
326 downloads
filedropkartero.git-e0131d5.tar.bz2
83.55 KB
363 downloads
filedropkartero.git-e0131d5.zip
93.27 KB
343 downloads
filedropkartero.git-ad467e8.tar.bz2
83.13 KB
372 downloads
filedropkartero.git-ad467e8.zip
92.78 KB
332 downloads
filedropkartero.git-b20e27d.tar.bz2
83.46 KB
377 downloads
filedropkartero.git-b20e27d.zip
93.19 KB
358 downloads
filedropkartero.git-eefd8fe.zip
92.67 KB
364 downloads
filedropkartero.git-eefd8fe.tar.bz2
83.01 KB
363 downloads
filedropkartero.git-bea685a.zip
96.88 KB
339 downloads
filedropkartero.git-bea685a.tar.bz2
84.44 KB
356 downloads
filedropkartero.git-a8bd019.tar.bz2
84.25 KB
372 downloads
filedropkartero.git-a8bd019.zip
96.60 KB
334 downloads
filedropkartero.git-cbc914d.tar.bz2
84.38 KB
365 downloads
filedropkartero.git-cbc914d.zip
96.64 KB
323 downloads
filedropkartero.git-09a2e70.tar.bz2
84.40 KB
344 downloads
filedropkartero.git-09a2e70.zip
96.70 KB
347 downloads
filedropkartero.git-641dc05.tar.bz2
84.37 KB
364 downloads
filedropkartero.git-641dc05.zip
96.73 KB
335 downloads
filedropkartero.git-cde49c6.tar.bz2
84.26 KB
373 downloads
filedropkartero.git-cde49c6.zip
96.59 KB
338 downloads
filedropkartero.git-1d004e0.tar.bz2
77.42 KB
375 downloads
filedropkartero.git-1d004e0.zip
87.56 KB
12 downloads
filedropkartero.git-1f0bf17.tar.bz2
77.47 KB
371 downloads
filedropkartero.git-1f0bf17.zip
87.56 KB
334 downloads
filedropkartero.git-265e63c.tar.bz2
77.43 KB
353 downloads
filedropkartero.git-265e63c.zip
87.52 KB
367 downloads
filedropkartero.git-635a5db.zip
87.60 KB
336 downloads
filedropkartero.git-a041f85.tar.bz2
77.37 KB
376 downloads
filedropkartero.git-a041f85.zip
87.52 KB
366 downloads
filedropkartero.git-ae049a7.tar.bz2
77.44 KB
374 downloads
filedropkartero.git-ae049a7.zip
87.52 KB
336 downloads
filedropkartero.git-eef571a.tar.bz2
20.56 KB
485 downloads
filedropkartero.git-eef571a.zip
25.69 KB
466 downloads
filedropkartero.git-0bc16f5.tar.bz2
82.61 KB
393 downloads
filedropkartero.git-0bc16f5.zip
94.75 KB
373 downloads
filedropkartero.git-2afc0f7.tar.bz2
83.61 KB
392 downloads
filedropkartero.git-2afc0f7.zip
96.00 KB
390 downloads
filedropkartero.git-3529bdf.tar.bz2
77.72 KB
358 downloads
filedropkartero.git-3529bdf.zip
87.92 KB
367 downloads
filedropkartero.git-49aac92.tar.bz2
78.98 KB
403 downloads
filedropkartero.git-49aac92.zip
90.01 KB
369 downloads
filedropkartero.git-5d48f21.tar.bz2
78.65 KB
6 downloads
filedropkartero.git-5d48f21.zip
89.51 KB
398 downloads
filedropkartero.git-635a5db.tar.bz2
77.50 KB
415 downloads
filedropkartero.git-6e34786.tar.bz2
77.76 KB
425 downloads
filedropkartero.git-6e34786.zip
88.09 KB
411 downloads
filedropkartero.git-7dc2fd2.tar.bz2
83.51 KB
473 downloads
filedropkartero.git-7dc2fd2.zip
95.99 KB
417 downloads
filedropkartero.git-9cad005.tar.bz2
78.85 KB
468 downloads
filedropkartero.git-9cad005.zip
90.00 KB
460 downloads
filedropkartero.git-b303f61.tar.bz2
82.57 KB
506 downloads
filedropkartero.git-b303f61.zip
94.78 KB
133 downloads
filedropkartero.git-c15ef85.tar.bz2
77.76 KB
161 downloads
filedropkartero.git-c15ef85.zip
88.16 KB
154 downloads
filedropkartero.git-c99e84d.tar.bz2
83.58 KB
183 downloads
filedropkartero.git-c99e84d.zip
96.01 KB
168 downloads
filedropkartero.git-e5009e6.tar.bz2
78.73 KB
193 downloads
filedropkartero.git-e5009e6.zip
89.69 KB
182 downloads
filedropkartero.git-0502d01.tar.bz2
83.54 KB
208 downloads
filedropkartero.git-0502d01.zip
96.00 KB
193 downloads
filedropkartero.git-44ca46d.tar.bz2
83.73 KB
221 downloads
filedropkartero.git-44ca46d.zip
96.20 KB
202 downloads
filedropkartero.git-834f923.tar.bz2
83.75 KB
224 downloads
filedropkartero.git-834f923.zip
96.14 KB
212 downloads