]> git.ipfire.org Git - ipfire-2.x.git/blob - html/cgi-bin/pakfire.cgi
7b4722bb32686dcd8fdc60aa07e11fa0d70e8118
[ipfire-2.x.git] / html / cgi-bin / pakfire.cgi
1 #!/usr/bin/perl
2 #
3 # IPCop CGIs
4 #
5 # This file is part of the IPCop Project
6 #
7 # This code is distributed under the terms of the GPL
8 #
9 # (c) Eric Oberlander June 2002
10 #
11 # (c) Darren Critchley June 2003 - added real time clock setting, etc
12 #
13
14 use strict;
15
16 # enable only the following on debugging purpose
17 #use warnings;
18 #use CGI::Carp 'fatalsToBrowser';
19
20 require 'CONFIG_ROOT/general-functions.pl';
21 require "${General::swroot}/lang.pl";
22 require "${General::swroot}/header.pl";
23
24 my %pakfiresettings=();
25 my $errormessage = '';
26
27 &Header::showhttpheaders();
28
29 $pakfiresettings{'ACTION'} = '';
30 $pakfiresettings{'VALID'} = '';
31
32 $pakfiresettings{'INSTALLED'} = '';
33 $pakfiresettings{'AVAIL'} = '';
34 $pakfiresettings{'AUTOUPD'} = '';
35
36 &Header::getcgihash(\%pakfiresettings);
37
38 if ($pakfiresettings{'ACTION'} eq $Lang::tr{'save'})
39 {
40
41 }
42
43 &General::readhash("${General::swroot}/pakfire/settings", \%pakfiresettings);
44
45
46 my %selected=();
47 my %checked=();
48
49 $checked{'AUTOUPD'}{'off'} = '';
50 $checked{'AUTOUPD'}{'on'} = '';
51 $checked{'AUTOUPD'}{$pakfiresettings{'AUTOUPD'}} = "checked='checked'";
52
53 &Header::openpage($Lang::tr{'pakfire configuration'}, 1, $refresh);
54
55 &Header::openbigbox('100%', 'left', '', $errormessage);
56
57 # DPC move error message to top so it is seen!
58 if ($errormessage) {
59 &Header::openbox('100%', 'left', $Lang::tr{'error messages'});
60 print "<font class='base'>$errormessage&nbsp;</font>\n";
61 &Header::closebox();
62 }
63
64 print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n";
65
66 &Header::openbox('100%', 'left', $Lang::tr{'network pakfire'});
67 print <<END
68 <table width='100%'>
69 <tr>
70 <td><input type='checkbox' name='ENABLENTP' $checked{'ENABLENTP'}{'on'} /></td>
71 <td width='100%' colspan='4' class='base'>$Lang::tr{'network pakfire from'}</td>
72 </tr>
73 <tr>
74 <td>&nbsp;</td>
75 <td width='100%' class='base' colspan='4'>
76 END
77 ;
78
79
80 print <<END
81 </table>
82 <br />
83 <hr />
84 <table width='100%'>
85 <tr>
86 <td width='30%'><img src='/blob.gif' alt='*' /> $Lang::tr{'this field may be blank'}</td>
87 <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td>
88 <td width='33%' align='right'>
89 <a href='${General::adminmanualurl}/services.html#services_pakfire' target='_blank'><img src='/images/web-support.png' title='$Lang::tr{'online help en'}' /></a>
90 </td>
91 </tr>
92 </table>
93 END
94 ;
95
96 &Header::closebox();
97
98 print "</form>\n";
99
100 &Header::closebigbox();
101
102 &Header::closepage();
103