verlassen)'; } else{ $member[] = $tmp; } if($row['id'] == $clan['leader']){ $leader = $tmp; } if($row['id'] == $clan['co_leader']){ $coleader = $tmp; } } $inv_qry = mysql_query('SELECT userid, TIMESTAMPDIFF(HOUR, now(), valid) as till FROM user_clan_invitations WHERE clanid = '.$clan['id'].' and valid > now()'); $invited = array(); while($row = mysql_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 { echo ''; } } else{ echo ''; } ?> '.$coleader.''; } ?> 0) { ?> 0) { ?> '.$clan['homepage'].''; } else{ echo ''; } ?>
Info
Leader: Keine Leader'.$leader.'
Co-Leader:
Clanzeichen:
Member (): ',$member); ?>
Eingeladen: ', $invited); ?>
Herausforderungen: ', $openChallengeRequestsDisplay); ?>
Level:
Erfahrung:
ELO-Wertung:
Homepage: Keine
Info:
 
Nachricht an alle Clanmember schicken
 
 
verlassen)'; } else if($kickable){ $member[] = $tmp.' (kicken)'; } else{ $member[] = $tmp; } } $inv_qry = mysql_query('SELECT userid, TIMESTAMPDIFF(HOUR, now(), valid) as till FROM user_clan_invitations WHERE clanid = '.$clan['id'].' and valid > now()'); $invited = array(); while($row = mysql_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 (): ',$member); ?>
Eingeladen: ', $invited); ?>
Herausforderungen: ', $openChallengeRequestsDisplay); ?>
Level:
Erfahrung:
ELO-Wertung:
Homepage:(edit) Keine
Info:(edit)
Clan auflösen Clan löschen
 
Nachricht an alle Clanmember schicken
 
 
weiter...'); } else { displayErrorMessage(NULL,'Nachricht erfolgreich verschickt', 'weiter...'); } } function setProfile($what, $value1, $value2, $clanid, $rootlvl){ if($rootlvl < 1) { return 'Du hast keine Rechte um diese Aktion auszuführen!'; } switch($what){ case 'Homepage': mysql_query('UPDATE clan SET homepage = \''.$value1.'\' where id = '.$clanid); return NULL; case 'Clanzeichen': if(strlen($value1.$value2) > MAX_CHARS_CLANSIGN) { return 'Clanzeichen sind ungültig: Summe aus beiden Teilen darf nicht größer als '.MAX_CHARS_CLANSIGN.' Zeichen sein!'; } mysql_query('UPDATE clan SET clanz_pre = \''.$value1.'\', clanz_suff = \''.$value2.'\' where id = '.$clanid); return NULL; case 'Banner': mysql_query('UPDATE clan SET banner = \''.$value1.'\' where id = '.$clanid); return NULL; case 'Info': mysql_query('UPDATE clan SET Info = \''.$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.'
'; mysql_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.'
'; mysql_query($sql); } 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 'Clanzeichen': $content = 'Prefix: Suffix: '; break; case 'Banner': $content = ''; break; case 'Leadership': $member_qry = mysql_query('Select id, nickname from user where clan = '.$clanid); $member[] = ''; $member2[] = ''; while($row = mysql_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 'ERROR': break; default: $content = 'Error '.$what.' unknown!'; break; } ?>
Ändern
weiter'); $displayMore = false; } break; case 'newsletter': sendClanNewsletter($user_ida, $text); $displayMore = false; break; default: break; } } if($displayMore){ displayClanProfile($clan_id, $user_ida); } ?>