'" . strtoupper($tab) . "' at the moment."; } } } /////////////////////// // Show Individual // // Names // /////////////////////// if ($show == "name") { $nameID = $_GET['id']; if (!$nameID) { header("Location: " . $_SERVER['PHP_SELF']); exit; } if ( is_numeric($nameID) ) { $result = mysql_query("SELECT * FROM bnames_names WHERE names_id = '$nameID' LIMIT 1",$db); } else { $result = mysql_query("SELECT * FROM bnames_names WHERE names_name = '$nameID' LIMIT 1",$db); if (!mysql_affected_rows()) { $result_d = mysql_query("SELECT * FROM bnames_derives WHERE derives_name = '$nameID' LIMIT 1",$db); while( $list = mysql_fetch_array($result_d) ) { $result_dID = $list["derives_name_id"]; $table["id"] = $list["derives_id"]; $table["name"] = ucfirst($list["derives_name"]); $table["gender"] = $list["derives_gender"]; if($list["derives_meaning"]!='') $table["meaning"] = str_replace("
", "
", trim($list["derives_meaning"])); if($list["derives_history"]!='') $table["history"] = str_replace("
", "
", trim($list["derives_history"])); $result = mysql_query("SELECT * FROM bnames_names WHERE names_id = '$result_dID' LIMIT 1",$db); } $is_derive = "1"; } else { $is_derive = "0"; } } if (!mysql_affected_rows()) { header("Location: " . $_SERVER['PHP_SELF']); exit; } while( $list = mysql_fetch_array($result) ) { if ( $is_derive == "0" ) { $table["id"] = $list["names_id"]; $table["name"] = ucfirst($list["names_name"]); $table["gender"] = $list["names_gender"]; } else { $table["original"]["id"] = $list["names_id"]; $table["original"]["name"] = ucfirst($list["names_name"]); $table["original"]["gender"] = $list["names_gender"]; } $list["names_meaning"] = trim($list["names_meaning"]); $list["names_history"] = trim($list["names_history"]); if(!isset($table["meaning"])) $table["meaning"] = str_replace("
", "
", $list["names_meaning"]); if(!isset($table["history"])) $table["history"] = str_replace("
", "
", $list["names_history"]); if ( $is_derive == "1" ) { $result_d = mysql_query("SELECT * FROM bnames_derives WHERE derives_name_id = '" .$list["names_id"] . "' AND derives_id != '" .$table["id"]. "' ORDER BY derives_name",$db); } else { $result_d = mysql_query("SELECT * FROM bnames_derives WHERE derives_name_id = '" .$list["names_id"] . "' ORDER BY derives_name",$db); } $i = 0; while( $list = mysql_fetch_array($result_d) ) { $table["derives"][$i]["derives_name"] = ucfirst($list["derives_name"]); $table["derives"][$i]["derives_id"] = $list["derives_id"]; $table["derives"][$i]["derives_gender"] = $list["derives_gender"]; $i++; } if($table["derives"]){ sort($table["derives"]); reset($table["derives"]); } } } /////////////////////// // List A-Z // // Name Links // /////////////////////// function fn_names_menu () { global $show, $tab; $data = ''; for ($i = A; $i!="AA" ; $i++) { if( strtoupper($tab) == $i ) { $data .= "$i\n"; } else { $data .= "$i\n"; } } if( strtoupper($tab) == "ALL" ) { $data .= "ALL"; } else { $data .= "ALL"; } return $data; } /////////////////////// // Define Box // // Headers // /////////////////////// if ($show == "list" || $show == "listunusual" || $show == "listman" || $show == "listwoman" || $show == "listplaces" || $show == "listhebrew" || $show == "listgreek" || $show == "listoldtestament" || $show == "listnewtestament" ) { if ($show == "listunusual") { $mainbox_title = "Browse Unusual Baby Names A-Z"; } else { $mainbox_title = "Browse Baby Names A-Z"; } } elseif ($show == "name") { $mainbox_title = "Name Meaning and Biblical Context of " .$table["name"]; $html_title = $table["name"]; $html_metakey = $table["name"]; $html_metadescription="Meaning of baby name ".$table["name"].", Definition of ".$table["name"].", What does baby name ".$table["name"]." mean? Origin of ".$table["name"].". Pronunciation of ".$table["name"].". Who was ".$table["name"]." in the bible?"; } /////////////////////// // HTML Stuffs // // Here // /////////////////////// include('admin/tmpl_header.php'); include('admin/tmpl_extraboxes.php'); echo $mainbox_start; if ($show == "list" || $show == "listunusual" || $show == "listman" || $show == "listwoman" || $show == "listplaces" || $show == "listhebrew" || $show == "listgreek" || $show == "listoldtestament" || $show == "listnewtestament" ) { echo "
\n\n". "
\n". " " .fn_names_menu(). "\n". "
\n\n"; require('_names_list.php'); echo "
"; } elseif ($show == "name") { require('_names_show.php'); } echo $mainbox_end; mysql_close($db); include('admin/tmpl_footer.php'); ?>