Désolé, aucun résultat ne correspond à vos critères.


-----
?php // Function to retrieve URL name or default function getUrlName($typetable, $urlNames) { return $urlNames[$typetable] ?? "ACTUALITES"; } // Function to retrieve page name or default function getPageNameByMedType($medtype, $pageNames) { return $pageNames[$medtype] ?? "JDP"; } function handleRequest() { // Retrieve query parameters with default values $op = strtoupper($_GET['op'] ?? 'Home'); $specialite = $_GET['specialite'] ?? 'generaliste'; // Initialize variables $type_content = $op; // (video, text, listing, ...) $type_page = strtoupper('Archive'); // (jdf, mdp, actualité, ...) $speciality_content = $specialite; // (cardio, ...) // Define associative arrays for URL names and page names $urlNames = [ 1 => strtoupper("actualites"), 2 => strtoupper("jdf"), 3 => strtoupper("clinique"), 4 => strtoupper("decryptage"), 5 => strtoupper("congresPrincipale"), 6 => strtoupper("patient"), 7 => strtoupper("parole"), 8 => strtoupper("parole"), // Both case 7 and 8 map to "parole" 9 => strtoupper("parcours"), 10 => strtoupper("partenaires"), 12 => strtoupper("jdp"), 13 => strtoupper("feminin"), 14 => strtoupper("question"), 15 => strtoupper("mdp"), 16 => strtoupper("univers"), 17 => strtoupper("CANALAFU"), // New case added 32 => strtoupper("mdt"), // New case added ]; $pageNames = [ 7 => strtoupper("jdp"), 4 => strtoupper("feminin"), 9 => strtoupper("question"), 3 => strtoupper("mdp"), 5 => strtoupper("univers"), 10 => strtoupper("mdt") ]; // Determine content based on the operation switch ($op) { case 'ARTICLE': $type_page = strtoupper($_GET['action'] ?? 'text'); $typetable = filter_input(INPUT_GET, 'type', FILTER_SANITIZE_NUMBER_INT) ?: 1; $type_content = getUrlName($typetable, $urlNames); break; case 'MEDTV': $type_page = strtoupper($_GET['action'] ?? 'text'); $medtype = filter_input(INPUT_GET, 'medtype', FILTER_SANITIZE_NUMBER_INT) ?: 7; $type_content = getPageNameByMedType($medtype, $pageNames); break; default: // No additional processing needed break; } // Return results as an associative array return [ "type_content" => $type_content, "type_page" => $type_page, "speciality_content" => $speciality_content, ]; } // Example of calling the function and capturing the output $result = handleRequest(); var_dump($result); ?>