Ejemplo n.º 1
0
<?php

header("Content-Type: application/json");
//	ini_set("html_errors", false);
require_once __DIR__ . "/../../FMA/autoload.php";
$_pdo = new \FMA\PDO\MySQL_PDO();
$_auth = new \FMA\Auth\SessionAuth($_pdo);
//Do not validate auth here, use authenticated controller
$data = [];
if ($_POST["REQUEST_NAME"] == "") {
} else {
    if (\FMA\Utility::stringStartsWith($_POST["REQUEST_NAME"], "ADMIN_")) {
        $_POST["REQUEST_NAME"] = str_replace("ADMIN_", "", $_POST["REQUEST_NAME"]);
    } else {
        $data = ["err" => true, "msg" => "Action not set."];
    }
}
echo json_encode($data, JSON_PRETTY_PRINT);