Changeset 6210

Show
Ignore:
Timestamp:
08/20/08 17:57:11 (3 months ago)
Author:
dduponchelle
Message:

Test added during the first step of the installation.
Now, the browser must authorize cookies to proceed with the installation.

Location:
trunk/centreon/www/install
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/centreon/www/install/setup.php

    r5226 r6210  
    3131        $msg = NULL; 
    3232        $return_false = NULL; 
    33  
     33    
     34    if (isset($_POST["step"]) && $_POST["step"] == 2 && isset($_POST["Restart"])) 
     35         $_POST["step"] = NULL; 
    3436        if (isset($_POST["step"]) && $_POST["step"] == 4 && isset($_POST["Recheck"])) 
    3537                 $_POST["step"] = 3; 
     
    4042        if (isset($_POST["step"]) && $_POST["step"] == 10 && isset($_POST["Recheck"])) 
    4143                 $_POST["step"] = 9; 
    42 /*      if (isset($_POST["install_missing_pear_module"]) && isset($_POST["pear_module"]) && $_POST["step"] == 5) { 
    43 /                $_POST["step"] = 4; 
    44  
    45                 exec('sudo pear install '. $pear_module["$package_file"]); 
    46  
    47         }*/ 
    4844 
    4945        if (isset($_POST["goto"]) && !strcmp($_POST["goto"], "Back")) 
  • trunk/centreon/www/install/steps/step1.php

    r5226 r6210  
    1515 * For information : contact@centreon.com 
    1616 */ 
    17  
     17  
     18        // Creating a Cookie to test the cookie activation of the browser 
     19        setcookie('COOKIE','COOKIE-TEST',time()+3600); 
     20         
    1821        aff_header("Centreon Setup Wizard", "Welcome to Centreon Setup", 1); 
    1922        print "<p>This installer creates the Centreon database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.</p>"; 
  • trunk/centreon/www/install/steps/step2.php

    r5226 r6210  
    1616 */ 
    1717 
    18          
     18        // Testing the Cookie in order to determined if cookie are authorized by the browser 
     19        if($_COOKIE['COOKIE'] != "COOKIE-TEST") 
     20        { 
     21        aff_header("Centreon Setup Wizard", "Cookies are disabled", 2); 
     22        print "<font color='red'>You have to enable Cookies to proceed with the installation!</font>"; 
     23    aff_middle(); 
     24    print "<input class='button' type='submit' name='Restart' value='Restart' />"; 
     25    aff_footer(); 
     26        } 
     27        else{ 
     28        // If the cookies are authorized, we can perform the installation        
    1929        aff_header("Centreon Setup Wizard", "Licence", 2); 
    2030        $license_file_name = "./LICENSE.txt"; 
     
    3747        print "<input class='button' type='submit' name='goto' value='Next' id='button_next' disabled='disabled' />"; 
    3848        aff_footer(); 
    39  
     49        } 
    4050?>