Subversion Repositories ALCASAR

Rev

Rev 2817 | Rev 2926 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
318 richard 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<HTML><!-- Written by Rexy -->
3
<HEAD>
323 richard 4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
318 richard 5
<TITLE>Modif logo organisme</TITLE>
2817 rexy 6
<link rel="stylesheet" href="/css/acc.css" type="text/css">
318 richard 7
<SCRIPT language="javascript" type="text/javascript">
8
function rafraichissement(cadre1, val1)
9
{
10
	eval(cadre1+".location='"+val1+"'");
11
}
12
</SCRIPT>	
13
</HEAD>
14
<body>
15
<?php
323 richard 16
# Choice of language
17
$Language = 'en';
18
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
19
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
20
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
2853 rexy 21
if($Language == 'fr') {
22
  $l_title = "Personnalisation du logo";
323 richard 23
  $l_current_logo = "Logo actuel";
2853 rexy 24
  $l_logo_select ="Sélectionnez un nouveau logo";
25
  $l_logo_help1 = "votre logo doit être un fichier au format libre 'PNG'";
26
  $l_logo_help2 = "la taille de ce fichier doit être inférieure à 100KO";
27
  $l_logo_help3 = "rafraîchissez les pages de votre navigateur pour voir le résultat";
28
} else if ($Language === 'es') {
29
  $l_title = "Personalización del logo";
30
  $l_current_logo = "Logo actual";
31
  $l_logo_select ="Seleccione un nuevo logo";
32
  $l_logo_help1 = "su logo debe ser un archivo 'PNG' gratuito.";
33
  $l_logo_help2 = "el tamaño de este archivo debe ser inferior a 100KO";
34
  $l_logo_help3 = "refresque las páginas de su navegador para ver el resultado";
323 richard 35
} else {
2853 rexy 36
  $l_title = "Customizing the logo";
323 richard 37
  $l_current_logo = "Current logo";
38
  $l_logo_select ="Select a new logo";
39
  $l_logo_help1 = "your logo must be in open 'PNG' format";
40
  $l_logo_help2 = "the file size must be less than 100KB";
41
  $l_logo_help3 = "refresh your browser in order to see the result";
42
}
43
 
318 richard 44
if(isset($_FILES['logo']))
45
{
46
unset($result);
47
$taille_max = 100000;
48
$destination = '/var/www/html/images/organisme.png';
49
$extension = strstr($_FILES['logo']['name'], '.'); 
50
if ($extension != '.png')
51
	{
52
	$result = 'Veuillez s&eacute;lectionner un fichier de type png !';
53
	}
54
elseif (file_exists($_FILES['logo']['tmp_name']) and filesize($_FILES['logo']['tmp_name']) > $taille_max)
55
	{
56
	$result = 'La taille du fichier doit &ecirc;tre inf&eacute;rieur &agrave; 100Ko !';
57
	}
58
if (!isset($result))
59
	{
60
	move_uploaded_file($_FILES['logo']['tmp_name'], $destination);
61
	}
62
}
63
?>
64
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
323 richard 65
<tr><th><? echo "$l_title";?></th></tr>
318 richard 66
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
67
height="2"></td></tr>
68
</TABLE>
69
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
70
	<tr bgcolor="#666666"><td>
71
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
72
		<tr><td valign="middle" align="left">
323 richard 73
		<CENTER><H3><? echo "$l_current_logo";?> : <img src="/images/organisme.png" width="90"></H3></center><BR>
74
<? echo "$l_logo_select";?> :
318 richard 75
		<FORM action="logo.php" method=POST ENCTYPE="multipart/form-data">
76
			<input type="file" name="logo">
77
			<input type="hidden" name="MAX_FILE_SIZE" value="100000">
78
			<input type="submit" value="Envoyer">
79
		</FORM>
80
<?php
81
if (isset($result))
82
{
83
	echo '<H3>'; echo $result; echo '</H3><BR>';
84
}
85
?>
323 richard 86
	<li><? echo "$l_logo_help1";?>
87
	<li><? echo "$l_logo_help2";?>
88
	<li><? echo "$l_logo_help3";?>
318 richard 89
		</TD></TR>
90
	</TABLE>
91
	</td></tr>
92
</TABLE>
93
</BODY>
94
</HTML>