</div> </div> </div> </div> </div> <!-- /.row --> <div class="row"> <div class="col-lg-8"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><i class="fa fa-long-arrow-right fa-fw"></i>Discussion Board</h3> </div> <div class="panel-body"> <div id="morris-donut-chart"> <?php $allPosts = getPostsByGroup($group); foreach ($allPosts as $onePost) { //print_r ($onePost); echo "<li>{$onePost['0']} said: {$onePost['2']} at <span class='badge'>{$onePost['3']}</span></li>"; } ?> </div> </div> </div> </div> <?php //script to verify if the login user is the creator $servername = "104.236.200.134"; $d_username = "******"; $d_password = "";
</div> </div> <!-- /.row --> <div class="row"> <div class="col-lg-4"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><i class="fa fa-long-arrow-right fa-fw"></i>Latest Posts</h3> </div> <div class="panel-body"> <?php foreach ($data as $oneGroup) { echo "<h4> In " . $oneGroup['groupName'] . "<h4/>"; echo "<ul>"; $posts = getPostsByGroup($oneGroup['groupName']); if (count($posts) > 3) { for ($i = count($posts) - 1; $i > count($posts) - 4; $i--) { echo "<li>" . $posts[$i]['student'] . " said: " . $posts[$i]['comment'] . " at " . $posts[$i]['time'] . "</li>"; } } elseif (count($posts) > 0) { for ($i = 0; $i < count($posts); $i++) { echo "<li>" . $posts[$i]['student'] . " said: " . $posts[$i]['comment'] . " at " . $posts[$i]['time'] . "</li>"; } } else { echo "<li>Ooops... no updates from the group</li>"; break; } echo "</ul>"; echo "<div class='text-right'>\n <form action='grouppage.php' method='post' id='{$oneGroup['0']}'>\n <input style='display:none' name='gname' value='{$oneGroup['0']}'/>\n <a href='grouppage.php' onclick=\"this.parentNode.submit(); return false;\">View Details<i class='fa fa-arrow-circle-right'></i></a>\n </form>\n </div>"; //echo '<div class="text-right"><a href="#">View Details <i class="fa fa-arrow-circle-right"></i></a></div>';
<?php include_once 'header.php'; ?> <?php while (have_posts()) { the_post(); ?> <?php $footer = get_field('post_footer'); $events = getUpcomingEventsByGroup($post->ID, 3); $blogposts = getPostsByGroup($post->ID, 5); ?> <div class='background'> <?php the_post_thumbnail('large', array('class' => 'img-responsive')); ?> </div> <article class='container single'> <header class='cta-header'> <h1><?php the_title(); ?> </h1>