Line 30... |
Line 30... |
30 |
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
30 |
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
31 |
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
31 |
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
32 |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
32 |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
33 |
// | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
33 |
// | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// CVS : $Id: instal_fichier.inc.php,v 1.5 2004-10-22 17:23:04 jpm Exp $
|
35 |
// CVS : $Id: instal_fichier.inc.php,v 1.6 2004-10-22 17:39:14 jpm Exp $
|
36 |
/**
|
36 |
/**
|
37 |
* Page de création des fichiers nécessaire à l'installation de Papyrus.
|
37 |
* Page de création des fichiers nécessaire à l'installation de Papyrus.
|
38 |
*
|
38 |
*
|
39 |
* Page permettant de créer le fichier de configuration de Papyrus.
|
39 |
* Page permettant de créer le fichier de configuration de Papyrus.
|
40 |
*
|
40 |
*
|
Line 44... |
Line 44... |
44 |
//Autres auteurs :
|
44 |
//Autres auteurs :
|
45 |
*@author David DELON
|
45 |
*@author David DELON
|
46 |
*@author Patrick PAUL
|
46 |
*@author Patrick PAUL
|
47 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
47 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
48 |
*@copyright Tela-Botanica 2000-2004
|
48 |
*@copyright Tela-Botanica 2000-2004
|
49 |
*@version $Revision: 1.5 $ $Date: 2004-10-22 17:23:04 $
|
49 |
*@version $Revision: 1.6 $ $Date: 2004-10-22 17:39:14 $
|
50 |
// +------------------------------------------------------------------------------------------------------+
|
50 |
// +------------------------------------------------------------------------------------------------------+
|
51 |
**/
|
51 |
**/
|
Line 52... |
Line 52... |
52 |
|
52 |
|
53 |
// +------------------------------------------------------------------------------------------------------+
|
53 |
// +------------------------------------------------------------------------------------------------------+
|
Line 84... |
Line 84... |
84 |
// +------------------------------------------------------------------------------------------------------+
|
84 |
// +------------------------------------------------------------------------------------------------------+
|
85 |
// Affichage d'informations...
|
85 |
// Affichage d'informations...
|
86 |
$sortie .= '<p><strong>Etape n°'.$num_etape.' sur '.INSTAL_NBRE_ETAPE.'.</strong></p>'."\n";
|
86 |
$sortie .= '<p><strong>Etape n°'.$num_etape.' sur '.INSTAL_NBRE_ETAPE.'.</strong></p>'."\n";
|
Line 87... |
Line 87... |
87 |
|
87 |
|
88 |
// Correction éventuelle des informations saisies par l'utilisateur
|
88 |
// Correction éventuelle des informations saisies par l'utilisateur
|
89 |
if (preg_match('/^\/(.*)$/', $fichier['PAP_FTP_RACINE'], $instal_tab_txt)) {
|
89 |
if (preg_match('/^(?:\/|\\)(.*)$/', $fichier['PAP_FTP_RACINE']) == 1) {
|
90 |
// le chemin FTP ne doit pas commencer par un slash, nous le supprimons
|
90 |
// le chemin FTP ne doit pas commencer par un slash, nous le supprimons
|
91 |
$fichier['PAP_FTP_RACINE'] = $instal_tab_txt[1];
|
91 |
$fichier['PAP_FTP_RACINE'] = GEN_SEP.$fichier['PAP_FTP_RACINE'];
|
Line 92... |
Line 92... |
92 |
}
|
92 |
}
|
93 |
|
93 |
|
94 |
// Nous vérifions si nous sommes en phase de test du formulaire de config de l'écriture de fichier
|
94 |
// Nous vérifions si nous sommes en phase de test du formulaire de config de l'écriture de fichier
|
Line 119... |
Line 119... |
119 |
}
|
119 |
}
|
120 |
$configCode .= implode("\n", $entries)."\n\n?>";
|
120 |
$configCode .= implode("\n", $entries)."\n\n?>";
|
Line 121... |
Line 121... |
121 |
|
121 |
|
122 |
// Tentative d'écriture du fichier de config
|
122 |
// Tentative d'écriture du fichier de config
|
123 |
$sortie_verif .= ' <h2>Ecriture des fichiers sur le serveur par FTP</h2>'."\n";
|
123 |
$sortie_verif .= ' <h2>Ecriture des fichiers sur le serveur par FTP</h2>'."\n";
|
124 |
$chemin_fpt_absolu = GEN_SEP.$fichier['PAP_FTP_RACINE'].INSTAL_CHEMIN_CONFIG;
|
124 |
$chemin_fpt_absolu = $fichier['PAP_FTP_RACINE'].INSTAL_CHEMIN_CONFIG;
|
125 |
$url_ftp = 'ftp://'.$fichier['PAP_FTP_UTILISATEUR'].':'.$fichier['PAP_FTP_MOT_DE_PASSE'].
|
125 |
$url_ftp = 'ftp://'.$fichier['PAP_FTP_UTILISATEUR'].':'.$fichier['PAP_FTP_MOT_DE_PASSE'].
|
126 |
'@'.$fichier['PAP_FTP_SERVEUR'].$chemin_fpt_absolu;
|
126 |
'@'.$fichier['PAP_FTP_SERVEUR'].$chemin_fpt_absolu;
|
127 |
$fp = @fopen($url_ftp, 'w');
|
127 |
$fp = @fopen($url_ftp, 'w');
|
128 |
$txt_ecriture_conf = 'Écriture sur le serveur de <tt>'.$chemin_fpt_absolu.'</tt>...';
|
128 |
$txt_ecriture_conf = 'Écriture sur le serveur de <tt>'.$chemin_fpt_absolu.'</tt>...';
|
Line 220... |
Line 220... |
220 |
|
220 |
|
221 |
|
221 |
|
222 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
222 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
223 |
*
|
- |
|
224 |
* $Log: not supported by cvs2svn $
|
- |
|
225 |
* Revision 1.5 2004/10/22 17:23:04 jpm
|
223 |
*
|
226 |
* Simplification del'installation de Papyrus.
|
224 |
* $Log: not supported by cvs2svn $
|
227 |
*
|
225 |
* Revision 1.4 2004/10/19 17:01:12 jpm
|
228 |
* Revision 1.4 2004/10/19 17:01:12 jpm
|
226 |
* Correction bogues.
|
229 |
* Correction bogues.
|
227 |
*
|
230 |
*
|