Subversion Repositories ALCASAR

Rev

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

Rev 2142 Rev 2817
Line 1... Line 1...
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML>
2
<HTML><!-- written by Rexy -->
2
<!-- Written by Rexy -->
3
<HEAD>
3
<html>
-
 
4
<head>
4
<TITLE>Sauvegarde</TITLE>
5
<title>Sauvegarde</title>
5
<link rel="stylesheet" href="/css/style.css" type="text/css">
6
<link rel="stylesheet" href="/css/acc.css" type="text/css">
6
</HEAD>
7
</head>
7
<body>
8
<body>
8
<?
9
<?
9
# choice of language
10
# choice of language
10
$Language = "en";
11
$Language = "en";
11
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
12
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
Line 44... Line 45...
44
		$taille_fichier = round($taille_fichier / 1024 * 100) / 100 . " Ko";}
45
		$taille_fichier = round($taille_fichier / 1024 * 100) / 100 . " Ko";}
45
	else {$taille_fichier = $taille_fichier . " o";} 
46
	else {$taille_fichier = $taille_fichier . " o";} 
46
	return $taille_fichier;
47
	return $taille_fichier;
47
}
48
}
48
?>
49
?>
49
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
50
<div class="panel">
50
	<tr><th><? echo $l_backups;?></th></tr>
51
	<div class="panel-header"><?= $l_backups ?></div>
51
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
-
 
52
</TABLE>
-
 
53
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
52
	<div class="panel-row">
54
	<tr><td valign="middle" align="left">
53
		<div class="panel-cell">
55
	<FORM action="sauvegarde.php" method=POST>
54
			<form action="sauvegarde.php" method=POST>
56
		<select name='choix'>
55
			<select name='choix'>
57
			<option value="traceability_backup"><?echo "$l_traceability_backup";?>
56
				<option value="traceability_backup"><?= $l_traceability_backup?>
58
			<option value="user_DB_backup"><?echo "$l_create_user_db_backup";?>
57
				<option value="user_DB_backup"><?= $l_create_user_db_backup?>
59
		</select>
58
			</select>
60
		<input type=submit value="<?echo "$l_execute";?>">
59
			<input type=submit value="<?= $l_execute?>">
-
 
60
			</form>
61
	</FORM>
61
		</div>
62
	</td></tr>
62
	</div>
63
</TABLE>
63
</div>
64
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
64
<div class="panel">
65
	<tr><th><?echo "$l_backup_files";?></th></tr>
65
	<div class="panel-header"><?= $l_backup_files?></div>
66
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
66
	<div class="panel-row">
67
</TABLE>
67
		<div class="panel-cell">
68
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
68
		<table width="100%" border=0 cellspacing=0 cellpadding=1>
69
	<TR align="center">
69
			<tr align="center">
70
	<TD><b><?echo "$l_firewall_log";?></b></TD>
70
				<td><b><?= $l_firewall_log?></b></td>
71
	<TD><b><?echo "$l_users_db_backups";?></b></TD>
71
				<td><b><?= $l_users_db_backups?></b></td>
72
	<TD><b><?echo "$l_weekly_report";?></b></TD>
72
				<td><b><?= $l_weekly_report?></b></td>
-
 
73
			</tr>
73
	</TR><TR align="center">
74
			<tr align="center">
74
<?
75
<?
75
if (isset($_POST['choix'])){
76
if (isset($_POST['choix'])){
76
	switch ($_POST['choix']){
77
	switch ($_POST['choix']){
77
		case 'user_DB_backup' :
78
		case 'user_DB_backup' :
78
			exec ("sudo /usr/local/bin/alcasar-mysql.sh --dump");
79
			exec ("sudo /usr/local/bin/alcasar-mysql.sh --dump");
Line 87... Line 88...
87
$dir[2]="activity_report";
88
$dir[2]="activity_report";
88
$j=0;
89
$j=0;
89
$nb=count($dir);
90
$nb=count($dir);
90
while ($j != $nb)
91
while ($j != $nb)
91
{
92
{
92
	echo "<TD valign='top'>";
93
	echo "<td valign='top'>";
93
	$rep = opendir("/var/Save/".$dir[$j]);
94
	$rep = opendir("/var/Save/".$dir[$j]);
94
	$i=0; unset ($liste_f);
95
	$i=0; unset ($liste_f);
95
	while ( $file = readdir($rep) )
96
	while ( $file = readdir($rep) )
96
	{
97
	{
97
		if ($file != '.' && $file != '..')
98
		if ($file != '.' && $file != '..')
Line 109... Line 110...
109
	{
110
	{
110
		sort($liste_f);
111
		sort($liste_f);
111
		while ( $i > 0)
112
		while ( $i > 0)
112
		{
113
		{
113
			$i--;
114
			$i--;
114
			echo "<a href=\"/save/$dir[$j]/$liste_f[$i]\">$liste_f[$i]</A> (";echo taille_fichier("/var/Save/".$dir[$j]."/".$liste_f[$i]);echo ")<BR>";
115
			echo "<a href=\"/save/$dir[$j]/$liste_f[$i]\">$liste_f[$i]</A> (";echo taille_fichier("/var/Save/".$dir[$j]."/".$liste_f[$i]);echo ")<br>\n";
115
		}
116
		}
116
	}
117
	}
117
	echo "</TD>\n";
118
	echo "</td>\n";
118
	$j++;
119
	$j++;
119
}
120
}
120
?>
121
?>
121
	</tr>
122
			</tr>
-
 
123
		</table>
-
 
124
		</div>
-
 
125
	</div>
122
</TABLE>
126
</div>
123
</BODY>
127
</body>
124
</HTML>
128
</html>