Subversion Repositories ALCASAR

Rev

Rev 2853 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

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