Changeset 1306

Show
Ignore:
Timestamp:
11/05/07 14:44:57 (6 years ago)
Author:
benoitg
Message:
  • Commit most of Robin Jones install script improvements.
Location:
trunk/wifidog-auth
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/CHANGELOG

    r1304 r1306  
    11# $Id$ 
     22007-11-05 Benoit Grégoire  <bock@step.polymtl.ca> 
     3        * Commit most of Robin Jones install script improvements. 
     4                 
    252007-10-22 Benoit Grégoire  <bock@step.polymtl.ca> 
    36        * Major security fix:  Fix the authenticator for a security breach where a user could get Internet access using an empty username.  LocalUser and LDAP were definitely vulnerable, RADIUS may have been. 
  • trunk/wifidog-auth/wifidog/classes/Dependency.php

    r1294 r1306  
    3737 * @package    WiFiDogAuthServer 
    3838 * @author     Philippe April 
    39  * @author     Max Horváth <max.horvath@freenet.de> 
    40  * @author     Benoit Grégoire <bock@step.polymtl.ca> 
     39 * @author     Max Horváth <max.horvath@freenet.de> 
     40 * @author     Benoit Grégoire <bock@step.polymtl.ca> 
    4141 * @copyright  2005-2007 Philippe April 
    42  * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
    43  * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
     42 * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
     43 * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
    4444 * @version    Subversion $Id$ 
    4545 * @link       http://www.wifidog.org/ 
     
    6464  * @package    WiFiDogAuthServer 
    6565  * @author     Philippe April 
    66   * @author     Max Horváth <max.horvath@freenet.de> 
    67   * @author     Benoit Grégoire <bock@step.polymtl.ca> 
     66  * @author     Max Horváth <max.horvath@freenet.de> 
     67  * @author     Benoit Grégoire <bock@step.polymtl.ca> 
    6868  * @copyright  2005-2007 Philippe April 
    69   * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
    70   * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
     69  * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
     70  * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
    7171  */ 
    7272  class Dependency 
     
    123123       'installDestination' => "/" 
    124124       ), 
     125       
    125126       /* PHP extensions (optional) */ 
     127       "simplepie" => array ( 
     128       "type" => "localLib", 
     129       "detectFiles" => "lib/simplepie/simplepie.inc", 
     130       'description' => "SimplePie is a dependency that provides an RSS parser in PHP. It is required for RssPressReview.  It is is recommended to install it, if you do not, RSS feed options will be disabled.", 
     131       'website' => "http://simplepie.org/", 
     132       'installSourceUrl' => "http://svn.simplepie.org/simplepie/branches/1.0/", 
     133       'installMethod' => "svn", 
     134       'installDestination' => "simplepie" 
     135       ), 
     136       'jpgraph' => array ( 
     137       "type" => "localLib", 
     138       "detectFiles" => "lib/jpgraph-1.22/src/jpgraph.php", 
     139       'description' => "JpGraph is a Object-Oriented Graph creating library for PHP. 
     140JpGraph is not currently used by Wifidog (it will be use for statistic graphs in a later version). You can skip this installation if your not a developper.", 
     141       'website' => "http://www.aditus.nu/jpgraph/", 
     142       'installSourceUrl' => "http://hem.bredband.net/jpgraph/jpgraph-1.22.tar.gz", 
     143       'installMethod' => "tarball", 
     144       'installDestination' => "/" 
     145        ), 
     146       'feedpressreview' => array ( 
     147       "type" => "localLib", 
     148       "detectFiles" => "lib/feedpressreview/FeedPressReview.inc", 
     149       'description' => "Feed Press Review allows your athentication server to produce RSS Feeds.  It is recommended that it is installed.  If it is not installed, the RSS feed options will be disabled.", 
     150       'website' => "http://projects.coeus.ca/feedpressreview/", 
     151       'installSourceUrl' => "http://projects.coeus.ca/svn/feedpressreview/trunk/", 
     152       'installMethod' => "svn", 
     153       'installDestination' => "feedpressreview" 
     154        ), 
    126155       'gettext' => array ( 
    127156       "type" => "phpExtension", 
     
    282311 
    283312          /** Use PHP internal functions to execute a command 
    284             @return: Return value of the command*/ 
     313           Â @return: Return value of the command*/ 
    285314          function execVerbose($command, & $output, & $return_var, &$errMsg = null) { 
    286315              $errMsg .= "Executing: $command <br/>"; 
     
    469498                             break; 
    470499                         case "localLib": 
    471                                                   if($this->getInstallSourceUrl()) { 
    472                                                                                    $name = $this->getId().'_install'; 
    473                                                                                    $value = sprintf(_("Install %s"), $this->getId()); 
    474                                                               $html .= sprintf("<input type='submit' name='%s' value='%s'/>", $name, $value); 
     500                             if($this->getInstallSourceUrl()) { 
     501                                 $name = $this->getId().'_install'; 
     502                                 $value = sprintf(_("Install %s"), $this->getId()); 
     503                                 $html .= sprintf("<input type='submit' name='%s' value='%s'/>", $name, $value); 
    475504                                                       
    476505                             } 
    477506                             else { 
    478                                  $html .= sprintf(_("Sorry, i couldn't find the source for %s in installSourceUrl"), $this->getId()); 
     507                                 $html .= sprintf(_("Sorry, i couldn't find the source for %s in installSourceUrl"), 
     508                                 $this->getId()); 
    479509                             } 
    480510 
     
    657687                           } 
    658688                           else { 
    659                                $installDestinationPath = WIFIDOG_ABS_FILE_PATH . "lib/";$installDestinationPathOrig. 
     689                               $installDestinationPath = WIFIDOG_ABS_FILE_PATH . "lib/" .$installDestinationPathOrig; 
    660690                               $installMethod = $this->getInstallMethod(); 
    661691                               switch($installMethod) { 
     692                                   case "svn": 
     693                                       self::execVerbose("svn co ".escapeshellarg($installSourceUrl)." ".escapeshellarg      ($installDestinationPath), $output, $return, $errorMsg); 
     694 
     695 
     696                                       break; 
     697 
    662698                                   case "tarball": 
    663699                                       $downloadPath = WIFIDOG_ABS_FILE_PATH . "tmp/"; 
  • trunk/wifidog-auth/wifidog/install.php

    r1296 r1306  
    11<?php 
    2  
    32 
    43/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ 
     
    3938 * 
    4039 * @package    WiFiDogAuthServer 
    41  * @author     Pascal Leclerc <isf@plec.ca> 
    42  * @copyright  2005-2006 Pascal Leclerc 
     40 * @author     Pascal Leclerc <isf@plec.ca>, Robin Jones and Benoit Grégoire 
     41 * @copyright  2005-2006 Pascal Leclerc, 2006-2007 Technologies Coeus inc., 2007 Robin Jones 
    4342 * @version    Subversion $Id$ 
    4443 * @link       http://www.wifidog.org/ 
     
    7170} 
    7271 
    73 # Read password file 
     72#Read password file 
    7473$fd = fopen($password_file, "rb"); 
    7574$password = trim(fread($fd, filesize($password_file))); 
     
    8887$auth = true; 
    8988 
    90 if (!$auth) { # Ask user for the passorwd 
     89if (!$auth) {   # Ask user for the password 
    9190    header('WWW-Authenticate: Basic realm="Private"'); 
    9291    header('HTTP/1.0 401 Unauthorized'); 
    93     echo "Authorization Required !"; 
     92    echo "Restricted Access - Authorisation Required!"; 
    9493    exit; 
    9594} 
    9695# End of Security validation 
    9796 
     97 
     98/************************************************************************************ 
     99 * Begin Dynamic HTML Page Header 
     100 ************************************************************************************/ 
    98101print<<<EndHTML 
    99102<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
    100103<HTML> 
    101104<HEAD> 
    102   <TITLE>$page - Wifidog Auth-server configuration</TITLE> 
     105  <TITLE>$page - Wifidog Auth-server installation and configuration</TITLE> 
    103106 
    104107  <SCRIPT type="text/javascript"> 
    105     // This function add new configuration value to the "config" hidden input 
    106     // On submit, config will be parsed and value saved to config.php file 
     108    // This function adds a new configuration value to the "config" hidden input 
     109    // On submit, the config will be parsed and the value saved to the config.php file 
    107110    function newConfig(dataAdd) { 
    108111      // TODO : Validate input data 
     
    116119    } 
    117120  </SCRIPT> 
    118  
     121   
     122<link rel="stylesheet" type="text/css" href="/media/base_theme/stylesheet.css" /> 
    119123</HEAD> 
    120 <BODY text="black" bgcolor="#CFCFCF"> 
     124<BODY id='page' class='{$page}'> 
    121125 
    122126<style type="text/css"> 
    123127<!-- 
    124 .button 
     128 
     129.submit 
    125130{ 
    126   font-size: 12pt; 
    127   font-weight: bold; 
    128   color: black; 
    129   background: #D4D0C8; 
     131  font-size: 14pt; 
    130132  text-decoration: none; 
    131   border-top: 1px solid white; 
    132   border-right: 2px solid gray; 
    133   border-bottom: 2px solid gray; 
    134   border-left: 1px solid white; 
    135133  padding: 3px 5px 3px 5px; 
     134  background-color: #ccccff; 
    136135} 
    137136 
    138 body 
    139 { 
    140   background-color: white; 
     137table { 
     138border-collapse: collapse; 
    141139} 
    142140 
    143 td 
    144 { 
    145   padding: 1px 4px 1px 4px; 
    146 } 
    147141--> 
    148142</style> 
     143 
    149144 
    150145<FORM NAME="myform" METHOD="post"> 
     
    152147<INPUT TYPE="HIDDEN" NAME="debug"> 
    153148<INPUT TYPE="HIDDEN" NAME="config"> 
    154  
     149<div id="page_body"> 
     150        <div id="left_area"> 
     151                <div id="left_area_top"> 
     152                        <h1>Installation status</h1> 
     153                         
     154EndHTML; 
     155$pageindex = array("Welcome"=>"Welcome", 
     156                   "Prerequisites"=>"Prerequisites", 
     157                   "Permissions"=>"Permissions", 
     158                   "Dependencies"=> "Dependencies",                 
     159                   "Database Access"=> "Database", 
     160                   "Database Connection"=>"testdatabase", 
     161                   "Database Initialisation"=>"dbinit", 
     162                   "Global Options"=>"options", 
     163                   "Language Locale"=>"languages", 
     164                   "User Creation"=>"admin", 
     165                   "Review"=>"Review", 
     166                   "Finish"=>"finish",); 
     167foreach($pageindex as $pagekey => $pagevalue){ 
     168    if ($pagevalue != $page){ 
     169        print "$pagekey <br>"; 
     170    } 
     171    else { 
     172        print "<strong>$pagekey</strong> <br>"; 
     173    } 
     174} 
     175print<<<EndHTML 
     176                </div> 
     177                <div id="left_area_bottom"> 
     178                        <p><a href="../CHANGELOG">Change Log</a><BR> 
     179                        <a href="http://dev.wifidog.org/report/10">Known issues</a></p> 
     180                </div> 
     181        </div> 
     182<div id="main_area"> 
     183         
     184        <div id="main_area_top"> 
     185                <table align="center"><tr><td><img src="/media/base_theme/images/wifidog_logo_banner.png" /></td></tr></table> 
     186        </div> 
     187        <div id="main_area_middle"> 
    155188EndHTML; 
    156189 
     
    161194#exit(); 
    162195 
    163 # Needed files/directories with write access 
     196#Begin Perquisite Array         (Needed files/directories with write access) 
    164197$dir_array = array ( 
    165198'tmp', 
     
    173206'config.php' 
    174207); 
    175  
    176 $smarty_full_url = 'http://smarty.php.net/do_download.php?download_file=Smarty-2.6.14.tar.gz'; 
    177  
    178 $neededPackages = array ( 
    179 'smarty' => array ( 
    180 'needed' => 1, 
    181 'available' => 0, 
    182 'message' => '', 
    183 'file' => 'lib/smarty/Smarty.class.php' 
     208#end perquisite array 
     209 
     210 
     211#Begin Global Options Array 
     212$optionsInfo = array ( 
     213/********************************************************************************************* 
     214TODO:  SSL is now configured in the DB, but should still be handled by the install script 
     215'SSL_AVAILABLE' => array ( 
     216'title' => 'SSL Support', 
     217'depend' => 'return 1;', 
     218'message' => '&nbsp;' 
    184219), 
    185 'simplepie' => array ( 
    186 'needed' => 0, 
    187 'available' => 0, 
    188 'message' => '', 
    189 'file' => 'lib/simplepie/simplepie.inc', 
    190 'svn_source' => 'http://svn.simplepie.org/simplepie/branches/1.0/' 
    191 ), 
    192 'feedpressreview' => array ( 
    193 'needed' => 0, 
    194 'available' => 0, 
    195 'message' => '', 
    196 'file' => 'lib/feedpressreview/FeedPressReview.inc', 
    197 'svn_source' => 'http://projects.coeus.ca/svn/feedpressreview/trunk/' 
    198 ) 
    199 ); 
    200  
    201 $optionsInfo = array ( 
    202 /* TODO:  SSL is now configured in the DB, but should still be handled by the install script 
    203  'SSL_AVAILABLE' => array ( 
    204  'title' => 'SSL Support', 
    205  'depend' => 'return 1;', 
    206  'message' => '&nbsp;' 
    207  ), 
    208  */ 
     220************************************************************************/ 
    209221'CONF_USE_CRON_FOR_DB_CLEANUP' => array ( 
    210222'title' => 'Use cron for DB cleanup', 
     
    219231); 
    220232 
    221 foreach ($neededPackages as $key => $value) { # Detect installed libraries (smarty, ...) 
    222     if (file_exists(WIFIDOG_ABS_FILE_PATH . $neededPackages[$key]['file'])) 
    223     $neededPackages[$key]['available'] = 1; 
    224 } 
     233 
    225234 
    226235$CONFIG_FILE = 'config.php'; 
     
    268277################################### 
    269278# array (array1(name1, page1), array2(name2, page2), ..., arrayN(nameN, pageN)); 
    270 # Todo : Supporter HTTP_REFERER (j'me comprends) 
    271279function navigation($dataArray) { 
    272280    $SERVER = $_SERVER['HTTP_HOST']; 
    273281    $SCRIPT = $_SERVER['SCRIPT_NAME']; 
    274     print "\n<p>"; 
     282    print "<p><br></p>"; 
    275283    foreach ($dataArray as $num => $navArray) { 
    276284        $title = $navArray['title']; 
     
    278286        empty ($navArray['action']) ? $action = '' : $action = $navArray['action']; 
    279287        print<<<EndHTML 
    280 <A HREF="#" ONCLICK="document.myform.page.value = '$page'; document.myform.action.value = '$action'; document.myform.submit();" CLASS="button">$title</A> 
     288<A HREF="#" ONCLICK="document.myform.page.value = '$page'; document.myform.action.value = '$action'; document.myform.submit();" CLASS="submit">$title</A> 
    281289 
    282290EndHTML; 
    283291        if (array_key_exists($num +1, $dataArray)) 
    284         print "&nbsp;-&nbsp;"; 
     292        print "&nbsp; &nbsp;"; 
    285293    } 
    286     print "</p>\n"; 
     294 
    287295} 
    288296 
     
    292300    print<<<EndHTML 
    293301 
    294 <p><A HREF="#" ONCLICK="javascript: window.location.reload(true);" CLASS="button">Refresh</A></p> 
     302<p><A HREF="#" ONCLICK="javascript: window.location.reload(true);" CLASS="submit">Refresh</A></p> 
    295303EndHTML; 
    296304} 
     
    304312 EndHTML; 
    305313 } */ 
    306  
    307 ################################### 
    308 # In development 
    309 /*function installPackage($pkg_name, $full_url, $copy) { 
    310  print "<h1>$pkg_name installation</h1>\n"; 
    311  chdir(WIFIDOG_ABS_FILE_PATH."tmp"); 
    312  list($url, $filename) = split ("=", $full_url); 
    313  
    314  print "Download source code ($filename) : "; 
    315  if (!file_exists($filename)) 
    316  Dependency::execVerbose("wget \"$url\"", $output, $return); 
    317  if (!file_exists($filename)) // wget success if file exists 
    318  Dependency::execVerbose("wget \"$full_url\" 2>&1", $output_array, $return); 
    319  if (!file_exists($filename)) { 
    320  print "<B STYLE=\"color:red\">Error</b><p>Current working directory : <em>$basepath/tmp/smarty</em>"; 
    321  $output = implode("\n", $output_array); 
    322  print "<pre><em>wget \"$full_url\"</em>\n$output</pre>"; 
    323  exit(); 
    324  } else { 
    325  print "OK<BR>"; 
    326  } 
    327  
    328  print "Uncompressing : "; 
    329  $dirname = array_shift(split(".tar.gz", $filename)); 
    330  
    331  if (!file_exists($dirname)) 
    332  Dependency::execVerbose("tar -xzf $dirname.tar.gz", $output, $return); 
    333  print "OK<BR>"; 
    334  print "Copying : "; 
    335  if (!file_exists('../../lib/smarty/Smarty.class.php')); 
    336  Dependency::execVerbose("cp -r $dirname/libs/* ../../lib/smarty", $output, $return); 
    337  Dependency::execVerbose("cp -r $dirname/libs/* ../../lib/smarty", $output, $return); 
    338  $copy 
    339  print "OK<BR>"; 
    340  }*/ 
    341314 
    342315################################### 
     
    399372} 
    400373 
    401 ################################### 
    402 # MAIN 
     374 
     375 
     376/******************************************************************************** 
     377 * MAIN PROCEDURE                                                                                                                               * 
     378 * case statement to navigate through install script 
     379 *                                                                                                                                                              * 
     380 *********************************************************************************/ 
    403381switch ($page) { 
    404     case 'permission' : 
     382    case 'Permissions' : 
    405383        print "<h1>Permissions</h1>"; 
    406384 
     
    428406        print "<p><em>HTTP daemon UNIX username/group</em>: $process_username/$process_group</p>"; 
    429407        #    print "<p><em>HTTPD group</em>: $process_group<BR</p>"; 
    430         print "<p><table BORDER=\"1\"><tr><td><em>Directory</em></td></td><td><em>Owner</em></td><td><em>Writable</em></td></tr>\n"; 
     408        print "<p><table BORDER=\"1\"><tr><td><b>Directory</b></td></td><td><b>Owner</b></td><td><b>Writable</b></td></tr>\n"; 
    431409 
    432410        foreach ($dir_array as $dir) { 
     
    465443            navigation(array ( 
    466444            array ( 
     445                "title" => "Back", 
     446                "page" => "Prerequisites" 
     447                ), 
     448                array ( 
    467449                "title" => "Next", 
    468                 "page" => "version" 
     450                "page" => "Dependencies" 
    469451                ) 
    470452                )); 
     
    472454        else { 
    473455            refreshButton(); 
    474             print "<p>You need to allow UNIX user <em>$process_username</em> to write to these directories (mkdir, chown or chmod)</p>"; 
    475             if (!empty ($cmd_mkdir) || !empty ($cmd_mkdir)) 
    476             print "<p><b>For instance, you may want to use the following commands</b> :</p>\n"; 
    477             if (!empty ($cmd_mkdir)) 
    478             print "mkdir $cmd_mkdir <br />"; 
    479             if (!empty ($cmd_chown)) 
    480             print "chgrp -R $process_group $cmd_chown;<br/>chmod g+wx $cmd_chown;<br/>"; 
    481             print "<p>After permissions modification done, hit the REFRESH button to see the NEXT button and continue with the installation"; 
     456            navigation(array ( 
     457            array ( 
     458                "title" => "Back", 
     459                "page" => "Prerequisites" 
     460                ) 
     461                )); 
     462                print "<p>UNIX user <em>$process_username</em> must be able to write to these directories (mkdir, chown or chmod)</p>"; 
     463                if (!empty ($cmd_mkdir) || !empty ($cmd_mkdir)) 
     464                print "<p><b>For instance, you may want to use the following commands</b> :</p>\n"; 
     465                if (!empty ($cmd_mkdir)) 
     466                print "mkdir $cmd_mkdir <br />"; 
     467                if (!empty ($cmd_chown)) 
     468                print "chgrp -R $process_group $cmd_chown;<br/>chmod g+wx $cmd_chown;<br/>"; 
     469                print "<p>After permission modifications have been preformed, click the REFRESH button to check they have been completed successfully. The NEXT button will then appear to continue with the installation."; 
    482470        } 
    483471        break; 
    484         ################################### 
    485     case 'version' : 
    486         print "<h1>Checking Dependency</h1>"; 
     472        ########################################### 
     473    case 'Dependencies' : 
     474        print "<h1>Checking Dependencies</h1>"; 
    487475        $error = 0; 
    488476        $userData['error']=&$error; 
     
    494482            array ( 
    495483                "title" => "Back", 
    496                 "page" => "permission" 
     484                "page" => "Permissions" 
    497485                ), 
    498486                array ( 
    499487                "title" => "Next", 
    500                 "page" => "simplepie" 
     488                "page" => "Database" 
    501489                ) 
    502490                )); 
     
    504492 
    505493        break; 
    506         ################################### 
    507     case 'simplepie' : // Download, uncompress and install SimplePie 
    508         print "<h1>SimplePie installation</h1>\n"; 
    509  
    510         if ($neededPackages['simplepie']['available']) { 
    511             print "Already installed !<BR>"; 
    512             navigation(array ( 
    513             array ( 
    514                 "title" => "Back", 
    515                 "page" => "smarty" 
    516                 ), 
    517                 array ( 
    518                 "title" => "Next", 
    519                 "page" => "feedpressreview" 
    520                 ) 
    521                 )); 
    522         } 
    523         elseif ($action == 'install') { 
    524             require_once (dirname(__FILE__) . '/include/common.php'); 
    525             print "Download source code frpm svn($filename) : "; 
    526             Dependency::execVerbose("svn co ".escapeshellarg($neededPackages['simplepie']['svn_source'])." ".escapeshellarg(WIFIDOG_ABS_FILE_PATH."lib/simplepie"), $output, $return); 
    527             #Dependency::execVerbose("locale", $output, $return); 
    528  
    529             refreshButton(); 
    530             navigation(array ( 
    531             array ( 
    532                 "title" => "Back", 
    533                 "page" => "smarty" 
    534                 ), 
    535                 array ( 
    536                 "title" => "Next", 
    537                 "page" => "feedpressreview" 
    538                 ) 
    539                 )); 
    540         } 
    541         else { 
    542             print<<< EndHTML 
    543 <p><A HREF="http://simplepie.org/">SimplePie</A> is a dependency of provides an RSS parser in PHP. It is required for RssPressReview.  It's is recommended to install it, if you don't, RSS feeds options will be disabled. 
    544  
    545 <p>Do you want to install SimplePie ? 
    546 EndHTML; 
    547             navigation(array ( 
    548             array ( 
    549                 "title" => "Back", 
    550                 "page" => "smarty" 
    551                 ), 
    552                 array ( 
    553                 "title" => "Install", 
    554                 "page" => "simplepie", 
    555                 "action" => "install" 
    556                 ), 
    557                 array ( 
    558                 "title" => "Next", 
    559                 "page" => "feedpressreview" 
    560                 ) 
    561                 )); 
    562         } 
    563         break; 
    564         ################################### 
    565     case 'feedpressreview' : // Download, uncompress and install feedpressreview 
    566         print "<h1>Feed press review installation</h1>\n"; 
    567  
    568         if ($neededPackages['feedpressreview']['available']) { 
    569             print "Already installed !<BR>"; 
    570             navigation(array ( 
    571             array ( 
    572                 "title" => "Back", 
    573                 "page" => "simplepie" 
    574                 ), 
    575                 array ( 
    576                 "title" => "Next", 
    577                 "page" => "database" 
    578                 ) 
    579                 )); 
    580         } 
    581         elseif ($action == 'install') { 
    582             require_once (dirname(__FILE__) . '/include/common.php'); 
    583             print "Download source code frpm svn($filename) : "; 
    584             Dependency::execVerbose("svn co ".escapeshellarg($neededPackages['feedpressreview']['svn_source'])." ".escapeshellarg(WIFIDOG_ABS_FILE_PATH."lib/feedpressreview"), $output, $return); 
    585             #Dependency::execVerbose("locale", $output, $return); 
    586  
    587             refreshButton(); 
    588             navigation(array ( 
    589             array ( 
    590                 "title" => "Back", 
    591                 "page" => "smarty" 
    592                 ), 
    593                 array ( 
    594                 "title" => "Next", 
    595                 "page" => "database" 
    596                 ) 
    597                 )); 
    598         } 
    599         else { 
    600             print<<< EndHTML 
    601 <p><A HREF="http://projects.coeus.ca/feedpressreview/">Feed press review</A> is a dependency that provides a Feed aggregator in PHP.  It is recommended to install it.  If you don't, RSS feeds options will be disabled. 
    602  
    603 <p>Do you want to install FeedPressReview ? 
    604 EndHTML; 
    605             navigation(array ( 
    606             array ( 
    607                 "title" => "Back", 
    608                 "page" => "simplepie" 
    609                 ), 
    610                 array ( 
    611                 "title" => "Install", 
    612                 "page" => "feedpressreview", 
    613                 "action" => "install" 
    614                 ), 
    615                 array ( 
    616                 "title" => "Next", 
    617                 "page" => "database" 
    618                 ) 
    619                 )); 
    620         } 
    621         break; 
    622         ################################### 
    623     case 'jpgraph' : // Download, uncompress and install JpGraph library 
    624         print "<h1>JpGraph installation</h1>\n"; 
    625  
    626         if ($neededPackages['jpgraph']['available']) { 
    627             print "Already installed !<BR>"; 
    628             navigation(array ( 
    629             array ( 
    630                 "title" => "Back", 
    631                 "page" => "feedpressreview" 
    632                 ), 
    633                 array ( 
    634                 "title" => "Next", 
    635                 "page" => "database" 
    636                 ) 
    637                 )); 
    638         } 
    639         elseif ($action == 'install') { 
    640             chdir(WIFIDOG_ABS_FILE_PATH . "tmp"); 
    641             $filename = array_pop(preg_split("/\//", $jpgraph_full_url)); 
    642  
    643             print "Download source code ($filename) : "; 
    644             if (!file_exists($filename)) 
    645             Dependency::execVerbose("wget \"$jpgraph_full_url\" 2>&1", $output, $return); 
    646             if (!file_exists($filename)) { # Error occured, print output of wget 
    647                 print "<B STYLE=\"color:red\">Error</b><p>Current working directory : <em>$basepath/tmp</em>"; 
    648                 $output = implode("\n", $output); 
    649                 print "<pre><em>wget \"$jpgraph_full_url\"</em>\n$output</pre>"; 
    650                 exit (); 
    651             } 
    652             else { 
    653                 print "OK<BR>"; 
    654             } 
    655  
    656             print "Uncompressing : "; 
    657             $dirname = array_shift(split(".tar.gz", $filename)); 
    658             if (!file_exists($dirname)) 
    659             Dependency::execVerbose("tar -xzf $dirname.tar.gz", $output, $return); 
    660             print "OK<BR>"; 
    661  
    662             print "Copying : "; 
    663             if (!file_exists(WIFIDOG_ABS_FILE_PATH."lib/jpgraph/jpgraph.php")) 
    664             Dependency::execVerbose("cp $dirname/src/* ".WIFIDOG_ABS_FILE_PATH."lib/jpgraph", $output, $return); # TODO : Utiliser JPGRAPH_REL_PATH 
    665  
    666             print "OK<BR>"; 
    667  
    668             refreshButton(); 
    669             navigation(array ( 
    670             array ( 
    671                 "title" => "Back", 
    672                 "page" => "feedpressreview" 
    673                 ), 
    674                 array ( 
    675                 "title" => "Next", 
    676                 "page" => "database" 
    677                 ) 
    678                 )); 
    679         } 
    680         else { 
    681             print<<< EndHTML 
    682 <p><A HREF="http://www.aditus.nu/jpgraph/">JpGraph</A> is a Object-Oriented Graph creating library for PHP. 
    683 JpGraph is not currently use by Wifidog (will be use for statistique graph in a later version). You can skip this installation if your not a developper. 
    684  
    685 <p>Do you want to install JpGraph ? 
    686 EndHTML; 
    687             navigation(array ( 
    688             array ( 
    689                 "title" => "Back", 
    690                 "page" => "feedpressreview" 
    691                 ), 
    692                 array ( 
    693                 "title" => "Install", 
    694                 "page" => "jpgraph", 
    695                 "action" => "install" 
    696                 ), 
    697                 array ( 
    698                 "title" => "Next", 
    699                 "page" => "database" 
    700                 ) 
    701                 )); 
    702         } 
    703         break; 
    704         ################################### 
    705     case 'database' : 
     494 
     495        ########################################### 
     496    case 'Database' : 
    706497        ### TODO : Valider en javascript que les champs soumit ne sont pas vide 
    707498        #          Pouvoir choisir le port de la DB ??? 
    708499        print<<< EndHTML 
    709 <h1>Database access configuration</h1> 
     500<h1>Database Access Configuration</h1> 
    710501<BR> 
    711502<table border="1"> 
     
    716507</table> 
    717508 
    718 <p>By clicking Next, your configuration will be automaticaly saved 
     509<p>By clicking Next, your configuration will be automatically saved.</p> 
    719510 
    720511<script type="text/javascript"> 
     
    732523        array ( 
    733524            "title" => "Back", 
    734             "page" => "simplepie" 
    735             ) 
     525            "page" => "Dependencies" 
     526            ), 
    736527            )); #, array("title" => "Next", "page" => "testdatabase"))); 
    737528            print<<< EndHTML 
    738 <p><A HREF="#" ONCLICK="javascript: document.myform.page.value='testdatabase'; submitDatabaseValue(); document.myform.submit();" CLASS="button">Next</A></p> 
     529<A HREF="#" ONCLICK="javascript: document.myform.page.value='testdatabase'; submitDatabaseValue(); document.myform.submit();" CLASS="submit">Next</A> 
    739530 
    740531EndHTML; 
    741532 
    742533            break; 
    743             ################################### 
     534            ########################################### 
    744535    case 'testdatabase' : 
    745536        print "<h1>Database connection</h1>"; 
     
    755546        } 
    756547        else { 
    757             printf ("<p>Unable to connect!  The server has to be online, the database \"%s\" must exist, and the postgresql.conf and pg_hba.conf must allow the user \"%s\" to open a connection to it on host \"%s\" to continue.  See the error above for hints on what the problem may be.", $CONF_DATABASE_NAME, $CONF_DATABASE_USER, $CONF_DATABASE_HOST); 
     548            printf ("<p>Unable to connect to database!  Please make sure the server is online and the database \"%s\" exists. Also 'postgresql.conf' and 'pg_hba.conf' must allow the user \"%s\" to open a connection to it on host \"%s\" to continue.  See the error above for clues on what the problem may be.</p>", $CONF_DATABASE_NAME, $CONF_DATABASE_USER, $CONF_DATABASE_HOST); 
    758549            print "<p>Please go back and retry with correct values, or fix your server configuration.</p>"; 
    759550            refreshButton(); 
    760             navigation(array(array("title" => "Back", "page" => "database"))); 
     551            navigation(array(array("title" => "Back", "page" => "Database"))); 
    761552            die(); 
    762553        } 
    763554        print "</li>"; 
    764                print "<li>";  
     555        print "<li>"; 
    765556        $postgresql_info = pg_version(); 
    766557        printf ("PostgreSQL server version: %s", $postgresql_info['server']);        print "</li>"; 
    767          
     558 
    768559        #        if ($postgresql_info['server'] > $requiredPostgeSQLVersion) { Todo : Do something } 
    769560 
     
    774565        array ( 
    775566            "title" => "Back", 
    776             "page" => "database" 
     567            "page" => "Database" 
    777568            ), 
    778569            array ( 
     
    782573            )); 
    783574            break; 
    784             ################################### 
     575            ########################################### 
    785576    case 'dbinit' : 
    786         print "<h1>Database initialisation</h1>"; 
     577        print "<h1>Database Initialisation</h1>"; 
    787578        # SQL are executed with PHP, some lines need to be commented out. 
    788579        $file_db_version = 'UNKNOW'; 
     
    867658            else { 
    868659                print "Error : Unexpected result"; 
    869                             exit (); 
     660                exit (); 
    870661            } 
    871662 
     
    875666        array ( 
    876667            "title" => "Back", 
    877             "page" => "database" 
     668            "page" => "testdatabase" 
    878669            ), 
    879670            array ( 
     
    883674            )); 
    884675            break; 
    885  
    886             ################################### 
     676            ########################################### 
    887677    case 'options' : 
    888678        # TODO : Tester que la connection SSL est fonctionnelle 
    889679        #        Options avancees : Supporter les define de [SMARTY|PHLICKR|JPGRAPH]_REL_PATH 
    890680        print<<< EndHTML 
    891 <h1>Available options</h1> 
     681<h1>Available Options</h1> 
    892682  <table border="1"> 
    893683 
     
    898688            $value = $configArray[$name]; # Value of option in config.php 
    899689            $title = $optionsInfo[$name]['title']; # Field Title 
    900             $message = $optionsInfo[$name]['message']; # Message why option is disable 
     690            $message = $optionsInfo[$name]['message']; # Message why option is disabled 
    901691            if(empty($value)) 
    902692            $message .= ", ERROR: unable to find the '$name' directive in the config file"; 
    903693            $depend = @ eval ($optionsInfo[$name]['depend']); # Evaluate the dependencie 
    904694            $selectedTrue = ''; 
    905             $selectedFalse = ''; # Initialize value 
     695            $selectedFalse = ''; # Initialise value 
    906696            $value == 'true' ? $selectedTrue = 'SELECTED' : $selectedFalse = 'SELECTED'; # Use to select the previous saved option 
    907697            $depend == 1 ? $disabled = '' : $disabled = 'DISABLED'; # Disable <SELECT> if dependencie is not satisfied 
     
    951741            )); 
    952742 
    953             print<<< EndHTML 
    954 <p><A HREF="#" ONCLICK="javascript: document.myform.page.value='languages'; submitOptionsValue(); document.myform.submit();" CLASS="button">Next</A></p> 
     743            print<<<EndHTML 
     744<A HREF="#" ONCLICK="javascript: document.myform.page.value='languages'; submitOptionsValue(); document.myform.submit();" CLASS="submit">Next</A> 
    955745EndHTML; 
    956746 
    957747            break; 
    958  
    959             ################################### 
     748            ########################################### 
    960749    case 'languages' : 
    961         print "<h1>Languages configuration</h1>"; 
    962         print<<< EndHTML 
    963       <p>Not yet implemented ...</p> 
    964       <p>Will allow selecting language to use.</p> 
    965 <em>Error message example</em> : <BR> 
     750 
     751        require_once('classes/LocaleList.php'); 
     752 
     753        #check for current language code in config.php 
     754        $CURRENT_LOCALE = $configArray['DEFAULT_LANG']; 
     755 
     756        #pull a list of all available languages (codes and real friendly names) 
     757        $AVAIL_LOCALE_ARRAY = LocaleList::getAvailableLanguageArray(); 
     758 
     759 
     760        print "<h1>Languages Configuration</h1>"; 
     761 
     762 
     763 
     764        print<<<EndHTML 
     765   
     766      <p>Please select the Authentication Servers default language and locale</p> 
     767 
     768       <div class="language"> 
     769           <form class="language" name="lang_form" method="post" action="{$formAction}"> 
     770               <div>Default Server Locale: 
     771        <select name="default_locale" onchange="newConfig('DEFAULT_LANG=' + this.options[this.selectedIndex].value);"> 
     772EndHTML; 
     773        #for each language in the array get the language code and the friendly name 
     774        foreach ($AVAIL_LOCALE_ARRAY as $_langIds => $_langNames) { 
     775            #if the current local in config.php is the same as the current member of the array, select it as default 
     776            if ($CURRENT_LOCALE == $_langIds) { 
     777                $_selected = (' selected="selected"'); 
     778            } else {#else leave it alone 
     779                $_selected = ""; 
     780            } 
     781            #add the options to the combobox (hidden value= language code, user friendly name [0]multilingual [1]English 
     782            echo'<option value="' . $_langIds . '"' . $_selected . '>'.$_langNames[1].'</option>'; 
     783        } 
     784        print<<<EndHTML 
     785                </select> 
     786               </div> 
     787           </form> 
     788       </div> 
     789 
     790 
     791 
     792  
     793<br><br><br><br> 
     794<strong>Common Error message:</strong> <BR> 
     795<p>This is an example of message you may see in the top of your working auth-server IF the languagepacks on your server have not been installed. In most Unix/Linux system, you could use locale -a to list all available locales on the server and run "apt-get install locales-all" for full language support</p> 
     796 
    966797<DIV style="border:solid black;">Warning: language.php: Unable to setlocale() to fr, return value: , current locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C; [...]</DIV> 
    967 <p><em>I repeat</em> : This is an example of message you can see in the top of your working auth-server if language are not set correctly. To change these values please edit <em>config.php</em> in auth-server install directory. Look for "Available locales" and "Default language" header in config.php. 
    968 EndHTML; 
    969         //    Dependency::execVerbose("locale -a 2>&1", $output, $return); 
     798  
     799 
     800EndHTML; 
    970801 
    971802        navigation(array ( 
     
    980811            )); 
    981812            break; 
    982             ################################### 
     813            ########################################### 
    983814    case 'admin' : 
    984         print "<h1>Administration account</h1>"; 
     815        print "<h1>Administration accounts</h1>"; 
    985816        # TODO : Allow to create more than one admin account and list the current admin users 
    986817        #        Allow admin to choose to show or not is username 
     
    993824        $connection = pg_connect($conn_string) or die(); 
    994825 
    995         if ($action == 'create') { 
     826        $sql = "SELECT * FROM users NATURAL JOIN server_stakeholders"; 
     827        $result = pg_query($connection, $sql); 
     828        $result_array = pg_fetch_all($result); 
     829        $username_db = $result_array[0]['username']; 
     830 
     831        if (empty ($username_db) && $action == 'create') {//Only allow creating an adminstrator if we don't already have one.  Otherwise we have a HUGE security hole. 
    996832            //      require_once(dirname(__FILE__) . '/config.php'); 
    997833            require_once (dirname(__FILE__) . '/include/common.php'); 
     
    1008844        } 
    1009845 
    1010         $sql = "SELECT * FROM users NATURAL JOIN server_stakeholders WHERE account_origin = 'default-network'"; 
     846        $sql = "SELECT * FROM users NATURAL JOIN server_stakeholders"; 
    1011847        $result = pg_query($connection, $sql); 
    1012848        $result_array = pg_fetch_all($result); 
    1013849        $username_db = $result_array[0]['username']; 
    1014850 
    1015         if (!empty ($username_db)) { 
    1016             print "<p>Your administrator user account is <em>$username_db</em>"; 
    1017             navigation(array ( 
    1018             array ( 
    1019                 "title" => "Back", 
    1020                 "page" => "languages" 
    1021                 ), 
    1022                 array ( 
    1023                 "title" => "Next", 
    1024                 "page" => "end" 
    1025                 ) 
    1026                 )); 
     851        if (!empty ($username_db)) {#if a username exists 
     852            print "<table>\n"; 
     853            print "<tr><th colspan=2>Your current administrator accounts are:</th></tr>\n"; 
     854            print "<tr><th>email</th><th>username</th></tr>\n"; 
     855            foreach($result_array as $arraykey => $arrayvalue1) { 
     856                print "<tr><td>".$arrayvalue1['email']."</td><td>".$arrayvalue1['username']."</td></tr>\n"; 
     857            } 
     858            print "</table>\n"; 
    1027859        } 
    1028860        else { 
     861            print"<strong>No current administrators exist, please create at least one...</strong>"; 
    1029862            print<<<EndHTML 
    1030863        <p> 
    1031         <table BORDER="1"> 
     864        <table> 
    1032865        <tr> 
    1033866          <td>Username</td><td><INPUT type="text" name="username" value="$username"></td> 
     
    1044877        </table> 
    1045878 
    1046         <script type="text/javascript"> 
     879        <script type="text/javascript"> // TODO: check whether user already exists 
    1047880          function submitValue() { 
    1048             if (document.myform.password.value != document.myform.password2.value) { 
     881            if (document.myform.username.value == '') { 
     882              alert('Please enter a username'); 
     883              exit(); 
     884            } 
     885            if (document.myform.password.value != document.myform.password2.value) { 
    1049886              alert('Password mismatch, Please retry'); 
    1050887              exit(); 
    1051888            } 
    1052889            if (document.myform.password.value == '') { 
    1053               alert('You need to type a password'); 
     890              alert('Please enter a valid password'); 
    1054891              exit(); 
    1055892            } 
     893                re = /^[0-9a-zA-Z]{6,}$/; 
     894            if (!re.test(document.myform.password.value)) { 
     895              alert('Your password does not meet complexity requirements. 6 letters and/or numbers '); 
     896              exit(); 
     897            } 
     898 
    1056899            if (document.myform.email.value == '') { 
    1057               alert('You need to type a email'); 
     900              alert('Please enter a valid email address'); 
    1058901              exit(); 
    1059902            } 
     
    1063906          } 
    1064907        </script> 
    1065  
    1066 EndHTML; 
     908EndHTML; 
     909 
     910            print "<p><A HREF=\"#\" ONCLICK=\"javascript: submitValue(); window.location.reload(true);\" CLASS=\"submit\">Create User</A></p><br><br><br>\n"; 
     911 
     912        } 
     913 
     914        if (!empty ($username_db)) { 
     915            navigation(array ( 
     916            array ( 
     917                "title" => "Back", 
     918                "page" => "languages" 
     919                ), 
     920                array ( 
     921                "title" => "Next", 
     922                "page" => "finish" 
     923                ) 
     924                )); 
     925        } 
     926        else { 
    1067927            navigation(array ( 
    1068928            array ( 
     
    1071931                ) 
    1072932                )); 
    1073                 print "<p><A HREF=\"#\" ONCLICK=\"javascript: submitValue();\" CLASS=\"button\">Next</A></p>\n"; 
     933 
    1074934        } 
    1075935        break; 
    1076         ################################### 
    1077     case 'end' : 
     936        ########################################### 
     937    case 'finish' : 
    1078938        $url = 'http://' . $_SERVER['HTTP_HOST'] . SYSTEM_PATH; 
    1079939        print<<<EndHTML 
    1080   <h1>Thanks for using Wifidog</h1> 
    1081   Redirection to your new WifiDog Authentification Server in 3 seconds 
    1082   <meta http-equiv="REFRESH" content="3;url=$url"> 
    1083   <pre> 
    1084  
     940  <h1>Thank you for choosing Wifidog</h1> 
     941  <p>Redirecting you to your new WifiDog Authentification Server in 10 seconds</p> 
     942  <meta http-equiv="REFRESH" content="10;url=$url"> 
     943  <p>For Help and documentation please visit <a href="http://www.wifidog.org">http://www.wifidog.org</a></p> 
     944<pre> 
    1085945               |\   /|              _ 
    1086946               |A\_/A|            z   z 
     
    1101961</pre> 
    1102962EndHTML; 
    1103         #navigation(array(array("title" => "Back", "page" => "hotspot"))); 
     963        navigation(array(array("title" => "Back", "page" => "admin"))); 
    1104964        break; 
    1105  
    1106         ################################### 
    1107     case 'toc' : 
    1108         print "<h1>Table of content</h1>"; 
    1109         $contentArray = file(__file__); # Read myself 
    1110         print "<UL>\n"; 
    1111         foreach ($contentArray as $line) { 
    1112             if (preg_match("/^  case '(\w+)':/", $line, $matchesArray)) { # Parse for "case" regex 
    1113                 if ($matchesArray[1] == 'toc') 
    1114                 continue; 
    1115                 print "<LI><A HREF=\"" . $_SERVER['SCRIPT_NAME'] . "?page=" . $matchesArray[1] . "\">" . $matchesArray[1] . "</A>\n"; # Display a Table of Content 
    1116             } 
    1117         } 
    1118         print "</UL>\n"; 
    1119         break; 
    1120         ################################### 
    1121     case 'notes' : 
     965        ########################################### 
     966    case 'review' : 
    1122967        print<<<EndHTML 
    1123968<!-- /* Editor highlighting trick --> 
    1124969<pre> 
    1125 <em>TODO</em> 
    1126   -Support des define de Google Maps dans config.php 
    1127   -Faire une fonction d'execution avec gestion de retour d'erreur et d'affichage de l'exection pour chaque "exec" 
    1128   -Ajouter une veritable validation (user/password admin provenant de la DB) 
    1129      Pour une meilleur securite du script d'installation. 
    1130        Au chargement, valider que la connection DB est fonctionnel, que la DB existe et que l'usager admin existe 
    1131          Si oui, on demande l'authentification 
    1132          Si non, on creer l'usager admin 
    1133   -Faire un vrai menu pour acceder directement aux pages desirees (pas une TOC poche) 
    1134   -Ameliorer le javascript et arreter de faire des document.myform.submit(); 
    1135   -Generate valid HTML code 
    1136   -Integrate this script with the portal skin 
    1137   -Tester que les donnees de AVAIL_LOCALE_ARRAY dans config.php sont valides (fonctionnelles) 
    1138      Regarder le code dans include/language.php 
    1139   -Support pour l'option CUSTOM_SIGNUP_URL 
    1140   -Effacer repertoires/fichiers temporaires des installations 
    1141  
    1142   -Nice2Have : Si test d'integrite et de fonctionnement existent, les integrer pour assurer le bon fonctionnement 
    1143   -Nice2Have : Si donnees de tests exitent (pour les developpeurs) Permettre d'en ajouter a la DB 
    1144   -Nice2Have : Creer un wifidog.conf (client) selon config + questions si necessaires 
    1145  
    1146 <em>Change Log</em> 
    1147   15-08-2005 : Bugs correction + comments added 
    1148   11-08-2005 : Options rewrite with foreach and Dependency 
    1149   09-08-2005 : Admin user creation + network configuration 
    1150   27-07-2005 : Added jpgraph install 
    1151   26-07-2005 : Added minimal security password validation 
    1152   14-07-2005 : saveConfig and all javascript code 
    1153   09-07-2005 : Added Phlickr installation 
    1154   05-07-2005 : Better PHP extention validation process 
    1155   17-06-2005 : MySQL schema and data submission 
    1156   17-06-2005 : Postgresql schema and data submission 
    1157   24-04-2005 : CSS button 
    1158  
     970will show a table with all config.php options at the end of the installation 
    1159971</pre> 
    1160972<!-- Editor highlighting trick */ --> 
    1161973EndHTML; 
    1162974        break; 
    1163         ################################### 
    1164         /*  case 'phpinfo': // Use for debugging, to be removed 
    1165         print "<pre>"; 
    1166         print_r(get_loaded_extensions()); 
    1167         print "</pre><BR><BR>"; 
    1168         phpinfo(); 
    1169         break;*/ 
    1170  
    1171     default : 
    1172         $WIFIDOG_VERSION = $configArray['WIFIDOG_VERSION']; 
    1173         # TODO : Add links to auth-server web documents 
     975        ########################################### 
     976    case 'Prerequisites' : 
    1174977        print<<<EndHTML 
    1175 <h1>Welcome to WifiDog Auth-Server installation and configuration script.</h1> 
    1176 <p>This installation still needs improvement, so please any report bug to the mailing list for better support.<BR/> 
    1177 The current auth-server version is <em>$WIFIDOG_VERSION</em>.</p> 
    1178  
    1179 <p><strong>Before going any further</strong> with this installation you need to do the following:\n 
    1180 <h2>1-Make sure you created a valid user and database.</h2> 
    1181 <p>If you haven't, here is a command line example for PostgreSQL (or use the way you like) :</p> 
    1182 <em>Create the PostgreSQL databaser user for WifiDog</em> (createuser and createdb need to be in you PATH) : 
     978<h1><strong>Before Continuing with the installation,</strong> please make sure the following has been completed:</h1> 
     979<h2>1-Make sure you have created a valid PostgreSQL database and database user.</h2> 
     980<p>Here is an example of creating these through the command line:</p> 
     981<em>Create the PostgreSQL database user for WifiDog</em> (createuser and createdb need to be in you PATH) : 
    1183982<pre>  <I>postgres@yourserver $></I> createuser wifidog --pwprompt 
    1184983  Enter password for new user: 
     
    1197996        echo "<tr><td>Absolute path to the /wifidog directory (WIFIDOG_ABS_FILE_PATH):</td><td>" . WIFIDOG_ABS_FILE_PATH . "</td></tr>\n"; 
    1198997        echo "<tr><td>URL path to reach the /wifidog directory with a web browser (SYSTEM_PATH): </td><td>" . SYSTEM_PATH . "</td></tr>\n"; 
    1199         echo "<tr><td colspan=2><em>Please verify the two values above.</em> They should be autodectected correctly by wifidog in path_defines_base.php.  If there is a bug and they are not, you need to override them in config.php (or find the bug), or your auth server will not work properly.  </td></tr></table>\n"; 
     998        echo "<tr><td colspan=2><em>Please verify the two values above.</em> They should be autodetected correctly by wifidog using path_defines_base.php.  If there is a bug and they are not, you will need to override them manually in config.php (or find the bug), or your auth server will not work properly.  </td></tr></table>\n"; 
     999 
     1000 
     1001        navigation(array ( 
     1002        array ( 
     1003                "title" => "Back", 
     1004                "page" => "Welcome" 
     1005                ), 
     1006                array ( 
     1007                "title" => "Next", 
     1008                "page" => "Permissions" 
     1009                ) 
     1010                )); 
     1011                break; 
     1012 
     1013                ########################################### 
     1014    default : 
     1015        $WIFIDOG_VERSION = $configArray['WIFIDOG_VERSION']; 
    12001016        print<<<EndHTML 
    1201 <h2>3-Retrieve the install password</h2> 
    1202 A password is needed to continue with the installation. You need to read the random password in <em>$password_file</em> file. No username needed, only the password. This password is only usefull for the installation, you will never use it in Auth-Server administration pages. 
    1203 </pre> 
    1204  
    1205 <p>When you are ready click next</p> 
     1017<h1>Welcome to the WifiDog Auth-Server installation and configuration script.</h1> 
     1018<p>WiFiDog Authentication Server Version: <em>$WIFIDOG_VERSION</em>.</p> 
     1019 
     1020<p>This Software is free. You can redistribute it and/or modify it in any way, under the terms of the GNU General Public Licence V2 or later, as published by the Free Software Foundation. This program is provided without any warranty (either implied or express) of any kind, as such, it is installed entirely at your own risk. More information can be found in the GNU General Public Licence. </p> 
     1021 
     1022<h3>THIS PROGRAM IS STILL IN A BETA STAGE, PLEASE REPORT ANY BUGS AT <a href="http://dev.wifidog.org">http://dev.wifidog.org</a></h3> 
     1023 
     1024<p>To Continue this installation you will need to enter the password found in the file: <em>$password_file</em> on your server's filesystem. Please enter it when prompted. This is to stop accidental or malicious activity from users gaining access to the install.php file if you dont move it from the base directory. <strong>PLEASE LEAVE THE USERNAME FIELD BLANK</strong></p> 
    12061025 
    12071026EndHTML; 
     
    12101029        array ( 
    12111030            "title" => "Next", 
    1212             "page" => "permission" 
     1031            "page" => "Prerequisites" 
    12131032            ) 
    12141033            )); 
    12151034} 
    1216 echo "<input type='hidden' name='page' value='$_REQUEST[page]'/>\n" ; 
     1035echo "<input type='hidden' name='page' value='$_REQUEST[page]'/><br><br>" ; 
    12171036?> 
    1218  
     1037</div> 
     1038</div> 
     1039</div> 
    12191040</form> 
    12201041</body>