Example #1
0
include CACHE_PATH . "cache_area.php";
uses("area", "typeoption", "country");
$cache = new Caches();
$area = new Areas();
$country = new Countries();
$typeoption = new Typeoption();
$condition = null;
$conditions = array();
$tpl_file = "area";
$page = new Pages();
$cache_items = $_PB_CACHE['area'];
setvar("Types", $_PB_CACHE['areatype']);
setvar("AskAction", $typeoption->get_cache_type("common_option"));
if (isset($_POST['del'])) {
    if (!empty($_POST['id'])) {
        $area->del($_POST['id']);
    }
}
if (isset($_POST['do'])) {
    $do = trim($_POST['do']);
    if ($do == "clear") {
        foreach ($_POST['data']['level'] as $key => $val) {
            $result = $pdb->Execute("DELETE FROM {$tb_prefix}areas WHERE level='" . $val . "'");
        }
        if (!$result) {
            flash();
        }
    }
}
if (isset($_POST['update_batch'])) {
    if (!empty($_POST['data']['aname'])) {