$sql = 'SELECT c.clanz_pre, c.clanz_suff, c.clanname, c.geld, c.info, c.id, c.leader FROM clan c ORDER BY '.$poll1.' '.$poll2.' LIMIT '.($pagenum*20).',20';
$clan = db_query($sql);
while ($row = mysqli_fetch_array($clan)) {
$mitglieder = mysqli_stmt_num_rows(db_query('SELECT id FROM user WHERE clan='.$row['id']));
$mitglieder = mysqli_num_rows(db_query('SELECT id FROM user WHERE clan='.$row['id']));
$clans_spend = db_query('SELECT spende, nickname, user.id as userid FROM user left join user_clan on user.id = user_clan.userid and user.clan = user_clan.clanid WHERE user.clan = '.$user_ida['clan'].' ORDER BY spende DESC');
$member = mysqli_stmt_num_rows($clans_spend);
$member = mysqli_num_rows($clans_spend);
$sql = 'select besitzer, round(sum(1/(1+exp(3-level/12)) * nutzung)) as nutzkosten from user inner join chars on chars.besitzer = user.id inner join clan_ware on chars.clan_train = clan_ware.id inner join clan_item on clan_ware.item_id = clan_item.id where user.clan = clan_ware.clan and user.clan = '.$user_ida['clan'].' group by besitzer order by besitzer';
$qry = db_query('SELECT aktuellesgebot, startgebot FROM auktion WHERE auktionsid = '.$auktionsid);
if(mysqli_stmt_num_rows($qry) != 1){ // Auktion nicht vorhanden??
if(mysqli_num_rows($qry) != 1){ // Auktion nicht vorhanden??
return -1;
}
$result = mysqli_fetch_assoc($qry); // Hole dir den einen Datensatz
@ -268,7 +268,7 @@ function getAuktionTotalCount($kategorie,$itemnamepart,$maxPrice){
}
$test = 'SELECT count(auktionsid) as anzahl FROM auktion WHERE 1 '.$kategorieDelimitier.$stringDelimiter.$priceDelimiter.' AND TIMESTAMPDIFF(Minute,now(),deadline) >= 0';
$qry = db_query($test);
if(mysqli_stmt_num_rows($qry) == 0){
if(mysqli_num_rows($qry) == 0){
return 0;
}
$result = mysqli_fetch_assoc($qry);
@ -305,7 +305,7 @@ function getAuktionEntries($kategorie,$itemnamepart,$entriesPerSite,$pageNumber,
function getEntryInformation($auktionsid){
if(!is_numeric($auktionsid)){return;}
$qry = db_query('SELECT u.nickname AS anbietername, u2.nickname AS bietername, a.auktionsid,a.anbieter,a.bieter,a.itemid,a.itemname,a.tablename,a.anzahl,a.startgebot,a.aktuellesgebot,a.deadline,a.startdate,a.cheatingverdacht, TIMESTAMPDIFF(Minute,now(),deadline) AS zeitdifferenz FROM auktion AS a INNER JOIN user as u ON a.anbieter = u.id LEFT JOIN user as u2 ON a.bieter = u2.id WHERE auktionsid = '.$auktionsid);
// Man schreibt min 10 posts innerhalb von 20 Sekunden
$result1 = mysqli_stmt_num_rows(db_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 20'));
$result1 = mysqli_num_rows(db_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 20'));
// Man schreibt min 30 Posts innerhalb einer Minute
$result2 = mysqli_stmt_num_rows(db_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 60'));
$result2 = mysqli_num_rows(db_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 60'));
// Innerhalb einer halben Minute 4 mal den selben Post!!
$result3 = mysqli_stmt_num_rows(db_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' AND TIMESTAMPDIFF(Second,zeit,now()) <= 30 AND nachricht = \''.$text.'\''));
$result3 = mysqli_num_rows(db_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' AND TIMESTAMPDIFF(Second,zeit,now()) <= 30 AND nachricht = \''.$text.'\''));
// Und nun noch ein paar Aergernisse
@ -40,7 +40,7 @@ function becomeSpammer($id,$nick,$text){
}
function setSpamblock($id){
$anzahl = mysqli_stmt_num_rows(db_query('SELECT * FROM spammer WHERE userid='.$id.' AND TIMESTAMPDIFF(Day,bann_until,now()) <=14'));
$anzahl = mysqli_num_rows(db_query('SELECT * FROM spammer WHERE userid='.$id.' AND TIMESTAMPDIFF(Day,bann_until,now()) <=14'));
$zeit = pow(5,($anzahl+1));
db_query('INSERT INTO spammer(userid, bann_until) values('.$id.',TIMESTAMPADD(Minute,'.$zeit.',now()))');
@ -69,13 +69,13 @@ function anmelden($user, $charid, $art){
$anzahl = 64;
}
// sehr speziell und deswegen nicht getChar();
$PRUEF = mysqli_stmt_num_rows(db_query('SELECT id FROM chars WHERE id=\''.$charid.'\' '.$special_clue.' AND besitzer=\''.$user['id'].'\' LIMIT 1'));
$PRUEF = mysqli_num_rows(db_query('SELECT id FROM chars WHERE id=\''.$charid.'\' '.$special_clue.' AND besitzer=\''.$user['id'].'\' LIMIT 1'));
if(!$PRUEF) {
displayErrorMessage(NULL,'Charakter erfüllt die Bestimungen nicht!','<ahref="index.php?as=turnier&art='.$art.'">weiter...</a>');
return;
}
$sear_a = mysqli_stmt_num_rows(db_query('SELECT id FROM turnier1 WHERE art=\''.$art.'\''));
$sear_a = mysqli_num_rows(db_query('SELECT id FROM turnier1 WHERE art=\''.$art.'\''));
if($sear_a >= $anzahl) {
displayErrorMessage(NULL,'Turnier voll! Es künnen maximal nur '.$anzahl.' Chars am Turnier teilnehmen','<ahref="index.php?as=turnier&art='.$art.'">weiter...</a>');