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