'0') { $meta_title_end = " - page $_REQUEST[w]"; $cononical = "/$cat_url/index_$_REQUEST[w].html"; }else{ $cononical = "/$cat_url/"; } $gamesbunch_top_heading = $cat_name . ' Games'; //============================================================================ if($incsub == '1'){ $topsql_sg = "SELECT SUM(voteup) AS `vtup`, SUM(votedown) AS `vtdown` FROM `games` WHERE `status` = '0' AND `p_id` = '$cat_id'"; }else{ $topsql_sg = "SELECT SUM(voteup) AS `vtup`, SUM(votedown) AS `vtdown` FROM `games` WHERE `status` = '0' AND `cat_id` = '$cat_id'"; } $topresult_sg = mysql_query($topsql_sg) or die('Error, query failed ' . mysql_error()); $toprow_sg = mysql_fetch_array($topresult_sg); $voteup_sg = $toprow_sg['vtup']; $votedown_sg = $toprow_sg['vtdown']; $total_sg = $voteup_sg + $votedown_sg; if($voteup_sg > 0) { $percenteach = ($voteup_sg/$total_sg) * 5; $rate_sg = round($percenteach, 0); }else{ $rate_sg = "0"; } //============================================================================= ?> <?=$meta_title;?><?=$meta_title_end;?> "; } ?>