Menu:

Latest news:

Jan 16, 2008:
A few new features and tweaks have been applied!

Read more...


Articles:

- Poetry Glossary #
- Stanza Forms #

- Shaun's Blog
- Egg's World
- Da D33k News



"; //echo "Sorting by = $sortby (blank = default)
"; //echo "v calculations v
"; //first 10 //SELECT * //FROM tbt_poetry //WHERE `category` =22 //ORDER BY `tbt_poetry`.`timestamp` DESC //LIMIT 0 , 10 //SELECT * //FROM tbt_poetry //WHERE `category` =22 ///ORDER BY `tbt_poetry`.`timestamp` DESC // //LIMIT 10 , 10 //echo "(DEBUG STUFF: This query should show page $page of the $category category sorted by $sortby ($ascdesc))
"; if (isset($category)) { include("$opendatabase"); $query = "SELECT * FROM tbt_categories WHERE `category`='$category'"; $result = mysql_query($query) or die("Couldn't submit query (checking if cat exists): ".mysql_error()); $num = mysql_num_rows($result); if ($num == 1) { $cat = mysql_result($result,0,"cat"); $startfrom = ($page - 1) * $limit; //echo "$category (unique id: $cat) exists and the query will continue........"; include("$opendatabase"); $query2 = "SELECT `tbt_poetry`.`p`, `tbt_poetry`.`foreword`, `tbt_poetry`.`id`, `tbt_poetry`.`date`, `tbt_poetry`.`title`, `tbt_poetry`.`timestamp`, `tbt_members`.`user` FROM tbt_poetry, tbt_members WHERE (`tbt_members`.`id`=`tbt_poetry`.`id`) AND `tbt_poetry`.`category`='$cat' LIMIT $startfrom,$limit"; $query3 = "SELECT `tbt_poetry`.`p` FROM tbt_poetry, tbt_members WHERE (`tbt_members`.`id`=`tbt_poetry`.`id`) AND `tbt_poetry`.`category`='$cat'"; $result2 = mysql_query($query2) or die("Couldn't submit query (pulling poetry): ".mysql_error()); $num2 = mysql_num_rows($result2); $result3 = mysql_query($query3) or die("Couldn't submit query (pulling poetry): ".mysql_error()); $num3 = mysql_num_rows($result3); echo "Showing $num2 poems of $num3 results.
"; echo "
"; for ($i = 0; $i < $num2; $i++) { $p = mysql_result($result2,$i,"p"); $user = mysql_result($result2,$i,"user"); $title = mysql_result($result2,$i,"title"); $foreword = mysql_result($result2,$i,"foreword"); $titlelink = str_replace(" ","_","title"); $timestamp = mysql_result($result2,$i,"timestamp"); $timestamp = strtotime($timestamp); $timestamp = date("jS F Y",$timestamp); if ($foreword == "") { $foreword = "$user didn't enter a foreword."; } ?>
by

0){ $prevurl = "/c/Uncategorised/$prev/"; } else { $prevurl = "#"; } $next = $page + 1; if ($next < $pages){ $nexturl = "/c/Uncategorised/$next/"; } else {$nexturl = "#"; } echo "< Previous Page"; echo " - "; echo "Next Page >
"; for ($i3 = 1; $i3 < $pages; $i3++) { if ($i3 == $page) { echo "$i3 "; } else { echo "$i3 "; } if ($i3 == 20 OR $i3 == 40 or $i3 == 60) { echo "
"; } } echo "
"; } else { echo "

Error

This category doesn't exist - ILLEGAL INPUT

"; } } else { echo "

Error

You cannot access this page directly

"; } ?>