Помогите
|
|
DaGeR | Дата: Пятница, 07.05.2010, 09:06 | Сообщение # 1 |
Сержант
Группа: Пользователи
Сообщений: 65
Награды: 0
Репутация: 11
Статус:
| и так народ у меня постоянно выскакивает ошибка при показе бана по ip и акк может тут чё то не правельно подскажите плиз! Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Сайт WoW GAME ин dager</title> <style type="text/css"> <!-- #Layer1 { position:absolute; left:1px; top:0px; width:1032px; height:272px; z-index:1; } #Layer2 { position:absolute; left:245px; top:309px; width:720px; height:122px; z-index:2; } #Layer3 { position:absolute; left:8px; top:301px; width:208px; height:145px; z-index:3; } #Layer4 { position:absolute; left:970px; top:309px; width:98px; height:14px; z-index:4; } #Layer5 { position:absolute; left:245px; top:757px; width:727px; height:29px; z-index:5; } #Layer6 { position:absolute; left:244px; top:309px; width:721px; height:74px; z-index:6; } #Layer7 { position:absolute; left:7px; top:730px; width:233px; height:76px; z-index:7; } #Layer8 { position:absolute; left:969px; top:733px; width:222px; height:82px; z-index:8; } #Layer9 { position:absolute; left:44px; top:704px; width:72px; height:47px; z-index:9; } #Layer10 { position:absolute; left:17px; top:742px; width:206px; height:79px; z-index:10; } #Layer11 { position:absolute; left:1003px; top:715px; width:180px; height:35px; z-index:10; } #Layer12 { position:absolute; left:224px; top:736px; width:34px; height:82px; z-index:11; } #Layer13 { position:absolute; left:6px; top:275px; width:43px; height:23px; z-index:12; } #Layer14 { position:absolute; left:226px; top:563px; width:33px; height:114px; z-index:13; } #Layer15 { position:absolute; left:52px; top:271px; width:35px; height:26px; z-index:14; } #Layer16 { position:absolute; left:952px; top:569px; width:25px; height:106px; z-index:15; } #Layer17 { position:absolute; left:1000px; top:746px; width:181px; height:72px; z-index:15; } #Layer18 { position:absolute; left:71px; top:764px; width:91px; height:34px; z-index:9; } #Layer19 { position:absolute; left:284px; top:277px; width:356px; height:16px; z-index:10; } #Layer20 { position:absolute; left:46px; top:329px; width:160px; height:30px; z-index:10; } #Layer21 { position:absolute; left:46px; top:375px; width:160px; height:30px; z-index:11; } #Layer22 { position:absolute; left:46px; top:421px; width:160px; height:29px; z-index:12; } #Layer23 { position:absolute; left:46px; top:469px; width:160px; height:31px; z-index:13; } #Layer24 { position:absolute; left:46px; top:517px; width:159px; height:23px; z-index:14; } #Layer25 { position:absolute; left:44px; top:563px; width:161px; height:30px; z-index:15; } #Layer26 { position:absolute; left:44px; top:610px; width:162px; height:29px; z-index:16; } #Layer27 { position:absolute; left:991px; top:337px; width:179px; height:24px; z-index:17; } #Layer28 { position:absolute; left:403px; top:334px; width:376px; height:26px; z-index:18; } .стиль1 {color: #FF0000} #Layer29 { position:absolute; left:259px; top:383px; width:684px; height:148px; z-index:19; } #Layer30 { position:absolute; left:261px; top:390px; width:46px; height:26px; z-index:19; } #Layer31 { position:absolute; left:277px; top:389px; width:626px; height:167px; z-index:20; } #Layer32 { position:absolute; left:282px; top:566px; width:619px; height:30px; z-index:21; } #Layer33 { position:absolute; left:275px; top:611px; width:626px; height:184px; z-index:22; } --> </style> </head>
<body> <div id="Layer1"></div> <div id="Layer2"><img src="img/new_1.png" width="718" height="466" /></div> <div id="Layer3"><img src="img/blok_1.png" /></div> <div id="Layer4"><img src="img/blok_1.png" /></div> <div id="Layer5"><img src="img/niz_1.png" width="718" height="63" /></div> <div id="Layer6"><img src="img/verx_1.png" width="717" height="62" /></div> <div id="Layer7"><img src="img/wow_game.jpg" /></div> <div id="Layer8"><img src="img/wow_pro.jpg" /></div>
<div id="Layer18"><a href="http://www.wow-game.ru"><img src="img/knopki/wow_game.gif" border="0" /></a></div> <div id="Layer20"><a href="index.php"><img src="img/knopki/glav2.png" width="160" height="30" border="0" /></a></div> <div id="Layer21"><a href="reg.php"><img src="img/knopki/reg2.png" border="0" /></a></div> <div id="Layer22"><a href="forum.php"><img src="img/knopki/forum2.png" border="0" /></a></div> <div id="Layer23"><a href="new.php"><img src="img/knopki/new2.png" border="0" /></a></div> <div id="Layer24"><a href="onlain.php"><img src="img/knopki/onlin2.png" border="0" /></a></div> <div id="Layer25"><a href="banlist.php"><img src="img/knopki/ban2.png" border="0" /></a></div> <div id="Layer26"><img src="img/knopki/lk2.png" /></div> <div id="Layer27"><? $fp = @fsockopen ("$ip","$gameport",$errno,$errstr,1); if ($fp) echo '<span style="color:green">Статус сервера:</span> <img src="img/races/on2.gif" alt="Online" /> '; else echo '<span style="color:red">Статус сервера:</span> <img src="img/races/off.gif" alt="Offline" /> '; ?></div> <div class="стиль1" id="Layer28"> <div align="center">Бан по IP </div> </div> <div id="Layer31"><?php // Скрипт показа забанненных аккаунтов и IP адресов by WoW-Ultimate require_once "config.php";
//подключение к базе $ConnectDB = mysql_connect("$host", "$user", "$password") or die ("Нет соединения с MySQL"); mysql_select_db("$dbr") or die ("Нет соединения с базой $dbr"); echo "<h2>Забаненные аккаунты</h2>"; echo "<table width=\"100%\" border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">забанен:</td> <td align=\"center\" width=\"20%\">Бан установлен:</td> <td align=\"center\" width=\"20%\">Забанил:</td> <td align=\"center\" width=\"20%\">Причина:</td> <td align=\"center\" width=\"20%\">Бан до:</td> </tr></table>"; $i=0; $data = mysql_query("SELECT * FROM account_banned WHERE active = 1 ORDER BY bandate DESC LIMIT 100",$ConnectDB); $row = mysql_fetch_array($data[$i]); { while($row = mysql_fetch_array($data)) { $banid = $row['id']; $usern = mysql_query("SELECT * FROM account WHERE id= $banid LIMIT 1",$ConnectDB); $rowuser = mysql_fetch_array($usern); $banuser = $rowuser['username']; $bandate = date("H:i:s d.m.Y", $row['bandate']); $bannedby = $row['bannedby']; $banreason = $row['banreason']; $unbandate = date("H:i:s d.m.Y", $row['unbandate']); echo "<font color=\"beer\"> <table width=\"100%\" border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">$banuser</td> <td align=\"center\" width=\"20%\">$bandate г.</td> <td align=\"center\" width=\"20%\">$bannedby</td> <td align=\"center\" width=\"20%\">$banreason</td> <td align=\"center\" width=\"20%\">$unbandate г.</td> </tr></table></font>"; $i++; } } //теперь выборка по IP адресам echo "<h2>БАНЫ по IP </h2><br>"; echo "<table width=\"100%\" border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">IP:</td> <td align=\"center\" width=\"20%\">Бан установлен:</td> <td align=\"center\" width=\"20%\">Забанил:</td> <td align=\"center\" width=\"20%\">Причина:</td> <td align=\"center\" width=\"20%\">Бан до:</td> </tr></table>"; $u=0; $bannedip = mysql_query("SELECT * FROM ip_banned ORDER BY bandate DESC LIMIT 100"); $row = mysql_fetch_array($bannedip[$u]); { while($row = mysql_fetch_array($bannedip)) {
$banip = $row['ip']; $bandate = date("H:i:s d.m.Y", $row['bandate']); $bannedby = $row['bannedby']; $banreason = $row['banreason']; $unbandate = date("H:i:s d.m.Y", $row['unbandate']); echo "<font color=\"beer\"> <table width=\"100%\"border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">$banip</td> <td align=\"center\" width=\"20%\">$bandate г.</td> <td align=\"center\" width=\"20%\">$bannedby</td> <td align=\"center\" width=\"20%\">$banreason</td> <td align=\"center\" width=\"20%\">$unbandate г.</td> </tr></table></font>"; $u++; } } ?></div> <div id="Layer32"> <div align="center" class="стиль1">Бан по аккаунту</div> </div> <div id="Layer33"><?php
// You Should Write here your MySQL Server information !
echo "<center><table border=1><tr><th><font color=#00FFFF>№ Аккаунта:</font></th><th><font color=#00FFFF>Логин Аккаунта:</th><th><font color=#00FFFF>Причина:</font></th><th><font color=#00FFFF>Начало Бана</font></th><th><font color=#00FFFF>Конец Бана</font></th></tr>"; $connection = mysql_connect($host, $user, $password) or die ("Can't connect with $host"); mysql_select_db($realmdb, $connection); $sqle = "SELECT `id`,`banreason`, `bandate`, `unbandate` FROM `account_banned`"; $sql = "SELECT `ab`.*, `a`.`username` FROM `account_banned` as `ab` " ."LEFT JOIN `account` as `a` ON `a`.`id` = `ab`.`id`;";
$result = mysql_query($sql, $connection);
while ($vystup = mysql_fetch_array($result))
{ echo "<tr><td align=\"center\">".$vystup["id"]."</td>"; echo "<td align=\"center\">".$vystup["username"]."</td>"; echo "<td align=\"center\">".$vystup["banreason"]."</td>"; echo "<td align=\"center\">".date("d.m.Y H:m",$vystup["bandate"])."</td>"; echo "<td align=\"center\">".date("d.m.Y H:m",$vystup["unbandate"])."</td>"; echo "</tr>";
} mysql_close($connection); echo "</table></center>"; ?></div> </body> </html> Так же не показывает онлайн Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <? require_once ('config.php');?> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Сайт WoW GAME ин dager</title>
<style type="text/css"> <!-- #Layer1 { position:absolute; left:1px; top:0px; width:1032px; height:272px; z-index:1; } #Layer2 { position:absolute; left:245px; top:309px; width:720px; height:122px; z-index:2; } #Layer3 { position:absolute; left:8px; top:301px; width:208px; height:145px; z-index:3; } #Layer4 { position:absolute; left:970px; top:309px; width:98px; height:14px; z-index:4; } #Layer5 { position:absolute; left:245px; top:757px; width:727px; height:29px; z-index:5; } #Layer6 { position:absolute; left:244px; top:309px; width:721px; height:74px; z-index:6; } #Layer7 { position:absolute; left:7px; top:730px; width:233px; height:76px; z-index:7; } #Layer8 { position:absolute; left:969px; top:733px; width:222px; height:82px; z-index:8; } #Layer9 { position:absolute; left:44px; top:704px; width:72px; height:47px; z-index:9; } #Layer10 { position:absolute; left:17px; top:742px; width:206px; height:79px; z-index:10; } #Layer11 { position:absolute; left:1003px; top:715px; width:180px; height:35px; z-index:10; } #Layer12 { position:absolute; left:224px; top:736px; width:34px; height:82px; z-index:11; } #Layer13 { position:absolute; left:6px; top:275px; width:43px; height:23px; z-index:12; } #Layer14 { position:absolute; left:226px; top:563px; width:33px; height:114px; z-index:13; } #Layer15 { position:absolute; left:52px; top:271px; width:35px; height:26px; z-index:14; } #Layer16 { position:absolute; left:952px; top:569px; width:25px; height:106px; z-index:15; } #Layer17 { position:absolute; left:1000px; top:746px; width:181px; height:72px; z-index:15; } #Layer18 { position:absolute; left:71px; top:764px; width:91px; height:34px; z-index:9; } #Layer19 { position:absolute; left:284px; top:277px; width:356px; height:16px; z-index:10; } #Layer20 { position:absolute; left:46px; top:329px; width:160px; height:30px; z-index:10; } #Layer21 { position:absolute; left:46px; top:375px; width:160px; height:30px; z-index:11; } #Layer22 { position:absolute; left:46px; top:421px; width:160px; height:29px; z-index:12; } #Layer23 { position:absolute; left:46px; top:469px; width:160px; height:31px; z-index:13; } #Layer24 { position:absolute; left:46px; top:517px; width:159px; height:23px; z-index:14; } #Layer25 { position:absolute; left:44px; top:563px; width:161px; height:30px; z-index:15; } #Layer26 { position:absolute; left:44px; top:610px; width:162px; height:29px; z-index:16; } #Layer27 { position:absolute; left:562px; top:355px; width:59px; height:30px; z-index:17; } #Layer28 { position:absolute; left:560px; top:399px; width:61px; height:28px; z-index:18; } #Layer29 { position:absolute; left:561px; top:442px; width:65px; height:28px; z-index:19; } #Layer30 { position:absolute; left:559px; top:484px; width:69px; height:28px; z-index:20; } #Layer31 { position:absolute; left:557px; top:525px; width:73px; height:29px; z-index:21; } #Layer32 { position:absolute; left:516px; top:281px; width:86px; height:28px; z-index:17; } #Layer33 { position:absolute; left:555px; top:330px; width:149px; height:33px; z-index:17; } #Layer34 { position:absolute; left:274px; top:541px; width:671px; height:34px; z-index:18; } #Layer35 { position:absolute; left:280px; top:397px; width:643px; height:41px; z-index:19; } #Layer36 { position:absolute; left:321px; top:397px; width:579px; height:44px; z-index:18; } #Layer37 { position:absolute; left:317px; top:461px; width:577px; height:51px; z-index:19; } #Layer38 { position:absolute; left:315px; top:526px; width:582px; height:59px; z-index:20; } #Layer39 { position:absolute; left:314px; top:600px; width:581px; height:64px; z-index:21; } --> </style> </head>
<body> <div id="Layer1"></div> <div id="Layer2"><img src="img/new_1.png" width="718" height="466" /></div> <div id="Layer3"><img src="img/blok_1.png" /></div> <div id="Layer4"><img src="img/blok_1.png" /></div> <div id="Layer5"><img src="img/niz_1.png" width="718" height="63" /></div> <div id="Layer6"><img src="img/verx_1.png" width="717" height="62" /></div> <div id="Layer7"><img src="img/wow_game.jpg" /></div> <div id="Layer8"><img src="img/wow_pro.jpg" /></div>
<div id="Layer18"><a href="http://www.wow-game.ru"><img src="img/knopki/wow_game.gif" border="0" /></a></div> <div id="Layer20"><a href="index.php"><img src="img/knopki/glav2.png" width="160" height="30" border="0" /></a></div> <div id="Layer21"><a href="reg.php"><img src="img/knopki/reg2.png" border="0" /></a></div> <div id="Layer22"><a href="forum.php"><img src="img/knopki/forum2.png" border="0" /></a></div> <div id="Layer23"><a href="new.php"><img src="img/knopki/new2.png" border="0" /></a></div> <div id="Layer24"><a href="onlain.php"><img src="img/knopki/onlin2.png" border="0" /></a></div> <div id="Layer25"><a href="banlist.php"><img src="img/knopki/ban2.png" border="0" /></a></div> <div id="Layer26"><img src="img/knopki/lk2.png" /></div> <div id="Layer33"><? $fp = @fsockopen ("$ip","$gameport",$errno,$errstr,1); if ($fp) echo '<span style="color:green">Статус сервера:</span> <img src="img/races/on2.gif" alt="Online" /> '; else echo '<span style="color:red">Статус сервера:</span> <img src="img/races/off.gif" alt="Offline" /> '; ?></div> <div id="Layer36"><? mysql_select_db ("$rdb"); $uptime = mysql_query ("select max(`starttime`) from `uptime`"); $uptime = time()-mysql_result ($uptime,0); $sec = $uptime%60; $uptime = intval ($uptime/60); $min = $uptime%60; $uptime = intval ($uptime/60); $hours = $uptime%24; $uptime = intval($uptime/24); $days = $uptime; if ($fp) echo "Время Работы: $days Дней $hours Часов $min Минут $sec Секунд<br>"; else echo ''; ?> </div> <div id="Layer37"><? mysql_selectdb ("$cdb"); $online = mysql_query ("select count(*) from characters where online = 1"); $online = mysql_result ($online,0); mysql_selectdb ("$rdb"); $max = mysql_query ("select max(`maxplayers`) from uptime"); $max = mysql_result ($max,0); if ($online) echo "Игроков онлайн: $online<br>"; else echo "Максимальный онлайн: $max<br>"; ?> </div> <div id="Layer38"><? mysql_selectdb ($rdb); $acc = mysql_query ("select count(*) from account"); $acc = mysql_result ($acc,0); mysql_selectdb ("$cdb"); $char = mysql_query ("select count(*) from characters"); $char = mysql_result ($char,0); $alliance = mysql_query ("select count(*) from characters where race in (1,3,4,7,11)"); $alliance = mysql_result ($alliance,0); $horde = mysql_query ("select count(*) from characters where race in (2,5,6,8,10)"); $horde = mysql_result ($horde,0); $guild = mysql_query ("select count(*) from guild"); $guild = mysql_result ($guild,0);
echo "Аккаунтов: $acc<br>"; echo "Персонажей: $char<br>"; echo "Гильдий: $guild<br><br>"; echo '<img src="img/races/ally_ico.gif" alt="alliance" />'; echo " $alliance "; echo '<img src="img/races/horde_ic.gif" alt="alliance" />'; echo " $horde<br>";
?> </div> <div id="Layer39"><? mysql_selectdb ("$cdb"); $human = mysql_query ("select count(*) from characters where race = 1"); $human = mysql_result ($human,0); $dwarv = mysql_query ("select count(*) from characters where race = 3"); $dwarv = mysql_result ($dwarv,0); $night = mysql_query ("select count(*) from characters where race = 4"); $night = mysql_result ($night,0); $gnome = mysql_query ("select count(*) from characters where race = 7"); $gnome = mysql_result ($gnome,0); $draenei = mysql_query ("select count(*) from characters where race = 11"); $draenei = mysql_result ($draenei,0); $orc = mysql_query ("select count(*) from characters where race = 2"); $orc = mysql_result ($orc,0); $undead = mysql_query ("select count(*) from characters where race = 5"); $undead = mysql_result ($undead,0); $tauren = mysql_query ("select count(*) from characters where race = 6"); $tauren = mysql_result ($tauren,0); $troll = mysql_query ("select count(*) from characters where race = 8"); $troll = mysql_result ($troll,0); $blood = mysql_query ("select count(*) from characters where race = 10"); $blood = mysql_result ($blood,0);
echo '<img src="img/races/1-0.gif" />'; echo " $human "; echo '<img src="img/races/2-0.gif" />'; echo " $orc<br>"; echo '<img src="img/races/3-0.gif" />'; echo " $dwarv "; echo '<img src="img/races/5-0.gif" />'; echo " $undead<br>"; echo '<img src="img/races/4-0.gif" />'; echo " $night "; echo '<img src="img/races/6-0.gif" />'; echo " $tauren<br>"; echo '<img src="img/races/7-0.gif" />'; echo " $gnome "; echo '<img src="img/races/8-0.gif" />'; echo " $troll<br>"; echo '<img src="img/races/11-0.gif" />'; echo " $draenei "; echo '<img src="img/races/10-0.gif" />'; echo " $blood<br>"; ?></div> </body> </html> Добавлено (07.05.2010, 09:06) --------------------------------------------- Вот какую он мне ошибку пишит Code [color=red]Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 353
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 353
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 354
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 354
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 355
Warning: mysql_selectdb() [function.mysql-selectdb]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 370
Warning: mysql_selectdb() [function.mysql-selectdb]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 370
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 371
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 371
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 372
Warning: mysql_selectdb() [function.mysql-selectdb]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 373
Warning: mysql_selectdb() [function.mysql-selectdb]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 373
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 374
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 374
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 375 Максимальный онлайн:
Warning: mysql_selectdb() [function.mysql-selectdb]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 383
Warning: mysql_selectdb() [function.mysql-selectdb]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 383
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 384
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 384
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 385
Warning: mysql_selectdb() [function.mysql-selectdb]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 386
Warning: mysql_selectdb() [function.mysql-selectdb]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 386
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 387
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 387
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 388
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 389
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 389
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 390
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 391
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 391
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 392
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 393
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 393
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 394 Аккаунтов: Персонажей: Гильдий:
Warning: mysql_selectdb() [function.mysql-selectdb]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 407
Warning: mysql_selectdb() [function.mysql-selectdb]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 407
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 408
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 408
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 409
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 410
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 410
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 411
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 412
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 412
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 413
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 414
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 414
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 415
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 416
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 416
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 417
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 418
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 418
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 419
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 420
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 420
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 421
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 422
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 422
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 423
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 424
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 424
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 425
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in T:\home\127.0.0.1\www\onlain.php on line 426
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in T:\home\127.0.0.1\www\onlain.php on line 426
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in T:\home\127.0.0.1\www\onlain.php on line 427[/color]
|
|
| |
Max51p | Дата: Пятница, 07.05.2010, 11:38 | Сообщение # 2 |
Полковник
Группа: Пользователи
Сообщений: 100
Награды: 0
Репутация: 25
Статус:
| DaGeR, Попробуй после строки // подключение к базе, прописать путь к config.pnp. т.е вот так //подключение к базе require_once ('config.php'); $ConnectDB = mysql_connect("$host", "$user", "$password") or die и тд. И с онлайном проблема в том что не прописан путь к файлу config.php
Пишем не стесняемся, я изредка тут, пишите если что в лс, почту смотрю каждый день. Сделаю приваты (2.4.3 - 90%офф), (3.3.5а - 70 - 80% офф)
|
|
| |
DaGeR | Дата: Понедельник, 10.05.2010, 20:24 | Сообщение # 3 |
Сержант
Группа: Пользователи
Сообщений: 65
Награды: 0
Репутация: 11
Статус:
| Max51p сделай плиз мне вот для этого Code <? mysql_select_db ("$rdb"); $uptime = mysql_query ("select max(`starttime`) from `uptime`"); $uptime = time()-mysql_result ($uptime,0); $sec = $uptime%60; $uptime = intval ($uptime/60); $min = $uptime%60; $uptime = intval ($uptime/60); $hours = $uptime%24; $uptime = intval($uptime/24); $days = $uptime; echo "Время Работы: $days д $hours ч $min м $sec с<br>"; ?> Code <?php require_once ('includes/config.php'); //подключаем файл конфигурации $sMySql = mysql_connect('$host', ' $db_user', ' $db_user_passw'); //открываемся mysql. $aSql = mysql_num_rows(mysql_query("SELECT guildid FROM characters.guild", $sMySql)); $nTotalGuild = $aSql;
$aSql = mysql_num_rows(mysql_query("SELECT guid FROM characters.characters WHERE race IN ( 1, 4, 11, 3, 7 )", $sMySql)); $nTotalAlliance = $aSql; $aSql = mysql_num_rows(mysql_query("SELECT guid FROM characters.characters WHERE race IN (6, 10, 5, 2, 8)", $sMySql)); $nTotalHorde = $aSql;
function conventNormTime($nSec) { $d = floor( $nSec / (3600*24) ); $nSec = ($nSec - $d * 3600 * 24); $h = floor( $nSec / 3600 ); $nSec = ($nSec - $h * 3600); $m = floor( $nSec / 60 ); return "{$d} д. {$h} ч. {$m} м."; } $aSql = mysql_fetch_array(mysql_query("SELECT maxplayers FROM realmd.uptime ORDER by maxplayers DESC LIMIT 1", $sMySql)); $nMaxOnline = $aSql['maxplayers']; $aSql = mysql_fetch_array(mysql_query("SELECT uptime FROM realmd.uptime ORDER by starttime DESC LIMIT 1", $sMySql)); $tUptime = conventNormTime($aSql['uptime']);
$aSql = mysql_query("SELECT uptime FROM realmd.uptime ORDER by uptime DESC LIMIT 1", $sMySql); $aSql =mysql_fetch_array($aSql); $aTotal = $aSql['uptime']; $aTotal = conventNormTime($aSql['uptime']);
$aSql = mysql_num_rows(mysql_query("SELECT id FROM realmd.account", $sMySql)); $nTotalAccount = $aSql;
$aSql = mysql_num_rows(mysql_query("SELECT guid FROM characters.characters WHERE online IN ( 1 )", $sMySql)); $nCurrenOnline = $aSql; $aOut = array( 'online' => $nCurrenOnline, 'max_online' => $nMaxOnline, 'uptime' => $tUptime, 'max_uptime' => $aTotal, 'reg_accounts' => $nTotalAccount, 'reg_horde' => $nTotalHorde, 'reg_alliance' => $nTotalAlliance, );
echo '<tr><td>Онлайн:</td> <td><b>{$nCurrenOnline}</b></td></tr>'; echo '<tr><td>Макс. онлайн:</td> <td><b>{$nMaxOnline}</b></td></tr>'; echo '<tr><td>Макс. аптайм:</td> <td><b>{$aTotal}</b></td></tr>';
echo '<tr><td>Акаунтов:</td> <td><b>{$nTotalAccount}</b></td></tr>'; echo '<tr><td>Альянса:</td> <td><b>{$nTotalAlliance}</b></td> </tr>'; echo '<tr><td>Орды:</td> <td><b>{$nTotalHorde}</b></td></tr>'; ?> Code <table border="0"> <tr> <td><strong>Имя:</strong></td> <td><strong>Раса:</strong></td> <td><strong>Класс:</strong></td> <td><strong>Уровень:</strong></td> </tr> <? mysql_selectdb ("$cdb"); mysql_query ('set names cp1251'); $result = mysql_query ("select name, race, class, data from characters where online = 1"); $class = array (1=>"Воин",2=>"Паладин",3=>"Охотник",4=>"Разбойник",5=>"Жрец",6=>"Рыцарь Смерти",7=>"Шаман",8=>"Маг",9=>"Чернокнижник",11=>"Друид"); $race = array (1=>"Человек",2=>"Орк",3=>"Дворф",4=>"Ночной Эльф",5=>"Нежить",6=>"Таурен",7=>"Гном",8=>"Тролль",10=>"Эльф Крови",11=>"Дреней"); while ($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><strong>$ch_name</strong></td>"; echo "<td><strong>$race[$ch_race]</strong></td>"; echo "<td><strong>$class[$ch_class]</strong></td>"; echo "<td><strong>$ch_lvl</strong></td></tr>"; } ?> </table> Code <?php // Скрипт показа забанненных аккаунтов и IP адресов by WoW-Ultimate require_once "config.php";
//подключение к базе $ConnectDB = mysql_connect("$host", "$user", "$password") or die ("Нет соединения с MySQL"); mysql_select_db("$dbr") or die ("Нет соединения с базой $dbr"); echo "<h2>Забаненные аккаунты</h2>"; echo "<table width=\"100%\" border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">забанен:</td> <td align=\"center\" width=\"20%\">Бан установлен:</td> <td align=\"center\" width=\"20%\">Забанил:</td> <td align=\"center\" width=\"20%\">Причина:</td> <td align=\"center\" width=\"20%\">Бан до:</td> </tr></table>"; $i=0; $data = mysql_query("SELECT * FROM account_banned WHERE active = 1 ORDER BY bandate DESC LIMIT 100",$ConnectDB); $row = mysql_fetch_array($data[$i]); { while($row = mysql_fetch_array($data)) { $banid = $row['id']; $usern = mysql_query("SELECT * FROM account WHERE id= $banid LIMIT 1",$ConnectDB); $rowuser = mysql_fetch_array($usern); $banuser = $rowuser['username']; $bandate = date("H:i:s d.m.Y", $row['bandate']); $bannedby = $row['bannedby']; $banreason = $row['banreason']; $unbandate = date("H:i:s d.m.Y", $row['unbandate']); echo "<font color=\"beer\"> <table width=\"100%\" border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">$banuser</td> <td align=\"center\" width=\"20%\">$bandate г.</td> <td align=\"center\" width=\"20%\">$bannedby</td> <td align=\"center\" width=\"20%\">$banreason</td> <td align=\"center\" width=\"20%\">$unbandate г.</td> </tr></table></font>"; $i++; } } //теперь выборка по IP адресам echo "<h2>БАНЫ по IP </h2><br>"; echo "<table width=\"100%\" border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">IP:</td> <td align=\"center\" width=\"20%\">Бан установлен:</td> <td align=\"center\" width=\"20%\">Забанил:</td> <td align=\"center\" width=\"20%\">Причина:</td> <td align=\"center\" width=\"20%\">Бан до:</td> </tr></table>"; $u=0; $bannedip = mysql_query("SELECT * FROM ip_banned ORDER BY bandate DESC LIMIT 100"); $row = mysql_fetch_array($bannedip[$u]); { while($row = mysql_fetch_array($bannedip)) {
$banip = $row['ip']; $bandate = date("H:i:s d.m.Y", $row['bandate']); $bannedby = $row['bannedby']; $banreason = $row['banreason']; $unbandate = date("H:i:s d.m.Y", $row['unbandate']); echo "<font color=\"beer\"> <table width=\"100%\"border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">$banip</td> <td align=\"center\" width=\"20%\">$bandate г.</td> <td align=\"center\" width=\"20%\">$bannedby</td> <td align=\"center\" width=\"20%\">$banreason</td> <td align=\"center\" width=\"20%\">$unbandate г.</td> </tr></table></font>"; $u++; } } ?> БЕЗ + НЕ ОСТАВЛЮ
|
|
| |
Max51p | Дата: Понедельник, 10.05.2010, 20:36 | Сообщение # 4 |
Полковник
Группа: Пользователи
Сообщений: 100
Награды: 0
Репутация: 25
Статус:
| DaGeR, Кинь мне ссылку на сайт, я те там сделаю всё а так не разбёрёшься по кусочкам.
Пишем не стесняемся, я изредка тут, пишите если что в лс, почту смотрю каждый день. Сделаю приваты (2.4.3 - 90%офф), (3.3.5а - 70 - 80% офф)
|
|
| |
DaGeR | Дата: Понедельник, 10.05.2010, 20:44 | Сообщение # 5 |
Сержант
Группа: Пользователи
Сообщений: 65
Награды: 0
Репутация: 11
Статус:
| Max51p в каком смысле кинуть сылку на сайт ??? я щас пишу сайт сам вот мне и надо сделать подключение к базе!!!!! Где эти // брать не пойму пл*
|
|
| |
Max51p | Дата: Вторник, 11.05.2010, 09:22 | Сообщение # 6 |
Полковник
Группа: Пользователи
Сообщений: 100
Награды: 0
Репутация: 25
Статус:
| DaGeR, Понятно. Ладно посмотрю, тогда в лс скину.
Пишем не стесняемся, я изредка тут, пишите если что в лс, почту смотрю каждый день. Сделаю приваты (2.4.3 - 90%офф), (3.3.5а - 70 - 80% офф)
|
|
| |