function retirer_partage_item() { global $page; global $item; global $message; $page['gabarit'] = "administration"; if (isset($_SESSION['role_user']) && droit_acces($item['reponse_item'], $_SESSION['role_user'])) { $page['vue'] = "items/retirer_partage_item.vue.php"; $page['colonne'] = "items/sidebar_item.vue.php"; $page['etat'] = liste_etat(); $page['etat'] = liste_etat(); $page['categorie'] = liste_categorie(); $page['items'] = liste_item(); $page['lieu'] = liste_lieux_auteur(); $page['sphere'] = liste_sphere(); $page['facteur'] = liste_facteur(); $page['projet'] = liste_projet(); $page['organisme_auteur'] = liste_lieux_auteur(); if (isset($_POST['rech_item'])) { $page['items_recherche'] = json_encode(rechercher_item_partage2_json(1, 0, $_POST['libelle_item'], $_POST['projet_item'], $_POST['difficulte_item'], $_POST['id_etat'], $_POST['duree_item'], $_POST['id_facteur'], $_POST['id_sphere'], $_POST['crea1'], $_POST['crea2'], $_POST['modif1'], $_POST['modif2'], $_POST['id_lieu'])); } elseif (isset($_POST['retirer'])) { if (isset($_POST['droits'])) { foreach ($_POST['droits'] as $droit) { retirer_droit($droit); } } else { $page['message'] = $message['item_obligatoire']; } if (!isset($page['message'])) { header("Location : index.php?controleur=item&tache=base"); } } } else { $page['vue'] = "erreur_droit.vue.php"; } }
function retirer_partage_test() { global $page; global $item; global $message; $page['gabarit'] = "administration"; if (isset($_SESSION['role_user']) && droit_acces($item['reponse_item'], $_SESSION['role_user'])) { $page['vue'] = "tests/retirer_partage_test.vue.php"; $page['colonne'] = "tests/sidebar_test.vue.php"; $page['etat'] = liste_etat(); $page['etat'] = liste_etat(); $page['categorie'] = liste_categorie(); $page['tests'] = liste_test(); $page['lieu'] = liste_lieux_auteur(); $page['sphere'] = liste_sphere(); $page['facteur'] = liste_facteur(); $page['projet'] = liste_projet(); if (isset($_POST['rech_test'])) { if (!isset($_POST['aleatoire'])) { $_POST['aleatoire'] = 'off'; } if (!isset($_POST['retour_arriere'])) { $_POST['retour_arriere'] = 'off'; } $test_rech = rechercher_test_partage2_json(1, 0, $_POST['code_test'], $_POST['libelle_long_test'], $_POST['id_etat'], $_SESSION['id_lieu'], $_POST['duree_test'], $_POST['version_test'], date_fr_to_en($_POST['date_mise_en_prod']), date_fr_to_en($_POST['date_retrait']), $_POST['id_facteur'], $_POST['id_sphere'], $_POST['retour_arriere'], $_POST['aleatoire'], $_POST['id_lieu'], $_POST['projet_test']); if ($test_rech != null) { $page['tests_recherche'] = json_encode($test_rech); } else { $page['tests_recherche'] = ''; } } elseif (isset($_POST['retirer'])) { if (isset($_POST['droits'])) { foreach ($_POST['droits'] as $droit) { retirer_droit_test($droit); } header("Location : index.php?controleur=test&tache=base"); } else { $page['message'] = $message['test_obligatoire']; } } } else { $page['vue'] = "erreur_droit.vue.php"; } }