This commit has been accessed 609 times via Git panel.
commit c9384c4a7004a461bcb7f87bed2ba197fd2a9da5
tree 834f9238a2c92c3f06bdaf5cd3eb79744caa84b7
parent bf3c455dfd887ad5f0f0c521a771ecdd010226b5
author Engels Antonio <engels@majcms.org> 1310971126 +0800
committer Engels Antonio <engels@majcms.org> 1310971126 +0800
Fix file upload "hang" in filedrop.php
diff --git a/filedrop.php b/filedrop.php
index 9280176..ec50965 100644
--- a/filedrop.php
+++ b/filedrop.php
@@ -1,6 +1,6 @@
<?php
-session_start();
+require_once("core.php");
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
@@ -8,8 +8,6 @@ if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset
echo "<img src=\"images/ajax-loader.gif\" class=\"loader\">";
-require_once("core.php");
-
if (isset($_FILES['filedrop_obj']) and !empty($_FILES['filedrop_obj']) and isset($_POST['filedrop_box']) and !empty($_POST['filedrop_box'])) {
if (is_uploaded_file($_FILES['filedrop_obj']['tmp_name'])) {
diff --git a/inbox.php b/inbox.php
index 78b77ac..41ccd57 100644
--- a/inbox.php
+++ b/inbox.php
@@ -1,11 +1,11 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}
+require_once("core.php");
+
if (!isset($_POST['box']) or empty($_POST['box'])) {
$folder = "INBOX";
}
@@ -78,8 +78,6 @@ foreach ($mail_images as $mail_image) {
}
*/
-require_once("core.php");
-
echo "<title>Kartero - $folder ($msgCount) - " . $_SESSION['logged_uid'] . "</title>";
echo "\n\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"800\">";
diff --git a/post.php b/post.php
index 6ad7dec..e8b2365 100644
--- a/post.php
+++ b/post.php
@@ -1,7 +1,5 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}
diff --git a/read.php b/read.php
index 3920ac5..a6c361b 100644
--- a/read.php
+++ b/read.php
@@ -1,7 +1,5 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}
diff --git a/send.php b/send.php
index 7357850..a3142f7 100644
--- a/send.php
+++ b/send.php
@@ -1,7 +1,5 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}
tree 834f9238a2c92c3f06bdaf5cd3eb79744caa84b7
parent bf3c455dfd887ad5f0f0c521a771ecdd010226b5
author Engels Antonio <engels@majcms.org> 1310971126 +0800
committer Engels Antonio <engels@majcms.org> 1310971126 +0800
Fix file upload "hang" in filedrop.php
diff --git a/filedrop.php b/filedrop.php
index 9280176..ec50965 100644
--- a/filedrop.php
+++ b/filedrop.php
@@ -1,6 +1,6 @@
<?php
-session_start();
+require_once("core.php");
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
@@ -8,8 +8,6 @@ if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset
echo "<img src=\"images/ajax-loader.gif\" class=\"loader\">";
-require_once("core.php");
-
if (isset($_FILES['filedrop_obj']) and !empty($_FILES['filedrop_obj']) and isset($_POST['filedrop_box']) and !empty($_POST['filedrop_box'])) {
if (is_uploaded_file($_FILES['filedrop_obj']['tmp_name'])) {
diff --git a/inbox.php b/inbox.php
index 78b77ac..41ccd57 100644
--- a/inbox.php
+++ b/inbox.php
@@ -1,11 +1,11 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}
+require_once("core.php");
+
if (!isset($_POST['box']) or empty($_POST['box'])) {
$folder = "INBOX";
}
@@ -78,8 +78,6 @@ foreach ($mail_images as $mail_image) {
}
*/
-require_once("core.php");
-
echo "<title>Kartero - $folder ($msgCount) - " . $_SESSION['logged_uid'] . "</title>";
echo "\n\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"800\">";
diff --git a/post.php b/post.php
index 6ad7dec..e8b2365 100644
--- a/post.php
+++ b/post.php
@@ -1,7 +1,5 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}
diff --git a/read.php b/read.php
index 3920ac5..a6c361b 100644
--- a/read.php
+++ b/read.php
@@ -1,7 +1,5 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}
diff --git a/send.php b/send.php
index 7357850..a3142f7 100644
--- a/send.php
+++ b/send.php
@@ -1,7 +1,5 @@
<?php
-session_start();
-
if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
exit;
}