Guest User

Untitled

a guest
Aug 14th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1.  
  2.  
  3. <?php
  4. $fichierApp = "../../apps/frontend/config/app.yml"
  5. // si l'utilisateur remplis tout les champs alors on cree le fichier app
  6. if ($_POST['host']!=""&& $_POST['nomBdd']!=""&& $_POST['login']!=""&& $_POST['motDePasse']!=""){
  7. // rajouter devant $app le chemin sur le serveur
  8. $fichierApp = fopen("app","w");
  9. fwrite($fichierApp, 'all:
  10.  
  11. bdd_server:
  12. host: '.$_POST['host'].'
  13. pdo: mysql
  14. dbname:'.$_POST['nomBdd'].'
  15. username: '.$_POST['login'].'
  16. password: '.$_POST['motDePasse'].'
  17.  
  18. bdd_infos:
  19. user_pass_encrypt: sha1
  20. user_table_name: user
  21. user_login_field: login
  22. user_pass_field: pass
  23. user_name_field: name
  24. user_surname_field: surname
  25. user_mail_field: mail
  26.  
  27. profile_builder_class: uapvProfileBuilderDatabase
  28. authentication_type: bdd
  29. user_id: id
  30.  
  31.  
  32. url: rdvz.mondomaine.dom
  33. org_name: "Nom de mon association"
  34. mail_sender: "noreply@mondomaine.dom"
  35.  
  36. hash_nb_chars: 3
  37.  
  38. .array:
  39. languages:
  40. fr: fr_FR
  41. en: en_US');
  42. echo '<center> DOSSIER CREE ! </center> <br/>';
  43. }
  44.  
  45. // sinon on signale les champs non rensgns
  46.  
  47. else { echo '<center> ATTENTION ! UN OU PLUSIEUR CHAMPS NE SONT PAS RENSEIGNE </center> <br/>
  48.  
  49.  
  50. <form action = "traitementApp.php" method ="post">
  51. <center>
  52. host <br/>
  53. <input type="text" name="host"value="'.$_POST['host'].'"><br/><br/>
  54. nom de la base de donnes<br/>
  55. <input type="text" name="nomBdd"value ="'.$_POST['nomBdd'].'"> <br/><br/>
  56.  
  57. login <br/>
  58. <input type="text" name="login"'.$_POST['login'].'><br/> <br/>
  59.  
  60. mot de passe <br/>
  61. <input type="text" name="motDePasse"'.$_POST['motDePasse'].'><br/>
  62. <input type ="submit" value ="valider">
  63. </center>
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. </form>';
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. }
  79.  
  80.  
  81.  
  82.  
  83. ?>
Add Comment
Please, Sign In to add comment