Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6b1d27020d
Fetching contributors…

Cannot retrieve contributors at this time

executable file 219 lines (184 sloc) 8.92 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
<?php // $Id$

if (!isset($frm->enrol_cost)) $frm->enrol_cost = '5';
if (!isset($frm->enrol_currency)) $frm->enrol_currency = 'USD';
if (!isset($frm->enrol_mailstudents)) $frm->enrol_mailstudents = '';
if (!isset($frm->enrol_mailteachers)) $frm->enrol_mailteachers = '';
if (!isset($frm->enrol_mailadmins)) $frm->enrol_mailadmins = '';

if (!isset($frm->an_login)) $frm->an_login = '';
if (!isset($frm->an_tran_key)) $frm->an_tran_key = '';
if (!isset($frm->an_password)) $frm->an_password = '';
if (!isset($frm->delete_current)) $frm->delete_current = '';
if (!isset($frm->an_referer)) $frm->an_referer = 'http://';
if (!isset($frm->an_avs)) $frm->an_avs = '';
if (!isset($frm->an_test)) $frm->an_test = '';
if (!isset($frm->an_review)) $frm->an_review = '';
if (!isset($frm->an_capture_day)) $frm->an_capture_day = '5';
if (!isset($frm->an_emailexpired)) $frm->an_emailexpired = '2';
if (!isset($frm->an_emailexpiredteacher)) $frm->an_emailexpiredteacher = '';
if (!isset($frm->an_sorttype)) $frm->an_sorttype = 'ttl';

if (isset($CFG->an_cutoff)) {
$cutoff = intval($CFG->an_cutoff);
$mins = $cutoff % 60; $hrs = ($cutoff - $mins) / 60;
$frm->an_cutoff_hour = $hrs; $frm->an_cutoff_min = $mins;
}
if (!isset($frm->an_cutoff_hour)) {
$timezone = format_float(get_user_timezone_offset(), 1);
$frm->an_cutoff_hour = intval($timezone);
$frm->an_cutoff_min = (intval(round($timezone)) != intval($timezone)) ? 35 : 5;
}

if (!isset($frm->acceptmethods)) {
if (empty($CFG->an_acceptmethods)) {
$frm->acceptmethods = array('cc');
$CFG->an_acceptmethods = implode(',', $frm->acceptmethods);
}
else {
$frm->acceptmethods = explode(',', $CFG->an_acceptmethods);
}
}

if (!isset($frm->acceptccs)) {
$frm->acceptccs = array_keys(enrolment_plugin_authorize::get_list_of_creditcards());
$CFG->an_acceptccs = implode(',', $frm->acceptccs);
}

?>

<table cellspacing="0" cellpadding="5" border="0" align="center">

<tr valign="top">
    <td colspan="3" align="right"><a href="../enrol/authorize/index.php"><?php print_string("paymentmanagement", "enrol_authorize") ?></a></td>
</tr>

<tr valign="top"><td colspan="3"><h4><?php print_string("adminauthorizewide", "enrol_authorize") ?></h4></td></tr>

<tr valign="top">
    <td align="right">enrol_cost:</td>
    <td><input type="text" size="5" name="enrol_cost" value="<?php p($frm->enrol_cost) ?>" /></td>
    <td><?php print_string("costdefault") ?>. <?php print_string("costdefaultdesc", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">enrol_currency:</td>
    <td><?php choose_from_menu(get_list_of_currencies(), "enrol_currency", $frm->enrol_currency, "","", "") ?></td>
    <td><?php print_string("currency") ?>
    </td>
</tr>

<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
<tr valign="top">
    <td align="right">loginhttps:</td>
    <td><?php echo (empty($CFG->loginhttps) ? "<font color=\"red\"><b>off</b></font>" : "<font color=\"green\">on</font>") ?></td>
    <td><?php
$a->url = "$CFG->wwwroot/$CFG->admin/config.php#configsectionsecurity";
print_string("logindesc", "enrol_authorize", $a)
?></td>
</tr>
<?php } /* end: https && loginhttps */ ?>

<tr valign="top"><td colspan="3"><h4><?php print_string("adminauthorizesettings", "enrol_authorize") ?></h4></td></tr>

<tr valign="top">
    <td align="right">an_login:</td>
    <td><input type="text" name="an_login" value="<?php p($frm->an_login) ?>" /></td>
    <td><?php print_string("anlogin", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">#&nbsp;#&nbsp;</td>
    <td colspan="2"><?php print_string("chooseone", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_tran_key:</td>
    <td><input type="text" name="an_tran_key" value="<?php p($frm->an_tran_key) ?>" /><sup>#1</sup></td>
    <td><?php print_string("antrankey", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_password:</td>
    <td><input type="text" name="an_password" value="" /><sup>#2</sup></td>
    <td><?php print_string("anpassword", "enrol_authorize") ?><br />(<?php print_string("leavetokeep") ?>)</td>
</tr>

<tr valign="top">
    <td align="right">delete_current:</td>
    <td><?php print_checkbox('delete_current', '1', !empty($frm->delete_current)) ?></td>
    <td><?php print_string("deletecheck", "moodle", get_string('oldpassword')) ?><br /><br /></td>
</tr>

<tr valign="top">
    <td align="right">an_referer:</td>
    <td><input type="text" name="an_referer" value="<?php p($frm->an_referer) ?>" /></td>
    <td><?php print_string("anreferer", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_cutoff:</td>
    <td><?php print_time_selector("an_cutoff_hour","an_cutoff_min",make_timestamp(2000,1,1,$frm->an_cutoff_hour,$frm->an_cutoff_min),5); ?></td>
    <td><?php print_string("cutofftime", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_avs:</td>
    <td><?php print_checkbox('an_avs', '1', !empty($frm->an_avs)) ?></td>
    <td><?php print_string("adminavs", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_test:</td>
    <td><?php print_checkbox('an_test', '1', !empty($frm->an_test)) ?></td>
    <td><?php print_string("antestmode", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_acceptmethods:</td>
    <td><?php
$allmethods = array('CC','ECHECK');
foreach ($allmethods as $key) {
print_checkbox('acceptmethods[]', strtolower($key), stristr($CFG->an_acceptmethods, $key) !== false, $key); echo "<br />\n";
}
?></td>
    <td><?php print_string("adminacceptmethods", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_acceptccs:</td>
    <td><?php
$allccs = enrolment_plugin_authorize::get_list_of_creditcards(true);
foreach ($allccs as $key => $val) {
print_checkbox('acceptccs[]', $key, stristr($CFG->an_acceptccs, $key) !== false, $val); echo "<br />\n";
}
?></td>
    <td><?php print_string("adminacceptccs", "enrol_authorize") ?></td>
</tr>

<tr valign="top"><td colspan="3"><h4><?php print_string("adminauthorizeccapture", "enrol_authorize") ?>
                                     <?php helpbutton('orderreview', '', 'enrol/authorize'); ?>
</h4></td></tr>

<tr valign="top">
    <td align="right">an_review:</td>
    <td><?php print_checkbox('an_review', '1', !empty($frm->an_review)) ?>
        <?php helpbutton('review', get_string('adminhelpreviewtitle', 'enrol_authorize'), 'enrol/authorize'); ?></td>
    <td><?php print_string("adminreview", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_capture_day:</td>
    <td><input type="text" name="an_capture_day" size="2" maxlength="2" value="<?php p($frm->an_capture_day) ?>" />
        <?php helpbutton('captureday', get_string('adminhelpcapturetitle', 'enrol_authorize'), 'enrol/authorize'); ?></td>
    <td><?php print_string("reviewday", "enrol_authorize", $frm->an_capture_day) ?></td>
</tr>

<tr valign="top"><td colspan="3"><h4><?php print_string("adminauthorizeemail", "enrol_authorize") ?></h4></td></tr>

<tr valign="top">
    <td align="right">an_emailexpired:</td>
    <td><input type="text" name="an_emailexpired" size="1" maxlength="1" value="<?php p($frm->an_emailexpired) ?>" /></td>
    <td><?php print_string("adminemailexpired", "enrol_authorize", $frm->an_emailexpired) ?><br />
        <?php print_string("adminemailexpsetting", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_emailexpiredteacher:</td>
    <td><?php print_checkbox('an_emailexpiredteacher', '1', !empty($frm->an_emailexpiredteacher)) ?></td>
    <td><?php print_string("adminemailexpiredteacher", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">an_sorttype:</td>
    <td><?php
$sorts = array('ttl' => get_string('adminemailexpiredsortsum', 'enrol_authorize'),
'cnt' => get_string('adminemailexpiredsortcount', 'enrol_authorize'));
choose_from_menu($sorts, "an_sorttype", $frm->an_sorttype, "","", "") ?></td>
    <td><?php print_string("adminemailexpiredsort", "enrol_authorize") ?></td>
</tr>

<tr valign="top">
    <td align="right">enrol_mailstudents:</td>
    <td><?php print_checkbox('enrol_mailstudents', '1', !empty($frm->enrol_mailstudents)) ?></td>
    <td><?php print_string("mailstudents") ?></td>
</tr>

<tr valign="top">
    <td align="right">enrol_mailteachers:</td>
    <td><?php print_checkbox('enrol_mailteachers', '1', !empty($frm->enrol_mailteachers)) ?></td>
    <td><?php print_string("mailteachers") ?></td>
</tr>

<tr valign="top">
    <td align="right">enrol_mailadmins:</td>
    <td><?php print_checkbox('enrol_mailadmins', '1', !empty($frm->enrol_mailadmins)) ?></td>
    <td><?php print_string("mailadmins") ?></td>
</tr>

</table>
Something went wrong with that request. Please try again.