<?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_8() {
 global $langue, $stage;
 $stage = 8;
 if(file_exists('modules/upload/upload.conf.php')) include_once('modules/upload/upload.conf.php');
 if($racine != '') {
  $begin = strlen($racine);
  $end1 = strlen($rep_upload);
  $end2 = strlen($rep_cache);
  $end3 = strlen($rep_log);
  $rep_upload = substr($rep_upload, $begin, $end1);
  $rep_cache = substr($rep_cache, $begin, $end2);
  $rep_log = substr($rep_log, $begin, $end3);
 }
 echo '<table border="0" cellpadding="2" cellspacing="1" width="100%">
  <tr class="tableau_titre">
  <td align="center" class="headform">'.ins_translate('Configuration du module UPload').'</td>
  </tr>
  <tr>
  <td align="center"><br />
   <form id="upload_module" name="upload_module" method="post" action="install.php">
   <table border="0" cellpadding="2" cellspacing="1" width="90%">
   <tr>
   <td width="50%" align="left"><b>'.ins_translate('Taille maxi des fichiers en octets').'</b><br /></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_max_size" size="15" maxlength="20" value="'.$max_size.'" />
   </td>
   </tr>
   <tr>
   <td width="50%" align="left"><b>'.ins_translate("Chemin physique absolu d'accès depuis la racine de votre site").'</b><br /><div style="font-size:85%">'.ins_translate("Exemple par défaut ou SI vous ne savez pas").' :<br />==><br />'.ins_translate("Exemples SI redirection").' :<br />==> <span class="vert">/data/www/monsite</span> OU <span class="vert">c:\web\monsite</span></div></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_DOCUMENTROOT" size="30" maxlength="60" value="'.$DOCUMENTROOT.'">
   </td>
   </tr>
   <tr>
   <td width="50%" align="left"><b>'.ins_translate("Autoriser l'upload dans le répertoire personnel").'</b><br /></td>
   <td>&nbsp;</td><td align="left">
   <select name="new_autorise_upload_p">';
  if($autorise_upload_p == "true") {$sel1 = 'selected="selected"';$sel2 = '';}
  else {$sel1 = '';$sel2 = 'selected="selected"';}

  echo '<option value="true" '.$sel1.'>'.ins_translate('Oui').'</option>
   <option value="false" '.$sel2.'>'.ins_translate('Non').'</option>
   </td>
   </tr>
   <tr>
   <td width="50%" align="left"><b>'.ins_translate("Répertoire de votre site").'</b><br /><div style="font-size:85%">'.ins_translate('Exemples :').'<br />www.monsite.com/ ==> <br />www.monsite.com/npds/ ==> <span class="vert">/npds</span><br />www.monsite.com/npds/npds/ ==> <span class="vert">/npds/npds</span></div></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_racine" size="30" maxlength="60" value="'.$racine.'" />
   </td>
   </tr>
   <tr>
   <td width="50%" align="left"><b>'.ins_translate("Répertoire de téléchargement").'</b><br /></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_rep_upload" size="30" maxlength="60" value="'.$rep_upload.'" readonly="readonly" />
   </td>
   </tr>
   <tr>
   <td width="50%" align="left"><b>'.ins_translate("Répertoire des fichiers temporaires").'</b><br /></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_rep_cache" size="30" maxlength="60" value="'.$rep_cache.'" readonly="readonly" />
   </td>
   </tr>
   <tr>
   <td width="50%" align="left"><b>'.ins_translate("Fichier journal de sécurité").'</b><br /></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_rep_log" size="30" maxlength="60" value="'.$rep_log.'" readonly="readonly" />
   </td>
   </tr>
   <tr>
   <td width="50%" align="left"><b>'.ins_translate("URL HTTP de votre site").'</b><br /></td>
   <td>&nbsp;</td><td align="left">
   <input type="text" name="new_url_upload" size="30" maxlength="60" value="'.$url_upload.'" />
   </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_upload" />
   <input type="submit" class="bouton_standard" value="'.ins_translate(" Valider ").'" />
   </td></tr></table>
   </form>
  </td></tr></table></table></table><br />';
}
?>