This commit is contained in:
Pierre Rudloff 2015-10-29 21:23:02 +01:00
parent 299634b023
commit e35314b492
2 changed files with 137 additions and 126 deletions

View file

@ -15,14 +15,18 @@
use Alltube\VideoDownload;
require_once 'common.php';
$app = new \Slim\Slim(array(
$app = new \Slim\Slim(
array(
'view' => new \Slim\Views\Smarty()
));
)
);
$view = $app->view();
$view->parserExtensions = array(
dirname(__FILE__).'/vendor/slim/views/SmartyPlugins',
);
$app->get('/', function () {
$app->get(
'/',
function () {
global $app;
$app->render(
'head.tpl',
@ -40,8 +44,11 @@ $app->get('/', function () {
)
);
$app->render('footer.tpl');
});
$app->get('/extractors', function () {
}
);
$app->get(
'/extractors',
function () {
global $app;
$app->render(
'head.tpl',
@ -58,8 +65,11 @@ $app->get('/extractors', function () {
)
);
$app->render('footer.tpl');
})->name('extractors');
$app->get('/video', function () {
}
)->name('extractors');
$app->get(
'/video',
function () {
global $app;
if (isset($_GET["url"])) {
if (isset($_GET['audio'])) {
@ -148,5 +158,6 @@ $app->get('/video', function () {
);
$app->render('footer.tpl');
}
})->name('video');
}
)->name('video');
$app->run();