if ($do == "search") { if (!empty($_GET['name'])) { $conditions[] = "name LIKE '%" . $_GET['name'] . "%'"; } if (isset($_GET['parentid'])) { $conditions[] = "parent_id=" . intval($_GET['parentid']); } if (isset($_GET['level'])) { $conditions[] = "level=" . intval($_GET['level']); } if (isset($_GET['typeid'])) { $conditions[] = "areatype_id=" . intval($_GET['typeid']); } } if ($do == "edit") { setvar("CacheItems", $area->getTypeOptions()); foreach ($viewhelper->colorarray as $color) { $colors[] = '"' . substr($color, 1) . '"'; } setvar("colors", implode(",", $colors)); if (!empty($id)) { $res = $pdb->GetRow("SELECT * FROM {$tb_prefix}areas WHERE id=" . $id); $highlight_style = parse_highlight($res['highlight'], true); setvar("hl", $highlight_style); setvar("item", $res); } $tpl_file = "area.edit"; template($tpl_file); exit; } if ($do == "clear") {