require LIB_PATH . "cache.class.php"; include CACHE_PATH . "cache_type.php"; $page = new Pages(); $cache = new Caches(); $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']);
require "room.share.php"; require LIB_PATH . 'time.class.php'; uses("handset"); $handset = new Handsets(); $sql = "select * from terawurflmerge where actual_device_root =1"; $result = $pdb->GetArray($sql); //print_r($result);exit; $i = 0; foreach ($result as $key => $val) { $capabilities = unserialize($val['capabilities']); print_r($capabilities); continue; $vals['deviceID'] = $capabilities['id']; $vals['user_agent'] = $capabilities['user_agent']; $vals['brand_name'] = $capabilities['product_info']['brand_name']; $vals['model_name'] = $capabilities['product_info']['model_name']; $vals['width'] = $capabilities['display']['resolution_width']; $vals['height'] = $capabilities['display']['resolution_height']; $vals['j2me'] = serialize($capabilities['j2me']); $vals['pointing'] = $capabilities['product_info']['pointing_method']; $vals['qwerty'] = $capabilities['product_info']['has_qwerty_keyboard']; $vals['colors'] = $capabilities['image_format']['colors']; if ($vals['width'] != '') { //echo $vals['width']; $vals['display'] = $vals['width'] . "x" . $vals['height']; } //print_r($vals);continue; $sreturn = $handset->save($vals); $i = $i + 1; echo "Count:" . $i . " - " . $sreturn . '<br>'; }