Subversion Repositories ALCASAR

Rev

Rev 318 | Rev 2853 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 318 Rev 323
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
<TITLE>Modif logo organisme</TITLE>
5
<TITLE>Modif logo organisme</TITLE>
5
<link rel="stylesheet" href="/css/style.css" type="text/css">
6
<link rel="stylesheet" href="/css/style.css" type="text/css">
6
<SCRIPT language="javascript" type="text/javascript">
7
<SCRIPT language="javascript" type="text/javascript">
7
function rafraichissement(cadre1, val1)
8
function rafraichissement(cadre1, val1)
8
{
9
{
9
	eval(cadre1+".location='"+val1+"'");
10
	eval(cadre1+".location='"+val1+"'");
10
}
11
}
11
</SCRIPT>	
12
</SCRIPT>	
12
</HEAD>
13
</HEAD>
13
<body>
14
<body>
14
<?php
15
<?php
-
 
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)); }
-
 
21
if($Language == 'fr'){
-
 
22
  $l_title = "Personnalisation du logo d'organisme";
-
 
23
  $l_current_logo = "Logo actuel";
-
 
24
  $l_logo_select ="S&eacute;lectionnez un nouveau logo";
-
 
25
  $l_logo_help1 = "votre logo doit &ecirc;tre un fichier au format libre 'PNG'";
-
 
26
  $l_logo_help2 = "la taille de ce fichier doit &ecirc;tre inf&eacute;rieure &agrave; 100Ko";
-
 
27
  $l_logo_help3 = "rafra&icirc;chissez les pages de votre navigateur pour voir le r&eacute;sultat";
-
 
28
} else {
-
 
29
  $l_title = "Customizing the agency logo";
-
 
30
  $l_current_logo = "Current logo";
-
 
31
  $l_logo_select ="Select a new logo";
-
 
32
  $l_logo_help1 = "your logo must be in open 'PNG' format";
-
 
33
  $l_logo_help2 = "the file size must be less than 100KB";
-
 
34
  $l_logo_help3 = "refresh your browser in order to see the result";
-
 
35
}
-
 
36
 
15
if(isset($_FILES['logo']))
37
if(isset($_FILES['logo']))
16
{
38
{
17
unset($result);
39
unset($result);
18
$taille_max = 100000;
40
$taille_max = 100000;
19
$destination = '/var/www/html/images/organisme.png';
41
$destination = '/var/www/html/images/organisme.png';
20
$extension = strstr($_FILES['logo']['name'], '.'); 
42
$extension = strstr($_FILES['logo']['name'], '.'); 
21
if ($extension != '.png')
43
if ($extension != '.png')
22
	{
44
	{
23
	$result = 'Veuillez s&eacute;lectionner un fichier de type png !';
45
	$result = 'Veuillez s&eacute;lectionner un fichier de type png !';
24
	}
46
	}
25
elseif (file_exists($_FILES['logo']['tmp_name']) and filesize($_FILES['logo']['tmp_name']) > $taille_max)
47
elseif (file_exists($_FILES['logo']['tmp_name']) and filesize($_FILES['logo']['tmp_name']) > $taille_max)
26
	{
48
	{
27
	$result = 'La taille du fichier doit &ecirc;tre inf&eacute;rieur &agrave; 100Ko !';
49
	$result = 'La taille du fichier doit &ecirc;tre inf&eacute;rieur &agrave; 100Ko !';
28
	}
50
	}
29
if (!isset($result))
51
if (!isset($result))
30
	{
52
	{
31
	move_uploaded_file($_FILES['logo']['tmp_name'], $destination);
53
	move_uploaded_file($_FILES['logo']['tmp_name'], $destination);
32
	}
54
	}
33
}
55
}
34
?>
56
?>
35
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
57
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
36
	<tr><th>Personnalisation du logo d'organisme</th></tr>
58
<tr><th><? echo "$l_title";?></th></tr>
37
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
59
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
38
height="2"></td></tr>
60
height="2"></td></tr>
39
</TABLE>
61
</TABLE>
40
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
62
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
41
	<tr bgcolor="#666666"><td>
63
	<tr bgcolor="#666666"><td>
42
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
64
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
43
		<tr><td valign="middle" align="left">
65
		<tr><td valign="middle" align="left">
44
		<CENTER><H3>Logo actuel : <img src="/images/organisme.png" width="90"><BR>
66
		<CENTER><H3><? echo "$l_current_logo";?> : <img src="/images/organisme.png" width="90"></H3></center><BR>
45
		Vous pouvez s&eacute;lectionnez un nouveau logo :</H3></CENTER>
67
<? echo "$l_logo_select";?> :
46
		<FORM action="logo.php" method=POST ENCTYPE="multipart/form-data">
68
		<FORM action="logo.php" method=POST ENCTYPE="multipart/form-data">
47
			<input type="file" name="logo">
69
			<input type="file" name="logo">
48
			<input type="hidden" name="MAX_FILE_SIZE" value="100000">
70
			<input type="hidden" name="MAX_FILE_SIZE" value="100000">
49
			<input type="submit" value="Envoyer">
71
			<input type="submit" value="Envoyer">
50
		</FORM>
72
		</FORM>
51
<?php
73
<?php
52
if (isset($result))
74
if (isset($result))
53
{
75
{
54
	echo '<H3>'; echo $result; echo '</H3><BR>';
76
	echo '<H3>'; echo $result; echo '</H3><BR>';
55
}
77
}
56
?>
78
?>
57
		<CENTER>Attention</CENTER>
79
	<li><? echo "$l_logo_help1";?>
58
		- le logo que vous choisissez doit &ecirc;tre un fichier au format libre 'PNG'.<BR>
80
	<li><? echo "$l_logo_help2";?>
59
		- la taille de ce fichier doit &ecirc;tre inf&eacute;rieure &agrave; 100Ko<BR>
81
	<li><? echo "$l_logo_help3";?>
60
		- rafra&icirc;chissez les pages du navigateur pour voir le r&eacute;sultat<BR>
-
 
61
		</TD></TR>
82
		</TD></TR>
62
	</TABLE>
83
	</TABLE>
63
	</td></tr>
84
	</td></tr>
64
</TABLE>
85
</TABLE>
65
</BODY>
86
</BODY>
66
</HTML>
87
</HTML>
67
 
88