mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
/
index.php
43 lines (34 loc) · 1.51 KB
/
index.php
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
<?PHP // $Id$
/// Load libraries
require_once('../../config.php');
require_once('locallib.php');
/// Parameters
$orderid = optional_param('order', 0, PARAM_INT);
$courseid = optional_param('course', SITEID, PARAM_INT);
$userid = optional_param('user', 0, PARAM_INT);
/// Only site users can access to this page
require_login($courseid);
if (isguest()) {
error("Guests cannot use this page.");
}
/// Load strings. All strings should be defined here. locallib.php uses these strings.
$strs = get_strings(array('user','status','action','delete','time','course','confirm','yes','no','all','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');
/// Print header
if (!$course = get_record('course', 'id', $courseid)) {
error('Could not find that course');
}
print_header_simple("$authstrs->paymentmanagement", "", "<a href=\"index.php\">$authstrs->paymentmanagement</a>");
/// If orderid is empty, user wants to see all orders
if (empty($orderid)) {
authorize_print_orders();
} else {
authorize_print_order_details($orderid);
}
/// Print footer
print_footer();
?>