Skip to content
Browse files

Credit card types moved to enrol.html.

  • Loading branch information...
1 parent df12ac1 commit 07af2573542151ee6ec6cb77624d7108b9d4f4eb ethem committed
Showing with 17 additions and 19 deletions.
  1. +17 −13 enrol/authorize/enrol.html
  2. +0 −6 enrol/authorize/enrol.php
View
30 enrol/authorize/enrol.html
@@ -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>
View
6 enrol/authorize/enrol.php
@@ -67,12 +67,6 @@ function print_entry($course) {
}
}
- $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)) {

0 comments on commit 07af257

Please sign in to comment.
Something went wrong with that request. Please try again.