* @version $Revision: 1.5 $ $Date: 2004/11/20 19:53:50 $
*
*/
include_once('config.php');
include_once('int_libs/mobot.php');
$template = new template();
$cpu = $_REQUEST["cpu"];
$sort = $_REQUEST["sort"];
if($cpu == 'AMD') {
$title = 'AMD CPUs';
} elseif($cpu == 'AMD64') {
$title = 'AMD 64-bit CPUs';
} elseif($cpu == 'Intel') {
$title = 'Intel CPUs - archive';
} elseif($cpu == 'IntelNew') {
$title = 'Intel CPUs';
} elseif($cpu == 'Intel775') {
$title = 'Intel 775 CPUs';
}elseif($cpu == 'Intel775new') {
$title = 'Intel 775 CPUs';
}elseif($cpu == 'Intel7752006') {
$title = 'Intel 775 CPUs';
}elseif($cpu == 'amdam22006') {
$title = 'AMD AM2 CPUs';
}elseif($cpu == 'Intel7752007') {
$title = 'Intel 775 CPUs - 2007';
}elseif($cpu == 'Intel2007') {
$title = 'Intel CPUs - 2007';
}elseif($cpu == 'Intel2008') {
$title = 'Intel CPUs - 2008';
}elseif($cpu == 'amd2008') {
$title = 'AMD CPUs - 2008';
}elseif($cpu == 'inteli7i5') {
$title = 'Intel i7 and i5';
}
$template->title = 'Motherboard Ranking Charts ' . $title;
$template->section = 'ranking';
$template->right_column = 0;
$template->description = $template->title;
$template->open_page();
?>
set_table_class('tableranking');
$head_array = array(sorted_header('Manufacturer', 0 , $app_url),
sorted_header('Part #', 1 , $app_url),
sorted_header('Chipset', 2 , $app_url),
sorted_header('Features', 3 , $app_url),
sorted_header('Ergo', 4 , $app_url),
sorted_header('Stability', 5 , $app_url),
sorted_header('Support', 6 , $app_url),
sorted_header('Performance', 7 , $app_url),
sorted_header('Total', 8 , $app_url),
'Price Check'
);
$t->set_thead($head_array);
$t->set_tfoot('Motherboard Rankings', 10);
$db = new db_mysql();
$sql = "SELECT mf.name AS 'Manufacturer', mc.name AS 'Chipset', mb.feat AS 'Features', mb.ergo AS 'Ergo',
mb.stab AS 'Stability', mb.pack AS 'Support', mb.perf AS 'Performance', mb.total AS 'Total', pn.price_link AS 'Price Check',
CONCAT('
',
pn.name , '') AS 'Part #'
FROM mb_ranking_main AS mb
LEFT JOIN mobot.mobos AS pn ON mb.partnum_id = pn.mobos_id
LEFT JOIN mobot.manuf AS mf ON pn.manuf_id = mf.manuf_id
LEFT JOIN mobot.chipset AS mc ON pn.chipset_id = mc.chipset_id
WHERE cpu = '$cpu' AND mb.show = 1
$orderby
LIMIT $sort[0], $sort[3]";
//echo $sql;
$db->set_sql($sql);
$db->query();
if ($row = $db->fetch_array()) {
$body_array = array();
do {
$body_array[] = manufacturer_link($row["Manufacturer"]);
$body_array[] = $row["Part #"];
$body_array[] = mobot_chipset_link($row["Manufacturer"], $row["Chipset"]);
$body_array[] = $row["Features"];
$body_array[] = $row["Ergo"];
$body_array[] = $row["Stability"];
$body_array[] = $row["Support"];
$body_array[] = $row["Performance"];
$body_array[] = $row["Total"];
if($row["Price Check"]) {
$body_array[] = '
Search';
} else {
$body_array[] = '- -';
}
$t->set_tbody($body_array);
unset($body_array);
} while ($row = $db->fetch_array());
}
$db->close();
$t->show_table();
}
?>
close_page();
?>