Some small changes, backend is basically complete now
This commit is contained in:
parent
a086b9b9b7
commit
52abfb49bc
75
create.php
75
create.php
|
@ -1,42 +1,47 @@
|
||||||
<?php
|
<?php
|
||||||
include "config.php";
|
/* curload
|
||||||
include "add-keys.php";
|
* Simple file uploading using POST requests and temporary keys
|
||||||
|
* Licensed under the GNU Affero General Public License version 3.0
|
||||||
|
*/
|
||||||
|
|
||||||
if (isset($_REQUEST['key'])) {
|
include "config.php";
|
||||||
$Key = $_REQUEST['key'];
|
include "add-keys.php";
|
||||||
} else {
|
|
||||||
print "No admin key specified.";
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_REQUEST['data'])) {
|
if (isset($_REQUEST['key'])) {
|
||||||
$Data = $_REQUEST['data'];
|
$Key = $_REQUEST['key'];
|
||||||
} else {
|
} else {
|
||||||
print "No data specified.";
|
print "No admin key specified.";
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_REQUEST['type'])) {
|
if (isset($_REQUEST['data'])) {
|
||||||
$Type = $_REQUEST['type'];
|
$Data = $_REQUEST['data'];
|
||||||
} else {
|
} else {
|
||||||
print "No type specified.";
|
print "No data specified.";
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_REQUEST['uploads']) && $Type == "Temporary") {
|
if (isset($_REQUEST['type'])) {
|
||||||
$Uploads = $_REQUEST['uploads'];
|
$Type = $_REQUEST['type'];
|
||||||
} else {
|
} else {
|
||||||
$Uploads = 1;
|
print "No type specified.";
|
||||||
}
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
if ($Type == "Admin") {
|
if (isset($_REQUEST['uploads']) && $Type == "Temporary") {
|
||||||
addAdminKey($Key, $Data, 0);
|
$Uploads = $_REQUEST['uploads'];
|
||||||
} else if ($Type == "Temporary") {
|
} else {
|
||||||
addTempKey($Key, $Data, $Uploads);
|
$Uploads = 1;
|
||||||
} else if ($Type == "Key") {
|
}
|
||||||
addKey($Key, $Data);
|
|
||||||
} else {
|
if ($Type == "Admin") {
|
||||||
print "Invalid type specified.";
|
addAdminKey($Key, $Data, 0);
|
||||||
die();
|
} else if ($Type == "Temporary") {
|
||||||
}
|
addTempKey($Key, $Data, $Uploads);
|
||||||
|
} else if ($Type == "Key") {
|
||||||
|
addKey($Key, $Data);
|
||||||
|
} else {
|
||||||
|
print "Invalid type specified.";
|
||||||
|
die();
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
6
data.php
6
data.php
|
@ -1,6 +0,0 @@
|
||||||
<?php
|
|
||||||
include "config.php";
|
|
||||||
include "create-table.php";
|
|
||||||
|
|
||||||
// TODO: functions that return data from databases
|
|
||||||
?>
|
|
|
@ -3,6 +3,7 @@
|
||||||
* Simple file uploading using POST requests and temporary keys
|
* Simple file uploading using POST requests and temporary keys
|
||||||
* Licensed under the GNU Affero General Public License version 3.0
|
* Licensed under the GNU Affero General Public License version 3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include "config.php";
|
include "config.php";
|
||||||
include "create-table.php";
|
include "create-table.php";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue