$conditions[] = "expotype_id=" . $type_id; $type_name = $_PB_CACHE['expotype'][$type_id]; $viewhelper->setTitle($type_name); $viewhelper->setPosition($type_name, "fair/list.php?typeid=" . $type_id); } if (isset($_GET['areaid'])) { $area_id = intval($_GET['areaid']); $tmp_info = $area->setInfo($area_id); if (!empty($tmp_info)) { $conditions[] = "area_id" . $tmp_info['level'] . "=" . $tmp_info['id']; $viewhelper->setTitle($tmp_info['name']); $viewhelper->setPosition($tmp_info['name'], "fair/list.php?areaid=" . $tmp_info['id']); } } $amount = $expo->findCount(null, $conditions); $result = $expo->findAll("*", null, $conditions, "id desc", $pos, $limit); if (!empty($result)) { for ($i = 0; $i < count($result); $i++) { if ($result[$i]['begin_time']) { $result[$i]['begin_date'] = df($result[$i]['begin_time']); } if ($result[$i]['end_time']) { $result[$i]['end_date'] = df($result[$i]['end_time']); } $result[$i]['description'] = mb_substr(strip_tags(trim($result[$i]['description'])), 0, 100); $result[$i]['typename'] = $_PB_CACHE['expotype'][$result[$i]['expotype_id']]; $result[$i]['title'] = $result[$i]['name']; if (isset($result[$i]['picture'])) { $result[$i]['image'] = pb_get_attachmenturl($result[$i]['picture'], '', 'small'); } if (!empty($result[$i]['area_id'])) {