Create("lavendise"); //*********************************************** // List all Websites //*********************************************** if ($list != $nothing){ lavendise_header(); echo"

The Fairy Ring Listing

"; $sql->Query("Select * FROM webring WHERE member = '5' order by ring_id"); $checkrows = $sql->rows; if ($checkrows > 0){ for ($i = 0; $i < $sql->rows; $i++) { $sql->Fetch($i); $title = $sql->data[2]; $website = $sql->data[3]; $description = $sql->data[6]; $counter = $i+1; echo"$counter - $title $description
"; } } exit(); } //*********************************************** // Next Site //*********************************************** if ($next == 1){ $sql->Query("Select * FROM webring WHERE ring_id > '$ringid' and member = '5' order by ring_id"); $checkrows = $sql->rows; if ($checkrows < 1){ $ringid = 1; }else{ $sql->Fetch(0); $ringid = $sql->data[0]; } } //*********************************************** // Skip Site //*********************************************** if ($next == 2){ $ringid = $ringid+2; } //*********************************************** // List next 5 sites //*********************************************** if ($next == 5){ lavendise_header(); $lastid = $ringid+5; echo"

Listing Next 5 Fairy Ring Sites

"; $sql->Query("Select * FROM webring WHERE ring_id = '$ringid' and ring_id < '$lastid' and member = '5'"); $checkrows = $sql->rows; if ($checkrows > 0){ for ($i = 0; $i < $sql->rows; $i++) { $sql->Fetch($i); $title = $sql->data[2]; $website = $sql->data[3]; $description = $sql->data[6]; $counter = $i+1; echo"$counter - $title $description
"; } } exit(); } if ($prev != $nothing){ $ringid = $ring-1; } if ($random != $nothing){ $sql->Query("Select * FROM webring"); $checkrows = $sql->rows; $minnum = 0; $maxnum = $checkrows; srand ((double) microtime() * 1000000); $ringid = rand($minnum, $maxnum); } $sql->Query("Select * FROM webring WHERE ring_id = '$ringid' and member = '5'"); $checkrows = $sql->rows; if ($checkrows > 0){ $sql->Fetch(0); $website = $sql->data[3]; echo ""; exit(); }else{ lavendise_header(); echo"

The Fairy Ring Listing

"; echo"That ring site can't be found. Try visitng one of these rings:

"; $sql->Query("Select * FROM webring WHERE member = '5' order by ring_id"); $checkrows = $sql->rows; if ($checkrows > 0){ for ($i = 0; $i < $sql->rows; $i++) { $sql->Fetch($i); $title = $sql->data[2]; $website = $sql->data[3]; $description = $sql->data[6]; $counter = $i+1; echo"$counter - $title $description
"; } } }