".__("workflows")); /** * */ // Ouverture de la balise - Conteneur d'onglets echo "
\n\n"; // Affichage de la liste des onglets $f->layout->display_tab_lien_onglet_un(__("par type de dossier d'instruction")); // Ouverture de la balise - Onglet 1 echo "\t
\n\n"; /** * Affichage du formulaire de sélection du type de dossier d'instruction */ // Ouverture du formulaire echo "\t\n"; // Paramétrage des champs du formulaire $champs = array("di_type"); // Création d'un nouvel objet de type formulaire $form = $f->get_inst__om_formulaire(array( "validation" => 0, "maj" => 0, "champs" => $champs, )); // Paramétrage des champs du formulaire $form->setLib("di_type", __("Type de dossier d'instruction")); $form->setType("di_type", "select"); $form->setTaille("di_type", 25); $form->setOnChange("di_type", "submit()"); $form->setMax("di_type", 25); $form->setVal("di_type", ($f->get_submitted_post_value("di_type") != null) ? $f->get_submitted_post_value("di_type") : ""); // $qres = $f->get_all_results_from_db_query( sprintf( 'SELECT dossier_instruction_type.dossier_instruction_type, CONCAT_WS( \' - \', dossier_autorisation_type_detaille.code, dossier_instruction_type.code, dossier_instruction_type.libelle ) AS lib FROM %1$sdossier_instruction_type LEFT JOIN %1$sdossier_autorisation_type_detaille ON dossier_instruction_type.dossier_autorisation_type_detaille = dossier_autorisation_type_detaille.dossier_autorisation_type_detaille ORDER BY lib', DB_PREFIXE ), array( 'origin' => "app/workflows.php", 'mode' => DB_FETCHMODE_ORDERED ) ); $contenu = array(array(""), array(__("choisir le type de dossier d'instruction"))); foreach ($qres['result'] as $row) { $contenu[0][] = $row[0]; $contenu[1][] = $row[1]; } $form->setSelect("di_type", $contenu); // Affichage du formulaire $form->entete(); $form->afficher($champs, 0, false, false); $form->enpied(); //// Affichage du bouton //echo "\t
\n"; //$f->layout->display_form_button(array("value" => __("Valider"))); //echo "\t
\n"; // Fermeture du fomulaire echo "\t\n"; /** * */ if ($f->get_submitted_post_value("di_type") == null || $f->get_submitted_post_value("di_type") == "") { // Fermeture de la balise - Onglet 1 echo "\n\t
\n"; // Fermeture de la balise - Conteneur d'onglets echo "
\n"; // die(); } /** * */ $qres = $f->get_one_result_from_db_query( sprintf( 'SELECT concat(dossier_autorisation_type_detaille.code, \' - \', dossier_instruction_type.code, \' - \', dossier_instruction_type.libelle) as lib FROM %1$sdossier_instruction_type LEFT JOIN %1$sdossier_autorisation_type_detaille ON dossier_instruction_type.dossier_autorisation_type_detaille=dossier_autorisation_type_detaille.dossier_autorisation_type_detaille WHERE dossier_instruction_type.dossier_instruction_type=%2$d', DB_PREFIXE, intval($f->get_submitted_post_value("di_type")) ), array( "origin" => "app/workflows.php", ) ); echo "
"; echo "

"; echo $qres["result"]; echo "

"; // $qres = $f->get_all_results_from_db_query( sprintf( 'SELECT etat1.etat AS etat, etat1.statut AS etat_statut, etat1.libelle AS etat_libelle, evenement.evenement AS evenement, evenement.libelle AS evenement_libelle, evenement.retour AS evenement_retour, evenement.action AS evenement_action, evenement.etat AS evenement_action_parametrage_etat, evenement.restriction AS evenement_restriction, evenement.delai AS delai, evenement.accord_tacite AS accord_tacite, evenement.delai_notification AS delai_notification, evt_ret_rar.evenement AS evenement_evenement_retour_ar, evt_ret_rar.libelle AS evenement_evenement_retour_ar_lib, evt_suiv_tacite.evenement AS evenement_evenement_suivant_tacite, evt_suiv_tacite.libelle AS evenement_evenement_suivant_tacite_lib, evt_ret_sign.evenement AS evenement_evenement_retour_signature, evt_ret_sign.libelle AS evenement_evenement_retour_signature_lib, etat2.statut AS evenement_action_parametrage_etat_statut, action.regle_etat AS action_regle_etat, action.regle_delai AS action_regle_delai, action.regle_accord_tacite AS action_regle_accord_tacite, action.regle_avis AS action_regle_avis, action.regle_date_limite AS action_regle_date_limite, action.regle_date_notification_delai AS action_regle_date_notification_delai, action.regle_date_complet AS action_regle_date_complet, action.regle_date_validite AS action_regle_date_validite, action.regle_date_decision AS action_regle_date_decision, action.regle_date_chantier AS action_regle_date_chantier, action.regle_date_achevement AS action_regle_date_achevement, action.regle_date_conformite AS action_regle_date_conformite, action.regle_date_rejet AS action_regle_date_rejet, action.regle_date_dernier_depot AS action_regle_date_dernier_depot, action.regle_date_limite_incompletude AS action_regle_date_limite_incompletude, action.regle_delai_incompletude AS action_regle_delai_incompletude FROM %1$stransition LEFT JOIN %1$setat AS etat1 ON etat1.etat = transition.etat LEFT JOIN %1$sevenement ON transition.evenement = evenement.evenement LEFT JOIN %1$slien_dossier_instruction_type_evenement ON lien_dossier_instruction_type_evenement.evenement = transition.evenement LEFT JOIN %1$saction ON evenement.action = action.action LEFT JOIN %1$setat AS etat2 ON etat2.etat = evenement.etat LEFT JOIN %1$sevenement AS evt_ret_rar ON evenement.evenement_retour_ar = evt_ret_rar.evenement LEFT JOIN %1$sevenement AS evt_suiv_tacite ON evenement.evenement_suivant_tacite = evt_suiv_tacite.evenement LEFT JOIN %1$sevenement AS evt_ret_sign ON evenement.evenement_retour_signature = evt_ret_sign.evenement WHERE lien_dossier_instruction_type_evenement.dossier_instruction_type = %2$d ORDER BY etat1.statut DESC, etat1.etat, evenement_action, etat2.statut DESC, evenement.libelle', DB_PREFIXE, intval($f->get_submitted_post_value("di_type")) ), array( 'origin' => "app/workflows.php" ) ); // $transitions = array(); foreach ($qres['result'] as $row) { $transitions[] = $row; } // $etat = ""; $champsRegle = array("action_regle_delai"=>_("delai"), "action_regle_accord_tacite"=>_("accord_tacite"), "action_regle_avis"=>_("avis"), "action_regle_date_limite"=>_("date_limite"), "action_regle_date_notification_delai"=>_("date_notification_delai"), "action_regle_date_complet"=>_("date_complet"), "action_regle_date_validite"=>_("date_validite"), "action_regle_date_decision"=>_("date_decision"), "action_regle_date_chantier"=>_("date_chantier"), "action_regle_date_achevement"=>_("date_achevement"), "action_regle_date_conformite"=>_("date_conformite"), "action_regle_date_rejet"=>_("date_rejet"), "action_regle_date_dernier_depot"=>_("date_dernier_depot"), "action_regle_date_limite_incompletude"=>_("date_limite_incompletude"), "action_regle_delai_incompletude"=>_("delai_incompletude")); //compter le nombre d'actions $i = 0; foreach($transitions as $key => $transition) { // if ($transition["etat"] != $etat) { if ($etat != "") { echo ""; echo ""; } // echo "
"; echo "
"; echo "

"; echo $transition["etat"]." - ".$transition["etat_libelle"]; echo "

"; echo ""; echo " Modifier "; echo ""; echo "
"; // echo "
\n"; // Fermeture de la balise - Onglet 1 echo "\n\t\n"; // Fermeture de la balise - Conteneur d'onglets echo "\n"; ?>