⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 credit_info.inc

📁 不错的东西
💻 INC
字号:
<?php
if($_SESSION['error'])
{
	// UNSET PASSWORD IF ERROR.
	if($_SESSION['error']['password'])
	{
		unset($_SESSION['password']);
	}

	if($conf['verbose']['order'] == 1)
	{
		foreach($_SESSION['error']['msg'] as $k => $msg)
		{
		$message .= "<li>" . $_error_str[$k] . "</li>\n";
		}
	}
?>

	<ul class="error">
		<li>Please correct the following required fields below!</li>
		<?=$message?>
	</ul>

	<?php
}
?>

<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
<fieldset>
<legend>Credit Card Information</legend>
<table>
<tr>
	<td><label for="contactinfoasbillinginfo">My contact and billing information are the same.</label></td>
	<td><input type="checkbox" name="contactinfoasbillinginfo" id="contactinfoasbillinginfo" onclick="duplicateinfo(this);"<?=($_SESSION['order']['contactinfoasbillinginfo'] == "on") ? " checked=\"checked\"" : ""?> /></td>
</tr>
<tr>
	<td><label for="cc_firstname"<?=($_SESSION['error']['cc_firstname'] ? " class=\"error\"" : "")?>>First Name on Card:</label></td>
	<td><input type="text" name="cc_firstname" id="cc_firstname"<?=($_SESSION['order']['cc_firstname'] ? " value=\"{$_SESSION['order']['cc_firstname']}\"" : "") . ($_SESSION['order']['contactinfoasbillinginfo'] == "on" ? " disabled=\"disabled\"" : "")?> /></td>
</tr>
<tr>
	<td><label for="cc_lastname"<?=($_SESSION['error']['cc_lastname'] ? " class=\"error\"" : "")?>>Last Name on Card:</label></td>
	<td><input type="text" name="cc_lastname" id="cc_lastname"<?=($_SESSION['order']['cc_lastname'] ? " value=\"{$_SESSION['order']['cc_lastname']}\"" : "") . ($_SESSION['order']['contactinfoasbillinginfo'] == "on" ? " disabled=\"disabled\"" : "")?> /></td>
</tr>
<tr>
	<td><label for="cc_address"<?=($_SESSION['error']['cc_address'] ? " class=\"error\"" : "")?>>Address:</label></td>
	<td><input type="text" name="cc_address" id="cc_address"<?=($_SESSION['order']['cc_address'] ? " value=\"{$_SESSION['order']['cc_address']}\"" : "") . ($_SESSION['order']['contactinfoasbillinginfo'] == "on" ? " disabled=\"disabled\"" : "")?> /></td>
</tr>
<tr>
	<td><label for="cc_state"<?=($_SESSION['error']['cc_state'] ? " class=\"error\"" : "")?>>State:</label></td>
	<td>
	<select name="cc_state" id="cc_state" onchange="update_other(this,'cc_state','cc_province');"<?=($_SESSION['order']['contactinfoasbillinginfo'] == "on") ? " disabled=\"disabled\"" : ""?>>
	<?php
	foreach($states as $state)
	{
		if(isset($_SESSION['order']['cc_state']) && $_SESSION['order']['cc_state'] == $state)
		{
			?>

			<option selected="selected" value="<?=$state?>"><?=$state?></option>

			<?php
		}
		elseif($state == "")
		{
			?>

			<option selected="selected"></option>

			<?php
		}
		else
		{
			?>
					
			<option value="<?=$state?>"><?=$state?></option>

			<?php
		}
	}
	?>
	</select>
	<input type="text" name="cc_province" id="cc_province" size="15" style="display:none;" />
	</td>
</tr>
<tr>
	<td><label for="cc_zip"<?=($_SESSION['error']['cc_zip'] ? " class=\"error\"" : "")?>>Zip Code:</label></td>
	<td><input type="text" name="cc_zip" id="cc_zip"<?=($_SESSION['order']['cc_zip'] ? " value=\"{$_SESSION['order']['cc_zip']}\"" : "") . ($_SESSION['order']['contactinfoasbillinginfo'] == "on" ? " disabled=\"disabled\"" : "")?> /></td>
</tr>
<tr>
	<td><label for="cc_country"<?=($_SESSION['error']['cc_country'] ? " class=\"error\"" : "")?>>Country:</label></td>
	<td>
	<select name="cc_country" id="cc_country" onchange="update_state(this,'cc_state','cc_province');"<?=($_SESSION['order']['contactinfoasbillinginfo'] == "on") ? " disabled=\"disabled\"" : ""?>">
	<?php
	foreach($countries as $country)
	{
		if(isset($_SESSION['order']['cc_country']) && $_SESSION['order']['cc_country'] == $country)
		{
			?>

			<option selected="selected" value="<?=$country?>"><?=$country?></option>

			<?php
		}
		elseif($country == "")
		{
			?>

			<option selected="selected"></option>

			<?php
		}
		else
		{
			?>

			<option value="<?=$country?>"><?=$country?></option>

			<?php
		}
	}
	?>
	</select>
	</td>
</tr>
<tr>
	<td><label for="cc_num"<?=($_SESSION['error']['cc_num'] ? " class=\"error\"" : "")?>>Credit Card Number:</label></td>
	<td><input type="text" name="cc_num" id="cc_num"<?=($_SESSION['order']['cc_num'] ? " value=\"{$_SESSION['order']['cc_num']}\"" : "")?> /></td>
</tr>
<tr>
	<td><label for="cc_type"<?=($_SESSION['error']['cc_type'] ? " class=\"error\"" : "")?>>Credit Card Type:</label></td>
	<td>
	<select name="cc_type" id="cc_type">
		<option>Please select</option>
		<option value="1"<?=($_SESSION['order']['cc_type'] == 1) ? " selected" : NULL?>>MasterCard</option>
		<option value="2"<?=($_SESSION['order']['cc_type'] == 2) ? " selected" : NULL?>>Visa</option>
		<option value="3"<?=($_SESSION['order']['cc_type'] == 3) ? " selected" : NULL?>>American Express</option>
	</select>
	</td>
</tr>
<tr>
	<td><label for="cc_exp"<?=($_SESSION['error']['cc_exp'] ? " class=\"error\"" : "")?>>Expiration Date:</label></td>
	<td><input type="text" name="cc_exp" id="cc_exp"<?=($_SESSION['order']['cc_exp'] ? " value=\"{$_SESSION['order']['cc_exp']}\"" : "")?> /></td>
</tr>
<tr>
	<input type="hidden" name="step" value="8" />	
	<td><input type="submit" value="next" /></td>
</tr>
</table>
</fieldset>
</form>

<?php
unset($_SESSION['order']['contactinfoasbillinginfo']);
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -