Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/enrol/authorize/index.php
Go to the documentation of this file.
00001 <?php
00002 
00003 // This file is part of Moodle - http://moodle.org/
00004 //
00005 // Moodle is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // Moodle is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00017 
00030 
00031     require_once('../../config.php');
00032     require_once('const.php');
00033     require_once('locallib.php');
00034     require_once('localfuncs.php');
00035     require_once('authorizenet.class.php');
00036 
00038     $orderid  = optional_param('order', 0, PARAM_INT);
00039     $courseid = optional_param('course', SITEID, PARAM_INT);
00040     $userid   = optional_param('user', 0, PARAM_INT);
00041 
00042     $url = new moodle_url('/enrol/authorize/index.php');
00043     if ($orderid !== 0) {
00044         $url->param('order', $orderid);
00045     }
00046     if ($courseid !== SITEID) {
00047         $url->param('course', $courseid);
00048     }
00049     if ($userid !== 0) {
00050         $url->param('user', $userid);
00051     }
00052     $PAGE->set_url($url);
00053 
00055     if (!($course = $DB->get_record('course', array('id'=>$courseid)))) {
00056         print_error('invalidcourseid', '', '', $courseid);
00057     }
00058 
00060     require_login(); // Don't use $courseid! User may want to see old orders.
00061     if (isguestuser()) {
00062         print_error('noguest');
00063     }
00064 
00066     $strs = get_strings(array('search','status','action','time','course','confirm','yes','no','cancel','all','none','error'));
00067     $authstrs = get_strings(array('orderid','nameoncard','echeckfirslasttname','void','capture','refund','delete',
00068         'allpendingorders','authcaptured','authorizedpendingcapture','capturedpendingsettle','settled',
00069         'refunded','cancelled','expired','underreview','approvedreview','reviewfailed','tested','new',
00070         'paymentmethod','methodcc','methodecheck', 'paymentmanagement', 'orderdetails', 'cclastfour', 'isbusinesschecking','shopper',
00071         'transid','settlementdate','notsettled','amount','unenrolstudent'), 'enrol_authorize');
00072 
00074     if (empty($orderid)) {
00075         authorize_print_orders($courseid, $userid);
00076     }
00077     else {
00078         authorize_print_order($orderid);
00079     }
00080 
 All Data Structures Namespaces Files Functions Variables Enumerations