THE BUNGHOLE - What's new"; else echo "
= DATE_SUB(CURDATE(), INTERVAL 14 DAY) AND is_new > 0;");
$num = mysql_num_rows($query);
echo " $num New Links added the last 2 weeks:\n ";
$days_old = 0;
$now = getdate(time());
while($days_old <= 14) {
$query = mysql_query("SELECT 1 FROM bunghole_links WHERE date_added = DATE_SUB(CURDATE(), INTERVAL $days_old DAY) AND is_new > 0;");
$num = mysql_num_rows($query);
if($num) {
echo "$num new links for ";
echo date("l, j F Y", mktime(0, 0, 0, $now["mon"], $now["mday"]-$days_old, $now["year"]));
echo ".\n | \n";
echo "
\n";
echo "\n";
$query = mysql_query("SELECT 1 FROM bunghole_links WHERE date_added = '$shownews' AND is_new > 0;");
$totalnumber = mysql_num_rows($query);
if(($order == "title") || ($order == "category"))
$query = mysql_query("SELECT id, title, category, description, date_added, hits, rating, votes FROM bunghole_links WHERE date_added = '$shownews' AND is_new > 0 ORDER BY $order LIMIT $start, 11;");
else
$query = mysql_query("SELECT id, title, category, description, date_added, hits, rating, votes FROM bunghole_links WHERE date_added = '$shownews' AND is_new > 0 ORDER BY $order DESC LIMIT $start, 11;");
$end = mysql_num_rows($query);
if(!$end)
echo "No results for date ",convert_date($shownews),".\n";
else {
echo "Showing records ",$start+1," to ";
if($end == 11) echo "".$start+$end-1;
else echo "".$start+$end;
echo " out of $totalnumber records. Viewing by ",nopavla($order),". "; if($order != "title") echo "[View by title] "; if($order != "category") echo "[View by category] "; if($order != "date_added") echo "[View by date] "; if($order != "hits") echo "[View by hits] "; if($order != "rating") echo "[View by rating]"; echo " Back to new additions index\n"; // Show records // We will only show 10 records, the eleventh is to see if more records exist echo "
|