Beispiel #1
0
 } elseif ($_GET['step'] == 3) {
     echo "<h2>Safety</h2>";
     $safe = \Lobby\Install::safe();
     if ($safe == "configFile") {
         ser("Permission Error", "The <b>config.php</b> file still has write permission. Change the permission to Read Only.");
     }
     if ($safe !== true) {
         echo "<a class='button' href='javascript:;' onclick='window.location = window.location;'>Check Again</a>";
     } else {
         \Lobby::redirect("/#");
     }
 } elseif ($_GET['step'] == 2 && H::csrf()) {
     /**
      * We call it again, so that the user had already went through the First Step
      */
     if (\Lobby\Install::step1() === false) {
         // The stuff mentioned in step 1 hasn't been done
     } elseif (isset($_POST['submit'])) {
         $dbhost = \H::input('dbhost', "POST");
         $dbport = \H::input('dbport', "POST");
         $dbname = \H::input('dbname', "POST");
         $username = \H::input('dbusername', "POST");
         $password = \H::input('dbpassword', "POST");
         $prefix = \H::input('prefix', "POST");
         /**
          * We give the database config to the Install Class
          */
         \Lobby\Install::dbConfig(array("host" => $dbhost, "port" => $dbport, "dbname" => $dbname, "username" => $username, "password" => $password, "prefix" => $prefix));
         /**
          * First, check if prefix is valid
          * Check if connection to database can be established using the credentials given by the user