Subversion Repositories ALCASAR

Rev

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

Rev 1358 Rev 1564
Line 13... Line 13...
13
 $Language = strtolower(substr(chop($Langue[0]),0,2));}
13
 $Language = strtolower(substr(chop($Langue[0]),0,2));}
14
if ($Language == 'fr'){
14
if ($Language == 'fr'){
15
 $l_backups = "Sauvegarde";
15
 $l_backups = "Sauvegarde";
16
 $l_create_user_db_backup = "Sauvegarder la base active des usagers";
16
 $l_create_user_db_backup = "Sauvegarder la base active des usagers";
17
 $l_traceability_backup = "Créer le fichier actif des traces";
17
 $l_traceability_backup = "Créer le fichier actif des traces";
18
 $l_create_system_backup = "Créer un fichier de configuration";
-
 
19
 $l_execute = "Exécuter";
18
 $l_execute = "Exécuter";
20
 $l_backup_files = "Fichiers disponibles pour archivage";
19
 $l_backup_files = "Fichiers disponibles pour archivage";
21
 $l_firewall_log = "Journaux de traçabilité";
20
 $l_firewall_log = "Journaux de traçabilité";
22
 $l_users_db_backups = "Base des usagers";
21
 $l_users_db_backups = "Base des usagers";
23
 $l_system_backup = "Fichiers de configuration";
-
 
24
 $l_empty = "vide";
22
 $l_empty = "vide";
25
}
23
}
26
else {
24
else {
27
 $l_backups = "Backups";
25
 $l_backups = "Backups";
28
 $l_create_user_db_backup = "Save the active users database";
26
 $l_create_user_db_backup = "Save the active users database";
29
 $l_traceability_backup = "Create the active traceability file";
27
 $l_traceability_backup = "Create the active traceability file";
30
 $l_create_system_backup = "Create the configuration file";
-
 
31
 $l_execute = "Execute";
28
 $l_execute = "Execute";
32
 $l_backup_files = "Archive backup files";
29
 $l_backup_files = "Archive backup files";
33
 $l_firewall_log = "Traceability log files";
30
 $l_firewall_log = "Traceability log files";
34
 $l_users_db_backups = "Users database";
31
 $l_users_db_backups = "Users database";
35
 $l_system_backup = "Configuration files";
-
 
36
 $l_empty = "empty";
32
 $l_empty = "empty";
37
}
33
}
38
function taille_fichier($fichier)
34
function taille_fichier($fichier)
39
{
35
{
40
	$taille_fichier = filesize($fichier);
36
	$taille_fichier = filesize($fichier);
Line 56... Line 52...
56
	<tr><td valign="middle" align="left">
52
	<tr><td valign="middle" align="left">
57
	<FORM action="sauvegarde.php" method=POST><b>
53
	<FORM action="sauvegarde.php" method=POST><b>
58
		<select name='choix'></b>
54
		<select name='choix'></b>
59
			<option value="traceability_backup"><?echo "$l_traceability_backup";?>
55
			<option value="traceability_backup"><?echo "$l_traceability_backup";?>
60
			<option value="user_DB_backup"><?echo "$l_create_user_db_backup";?>
56
			<option value="user_DB_backup"><?echo "$l_create_user_db_backup";?>
61
			<option value="system_backup"><?echo "$l_create_system_backup";?>
-
 
62
		</select>
57
		</select>
63
		<input type=submit value="<?echo "$l_execute";?>">
58
		<input type=submit value="<?echo "$l_execute";?>">
64
	</FORM>
59
	</FORM>
65
	</td></tr>
60
	</td></tr>
66
</TABLE>
61
</TABLE>
Line 70... Line 65...
70
</TABLE>
65
</TABLE>
71
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
66
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
72
	<TR align="center">
67
	<TR align="center">
73
	<TD><b><?echo "$l_firewall_log";?></b></TD>
68
	<TD><b><?echo "$l_firewall_log";?></b></TD>
74
	<TD><b><?echo "$l_users_db_backups";?></b></TD>
69
	<TD><b><?echo "$l_users_db_backups";?></b></TD>
75
	<TD><b><?echo "$l_system_backup";?></b></TD>
-
 
76
	</TR><TR align="center">
70
	</TR><TR align="center">
77
<?
71
<?
78
if (isset($_POST['choix'])){
72
if (isset($_POST['choix'])){
79
	switch ($_POST['choix']){
73
	switch ($_POST['choix']){
80
		case 'user_DB_backup' :
74
		case 'user_DB_backup' :
81
			exec ("sudo /usr/local/sbin/alcasar-mysql.sh --dump");
75
			exec ("sudo /usr/local/sbin/alcasar-mysql.sh --dump");
82
		break;
76
		break;
83
		case 'traceability_backup' :
77
		case 'traceability_backup' :
84
			exec ("sudo /usr/local/bin/alcasar-archive.sh --live");
78
			exec ("sudo /usr/local/bin/alcasar-archive.sh --live");
85
		break;
79
		break;
86
		case 'system_backup' :
-
 
87
			exec ("sudo /usr/local/bin/alcasar-conf.sh --create");
-
 
88
		break;
-
 
89
	}
80
	}
90
}
81
}
91
$dir[0]="archive";
82
$dir[0]="archive";
92
$dir[1]="base";
83
$dir[1]="base";
93
$dir[2]="system_backup";
-
 
94
$j=0;
84
$j=0;
95
$nb=count($dir);
85
$nb=count($dir);
96
while ($j != $nb)
86
while ($j != $nb)
97
{
87
{
98
	echo "<TD valign='top'>";
88
	echo "<TD valign='top'>";