コード例 #1
0
    cw_include('addons/estore_gift/wishlist.php');
    $smarty->assign('allow_edit', false);
    $smarty->assign('main', 'friends');
} elseif ($mode == 'giftcert' || $mode == 'preview' || $mode == 'gc2cart' || $mode == 'modify_gc' || $action == 'delgc' || $action == "addgc2wl") {
    cw_include('addons/estore_gift/cert.php');
} elseif ($mode == 'gifts') {
    $access_status =& cw_session_register('access_status', array());
    if (!empty($cc)) {
        cw_include("addons/estore_gift/giftreg_confirm.php");
    }
    if (!empty($eventid)) {
        if (!empty($wlid)) {
            if (cw_query_first_cell("SELECT event_id FROM {$tables['wishlist']} WHERE wishlist_id='{$wild}'") == $eventid) {
                $wlid_eventid =& cw_session_register("wlid_eventid");
                $wlid_eventid = $eventid;
                cw_session_save("wlid_eventid");
            }
        }
        cw_include("addons/estore_gift/event_guestbook.php");
        cw_include("addons/estore_gift/giftreg_display.php");
    } else {
        cw_include("addons/estore_gift/giftreg_search.php");
    }
} elseif ($mode == 'events') {
    if (isset($_GET['event_id'])) {
        cw_include('addons/estore_gift/event.php');
    } else {
        cw_include('addons/estore_gift/events.php');
    }
} else {
    cw_include('addons/estore_gift/wishlist.php');
コード例 #2
0
                    } else {
                        cw_doc_make_relation($relation_doc_id, $rel_item_id, $v['amount']);
                    }
                    cw_doc_recalc($relation_doc_id);
                }
            }
            if ($doc_data['giftcerts'] && is_numeric($relation_doc_id)) {
                cw_doc_make_related_doc($doc_id, $relation_doc_id);
            }
        }
    }
    $secure_oid = $doc_ids;
} else {
    $doc_ids = $secure_oid;
}
cw_session_save();
if ($action == 'request_for_quote') {
    cw_call('cw_doc_change_status', array($doc_ids, "Q"));
    $request = $app_catalogs['customer'] . "/index.php?target=order-message&doc_ids=" . implode(",", $doc_ids);
    $cart = $secure_oid = array();
    cw_save_customer_cart($customer_id, $cart);
    cw_header_location($request);
} else {
    $return = cw_func_call('cw_payment_run_processor', array('payment_data' => $payment_data, 'doc_ids' => $doc_ids, 'userinfo' => $userinfo));
    if ($return && $payment_data['payment_type'] == 'cc') {
        $a = strlen($userinfo['card_cvv2']);
        $return['cvvmes'] = ($a ? $a . " digit(s)" : "not set") . " / ";
    }
    $return = cw_call('cw_payment_check_results', array($return));
    cw_call('cw_payment_stop', array($return));
}
コード例 #3
0
function cw_patch_store_phase_result()
{
    global $patch_phase_results_file, $phase_result;
    $patch_phase_results_file =& cw_session_register("patch_phase_results_file");
    $patch_phase_results_file = cw_patch_store_in_tmp($phase_result);
    if ($patch_phase_results_file !== false) {
        cw_session_save();
        cw_html_location("index.php?target=patch&mode=result", 0);
    } else {
        cw_session_unregister("patch_phase_results_file");
        die("Upgrade/patch process cannot continue:<br />There is a problem saving temporaly data at your server. Please check permissions and/or amount of free space in your TEMP directory.<br /><br /><a href=\"patch.php\">Click here to return</a>");
    }
}
コード例 #4
0
function cw_html_location($url, $time = 3)
{
    global $REQUEST_URI, $REQUEST_METHOD;
    cw_session_save();
    echo "<br /><br />" . cw_get_langvar_by_name("txt_header_note", array("time" => $time, "location" => $url), false, true);
    echo "<meta http-equiv=\"Refresh\" content=\"{$time};URL={$url}\" />";
    cw_track_navigation_history($REQUEST_URI, $REQUEST_METHOD, FALSE);
    cw_flush();
    exit;
}
コード例 #5
0
function cw_payment_stop($payment_data)
{
    global $app_catalogs, $customer_id;
    cw_load('cart_process');
    $cart =& cw_session_register('cart', array());
    $top_message =& cw_session_register('top_message');
    if ($payment_data['bill_error']) {
        $top_message = array('type' => 'E', 'content' => $payment_data['bill_error'] . ' ' . $payment_data['reason']);
        $request = $app_catalogs['customer'] . '/index.php?target=cart&mode=checkout';
    } else {
        $_doc_ids = cw_get_urlencoded_doc_ids($payment_data['doc_ids']);
        $request = $app_catalogs['customer'] . "/index.php?target=order-message&doc_ids=" . $_doc_ids;
        $cart = array();
        cw_session_save();
        cw_save_customer_cart($customer_id, $cart);
    }
    cw_header_location($request);
}