| 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.31 2007-04-20 10:15:15 alexandre_tb Exp $
|
35 |
// CVS : $Id: instal_fichier.inc.php,v 1.32 2007-04-20 12:49:41 ddelon Exp $
|
| 36 |
/**
|
36 |
/**
|
| 37 |
* Page de creation des fichiers necessaire a l'installation de Papyrus.
|
37 |
* Page de creation des fichiers necessaire a l'installation de Papyrus.
|
| 38 |
*
|
38 |
*
|
| 39 |
* Page permettant de creer le fichier de configuration de Papyrus.
|
39 |
* Page permettant de creer 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.31 $ $Date: 2007-04-20 10:15:15 $
|
49 |
*@version $Revision: 1.32 $ $Date: 2007-04-20 12:49:41 $
|
| 50 |
// +------------------------------------------------------------------------------------------------------+
|
50 |
// +------------------------------------------------------------------------------------------------------+
|
| 51 |
**/
|
51 |
**/
|
| Line 52... |
Line 52... |
| 52 |
|
52 |
|
| 53 |
// +------------------------------------------------------------------------------------------------------+
|
53 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 224... |
Line 224... |
| 224 |
'au moyen d\'un logiciel de transfert de fichier (ftp) sur le serveur dans un fichier '.
|
224 |
'au moyen d\'un logiciel de transfert de fichier (ftp) sur le serveur dans un fichier '.
|
| 225 |
'<tt>.htaccess</tt> directement à la racine de '.
|
225 |
'<tt>.htaccess</tt> directement à la racine de '.
|
| 226 |
'<tt>papyrus</tt> de Papyrus.';
|
226 |
'<tt>papyrus</tt> de Papyrus.';
|
| 227 |
$txt_ecriture_conf_erreur .= '<div class="code"><code><pre>'.htmlentities($contenu_htaccess).'</pre></code></div>'."\n";
|
227 |
$txt_ecriture_conf_erreur .= '<div class="code"><code><pre>'.htmlentities($contenu_htaccess).'</pre></code></div>'."\n";
|
| 228 |
$txt_ecriture_conf = 'Écriture sur le serveur du fichier .htaccess... <tt>'.$fichier_config_cible.'</tt>'."\n";
|
228 |
$txt_ecriture_conf = 'Écriture sur le serveur du fichier .htaccess... <tt>'.$fichier_config_cible.'</tt>'."\n";
|
| - |
|
229 |
$erreur = testerConfig($sortie_verif, $txt_ecriture_conf, ftp_put($ftp, $fichier_config_cible,$fichier_config_source, FTP_ASCII), $txt_ecriture_conf_erreur, 1, 0);
|
| - |
|
230 |
|
| - |
|
231 |
|
| - |
|
232 |
=======
|
| 229 |
$erreur = testerConfig($sortie_verif, $txt_ecriture_conf,
|
233 |
$erreur = testerConfig($sortie_verif, $txt_ecriture_conf,
|
| 230 |
ftp_put($ftp, $fichier_config_cible,$fichier_config_source, FTP_ASCII),
|
234 |
ftp_put($ftp, $fichier_config_cible,$fichier_config_source, FTP_ASCII),
|
| 231 |
$txt_ecriture_conf_erreur, 1, 0);
|
235 |
$txt_ecriture_conf_erreur, 1, 0);
|
| - |
|
236 |
>>>>>>> 1.31
|
| 232 |
}
|
237 |
}
|
| - |
|
238 |
|
| - |
|
239 |
maj_fichier_config_appli($ftp,$fichier,'api/fckeditor/editor/filemanager/browser/default/connectors/php/config.php',array("Caldeira"=>"DDDDD"));
|
| 233 |
}
|
240 |
}
|
| 234 |
}
|
241 |
}
|
| Line 235... |
Line 242... |
| 235 |
|
242 |
|
| Line 236... |
Line 243... |
| 236 |
|
243 |
|
| Line -... |
Line 244... |
| - |
|
244 |
|
| - |
|
245 |
// Mise à jour des fichiers de configuration de chaque application :
|
| - |
|
246 |
|
| - |
|
247 |
function maj_fichier_config_appli($ftp,$fichier, $fichierconfig, $elements) {
|
| Line 237... |
Line -... |
| 237 |
|
- |
|
| 238 |
// Mise à jour des fichiers de configuration de chaque application :
|
- |
|
| 239 |
|
- |
|
| 240 |
function maj_fichier_config_appli($fichier, $fichierconfig, $elements) {
|
- |
|
| 241 |
|
248 |
|
| 242 |
|
- |
|
| 243 |
$url_ftp = 'ftp://'.$fichier['PAP_FTP_UTILISATEUR'].':'.$fichier['PAP_FTP_MOT_DE_PASSE'].
|
249 |
|
| 244 |
'@'.$fichier['PAP_FTP_SERVEUR'].$fichier['PAP_FTP_RACINE'].GEN_SEP.$fichierconfig;
|
250 |
$tempfn = tempnam("","");
|
| 245 |
|
251 |
|
| 246 |
|
252 |
ftp_get($ftp,$tempfn,$fichier['PAP_FTP_RACINE'].GEN_SEP.$fichierconfig,FTP_ASCII);
|
| 247 |
$fp = @fopen($url_ftp, 'w');
|
- |
|
| 248 |
|
- |
|
| 249 |
if ($fp) {
|
- |
|
| 250 |
while (!feof($fp)) {
|
- |
|
| 251 |
$cont .= fread($fp, 500);
|
- |
|
| 252 |
}
|
- |
|
| 253 |
|
- |
|
| 254 |
foreach ($elements as $element) {
|
253 |
|
| - |
|
254 |
$fp = fopen($tempfn, 'r');
|
| - |
|
255 |
if ($fp) {
|
| - |
|
256 |
while (!feof($fp)) {
|
| - |
|
257 |
$cont .= fread($fp, 500);
|
| - |
|
258 |
}
|
| - |
|
259 |
fclose($fp);
|
| - |
|
260 |
$fp = fopen($tempfn, 'w');
|
| - |
|
261 |
if ($fp) {
|
| - |
|
262 |
foreach ($elements as $element) {
|
| - |
|
263 |
list($expr,$rempl)=$elements;
|
| 255 |
list($expr,$rempl)=$elements;
|
264 |
preg_replace('/'.$expr.'/',$rempl,$cont);
|
| Line 256... |
Line 265... |
| 256 |
preg_replace('/'.$expr.'/',$rempl,$cont);
|
265 |
}
|
| Line 257... |
Line -... |
| 257 |
}
|
- |
|
| 258 |
|
- |
|
| 259 |
fwrite($fp, $cont);
|
- |
|
| 260 |
fclose($fp);
|
- |
|
| 261 |
}
|
- |
|
| 262 |
|
- |
|
| Line 263... |
Line 266... |
| 263 |
}
|
266 |
fwrite($fp, $cont);
|
| 264 |
|
267 |
fclose($fp);
|
| 265 |
// Maj Fckeditor
|
268 |
ftp_put($ftp,$fichier['PAP_FTP_RACINE'].GEN_SEP.$fichierconfig,$tempfn,FTP_ASCII);
|
| Line 352... |
Line 355... |
| 352 |
|
355 |
|
| 353 |
|
356 |
|
| 354 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
357 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| - |
|
358 |
*
|
| - |
|
359 |
* $Log: not supported by cvs2svn $
|
| - |
|
360 |
* Revision 1.31 2007/04/20 10:15:15 alexandre_tb
|
| 355 |
*
|
361 |
* correction typo
|
| 356 |
* $Log: not supported by cvs2svn $
|
362 |
*
|
| 357 |
* Revision 1.30 2007/04/20 09:18:09 alexandre_tb
|
363 |
* Revision 1.30 2007/04/20 09:18:09 alexandre_tb
|
| 358 |
* correction pb encodage
|
364 |
* correction pb encodage
|
| 359 |
*
|
365 |
*
|