usermanager = new Modeluser(); } public function wakeup() { if (isset($_POST['configinit'])) { if (Config::readconfig()) { Config::createconfig($_POST['configinit']); } else { Config::hydrate($_POST['configinit']); } Config::getdomain(); if (!is_dir(Model::RENDER_DIR)) { mkdir(Model::RENDER_DIR); } if (!Config::savejson()) { echo 'Cant write config file'; exit; } else { header('Location: ./'); exit; } } elseif ( isset($_POST['userinit']) && !empty($_POST['userinit']['id']) && !empty($_POST['userinit']['password']) ) { $userdata = $_POST['userinit']; $userdata['level'] = 10; $user = new User($userdata); $this->usermanager->add($user); header('Location: ./'); exit; } else { if (Config::readconfig()) { if ( !Config::checkbasepath() || empty(Config::pagetable()) || !is_dir(Model::RENDER_DIR) || !Config::checkdomain() || empty(Config::secretkey()) ) { echo '
= getversion() ?>