コード例 #1
0
ファイル: forum.php プロジェクト: lucasoares/webzohcaserver
 $main_content .= '<tr bgcolor="' . $bgcolor . '"><td valign="top" style="padding: 5px;"><a href="?subtopic=characters&name=' . urlencode($thread['name']) . '">' . $thread['name'] . '</a><br /><small>' . $pos[$thread['group_id']] . '</small>';
 if ($thread['group_id'] >= 4) {
     $main_content .= '<br /><img src="images/cip_post_icon.gif" />';
 }
 $main_content .= '<br /><br />';
 if ($config['site']['worlds_num'] > 1) {
     $main_content .= ' <small>Habitante de ' . $config['site']['worlds'][$thread['world_id']] . '</small><br />';
 }
 if ($thread['group_id'] < 4) {
     $main_content .= '<font size="1">Vocação: ' . $vocation_name[$thread['world_id']][$thread['promotion']][$thread['vocation']] . '<br />Nível: ' . $thread['level'] . '<br />';
     $thread['post_text'] = strip_tags($thread['post_text']);
 }
 $rank = new OTS_GuildRank();
 $rank->load($thread['rank_id']);
 if ($rank->isLoaded()) {
     $guild = $rank->getGuild();
     if ($guild->isLoaded()) {
         $main_content .= $rank->getName() . ' da guild <a href="?subtopic=guilds&action=show&guild=' . $guild->getId() . '">' . $guild->getName() . '</a><br />';
     }
 }
 $posts = $SQL->query("SELECT COUNT(`id`) AS 'posts' FROM `z_forum` WHERE `author_guid`=" . (int) $thread['author_guid'])->fetch();
 $main_content .= '<br />Tópicos: ' . (int) $posts['posts'] . '<br />Reputação: ' . $rep[$thread['group_id']] . '</font></td><td valign="top" style="padding: 4px;">' . showPost($thread['post_topic'], $thread['post_text'], $thread['post_smile']) . '</td></tr>
 <tr bgcolor="' . $bgcolor . '" height="40"><td><font size="1">&nbsp;<img src="images/logo_newpost.gif" />' . date('d/m/Y', $thread['post_date']) . ' às ' . date('H:i:s', $thread['post_date']);
 if ($thread['edit_date'] > 0) {
     if ($thread['last_edit_aid'] != $thread['author_aid']) {
         $main_content .= '<br /><br>Editado por um moderador';
     } else {
         $main_content .= '<br /><br>Editado por ' . $thread['name'];
     }
     $main_content .= '<br />em ' . date('d/m/Y', $thread['edit_date']) . ' às ' . date('H:i:s', $thread['edit_date']);
 }
コード例 #2
0
ファイル: guilds.php プロジェクト: s3kk/Gesior
 $rank_list->orderBy('level', POT::ORDER_DESC);
 $guild_leader = FALSE;
 $account_players = $account_logged->getPlayers();
 foreach ($account_players as $player) {
     if ($guild->getOwner()->getId() == $player->getId()) {
         $guild_leader = TRUE;
         $level_in_guild = 3;
     }
 }
 if ($guild_leader) {
     $rank = new OTS_GuildRank();
     $rank->load($rank_to_delete);
     if (!$rank->isLoaded()) {
         $guild_errors2[] = 'Rank with ID ' . $rank_to_delete . ' doesn\'t exist.';
     } else {
         if ($rank->getGuild()->getId() != $guild->getId()) {
             $guild_errors2[] = 'Rank with ID ' . $rank_to_delete . ' isn\'t from your guild.';
         } else {
             if (count($rank_list) < 2) {
                 $guild_errors2[] = 'You have only 1 rank in your guild. You can\'t delete this rank.';
             } else {
                 $players_with_rank = $rank->getPlayersList();
                 $players_with_rank_number = count($players_with_rank);
                 if ($players_with_rank_number > 0) {
                     foreach ($rank_list as $checkrank) {
                         if ($checkrank->getId() != $rank->getId()) {
                             if ($checkrank->getLevel() <= $rank->getLevel()) {
                                 $new_rank = $checkrank;
                             }
                         }
                     }