<?php /* * ---------------------------------------------------------------------- * LOCATION: CONTORL * ---------------------------------------------------------------------- */ $_get = new V_STATIC_GET(); $_update = new V_STATIC_UPDATE(); $city = filter_var($_REQUEST['city'], FILTER_SANITIZE_STRING); if ($city == 'all') { $search = ' AND 1'; } else { $search = " AND `category_alias` = '{$city}'"; } $count_city = $_get->count_city('Yes'); $count_location = $_get->count_location('Yes', 1, $search); if ($count_city->rows > 0) { $data_city = $_get->get_city('Yes'); } else { $data_city = 0; } if ($count_location->rows > 0) { $data_location = $_get->get_location('Yes', 1, $search); $data_location_js = $_get->get_location('Yes', 1, $search); } else { $data_location = 0; }