Esempio n. 1
0
     }
     break;
 case '2':
     $vars = array('sitename' => isset($_POST) ? $_POST['sitename'] : "", 'siteslogan' => isset($_POST) ? $_POST['siteslogan'] : "", 'sitedomain' => isset($_POST) ? $_POST['sitedomain'] : "", 'siteurl' => isset($_POST) ? $_POST['siteurl'] : "");
     Session::set_session($vars);
     Theme::install('step2');
     break;
 case '3':
     $vars = array('adminname' => isset($_POST) ? $_POST['adminname'] : "", 'adminuser' => isset($_POST) ? $_POST['adminuser'] : "", 'adminpass' => isset($_POST) ? $_POST['adminpass'] : "");
     Session::set_session($vars);
     Theme::install('step3');
     break;
 case '4':
     try {
         $file = GX_PATH . "/inc/config/config.php";
         $config = Install::makeConfig($file);
         if (System::existConf()) {
             Install::createTable();
             Install::insertData();
             $vars = array('user' => array('userid' => Session::val('adminuser'), 'pass' => User::randpass(Session::val('adminpass')), 'email' => 'admin@' . Session::val('sitedomain'), 'group' => '0', 'join_date' => date("Y-m-d H:i:s"), 'status' => '1'), 'detail' => array('userid' => Session::val('adminuser'), 'fname' => Session::val('adminname')));
             User::create($vars);
             echo "Installation Success. Go to <a href=\"gxadmin\">Admin Page</a>.";
         } else {
             echo "<h2>Error !! Config File Not Found.</h2>\n                Please make sure you had permission to write on the config directory. \n                Do ftp to the server and CHMOD 777 the config directory. After \n                config file is created, you can chmod it back to 755.\n                <br>\n                <br>\n                After You had set the permission, please refresh this page. \n                <br>\n                <br>\n                or <a href=\"?step=4\" class=\"btn btn-primary\">Click Here</a>";
         }
     } catch (exception $e) {
         echo $e->getMessage();
     }
     break;
 default:
     if (System::existConf()) {