<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;">
<!--Fireworks MX 2004 Dreamweaver MX 2004 target. Created Fri Aug 12 15:35:16 GMT-0400 2005-->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape" )&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
a.lien1
{
color:#000000;
text-decoration:none;
}
a.lien1:hover
{
color:#000000;
text-decoration:underline;
}
a.lien2
{
color:#9999FF;
text-decoration:none;
font-weight:bold;
}
a.lien2:hover
{
color:#FF9900;
text-decoration:underline overline;
font-weight:bold; }
//-->
</style>
</head>
<body bgcolor="#ffffff">
</div>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="" fwbase="index2.jpg" fwstyle="Dreamweaver" fwdocid = "1761606427" fwnested="0" -->
<tr>
<td><img src="../../images/spacer.gif" width="8" height="1" border="0" alt=""></td>
<td width="872"><img src="../../images/spacer.gif" width="872" height="1" border="0" alt=""></td>
<td><img src="../../images/spacer.gif" width="19" height="1" border="0" alt=""></td>
<td><img src="../../images/spacer.gif" width="1" height="1" border="0" alt=""></td>
<td><img src="../../images/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td colspan="4"><img name="haut" src="../../images/haut.jpg" width="900" height="72" border="0" alt=""></td>
<td><img src="../../images/spacer.gif" width="1" height="72" border="0" alt=""></td>
</tr>
<tr>
<td ><img name="gauche" src="../../images/gauche.jpg" width="8" height="383" border="0" alt=""></td>
<td >
include "config/config.php"; //config file inclusion
include "includes/fonctions.inc.php"; //functions inclusion
CloseUpload(); //Application closing function
include "includes/header.php"; //header inclusion
include "lang/$lang.php"; //language inclusion
// Detect if you have FTP extension loaded for PHP
// Détecte si l'extension FTP de PHP est chargée.
if(!DetectFtpExtension
()) echo $ftpExtensionNotLoaded;
// inclusion de la classe de mail si necessaire
// inclusion of the mail class if necessary
if($prevenir_par_mail==1) include "includes/email_mime.class.php";
switch($a){
//----------------------------------------
// Second Page
//----------------------------------------
case upload:
$error_id=0;
$error_ftp=0;
//----------------------------------------
// authentification
//----------------------------------------
if($identification_nec==1) AuthentificationUser($login, $pass, $user);
//----------------------------------------
// vérification du fichier
// file checking
//----------------------------------------
FileChecking($fichier_name, $fichier_size);
//----------------------------------------
//Connection au serveur ftp
//Connection to the FTP server
//----------------------------------------
$login_to_ftp=@
ftp_login($connection_ftp,
$ftp_user,
$ftp_pass);
if((!$connection_ftp) || (!$login_to_ftp)) ++$error_ftp;
if($error_ftp!=0){
echo $strErrorConnectionFtp.
"<br>";
logError("Can't connect to FTP server ($ftp_server) " );
makeReturn();
signMTA();
}
//----------------------------------------
//changement de dossier
//directory change
//----------------------------------------
$dossier_destination = $destination;
else
$dossier_destination = $ftp_rep_defaut;
if(!@
ftp_chdir($connection_ftp,
$dossier_destination)){ echo $strErrorDestinationDirectory.
"le dossier de destination donné est :".
$dossier_destination.
" et le test ".
$test.
" et le nom".
$nom_doc.
"<br><br>";
logError("Can't find destination directory (".$dossier_destination." ) " );
makeReturn();
signMTA();
}
//---------------------------------------
// We verify that there is no file with
// the same name that the uploaded file.
// If yes, we rename the new file.
//----------------------------------------
$arrayFilesInDir =
ftp_nlist($connection_ftp,
"./" );
$renamed = false;
if(in_array($fichier_name,
$arrayFilesInDir)) {$newFileName=RenameFile
($fichier_name);
} else {$newFileName = $fichier_name;}
//----------------------------------------
// File Upload
//----------------------------------------
$upload =
ftp_put($connection_ftp,
$newFileName,
$fichier, FTP_BINARY
);
//----------------------------------------
// Upload verification
//----------------------------------------
// Si Echec
// If Upload Failed
if(!$upload){
logError("Upload failed !" );
echo "<center><h1>Upload</h1>";
echo $strErrorUploading.
" ".
$newFileName.
"</center>";
makeReturn();
signMTA();
if($prevenir_par_mail==1){
$mail = new mime_mail();
$mail->to = "";
$mail->subject = "Echech de la Mise à jour ";
$mail->body = "Echec Mise à jour de votre extranet:\n".$nom_doc;
$mail->body.= "Date: ".$date_a."<br>File: ".$newFileName."\n";
$mail->body.= "IP: ".$REMOTE_ADDR;
$mail->body.= "\n\n-----------------------------------------------------------\n";
$mail->body.= "Cordialement,
";
$mail->from = "";
$mail->send();
}
}
// If upload OK
else{
logUpload();
echo "<center><h1>Upload</h1>".
$strFile.
" ".
$newFileName.
" (".
$fichier_size.
" octets) ";
echo $strHasBeenUploaded.
"<br></center><br><br>";
makeReturn();
signMTA();
// Email
if($prevenir_par_mail==1){
$mail = new mime_mail();
$mail->to = " , ".$Administrator['email'];
$mail->subject = "Mise à jour de";
$mail->body.= "Mise à jour de :\n".$nom_doc;
$mail->body.= "\n\n-----------------------------------------------------------\n";
$mail->body.= "Cordialement,
";
$mail->from = "";
if($joindre_fichier==1){
$mail->attach("$fichier_attache", "$newFileName" );
}
$flag=0;
$mail->send();
}
}
break;
//----------------------------------------
// Default Page (first page)
//----------------------------------------
default:
//log the visitor
logVisiteur();
// Display the beginning of the form
DisplayBeginningForm();
// if authentification is active, we display the login form
if($identification_nec == 1) DisplayLoginForm();
// if directory choosing is active, we display the appropriate form
if($choisir_rep == 1) DisplayDirSelect();
// display the end of the form
DisplayEndForm();
//signMTA();
break;
}
?>
</center></body></html>
</p>
<p align="center"></p>
<p align="justify"> </p>
<p align="justify"></p>
<p align="justify"> </p>
<p align="justify"> </p>
<p align="justify"></p>
<p align="justify"></p>
<p align="justify"><font size="2"><strong></strong></font></p>
<p align="justify"><font size="2"><strong></strong></font></p>
</td>
<td><img name="droite" src="../../images/droite.jpg" width="19" height="383" border="0" alt=""></td>
<td><img name="index2_r2_c4" src="../../images/index2_r2_c4.jpg" width="1" height="383" border="0" alt=""></td>
<td><img src="../../images/spacer.gif" width="1" height="383" border="0" alt=""></td>
</tr>
<tr>
<td colspan="4"><img name="bas" src="../../images/bas.jpg" width="900" height="75" border="0" alt=""></td>
<td><img src="../../images/spacer.gif" width="1" height="75" border="0" alt=""></td>
</tr>
</table>
</body>
</html>