From 537599eab12656e8d1ec40b085b687714483f4fc Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 27 Nov 2022 16:26:54 +0100 Subject: =?UTF-8?q?r=C3=A9organisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 190 +++----------------------------------------------------------- 1 file changed, 7 insertions(+), 183 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7bcb87c..dbcf0e2 100755 --- a/index.php +++ b/index.php @@ -2,189 +2,13 @@ get()); - - // enregistrement - if($choix_niv1 == 'Nouvelle prestation') - { - // est ce que le client est déjà dans la base? - if(exec($QuestionNouveauClient->get()) == 0) // $? = 0 signifie oui - { - // saisie du nom du client et recherche - $client_saisie = exec($RechercheClient->get()); - - // sélection parmi les résultats - $ResultatsRechercheClient->set_entries(recherche_client($client_saisie)); - $choix_niv2 = exec($ResultatsRechercheClient->get()); - if($choix_niv2 != '') - { - echo "client trouvé\n"; - } - else // chaîne vide - { - echo "client pas trouvé\n"; - exec($NouveauClient->get()); - - // enregistrement dans la BDD - - } - - // récupération des infos dans la BDD - - } - else - { - echo "nouveau client\n"; - exec($NouveauClient->get()); - - // enregistrement dans la BDD - - } - - // infos sur la prestation - $choix_niv2 = exec($MenuEnregistrement->get()); - $continuer = true; - if($choix_niv2 == "Devis") - { - $type = 'DEVIS'; - } - elseif($choix_niv2 == "Facture") - { - $type = 'FACTURE'; - } - elseif($choix_niv2 == "CESU") - { - $type = 'CESU'; - } - elseif($choix_niv2 == "Pas de prestation") - { - $type = ''; - } - else - { - $continuer = false; // retour menu principal - } - - if($continuer) - { - exec($Calendrier->get()); - exec($FormulairePrestation->get()); - // enregistrement date et prestation en BDD - exec($CommentairePrestation->get()); - // enregistrement commentaire en BDD - } - } - - elseif($choix_niv1 == 'Fichier clients') - { - // quel affichage? un grand tableau avec zenity? une page web? un document LaTeX? - } - - // documents à imprimer - elseif($choix_niv1 == 'Créer/imprimer un document') - { - $choix_niv2 = exec($MenuDocuments->get()); - if($choix_niv2 == 'Devis') - { - - } - elseif($choix_niv2 == 'Facture') - { - - } - elseif($choix_niv2 == 'Lettre avec adresse') - { - - } - elseif($choix_niv2 == 'Livre des recettes') - { - - } - elseif($choix_niv2 == "Registre des achats") - { - - } - elseif($choix_niv2 == "Bilan annuel") - { - - } - else - { - // retour menu principal - } - } - - // Supports de communication - elseif($choix_niv1 == 'Communication') - { - $choix_niv2 = exec($MenuCommunication->get()); - if($choix_niv2 == 'Flyer (nécessite gimp)') - { - exec(window_app_command('gimp', $flyer)); - } - elseif($choix_niv2 == 'Carte de visite (nécessite scribus)') - { - exec(window_app_command('scribus', $business_card)); - } - elseif($choix_niv2 == 'Explorateur de fichiers') - { - exec(window_app_command($file_explorer, $pub)); - } - else - { - // retour menu principal - } - } - - // BDD - elseif($choix_niv1 == 'Base de données') - { - if($sqlitebrowser_enable) - { - exec(window_app_command('sqlitebrowser', $db_place)); - } - else - { - exec($x_term_command . ' ' . $sqlite_cli . ' ' . $db_place); // correpond à priori à: xterm -e sqlite3 ~/ORDIPOLO/Appli_PHP/ordipolo.sqlite - } - } - else - { - $boucle = false; // byebye - } -} - -// sauvegarder la base de données +// contenu de AppliGestionPHP.sh +//~ #!/bin/sh +//~ php php/main.php -- cgit v1.2.3