public static function initForceRequest($wsNameGetList, $wsNamePostList) { /* * GLOBAL PARAMETERS * $_GET["action"] * $_GET["date_debut"] * $_GET["date_fin"] */ $wsReqList = array_merge($wsNameGetList, $wsNamePostList); /* Check for actions */ if (isset($_GET["action"]) && in_array($_GET["action"], $wsReqList)) { self::$isForced = true; self::$wsName = $_GET["action"]; if (in_array($_GET["action"], $wsNameGetList)) { self::$wsType = "GET"; } else { self::$wsType = "POST"; } if (isset($_GET["date_debut"]) && isset($_GET["time_debut"])) { self::$wsDateFrom = $_GET["date_debut"]; self::$wsTimeFrom = $_GET["time_debut"]; } else { Log::write("Veuillez ajouter les paramètres date_debut et time_debut [ex => URL?action=" . $_GET["action"] . "&date_debut=jj-mm-aaaa&time_debut=hh:mm:ss]", "error"); die; } if (isset($_GET["date_fin"]) && isset($_GET["time_fin"])) { self::$wsDateTo = $_GET["date_fin"]; self::$wsTimeTo = $_GET["time_fin"]; } else { Log::write("Veuillez ajouter les paramètres date_fin et time_fin [ex => URL?action=" . $_GET["action"] . "&date_fin=jj-mm-aaaa&time_fin=hh:mm:ss]", "error"); die; } } else { if (Configuration::get('OSI_ACTIVE_' . $_GET["action"]) == 0 && Configuration::get('OSI_ACTIVE_' . $_GET["action"]) != '') { Log::write("Ce webservice est désactivé", "error"); die; } else { if (isset($_GET["action"])) { Log::write("Cette action est invalide", "error"); die; } } } }