Ethan's Writing

"; $info = str_ireplace(",","",$info); $info = str_ireplace(")","",$info); $info = str_ireplace("(","",$info); $info = str_ireplace(";","",$info); $info = str_ireplace(".","",$info); $info = str_ireplace("]","",$info); $info = str_ireplace("[","",$info); $info = str_ireplace("}","",$info); $info = str_ireplace("{","",$info); $info = str_ireplace("'","",$info); $info = str_ireplace("\"","",$info); $info = str_ireplace("-"," ",$info); $controls = explode("?",$info); if ($info == "") { $j = 0; } else { $j = $controls[1]; } $displaynum = 10; $maxout = $j + $displaynum; echo ""; if ($controls[2] == "") { $sql = "SELECT * FROM mywrite ORDER BY whenitwas DESC"; } else { $xxx = $controls[2]; $sql = "SELECT * FROM mywrite WHERE thetags LIKE '%~".$xxx."~%' ORDER BY whenitwas DESC"; } $rresult = mysql_query($sql) or die('Query failed. ' . mysql_error()); $matches = mysql_num_rows($rresult); for ($k = 0; $k < $matches; $k++) { $row = mysql_fetch_array($rresult); if (($k >= $j) and ($k < $maxout)) { $x = date("jS F Y",$row['whenitwas']); echo ""; } } echo "
"; echo "DateArticleTopics - (Show all)
".$x; echo ""; echo $row['whatitscalled'].""; echo ""; $texas = ""; $tags = explode("~",$row['thetags']); while($tags) { $thistag = array_shift($tags); $urtag = str_ireplace(" ","-",$thistag); if ($thistag != "") { $texas = $texas."".$thistag.", "; } } $texas = substr($texas,0,-2); echo $texas."

"; if ($j > 0) { $x = max(0,$j-$displaynum); echo " ~ Newer ~ "; } echo " "; if ($maxout < $matches) { echo " ~ Older ~ "; } echo "

"; ?>