Rev 2817 | Rev 2926 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- Written by Rexy -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Modif logo organisme</TITLE>
<link rel="stylesheet" href="/css/acc.css" type="text/css">
<SCRIPT language="javascript" type="text/javascript">
function rafraichissement(cadre1, val1)
{
eval(cadre1+".location='"+val1+"'");
}
</SCRIPT>
</HEAD>
<body>
<?php
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr') {
$l_title = "Personnalisation du logo";
$l_current_logo = "Logo actuel";
$l_logo_select ="Sélectionnez un nouveau logo";
$l_logo_help1 = "votre logo doit être un fichier au format libre 'PNG'";
$l_logo_help2 = "la taille de ce fichier doit être inférieure à 100KO";
$l_logo_help3 = "rafraîchissez les pages de votre navigateur pour voir le résultat";
} else if ($Language === 'es') {
$l_title = "Personalización del logo";
$l_current_logo = "Logo actual";
$l_logo_select ="Seleccione un nuevo logo";
$l_logo_help1 = "su logo debe ser un archivo 'PNG' gratuito.";
$l_logo_help2 = "el tamaño de este archivo debe ser inferior a 100KO";
$l_logo_help3 = "refresque las páginas de su navegador para ver el resultado";
} else {
$l_title = "Customizing the logo";
$l_current_logo = "Current logo";
$l_logo_select ="Select a new logo";
$l_logo_help1 = "your logo must be in open 'PNG' format";
$l_logo_help2 = "the file size must be less than 100KB";
$l_logo_help3 = "refresh your browser in order to see the result";
}
if(isset($_FILES['logo']))
{
unset($result);
$taille_max = 100000;
$destination = '/var/www/html/images/organisme.png';
$extension = strstr($_FILES['logo']['name'], '.');
if ($extension != '.png')
{
$result = 'Veuillez sélectionner un fichier de type png !';
}
elseif (file_exists($_FILES['logo']['tmp_name']) and filesize($_FILES['logo']['tmp_name']) > $taille_max)
{
$result = 'La taille du fichier doit être inférieur à 100Ko !';
}
if (!isset($result))
{
move_uploaded_file($_FILES['logo']['tmp_name'], $destination);
}
}
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo "$l_title";?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<CENTER><H3><? echo "$l_current_logo";?> : <img src="/images/organisme.png" width="90"></H3></center><BR>
<? echo "$l_logo_select";?> :
<FORM action="logo.php" method=POST ENCTYPE="multipart/form-data">
<input type="file" name="logo">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" value="Envoyer">
</FORM>
<?php
if (isset($result))
{
echo '<H3>'; echo $result; echo '</H3><BR>';
}
?>
<li><? echo "$l_logo_help1";?>
<li><? echo "$l_logo_help2";?>
<li><? echo "$l_logo_help3";?>
</TD></TR>
</TABLE>
</td></tr>
</TABLE>
</BODY>
</HTML>