Example #1
0
File: sm37.php Project: bulats/chef
            } elseif ($column_name == 'value' || $table_name == '{$wpdb->prefix}wpsc_submited_form_data') {
                $query .= ' WHERE form_id = ' . $meta_value . ' AND log_id in (' . $log_ids . ')';
            } else {
                $query .= ' WHERE `id` in (' . $selected_ids . ')';
            }
        }
        $result = $wpdb->query($query);
        if ($result) {
            $updated_rows_cnt = $idLength;
        }
        // to give count even if zero updated rows.
    }
    return $updated_rows_cnt;
}
if (isset($_POST['cmd']) && $_POST['cmd'] == 'batchUpdate') {
    $updated_rows_cnt = batchUpdate($_POST);
    if ($updated_rows_cnt >= 1) {
        $encoded['msg'] = "<b>" . $updated_rows_cnt . "</b> " . __('Records Updated Successfully', 'smart-manager');
    } else {
        $encoded['msg'] = __("No Records Updated", 'smart-manager');
    }
    // ob_clean();
    while (ob_get_contents()) {
        ob_clean();
    }
    echo json_encode($encoded);
    exit;
}
function customers_query($search_text = '', $region_exists, $country_region)
{
    //customer's query for pro
<?php

$var_staffid = $_SESSION["sess_staffid"];
if ($_POST["postback"] == "CS") {
    changeStatus($_POST["id"], $_POST["newstat"]);
    $var_message = MESSAGE_STATUS_CHANGED;
} elseif ($_POST["postback"] == "CA") {
    $var_list = "";
    for ($i = 0; $i < count($_POST["chk"]); $i++) {
        $var_list .= "'" . mysql_real_escape_string($_POST["chk"][$i]) . "',";
    }
    $var_list = substr($var_list, 0, -1);
    batchUpdate($var_list, $_POST["changeto"]);
    $var_message = MESSAGE_STATUS_CHANGED;
}
if ($_GET["mt"] == "y") {
    $var_numBegin = $_GET["numBegin"];
    $var_start = $_GET["start"];
    $var_begin = $_GET["begin"];
    $var_num = $_GET["num"];
    $var_styleminus = $_GET["styleminus"];
    $var_stylename = $_GET["stylename"];
    $var_styleplus = $_GET["styleplus"];
} elseif ($_POST["mt"] == "y") {
    $var_numBegin = $_POST["numBegin"];
    $var_start = $_POST["start"];
    $var_begin = $_POST["begin"];
    $var_num = $_POST["num"];
    $var_styleminus = $_POST["styleminus"];
    $var_stylename = $_POST["stylename"];
    $var_styleplus = $_POST["styleplus"];