function __construct()
 {
     parent::__construct();
     $this->setTitle(Messages::getString('CreateProjectPage.CreateNewProject'));
     $this->menu = array(Messages::getString('General.Admin') => "admin.php") + $this->menu;
     $this->menu = array(Messages::getString('General.Home') => "index.php") + $this->menu;
     if (isset($_POST['name'])) {
         $this->error = $this->processForm();
         if (!$this->error) {
             $session = Session::createNewSession($_POST['pwd'], $this->new_project_id);
             header("Location: " . $this->SUCCESS_REDIRECT_PAGE);
             //Redirect to settings menu, if succeeded
         }
     }
 }
Example #2
0
<?php

/*
 * Created on 20.03.2007
 *
 * This is the entry to the adminsitration
 * 
 * Licenced under GPL: http://www.gnu.org/licenses/gpl.txt
 *
 */
require_once 'classes/autoload.php';
$msg = null;
//check, whether there was some login attempt:
try {
    if (isset($_POST['pwd']) && ($password = $_POST['pwd'])) {
        $session = Session::createNewSession($password);
        if (!$session->isLoggedIn()) {
            $msg = "Password not correct";
        }
    }
} catch (Exception $exception) {
    // in this case, render exception as error.
    $msg = $exception;
}
$page = AdminPageFactory::factory('AdminMenuPage', $msg);
$page->render();
Example #3
0
<?php

/*
 * Created on 20.03.2007
 *
 * This is the entry to the adminsitration
 * 
 * Licenced under GPL: http://www.gnu.org/licenses/gpl.txt
 *
 */
require_once 'classes/autoload.php';
$msg = null;
//check, whether there was some login attempt:
try {
    if (isset($_POST['pwd']) && ($password = $_POST['pwd'])) {
        $session = Session::createNewSession($password, $_POST['project_id']);
        if (!$session->isLoggedIn()) {
            $msg = Messages::getString('General.PasswordWrong');
        }
    }
} catch (Exception $exception) {
    // in this case, render exception as error.
    $msg = $exception;
}
$page = AdminPageFactory::factory('AdminMenuPage', $msg);
$page->render();