@ -529,15 +529,25 @@ function isClanLocked($clanid) {
// INSERT
// INSERT
$sql = 'INSERT INTO clan_locked(clanid, locked_until) values('.$clanid.', TIMESTAMPADD(HOUR, 24, CURRENT_TIMESTAMP))';
$sql = 'INSERT INTO clan_locked(clanid, locked_until) values('.$clanid.', TIMESTAMPADD(HOUR, 24, CURRENT_TIMESTAMP))';
// echo $sql.'<br>';
// echo $sql.'<br>';
mysql_query($sql);
$res = mysql_query($sql);
if(!$res)
echo $sql . '<br>';
mysql_query('UPDATE clan_challenge_requests SET active = FALSE WHERE (clan_challenged = '.$clanid.' OR clan_requester = '.$clanid);
mysql_query('UPDATE clan_challenge_requests SET active = FALSE WHERE (clan_challenged = '.$clanid.' OR clan_requester = '.$clanid);
mysql_query('DELETE FROM clan_challenges WHERE calculated = FALSE AND clan_challenge_id IN (SELECT clan_challenge_id from clan_challenge_clans WHERE clan_id = '.$clanid.')');
mysql_query('DELETE FROM clan_challenges WHERE calculated = FALSE AND clan_challenge_id IN (SELECT clan_challenge_id from clan_challenge_clans WHERE clan_id = '.$clanid.')');