示例#1
0
}
if (isset($_POST['check']) && !empty($_POST['id'])) {
    $ids = implode(",", $_POST['id']);
    $condition = " id in (" . $ids . ")";
    $sql = "update {$tb_prefix}markets set status=1 where " . $condition;
    $result = $pdb->Execute($sql);
}
if (isset($_POST['uncheck']) && !empty($_POST['id'])) {
    $ids = implode(",", $_POST['id']);
    $condition = " id IN (" . $ids . ")";
    $sql = "UPDATE {$tb_prefix}markets SET status=0 WHERE " . $condition;
    $result = $pdb->Execute($sql);
}
if (isset($_POST['recommend'])) {
    foreach ($_POST['id'] as $val) {
        $commend_now = $market->field("if_commend", "id=" . $val);
        if ($commend_now == "0") {
            $result = $market->saveField("if_commend", "1", intval($val));
        } else {
            $result = $market->saveField("if_commend", "0", intval($val));
        }
    }
    if ($result) {
        flash("success");
    } else {
        flash();
    }
}
if (isset($_POST['save']) && !empty($_POST['data']['market'])) {
    $vals = array();
    $vals = $_POST['data']['market'];