$server="localhost"; $user="calumsco_CAS01"; $pw="lotuselanK1!"; $cn = mysql_connect ($server,$user,$pw) or die('Database unavailable. Please try again later.'); mysql_select_db("csdb"); $gal=$_REQUEST['gal']; $fp = fopen("galleries/galleries.txt","r"); while ($data = fgetcsv ($fp, 1000, ",")) { if ($data[0] == $gal) { $title = $data[1]; $contrib = $data[2]; $email = $data[3]; $copyyear = $data[4]; $copyname = $data[5]; } } fclose($fp); $textout = ''; $fp = fopen("galleries/galtext.txt","r"); while ($textdata = fgetcsv ($fp, 1000, ",")) { if ($textdata[0] == $gal) { $textout .= " ".$textdata[1]; } } fclose($fp); echo "\n"; echo "
\n"; echo "".$title."
"; echo "\n"; echo "
".$textout."
\n"; echo "\n"; echo "
All photographs are Copyright (c) ".$copyname." ".$copyyear.", and may not be stored in a retrieval system, transmitted or reproduced in any way including but not limited to photocopy, photograph, magnetic or other record without the prior written consent of ".$copyname."
\n"; echo "\n"; echo "
If you want high resolution versions of the pictures in this gallery please contact ".$contrib."
\n"; echo "\n"; echo "
\n"; echo "