function print_suggs_elem( $suggs, $index, $text_input_idx ) { echo "suggs[$text_input_idx][$index] = ["; foreach( $suggs as $key=>$val ) { if( $val ) { echo "'" . escape_quote( $val ) . "'"; if ( $key+1 < count( $suggs )) { echo ", "; } } } echo "];\n"; }
function error_handler($err) { echo "error = '" . escape_quote($err) . "';\n"; }
# DEFINED VARIABLE # ---------------------------------------------------------------------- */ $set_fulfilment_date = date("Y-m-d H:i:s"); $get_order_id = get_order_detail_by_number($order_number); $order_detail = get_order_detail($get_order_id['order_id']); $order_item = order_item($order_detail['order_id']); $data_header_method = $_POST['order_payment_method']; $data_header_name = escape_quote($_POST['order_confirm_name']); $data_header_amount = clean_price($_POST['order_confirm_amount']); $data_purchase_amount = $_POST['hidden_total_purchase']; $data_shipping = $_POST['hidden_order_shipping_amount']; $data_order_id = $_POST['hidden_order_id']; $ship_address = ltrim(escape_quote($_POST['order_shipping_address'])); $ship_country = $_POST['order_shipping_country']; $ship_province = $_POST['order_shipping_province']; $ship_city = $_POST['order_shipping_city']; /* # ---------------------------------------------------------------------- # CALL FUNCTION # ---------------------------------------------------------------------- */ $courier = get_shipping($_POST['hidden_order_shipping_method'], 'Active'); $courier_rate = get_shipping_rate($courier['courier_id'], $ship_province, $ship_city); $data_shipping = ceil($_POST['hidden_total_weight'] / $courier_rate['courier_weight']) * $courier_rate['courier_rate']; $data_total = $data_purchase_amount + $data_shipping;
} } // END ISSET /* # ---------------------------------------------------------------------- # GENERAL # ---------------------------------------------------------------------- */ /* --- DEFINE VARIABLE --- */ $url = $_POST['url']; $title = escape_quote($_POST['website_title']); $description = escape_quote($_POST['website_description']); $keywords = escape_quote($_POST['website_keywords']); $analytics = $_POST['google_analytics']; $phone = $_POST['company_phone']; $address = escape_quote($_POST['company_address']); $country = $_POST['company_country']; $province = $_POST['company_province']; $city = $_POST['company_city']; $postal = $_POST['company_postal_code']; $facebook = $_POST['company_facebook']; $twitter = $_POST['company_twitter']; $instagram = $_POST['company_instagram']; $currency = $_POST['currency_rate']; /* --- LOGO --- */ if (!empty($_FILES['color_image']['name'])) { $image_name = substr($_FILES['color_image']['name'], 0, -4); $image_type = substr($_FILES['color_image']['name'], -4); $uploads_dir = 'files/common/'; $userfile_name = cleanurl(str_replace(array('(', ')', ' '), '_', $image_name)) . $image_type; $userfile_tmp = $_FILES['color_image']['tmp_name'];