verlassen)'; } else{ $member[] = $tmp; } if($row['id'] == $clan['leader']){ $leader = $tmp; } if($row['id'] == $clan['co_leader']){ $coleader = $tmp; } } $inv_qry = db_query('SELECT userid, TIMESTAMPDIFF(HOUR, now(), valid) as till FROM user_clan_invitations WHERE clanid = '.$clan['id'].' and valid > now()'); $invited = array(); while($row = mysqli_fetch_assoc($inv_qry)) { $invited[] = generateUserLinkByID($row['userid']) . ' (noch ' . $row['till'] . 'h gültig)'; } if(count($invited) == 0) { $invited[] = 'Keine'; } $openChallengeRequests = getOpenChallengeRequests($clan['id']); // okay now we split into challenges we have done and we have received foreach($openChallengeRequests as $request) { if($request['clan_requester'] != $clan['id']) { $openChallengeRequestsDisplay[] = displayClanLink($request['clan_requester']) ; } else { $openChallengeRequestsDisplay[] = displayClanLink($request['clan_challenged']) ; } } ?>
Macht übernehmen'; } else if(count($member) > 0){ echo ''; } else { echo ''; } } else{ echo ''; } ?> '.$coleader.''; } ?> 0) { ?> 0) { ?> '.$clan['homepage'].''; } else{ echo ''; } ?>
Info
Leader: Keine LeaderClan übernehmen'.$leader.'
Co-Leader:
Clanzeichen:
Member (): ',$member); ?>
Eingeladen: ', $invited); ?>
Herausforderungen: ', $openChallengeRequestsDisplay); ?>
Level:
Erfahrung:
ELO-Wertung:
Homepage: Keine
Info:
 
Nachricht an alle Clanmember schicken
 
 
 
Clannachrichten erst ab Level verfügbar
verlassen)'; } else{ $member[] = $tmp; } } $inv_qry = db_query('SELECT userid, TIMESTAMPDIFF(HOUR, now(), valid) as till FROM user_clan_invitations WHERE clanid = '.$clan['id'].' and valid > now()'); $invited = array(); while($row = mysqli_fetch_assoc($inv_qry)) { $invited[] = generateUserLinkByID($row['userid']) . ' (noch ' . $row['till'] . 'h gültig, zurückziehen)'; } if(count($invited) == 0) { $invited[] = 'Keine'; } $openChallengeRequests = getOpenChallengeRequests($clan['id']); // okay now we split into challenges we have done and we have received foreach($openChallengeRequests as $request) { if($request['clan_requester'] != $clan['id']) { $openChallengeRequestsDisplay[] = displayClanLink($request['clan_requester']) . ' (annehmen)'; } else { $openChallengeRequestsDisplay[] = displayClanLink($request['clan_challenged']) . ' (zurückziehen)'; } } ?> 0) { ?> 0) { ?> '.$clan['homepage'].''; } else{ echo ''; } ?>
Info

(edit)
Leader:(edit)
Co-Leader:(edit)
Clanzeichen:(edit)
Member ():
(verwalten)
',$member); ?>
Eingeladen: ', $invited); ?>
Herausforderungen: ', $openChallengeRequestsDisplay); ?>
Level:
Erfahrung:
ELO-Wertung:
Homepage:(edit) Keine
Info:(edit)
Background:(edit)
Clan auflösen Clan auflösen (Achtung! Clans ggf. nur geleert!)
 
Nachricht an alle Clanmember schicken
 
 
 
Clannachrichten erst ab Level verfügbar
MAX_CHARS_CLANSIGN) { return 'Clanzeichen sind ungültig: Summe aus beiden Teilen darf nicht größer als '.MAX_CHARS_CLANSIGN.' Zeichen sein!'; } db_query('UPDATE clan SET clanz_pre = \''.$value1.'\', clanz_suff = \''.$value2.'\' where id = '.$clanid); return NULL; case 'Banner': db_query('UPDATE clan SET banner = \''.$value1.'\' where id = '.$clanid); return NULL; case 'Info': db_query('UPDATE clan SET Info = \''.$value1.'\' where id = '.$clanid); return NULL; case 'Background': if(isClanBackgroundAvailable($clanid)) { db_query('UPDATE clan SET background = \''.$value1.'\' where id = '.$clanid) ;} return NULL; case 'Leadership': $clan = getClan($clanid); if($value1 == 0 && $rootlvl == 2){$value1 = 'null';} else if($rootlvl == 1) { $value1 = $clan['leader']; } if($value2 == 0){$value2 = 'null';} // okay, are we allowed to change?? If we have max members, it is not allowed to remove the co_leader $clan = getClan($clanid); $members = getClanMembersCount($clanid); $members_max = getMaximumMembers($clan['id']); if($members_max == $members && $clan['leader'] != $clan['co_leader'] && ($value1 == $value2 || $value2 == 'null')) { // Okay, actually there are the max amount of users in the clan // it is now not possible to change to a leader only clan!! return 'Es ist nicht möglich den Co-Leader zu ändern, da der clan die maximale Anzahl Member besitzt!'; } if($rootlvl == 1){ // the co leader may only set the co leader XD $sql = 'UPDATE clan SET co_leader = '.$value2.' where id = '.$clanid; //echo $sql.'
'; db_query($sql); } else if($rootlvl == 2) { // the leader may set the leader and the co leader $sql = 'UPDATE clan SET leader = '.$value1.', co_leader = '.$value2.' where id = '.$clanid; // echo $sql.'
'; db_query($sql); } return NULL; case 'Member': // okay, now apply the changes!! --> first filter the values of value2 that are in value1 $value2 = array_diff($value2, $value1); $clan = getClan($clanid); // now kick some asses ;) foreach($value1 as $member) { if($clan['leader'] == $member || $clan['coleader'] == $member) { // we cannot kick the asses of the leaders!! continue; } fireMember($user, $member); } updateAuthorizedClanfightCoordinators($clanid, $value2); displayEdit($what, $clanid, $rootlvl); return NULL; default: return 'Error!'; } } function displayEdit($what, $clanid, $rootlvl){ if($rootlvl < 1) { $content = 'Du hast keine Rechte um diese Aktion auszuführen!'; $what = 'ERROR'; } $clan = getCLan($clanid); $content = ''; switch($what){ case 'Homepage': $content = ''; break; case 'Background': $content = ''; break; case 'Clanzeichen': $content = 'Prefix: Suffix: '; break; case 'Banner': $content = ''; break; case 'Leadership': $member_qry = db_query('Select id, nickname from user where clan = '.$clanid); $member[] = ''; $member2[] = ''; while($row = mysqli_fetch_assoc($member_qry)){ if($row['id'] == $clan['leader']) { $member[] = ''; } else { $member[] = ''; } if($row['id'] == $clan['co_leader']) { $member2[] = ''; } else { $member2[] = ''; } } if($rootlvl == 2){ $content = 'Leader:'; } $content .= 'Co-Leader:'; break; case 'Info': $content = ''; break; case 'Member': $content = ''.PHP_EOL; $content .= ''.PHP_EOL; $content .= ''.PHP_EOL; $content .= ''.PHP_EOL; $member_qry = db_query('Select id from user where clan = '.$clan['id']); $authorized = getAuthorizedClanfightCoordinatorIDs($clanid); $leader = NULL; $coleader = NULL; while($row = mysqli_fetch_assoc($member_qry)){ $row['nickname'] = generateUserLinkByID($row['id'], false); if($row['id'] == $clan['leader']){ $leader = $row; } else if($row['id'] == $clan['co_leader']) { $coleader = $row; } else { $member[] = $row; } } $i = 0; // Kay, first display the chief if($leader != NULL) { $content .= ''.PHP_EOL; $i++; } if($coleader != null) { $content .= ''.PHP_EOL; $i++; } foreach($member as $memb) { if(in_array($memb['id'], $authorized)) { $checked = 'checked="checked"'; } else { $checked = ''; } $content .= ''.PHP_EOL; $i++; } $content .= ''.PHP_EOL; $content .= '
MemberKickCF Rechte

' . $leader['nickname'] . '
' . $coleader['nickname'] . '
' . $memb['nickname'] . '

'.PHP_EOL.''; break; case 'ERROR': break; default: $content = 'Error '.$what.' unknown!'; break; } ?>
Ändern
 
weiter'); } $displayMore = false; break; case 'reject': $errorMsg = revokeInvitation($user_ida, $member); if($errorMsg !== NULL) { echo displayErrorMessage(NULL, $errorMsg, displayHistoryBackLink()); $displayMore = false; } else { displayErrorMessage('','Du hast die Einladung erfolgreich zurückgezogen!', 'weiter'); $displayMore = false; } break; case 'newsletter': sendClanNewsletter($user_ida, $text); $displayMore = false; break; default: break; } } if($displayMore){ displayClanProfile($clan_id, $user_ida['id']); } ?>