only show "abholen" if there is something to grab!

main
hecht 13 years ago
parent 923baaf625
commit 8017753607

@ -108,7 +108,7 @@ echo "<b> $kampf_a1[name] vs. $kampf_a2[name]";
} }
#######################Clan Kampf #######################Clan Kampf
if($ab == "Clanfight") { if($ab == "Clanfight" && isEventToFetchAwaiting($char_id)) {
echo "<SCRIPT language='JavaScript'>"; echo "<SCRIPT language='JavaScript'>";
?> ?>

@ -172,6 +172,12 @@ function getEventStatusBlocked($charid) {
return $row[0]; return $row[0];
} }
function isEventToFetchAwaiting($charid) {
$sql = 'SELECT count(*) FROM event_chars e WHERE abgeholt = 1 AND char_id = ' .$charid;
$row = mysql_fetch_row(mysql_query($sql));
return $row[0] > 0;
}
function getEventIdsToFetch($charid) { function getEventIdsToFetch($charid) {
$sql = 'SELECT event_id FROM event_chars e WHERE block_end < now() and abgeholt = 1 AND char_id = ' .$charid; $sql = 'SELECT event_id FROM event_chars e WHERE block_end < now() and abgeholt = 1 AND char_id = ' .$charid;
$qry = mysql_query($sql); $qry = mysql_query($sql);

Loading…
Cancel
Save