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 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); }; if (!empty($_POST[formcheck])) { if (!empty($_POST[name])&&!empty($_POST[email])&&!empty($_POST[suggestion])&&strtolower($_POST[captcha])=='bruno') { $body="The following suggestion was submitted at Breaking Ground:\n\n"; if (!empty($_POST[name])) $body.="Name: $_POST[name]\n"; if (!empty($_POST[universityaffiliation])) $body.="University Affiliation: $_POST[universityaffiliation]\n"; if (!empty($_POST[suggestion])) $body.="Suggestion: $_POST[suggestion]\n"; if (!empty($_POST[comments])) $body.="Comments: $_POST[comments]\n"; mail("Barbara_Lesko@brown.edu, brown@whitewhale.net, joukowsky_institute@brown.edu","Suggestion submitted from Breaking Ground web site",$body,"From: $_POST[email] ($_POST[name])"); Header("Location: thanks.php\n\n"); exit(); } else $error_message="
You must complete this form to continue.
"; }; ?>| $fp=opendir("images/random"); while ($item=readdir($fp)) if ($item{0}!=".") $random[]=$item; shuffle($random); echo "
|