} $out->data = $items; header('Content-type: application/json'); $result = json_encode($out); break; case 'get_settings': header('Content-type: application/json'); $out->data = json_decode(file_get_contents('data/d1920.json')); $out->result = 'success'; $out->type = 'settings'; $result = json_encode($out); break; case 'data': include 'cl/DbConnector.php'; $ctr = new DbConnector(); $result = json_encode($ctr->process($a, $data, $opt)); header('Content-type: application/json'); break; case 'get_all_data': include 'cl/DbConnector.php'; $ctr = new DbConnector(); $result = json_encode($ctr->getAllData()); header('Content-type: application/json'); break; case 'screen': include 'cl/Screen.php'; $ctr = new Screen(); $result = $ctr->process($a, $data); break; case 'login': include 'gateway.php';