Example #1
0
        case "set_nextpage":
            if (isset($_REQUEST["nextpage"]) && isset($_REQUEST["audience_phone"])) {
                $value = $api->set_NextPage($_REQUEST["nextpage"], $_REQUEST["audience_phone"]);
            } else {
                $value = "Missing argument";
            }
            break;
        case "set_book_journey":
            if (isset($_REQUEST["audience_phone"])) {
                $value = $api->set_book_journey($_REQUEST["audience_phone"]);
            } else {
                $value = "Error";
            }
            break;
        case "synchronize":
            $value = $api->synchronize();
            break;
        case "reading":
            $value = $api->reading();
            break;
        case "initialize":
            $api->create_issuu_table();
            $api->create_audience_table();
            $api->initialize_issuu();
            $value = array("response" => "OK");
            break;
    }
}
if (isset($_REQUEST["action"]) && $_REQUEST["action"] != "synchronize" && $_REQUEST["action"] != "reading") {
    exit(json_encode($value));
}