moodle/enrol/authorize/index.php

45 lines
1.4 KiB
PHP
Raw Normal View History

<?PHP // $Id$
2006-03-27 08:49:43 +00:00
/// Load libraries
require_once '../../config.php';
require_once 'lib.php';
2006-03-27 08:49:43 +00:00
/// Get site
if (! $site = get_site()) {
error("Could not find a site!");
2006-03-13 11:15:09 +00:00
}
2006-03-27 08:49:43 +00:00
/// Only site users can access to this page
require_login();
if (isguest()) {
error("Guests cannot use this page.");
}
2006-03-27 08:49:43 +00:00
/// Load strings. All strings should be defined here. lib.php uses these strings.
$strs = get_strings(array('user','status','action','delete','time','course','confirm','yes','no','none','error'));
$authstrs = get_strings(array('paymentmanagement','orderid','void','capture','refund','delete',
'authcaptured','authorizedpendingcapture','capturedpendingsettle','capturedsettled',
'settled','refunded','cancelled','expired','tested',
'transid','settlementdate','notsettled','amount',
'howmuch','captureyes','unenrolstudent'), 'enrol_authorize');
2006-03-27 08:49:43 +00:00
/// Print header
print_header("$site->shortname: $authstrs->paymentmanagement",
"$site->fullname",
"<a href=\"index.php\">$authstrs->paymentmanagement</a>", "");
2006-03-27 08:49:43 +00:00
/// Get order id
$orderid = optional_param('order', 0, PARAM_INT);
2006-03-27 08:49:43 +00:00
/// If orderid is empty, user wants to see all orders
if (empty($orderid)) {
print_authorize_orders();
}
else {
2006-03-27 08:49:43 +00:00
print_authorize_order_details($orderid);
}
2006-03-27 08:49:43 +00:00
/// Print footer
print_footer();
?>