/** * lootcontroller constructor */ function __construct() { global $db; parent::__construct(); $this->loot = new \bbdkp\controller\loot\Loot(); // get dkp pools $sql = 'SELECT dkpsys_id, dkpsys_name, dkpsys_default FROM ' . DKPSYS_TABLE . ' a , ' . EVENTS_TABLE . " b\n\t\t\tWHERE a.dkpsys_id = b.event_dkpid AND b.event_status = 1\n AND a.dkpsys_status = 'Y'"; $result = $db->sql_query($sql); $this->dkpsys = array(); while ($row = $db->sql_fetchrow($result)) { $this->dkpsys[$row['dkpsys_id']] = array('id' => $row['dkpsys_id'], 'name' => $row['dkpsys_name'], 'default' => $row['dkpsys_default']); } $db->sql_freeresult($result); }
/** * Pool class constructor * @param int|number $dkpsys */ function __construct($dkpsys = 0) { global $db; parent::__construct(); //to load admin if ($dkpsys > 0) { $this->dkpsys_id = $dkpsys; $this->read(); } $sql1 = 'SELECT * FROM ' . DKPSYS_TABLE; $result1 = $db->sql_query($sql1); $rows1 = $db->sql_fetchrowset($result1); $db->sql_freeresult($result1); $this->poolcount = count($rows1); // get dkp pools for which there is an event open $sql = 'SELECT dkpsys_id, dkpsys_name, dkpsys_default FROM ' . DKPSYS_TABLE . ' a , ' . EVENTS_TABLE . " b\n\t\t\tWHERE a.dkpsys_id = b.event_dkpid AND b.event_status = 1\n AND a.dkpsys_status = 'Y'\n GROUP BY dkpsys_id, dkpsys_name, dkpsys_default\n UNION\n SELECT a.dkpsys_id, a.dkpsys_name, a.dkpsys_default\n FROM " . DKPSYS_TABLE . " a , " . ADJUSTMENTS_TABLE . " b\n WHERE a.dkpsys_id = b.adjustment_dkpid AND a.dkpsys_status = 'Y'\n GROUP BY a.dkpsys_id, a.dkpsys_name, a.dkpsys_default "; $result = $db->sql_query($sql); $this->dkpsys = array(); while ($row = $db->sql_fetchrow($result)) { $this->dkpsys[$row['dkpsys_id']] = array('id' => $row['dkpsys_id'], 'name' => $row['dkpsys_name'], 'default' => $row['dkpsys_default']); } $db->sql_freeresult($result); }
/** * pointscontroller constructor * @param int $dkpsys_id */ function __construct($dkpsys_id = 0) { //load model parent::__construct(); $this->dkpsys_id = $dkpsys_id; $this->Points = new \bbdkp\controller\points\Points(0, $dkpsys_id); $this->Pools = new \bbdkp\controller\points\Pool($dkpsys_id); $this->dkpsys = $this->Pools->dkpsys; $this->show_inactive = false; }
/** * Event class constructor * @param int|number $event_id */ function __construct($event_id = 0) { global $db; parent::__construct(); if ($event_id != 0) { $this->get($event_id); } else { $this->event_id = 0; $this->dkpsys_id = 0; $this->dkpsys_name = ''; $this->event_name = ''; $this->event_value = 0.0; $this->event_color = $this->event_imagename = ''; $this->event_status = ''; } // dkp pools $sql = 'SELECT dkpsys_id, dkpsys_name, dkpsys_default FROM ' . DKPSYS_TABLE . "\n ORDER BY dkpsys_name"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $this->dkpsys[] = array('id' => $row['dkpsys_id'], 'name' => $row['dkpsys_name'], 'default' => $row['dkpsys_default']); } $db->sql_freeresult($result); }
/** * guild class constructor * @param int $guild_id */ function __construct($guild_id = 0) { global $user; parent::__construct(); $this->guildid = $guild_id; $this->Getguild(); $this->possible_recstatus = array(0 => $user->lang['CLOSED'], 1 => $user->lang['OPEN']); }
/** * Raid Constructor * @param int|number $raid_id */ function __construct($raid_id = 0) { parent::__construct(); $this->raid_id = $raid_id; if ($raid_id != 0) { $this->get(); } else { $this->dkpsys_name = ''; $this->event_dkpid = 0; $this->event_id = 0; $this->event_name = ''; $this->event_imagename = ''; $this->event_value = 0.0; $this->event_color = '#FFFFFF'; $this->raid_start = 0; $this->raid_end = 0; $this->raid_note = ''; $this->raid_added_by = ''; $this->raid_updated_by = ''; } }
/** * Member class constructor * * @param int $member_id * @param array $guildlist */ function __construct($member_id = 0, $guildlist = null) { global $phpbb_root_path, $phpEx; parent::__construct(); if (isset($member_id)) { if ($member_id > 0) { $this->member_id = $member_id; $this->Getmember(); } } else { $this->member_id = 0; } $this->guildmemberlist = array(); if ($guildlist == null) { //include the guilds class if (!class_exists('\\bbdkp\\controller\\guilds\\Guilds')) { require "{$phpbb_root_path}includes/bbdkp/controller/guilds/Guilds.{$phpEx}"; } $guild = new \bbdkp\controller\guilds\Guilds(); $this->guildlist = $guild->guildlist(1); } else { $this->guildlist = $guildlist; } }
/** * Adjustment class constructor * @param int|number $adjustment_dkpid */ function __construct($adjustment_dkpid = 0) { global $db; parent::__construct(); $this->adjustment_dkpid = $adjustment_dkpid; // get dkp pools that are active. $sql = 'SELECT dkpsys_id, dkpsys_name, dkpsys_default FROM ' . DKPSYS_TABLE . " a\n\t\t\tWHERE a.dkpsys_status = 'Y' "; $result = $db->sql_query($sql); $this->dkpsys = array(); while ($row = $db->sql_fetchrow($result)) { $this->dkpsys[$row['dkpsys_id']] = array('id' => $row['dkpsys_id'], 'name' => $row['dkpsys_name'], 'default' => $row['dkpsys_default']); } $db->sql_freeresult($result); }