Example #1
0
<?php

echo \App\Core\View::make('include.header')->with(compact('title'))->with('feeds', [])->render();
?>

	<div class="row site__panel">
		<div class="col-md-6 col-md-offset-3">

			<div class="panel panel-danger">
				<div class="panel-heading">
					<h3 class="panel-title">Oops! Look's like something's not right..</h3>
				</div>
				<div class="panel-body">
					<?php 
echo $message;
?>
				</div>
			</div>

		</div>
	</div>

<?php 
echo \App\Core\View::make('include.footer')->render();
Example #2
0
 public function after()
 {
     $this->response->body = $this->view->render();
     parent::after();
 }
Example #3
0
									Feeds
									<span class="caret"></span>
								</button>
								<ul class="dropdown-menu">
									<? foreach($feeds as $feed) : ?>
										<li><a href="/feed?id=<?php 
echo $feed->id;
?>
"><?php 
echo $feed->name;
?>
</a></li>
									<? endforeach; ?>
								</ul>
							</div>
						<? endif; ?>
						<a href="/feed/add" class="btn btn-primary">Add</a>
					</div>

				</div>

			</div>
		</nav>

		<div class="container site">

			<?php 
echo \App\Core\View::make('include.messages')->render();
?>

Example #4
0
 public function showRemove()
 {
     if (!($feed = $this->getFeed())) {
         return View::handleError('Unable to located feed.');
     }
     $title = 'Remove Feed';
     $feeds = $this->getFeeds();
     if (Input::method() === 'POST') {
         $query = $this->app->db->query('DELETE FROM feeds WHERE id = :id');
         $query->bind(':id', $feed->id);
         if ($query->execute()) {
             Cookie::set('status', 'danger');
             Cookie::set('message', 'Feed removed!');
             return View::redirect('/');
         }
     }
     return View::make('feed.remove')->with(compact('title', 'feeds', 'feed'))->render();
 }
Example #5
0
 public function showIndex()
 {
     $title = 'Feeds';
     $feeds = $this->getFeeds();
     return View::make('index')->with(compact('title', 'feeds'))->render();
 }
Example #6
0
 /**
  * Register the exception handler.
  * 
  * @return void
  */
 public function registerExceptionHandler()
 {
     set_exception_handler(function ($e) {
         return View::handleError($e->getMessage(), 500);
     });
 }