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