You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.8 KiB

<?php
/*
*
* @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php');
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php');
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php');
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
$user_id = validateUnsignedInteger($_GET['user_id'], null);
// Unkritisch
$charm = $_GET['charm'];
if ($charm) {
$clan = mysql_fetch_array(mysql_Query("SELECT leader FROM clan WHERE id='$user_ida[clan]'"));
$kick_u = mysql_fetch_array(mysql_Query("SELECT clan, nickname FROM user WHERE id='$user_id'"));
if (($clan['leader'] == $user_ida['id']) OR ($user_id == $user_ida['id']) AND $clan['leader'] != $user_id AND $kick_u['clan'] == $user_ida['clan']) {
mysql_query("UPDATE user SET clan=NULL WHERE id='$user_id'");
mysql_query('Update chars set clan_train = 0 where besitzer = '.$user_id);
displayErrorMessage(NULL, 'User erfolgreich aus den Clan gekickt!', displayHistoryBackLink());
exit;
}
}
?>
<table cellpadding="0" cellspacing="0" width="100%" height="69">
<!-- MSTableType="layout" -->
<tr>
<td height="18" valign="top" width="603" colspan="2">
<p align="center"><b>Clan Mitglieder</b></td>
</tr>
<?php
$clan = mysql_fetch_array(mysql_Query("SELECT clanzeichen, leader FROM clan where id='$user_ida[clan]' LIMIT 1"));
if ($clan[leader] == $user_ida[id]) {
$kick = "ja";
}
$clan1 = explode(",", $clan[clanzeichen]);
if ($user_ida['clan'] != 0) {
$user = mysql_query("SELECT id, nickname FROM user WHERE clan='$user_ida[clan]' LIMIT 50");
while ($row = mysql_fetch_array($user)) {
?>
<tr>
<td height="25" valign="top" width="161">
<p align="center"><b>Nickname</b></td>
<td height="25" valign="top" width="442">&nbsp;<?php echo displayUserLink($row['id'],$row['nickname'],$clan1[0],$clan1[1]); if(($kick == "ja" OR $user_ida[id] == $row[id]) AND ($clan[leader] != $row[id])) { echo " | <b><a href='index.php?as=clan/index&charm=1&user_id=$row[id]'>kicken</a></b>"; } ?></td>
</tr>
<?php
$chars = getCharsOfUser($row['id']);
foreach ($chars as $row2) {
?>
<tr>
<td height="25" width="161" valign="top">
<p align="center"><b>Charakter</b></td>
<td height="25" width="442" valign="top">&nbsp;<?php echo displayCharLink($row2['id'],$row2['name'],NULL,$clan1[0],$clan1[1]); ?></td>
</tr>
<?php
}
?>
<tr>
<td height="25" width="161" valign="top">
<p align="center"><b></b></td>
<td height="25" width="442" valign="top"></td>
</tr>
<?php
}
}
if ($clan[leader] == $user_ida[id]) {
?>
<?php
}
?>
</table>