include("db.inc"); if (!empty($_GET[r])) { if (!empty($_POST[byname])) { $name=array_reverse(explode(",",str_replace(" ","",$_POST[byname]))); Header("Location: results.php?d=1&first=$name[0]&last=$name[1]\n\n"); exit(); } else if (!empty($_POST[bykeyword])) $res=mysql_query("SELECT first,last,abstract,biblio FROM archaeology WHERE CONCAT(first,last,keywords) LIKE '%".str_replace(" ","%",$_POST[bykeyword])."%' ORDER BY last;",$db); if (@mysql_num_rows($res)==0||empty($_POST)) {Header("Location: results.php?m=1\n\n");exit();}; } else if (!empty($_GET[d])) { if (empty($_GET[first])||empty($_GET[last])) {Header("Location: search.php\n\n");exit();}; $res=mysql_query("SELECT abstract,author,biblio,keywords FROM archaeology WHERE first='$_GET[first]' AND last='$_GET[last]';",$db); if (!$res) {Header("Location: search.php\n\n");exit();}; $res2=mysql_fetch_assoc($res); }; ?>
| $fp=opendir("images/random"); while ($item=readdir($fp)) if ($item{0}!=".") $random[]=$item; shuffle($random); echo "
|