<?php
/************************************************************************/
/* DUNE by NPDS                                                         */
/* ===========================                                          */
/*                                                                      */
/* NPDS Copyright (c) 2002-2013 by Philippe Brunier                     */
/* IZ-Xinstall version : 1.1.3                                          */
/*                                                                      */
/* Auteurs : v.0.1.0 EBH (plan.net@free.fr)                             */
/*         : v.1.1.1 jpb, phr                                           */
/*         : v.1.1.2 jpb, phr, dev, boris                               */
/*         : v.1.1.3 dev - 2013                                         */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
if (!stristr($_SERVER['PHP_SELF'],"install.php")) { die(); }

function etape_4() {
 global $langue, $stage;
 $stage = 4;

  include_once('config.php');
  echo '<table border="0" cellpadding="2" cellspacing="1" width="100%">
  <tr class="tableau_titre">
  <td align="center" class="headform">'.ins_translate("Paramètres de connexion").'</td>
  </tr>
  <tr>
  <td align="center"><br />
   <form id="parameters" name="parameters" method="post" action="install.php">
   <table border="0" cellpadding="2" cellspacing="1" width="90%">
   <tr>
   <td width="60%" align="left"><b>'.ins_translate("Nom d'hôte du serveur mySQL").'</b><br /><div style="font-size:85%">'.ins_translate("Exemples :").' <br />==> <span class="vert">sql.domaine.com</span><br />==> <span class="vert">localhost</span><br /></div></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_dbhost" size="25" maxlength="80" value="'.$dbhost.'">
   </td>
   </tr>
   <tr>
   <td width="60%" align="left"><b>'.ins_translate("Nom d'utilisateur (identifiant)").'</b></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_dbuname" size="25" maxlength="80" value="'.$dbuname.'">
   </td>
   </tr>
   <tr>
   <td width="60%" align="left"><b>'.ins_translate("Mot de passe").'</b></td>
   <td>&nbsp;</td><td align="left">
   <input type="password" name="new_dbpass" size="25" maxlength="80" value="'.$dbpass.'">
   </td>
   </tr>
   <tr>
   <td width="60%" align="left"><b>'.ins_translate("Nom de la base de données").'</b></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_dbname" size="25" maxlength="80" value="'.$dbname.'">
   </td>
   </tr>
   <tr>
   <td width="60%" align="left"><b>'.ins_translate("Préfixe des tables sql").'</b><br /><span style="font-size:85%">('.ins_translate("Pour éviter les conflits de nom de table sql...").')</span></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_NPDS_Prefix" size="25" maxlength="10" value="'.$NPDS_Prefix.'">
   </td>
   </tr>';
  if($mysql_p == 0) {$sel1 = 'selected="selected"';$sel2 = '';}
  else {$sel1 = '';$sel2 = 'selected="selected"';}
  echo '<tr>
   <td width="60%" align="left"><b>'.ins_translate("Type de connexion au serveur mySQL").'</b></td>
   <td>&nbsp;</td><td align="left">
   <select name="new_mysql_p">
   <option value="0" '.$sel1.'>'.ins_translate("Non permanente").'</option>
   <option value="1" '.$sel2.'>'.ins_translate("Permanente").'</option>
   </select>
   </td>
   </tr>';
  if($system == 0) {$sel3 = 'selected="selected"';$sel4 = '';}
  else {$sel3 = '';$sel4 = 'selected="selected"';}
  echo '<tr>
   <td width="60%" align="left"><b>'.ins_translate('Système hôte').'</b></td>
   <td>&nbsp;</td><td align="left">
   <select name="new_system">
   <option value="0" '.$sel3.'>Unix / Linux</option>
   <option value="1" '.$sel4.'>Windows</option>
   </select>
   </td>
   </tr>';
  if($system_md5 == 0) {$sel5 = 'selected="selected"';$sel6 = '';}
  else {$sel5 = '';$sel6 = 'selected="selected"';}
  echo '<tr>
   <td width="60%" align="left"><b>'.ins_translate("Cryptage des mots de passe administrateur(s)/auteur(s)").'</b><br /><span style="font-size:85%">(MD5)</span></td>
   <td>&nbsp;</td><td align="left">
   <select name="new_system_md5">
   <option value="0" '.$sel5.'>'.ins_translate('Non').'</option>
   <option value="1" '.$sel6.'>'.ins_translate('Oui').'</option>
   </select>
   </td>
   </tr>
   <tr>
   <td width="60%" align="left"><b>'.ins_translate("Adresse e-mail de l'administrateur").'</b></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_adminmail" size="25" value="'.$adminmail.'">
   </td>
   </tr>
   <tr>
   <td colspan="3" align="center"><br /><br />
   <input type="hidden" name="langue" value="'.$langue.'" />
   <input type="hidden" name="stage" value="'.$stage.'" />
   <input type="hidden" name="op" value="write_parameters" />
   <input type="submit" class="bouton_standard" value="'.ins_translate(' Modifier ').'" />
   </td></tr></table>
   </form>
  </td></tr></table></table></table><br />';
}
?>