diff -U 2 -r /root/src/webmin/vacationadm/index.cgi /usr/libexec/webmin/vacationadm/index.cgi --- /root/src/webmin/vacationadm/index.cgi Wed Dec 19 18:20:30 2001 +++ /usr/libexec/webmin/vacationadm/index.cgi Wed Dec 19 19:19:40 2001 @@ -27,6 +27,5 @@ # get some configuration options -do '../web-lib.pl'; -&init_config(); +require './local-lib.pl'; # force a fflush after each print/write command @@ -61,4 +60,9 @@ # Seems there are no errors, let's go on... # +my $user=$ENV{REMOTE_USER}; +# Get the users home directory +my $home=&get_home($user); +my $vacmsgfile="$home/.vacation.msg"; +my $forwardfile="$home/.forward"; print '
',"\n\n"; @@ -101,5 +105,5 @@ print " \n"; print " \n"; - print ' ',"\n"; + print ' ',"\n"; print " \n"; print " \n"; @@ -120,4 +124,27 @@ } +# Read .forward file if it exist +my $ONbutton=""; +my $OFFbutton="checked"; +my $ONbuttonfw=""; +my $OFFbuttonfw="checked"; +my @forwardlist=(); +if ( -f $forwardfile ) { + open(FORWARDFILE,"<$forwardfile"); + my $firstline=; + if ( grep($config{'vacation_path'},$_) ne "" ) { + $ONbutton="checked"; + $OFFbutton=""; + } + while() { + @forwardlist=(@forwardlist,$_); + } + close(FORWARDFILE); + if (@forwardlist) { + $ONbuttonfw="checked"; + $OFFbuttonfw=""; + } +} + # The on/off radio button print " \n"; @@ -138,5 +165,5 @@ print " \n"; print "
\n"; -print ' '; +print ' '; print " $text{'index_activate_seton'}\n"; print "
\n"; @@ -144,5 +171,5 @@ print " \n"; print "
\n"; -print ' '; +print ' '; print " $text{'index_activate_setoff'}\n"; print "
\n"; @@ -170,7 +197,15 @@ print "
\n"; print " \n"; print "
\n"; @@ -242,5 +277,5 @@ print " \n"; print "
\n"; -print ' '; +print ' '; print " $text{'index_activate_fwd_yes'}\n"; print "
\n"; @@ -248,5 +283,5 @@ print " \n"; print "
\n"; -print ' '; +print ' '; print " $text{'index_activate_fwd_no'}\n"; print "
\n"; @@ -273,5 +308,11 @@ print "
\n"; print ' \n"; print "
\n"; diff -U 2 -r /root/src/webmin/vacationadm/vacation.cgi /usr/libexec/webmin/vacationadm/vacation.cgi --- /root/src/webmin/vacationadm/vacation.cgi Wed Dec 19 18:12:20 2001 +++ /usr/libexec/webmin/vacationadm/vacation.cgi Wed Dec 19 18:07:26 2001 @@ -29,5 +29,6 @@ ################################################################### do '../web-lib.pl'; -do 'local-lib.pl'; +#do 'local-lib.pl'; +require './local-lib.pl'; # We only need this module if we want ftp uploads Only in /usr/libexec/webmin/vacationadm: vacation.db.slack