parameter . "
"; //get a listing of all top level categories, this will be used by the side nav bar for display $st_sql = "select * from $st_tbCategories WHERE top_level = 1"; // echo "$st_sql
"; $h1SQL = mysql_query($st_sql, $hmSQL); if($h1SQL > 0) { for($in_A = 0; $in_A < mysql_num_rows($h1SQL); $in_A++) { if( $ar_row = mysql_fetch_array($h1SQL)) { $side_bar_categories[$in_A] = new CCategory; $side_bar_categories[$in_A]->id = $ar_row["id"]; $side_bar_categories[$in_A]->name = $ar_row["name"]; $side_bar_categories[$in_A]->image3 = $ar_row["image3"]; $side_bar_categories[$in_A]->image2 = $ar_row["image2"]; } else $st_database_error .= "No such top level category defined"; } }else $st_database_error .= mysql_error(); if(isset($id) == false) $id = 1; if ($id != "") { // get the category information $st_sql = "select * from $st_tbCategories where id = $id"; // echo "$st_sql
"; $h1SQL = mysql_query($st_sql, $hmSQL); if($h1SQL > 0) { if( $ar_row = mysql_fetch_array($h1SQL)) { $category = new CCategory; $category->id = $ar_row["id"]; $category->name = $ar_row["name"]; $category->image1 = $ar_row["image1"]; $category->product_desc = $ar_row["product_desc"]; $category->description = $ar_row["description"]; }else $st_database_error .= "No such top level category defined" ; if ($category->product_desc == "") $category->product_desc = $category->name; }else $st_database_error .= mysql_error(); // get all the sub-categories $st_sql = "select $st_tbCategories.* from $st_tbCategories, $st_tbSubCategories where $st_tbCategories.id = $st_tbSubCategories.subcategory_id and $st_tbSubCategories.category_id = $id"; // echo $st_sql . "
"; $h2SQL = mysql_query($st_sql, $hmSQL); if ($h2SQL > 0) { if(mysql_num_rows($h2SQL) == 0) { $st_database_error .= "No subcategories defined under category \"$id\""; }else { for ($in_A = 1; $in_A <= mysql_num_rows($h2SQL); $in_A++) { if (mysql_data_seek($h2SQL, $in_A-1) == true) { $ar_row = mysql_fetch_array($h2SQL); $ar_sub_categories[$in_A-1] = new CCategory; $ar_sub_categories[$in_A-1]->id = $ar_row["id"]; $ar_sub_categories[$in_A-1]->image1 = $ar_row["image1"]; $ar_sub_categories[$in_A-1]->name = $ar_row["name"]; $ar_sub_categories[$in_A-1]->description = $ar_row["description"]; } else $st_database_error .= mysq_error(); } } }else $st_database_error .= mysql_error(); /* two possible things at this stage: we are just viewing this page via a link or we are viewing the page via the 'Go' href for the first scenario, all we need is just the category id for a listing of all subcategories under this category for the second category: we need the category id and the subcategory id so that we can do a listing with respect to this subcategory */ $st_sql = "select * from $st_tbCategoryItems, $st_tbProducts where category_id = " . $id ." and $st_tbProducts.id = $st_tbCategoryItems.product_id ORDER BY $st_tbProducts.title"; // echo $st_sql . "
"; $h3SQL = mysql_query($st_sql, $hmSQL); if($h3SQL > 0) { if(mysql_num_rows($h3SQL) > 0) { for ($in_A = 0; $in_A < mysql_num_rows($h3SQL); $in_A++) { $ar_row = mysql_fetch_array($h3SQL); $ar_products[$in_A] = new CProduct; $ar_products[$in_A]->id = $ar_row["id"]; $ar_products[$in_A]->sku = $ar_row["sku"]; $ar_products[$in_A]->large_image = $ar_row["large_image"]; $ar_products[$in_A]->large_image_name = $ar_row["large_image_name"]; $ar_products[$in_A]->thumbnail = $ar_row["thumbnail"]; $ar_products[$in_A]->title = $ar_row["title"]; $ar_products[$in_A]->recommended_age = $ar_row["recommended_age"]; $ar_products[$in_A]->written_by = $ar_row["written_by"]; $ar_products[$in_A]->illustrated_by = $ar_row["illustrated_by"]; $ar_products[$in_A]->narrated_by = $ar_row["narrated_by"]; $ar_products[$in_A]->description = $ar_row["description"]; $ar_products[$in_A]->contribution = $ar_row["contribution"]; $ar_products[$in_A]->testimonial_description = $ar_row["testimonial_description"]; $ar_products[$in_A]->price = $ar_row["price"]; $ar_products[$in_A]->real_animal_image_url = $ar_row["real_animal_image_url"]; $ar_products[$in_A]->new_product = $ar_row["new_product"]; $ar_products[$in_A]->size = $ar_row["size"]; $ar_products[$in_A]->isbn = $ar_row["isbn"]; $ar_products[$in_A]->hsus = $ar_row["hsus"]; $ar_products[$in_A]->bunny_graphic = $ar_row["bunny_graphic"]; $ar_products[$in_A]->title_image = $ar_row["title_image"]; $ar_products[$in_A]->name = $ar_row["name"]; } }else $st_database_error .= "No products under Category=$id and SubCategory=$subcategory_id"; }else $st_database_error .= mysql_error(); } // get the cart footer object and selectively dissable the icons that we do not want displayed $cart_footer = get_shopping_cart_footer_object (); require "$st_web_root" . "/includes/common/mySQL.close.inc"; ?> 0) { ?>
"; echo "
0) //i.e some products where returned for this subcategory { echo "\n"; if($ar_products[0]->bunny_graphic == 1) echo ""; echo ""; echo "" . $ar_products[0]->large_image_name . ""; } //end of if ?>

 

\n"; echo "

Coming Soon

\n"; echo "

 

\n"; echo "

 

\n"; echo "

 

\n"; } else { ?>
0) //i.e some products where returned for this subcategory { if($ar_products[0]->new_product == 1) echo "
"; // echo "title_image . "\" width=140 height=110>\n"; } ?>
0) //i.e some products where returned for this subcategory { echo "Ages " . $ar_products[0]->recommended_age; echo "
\n"; echo "

\n"; echo "Written by " . $ar_products[0]->written_by; echo "

"; echo "Narrated by " . $ar_products[0]->narrated_by; echo "

"; echo "Illustrated by " . $ar_products[0]->illustrated_by; } ?>
0) //i.e some products where returned for this subcategory echo $ar_products[0]->description; ?>
0) //i.e some products where returned for this subcategory echo "large_image . "\" width='200' height='200' border='0'>\n"; ?>
0) //i.e some products where returned for this subcategory { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; for($in_A=0; $in_A < count($ar_products); $in_A++) { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; } } ?>
 
" . stripslashes($ar_products[$in_A]->size) . " "; echo stripslashes($ar_products[$in_A]->name) . "
"; echo "
ISBN"; echo $ar_products[$in_A]->isbn . "
"; echo $ar_products[$in_A]->sku . ""; echo $ar_products[$in_A]->price . "id . ">

0) //i.e some products where returned for this subcategory echo $ar_products[0]->contribution."\n"; ?>

   
Any Product displaying this icon is designed and produced by ReadPlay.
0) //i.e some products where returned for this subcategory { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "

\n"; echo " " . $ar_products[0]->testimonial_description . "
\n"; } ?>