Fix an option in the configuration
This commit is contained in:
parent
d9924e6a3e
commit
33e108a491
|
@ -12,7 +12,7 @@ $Action = "";
|
|||
$Authorized = 0;
|
||||
$Primary = 0;
|
||||
$filterID = -1;
|
||||
$Error = 0;
|
||||
$Error = "";
|
||||
|
||||
if (!isset($_COOKIE[$cookieName]) || !isset($_COOKIE[$cookieTypeName])) {
|
||||
header('Location: login.php?redir=admin');
|
||||
|
@ -35,7 +35,7 @@ if (!isset($_REQUEST['id'])) {
|
|||
}
|
||||
|
||||
if (!isset($_REQUEST['e'])) {
|
||||
$Error = 0;
|
||||
$Error = "";
|
||||
} else {
|
||||
$Error = $_REQUEST['e'];
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ function main() {
|
|||
$Error = $_REQUEST['e'];
|
||||
}
|
||||
|
||||
if (isset($_COOKIE[$cookieTypeName])) {
|
||||
if (isset($_COOKIE[$cookieTypeName]) || ($publicUploading || $publicUploading == "true")) {
|
||||
$html .= "\t\t\t<form action=\"upload.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
|
||||
$html .= "\t\t\t\t<input type=\"file\" name=\"file\" id=\"file\">\n";
|
||||
$html .= "\t\t\t\t<input type=\"submit\" value=\"Upload selected file\" name=\"web\">\n";
|
||||
|
|
|
@ -15,7 +15,7 @@ if (isset($_REQUEST['key'])) {
|
|||
} else if (isset($_COOKIE[$cookieName])) {
|
||||
$Key = $_COOKIE[$cookieName];
|
||||
$WebInterface = 1;
|
||||
} else {
|
||||
} else if (!$publicUploading || $publicUploading == "false") {
|
||||
print "No key specified.";
|
||||
die();
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ if (!isset($_FILES['file']['name']) || $_FILES['file']['name'] == "") {
|
|||
}
|
||||
}
|
||||
|
||||
// init database
|
||||
if (!$publicUploading || $publicUploading == "false") {
|
||||
$Database = createTables($sqlDB);
|
||||
|
||||
// init database
|
||||
if (!$publicUploading || $publicUploading == "false") {
|
||||
$DatabaseQuery = $Database->query('SELECT * FROM keys');
|
||||
while ($line = $DatabaseQuery->fetchArray()) {
|
||||
if ($line['key'] == $Key && $Key != "" && $line['key'] != "" && ($enableKeys || $enableKeys == "true")) {
|
||||
|
|
Loading…
Reference in a new issue