|
@ -2,12 +2,10 @@ |
|
|
|
|
|
|
|
|
$app->get('/', function() use($app) { |
|
|
$app->get('/', function() use($app) { |
|
|
$res = $app->response(); |
|
|
$res = $app->response(); |
|
|
ob_start(); |
|
|
|
|
|
render('index', array( |
|
|
|
|
|
|
|
|
$html = render('index', array( |
|
|
'title' => 'Switchboard', |
|
|
'title' => 'Switchboard', |
|
|
'meta' => '' |
|
|
'meta' => '' |
|
|
)); |
|
|
)); |
|
|
$html = ob_get_clean(); |
|
|
|
|
|
$res->body($html); |
|
|
$res->body($html); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -20,14 +18,12 @@ $app->get('/subscription/:hash', function($hash) use($app) { |
|
|
if(!$subscription) { |
|
|
if(!$subscription) { |
|
|
$app->response()->status(404); |
|
|
$app->response()->status(404); |
|
|
} else { |
|
|
} else { |
|
|
ob_start(); |
|
|
|
|
|
render('subscription-status', array( |
|
|
|
|
|
|
|
|
$html = render('subscription-status', array( |
|
|
'title' => 'Switchboard', |
|
|
'title' => 'Switchboard', |
|
|
'meta' => '', |
|
|
'meta' => '', |
|
|
'subscription' => $subscription, |
|
|
'subscription' => $subscription, |
|
|
'feed' => $feed |
|
|
'feed' => $feed |
|
|
)); |
|
|
)); |
|
|
$html = ob_get_clean(); |
|
|
|
|
|
$res->body($html); |
|
|
$res->body($html); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -42,15 +38,13 @@ $app->get('/feed/:hash', function($hash) use($app) { |
|
|
if(!$feed) { |
|
|
if(!$feed) { |
|
|
$app->response()->status(404); |
|
|
$app->response()->status(404); |
|
|
} else { |
|
|
} else { |
|
|
ob_start(); |
|
|
|
|
|
render('feed-status', array( |
|
|
|
|
|
|
|
|
$html = render('feed-status', array( |
|
|
'title' => 'Switchboard', |
|
|
'title' => 'Switchboard', |
|
|
'meta' => '', |
|
|
'meta' => '', |
|
|
'feed' => $feed, |
|
|
'feed' => $feed, |
|
|
'subscribers' => $subscribers, |
|
|
'subscribers' => $subscribers, |
|
|
'num_subscribers' => $num_subscribers |
|
|
'num_subscribers' => $num_subscribers |
|
|
)); |
|
|
)); |
|
|
$html = ob_get_clean(); |
|
|
|
|
|
$res->body($html); |
|
|
$res->body($html); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |