$handset = new Handsets(); $conditions = array(); //$conditions[] = "brand_name <> ''"; //$conditions[] = "brand_name = 'nokia'"; $fields = null; $tpl_file = "handset"; if (!empty($pid)) { $vals['product_id'] = $pid; } if (!empty($id)) { $vals['modified'] = $time_stamp; $result = $handset->save($vals, "update", $id); } if (isset($_REQUEST['del']) && !empty($_REQUEST['id'])) { $deleted = false; $deleted = $handset->del($_REQUEST['id']); } if (isset($_GET['do'])) { $do = trim($_GET['do']); if (isset($_GET['action'])) { $action = trim($_GET['action']); } if (!empty($_GET['id'])) { $id = intval($_GET['id']); } if (!empty($_GET['gid'])) { $gid = intval($_GET['gid']); } if (isset($_GET['pid'])) { $pid = $_GET['pid']; }