Example #1
0
    public function getFormStart($action = null, $ajax = true)
    {
        if ($action == null) {
            $action = RuntimeService::getInstance()->getTotalUrl();
        } else {
            $action = RouteService::getInstance()->getAbsoluteLink($action);
        }
        $classes = "";
        if (!$ajax) {
            $classes .= 'class="no-ajax"';
        }
        return '
<form ' . $classes . ' action="' . $action . '" method="post">' . $this->getFormToken($action);
    }
Example #2
0
    <?php 
    echo PartHelper::getInstance()->getFormStart("login", false);
    ?>

    <?php 
    echo PartHelper::getInstance()->getInput($model, "Username", "Email", "email");
    ?>
<br/>
    <?php 
    echo PartHelper::getInstance()->getInput($model, "Password", "Password", "password");
    ?>
<br/>

    <p>
        <a href="<?php 
    echo RouteService::getInstance()->getAbsoluteLink("forgotpass");
    ?>
"><?php 
    echo LocaleService::getInstance()->translate("forgot password");
    ?>
</a>
    </p>
    <?php 
    echo PartHelper::getInstance()->getSubmit("Login");
    ?>

    <?php 
    echo PartHelper::getInstance()->getFormEnd(false);
    ?>

    <?php 
Example #3
0
use famoser\phpFrame\Services\AuthenticationService;
use famoser\phpFrame\Services\DatabaseService;
use famoser\phpFrame\Services\GenericDatabaseService;
use famoser\phpFrame\Services\RouteService;
use famoser\phpFrame\Services\RuntimeService;
use function famoser\phpSLWrapper\Framework\Hook\bye_framework;
use function Famoser\phpSLWrapper\Framework\Hook\hi_framework;
session_start();
// $_GET und $_POST zusammenfasen
$request = array_merge($_GET, $_POST);
$files = $_FILES;
include_once $_SERVER['DOCUMENT_ROOT'] . "/src/Framework/hook.php";
try {
    try {
        hi_framework();
        $controllerModel = RouteService::getInstance()->getController($_SERVER['REQUEST_URI']);
        RuntimeService::getInstance()->setParams($_SERVER['REQUEST_URI'], $controllerModel);
        RuntimeService::getInstance()->setParams($_SERVER['REQUEST_URI'], $controllerModel);
        if ($controllerModel instanceof ControllerModel) {
            $controllerName = $controllerModel->getController();
            $controller = new $controllerName($request, RuntimeService::getInstance()->getControllerParams(), $files);
            $output = $controller->Display();
            echo $output;
            bye_framework();
        } else {
            $controller = new FrameworkController($request, RuntimeService::getInstance()->getControllerParams(), $files);
            $output = $controller->Display(FrameworkController::CONTROLLER_NOT_FOUND);
            echo $output;
            bye_framework();
        }
    } catch (Exception $ex) {
Example #4
0
 public function __construct($request, $params, $files)
 {
     parent::__construct($request, $params, $files);
     $this->mainMenu = RouteService::getInstance()->getMenu("MainMenu");
 }