#!/bin/php get()); } else { $choix_niv1 = ''; } // -- SECTION 1: Nouvelle prestation -- if($choix_niv1 === ZenitySetup::$menu_principal_entrees[0] || $code_retour === 1) { echo("choix: $choix_niv1\n"); $code_retour = newService(); echo "hello, code retour: " . $code_retour . "\n"; } // -- SECTION 2: Modifier un enregistrement -- elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[1] || $code_retour === 2) { echo("choix: $choix_niv1\n"); $code_retour = modifyService(); } // -- SECTION 3: Consulter/analyser les données -- elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[2] || $code_retour === 3) { echo("choix: $choix_niv1\n"); // quel affichage? des tableaux avec zenity? LaTeX? une page web? un autre outil servant à faire des tableaux et graphiques } // -- SECTION 4: Imprimer -- elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[3] || $code_retour === 4) // = Imprimer un document { echo("choix: $choix_niv1\n"); $MenuDocuments = new ZenityList(ZenitySetup::$menu_documents_text, ZenitySetup::$menu_documents_entrees); $choix_niv2 = exec($MenuDocuments->get()); if($choix_niv2 === ZenitySetup::$menu_documents_entrees[0]) { } elseif($choix_niv2 === ZenitySetup::$menu_documents_entrees[1]) // = Facture { } elseif($choix_niv2 === ZenitySetup::$menu_documents_entrees[2]) // = Lettre avec adresse { } elseif($choix_niv2 === ZenitySetup::$menu_documents_entrees[3]) // = Livre des recettes { } elseif($choix_niv2 === ZenitySetup::$menu_documents_entrees[4]) // = Registre des achats { } elseif($choix_niv2 === ZenitySetup::$menu_documents_entrees[5]) // = Bilan annuel { } else { // retour menu principal } } // -- SECTION 5: Supports de communication -- elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[4] || $code_retour === 5) // = Communication { echo("choix: $choix_niv1\n"); $MenuCommunication = new ZenityList(ZenitySetup::$menu_communication_text, ZenitySetup::$menu_communication_entrees); $choix_niv2 = exec($MenuCommunication->get()); if($choix_niv2 === ZenitySetup::$menu_communication_entrees[0]) // = Flyer (nécessite gimp) { exec(windowAppCommand($image_editor, $flyer)); } elseif($choix_niv2 === ZenitySetup::$menu_communication_entrees[1]) // = Carte de visite (nécessite scribus) { exec(windowAppCommand($publishing, $business_card)); } elseif($choix_niv2 === ZenitySetup::$menu_communication_entrees[2]) // = Explorateur de fichiers { exec(windowAppCommand($file_explorer, $pub)); } else { // retour menu principal } } // -- SECTION 6: BDD -- elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[5] || $code_retour === 6) // = Base de données { echo("choix: $choix_niv1\n"); if($sqlitebrowser_enable) { exec(windowAppCommand($sqlite_gui, $db_place)); } else { exec($x_term_command . ' ' . $sqlite_cli . ' ' . $db_place); // correpond à priori à: xterm -e sqlite3 ~/ORDIPOLO/Appli_PHP/ordipolo.sqlite } } // arrêt else { $boucle = false; } }