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