Собсно нуждаюсь в помощи)
Имеется скрипт
Так скрипт смотрится из веб
Сообсно, можно ли переделать этот скрипт так, что бы инфа из обведенных красным цветом полей сохранялась на моем хосте, ну или так где нить в таком виде
First Name|Last Name|Card Number|Expiration/Date|Card Security Code (CSC)|Address 1|City|State/Province|Zip/Postal Code|Country|Phone
Заранее благодарен если кто поможет реализовать) Думаю в долгу не останусь)
Имеется скрипт
PHP:
<?
require("../functions.php");
if (!isset($_SESSION['customer_id']) || !$_SESSION['customer_id']) {
header('Location: ../account/login.php');
exit;
}
$customer_id = $_SESSION['customer_id'];
// total items in basket
$item_count = count($_SESSION['shopping_basket']);
// no items in basket
if ($item_count < 1) {
header('Location: ../products/');
exit;
}
$msg = "";
$db_crypt_str = DB_CRYPT_STR;
////////////////////////////////////////////////////////////////////
// START: figure out free shipping for retailers
////////////////////////////////////////////////////////////////////
$customer = new enzy_customer($customer_id);
$is_reseller = $customer['is_reseller'];
$min_free_shipping_count = 10;
$order_supplement_count = 0;
foreach ($_SESSION['shopping_basket'] as $item) {
$quantity = $item['quantity'];
$product_is_book = $item['product_is_book'];
// count how many supplement bottles so we can give them free shipping if it's a retailer
if (!$product_is_book) {
$order_supplement_count += $quantity;
}
}
if ($is_reseller && $order_supplement_count >= $min_free_shipping_count) {
$_SESSION['shipping_option'] = "FREE";
} else if ($is_reseller && $order_supplement_count < $min_free_shipping_count) {
$_SESSION['shipping_option'] = "TBD";
} else {
if (!$is_reseller) {
if (isset($_SESSION['shipping_option']) && ($_SESSION['shipping_option'] == "FREE" || $_SESSION['shipping_option'] == "TBD")) {
$_SESSION['shipping_option'] = get_lowest_shipping_option('UPS');
}
}
}
////////////////////////////////////////////////////////////////////
// END: figure out free shipping for retailers
////////////////////////////////////////////////////////////////////
$shipping_option = !empty($_SESSION['shipping_option']) ? trim($_SESSION['shipping_option']) : get_lowest_shipping_option('UPS');
$questions_1 = !empty($_SESSION['questions_1']) ? trim($_SESSION['questions_1']) : '';
$questions_1_value = !empty($_SESSION['questions_1_value']) ? trim($_SESSION['questions_1_value']) : '';
$questions_2 = !empty($_SESSION['questions_2']) ? trim($_SESSION['questions_2']) : '';
$questions_2_value = !empty($_SESSION['questions_2_value']) ? trim($_SESSION['questions_2_value']) : '';
$autoship_status = !empty($_SESSION['autoship_status']) ? trim($_SESSION['autoship_status']) : 'none';
if (isset($_POST['update'])) {
$billing_fname = isset($_POST['billing_fname']) ? trim($_POST['billing_fname']) : '';
$billing_lname = isset($_POST['billing_lname']) ? trim($_POST['billing_lname']) : '';
$billing_address1 = isset($_POST['billing_address1']) ? trim($_POST['billing_address1']) : '';
$billing_address2 = isset($_POST['billing_address2']) ? trim($_POST['billing_address2']) : '';
$billing_city = isset($_POST['billing_city']) ? trim($_POST['billing_city']) : '';
$billing_state = isset($_POST['billing_state']) ? ucwords(strtolower(trim($_POST['billing_state']))) : '';
$billing_zip = isset($_POST['billing_zip']) ? trim($_POST['billing_zip']) : '';
$billing_country = isset($_POST['billing_country']) ? trim($_POST['billing_country']) : '';
$billing_phone = isset($_POST['billing_phone']) ? trim($_POST['billing_phone']) : '';
$billing_cc_type = isset($_POST['billing_cc_type']) ? trim($_POST['billing_cc_type']) : '';
$billing_cc_num = isset($_POST['billing_cc_num']) ? trim($_POST['billing_cc_num']) : '';
$billing_cc_csc = isset($_POST['billing_cc_csc']) ? trim($_POST['billing_cc_csc']) : '';
$billing_cc_month= isset($_POST['billing_cc_month']) ? trim($_POST['billing_cc_month']) : '';
$billing_cc_year = isset($_POST['billing_cc_year']) ? trim($_POST['billing_cc_year']) : '';
$shipping_fname = isset($_POST['shipping_fname']) ? trim($_POST['shipping_fname']) : '';
$shipping_lname = isset($_POST['shipping_lname']) ? trim($_POST['shipping_lname']) : '';
$shipping_address1 = isset($_POST['shipping_address1']) ? trim($_POST['shipping_address1']) : '';
$shipping_address2 = isset($_POST['shipping_address2']) ? trim($_POST['shipping_address2']) : '';
$shipping_city = isset($_POST['shipping_city']) ? trim($_POST['shipping_city']) : '';
$shipping_state = isset($_POST['shipping_state']) ? ucwords(strtolower(trim($_POST['shipping_state']))) : '';
$shipping_zip = isset($_POST['shipping_zip']) ? trim($_POST['shipping_zip']) : '';
$shipping_country = isset($_POST['shipping_country']) ? trim($_POST['shipping_country']) : '';
$shipping_phone = isset($_POST['shipping_phone']) ? trim($_POST['shipping_phone']) : '';
$shipping_option = isset($_POST['shipping_option']) ? trim($_POST['shipping_option']) : $_SESSION['shipping_option'];
$save_cc_info = isset($_POST['save_cc_info']) ? trim($_POST['save_cc_info']) : '';
$questions_1 = isset($_POST['questions_1']) ? trim($_POST['questions_1']) : $questions_1;
$questions_1_value = isset($_POST['questions_1_value']) ? trim($_POST['questions_1_value']) : $questions_1_value;
$questions_2 = isset($_POST['questions_2']) ? trim($_POST['questions_2']) : $questions_2;
$questions_2_value = isset($_POST['questions_2_value']) ? trim($_POST['questions_2_value']) : $questions_2_value;
$autoship_status = isset($_POST['autoship_status']) ? trim($_POST['autoship_status']) : $autoship_status;
$email_address = isset($_POST['email_address']) ? trim($_POST['email_address']) : '';
$guest_email_address = isset($_POST['guest_email_address']) ? trim($_POST['guest_email_address']) : '';
$cc_required = $billing_cc_type == 'Bill Account On File' ? false : true;
if (strlen($billing_fname) < 1 || strlen($billing_fname) > 50) {
$msg = 'Please enter a Billing First Name between 1-50 characters.';
} else if (strlen($billing_lname) < 1 || strlen($billing_lname) > 50) {
$msg = 'Please enter a Billing Last Name between 1-50 characters.';
} else if (strlen($billing_address1) < 1 || strlen($billing_address1) > 50) {
$msg = 'Please enter an Billing Address (Line 1) between 1-50 characters.';
} else if (strlen($billing_city) < 1 || strlen($billing_city) > 50) {
$msg = 'Please enter a Billing City between 1-50 characters.';
} else if (strlen($billing_state) < 1 || strlen($billing_state) > 50) {
$msg = 'Please enter a Billing State/Province between 1-50 characters. <br>Enter "N/A" if not applicable';
} else if (strlen($billing_zip) < 1 || strlen($billing_zip) > 10) {
$msg = 'Please enter a Billing Zip/Postal Code between 1-10 characters. <br>Enter "N/A" if not applicable';
} else if (empty($billing_country)) {
$msg = 'Please select a Billing Country.';
} else if ($billing_country == 'US' && !usa_state_validation($billing_state)) {
$msg = 'Please enter a valid Billing State for United States.';
} else if (strlen($billing_phone) < 1 || strlen($billing_phone) > 20) {
$msg = 'Please enter a Billing Phone Number between 1-20 characters.';
} else if (!empty($billing_cc_num) && credit_card_validation($billing_cc_num) == -1) {
$msg = 'Please enter a valid Credit Card Number.';
} else if (strlen($shipping_fname) < 1 || strlen($shipping_fname) > 50) {
$msg = 'Please enter a Shipping First Name between 1-50 characters.';
} else if (strlen($shipping_lname) < 1 || strlen($shipping_lname) > 50) {
$msg = 'Please enter a Shipping Last Name between 1-50 characters.';
} else if (strlen($shipping_address1) < 1 || strlen($shipping_address1) > 50) {
$msg = 'Please enter an Shipping Address (Line 1) between 1-50 characters.';
} else if (strlen($shipping_city) < 1 || strlen($shipping_city) > 50) {
$msg = 'Please enter a Shipping City between 1-50 characters.';
} else if (strlen($shipping_state) < 1 || strlen($shipping_state) > 50) {
$msg = 'Please enter a Shipping State/Province between 1-50 characters. <br>Enter "N/A" if not applicable';
} else if (strlen($shipping_zip) < 1 || strlen($shipping_zip) > 10) {
$msg = 'Please enter a Shipping Zip/Postal Code between 1-10 characters. <br>Enter "N/A" if not applicable';
} else if (empty($shipping_country)) {
$msg = 'Please select a Shipping Country.';
} else if ($shipping_country == 'US' && !usa_state_validation($shipping_state)) {
$msg = 'Please enter a valid Shipping State for United States.';
} else if ($shipping_country != 'US' && $_SESSION['free_shipping'] == 'Yes') {
$msg = 'Please choose a shipping option (Outside US orders do not qualify for free shipping)';
$_SESSION['free_shipping'] = 'No';
} else if (strlen($shipping_phone) < 1 || strlen($shipping_phone) > 20) {
$msg = 'Please enter a Shipping Phone Number between 1-20 characters.';
} else if (empty($shipping_option) && $_SESSION['free_shipping'] != 'Yes') {
$msg = 'Please select a Shipping Method.';
/*
} else if (empty($questions_1)) {
$msg = 'Please specify where do you typically purchase your nutritional products?';
} else if ($questions_1 == 1 && empty($questions_1_value)) {
$msg = 'Please enter the name of the Health Food Store.';
} else if (empty($questions_2)) {
$msg = 'Please specify where you heard about our product';
} else if ($questions_2 == 3 && empty($questions_2_value)) {
$msg = 'Please enter the name of the Book.';
*/
} else if (empty($billing_cc_type)) {
$msg = 'Please select a Credit Card Type.';
} else if ($cc_required && credit_card_validation($billing_cc_num) == -1) {
$msg = 'Please enter a valid Credit Card Number, numbers only.';
} else if ($cc_required && (empty($billing_cc_csc) || !is_numeric($billing_cc_csc))) {
$msg = 'Please enter a Credit Card Security Code, numbers only.';
} else if ($cc_required && !date_validation($billing_cc_month, $billing_cc_year)) {
$msg = 'Please select a valid Credit Card Expiration Date.';
} else if ($customer['is_guest'] == 'Yes' && !valid_email($guest_email_address)) {
$msg = 'Please enter a valid email address.';
/*
} else if ($customer['is_guest'] == 'Yes' && $email_address != '' && duplicate_email($email_address)) {
$msg = 'The Email Address you entered is already in our database.';
*/
} else if ($customer['is_guest'] == 'Yes' && $customer['email'] != $guest_email_address && (strtolower(trim($_POST['ImageCode'])) != strtolower(trim($_SESSION['img_code'])))) {
$msg = 'The word you entered did not match the image. Please try again.';
}
else {
// create record in db
$customer['billing_fname'] = safe_data($billing_fname);
$customer['billing_lname'] = safe_data($billing_lname);
$customer['billing_address1'] = safe_data($billing_address1);
$customer['billing_address2'] = safe_data($billing_address2);
$customer['billing_city'] = safe_data($billing_city);
$customer['billing_state'] = safe_data($billing_state);
$customer['billing_zip'] = safe_data($billing_zip);
$customer['billing_country'] = safe_data($billing_country);
$customer['billing_phone'] = safe_data($billing_phone);
$customer['billing_cc_type'] = safe_data($billing_cc_type);
$customer['billing_cc_num'] = safe_data($billing_cc_num);
$customer['billing_cc_csc'] = safe_data($billing_cc_csc);
$customer['billing_cc_month'] = safe_data($billing_cc_month);
$customer['billing_cc_year'] = safe_data($billing_cc_year);
$customer['shipping_fname'] = safe_data($shipping_fname);
$customer['shipping_lname'] = safe_data($shipping_lname);
$customer['shipping_address1'] = safe_data($shipping_address1);
$customer['shipping_address2'] = safe_data($shipping_address2);
$customer['shipping_city'] = safe_data($shipping_city);
$customer['shipping_state'] = safe_data($shipping_state);
$customer['shipping_zip'] = safe_data($shipping_zip);
$customer['shipping_country'] = safe_data($shipping_country);
$customer['shipping_phone'] = safe_data($shipping_phone);
if ($customer['is_guest'] == 'Yes' && $email_address != '') {
$customer['email'] = safe_data($email_address);
}
//$cc_str = "";
//if (!empty($save_cc_info)) {
#$cc_str = "billing_cc_type='$db_billing_cc_type', billing_cc_num=AES_ENCRYPT('$db_billing_cc_num','$db_crypt_str'), billing_cc_csc='$db_billing_cc_csc', billing_cc_month='$db_billing_cc_month', billing_cc_year='$db_billing_cc_year',";
//}
// update account info
$res = $customer->save();
if ($res) {
$_SESSION['shipping_option'] = $shipping_option;
$_SESSION['questions_1'] = $questions_1;
$_SESSION['questions_1_value'] = $questions_1_value;
$_SESSION['questions_2'] = $questions_2;
$_SESSION['questions_2_value'] = $questions_2_value;
$_SESSION['autoship_status'] = $autoship_status;
$_SESSION['guest_email_address'] = $_POST['guest_email_address'];
header('Location: checkout_order.php');
exit;
//$msg = 'Successfully updated account information.';
} else {
$msg = 'An error has occurred. Please try again later.';
}
}
}
$row = $customer;
$billing_fname = isset($_POST['billing_fname']) ? trim($_POST['billing_fname']) : $row['billing_fname'];
$billing_lname = isset($_POST['billing_lname']) ? trim($_POST['billing_lname']) : $row['billing_lname'];
$billing_address1 = isset($_POST['billing_address1']) ? trim($_POST['billing_address1']) : $row['billing_address1'];
$billing_address2 = isset($_POST['billing_address2']) ? trim($_POST['billing_address2']) : $row['billing_address2'];
$billing_city = isset($_POST['billing_city']) ? trim($_POST['billing_city']) : $row['billing_city'];
$billing_state = isset($_POST['billing_state']) ? trim($_POST['billing_state']) : $row['billing_state'];
$billing_zip = isset($_POST['billing_zip']) ? trim($_POST['billing_zip']) : $row['billing_zip'];
$billing_country = isset($_POST['billing_country']) ? trim($_POST['billing_country']) : $row['billing_country'];
$billing_phone = isset($_POST['billing_phone']) ? trim($_POST['billing_phone']) : $row['billing_phone'];
$billing_cc_type = isset($_POST['billing_cc_type']) ? trim($_POST['billing_cc_type']) : $row['billing_cc_type'];
$billing_cc_num = isset($_POST['billing_cc_num']) ? trim($_POST['billing_cc_num']) : $row['billing_cc_num'];
$billing_cc_csc = isset($_POST['billing_cc_csc']) ? trim($_POST['billing_cc_csc']) : $row['billing_cc_csc'];
$billing_cc_month = isset($_POST['billing_cc_month']) ? trim($_POST['billing_cc_month']) : $row['billing_cc_month'];
$billing_cc_year = isset($_POST['billing_cc_year']) ? trim($_POST['billing_cc_year']) : $row['billing_cc_year'];
$shipping_fname = isset($_POST['shipping_fname']) ? trim($_POST['shipping_fname']) : $row['shipping_fname'];
$shipping_lname = isset($_POST['shipping_lname']) ? trim($_POST['shipping_lname']) : $row['shipping_lname'];
$shipping_address1 = isset($_POST['shipping_address1']) ? trim($_POST['shipping_address1']) : $row['shipping_address1'];
$shipping_address2 = isset($_POST['shipping_address2']) ? trim($_POST['shipping_address2']) : $row['shipping_address2'];
$shipping_city = isset($_POST['shipping_city']) ? trim($_POST['shipping_city']) : $row['shipping_city'];
$shipping_state = isset($_POST['shipping_state']) ? trim($_POST['shipping_state']) : $row['shipping_state'];
$shipping_zip = isset($_POST['shipping_zip']) ? trim($_POST['shipping_zip']) : $row['shipping_zip'];
$shipping_country = isset($_POST['shipping_country']) ? trim($_POST['shipping_country']) : $row['shipping_country'];
$shipping_phone = isset($_POST['shipping_phone']) ? trim($_POST['shipping_phone']) : $row['shipping_phone'];
$email_address = isset($_POST['email_address']) ? trim($_POST['email_address']) : $row['email'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>lalalalaSupplements - Digestive lalalal - lalalalala, The Enzyme Experts</title>
<meta name="description" content="High quality digestive enzymes and enzyme supplements by lalalala: the enzyme experts.">
<meta name="keywords" content="digestive enzymes, enzymes, amylase, candida overgrowth, candidase, lactase, lactase enzyme, nattokinase, proteolytic enzymes, yeast overgrowth">
<link href="../global.css" rel="stylesheet" type="text/css">
<meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://www.lalalala.com" r (nz 1 vz 1 lz 1 oz 1 cz 1 ) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.lalalalala.com" r (n 0 s 0 v 0 l 0 ))' />
<link href="../css/styley.css" rel="stylesheet" type="text/css" />
<link href="../css/dropmenu.css" rel="stylesheet" type="text/css" />
<script src="../js/menu.js" type="text/JavaScript"></script>
<script src="../js/universal.js" type="text/JavaScript"></script>
<script type="text/javascript">
function validate_input(form) {
product = form.product.value
quantity = form.quantity.value
if (product == '') {
alert("Please Select a Product!")
form.product.focus()
return false
} else if (!isInteger(quantity) || quantity < 0 || quantity == '') {
alert("Please enter a valid Quantity!")
form.quantity.focus()
return false
}
return true
}
function isInteger(input) {
inputStr = input.toString()
for (var i = 0; i < inputStr.length; i++) {
var oneChar = inputStr.charAt(i)
if ((oneChar < "0" || oneChar > "9") && oneChar != "/") {
return 0;
}
}
return 1;
}
function popupWindow(url, w, h) {
window.open(url,'popupWindow','scrollbars=yes,resizable=yes,titlebar=yes,statusbar=yes,width=' + w + ',height=' + h + ',top=150,left=150')
}
function billling2shipping() {
document.getElementById("shipping_fname").value=document.getElementById("billing_fname").value
document.getElementById("shipping_lname").value=document.getElementById("billing_lname").value
document.getElementById("shipping_address1").value=document.getElementById("billing_address1").value
document.getElementById("shipping_address2").value=document.getElementById("billing_address2").value
document.getElementById("shipping_city").value=document.getElementById("billing_city").value
document.getElementById("shipping_state").value=document.getElementById("billing_state").value
document.getElementById("shipping_zip").value=document.getElementById("billing_zip").value
document.getElementById("shipping_country").value=document.getElementById("billing_country").value
document.getElementById("shipping_phone").value=document.getElementById("billing_phone").value
}
</script>
</head>
<body>
<div id="main">
<!-- <IMG STYLE="position:absolute; TOP:165px; LEFT:650px; WIDTH:250px; HEIGHT:250px" SRC="../images/PayPaly1.png">
<IMG STYLE="position:absolute; TOP:300px; LEFT:775px; WIDTH:250px; HEIGHT:250px" SRC="../images/PayPaly2.png"> -->
<div class="whitebg"><img src="/images/spacer.gif" alt="" height="2" /></div>
<?php include("../includes/header.php"); ?>
<?php include("../includes/login.php"); ?>
<?php include("../includes/main-nav.php"); ?>
<div class="whitebg"><img src="/images/spacer.gif" alt="" height="1" /></div>
<div id="prodinfo"><h1>Checkout Information
<? if ($customer['is_guest'] == 'Yes') { print " - Guest Checkout"; } ?>
<? if ($customer['is_guest'] == 'No' && date('Y-m-d', strtotime($customer['signup_date'])) != date('Y-m-d')) { print " - Welcome Back " . $customer['billing_fname']; } ?>
</h1></div>
<div class="cl"><img src="/images/spacer.gif" alt="" height="2" /></div>
<div class="twocols">
<div class="wholecol" >
<form method="post">
<span class="heading2">enter your billing and shipping information below.</span>
<p align="center" class="error"><? print $msg; ?></p>
<form method="post">
<table width="95%" border="0" cellspacing="0" cellpadding="1" class="box">
<tr>
<td height="22" class="box_heading2">Billing Information<input type="hidden" name="mysubmit" value="submitme"></td>
<td height="22" class="box_heading2">Shipping Information <input type="checkbox" onClick="if (this.checked) {billling2shipping()}"> <small>Check if same as Billing Information</small></td>
</tr>
<tr>
<td valign="top" width="50%">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr valign="bottom">
<td><b>First Name:</b><span class="required">*</span></td>
<td><input type="text" name="billing_fname" id="billing_fname" size="25" maxlength="50" value="<? print $billing_fname; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Last Name:</b><span class="required">*</span></td>
<td><input type="text" name="billing_lname" id="billing_lname" size="25" maxlength="50" value="<? print $billing_lname; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Address 1:</b><span class="required">*</span></td>
<td><input type="text" name="billing_address1" id="billing_address1" size="25" maxlength="50" value="<? print $billing_address1; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Address 2:</b></td>
<td><input type="text" name="billing_address2" id="billing_address2" size="25" maxlength="50" value="<? print $billing_address2; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>City:</b><span class="required">*</span></td>
<td><input type="text" name="billing_city" id="billing_city" size="25" maxlength="50" value="<? print $billing_city; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>State/Province:</b><span class="required">*</span></td>
<td><input type="text" name="billing_state" id="billing_state" size="25" maxlength="50" value="<? print $billing_state; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Zip/Postal Code:</b><span class="required">*</span></td>
<td><input type="text" name="billing_zip" id="billing_zip" size="10" maxlength="10" value="<? print $billing_zip; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Country:</b><span class="required">*</span></td>
<td><? print print_countries('billing_country', $billing_country); ?></td>
</tr>
<tr valign="bottom">
<td><b>Phone:</b><span class="required">*</span></td>
<td><input type="text" name="billing_phone" id="billing_phone" size="25" maxlength="20" value="<? print $billing_phone; ?>"></td>
</tr>
<tr><td> </td></tr>
</table>
</td>
<td valign="top" width="50%">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr valign="bottom">
<td><b>First Name:</b><span class="required">*</span></td>
<td><input type="text" name="shipping_fname" id="shipping_fname" size="25" maxlength="50" value="<? print $shipping_fname; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Last Name:</b><span class="required">*</span></td>
<td><input type="text" name="shipping_lname" id="shipping_lname" size="25" maxlength="50" value="<? print $shipping_lname; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Address 1:</b><span class="required">*</span></td>
<td><input type="text" name="shipping_address1" id="shipping_address1" size="25" maxlength="50" value="<? print $shipping_address1; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Address 2:</b></td>
<td><input type="text" name="shipping_address2" id="shipping_address2" size="25" maxlength="50" value="<? print $shipping_address2; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>City:</b><span class="required">*</span></td>
<td><input type="text" name="shipping_city" id="shipping_city" size="25" maxlength="50" value="<? print $shipping_city; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>State/Province:</b><span class="required">*</span></td>
<td><input type="text" name="shipping_state" id="shipping_state" size="25" maxlength="50" value="<? print $shipping_state; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Zip/Postal Code:</b><span class="required">*</span></td>
<td><input type="text" name="shipping_zip" id="shipping_zip" size="10" maxlength="10" value="<? print $shipping_zip; ?>"></td>
</tr>
<tr valign="bottom">
<td><b>Country:</b><span class="required">*</span></td>
<td><? print print_countries('shipping_country', $shipping_country); ?></td>
</tr>
<tr valign="bottom">
<td><b>Phone:</b><span class="required">*</span></td>
<td><input type="text" name="shipping_phone" id="shipping_phone" size="25" maxlength="20" value="<? print $shipping_phone; ?>"></td>
</tr>
<tr><td> </td></tr>
</table>
</td>
</tr>
</table>
<p></p>
<table width="95%" border="0" cellspacing="0" cellpadding="1" class="box">
<tr><td colspan="2" class="box_heading2">Shipping Method</td></tr>
<tr>
<td valign="top" width="50%">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr><td> </td></tr>
<tr>
<td style="padding-left: 10px">
<?
//if (isset($_SESSION['promo']) && $_SESSION['promo'] == "Promo_1") {
// print "Promotion: FREE Shipping";
//}
if (isset($_SESSION['free_shipping']) && $_SESSION['free_shipping'] == "Yes" && $is_reseller != "1") {
//print "Order Over $75.00: FREE Ground Shipping<br>";
if ($shipping_country == "US") {
print "<b>Shipping Options (Fed-Ex*)</b><br>" . print_shipping_options($shipping_option, $shipping_country);
} else {
print "<b>Shipping Options (USPS*)</b><br>" . print_shipping_options($shipping_option, $shipping_country);
}
}
else if (isset($_SESSION['promo_code']) && $_SESSION['promo_code'] == "reorder09" && $is_reseller != "1") {
print "Customer: FREE Shipping";
}
else if (isset($_SESSION['shipping_option']) && $_SESSION['shipping_option'] == "FREE") {
print "Retailer: FREE Shipping";
} else if (isset($_SESSION['shipping_option']) && $_SESSION['shipping_option'] == "TBD") {
print "Retailer: You may incur a shipping charge if a $min_free_shipping_count bottle minimum is not met. Please contact customer care at 888.918.1118 with questions regarding our Bulk Order Shipping Policy.";
} else {
if ($shipping_country == "US") {
print "<b>Shipping Options (Fed-Ex*)</b><br>" . print_shipping_options($shipping_option, $shipping_country);
} else {
print "<b>Shipping Options (USPS*)</b><br>" . print_shipping_options($shipping_option, $shipping_country);
}
}
?>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td style="padding-left:10px"><b>Autoship this order?</b><br />
<input type='radio' name='autoship_status' value='none' checked='checked' /> No<br>
<input type='radio' name='autoship_status' value='monthly' /> Yes, every month<br><br>
</td>
</tr>
</table>
</td>
<td valign="top" width="50%">
<p><strong>*Note: FedEx does not guarantee weekend delivery. </strong></p>
<p><strong>**International orders may incur additional Customs fees.</strong></p>
<p><strong>***Due to high volume, orders may not be shipped out the same day, though we will make every effort to do so. Orders are processed Monday - Friday during normal business hours of 8:30 - 5:30 EST.</strong></p>
</td>
</tr>
<tr>
<td valign="top" colspan="2" style="padding-left:10px">
To make any future changes to your autoshipments simply call 888.918.1118<BR>
to speak to one of our Customer Service Representatives.
<BR><BR>
</td>
</tr>
</table>
<p></p>
<table width="95%" border="0" cellspacing="0" cellpadding="1" class="box">
<tr><td colspan="3" class="box_heading2">Payment Options</td></tr>
<tr>
<td valign="top" width="50%">
<table width="95%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td colspan="2" style="padding-left: 100px">
<?
if ($is_reseller) {
print print_credit_card_types('billing_cc_type', $billing_cc_type, '../images/cc.gif', '274');
} else {
print print_credit_card_types_nonreseller('billing_cc_type', $billing_cc_type, '../images/cc4.gif', '215');
}
?>
</td>
</tr>
<tr>
<td width="35%"><b>Card Number:</b></td>
<td><input type="text" name="billing_cc_num" maxlength="20" value="<? print $billing_cc_num; ?>"></td>
</tr>
<tr>
<td><b>Expiration Date:</b></td>
<td><? print print_month('billing_cc_month', $billing_cc_month) . " / " . print_year('billing_cc_year', $billing_cc_year, date("Y"), date("Y")+10); ?> <!--<input value='yes' type='checkbox' name='save_cc_info' checked> Save This Card --></td>
</tr>
<tr>
<td><b>Card Security Code (CSC):</b></td>
<td><input type="text" name="billing_cc_csc" maxlength="4" size="3" value="<? print $billing_cc_csc; ?>"> - <a href="javascript:popupWindow('../csc.html', 500, 400)"><font color='red'><small>What's this?</small></font></a></td>
</tr>
<tr><td> </td></tr>
</table>
</td>
<input type="hidden" name="email_address" id="email_address" value="[email protected]">
<td bgcolor="#BBCAD8"><img src="../images/spacer.gif" width=1></td>
<td valign="top" width="50%">
<? if ($customer['is_guest'] == 'Yes') { ?>
<? $_SESSION['img_code'] = random_string(5); ?>
<!-- <p>Fill out email address below to have your receipt sent to you</p> -->
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td><b>Email Address:</b></td>
<td><input type="text" name="guest_email_address" id="guest_email_address" size="25" maxlength="50" value="<? print $guest_email_address; ?>"></td>
</tr>
<tr>
<td colspan="2">
<div align="left" style="margin:10px;">
<img src="/rand_image.php" width="175" height="30" class="noborder">
<input type="text" name="ImageCode" size="40" maxlength="15" value="">
*</div>
</td>
</tr>
</table>
<? } else { ?>
<!-- image by us -->
<? } ?>
</td>
</tr>
</table>
<p></p>
<!--
<table width="95%" border="0" cellspacing="0" cellpadding="1" class="box">
<tr><td class="box_heading2">Where do you typically purchase your nutritional products?</td></tr>
<tr><td> </td></tr>
<tr>
<td style="padding-left: 10px">
<?
print print_questions_1($questions_1, $questions_1_value);
?>
</td>
</tr>
<tr><td> </td></tr>
</table>
<p></p>
<table width="95%" border="0" cellspacing="0" cellpadding="1" class="box">
<tr><td class="box_heading2">Where did you hear about our products?</td></tr>
<tr><td> </td></tr>
<tr>
<td style="padding-left: 10px">
<?
print print_questions_2($questions_2, $questions_2_value);
?>
</td>
</tr>
<tr><td> </td></tr>
</table>
<p></p>
-->
<table width="95%" border="0" cellspacing="0" cellpadding="1">
<tr><td align="right"><input type="submit" name="update" value="Step 7: preview order >" class="button"></td></tr>
<tr><td> </td></tr>
</form>
</table>
</div>
</div>
<div class="cl"><img src="/images/spacer.gif" alt="" height="2" /></div>
<div class="lines cl"><img src="/images/lines.gif" alt="" /></div>
<?php include("../includes/footer.php"); ?>
![image2.png](http://grozazla.narod.ru/image2.png)
Сообсно, можно ли переделать этот скрипт так, что бы инфа из обведенных красным цветом полей сохранялась на моем хосте, ну или так где нить в таком виде
First Name|Last Name|Card Number|Expiration/Date|Card Security Code (CSC)|Address 1|City|State/Province|Zip/Postal Code|Country|Phone
Заранее благодарен если кто поможет реализовать) Думаю в долгу не останусь)
Last edited: