Gro├čes Update:
[ipfire-2.x.git] / html / cgi-bin / pakfire.cgi
CommitLineData
3ea75603
MT
1#!/usr/bin/perl
2#
78331e30 3# IPFire CGIs
3ea75603 4#
78331e30 5# This file is part of the IPFire Project
3ea75603
MT
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
14use strict;
15
16# enable only the following on debugging purpose
17#use warnings;
18#use CGI::Carp 'fatalsToBrowser';
19
20require 'CONFIG_ROOT/general-functions.pl';
21require "${General::swroot}/lang.pl";
22require "${General::swroot}/header.pl";
23
24my %pakfiresettings=();
25my $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
38if ($pakfiresettings{'ACTION'} eq $Lang::tr{'save'})
39{
40
41}
42
43&General::readhash("${General::swroot}/pakfire/settings", \%pakfiresettings);
44
45
46my %selected=();
47my %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!
58if ($errormessage) {
59 &Header::openbox('100%', 'left', $Lang::tr{'error messages'});
60 print "<font class='base'>$errormessage&nbsp;</font>\n";
61 &Header::closebox();
62 }
63
64print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n";
65
66&Header::openbox('100%', 'left', $Lang::tr{'network pakfire'});
67print <<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'>
76END
77;
78
79
80print <<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>
93END
94;
95
96&Header::closebox();
97
98print "</form>\n";
99
100&Header::closebigbox();
101
102&Header::closepage();
103