Example #1
0
<?php

/*
# ----------------------------------------------------------------------
# VOUCHER: CONTROL
# ----------------------------------------------------------------------
*/
$_get = new VOUCHER_GET();
$_update = new VOUCHER_UPDATE();
/*
# ----------------------------------------------------------------------
# SORTING
# ----------------------------------------------------------------------
*/
$equal_search = array('voucher_usability', 'voucher_type');
$null_search = array('promo_value');
$default_sort_by = "voucher_id DESC";
$pgdata = page_init($equal_search, $default_sort_by);
$page = $pgdata['page'];
$query_per_page = $pgdata['query_per_page'];
$sort_by = $pgdata['sort_by'];
$first_record = $pgdata['first_record'];
$search_parameter = $pgdata['search_parameter'];
$search_value = $pgdata['search_value'];
$search_query = $pgdata['search_query'];
$search = $pgdata['search'];
if (isset($_REQUEST['src'])) {
    $_REQUEST['src'] = $_REQUEST['src'];
} else {
    $_REQUEST['src'] = '';
}
Example #2
0
<?php

/*
# ----------------------------------------------------------------------
# VOUCHER: CONTROL
# ----------------------------------------------------------------------
*/
$custom_order_number = 'DIM040215002';
include 'get.php';
include 'update.php';
$_get = new VOUCHER_GET();
$_update = new VOUCHER_UPDATE();
$count = $_get->count_voucher($custom_order_number);
if ($count->rows > 0) {
    $data = $_get->get_voucher($custom_order_number);
    $show = 1;
} else {
    $show = 2;
}