Subversion Repositories ALCASAR

Rev

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

Rev 1303 Rev 1358
Line 12... Line 12...
12
 $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
12
 $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
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_tracability_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";
18
 $l_create_system_backup = "Créer un fichier de configuration";
19
 $l_execute = "Exécuter";
19
 $l_execute = "Exécuter";
20
 $l_backup_files = "Fichiers disponibles pour archivage";
20
 $l_backup_files = "Fichiers disponibles pour archivage";
21
 $l_firewall_log = "Journaux de traçabilité";
21
 $l_firewall_log = "Journaux de traçabilité";
22
 $l_users_db_backups = "Base des usagers";
22
 $l_users_db_backups = "Base des usagers";
Line 24... Line 24...
24
 $l_empty = "vide";
24
 $l_empty = "vide";
25
}
25
}
26
else {
26
else {
27
 $l_backups = "Backups";
27
 $l_backups = "Backups";
28
 $l_create_user_db_backup = "Save the active users database";
28
 $l_create_user_db_backup = "Save the active users database";
29
 $l_tracability_backup = "Create the active traceability file";
29
 $l_traceability_backup = "Create the active traceability file";
30
 $l_create_system_backup = "Create the configuration file";
30
 $l_create_system_backup = "Create the configuration file";
31
 $l_execute = "Execute";
31
 $l_execute = "Execute";
32
 $l_backup_files = "Archive backup files";
32
 $l_backup_files = "Archive backup files";
33
 $l_firewall_log = "Traceability log files";
33
 $l_firewall_log = "Traceability log files";
34
 $l_users_db_backups = "Users database";
34
 $l_users_db_backups = "Users database";
Line 54... Line 54...
54
</TABLE>
54
</TABLE>
55
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
55
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
56
	<tr><td valign="middle" align="left">
56
	<tr><td valign="middle" align="left">
57
	<FORM action="sauvegarde.php" method=POST><b>
57
	<FORM action="sauvegarde.php" method=POST><b>
58
		<select name='choix'></b>
58
		<select name='choix'></b>
59
			<option value="tracability_backup"><?echo "$l_tracability_backup";?>
59
			<option value="traceability_backup"><?echo "$l_traceability_backup";?>
60
			<option value="user_DB_backup"><?echo "$l_create_user_db_backup";?>
60
			<option value="user_DB_backup"><?echo "$l_create_user_db_backup";?>
61
			<option value="system_backup"><?echo "$l_create_system_backup";?>
61
			<option value="system_backup"><?echo "$l_create_system_backup";?>
62
		</select>
62
		</select>
63
		<input type=submit value="<?echo "$l_execute";?>">
63
		<input type=submit value="<?echo "$l_execute";?>">
64
	</FORM>
64
	</FORM>
Line 78... Line 78...
78
if (isset($_POST['choix'])){
78
if (isset($_POST['choix'])){
79
	switch ($_POST['choix']){
79
	switch ($_POST['choix']){
80
		case 'user_DB_backup' :
80
		case 'user_DB_backup' :
81
			exec ("sudo /usr/local/sbin/alcasar-mysql.sh --dump");
81
			exec ("sudo /usr/local/sbin/alcasar-mysql.sh --dump");
82
		break;
82
		break;
83
		case 'tracability_backup' :
83
		case 'traceability_backup' :
84
			exec ("sudo /usr/local/bin/alcasar-archive.sh --live");
84
			exec ("sudo /usr/local/bin/alcasar-archive.sh --live");
85
		break;
85
		break;
86
		case 'system_backup' :
86
		case 'system_backup' :
87
			exec ("sudo /usr/local/bin/alcasar-conf.sh --create");
87
			exec ("sudo /usr/local/bin/alcasar-conf.sh --create");
88
		break;
88
		break;