Diff for /loncom/cgi/takeonline.pl between versions 1.2 and 1.3

version 1.2, 2003/09/11 20:54:11 version 1.3, 2008/11/28 20:50:25
Line 1 Line 1
 #!/usr/bin/perl  #!/usr/bin/perl
   $|=1;
 # Take machine online  # Take machine online
 #  #
 # $Id$  # $Id$
Line 26 Line 27
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
 print "Content-type: text/html\n\n".  use strict;
       "<html><body bgcolor=#FFFFFF><h1>Take Online</h1>";  use lib '/home/httpd/lib/perl/';
 system('cp /home/httpd/html/origindex.html /home/httpd/html/index.html');  use Apache::lonlocal;
 system('rm /home/httpd/html/lon-status/reroute.txt');  use LONCAPA::loncgi;
 print "</body></html>";  
   print "Content-type: text/html\n\n";
   
   &main();
   
   sub main {
       if (!&LONCAPA::loncgi::check_ipbased_access('takeonline')) {
           if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
               &Apache::lonlocal::get_language_handle();
               print &LONCAPA::loncgi::missing_cookie_msg();
               return;
           }
   
           if (!&LONCAPA::loncgi::can_view('takeonline')) {
               &Apache::lonlocal::get_language_handle();
               print &LONCAPA::loncgi::unauthorized_msg('takeonline');
               return;
           }
       }
   
       &Apache::lonlocal::get_language_handle();
   
       print '<html><body bgcolor="#FFFFFF"><h1>'.&Apache::lonlocal::mt('Take Online').'</h1>';
       system('cp /home/httpd/html/origindex.html /home/httpd/html/index.html');
       system('rm /home/httpd/html/lon-status/reroute.txt');
       print '</body></html>';
   }

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>