<?php

require_once 'Autoloader.php';
// create a new controller for a single product's detail
$controller = new DetailController();
// let the controller handle the request
$controller->handleRequest();
// render the page and print it
echo $controller->displayPage();
Example #2
0
<?php

$app = Container::get('app');
$app->get('/detail/:hash', function ($hash) {
    $controller = new DetailController();
    return $controller->get($hash);
});
$app->post('/detail', function () {
    $controller = new DetailController();
    return $controller->post();
});
Example #3
0
     $controller = new SettingController();
     $controller->handle();
     break;
 case 'reg':
     require_once 'libs/controller/RegController.class.php';
     $controller = new RegController();
     $controller->handle();
     break;
 case 'search':
     require_once 'libs/controller/SearchController.class.php';
     $controller = new SearchController();
     $controller->handle();
     break;
 case 'detail':
     require_once 'libs/controller/DetailController.class.php';
     $controller = new DetailController();
     $controller->handle();
     break;
 case 'push':
     session_write_close();
     require_once 'libs/controller/PushController.class.php';
     $controller = new PushController();
     $controller->doPush();
     break;
 case 'download':
     require_once 'libs/controller/DownloadController.class.php';
     $controller = new DownloadController($_GET['id']);
     $controller->handle();
     break;
 case 'test':
     print_r($_SESSION['kindle']);
Example #4
0
<?php

$detailController = new DetailController();
$data = $detailController->showDetailData();
?>
<h1><?php 
echo $data['title'];
?>
 </h1>
<p><?php 
echo $data['description'];
?>
</p>