if ( $award != "" )
{
echo "The Toy Man $award $year Recipients";
// echo "  ";
} else
{
// echo "The Toy Man - Product Guide $product_guide_year";
echo "Product Reviews Repository - Search Results";
}
?>
|
The Toy Man
|
// Add product_category_menu
//include("product_category_menu.inc");
?>
// Add sponsor information
//include("right_side_sponsors.inc");
?>
// display award graphic if award
if ( $award != "" )
{
// echo "The Toy Man $award $year Recipients";
echo "  ";
}
?>
if ( $award != "" )
{
// echo "$award Recipients ";
}
?>
if ( $award != "" )
{
echo "The Toy Man Product Reviews Database Search Results";
} else {
echo "The Toy Man Reviews Repository - Search Results";
}
?>
|
Product
|
Primary Category
|
//echo $s,$category,$product_rating,$educational_value,$design_quality,$simplicity,$visual_appeal,$funfactor,$safety;
//if ( $safety > "0") {echo "safe yes";}
// echo strlen($s);
// if all criteria is empty, go back
if ( (strlen($s) < "4") and ($category=="") and
($product_rating=="") and ($educational_value=="") and
($design_quality=="") and
($simplicity=="") and ($visual_appeal=="") and ($funfactor=="") and
($safety=="") )
{
// echo "dead";
//empty
// go back
// exit;
echo "";
}
//echo "date";
//echo $year;
//echo substr($year,0,4);
// initial sql
// ====================
if ( $award == "Seal of Approval" )
{
//$sql="select * from ttmo_product_reviews where (show_review='yes') and (substr(review_date,1,4)='$year') ";
//echo "soa";
//echo $year;
$sql="select * from ttmo_product_reviews where (show_review='yes') and (review_date like '$year-%') and (product_rating > '2') ";
}
if ( $award == "Award of Excellence" )
{
//$sql="select * from ttmo_product_reviews where (show_review='yes') and (substr(review_date,1,4)='$year') ";
//echo "aoe";
$sql="select * from ttmo_product_reviews where (show_review='yes') and (review_date like '$year-%') and ( product_rating = '5') ";
}
if ( $award == "eChoice Awards" )
{
//$sql="select * from ttmo_product_reviews where (show_review='yes') and (substr(review_date,1,4)='$year') ";
$sql="select * from ttmo_product_reviews where (show_review='yes') and (review_date like '$year-%') and ( echoice_award = 'yes') ";
}
if ( $award == "" )
{
$sql="select * from ttmo_product_reviews where (show_review='yes') ";
}
// s
if ( strlen($s) > "3" )
{
$sql = $sql." and ((product_review_title like '%$s%') or (review_paragraph1 like '%$s%') or (review_paragraph2 like '%$s%') or (review_paragraph3 like '%$s%'))";
}
// category
if ( $category!="" )
{
$sql = $sql. " and ((category like '$category%') or (category2 like '$category%') or (category3 like '$category%')) ";
}
// just cat
// if ( (strlen($s) < "4") and ($category != "") )
// {
// $sql="select * from ttmo_product_reviews where (show_review='yes') and ( (category like '$category')) ";
//$sql="select * from ttmo_product_reviews where (show_review='yes') and ((product_review_title like '%$s%') or (review_paragraph1 like '%$s%') or (category like '$category')) ";
// }
//just s
// if ( (strlen($s) > "3") and ($category == "") )
// {
// $sql="select * from ttmo_product_reviews where (show_review='yes') and ((product_review_title like '%$s%') or (review_paragraph1 like '%$s%')) ";
// } else
// {
//// echo "";
// }
// both s and cat
// if ( (strlen($s) > "3") and ($category != "") )
// {
////echo "s and cat";
// $sql="select * from ttmo_product_reviews where (show_review='yes') and ((product_review_title like '%$s%') or (review_paragraph1 like '%$s%') and (category like '$category')) ";
// }
// rating sql building
if ( $product_rating > "0")
{
$sql = $sql."and (product_rating=$product_rating) ";
}
if ( $educational_value > "0")
{
$sql = $sql."and (educational_value=$educational_value) ";
}
if ( $design_quality > "0")
{
$sql = $sql."and (design_quality=$design_quality) ";
}
if ( $simplicity > "0")
{
$sql = $sql."and (simplicity=$simplicity) ";
}
if ( $visual_appeal > "0")
{
$sql = $sql."and (visual_appeal=$visual_appeak) ";
}
if ( $funfactor > "0")
{
$sql = $sql."and (funfactor=$funfactor) ";
}
if ( $safety > "0")
{
//echo "safe yes";
$sql = $sql."and (safety=$safety) ";
}
// sql should now be defined or auto go back
if ( $sql =="" )
{
//echo "in sql area ";
// $msg="No Matches Were Found.";
echo "";
}
// override tests
// $sql="select * from ttmo_product_reviews where (show_review='yes') and ( (category like '$category')) ";
// $sql="select * from ttmo_product_reviews where (show_review='yes') and ((product_review_title like '%$s%') or (review_paragraph1 like '%$s%') or (category like '$category')) ";
// $sql="select * from ttmo_product_reviews where (show_review='yes') and ((product_review_title like '%$s%') or (review_paragraph1 like '%$s%')) ";
//echo $sql;
//echo $s;
//echo $category;
//echo "---------";
// $sql="select * from product_reviews where category = '$c' ";
//echo "zzzzz";
//echo $sql;
//echo "yyyyy";
// get sql result
$result = mysql_query($sql,$db);
// get count and if 0, go back
// sql should now be defined or auto go back
$num_rows = mysql_num_rows($result);
//echo "ccccccccccccc";
//echo $num_rows;
if ( $num_rows =="0" )
{
//echo "0 count ";
$msg="No Matches Were Found.";
echo $msg;
echo "";
}
while ($myrow = mysql_fetch_array($result))
{
// echo ".";
$pin_review=$myrow["pin_review"];
$review_date=$myrow["review_date"];
$category=$myrow["category"];
$category2=$myrow["category2"];
$category3=$myrow["category3"];
$echoice_award=$myrow["echoice_award"];
$product_directory_name=$myrow["product_directory_name"];
$main_graphic=$myrow["main_graphic"];
$product_title=$myrow["product_title"];
$product_summary=$myrow["product_summary"];
$product_msrp=$myrow["product_msrp"];
$product_url=$myrow["product_url"];
$product_rating=$myrow["product_rating"];
$product_graphic=$myrow["product_graphic"];
$product_review_title=$myrow["product_review_title"];
$product_quote=$myrow["product_quote"];
$product_introduction=$myrow["product_introduction"];
$review_author_html=$myrow["review_author_html"];
$review_title1=$myrow["review_title1"];
$review_paragraph1=$myrow["review_paragraph1"];
$review_title2=$myrow["review_title2"];
$review_paragraph2=$myrow["review_paragraph2"];
$review_title3=$myrow["review_title3"];
$review_paragraph3=$myrow["review_paragraph3"];
$review_title4=$myrow["review_title4"];
$review_paragraph4=$myrow["review_paragraph4"];
$review_title5=$myrow["review_title5"];
$review_paragraph5=$myrow["review_paragraph5"];
?>
echo "$product_review_title"; ?>
|
echo $category; ?>
//echo $product_rating; ?>
//echo $review_date; ?>
|
// end of product review loop
}
?>
|
// run perl search html script
// $command = "/usr/bin/perl /home/testpositiveimagenews/www/cgi-bin/search_positiveimagenews_html.cgi?term=.$s";
// echo $command;
// $output2=shell_exec($command);
// $last_line=system("/usr/bin/perl","/home/testpositiveimagenews/www/cgi-bin/search_positiveimagenews_html.cgi","?term=$s,$outzput2)";
// $command = "/usr/bin/perl /home/testpositiveimagenews/www/cgi-bin/search_positiveimagenews_html.cgi terms=$s";
// echo $command;
// $last_line=system($command);
//// $last_line=system("/usr/bin/perl /home/testpositiveimagenews/www/cgi-bin/search_positiveimagenews_html.cgi term=$s");
//// echo "\no2 is: $output2";
// echo " lastline is: $last_line";
// include("/home/testpositiveimagenews/www/cgi-bin/search_positiveimagenews_html.cgi");
?>
|
// include("http://www.thetoymanonline.com/weblib/inc/bottom_sponsors.inc");
?>
|
include("footer3.inc");
?>
|