Exemple #1
0
function clan_char_is_leader_of($char_id, $clan_id = null)
{
    $sel = 'SELECT clan_id
        FROM clan JOIN clan_player ON clan_id = _clan_id
        WHERE _player_id = :char_id AND member_level > 0 ORDER BY clan_id LIMIT 1';
    $id = query_item($sel, array(':char_id' => array($char_id, PDO::PARAM_INT)));
    return $id ? get_clan($id) : null;
}
Exemple #2
0
                 } else {
                     printf("Player %s is not in a clan", $player['name']);
                 }
             } else {
                 printf("Invalid pass for player %s", htmlspecialchars($name));
             }
         } else {
             printf("Player %s not found", htmlspecialchars($name));
         }
         echo "<hr>";
     }
     require 'templates/clans_leave.php';
     break;
 default:
     $cid = $_REQUEST['cid'];
     if ($cid && ($clan = get_clan($cid))) {
         echo '<table width=100%>';
         printf('<tr><th colspan=3 align=center>%s [%s]', $clan['full_name'], $clan['name']);
         echo '<tr><td width=40% align=left valign=top>';
         echo '<table>';
         if ($clan['creator_name']) {
             printf('<tr><th align=right>Creator<td>%s', htmlspecialchars($clan['creator_name']));
         }
         if ($clan['leader_name']) {
             printf('<tr><th align=right>Leader<td>%s', htmlspecialchars($clan['leader_name']));
         }
         if ($clan['icq']) {
             printf('<tr><th align=right>ICQ<td><a href="http://wwp.icq.com/%d"><img src="http://wwp.icq.com/scripts/online.dll?icq=%d&img=2"></a>', $clan['icq'], $clan['icq']);
         }
         if ($clan['mail']) {
             printf('<tr><th align=right>Mail<td><a href="mailto:%s">%s</a>', htmlspecialchars($clan['mail']), htmlspecialchars($clan['mail']));