get()); } else { $choix_niv1 = ''; } // comparaison du retour de $MenuPrincipal->get() avec les noms des entrées du même menu // -- SECTION 1: Clients et prospects -- if($choix_niv1 === ZenitySetup::$menu_principal['entrees'][0] || $section[0] === 1) { echo("choix: ". ZenitySetup::$menu_principal['entrees'][0] . "\n"); $section = newCustomer(); } // -- SECTION 2: Prestations et devis -- elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][1] || $section[0] === 2) { echo("choix: ". ZenitySetup::$menu_principal['entrees'][1] . "\n"); $section = newService($section[1]); // $section[1] vaut un type Client ou null } // -- SECTION 3: Modifier un enregistrement -- elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][2] || $section[0] === 3) { echo("choix: " . ZenitySetup::$menu_principal['entrees'][2] . "\n"); $section = modifyData($section[1]); // $section[1] vaut un type Client ou null } // -- SECTION 4: Consulter, Imprimer un document -- elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][3] || $section[0] === 4) // = Imprimer un document { echo("choix: ". ZenitySetup::$menu_principal['entrees'][3] . "\n"); $section = getOrPrintDocument(); } // -- SECTION 5: Consulter/analyser les données -- elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][4] || $section[0] === 5) { echo("choix: ". ZenitySetup::$menu_principal['entrees'][4] . "\n"); // quel affichage? des tableaux avec zenity? LaTeX? une page web? un autre outil servant à faire des tableaux et graphiques $section = viewData(); } // -- SECTION 6: Supports de communication -- elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][5] || $section[0] === 6) // = Communication { echo("choix: ". ZenitySetup::$menu_principal['entrees'][5] . "\n"); $section = EditAdvertising(); } // -- SECTION 7: BDD -- elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][6] || $section[0] === 7) // = Base de données { echo("choix: ". ZenitySetup::$menu_principal['entrees'][6] . "\n"); if($sqlitebrowser_enable){ exec(windowAppCommand(Config::$sqlite_gui, Config::$db_path)); } else{ exec($x_term_command . ' ' . $sqlite_cli . ' ' . Config::$db_path); // correpond à priori à: xterm -e sqlite3 ~/ORDIPOLO/Appli_PHP/ordipolo.sqlite } } // arrêt else { $main_loop = false; } }