This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/site/main/handlers/donate.inc

27 lines
801 B
PHP
Raw Normal View History

2016-01-10 11:01:49 +01:00
<?php
class page_handler {
var $needsAuth = true;
var $ajax = array();
function handle($input) {
$this->lib = $this->game->getLib("main/paypal");
$this->data = array();
if ($input['doit'] == 1) {
$this->data['pid'] = $this->lib->call('newTicket', $_SESSION['userid']);
logText("PAYPAL: generated ticket {$this->data['pid']} for account #{$_SESSION['userid']}", LOG_INFO);
$this->data['doit'] = true;
} else {
$this->data['selfContrib'] = $this->lib->call('getUserContributions', $_SESSION['userid']);
$this->data['hist'] = $this->lib->call('getUserHistory', $_SESSION['userid']);
$this->data['totalContrib'] = $this->lib->call('getTotalContributions');
$this->data['totalMonth'] = $this->lib->call('getMonthContributions');
}
$this->output = "donate";
}
}
?>