Esempio n. 1
0
    $id = $_POST['id'];
    if (empty($vals['what'])) {
        $vals['what'] = 1;
    }
    if (!empty($_POST['membergroup_ids']) && !in_array(0, $_POST['membergroup_ids'])) {
        $reses = implode(",", $_POST['membergroup_ids']);
        $vals['membergroup_ids'] = $reses;
    } elseif (!empty($_POST['membergroup_ids'])) {
        $vals['membergroup_ids'] = 0;
    }
    if (!empty($vals['additional_adwords'])) {
        $vals['additional_adwords'] = stripcslashes($vals['additional_adwords']);
    }
    if (!empty($id)) {
        $vals['modified'] = $time_stamp;
        $result = $adzone->save($vals, "update", $id);
    } else {
        $vals['created'] = $vals['modified'] = $time_stamp;
        $result = $adzone->save($vals);
    }
    if (!$result) {
        flash();
    }
}
if (isset($_POST['del']) && !empty($_POST['id'])) {
    $adzone->del($_POST['id']);
}
$amount = $adzone->findCount();
$page->setPagenav($amount);
$result = $adzone->findAll("*", null, $conditions, " id desc", $page->firstcount, $page->displaypg);
if (!empty($result)) {