32 lines
885 B
PHP
Executable File
32 lines
885 B
PHP
Executable File
<?php
|
|
|
|
$tpl = 'front';
|
|
|
|
//if ( $_SERVER['HTTP_HOST'] !== 'www.invalidescreatis.net' ) {
|
|
// header('HTTP/1.1 301 Permanent');
|
|
// die(header(sprintf('Location: http://www.invalidescreatis.net%1$s', $_SERVER['REQUEST_URI'])));
|
|
//}
|
|
include('admin/app/load.php');
|
|
|
|
|
|
|
|
header('Content-Type: text/html;charset=utf-8');
|
|
echo EngineSystem
|
|
::get('front')
|
|
->load('pages/annexe.html')
|
|
->run(array('annexe' => Service::get('invalides.annexes.crud')->readObject(array('id' => $_GET['id']))))
|
|
->getData('');
|
|
|
|
die();
|
|
$elem = Service::get('invalides.portraits.crud')->readObject(array('id' => $_GET['id']));
|
|
$elem['annexes'] = array_map(function ( $elem ) {
|
|
$elem['url'] = 'annexe.php?id=' . $elem['id'];
|
|
return $elem;
|
|
}, Service::get('invalides.annexes.crud')->read(array('portrait' => $_GET['id'])));
|
|
|
|
|
|
|
|
header('Content-Type: application/json');
|
|
//print_r($elem);
|
|
echo json_encode($elem);
|