Guest User

Untitled

a guest
Oct 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. <?php defined('SYSPATH') OR die('No Direct Script Access');
  2.  
  3. class user_data
  4. {
  5. public $forum;
  6. public $hardcore;
  7. public $rank;
  8.  
  9. function __construct()
  10. {
  11. if ($forum['username'] != "Captain Lightning")
  12. {
  13. die("You're not supposed to be here {$forum['username']}!");
  14. }
  15.  
  16. $user = Model::factory('user');
  17. $hardcore = $user->hardcore_data($forum['uid']);
  18.  
  19. if (!$user->user_exists($forum['uid']))
  20. {
  21. $user->create_user($forum['uid'], $forum['username']);
  22. }
  23.  
  24. $rank = $user->rank($forum['manliness_rank'], $forum['richliness_rank']);
  25. }
  26. }
  27.  
  28. class Controller_Hardcore extends Controller_Template
  29. {
  30. public $template;
  31.  
  32. public function before()
  33. {
  34. $this->template = new stdClass;
  35. }
  36.  
  37. public function action_index()
  38. {
  39. require_once '/home/arflux-rpg/public_html/game/inc/session.php';
  40. $forum = $MyBBI->getUser();
  41.  
  42. $p = new user_data();
  43. $this->template = View::factory('hardcore');
  44. $this->template->user = new user_data();
  45. $this->template->test = $p->hardcore['username'];
  46. }
  47.  
  48. public function action_submit()
  49. {
  50. require_once '/home/arflux-rpg/public_html/game/inc/session.php';
  51. $forum = $MyBBI->getUser();
  52.  
  53. $this->template = View::factory('hardcore_enemy_submit');
  54. $this->template->username = $forum['username'];
  55. }
  56. }
Add Comment
Please, Sign In to add comment