News and Updates

"; $query = "SELECT * FROM post WHERE category = '$type' AND (title LIKE '%$search_text%' OR body LIKE '%$search_text%')"; }else{ $query = "SELECT * FROM post WHERE category = '$type' ORDER BY id DESC LIMIT $offset, $rowsPerPage"; } $result = mysqli_query($conn,$query) or die(mysqli_error($conn)); if (mysqli_num_rows($result) == 0) { print "SORRY: no data..."; }else{ while($info = mysqli_fetch_array($result)) { $id=$info['id']; $image_name=$info['image_name']; $title=$info['title']; $date_day=$info['date_day']; $date_month=$info['date_month']; $date_year=$info['date_year']; $body=$info['body']; $posted_by=$info['posted_by']; $category=$info['category']; $cat=$info['artist_id']; $date="$date_day-$date_month-$date_year"; $date = strtotime($date); $date = date('d M Y', $date); $body = str_replace("\n", '
', $body); $limit_body = substr($body, 0, 300)."..."; $limit_body = str_replace("\n", '
', $limit_body); if($image_name != ""){ $image_path=""; }else{ //$image_path=""; $image_path=""; } print '
'; } } ?>
$page "; } } // creating previous and next link // plus the link to go straight to // the first and last page if ($pageNum > 1) { $page = $pageNum - 1; $prev = " [Prev] "; $first = " [First Page] "; } else { $prev = ' '; // we're on page one, don't print previous link $first = ' '; // nor the first page link } if ($pageNum < $maxPage) { $page = $pageNum + 1; $next = " [Next] "; $last = " [Last Page] "; } else { $next = ' '; // we're on the last page, don't print next link $last = ' '; // nor the last page link } // print the navigation link echo "

".$first . $prev . $nav . $next . $last."

"; } ?>