Beispiel #1
0
 function verify_db_res(&$res)
 {
     if (is_object($res)) {
         if (@$res->numRows() == 0) {
             CSV_Table::raiseError("No results in row");
             return false;
         }
         return 1;
     }
 }
Beispiel #2
0
    $itemid = $_POST[$reqIdKey];
} elseif (isset($_POST['op_xaction'])) {
    $ACTION = OP_TRANSACT;
    $itemid = $_POST[$reqIdKey];
} elseif (isset($_POST['op_gc_load'])) {
    $ACTION = OP_GC_LOAD;
    $itemid = $_POST['tok'];
} else {
    $SHOWFORM = false;
}
/** **/
if (isset($_GET['op_csv'])) {
    $res = $order->fetch_all_for_export();
    $filename = strtolower('orders.csv');
    if ($res->numRows()) {
        $table = new CSV_Table();
        $table->print_csv_headers(SITE_DOMAIN_NAME . ".{$filename}.csv");
        #
        print $table->show($res);
        exit;
    } else {
        $msg = "No orders found for export.";
        header("Location: {$_SERVER['PHP_SELF']}?info=" . base64_encode($msg));
        exit;
    }
}
/** hook up smarty with the currency_format function from cmCart */
$c = CSHOP_CLASSES_CART;
$cart = new $c($pdb);
$smarty->register_modifier('currency_format', array(&$cart, 'currency_format'));
/* update the backordered amount for a certain line item */