コード例 #1
0
 public static function check($modelName = DBMODEL_USER)
 {
     if (Session::keyExists('fwLGN')) {
         $auth = new Auth($modelName);
         $val = Cryptography::decode(Session::get('fwLGN'));
         $val = explode(';', $val);
         $asd = array();
         foreach ($val as $valore) {
             $temp = explode(':', $valore);
             $asd[$temp[0]] = $temp[1];
         }
         $auth->setParameters($asd);
         if ($auth->checkDB($auth->checkDB(implode(', ', array_keys($auth->getParameters()))))) {
             return true;
         }
     }
     self::logout();
     return false;
 }
コード例 #2
0
ファイル: loader.php プロジェクト: angelocovino/saFramework
<?php

namespace library\kernel\core;

use plugin\session\Session;
use library\kernel\core\Dispatcher;
use library\kernel\core\Dispatch;
/*
    if(CSRF_ENABLED === true){
        // CONTROLLARE SE SEI IN POST SE C'E' IL TOKEN
        
        // GENERO UN NUOVO TOKEN A PRESCINDERE
    }
*/
// SESSION OPENING
Session::open();
// CREATE DISPATCHER
$dispatch = Dispatch::create($url);
// FREE $url
unset($url);
// SET DISPATCH SINGLETON
Dispatcher::setDispatch($dispatch);
// LOAD FRAMEWORK BUILDER
Dispatcher::start();