* @version $Revision: 1.3 $ $Date: 2004/10/21 12:21:46 $ * @package Mobot Backend * */ include_once('config.php'); require_once('int_libs/mobot.php'); if($_REQUEST["manuf_id"]) { if(!is_numeric($manuf_id)) { $name = urldecode($_REQUEST["manuf_id"]); $manuf_id = mobot_get_manuf_id_from_name($name); } } else { $manuf_id = 0; } $app_url = "/mobot/chipsets/$manuf_id/"; $sort = get_sort_array(); //print_r($_REQUEST); $header = array('Chipset', 'Front Side Bus', 'Socket', 'Processor'); if(isset($sort[1]) && isset($sort[2])) { $x = $header[$sort[1]]; if($sort[2] == 1) { $y = 'ASC'; } elseif($sort[2] == 2) { $y = 'DESC'; } $orderby = "ORDER BY '$x' $y "; } if($manuf_id) { $where = "WHERE mc.manuf_id = $manuf_id"; } $t = new table(); $t->set_table_class('tablemobot'); $head_array = array(sorted_header('Chipset', 1, $app_url), sorted_header('Front Side Bus', 2, $app_url), sorted_header('Socket', 3, $app_url), sorted_header('Processor', 5, $app_url)); //print_r($head_array); $t->set_thead($head_array); $t->set_tfoot('Powered by MOBOT', 4); $db = new db_mysql(); $db->select_db('mobot'); $sql = "SELECT mc.name AS 'Chipset', mm.name AS 'Manufacturer', mf.name AS 'Front Side Bus', ms.name AS 'Socket', mg.name AS 'External Graphics', mcf.name AS 'Processors' FROM chipset AS mc LEFT JOIN manuf AS mm ON mc.manuf_id = mm.manuf_id LEFT JOIN nb AS mnb ON mc.nb_id = mnb.nb_id LEFT JOIN fsb AS mf ON mf.fsb_id = mnb.fsb_id LEFT JOIN sockets AS ms ON ms.sockets_id = mnb.sockets_id LEFT JOIN graphic_ext AS mg ON mg.graphic_ext_id = mnb.graphic_ext_id LEFT JOIN cpu_family AS mcf ON mcf.cpu_family_id = mnb.cpu_family_id $where $orderby LIMIT $sort[0], $sort[3]"; //echo $sql; $db->set_sql($sql); $db->query(); if ($row = $db->fetch_array()) { if($manuf_id) { $mname = $row["Manufacturer"]; } $body_array = array(); do { $body_array[] = $row["Manufacturer"] . ' ' . mobot_chipset_link($row["Manufacturer"], $row["Chipset"]); $body_array[] = $row["Front Side Bus"]; $body_array[] = $row["Socket"]; $body_array[] = $row["Processors"]; $t->set_tbody($body_array); unset($body_array); } while ($row = $db->fetch_array()); } $db->close(); $db = new db_mysql(); $db->select_db('mobot'); $db->set_sql("SELECT * FROM chipset AS mc $where"); $db->query(); $numrec = $db->num_rows(); $db->close(); $template = new template(); $template->title = "MOBOT: Chipsets $mname"; $template->section = 'mobot'; $template->description = 'Largest Motherboard database on the web.'; $template->open_page(); ?>