Anpassung an Data-Attribute und Verzeichnisstrukturen

This commit is contained in:
2016-10-05 20:53:46 +00:00
parent c35f571b0b
commit fe8bd9016b
11 changed files with 30 additions and 12 deletions

View File

@@ -7,5 +7,21 @@
* @copyright CS medien- & kommunikationssysteme (http://www.steinle-computer.de)
*/
if (!isset($_POST['token']) || !is_string($_POST['token']) || empty($_POST['token']))
{
die();
}
session_start($_POST['token']);
if (!isset($_SESSION['userID']) || !is_numeric($_SESSION['userID']) || $_SESSION['userID'] < 1)
{
die();
}
if (!isset($_SESSION['isLoggedIn']) || $_SESSION['isLoggedIn'] !== true)
{
die();
}
file_put_contents(__DIR__ . '/request.log', var_export($_POST, true) . "\n\n", FILE_APPEND);
echo json_encode(1);