Skip to content

Instantly share code, notes, and snippets.

@harryWonder
Created May 11, 2020 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harryWonder/7b0b755e5edfd3113ee2aa543ceb3a99 to your computer and use it in GitHub Desktop.
Save harryWonder/7b0b755e5edfd3113ee2aa543ceb3a99 to your computer and use it in GitHub Desktop.
The dashboard view for users
<?php require_once('./controller/Dashboard.php'); ?>
<?php
$Dashboard = new Dashboard();
$Response = [];
$active = $Dashboard->active;
$News = $Dashboard->getNews();
?>
<?php require('./nav.php'); ?>
<main role="main" class="container">
<div class="container">
<div class="row mt-5">
<div class="col-xs-12 col-sm-12 col-md-12 col-xl-12 col-lg-12">
<h2>News</h2>
<hr>
</div>
</div>
<div class="row">
<?php if ($News['status']) : ?>
<?php foreach ($News['data'] as $new) : ?>
<div class="col-xs-12 col-sm-12 col-md-12 col-xl-4 col-lg-4">
<div class="card shadow-lg p-3 mb-5 bg-white rounded">
<div class="news_title">
<h3><?php echo ucwords($new['title']); ?></h3>
</div>
<div class="news_body">
<p><?php echo $new['content']; ?> <a href="javascript:void(0)">Read More</a></p>
</div>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment