Subversion Repositories ALCASAR

Rev

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

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