nearly correct replacements -.-

main
hecht 8 years ago
parent 192c09e8d2
commit ce6690a38b

@ -110,7 +110,7 @@ if ($action == 'accept') {
$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'; $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); $clan = db_query($sql);
while ($row = mysqli_fetch_array($clan)) { 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']));
$z_v = array($row['clan_pre'], $row['clan_suff']); $z_v = array($row['clan_pre'], $row['clan_suff']);
?> ?>
@ -133,7 +133,7 @@ if ($action == 'accept') {
<?php <?php
// TODO: Seitenzahlen aus Designfunctions benutzen!!! // TODO: Seitenzahlen aus Designfunctions benutzen!!!
} }
$Total = mysqli_stmt_num_rows(db_query('SELECT id FROM clan')); $Total = mysqli_num_rows(db_query('SELECT id FROM clan'));
$url = '<a href="'.$_SERVER['PHP_SELF'].'?as=clan/add&pagenum=###PAGE###">###LABEL###</a>'; $url = '<a href="'.$_SERVER['PHP_SELF'].'?as=clan/add&pagenum=###PAGE###">###LABEL###</a>';
?> ?>
<tr> <tr>

@ -72,7 +72,7 @@ if((isset($_GET['value1']) || isset($_GET['value2']) || isset($_GET['edited']))
function displayClanProfileReadOnly($clan, $ownclan, $userid){ function displayClanProfileReadOnly($clan, $ownclan, $userid){
$member_qry = db_query('Select id from user where clan = '.$clan['id']); $member_qry = db_query('Select id from user where clan = '.$clan['id']);
$count = mysqli_stmt_num_rows($member_qry); $count = mysqli_num_rows($member_qry);
$member = array(); $member = array();
while($row = mysqli_fetch_assoc($member_qry)){ while($row = mysqli_fetch_assoc($member_qry)){
$tmp = generateUserLinkByID($row['id']); $tmp = generateUserLinkByID($row['id']);
@ -258,7 +258,7 @@ function displayClanProfileReadOnly($clan, $ownclan, $userid){
function displayClanProfileEditable($clan, $userid){ function displayClanProfileEditable($clan, $userid){
$member_qry = db_query('Select id from user where clan = '.$clan['id']); $member_qry = db_query('Select id from user where clan = '.$clan['id']);
$member = array(); $member = array();
$count = mysqli_stmt_num_rows($member_qry); $count = mysqli_num_rows($member_qry);
while($row = mysqli_fetch_assoc($member_qry)){ while($row = mysqli_fetch_assoc($member_qry)){
$tmp = generateUserLinkByID($row['id']); $tmp = generateUserLinkByID($row['id']);
$kickable = true; $kickable = true;

@ -159,7 +159,7 @@ while($row = mysqli_fetch_assoc($qry)){
//print_r($user_raum); //print_r($user_raum);
$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'); $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'; $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';
//echo $sql.'<br>'; //echo $sql.'<br>';

@ -524,7 +524,7 @@ function displayAttackenTypenOverview($page) {
echo "\t".'</tr>'."\n"; echo "\t".'</tr>'."\n";
} }
$total = mysqli_stmt_num_rows(db_query('SELECT '.join($d_array,',').' FROM attackentyp')); $total = mysqli_num_rows(db_query('SELECT '.join($d_array,',').' FROM attackentyp'));
$url = '<a href="'.$_SERVER['PHP_SELF'].'?choose=npc&page=###PAGE###">###LABEL###</a>'; $url = '<a href="'.$_SERVER['PHP_SELF'].'?choose=npc&page=###PAGE###">###LABEL###</a>';
echo "\t".'<tr><td colspan="'.$colspan.'"><hr></td></tr>'."\n"; echo "\t".'<tr><td colspan="'.$colspan.'"><hr></td></tr>'."\n";
echo "\t".'<tr><td colspan="'.$colspan.'">'.displayPagelinksNew(20, $total, $page, $url).'</td></tr>'."\n"; echo "\t".'<tr><td colspan="'.$colspan.'">'.displayPagelinksNew(20, $total, $page, $url).'</td></tr>'."\n";

@ -39,7 +39,7 @@ function displayItems($action, $task, $itemid, $itemtable, $searchstring, $s_ite
} }
$qry = db_query($sql.' LIMIT '.($page*20).', 20'); $qry = db_query($sql.' LIMIT '.($page*20).', 20');
// echo $sql.' LIMIT '.($page*30).', 30'; // echo $sql.' LIMIT '.($page*30).', 30';
$anzahlSeiten = ceil(mysqli_stmt_num_rows(db_query($sql))/20); $anzahlSeiten = ceil(mysqli_num_rows(db_query($sql))/20);
$colspan = 3; $colspan = 3;
echo "\t\t\t".'<tr><td colspan="'.$colspan.'"><h1 style="text-align:center">Bearbeiten</h1></td></tr>'."\n";; echo "\t\t\t".'<tr><td colspan="'.$colspan.'"><h1 style="text-align:center">Bearbeiten</h1></td></tr>'."\n";;
$o_array = array('-Alle-', 'Markt Items', 'Schatzsuche Items', 'Auktionsitems'); $o_array = array('-Alle-', 'Markt Items', 'Schatzsuche Items', 'Auktionsitems');

@ -417,7 +417,7 @@ function displayNPCOverview($page) {
echo "\t".'</tr>'."\n"; echo "\t".'</tr>'."\n";
} }
$total = mysqli_stmt_num_rows(db_query('SELECT '.join($d_array,',').' from chars where rasse IN ('.implode(',', $include_race_ids).')')); $total = mysqli_num_rows(db_query('SELECT '.join($d_array,',').' from chars where rasse IN ('.implode(',', $include_race_ids).')'));
$url = '<a href="'.$_SERVER['PHP_SELF'].'?choose=npc&page=###PAGE###">###LABEL###</a>'; $url = '<a href="'.$_SERVER['PHP_SELF'].'?choose=npc&page=###PAGE###">###LABEL###</a>';
echo "\t".'<tr><td colspan="'.$colspan.'"><hr></td></tr>'."\n"; echo "\t".'<tr><td colspan="'.$colspan.'"><hr></td></tr>'."\n";
echo "\t".'<tr><td colspan="'.$colspan.'">'.displayPagelinksNew(20, $total, $page, $url).'</td></tr>'."\n"; echo "\t".'<tr><td colspan="'.$colspan.'">'.displayPagelinksNew(20, $total, $page, $url).'</td></tr>'."\n";

@ -240,7 +240,7 @@ function displayRassen($request) {
<th align="center" colspan="2">Aktion</th> <th align="center" colspan="2">Aktion</th>
</tr> </tr>
<?php <?php
$num = mysqli_stmt_num_rows(db_query('SELECT * FROM rassen_type')); $num = mysqli_num_rows(db_query('SELECT * FROM rassen_type'));
if($num == 0) { if($num == 0) {
echo '<tr><th colspan="4"><a href="?choose=rassen&setup=1">setup rassen database</a></th></tr>'; echo '<tr><th colspan="4"><a href="?choose=rassen&setup=1">setup rassen database</a></th></tr>';
} else { } else {

@ -11,18 +11,18 @@ include_once(ROOT_PATH.'//include/designfunctions.inc.php');
include_once (ROOT_PATH . '/include/clan.inc.php'); include_once (ROOT_PATH . '/include/clan.inc.php');
include_once (ROOT_PATH . '/include/clan_chat.inc.php'); include_once (ROOT_PATH . '/include/clan_chat.inc.php');
$itemsx1 = mysqli_stmt_num_rows(db_query("SELECT id FROM sp_ware WHERE item='1' AND user='$user_ida[id]'")); $itemsx1 = mysqli_num_rows(db_query("SELECT id FROM sp_ware WHERE item='1' AND user='$user_ida[id]'"));
$itemsz1 = mysqli_fetch_array(db_query("SELECT id FROM sp_ware WHERE item='1' AND user='$user_ida[id]' LIMIT 1")); $itemsz1 = mysqli_fetch_array(db_query("SELECT id FROM sp_ware WHERE item='1' AND user='$user_ida[id]' LIMIT 1"));
$itemsx2 = mysqli_stmt_num_rows(db_query("SELECT id FROM sp_ware WHERE item='2' AND user='$user_ida[id]'")); $itemsx2 = mysqli_num_rows(db_query("SELECT id FROM sp_ware WHERE item='2' AND user='$user_ida[id]'"));
$itemsz2 = mysqli_fetch_array(db_query("SELECT id FROM sp_ware WHERE item='2' AND user='$user_ida[id]' LIMIT 1")); $itemsz2 = mysqli_fetch_array(db_query("SELECT id FROM sp_ware WHERE item='2' AND user='$user_ida[id]' LIMIT 1"));
$anmeldungen = mysqli_stmt_num_rows(db_query("SELECT id FROM user")); $anmeldungen = mysqli_num_rows(db_query("SELECT id FROM user"));
$db_info = mysqli_stmt_num_rows(db_query("SELECT id FROM sp_ware WHERE user='$user_ida[id]' AND item='11'")); $db_info = mysqli_num_rows(db_query("SELECT id FROM sp_ware WHERE user='$user_ida[id]' AND item='11'"));
$user_info_test = mysqli_fetch_array(db_query("SELECT geld FROM user WHERE nickname='$name' LIMIT 1")); $user_info_test = mysqli_fetch_array(db_query("SELECT geld FROM user WHERE nickname='$name' LIMIT 1"));
//$nnn_nn = mysqli_stmt_num_rows(db_query("SELECT id FROM nachricht WHERE besitzer='$user_ida[id]' AND ag='neu'")); //$nnn_nn = mysqli_num_rows(db_query("SELECT id FROM nachricht WHERE besitzer='$user_ida[id]' AND ag='neu'"));
//echo $nnn_nn; //echo $nnn_nn;
$zeit = date("H:i:s"); $zeit = date("H:i:s");
$date = date("d.m.y"); $date = date("d.m.y");

@ -59,7 +59,7 @@ function calculateRenovierungsKosten($arena){
function getArena($user_id) { function getArena($user_id) {
$sql_select = 'SELECT * FROM arena where besitzer = \''.$user_id.'\''; $sql_select = 'SELECT * FROM arena where besitzer = \''.$user_id.'\'';
$qry = db_query($sql_select); $qry = db_query($sql_select);
if(mysqli_stmt_num_rows($qry) == 0) { if(mysqli_num_rows($qry) == 0) {
$sql = 'INSERT arena(besitzer, exp) values (\''.$user_id.'\', \'0,'.calculateRequiredExpArena(1).'\')'; $sql = 'INSERT arena(besitzer, exp) values (\''.$user_id.'\', \'0,'.calculateRequiredExpArena(1).'\')';
db_query($sql); db_query($sql);
$qry = db_query($sql_select); $qry = db_query($sql_select);

@ -28,7 +28,7 @@ include_once(ROOT_PATH.'/include/semaphore.inc.php');
// @Return Integer // @Return Integer
function aktuellesMindestgebot($auktionsid){ function aktuellesMindestgebot($auktionsid){
$qry = db_query('SELECT aktuellesgebot, startgebot FROM auktion WHERE auktionsid = '.$auktionsid); $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; return -1;
} }
$result = mysqli_fetch_assoc($qry); // Hole dir den einen Datensatz $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'; $test = 'SELECT count(auktionsid) as anzahl FROM auktion WHERE 1 '.$kategorieDelimitier.$stringDelimiter.$priceDelimiter.' AND TIMESTAMPDIFF(Minute,now(),deadline) >= 0';
$qry = db_query($test); $qry = db_query($test);
if(mysqli_stmt_num_rows($qry) == 0){ if(mysqli_num_rows($qry) == 0){
return 0; return 0;
} }
$result = mysqli_fetch_assoc($qry); $result = mysqli_fetch_assoc($qry);
@ -305,7 +305,7 @@ function getAuktionEntries($kategorie,$itemnamepart,$entriesPerSite,$pageNumber,
function getEntryInformation($auktionsid){ function getEntryInformation($auktionsid){
if(!is_numeric($auktionsid)){return;} 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); $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);
if(mysqli_stmt_num_rows($qry) == 0){ return NULL; } if(mysqli_num_rows($qry) == 0){ return NULL; }
return mysqli_fetch_assoc($qry); return mysqli_fetch_assoc($qry);
} }

@ -17,11 +17,11 @@ function isSpammer($id){
function becomeSpammer($id,$nick,$text){ function becomeSpammer($id,$nick,$text){
// Es gibt 2 indikatoren ein Spammer zu sein // Es gibt 2 indikatoren ein Spammer zu sein
// Man schreibt min 10 posts innerhalb von 20 Sekunden // 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 // 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!! // 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 // Und nun noch ein paar Aergernisse
@ -40,7 +40,7 @@ function becomeSpammer($id,$nick,$text){
} }
function setSpamblock($id){ 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)); $zeit = pow(5,($anzahl+1));
db_query('INSERT INTO spammer(userid, bann_until) values('.$id.',TIMESTAMPADD(Minute,'.$zeit.',now()))'); db_query('INSERT INTO spammer(userid, bann_until) values('.$id.',TIMESTAMPADD(Minute,'.$zeit.',now()))');
} }

@ -48,7 +48,7 @@ function checkAccessRights($user_id, $clan_chat_id) {
if(!$qry) { if(!$qry) {
return false; return false;
} }
return mysqli_stmt_num_rows($qry); return mysqli_num_rows($qry);
} }
function sendClanChatMessage($user_id, $clan_chat_id, $message) { function sendClanChatMessage($user_id, $clan_chat_id, $message) {

@ -58,7 +58,7 @@ if(!checkCookiePassword($name, $passwort)){
} }
} }
$banned_accs = mysqli_stmt_num_rows(db_query("SELECT id FROM user WHERE ip!='' AND ip='$user_ida[ip]' AND id!='$user_ida[id]' LIMIT 2")); $banned_accs = mysqli_num_rows(db_query("SELECT id FROM user WHERE ip!='' AND ip='$user_ida[ip]' AND id!='$user_ida[id]' LIMIT 2"));
if ($user_ida['id'] != null) { if ($user_ida['id'] != null) {
$as = 'profil'; $as = 'profil';

@ -19,7 +19,7 @@ $main_db_name = "otherdatabasename";
$GLOBALS['mumble_db_name'] = "anotheradatabasename"; $GLOBALS['mumble_db_name'] = "anotheradatabasename";
if(!isset($conn)){ if(!isset($conn)){
$conn = mysql_connect($db_host, $db_user, $db_passwort); $conn = mysqli_connect($db_host, $db_user, $db_passwort);
$db = mysql_select_db($db_name, $conn); $db = mysql_select_db($db_name, $conn);
} }
?> ?>

@ -18,7 +18,7 @@
include_once "parse.inc.php"; include_once "parse.inc.php";
function stimme($pollid, $polloptionid, $userid, $kommentar){ function stimme($pollid, $polloptionid, $userid, $kommentar){
if(mysqli_stmt_num_rows(db_query('SELECT * FROM poll_votes WHERE pollid = '.$pollid.' and userid = '.$userid)) == 0){ if(mysqli_num_rows(db_query('SELECT * FROM poll_votes WHERE pollid = '.$pollid.' and userid = '.$userid)) == 0){
// NEU einfuegen! // NEU einfuegen!
$sql = 'INSERT INTO poll_votes(pollid, polloptionid, userid, comment) values ('.$pollid.','.$polloptionid.','.$userid.',\''.$kommentar.'\')'; $sql = 'INSERT INTO poll_votes(pollid, polloptionid, userid, comment) values ('.$pollid.','.$polloptionid.','.$userid.',\''.$kommentar.'\')';
db_query($sql); db_query($sql);

@ -21,7 +21,7 @@ include_once(ROOT_PATH.'/include/messagefunctions.inc.php');
// Fuer den Transit von register_globals auf normal // Fuer den Transit von register_globals auf normal
$name = $user_ida['nickname']; $name = $user_ida['nickname'];
$passwort = $user_ida['passwort']; $passwort = $user_ida['passwort'];
$nnn_nn = mysqli_stmt_num_rows(db_query("SELECT id FROM nachricht WHERE besitzer='$user_ida[id]' AND ag='neu'")); $nnn_nn = mysqli_num_rows(db_query("SELECT id FROM nachricht WHERE besitzer='$user_ida[id]' AND ag='neu'"));
$as = $_REQUEST['as']; $as = $_REQUEST['as'];
$agb = $_REQUEST['agb']; $agb = $_REQUEST['agb'];

@ -451,7 +451,7 @@ if (!empty($type) AND empty($fruchttyp)) {
$link = "pagenum=$pagenum&order_art=$order_art&last_klick1=$last_klick1"; $link = "pagenum=$pagenum&order_art=$order_art&last_klick1=$last_klick1";
if ($p) { if ($p) {
if ($_GET['search']) { if ($_GET['search']) {
$anzahl_atks = mysqli_stmt_num_rows(db_query("SELECT id FROM attacken WHERE name LIKE '%".trim($search)."%'")); $anzahl_atks = mysqli_num_rows(db_query("SELECT id FROM attacken WHERE name LIKE '%".trim($search)."%'"));
if ($anzahl_atks == 1) { if ($anzahl_atks == 1) {
$at_z = mysqli_fetch_array(db_query("SELECT id FROM attacken WHERE name='".trim($search)."' LIMIT 1")); $at_z = mysqli_fetch_array(db_query("SELECT id FROM attacken WHERE name='".trim($search)."' LIMIT 1"));
if (empty($at_z)) { if (empty($at_z)) {

@ -130,7 +130,7 @@ while($row = mysqli_fetch_array($item)) {
} }
$Total = mysqli_stmt_num_rows(db_query("SELECT id FROM item")); $Total = mysqli_num_rows(db_query("SELECT id FROM item"));
$pages = ceil($Total/10); $pages = ceil($Total/10);
$z = 1; $z = 1;

@ -76,7 +76,7 @@ function starteFight($chara_1, $chara_2, $kampf_info){
function erstelleEinenFight($charid, &$user, $kampf_name, $kampf_pw, $kampf_zeit, $lvl){ function erstelleEinenFight($charid, &$user, $kampf_name, $kampf_pw, $kampf_zeit, $lvl){
// Ermittle ob der User eine Funktionierende Arena besitzt! // Ermittle ob der User eine Funktionierende Arena besitzt!
$qry = db_query('Select * from arena where besitzer = '.$user['id']); $qry = db_query('Select * from arena where besitzer = '.$user['id']);
if(mysqli_stmt_num_rows($qry) == 0){ if(mysqli_num_rows($qry) == 0){
db_query('INSERT arena(besitzer, exp) values (\''.$user_ida['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')'); db_query('INSERT arena(besitzer, exp) values (\''.$user_ida['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')');
$arena = db_query('Select * from arena where besitzer = '.$user['id']); $arena = db_query('Select * from arena where besitzer = '.$user['id']);
} }
@ -447,7 +447,7 @@ function displayKampfErstellen($user, $portal, $pagenum){
// Ermittle ob der User eine Funktionierende Arena besitzt! // Ermittle ob der User eine Funktionierende Arena besitzt!
$qry = db_query('Select * from arena where besitzer = '.$user['id']); $qry = db_query('Select * from arena where besitzer = '.$user['id']);
$arena = mysqli_fetch_assoc($qry); $arena = mysqli_fetch_assoc($qry);
if(mysqli_stmt_num_rows($qry) == 0){ if(mysqli_num_rows($qry) == 0){
db_query('INSERT arena(besitzer, exp) values (\''.$user_ida['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')'); db_query('INSERT arena(besitzer, exp) values (\''.$user_ida['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')');
$arena = mysqli_fetch_assoc(db_query('Select * from arena where besitzer = '.$user['id'])); $arena = mysqli_fetch_assoc(db_query('Select * from arena where besitzer = '.$user['id']));
} }

@ -235,14 +235,14 @@ exit;
while($row2 = mysqli_fetch_array($user_item)) { while($row2 = mysqli_fetch_array($user_item)) {
$user_items = mysqli_stmt_num_rows(db_query("SELECT id FROM ware WHERE item_id='$row2[id]' AND user='$user_ida[id]' LIMIT 100")); $user_items = mysqli_num_rows(db_query("SELECT id FROM ware WHERE item_id='$row2[id]' AND user='$user_ida[id]' LIMIT 100"));
if($user_items) { if($user_items) {
$STORE_ITEMS .= "".$row2['name']." x ".$user_items."<br>"; $STORE_ITEMS .= "".$row2['name']." x ".$user_items."<br>";
} }
} }
$Total = mysqli_stmt_num_rows(db_query("SELECT id FROM item WHERE preis>0 and $filter AND s_type='$ords'")); $Total = mysqli_num_rows(db_query("SELECT id FROM item WHERE preis>0 and $filter AND s_type='$ords'"));
$pages = ceil($Total/10); $pages = ceil($Total/10);
$z = 1; $z = 1;

@ -40,7 +40,7 @@ function deleteFromIgnorelist($userid, $ignoredUserId){ //charm 7
} }
function insertInIgnorelist($userid, $ignorename){ /// if($charm == 6) { function insertInIgnorelist($userid, $ignorename){ /// if($charm == 6) {
$ignore_user = mysqli_fetch_array(db_query('SELECT id FROM user WHERE nickname=\''.$ignorename.'\'')); $ignore_user = mysqli_fetch_array(db_query('SELECT id FROM user WHERE nickname=\''.$ignorename.'\''));
$bereits_ignoriert = mysqli_stmt_num_rows(db_query('SELECT id FROM ignolist WHERE besitzer='.$userid.' AND user='.$ignore_user['id'])); $bereits_ignoriert = mysqli_num_rows(db_query('SELECT id FROM ignolist WHERE besitzer='.$userid.' AND user='.$ignore_user['id']));
$fehler_m = ''; $fehler_m = '';
$weiter_an = '<a href="index.php?as=nachricht&charm=5">weiter...</a>'; $weiter_an = '<a href="index.php?as=nachricht&charm=5">weiter...</a>';
if($bereits_ignoriert) { if($bereits_ignoriert) {
@ -147,7 +147,7 @@ function sendMessageForumlar($userid,$username,$besitzer,$betreff,$text){// if($
$weiter_an = '<a href="index.php?as=nachricht&charm=1">weiter...</a>'; $weiter_an = '<a href="index.php?as=nachricht&charm=1">weiter...</a>';
if(isset($besitzer) && isset($text)) { if(isset($besitzer) && isset($text)) {
$user_erf = mysqli_fetch_assoc(db_query('SELECT id FROM user WHERE nickname=\''.$besitzer.'\'')); $user_erf = mysqli_fetch_assoc(db_query('SELECT id FROM user WHERE nickname=\''.$besitzer.'\''));
$igno_user = mysqli_stmt_num_rows(db_query('SELECT id FROM ignolist WHERE besitzer='.$user_erf['id'].' AND user='.$userid)); $igno_user = mysqli_num_rows(db_query('SELECT id FROM ignolist WHERE besitzer='.$user_erf['id'].' AND user='.$userid));
if($igno_user) { if($igno_user) {
displayErrorMessage(NULL,'Fehler, der Nutzer '.$besitzer.' hat dich auf seiner Ignorierliste',$weiter_an); displayErrorMessage(NULL,'Fehler, der Nutzer '.$besitzer.' hat dich auf seiner Ignorierliste',$weiter_an);

@ -18,7 +18,7 @@ include_once(ROOT_PATH.'/include/char.inc.php');
$wahl = validateStringCritical($_GET['wahl']); $wahl = validateStringCritical($_GET['wahl']);
$char_name = validateName($_GET['char_name']); $char_name = validateName($_GET['char_name']);
$char_vorhanden = mysqli_stmt_num_rows(db_query('SELECT id FROM chars WHERE name like \''.$char_name.'%\' LIMIT 1')); $char_vorhanden = mysqli_num_rows(db_query('SELECT id FROM chars WHERE name like \''.$char_name.'%\' LIMIT 1'));
function displayHighscore($wahl, $char_name, $user, $char_vorhanden){ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){

@ -69,13 +69,13 @@ function anmelden($user, $charid, $art){
$anzahl = 64; $anzahl = 64;
} }
// sehr speziell und deswegen nicht getChar(); // 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) { if(!$PRUEF) {
displayErrorMessage(NULL,'Charakter erf&uuml;llt die Bestimungen nicht!','<a href="index.php?as=turnier&art='.$art.'">weiter...</a>'); displayErrorMessage(NULL,'Charakter erf&uuml;llt die Bestimungen nicht!','<a href="index.php?as=turnier&art='.$art.'">weiter...</a>');
return; 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) { if($sear_a >= $anzahl) {
displayErrorMessage(NULL,'Turnier voll! Es k&uuml;nnen maximal nur '.$anzahl.' Chars am Turnier teilnehmen','<a href="index.php?as=turnier&art='.$art.'">weiter...</a>'); displayErrorMessage(NULL,'Turnier voll! Es k&uuml;nnen maximal nur '.$anzahl.' Chars am Turnier teilnehmen','<a href="index.php?as=turnier&art='.$art.'">weiter...</a>');
return; return;

@ -41,7 +41,7 @@ if(!$turnier['id']) {
displayErrorMessage(NULL,'Turnier fand noch nicht statt!',$back); displayErrorMessage(NULL,'Turnier fand noch nicht statt!',$back);
} }
else if($charm == 1) { else if($charm == 1) {
$max_turnier = mysqli_stmt_num_rows(db_query('SELECT id FROM turnier_kampf WHERE art=\''.$art.'\'')); $max_turnier = mysqli_num_rows(db_query('SELECT id FROM turnier_kampf WHERE art=\''.$art.'\''));
echo '<link rel="stylesheet" type="text/css" href="design/style3.css">'; echo '<link rel="stylesheet" type="text/css" href="design/style3.css">';
$turnier_date = date('d.m.Y'); $turnier_date = date('d.m.Y');

Loading…
Cancel
Save