Exemplo n.º 1
0
 * @version 1.4.1
 * @author Sajaki
 *
 */
if (!defined('IN_PHPBB')) {
    exit;
}
/**  begin recruitment block ***/
$template->assign_block_vars('status', array('MESSAGE' => $user->lang['RECRUIT_MESSAGE']));
// Include the abstract base
if (!class_exists('\\bbdkp\\controller\\guilds\\Recruitment')) {
    require "{$phpbb_root_path}includes/bbdkp/controller/guilds/Recruitment.{$phpEx}";
}
$color = array(array(0, $user->lang['CLOSED'], "#AAAAAA", "rec_closed.png"), array(1, $user->lang['LOW'], "#FFBB44", "rec_low.png"), array(2, $user->lang['MEDIUM'], "#FF3300", "rec_med.png"), array(3, $user->lang['HIGH'], "#AA00AA", "rec_high.png"));
$recruit = new \bbdkp\controller\guilds\Recruitment();
$guildrecruitingresult = $recruit->get_recruiting_guilds();
$this->apply_installed = false;
$plugin_versioninfo = (array) parent::get_plugin_info(request_var('versioncheck_force', false));
if (isset($plugin_versioninfo['apply'])) {
    $this->apply_installed = true;
}
while ($row = $db->sql_fetchrow($guildrecruitingresult)) {
    $guild_id = $row['id'];
    $template->assign_block_vars('guild', array('EMBLEM' => $row['emblemurl'], 'NAME' => $row['name'], 'S_CLOSED' => $row['rec_status'] == 0 ? true : false));
    $recruit->setGuildId($guild_id);
    $Guild = new \bbdkp\controller\guilds\Guilds();
    $Guild->guildid = $guild_id;
    $Guild->Getguild();
    $blockresult = $recruit->ListRecruitments(1);
    while ($row = $db->sql_fetchrow($blockresult)) {
        switch ($row['positions']) {