// ini_set('display_errors', 1); // ini_set('display_startup_errors', 1); require('connect_mysql.php'); require('ajax.php'); $requestURI = explode('/', $_SERVER['REQUEST_URI']); $command = array_values($requestURI); $PATH_URL = $requestURI[5]; switch ($requestURI[4]) { case 'createUsers': header('Content-type: application/json; charset=UTF-8'); echo createUsers(); break; case 'login': header('Content-type: application/json; charset=UTF-8'); echo login(); break; case 'getClients': header('Content-type: application/json; charset=UTF-8'); echo getClients(); break; case 'getPos': header('Content-type: application/json; charset=UTF-8'); echo getPos(); break; case 'getDetaliiLada': header('Content-type: application/json; charset=UTF-8'); echo getDetaliiLada(); break; case 'updateClientInfo': header('Content-type: application/json; charset=UTF-8'); echo updateClientInfo(); break; case 'getCabinetsList': header('Content-type: application/json; charset=UTF-8'); echo getCabinetsList(); break; case 'getModelsList': header('Content-type: application/json; charset=UTF-8'); echo getModelsList(); break; case 'updatePosInfo': header('Content-type: application/json; charset=UTF-8'); echo updatePosInfo(); break; case 'updatePassword': header('Content-type: application/json; charset=UTF-8'); echo updatePassword(); break; case 'checkBarCode': header('Content-type: application/json; charset=UTF-8'); echo checkBarCode(); break; case 'searchBarCode': header('Content-type: application/json; charset=UTF-8'); echo searchBarCode(); break; case 'updateAllInfo': header('Content-type: application/json; charset=UTF-8'); echo updateAllInfo(); break; case 'getLatestVersion': header('Content-type: application/json; charset=UTF-8'); echo getLatestVersion(); break; default: header("HTTP/1.0 404 Not Found"); echo "Pagina inexistenta!"; break; }