cyrilleinvalides/choupas/www/admin/views.php

21 lines
513 B
PHP
Executable File

<?php
$func = include('includes/auth.php');
$func(function () {
if ( empty($_GET['viewType']) )
$_GET['viewType'] = 'list';
if ( !( $view = View::get($_GET['request']['view']) ) )
throw new Exception(sprintf('View "%1$s" does not exist !', $_GET['request']['view']));
echo EngineSystem::get('back')->load($view->getData('file'))->run(array_merge($_GET, array(
'crud' => Service::get($view->getParent()->getName(1) . '.crud'),
'view' => $view,
'server' => $_SERVER
)))->getData('');
});
?>