Note: some branches are dead
UPDATE: two branches are not listed (undergoing non-mandatory probationary period). Maybe as many as two branch applications may or may not be processed in the future time.
if ($fail == "fail") {
?>
Database connection is down.
}
else {
mysql_set_charset('UTF8', $connection);
$db_connect = mysql_select_db('ojplorg_ojpl', $connection);
if (!$db_connect) {
?>
Failed to connect to database.
mysql_close($connection);
}
else {
$result = mysql_query('SELECT branch, location, contact, picture, note, quote, hours FROM libraries WHERE branch != "digital" ORDER BY branch');
}
if (!$result) {
?>
echo "Something wrong with database:
".mysql_error();
?>
mysql_close($connection);
}
else {
for ($b = 0; $b < mysql_num_rows($result); $b++) {
$branch[] = mysql_result($result, $b, 0);
$location[] = mysql_result($result, $b, 1);
$contact[] = mysql_result($result, $b, 2);
$picture[] = mysql_result($result, $b, 3);
$note[] = mysql_result($result, $b, 4);
$quote[] = mysql_result($result, $b, 5);
$hours[] = mysql_result($result, $b, 6);
?>
echo "
".$branch[$b]." Branch
";
if ($quote[$b]) echo "
".$quote[$b]."
";
echo "
".$location[$b]."
";
if ($note[$b]) echo "
".$note[$b]."
";
if ($hours[$b]) echo "
Hours
".$hours[$b]."";
?>
}
}
}
?>