]>
git.ipfire.org Git - ipfire-2.x.git/blob - html/cgi-bin/backup.cgi
5 # This code is distributed under the terms of the GPL
10 # enable only the following on debugging purpose
12 use CGI
::Carp
'fatalsToBrowser';
14 require '/var/ipfire/general-functions.pl';
15 require "${General::swroot}/lang.pl";
16 require "${General::swroot}/header.pl";
19 my %mainsettings = ();
20 my %backupsettings = ();
23 my $errormessage = "";
24 my @backups = `cd /var/ipfire/backup/ && ls *.ipf`;
27 &General
::readhash
("${General::swroot}/main/settings", \
%mainsettings);
28 &General
::readhash
("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \
%color);
30 &Header
::showhttpheaders
();
31 &Header
::getcgihash
(\
%backupsettings);
33 &Header
::openpage
($Lang::tr
{'backup'}, 1, "");
34 &Header
::openbigbox
('100%', 'left', '', $errormessage);
36 ############################################################################################################################
37 ######################################## Scanne Verzeichnisse nach Mp3 Dateien #############################################
39 if ( $backupsettings{'ACTION'} eq "backup" )
41 if ( $backupsettings{'BACKUPLOGS'} eq "include" ){system("/usr/local/bin/backupctrl include");}
42 else {system("/usr/local/bin/backupctrl exclude");}
45 ############################################################################################################################
46 ########################################### rekursiv nach neuen Mp3s Scannen ##############################################รค
48 if ( $message ne "" ) { print "<font color='red'>$message</font>"; }
50 &Header
::openbox
('100%', 'center', $Lang::tr
{'backup'});
53 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
54 <table width='95%' cellspacing='0'>
55 <tr><td align='left' width='40%'>$Lang::tr{'logs'}</td><td align='left'>include Logfiles <input type='radio' name='BACKUPLOGS' value='include' checked='checked'/>/
56 <input type='radio' name='BACKUPLOGS' value='exclude'/> exclude Logfiles</td></tr>
57 <tr><td align='center' colspan='2'><input type='hidden' name='ACTION' value='backup' />
58 <input type='image' alt='$Lang::tr{'Scan for Files'}' title='$Lang::tr{'Scan for Files'}' src='/images/edit-find.png' /></td></tr>
65 &Header
::openbox
('100%', 'center', $Lang::tr
{'backups'});
68 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
69 <table width='95%' cellspacing='0'>
73 print "<tr><td align='left' width='40%'>$Lang::tr{'backup from'}</td><td align='left'>$_</td></tr>";
81 &Header
::closebigbox
();