@ -44,7 +44,7 @@ function checkAccessRights($user_id, $clan_chat_id) {
if($user_id == NULL) {
return false;
}
$qry = db_query('SELECT clan_chat_id FROM clan_chatroom_clans cc INNER JOIN user u ON cc.clan_id = u.clan WHERE cc.clan_chat_id = ' . $clan_chat_id . ' and u.id = ' .$user_id);
$qry = silent_query('SELECT clan_chat_id FROM clan_chatroom_clans cc INNER JOIN user u ON cc.clan_id = u.clan WHERE cc.clan_chat_id = ' . $clan_chat_id . ' and u.id = ' .$user_id);
@ -187,8 +187,6 @@ function isEventToFetchAwaiting($charid) {
function getEventIdsToFetch($char_id) {
$sql = 'SELECT event_id FROM event_chars e WHERE block_end <now()andabgeholt =FALSEANDchar_id =' .$char_id . 'ORDERBYevent_idASC';
$qry = db_query($sql);
if(!$qry)
echo $sql . '<br>';
$result = array();
while ($row = mysqli_fetch_row($qry)) {
@ -256,8 +254,6 @@ function abholenChar(array $user, $event_id, $char_id) {
// Okay and now we want to learn the attacks :)
$sql = 'SELECT attack, count(attack) as anzahl FROM event_fight_rounds e where event_id = ' . $event_id . ' AND event_char_id = ' . $char_id . ' group by attack';
$qry = db_query($sql);
if(!$qry)
echo $sql .'<br>';
$attacken_usage = array();
while($row = mysqli_fetch_assoc($qry)) {
@ -268,8 +264,6 @@ function abholenChar(array $user, $event_id, $char_id) {
$sql = 'UPDATE event_chars SET abgeholt = TRUE WHERE char_id = ' . $char_id . ' AND event_id = ' . $event_id;
$qry = db_query($sql);
if(!$qry)
echo $sql .'<br>';
semaphoreDown($ressource); // free the previously reserved semaphore!
return $fight_ids; // Return the fight ids that the char has participated in!
@ -319,8 +313,6 @@ function getEventFightIds($event_id) {
function getEventFightIdsByChar($event_id, $event_char_id) {
$sql = 'SELECT event_fight_id FROM event_fight_rounds where event_id = ' . $event_id . ' AND event_char_id = ' . $event_char_id . ' AND `round` = 0 ORDER BY event_fight_id ASC';
$qry = db_query($sql);
if(!$qry)
echo $sql . '<br>';
while($row = mysqli_fetch_assoc($qry)) {
$result[]= $row['event_fight_id'];
}
@ -331,10 +323,6 @@ function getEventFightRoundData($event_id, $event_fight_id, $round) {
$sql = 'SELECT * FROM event_fight_rounds WHERE event_id = ' . $event_id . ' AND event_fight_id = ' . $event_fight_id . ' AND `round` = ' .$round;