コード例 #1
0
ファイル: index.php プロジェクト: raigons/bureauinteligencia
<?
}else{    
    if(LinkController::link() == 'login-fail'){
        $_GET['loginfail'] = true;
        include 'login_error.php';
    }elseif(LinkController::link() == 'login-fail/empty'){
        $_GET['empty'] = true;
        include 'login_error.php';
    }else{        
        try{
            require_once "../util/RequestsPatterns.php";
            require_once "../util/JsonResponse.php";
            require_once '../util/SessionAdmin.php';
            require_once 'AdminUser.php';
            //if(LinkController::isRequestToInsertPublication())
                //SessionAdmin::login(new AdminUser("ramonox", "ramonoxido"));            
            include LinkController::restAdmin();
        }catch(Exception $err){
            if(LinkController::isRequestToInsertPublication()){
                $message = $err->getMessage();
                echo '{"status": "'.false.'", "message":"'.$message.'"}';
                print_r($_POST);
            }else{
                $jsonResponse = new JsonResponse();
                print_r($jsonResponse->response(FALSE, $err->getMessage())->serialize());
            }
        }

    }
}
?>