Phenom
Вторник, 20.03.2012, 02:26 | Сообщение # 1
Всем привет.Столкнулся с варнингами на сайте.Выручайте Code
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in K:\home\мой айпи\www\online1.php on line 24
<? require_once ('conf.php'); mysql_connect ("localhost","mangos","mangos"); ?> <? mysql_selectdb ("$dbc"); $online = mysql_query ("select count(*) from characters where online = 1"); $online = mysql_result ($online,0); $allianceonline = mysql_query ("select count(*) from characters where online = 1 and race in (1,3,4,7,11)"); $allianceonline = mysql_result ($allianceonline,0); $hordeonline = mysql_query ("select count(*) from characters where online = 1 and race in (2,5,6,8,10)"); $hordeonline = mysql_result ($hordeonline,0); mysql_selectdb ("$dbr"); $max = mysql_query ("select max(`maxplayers`) from uptime"); $max = mysql_result ($max,0); echo "<b> Игроков Онлайн: $online</b><br>"; echo "<font color=blue>Альянса Онлайн: $allianceonline</font><br>"; echo "<font color=red>Орды Онлайн: $hordeonline</font><br>"; mysql_select_db ("characters"); mysql_query("set names cp1251"); $result = mysql_query ("select name, race, class, data from characters where online = 1"); $num_online = mysql_num_rows($results); $class = array(1=>"Воин",2=>"Паладин",3=>"Охотник",4=>"Разбойник",5=>"Жрец",6=>"Рыцарь Смерти",7=>"Шаман",8=>"Маг",9=>"Чернокнижник",11=>"Друид"); $race = array(1=>"Человек",2=>"Орк",3=>"Дворф",4=>"Ночной Эльф",5=>"Нежить",6=>"Таурен",7=>"Гном",8=>"Тролль",10=>"Эльф Крови",11=>"Дреней"); ?> </div> <center> <table border="1" width="90%"> <tr> <td><b>Имя: </b></td> <td><b>Раса: </b></td> <td><b>Класс: </b> </td> <td><b>Уровень: </b></td> </tr> </center> <? if($num_online < 1) { echo "<tr><td colspan='4' align='center'>Онлайн игроков нет!</td></tr>"; } for($i=0;$i<$num_online;$i++) { $row = mysql_fetch_array($result); $ch_name = $row['name']; $ch_race = $row['race']; $ch_class = $row['class']; $char_data = explode(' ',$row['data']); $ch_lvl = $char_data[53]; echo "<tr><td><font color=red>$ch_name </font></td>"; echo "<td>$race[$ch_race] </td>"; echo "<td>$class[$ch_class] </td>"; echo "<td>$ch_lvl </td></tr>"; } ?> </table
Code
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in K:\home\мой айпи\www\lk\manage.php on line 114
<?php /** Сделано с любовью. Для mangos.ru email: TIMzs@211.ru icq: 290-110-929 WebMoney: R113588578444 Z173815491984 **/ include('include/loginf.php'); include('include/config.php'); include('include/functions.php'); include('include/lang.php'); open(); selectDb('realmd'); $prehled_realmd = "SELECT * FROM account WHERE id=$id LIMIT 1"; $prehled_realmd_vypis = mysql_fetch_array(mysql_query($prehled_realmd)); $sql = "SELECT * FROM account_banned WHERE unbandate=(SELECT MAX(unbandate) FROM account_banned WHERE active=1 and id=$id)"; $row = mysql_fetch_array(mysql_query($sql)); $email = $prehled_realmd_vypis["email"]; $typ = getExpansion($prehled_realmd_vypis["expansion"]); $vytvoreno = $prehled_realmd_vypis["joindate"]; $last_login = $prehled_realmd_vypis["last_login"]; $last_ip = $prehled_realmd_vypis["last_ip"]; $locked = $prehled_realmd_vypis["locked"]; $online = $prehled_realmd_vypis["online"]; @$locale = getLocale($prehled_realmd_vypis["locale"]); $bonuses = $prehled_realmd_vypis["bonuses"]; $bandate = $row["bandate"]; $unbandate = $row["unbandate"]; $bannedby = $row["bannedby"]; $banreason = $row["banreason"]; include ('templates/'.$them.'/vrch.php'); include ('include/log_info.php') ?> <?php if ($row!=''){$ban = "<font color='red'>Да</font>";} else{$ban = "<font color='green'>Нет</font>";} if ($locked == "0"){$locked = "<font color='red'><span title='Аккаунт не защищен! Заблокируйте его в игре командой .lockaccount'>Нет</span></font>";} elseif($locked == "1"){$locked = "<font color='green'><span title='Аккаунт защищен командой .lockaccount'>Да</span></font>";} if ($online == "0"){$online = "Нет";} elseif($online == "1"){$online = "<font color='green'>Да</font>";} if (@$them=='wow' OR @$them=='normal'){?> <table border="0" cellspacing="0" cellpadding="0" width="777"><tr> <td style="width: 31px; height: 38px; background: url(templates/christmas/images/dateheader-left.gif)"></td> <td class=topnav style="width: 729px;background: url(templates/christmas/images/dateheader-bg.gif)"> <?php echo $menu; ?> <?php $admin = strtolower($admin); $uzivatel = strtolower($uzivatel); if($admin == $uzivatel) echo"<table width=200><tr><a href=admin.php style='color:yellow;'>Админка</a></td></tr></table>"; ?></td> <td style="width: 17px; height: 38px; background: url(templates/christmas/images/dateheader-right.gif)"></td> </tr></table> <?php }?> <table border="0" cellspacing="0" cellpadding="0" width="777"><tr><td> <table border="0" cellspacing="0" cellpadding="0" width="381"> <td colspan="3" background="templates/<?php echo $them; ?>/images/bg_box.jpg" width="381" align="center" height="300" valign="top"> <table border="0" width="100%"> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[10].":</th><td class=greyText>".$typ."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[11].":</th><td class=greyText>".$email."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><td colspan="2" height="12" valign="center"><img src="templates/<?php echo $them; ?>/images/content-separator.png"></td></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[12].":</th><td class=greyText>".$vytvoreno."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[13].":</th><td class=greyText>".$last_login."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[44].":</th><td class=greyText>".$last_ip."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><td colspan="2" height="12" valign="center"><img src="templates/<?php echo $them; ?>/images/content-separator.png"></td></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[45].":</th><td class=greyText>".$locked."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[113].":</th><td class=greyText>".$ban."</td>"; ?></tr> <?php if ($row!=""){ echo "<tr valign='top' align='left' height='20'><th colspan=2 class=ban><b>Дата бана:</b> ".date('d-m-Y G:i', $bandate)." | <b>Дата разбана:</b> ".date('d-m-Y G:i', $unbandate)." <br> <b>Забанил:</b> $bannedby<br> <b>По причине:</b> $banreason</th></tr>"; } ?> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[46].":</th><td class=greyText>".$online."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[47].":</th><td class=greyText>".$locale."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="20"><?php echo "<th> ".$write[126].":</th><td class=greyText>".$bonuses."</td>"; ?></tr> <tr valign="top" align="left" class="browntext" height="18"> </tr> </table> </td> </tr> </table> </td><td><img src="images/blank.gif" width='14' height='1'></td><td valign='top'> <table border="0" cellspacing="0" cellpadding="0" width="381" height="160"> <td colspan="3" background="templates/<?php echo $them; ?>/images/bg_box.jpg" width="381" height="300" valign="top"> <table border="0" align="center"> <tr valign="top" align="left" class="browntexts" height="20"><td valign="center"><?php echo $write[103]; ?></td><td valign="center" align="center">Уровень</td><td valign="center" align="center"><?php echo $write[101]; ?></td><td valign="center" align="center"><?php echo $write[102]; ?></td></tr> <?php selectDb('characters'); $prehled_chary = "SELECT name, class, totaltime, guid, race, SUBSTRING(LPAD(HEX(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',23),' ',-1) AS UNSIGNED)),8,'0'),4,1) AS gender ,CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 54), ' ', -1) AS UNSIGNED) AS level FROM `characters` WHERE account = $id" ; $result = mysql_query($prehled_chary); while ($prehled_chary_vypis = mysql_fetch_array($result)){ echo "<tr><td valign='center'><a href=char.php?guid=".$prehled_chary_vypis["guid"]." class='linkchar'>".$prehled_chary_vypis["name"]."</a></td> <td valign='center' align='center'>".$prehled_chary_vypis["level"]."</td>"; echo "<td valign='center' align='center'><img src='images/race/small/".$prehled_chary_vypis['race']."-".$prehled_chary_vypis['gender'].".gif'></td>"; echo "<td valign='center' align='center'><img src='images/class/small/".$prehled_chary_vypis['class'].".gif'></td></tr>"; echo "</td></tr>"; } ?> </td></tr> </table> </td> </tr> </table></td></tr></table> <table border="0" cellspacing="0" cellpadding="0" width="777"><tr> <td style="width: 31px; height: 38px; background: url(templates/christmas/images/dateheader-left.gif)"></td> <td style="width: 729px;background: url(templates/christmas/images/dateheader-bg.gif)"><font color="CC9900"><b>Платные услуги</b></font></td> <td style="width: 17px; height: 38px; background: url(templates/christmas/images/dateheader-right.gif)"></td> </tr></table> <table width="777" cellpadding="0" cellspacing="0" border="0" align="center" style="background : url(templates/<?php echo $them; ?>/images/bg.png);" > <tr><td align="center"> <table class="kategorie" valign="top" align="center"> <tr><th width="50"><img src="images/menu/pcnamechange.png"></th><td width="500"><h1 class="nadpis"><a href="waste.php"><?php echo $write[135]; ?></a></h1> <?php echo $write[136]; ?></td> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> <tr><th width="50"><img src="images/menu/arena-tournament.png"></th><td width="500"><h1 class="nadpis"><a href="payment.php"><?php echo $write[127]; ?></a></h1><?php echo $write[112]; ?> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> <tr><th width="50"><img src="images/menu/armorsets.png"></th><td><h1 class="nadpis"><a href="htpdocs">Панель голосований</a></h1> Проголосовав за наш сервер, вы тем самым помогаете приглашать игроков в наш проект. В качестве благодарности Вы зарабатываете бонус за один голос,которые вы можете потратить на ваша усмотрение.</td></tr> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> </table><br> </td></tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="777"><tr> <td style="width: 31px; height: 38px; background: url(templates/christmas/images/dateheader-left.gif)"></td> <td style="width: 729px;background: url(templates/christmas/images/dateheader-bg.gif)"><font color="CC9900"><b>Бесплатные услуги</b></font></td> <td style="width: 17px; height: 38px; background: url(templates/christmas/images/dateheader-right.gif)"></td> </tr></table> <table width="777" cellpadding="0" cellspacing="0" border="0" align="center" style="background : url(templates/<?php echo $them; ?>/images/bg.png);" > <tr><td align="center"> <table class="kategorie" valign="top" align="center"> <tr><th width="50"><img src="images/menu/uptbc.png"></th><td width="500"><h1 class="nadpis"><a href="typ.php"><?php echo $write[10]; ?></a></h1> <?php echo $write[15]; ?></td> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> <tr><th width="50"><img src="images/menu/changeemail.png"></th><td width="500"><h1 class="nadpis"><a href="email.php"><?php echo $write[16]; ?></a></h1> <?php echo $write[17]; ?></td> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> <tr><th width="50"><img src="images/menu/changepasswd.png"></th><td width="500"><h1 class="nadpis"><a href="pass.php"><?php echo $write[18]; ?></a></h1> <?php echo $write[19]; ?></td> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> <tr><th width="50"><img src="images/menu/scrollofrez.png"></th><td width="500"><h1 class="nadpis"><a href="antierror.php"><?php echo $write[51]; ?></a></h1> <?php echo $write[52]; ?> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> </table><br> </td></tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="777"><tr> <td style="width: 31px; height: 38px; background: url(templates/christmas/images/dateheader-left.gif)"></td> <td style="width: 729px;background: url(templates/christmas/images/dateheader-bg.gif)"><font color="CC9900"><b>Разное</b></font></td> <td style="width: 17px; height: 38px; background: url(templates/christmas/images/dateheader-right.gif)"></td> </tr></table> <table width="777" cellpadding="0" cellspacing="0" border="0" align="center" style="background : url(templates/<?php echo $them; ?>/images/bg.png);" > <tr><td align="center"> <table class="kategorie" valign="top" align="center"> <tr><th width="50"><img src="images/menu/per.png"></th><td width="500"><h1 class="nadpis"><a href="stats.php"><?php echo $write[75]; ?></a></h1><?php echo $write[76]; ?> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> <tr><th width="50"><img src="images/menu/ticket.png"></th><td width="500"><h1 class="nadpis"><a href="ticket.php"><?php echo $write[95]; ?></a></h1><?php echo $write[96]; ?> <tr><th colspan="4"><center><img src="templates/<?php echo $them; ?>/images/content-separator2.png" vspace="5"></center></th></tr> </table><br> </td></tr> </table> <?php include ('templates/'.$them.'/patka.php'); ?>
Добавлено (20.03.2012, 02:26) ---------------------------------------------
Code
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in K:\home\мой айпи\www\lk\email.php on line 66
<?php /** Сделано с любовью. Для mangos.ru email: TIMzs@211.ru icq: 290-110-929 WebMoney: R113588578444 Z173815491984 **/ include('include/config.php'); include('include/functions.php'); include('include/loginf.php'); include('templates/'.$them.'/vrch.php'); include('include/lang.php'); include('include/log_info.php'); open(); if($activation == 'on'){ if(@$_GET['active']=='1'){ if ($_GET['name']==$uzivatel){ selectDb('lk'); $sql = mysql_query("SELECT * FROM `change_mail` WHERE name='".$_GET['name']."'"); $data = mysql_fetch_array($sql); if($_GET['code']==$data['code']){ selectDb('realmd'); $sql = "UPDATE account SET email='".$data['new_mail']."' WHERE id=$id"; mysql_query($sql) or die ('querry ...'); selectDb('lk'); $sql = mysql_query("DELETE FROM change_mail WHERE name='".$_GET['name']."'"); $sql = mysql_query("INSERT INTO logs (date,name,text,type) VALUES ('$date','$uzivatel','На аккаунте <b> $uzivatel</b> был изменен E-mail!','email')"); $reason = "<tr><td align=\"center\"><br><img src='images/yes.png'> ".$write[25]." <b> ".$data['new_mail']."</b></td></tr>"; echo " <table width='343' cellpadding='0' cellspacing='0' border='0' rules='none' align='center' style='background : url(templates/$them/images/typ_bg.jpg)'> <tr><td class='typ'> ".$write[16]."</td></tr> <tr><td align='center'> <table class='typ' valign='top' align='center'> $reason </table><br> </td></tr> </table> <br><br>"; include ('templates/'.$them.'/patka.php'); die; } } } selectDb('lk'); $sql = mysql_query("SELECT * FROM `change_mail` WHERE name='".$uzivatel."'"); $data = mysql_fetch_array($sql); if($sql) { if(mysql_num_rows($sql)!=0) { $reason = "<br><center>Вы уже запрашивали смену E-mail<br></center>"; } else { if(!isset($_POST['change'])){ $email = addslashes(!empty($_POST["email"])); }else{ $email = addslashes($_POST["email"]); } if ($email == ""){ $reason = " <form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\" id='form'> <tr><td align=\"center\"><br><br> Новый E-mail: <input type=\"text\" name=\"email\"></td></tr> <tr><td align=\"center\"><br> <input type=\"hidden\" name=\"change\"> <a href='#' onClick=\"document.getElementById('form').submit()\" class=\"changeemail\" name=\"change\"></a> </td></tr>"; }else{ if (!eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$",$email)){ $reason = "<tr><td align=\"center\"><br><br><img src='images/no.png'> ".$write[48]."<br><br><a href=email.php>$write[49]</a></td></tr>"; }else{ selectDb('realmd'); $sql = mysql_query("SELECT email FROM account WHERE id=$id"); $data = mysql_fetch_array($sql); $title = substr(htmlspecialchars(trim($title)), 0, 1000); $to = $data['email']; $code = generate($number); $linkemail = "".$linkserver."?active=1&name=".$uzivatel."&code=".$code.""; $linkemail = str_replace(" ", "%20", $linkemail); $mess = "Здравствуйте,".$uzivatel.". Ваш E-mail был изменен, для подтверждения пройдите по ссылке ".$linkemail.""; // функция, которая отправляет наше письмо. mail($to, $title, $mess, 'From:'.$from.' MIME-Version: 1.0 Content-type: text/plain; charset=windows-1251'); $reason = "<tr><td align=\"center\"><br><img src='images/yes.png'>Дальнейшие инструкции отправлены на <b>".$to."</b><br></td></tr>"; selectDb('lk'); $sql = "INSERT INTO `change_mail`(name,code,new_mail) VALUES ('$uzivatel', '$code', '$email')"; mysql_query($sql) or die ('querry ...'); } } } } }else{ if(!isset($_POST['change'])){ $email = addslashes(!empty($_POST["email"])); }else{ $email = addslashes($_POST["email"]); } if ($email == ""){ $reason = " <form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\" id='form'> <tr><td align=\"center\"><br><br> Новый E-mail: <input type=\"text\" name=\"email\"></td></tr> <tr><td align=\"center\"><br> <input type=\"hidden\" name=\"change\"> <a href='#' onClick=\"document.getElementById('form').submit()\" class=\"changeemail\" name=\"change\"></a> </td></tr>"; }else{ if (!eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$",$email)){ $reason = "<tr><td align=\"center\"><br><br><img src='images/no.png'> ".$write[48]."<br> <br><a href=email.php>$write[49]</a></td></tr>"; }else{ selectDb('realmd'); $sql = "UPDATE account SET email='$email' WHERE id=$id"; mysql_query($sql) or die ('querry ...'); selectDb('lk'); $sql = mysql_query("INSERT INTO logs (date,name,text,type) VALUES ('$date','$uzivatel','На аккаунте <b>$uzivatel</b> был изменен E-mail!','email')"); $reason = "<tr><td align=\"center\"><br><br><img src='images/yes.png'> ".$write[25]." <b>".$email."</b></td></tr>"; } } } ?> <table width="343" cellpadding="0" cellspacing="0" border="0" rules="none" align="center" style="background : url('templates/<?php echo $them; ?>/images/typ_bg.jpg')"> <tr><td class="typ"> <?php echo $write[16]; ?></td></tr> <tr><td align="center"> <table class="typ" valign="top" align="center"> <?php echo $reason; ?> </table><br> </td></tr> </table> <br><br> <?php include ('templates/'.$them.'/patka.php'); ?>
Code
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in K:\home\мой айпи\www\lk\stats.php on line 229
<? /** Сделано с любовью. Для mangos.ru email: TIMzs@211.ru icq: 290-110-929 WebMoney: R113588578444 Z173815491984 **/ include('include/loginf.php'); include('include/config.php'); include('include/functions.php'); include('templates/'.$them.'/vrch.php'); include('include/lang.php'); include('include/log_info.php'); include('include/zones.php'); open(); echo "<br><table width='500' cellpadding='0' cellspacing='0' border='0' style='background : url(templates/".$them."/images/manage_bg.jpg)'> <tr><td class='commands'><table border='0' width='100%'><tr><td width='100%' class='title'> $write[68]</td></tr></table></td></tr> <tr><td align='center'> <table border='0' width='480' valign='top'>"; selectDb('realmd'); $sql_realm = mysql_query("SELECT * FROM `realmlist`"); $realm_data = mysql_fetch_array($sql_realm); $realm_name = $realm_data['name']; $server_ip = $realm_data['address']; selectDb('characters'); $sql_characters = "SELECT * FROM `characters` WHERE online=1"; $online_characters = mysql_query($sql_characters); $counter=0; while($row = mysql_fetch_array($online_characters)){ $counter++; } selectDb('characters'); $online_aliance = "SELECT * FROM `characters` WHERE online=1 and `race` IN (1, 3, 4, 7, 11);"; $online_characters_aliance = mysql_query($online_aliance); $counter_aliance=0; while($row = mysql_fetch_array($online_characters_aliance)){ $counter_aliance++; } /** // Подсчет квестов selectDb('mangos'); $counter_quest = "SELECT count(*) FROM `quest_template`"; $result_counter = mysql_query($counter_quest); $quest_conter=0; while ($row = mysql_fetch_array($result_counter)){ $quest_conter++; } // Подсчет npc selectDb('mangos'); $counter_npc = "SELECT count(*) FROM `creature_template`"; $result_counter = mysql_query($counter_npc); $npc_conter=0; while ($row = mysql_fetch_array($result_counter)){ $npc_conter++; } // Подсчет вещей selectDb('mangos'); $counter_loot = "SELECT * FROM `item_template`"; $result_counter = mysql_query($counter_loot); $loot_conter=0; while ($row = mysql_fetch_array($result_counter)){ $loot_conter++; } **/ selectDb('characters'); $online_horde = "SELECT * FROM `characters` WHERE online=1 and `race` IN (2, 5, 6, 8, 10);"; $online_characters_horde = mysql_query($online_horde); $counter_horde=0; while($row = mysql_fetch_array($online_characters_horde)){ $counter_horde++; } // Время Работы: selectDb('realmd'); $query=mysql_query("SELECT Max(`starttime`) from uptime"); $upt = time() - @mysql_result($query,0); $sec = $upt % 60; $upt = intval($upt / 60); $min = $upt % 60; $upt = intval($upt / 60); $hours = $upt % 24; $upt = intval($upt / 24); $days = $upt; if (!$open = @fsockopen($server_ip, $port, $errno, $errstr,(float)0.1)) echo " <tr><td width='30%'>".$write[60].":</td><td><font color='red' title='Server Offline'><b>$realm_name</b></font></td></tr> <tr><td width='30%'>".$write[61].":</td><td><b>$version</b></td></tr> <tr><td width='30%'>".$write[62].":</td><td><b>$realm_type</b></td></tr> <tr><td width='30%'>".$write[63].":</td><td><b>$server_ip:$port</b></td></tr> <tr><td width='30%'>".$write[64].":</td><td><b>0</b></td></tr> <tr><td width='30%'>".$write[65].":</td><td><b>0</b></td></tr> <tr><td width='30%'>".$write[66].":</td><td><b>0</b></td></tr> <tr><td width='30%'>".$write[67].":</td><td><b><font color='red' title='Server Offline'>$write[77]</b></font>"; else{ echo " <tr><td width='30%'>".$write[60].":</td><td><font color='Green' title='Server Online'><b>$realm_name</b></font></td></tr> <tr><td width='30%'>".$write[61].":</td><td><b>$version</b></td></tr> <tr><td width='30%'>".$write[62].":</td><td><b>$realm_type</b></td></tr> <tr><td width='30%'>".$write[63].":</td><td><b>$server_ip:$port</b></td></tr> <tr><td width='30%'>".$write[64].":</td><td><b>$counter</b></td></tr> <tr><td width='30%'>".$write[65].":</td><td><b>$counter_aliance</b></td></tr> <tr><td width='30%'>".$write[66].":</td><td><b>$counter_horde</b></td></tr> <tr><td width='30%'>".$write[67].":</td><td><b>{$days} дней $hours:$min:$sec</b></td></tr>"; fclose($open); } /** print(" <tr><td colspan=2><center><img src=\"img/oddel.jpg\" vspace=\"5\"></center></td></tr> <tr><td width='30%'>".$write[99].":</td><td><b>".$quest_conter."</b></td></tr> <tr><td width='30%'>".$write[100].":</td><td><b>".$npc_conter."</b></td></tr> <tr><td width='30%'>".$write[101].":</td><td><b>".$loot_conter."</b></td></tr> ");**/ echo "</tr></td></td></table><br></td></tr></table>"; // Подсчет Аккаунтов selectDb('realmd'); $counter_accounts = "SELECT * FROM `account`"; $result_counter = mysql_query($counter_accounts); $acc_conter=0; while ($rowAcc = mysql_fetch_array($result_counter)){ $acc_conter++; } // Подсчет Гильдий selectDb('characters'); $sql_guild = "SELECT `guildid` FROM `guild`"; $result_guild = mysql_query($sql_guild); $counter_guild=0; while ($line_gild_num = mysql_fetch_array($result_guild, MYSQL_ASSOC)) { $counter_guild++; } mysql_free_result($result_guild); // Подсчет Альянса\Орды и тотал selectDb('characters'); $query = mysql_query("SELECT count(*) FROM `characters`"); $total_chars = mysql_result($query,0); selectDb('characters'); $query = mysql_query("SELECT count(guid) FROM `characters` WHERE race IN(2,5,6,8,10)"); $horde_chars = mysql_result($query,0); $horde_pros = round(($horde_chars*100)/$total_chars ,1); $allies_chars = $total_chars - $horde_chars; $allies_pros = 100 - $horde_pros; echo "<table width='500' cellpadding='0' cellspacing='0' border='0' style='background : url(templates/".$them."/images/manage_bg.jpg)'> <tr><td class='commands'><table border='0' width='100%'><tr><td width='100%' class='title'> $write[69]</td></tr></table></td></tr> <tr><td align='center'> <table border='0' width='480' valign='top'> <tr><td width='30%'>$write[70]:</td><td><b>$acc_conter</b></td></tr> <tr><td width='30%'>$write[71]:</td><td><b>$total_chars</b></td></tr> <tr><td width='30%'>$write[74]:</td><td><b>$counter_guild</b></td></tr> <tr><td width='100%' colspan=2><br> <table border='0' cellpadding='0' cellspacing='0' width=100%> <tr> <td width=$allies_pros% align=center>Alliance</td> <td width=$horde_pros% align=center>Horde</td> </tr> <tr> <td width=$allies_pros% background='images/aliance_bg.gif' align=center><font title='За Alliance играет $allies_chars человек(а)'>$allies_chars($allies_pros%)</font></td> <td width=$horde_pros% background='images/horde_bg.gif' align=center><font title='За Horde играет $horde_chars человек(а)'>$horde_chars($horde_pros%)</font></td> </tr></table> </td><td> </td></tr> "; echo "</tr></td></td></table><br></td></tr></table>"; echo "<style>.text { font-family: Verdana, Arial, Helvetica, sans-serif; font-style: normal; font-size: 11px; color: #FFFFFF; }</style> <table width='500' cellpadding='0' cellspacing='0' border='0' style='background : url(templates/".$them."/images/manage_bg.jpg)'> <tr><td class='commands'><table border='0' width='100%'><tr><td width='100%' class='title'> Игроки Online</td></tr></table></td></tr> <tr><td align='center'> <table border='0' width='480' valign='top'>"; $result = @mysql_query("SELECT name,race,guid,class,zone,data,extra_flags FROM `characters` WHERE online=1 ORDER BY zone"); echo " <table align=\"center\" cellpadding=\"0\" cellspacing=\"10\" border=\"0\" class=\"text\"> <thead><a name=online> </a> <td align=center>Ник</td> <td>Раса</td> <td>Класс</td> <td>Фракция</td> <td>Lvl</td> <td>Локация</td> </thead> <tbody> "; while ($row = mysql_fetch_array($result)) { $ch_guid = $row['guid']; $ch_name = $row['name']; $ch_race = $row['race']; $ch_class = $row['class']; $ch_zone = $zones[$row['zone']]; $char_data = explode(' ',$row['data']); $char_gender = dechex($char_data[36]); $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT); $char_gender = $char_gender{3}; $ch_lvl = $char_data[53]; if ($char_gender==1) $drace = "$ch_race-1.gif"; else $drace = "$ch_race-0.gif"; if($gmshow=='on' and in_array($row['extra_flags'], array(1, 16))) $gm_img = "<img src='images/gm.gif' title='Game Master'>"; else $gm_img = " "; if(in_array($ch_race, array(1, 3, 4, 7, 11))) $faction = "alliance"; else $faction = "horde"; $img_race = "<img src='images/race/small/$drace'>"; $img_class = "<img src='images/class/small/$ch_class.gif'>"; $img_faction = "<img src='images/faction/$faction.gif'>"; echo " <tr><td> <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=100%> <td align=left> <a href='char.php?guid=$ch_guid' style='color:black'>$ch_name</a></td> <td width=18 align=right>$gm_img</td> </table></td> <td align='center'>$img_race</td> <td align='center'>$img_class</td> <td align='center'>$img_faction</td> <td align='center'>$ch_lvl</td> <td>$ch_zone</td> </tr>"; } echo "</table><br><br></table>"; include ('templates/'.$them.'/patka.php'); ?>
Code
Еще когда заходишь в личный кабинет или выходишь нижние ссылки не работают