Credit card types moved to enrol.html.

This commit is contained in:
ethem
2005-12-03 11:19:17 +00:00
parent df12ac18e2
commit 07af257354
2 changed files with 17 additions and 19 deletions
+17 -13
View File
@@ -1,4 +1,4 @@
<p align="center"><?php if (!empty($this->ccerrormsg) ) {formerr($this->ccerrormsg);} ?></p>
<p align="center"><?php if (!empty($this->ccerrormsg)) { formerr($this->ccerrormsg); } ?></p>
<div align="center">
@@ -21,21 +21,26 @@
<tr>
<td align="right"><?php print_string("ccexpire", "enrol_authorize") ?>: </td>
<td align="left"><?php
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12,0,0,$i,1,2000), "%B");
}
choose_from_menu($months, 'ccexpiremm', $form->ccexpiremm);
$nowdate = getdate();
$nowyear = $nowdate["year"]-1;
for ($i=$nowyear; $i<=$nowyear+11; $i++) {
$years[$i] = $i;
}
choose_from_menu($years, 'ccexpireyyyy', $form->ccexpireyyyy);
?></td>
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12,0,0,$i,1,2000), "%B");
}
choose_from_menu($months, 'ccexpiremm', $form->ccexpiremm);
$nowdate = getdate();
$nowyear = $nowdate["year"]-1;
for ($i=$nowyear; $i<=$nowyear+11; $i++) {
$years[$i] = $i;
}
choose_from_menu($years, 'ccexpireyyyy', $form->ccexpireyyyy);
?></td>
</tr>
<tr>
<td align="right"><?php print_string("cctype", "enrol_authorize") ?>: </td>
<td align="left"><?php
$CCTYPES = array(
'mcd' => 'Master Card', 'vis' => 'Visa', 'amx' => 'American Express',
'dsc' => 'Discover', 'dnc' => 'Diners Club', 'jcb' => 'JCB',
'swi' => 'Switch', 'dlt' => 'Delta', 'enr' => 'EnRoute'
);
choose_from_menu($CCTYPES, 'cctype', $form->cctype);
?>
</td>
@@ -49,7 +54,6 @@
<td align="right"><?php print_string("zipcode", "enrol_authorize") ?>: </td>
<td align="left"><input type="text" name="cczip" size="5" value="<?php p($form->cczip) ?>" /></td>
</tr>
</table>
<input type="submit" value="<?php print_string("sendpaymentbutton", "enrol_authorize") ?>">
</form>
-6
View File
@@ -67,12 +67,6 @@ class enrolment_plugin extends enrolment_base {
}
}
$CCTYPES = array(
'mcd' => 'Master Card', 'vis' => 'Visa', 'amx' => 'American Express',
'dsc' => 'Discover', 'dnc' => 'Diners Club', 'jcb' => 'JCB',
'swi' => 'Switch', 'dlt' => 'Delta', 'enr' => 'EnRoute'
);
$formvars = array('password','ccfirstname','cclastname','cc','ccexpiremm','ccexpireyyyy','cctype','cvv','cczip');
foreach ($formvars as $var) {
if (!isset($form->$var)) {