if ($num_result == 0) { echo '<p>There appears to be no post here</p>'; } } ?> <div class="row" style='border-bottom: 1px solid #000; margin-bottom: 10px; padding-top:20px;'> <div class="row" style='padding-left: 10px; padding-right: 10px; padding-top: 5px;'> <div class="col-md-10"> <h2>Most Popular Tags</h2> </div> </div> </div> <?php $num_result = 0; $resp = get_most_popular_tags($dbh, 5); if ($resp['status'] == 1) { error_log("Get most popular tags!"); $tags = $resp['tags']; for ($i = 0; $i < count($tags); $i++) { html_tag($dbh, $tags[$i]); $num_result++; } if ($num_result == 0) { echo '<p>There appears to be no tag here</p>'; } } ?> <div class="row" style='border-bottom: 1px solid #000; margin-bottom: 10px; padding-top:20px;'> <div class="row" style='padding-left: 10px; padding-right: 10px; padding-top: 5px;'>
<?php include "../config.php"; include "../functions.php"; include "../private_functions.php"; $num = 5; if (isset($_GET['count']) && is_numeric($_GET['count'])) { $num = $_GET['count']; } $dbh = db_connect($MY_HOST, $MY_DB_PORT, $MY_DB, $DB_USER, $DB_PW); $resp = get_most_popular_tags($dbh, $num); close_db_connection($dbh); echo json_encode($resp);