$subcategory_author1";
$author1top = " by $subcategory_author1";
}
if ($author_1_number == "0") {
$author1 = "";
$author1top = "";
}
if ($author_2_number != "0") {
$author2_query = "SELECT author, author_id FROM author WHERE author_id = $author_2_number";
$author2result = mysql_query("$author2_query",$db);
while ($author2_array = mysql_fetch_row($author2result)) {
$subcategory_author2 = $author2_array[0];
$subcategory_author2_id = $author2_array[1];
}
$author2 = ", $subcategory_author2";
$author2top = " and $subcategory_author2";
}
if ($author_2_number == "0") {
$author2 = "";
$author2top = "";
}
if ($author_3_number != "0") {
$author3_query = "SELECT author, author_id FROM author WHERE author_id = $author_3_number";
$author3result = mysql_query("$author3_query",$db);
while ($author3_array = mysql_fetch_row($author3result)) {
$subcategory_author3 = $author3_array[0];
$subcategory_author3_id = $author3_array[1];
}
$author3 = ", $subcategory_author3";
$author3top = " and $subcategory_author3";
}
if ($author_3_number == "0") {
$author3_code = "";
$author3top = "";
}
if ($author_4_number != "0") {
$author4_query = "SELECT author, author_id FROM author WHERE author_id = $author_4_number";
$author4result = mysql_query("$author4_query",$db);
while ($author4_array = mysql_fetch_row($author4result)) {
$subcategory_author4 = $author4_array[0];
$subcategory_author4_id = $author4_array[1];
}
$author4 = ", $subcategory_author4";
$author4top = " and $subcategory_author4";
}
if ($author_4_number == "0") {
$author4_code = "";
$author4top = "";
}
if ($author_5_number != "0") {
$author5_query = "SELECT author, author_id FROM author WHERE author_id = $author_5_number";
$author5result = mysql_query("$author5_query",$db);
while ($author5_array = mysql_fetch_row($author5result)) {
$subcategory_author5 = $author5_array[0];
$subcategory_author5_id = $author5_array[1];
}
$author5 = ", $subcategory_author5";
$author5top = " and $subcategory_author5";
}
if ($author_5_number == "0") {
$author5_code = "";
$author5top = "";
}
}
function story($db_connection, $thisbites = '$story_database_number')
{
$sqlcode = "SELECT * FROM products where story_id = '$thisbites' AND active = 'yes'";
$result = mysql_query("$sqlcode",$db_connection);
$num_fields = mysql_num_fields($result);
print("");
while ($myrow = mysql_fetch_row($result))
{
$story_id = $myrow[0];
$story_number = $myrow[1];
$title = $myrow[2];
$external_link = $myrow[3];
$title_no_articles = $myrow[4];
$story_type = $myrow[5];
$prequel_title = $myrow[6];
$prequel_number = $myrow[7];
$month_added = $myrow[8];
$day_added = $myrow[9];
$year_added = $myrow[10];
$rating_number = $myrow[11];
$length_number = $myrow[12];
$date_number = $myrow[13];
$summary = $myrow[14];
$story_text_1 = $myrow[15];
$home_page_status = $myrow[16];
$new_release_sortnumber = $myrow[17];
$url_1 = $myrow[18];
$url_2 = $myrow[19];
$story_text_3 = $myrow[20];
$story_text_4 = $myrow[21];
$story_bottom_notes = $myrow[22];
$active = $myrow[23];
$on_main_site = $myrow[24];
$featured = $myrow[25];
$exact_length = $myrow[26];
$chapter_1_title = $myrow[27];
$chapter_1_display_title = $myrow[28];
$keywords = $myrow[29];
$product_last_modified_by = $myrow[30];
$product_last_modified_date = $myrow[31];
$story_top_notes = $myrow[32];
$author_1_number = $myrow[33];
$author_2_number = $myrow[34];
$author_3_number = $myrow[35];
$author_4_number = $myrow[36];
$author_5_number = $myrow[37];
$pairing_1_number = $myrow[38];
$pairing_2_number = $myrow[39];
$pairing_3_number = $myrow[40];
$pairing_4_number = $myrow[41];
$pairing_5_number = $myrow[42];
$story_text_2 = $myrow[48];
$series_number = $myrow[51];
$series_sort_code = $myrow[52];
if ($chapter_1_title != "") {
$chapter_title = "$chapter_1_title
";
}
else {
$chapter_title = "";
}
if ($story_text_2 != "") {
$main_text2 = "
$story_text_2";
}
if ($story_text_2 == "" OR $story_text_2 == "0.00") {
$main_text2 = "";
}
if ($story_text_3 != "") {
$main_text3 = "
$story_text_3";
}
if ($story_text_3 == "" OR $story_text_3 == "0.00") {
$main_text3 = "";
}
if ($story_text_4 != "") {
$main_text4 = "
$story_text_4";
}
if ($story_text_4 == "" OR $story_text_4 == "0.00") {
$main_text4 = "";
}
### Get the series name
if ($series_number != "0") {
$series_query = "SELECT * FROM series WHERE series_id = $series_number LIMIT 1";
$seriesresult = mysql_query("$series_query",$db_connection);
while ($series_array = mysql_fetch_row($seriesresult)) {
$series_id = $series_array[0];
$series_title = $series_array[1];
}
}
else {
$series_name = "";
}
### Format the Prequel and Series Display
if ($prequel_number != "" AND $series_number != "0") {
$prequel = "Sequel to $prequel_title; part of $series_title
";
}
if ($prequel_number != "" AND $series_number == "0") {
$prequel = "Sequel to $prequel_title
";
}
if ($prequel_number == "" AND $series_number != "0") {
$prequel = "Part of $series_title
";
}
if ($prequel_number == "" AND $series_number == "0") {
$prequel = "";
}
if ($story_top_notes != "") {
$top_notes = "$story_top_notes
All About Spike - Print Version
[Back to Main Site] [Back to Story Page]