Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') OR die('No Direct Script Access');
- class user_data
- {
- public $forum;
- public $hardcore;
- public $rank;
- function __construct()
- {
- if ($forum['username'] != "Captain Lightning")
- {
- die("You're not supposed to be here {$forum['username']}!");
- }
- $user = Model::factory('user');
- $hardcore = $user->hardcore_data($forum['uid']);
- if (!$user->user_exists($forum['uid']))
- {
- $user->create_user($forum['uid'], $forum['username']);
- }
- $rank = $user->rank($forum['manliness_rank'], $forum['richliness_rank']);
- }
- }
- class Controller_Hardcore extends Controller_Template
- {
- public $template;
- public function before()
- {
- $this->template = new stdClass;
- }
- public function action_index()
- {
- require_once '/home/arflux-rpg/public_html/game/inc/session.php';
- $forum = $MyBBI->getUser();
- $p = new user_data();
- $this->template = View::factory('hardcore');
- $this->template->user = new user_data();
- $this->template->test = $p->hardcore['username'];
- }
- public function action_submit()
- {
- require_once '/home/arflux-rpg/public_html/game/inc/session.php';
- $forum = $MyBBI->getUser();
- $this->template = View::factory('hardcore_enemy_submit');
- $this->template->username = $forum['username'];
- }
- }
Add Comment
Please, Sign In to add comment