summaryrefslogtreecommitdiff
path: root/src/main.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2023-01-10 13:08:54 +0100
committerpolo <ordipolo@gmx.fr>2023-01-10 13:08:54 +0100
commit945af9fda5146405ab9903d4d268bcb2fe95da25 (patch)
tree0c3af5ae3e4068e65c3e066c83c7d72058339a7d /src/main.php
parent1894fc377e6b938ea34df9980567a1634ec6ef48 (diff)
downloadAppliGestionPHP-945af9fda5146405ab9903d4d268bcb2fe95da25.zip
enregistrement section 1
Diffstat (limited to 'src/main.php')
-rwxr-xr-xsrc/main.php37
1 files changed, 24 insertions, 13 deletions
diff --git a/src/main.php b/src/main.php
index 12715f3..0a8ae09 100755
--- a/src/main.php
+++ b/src/main.php
@@ -43,38 +43,49 @@ require('view/ZenitySetup.php'); // texte dans les fenêtres ET instanciation (u
43require('Latex.php'); // générer le code LaTeX 43require('Latex.php'); // générer le code LaTeX
44 44
45require('sections/1_new_service.php'); 45require('sections/1_new_service.php');
46 46require('sections/2_modify_service.php');
47 47
48// boucle principale 48// boucle principale
49$boucle = true; 49$boucle = true;
50$code_retour = 0; // 0 dirige vers le menu principal, 1 vers la section 1, etc
50while($boucle) 51while($boucle)
51{ 52{
52 // niveau 1: menu principal 53 // niveau 1: menu principal
53 $MenuPrincipal = new ZenityList(ZenitySetup::$menu_principal_text, ZenitySetup::$menu_principal_entrees); 54 if($code_retour === 0)
54 $choix_niv1 = exec($MenuPrincipal->get()); 55 {
56 $MenuPrincipal = new ZenityList(ZenitySetup::$menu_principal_text, ZenitySetup::$menu_principal_entrees);
57 $choix_niv1 = exec($MenuPrincipal->get());
58 }
59 else
60 {
61 $choix_niv1 = '';
62 }
63
55 64
56 // -- SECTION 1: Nouvelle prestation -- 65 // -- SECTION 1: Nouvelle prestation --
57 if($choix_niv1 === ZenitySetup::$menu_principal_entrees[0]) 66 if($choix_niv1 === ZenitySetup::$menu_principal_entrees[0] || $code_retour === 1)
58 { 67 {
59 echo("choix: $choix_niv1\n"); 68 echo("choix: $choix_niv1\n");
60 newService(); 69 $code_retour = newService();
70 echo "hello, code retour: " . $code_retour . "\n";
61 } 71 }
62 72
63 // -- SECTION 2: Modifier un enregistrement -- 73 // -- SECTION 2: Modifier un enregistrement --
64 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[1]) 74 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[1] || $code_retour === 2)
65 { 75 {
66 echo("choix: $choix_niv1\n"); 76 echo("choix: $choix_niv1\n");
77 $code_retour = modifyService();
67 } 78 }
68 79
69 // -- SECTION 3: Fichier clients -- 80 // -- SECTION 3: Consulter/analyser les données --
70 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[2]) 81 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[2] || $code_retour === 3)
71 { 82 {
72 echo("choix: $choix_niv1\n"); 83 echo("choix: $choix_niv1\n");
73 // quel affichage? un grand tableau avec zenity? une page web? un document LaTeX? 84 // quel affichage? des tableaux avec zenity? LaTeX? une page web? un autre outil servant à faire des tableaux et graphiques
74 } 85 }
75 86
76 // -- SECTION 4: documents à imprimer -- 87 // -- SECTION 4: Imprimer --
77 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[3]) // = Créer/imprimer un document 88 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[3] || $code_retour === 4) // = Imprimer un document
78 { 89 {
79 echo("choix: $choix_niv1\n"); 90 echo("choix: $choix_niv1\n");
80 $MenuDocuments = new ZenityList(ZenitySetup::$menu_documents_text, ZenitySetup::$menu_documents_entrees); 91 $MenuDocuments = new ZenityList(ZenitySetup::$menu_documents_text, ZenitySetup::$menu_documents_entrees);
@@ -110,7 +121,7 @@ while($boucle)
110 } 121 }
111 122
112 // -- SECTION 5: Supports de communication -- 123 // -- SECTION 5: Supports de communication --
113 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[4]) // = Communication 124 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[4] || $code_retour === 5) // = Communication
114 { 125 {
115 echo("choix: $choix_niv1\n"); 126 echo("choix: $choix_niv1\n");
116 $MenuCommunication = new ZenityList(ZenitySetup::$menu_communication_text, ZenitySetup::$menu_communication_entrees); 127 $MenuCommunication = new ZenityList(ZenitySetup::$menu_communication_text, ZenitySetup::$menu_communication_entrees);
@@ -134,7 +145,7 @@ while($boucle)
134 } 145 }
135 146
136 // -- SECTION 6: BDD -- 147 // -- SECTION 6: BDD --
137 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[5]) // = Base de données 148 elseif($choix_niv1 === ZenitySetup::$menu_principal_entrees[5] || $code_retour === 6) // = Base de données
138 { 149 {
139 echo("choix: $choix_niv1\n"); 150 echo("choix: $choix_niv1\n");
140 if($sqlitebrowser_enable) 151 if($sqlitebrowser_enable)