summaryrefslogtreecommitdiff
path: root/src/main_loop.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
committerpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
commitbf6655a534a6775d30cafa67bd801276bda1d98d (patch)
treec6381e3f6c81c33eab72508f410b165ba05f7e9c /src/main_loop.php
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'src/main_loop.php')
-rw-r--r--src/main_loop.php48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/main_loop.php b/src/main_loop.php
index 645a7ee..8dac901 100644
--- a/src/main_loop.php
+++ b/src/main_loop.php
@@ -12,7 +12,7 @@ while($main_loop)
12 if($section[0] === 0) 12 if($section[0] === 0)
13 { 13 {
14 echo("Menu principal\n"); 14 echo("Menu principal\n");
15 $MenuPrincipal = new ZenityList(ZenitySetup::$menu_principal_text, ZenitySetup::$menu_principal_entrees); 15 $MenuPrincipal = new ZenityList(ZenitySetup::$menu_principal['text'], ZenitySetup::$menu_principal['entrees']);
16 $choix_niv1 = exec($MenuPrincipal->get()); 16 $choix_niv1 = exec($MenuPrincipal->get());
17 } 17 }
18 else 18 else
@@ -23,58 +23,58 @@ while($main_loop)
23 // comparaison du retour de $MenuPrincipal->get() avec les noms des entrées du même menu 23 // comparaison du retour de $MenuPrincipal->get() avec les noms des entrées du même menu
24 24
25 // -- SECTION 1: Clients et prospects -- 25 // -- SECTION 1: Clients et prospects --
26 if($choix_niv1 === ZenitySetup::$menu_principal_entrees[0] || $section[0] === 1) 26 if($choix_niv1 === ZenitySetup::$menu_principal['entrees'][0] || $section[0] === 1)
27 { 27 {
28 echo("choix: ". ZenitySetup::$menu_principal_entrees[0] . "\n"); 28 echo("choix: ". ZenitySetup::$menu_principal['entrees'][0] . "\n");
29 $section = newCustomer(); 29 $section = newCustomer();
30 } 30 }
31 31
32 // -- SECTION 2: Prestations et devis -- 32 // -- SECTION 2: Prestations et devis --
33 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[1] || $section[0] === 2) 33 elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][1] || $section[0] === 2)
34 { 34 {
35 echo("choix: ". ZenitySetup::$menu_principal_entrees[1] . "\n"); 35 echo("choix: ". ZenitySetup::$menu_principal['entrees'][1] . "\n");
36 $section = newService($section[1]); // $section[1] vaut un type Clients ou null 36 $section = newService($section[1]); // $section[1] vaut un type Client ou null
37 } 37 }
38 38
39 // -- SECTION 3: Modifier un enregistrement -- 39 // -- SECTION 3: Modifier un enregistrement --
40 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[2] || $section[0] === 3) 40 elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][2] || $section[0] === 3)
41 { 41 {
42 echo("choix: " . ZenitySetup::$menu_principal_entrees[2] . "\n"); 42 echo("choix: " . ZenitySetup::$menu_principal['entrees'][2] . "\n");
43 $section = modifyData($section[1]); // $section[1] vaut un type Clients ou null 43 $section = modifyData($section[1]); // $section[1] vaut un type Client ou null
44 } 44 }
45 45
46 // -- SECTION 4: Consulter, Imprimer un document -- 46 // -- SECTION 4: Consulter, Imprimer un document --
47 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[3] || $section[0] === 4) // = Imprimer un document 47 elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][3] || $section[0] === 4) // = Imprimer un document
48 { 48 {
49 echo("choix: ". ZenitySetup::$menu_principal_entrees[3] . "\n"); 49 echo("choix: ". ZenitySetup::$menu_principal['entrees'][3] . "\n");
50 $section = getOrPrintDocument(); 50 $section = getOrPrintDocument();
51 } 51 }
52 52
53 // -- SECTION 5: Consulter/analyser les données -- 53 // -- SECTION 5: Consulter/analyser les données --
54 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[4] || $section[0] === 5) 54 elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][4] || $section[0] === 5)
55 { 55 {
56 echo("choix: ". ZenitySetup::$menu_principal_entrees[4] . "\n"); 56 echo("choix: ". ZenitySetup::$menu_principal['entrees'][4] . "\n");
57 // quel affichage? des tableaux avec zenity? LaTeX? une page web? un autre outil servant à faire des tableaux et graphiques 57 // quel affichage? des tableaux avec zenity? LaTeX? une page web? un autre outil servant à faire des tableaux et graphiques
58 $section = viewData(); 58 $section = viewData();
59 } 59 }
60 60
61 // -- SECTION 6: Supports de communication -- 61 // -- SECTION 6: Supports de communication --
62 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[5] || $section[0] === 6) // = Communication 62 elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][5] || $section[0] === 6) // = Communication
63 { 63 {
64 echo("choix: ". ZenitySetup::$menu_principal_entrees[5] . "\n"); 64 echo("choix: ". ZenitySetup::$menu_principal['entrees'][5] . "\n");
65 $MenuCommunication = new ZenityList(ZenitySetup::$menu_communication_text, ZenitySetup::$menu_communication_entrees); 65 $MenuCommunication = new ZenityList(ZenitySetup::$menu_communication['text'], ZenitySetup::$menu_communication['entrees']);
66 $choix_niv2 = exec($MenuCommunication->get()); 66 $choix_niv2 = exec($MenuCommunication->get());
67 if($choix_niv2 === ZenitySetup::$menu_communication_entrees[0]) // = Flyer (nécessite gimp) 67 if($choix_niv2 === ZenitySetup::$menu_communication['entrees'][0]) // = Flyer (nécessite gimp)
68 { 68 {
69 exec(windowAppCommand($image_editor, $flyer)); 69 exec(windowAppCommand(Config::$image_editor, $flyer));
70 } 70 }
71 elseif($choix_niv2 === ZenitySetup::$menu_communication_entrees[1]) // = Carte de visite (nécessite scribus) 71 elseif($choix_niv2 === ZenitySetup::$menu_communication['entrees'][1]) // = Carte de visite (nécessite scribus)
72 { 72 {
73 exec(windowAppCommand($publishing, $business_card)); 73 exec(windowAppCommand(Config::$publishing, $business_card));
74 } 74 }
75 elseif($choix_niv2 === ZenitySetup::$menu_communication_entrees[2]) // = Explorateur de fichiers 75 elseif($choix_niv2 === ZenitySetup::$menu_communication['entrees'][2]) // = Explorateur de fichiers
76 { 76 {
77 exec(windowAppCommand($file_explorer, $pub)); 77 exec(windowAppCommand($file_explorer, Config::$pub_path));
78 } 78 }
79 else 79 else
80 { 80 {
@@ -83,9 +83,9 @@ while($main_loop)
83 } 83 }
84 84
85 // -- SECTION 7: BDD -- 85 // -- SECTION 7: BDD --
86 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[6] || $section[0] === 7) // = Base de données 86 elseif($choix_niv1 === ZenitySetup::$menu_principal['entrees'][6] || $section[0] === 7) // = Base de données
87 { 87 {
88 echo("choix: ". ZenitySetup::$menu_principal_entrees[6] . "\n"); 88 echo("choix: ". ZenitySetup::$menu_principal['entrees'][6] . "\n");
89 if($sqlitebrowser_enable) 89 if($sqlitebrowser_enable)
90 { 90 {
91 exec(windowAppCommand(Config::$sqlite_gui, Config::$db_path)); 91 exec(windowAppCommand(Config::$sqlite_gui, Config::$db_path));