Guest User

Untitled

a guest
Nov 24th, 2013
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. <?php
  2.  
  3. class Donate extends MX_Controller
  4. {
  5. function __construct()
  6. {
  7. //Call the constructor of MX_Controller
  8. parent::__construct();
  9.  
  10. //Make sure that we are logged in
  11. $this->user->userArea();
  12.  
  13. $this->load->config('donate');
  14. }
  15.  
  16. public function index()
  17. {
  18. requirePermission("view");
  19.  
  20. $this->template->setTitle(lang("donate_title", "donate"));
  21.  
  22. $donate_paypal = $this->config->item('donate_paypal');
  23. $donate_paygol = $this->config->item('donate_paygol');
  24.  
  25. $user_id = $this->user->getId();
  26.  
  27. $data = array(
  28. "donate_paypal" => $donate_paypal,
  29. "donate_paygol" => $donate_paygol,
  30. "user_id" => $user_id,
  31. "server_name" => $this->config->item('server_name'),
  32. "currency" => $this->config->item('donation_currency'),
  33. "currency_sign" => $this->config->item('donation_currency_sign'),
  34. "multiplier" => $this->config->item('donation_multiplier'),
  35. "multiplier_paygol" => $this->config->item('donation_multiplier_paygol'),
  36. "url" => pageURL
  37. );
  38.  
  39. $output = $this->template->loadPage("donate.tpl", $data);
  40.  
  41. $this->template->box("<span style='cursor:pointer;' onClick='window.location=\"".$this->template->page_url."ucp\"'>".lang("ucp")."</span> &rarr; ".lang("donate_panel", "donate"), $output, true, "modules/donate/css/donate.css", "modules/donate/js/donate.js");
  42. }
  43.  
  44. public function success()
  45. {
  46. $this->user->getUserData();
  47.  
  48. $page = $this->template->loadPage("success.tpl", array('url' => $this->template->page_url));
  49.  
  50. $this->template->box(lang("donate_thanks", "donate"), $page, true);
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment