OTO 2 pliki ktore trzeba edytowac i recznie wpisac dane dotyczace polaczenia z baza
moze ktos jasniej w ktorych etapach tz gdzie co wpisac ??
Kod:<?php $db = mysql_connect("localhost", "eternal_dbplayer", "fireball") or Die("I cannot connect to the mysql server because: " . mysql_error()); mysql_select_db("eternal_dsdatabase") or Die("DB Error !"); function error($type){ if($type == "field"){ echo "<font color=red face=Arial>You have left fields blank. Please <a href=\"index.php\">relogin</a></font>"; } if($type == "password"){ echo "<font color=red face=Arial>Incorrect password. Please <a href=\"index.php\">relogin</a></font><br>"; echo "<font color=red face=Arial>If you have forgotten your password, it can be sent to your email address. <a href=\"index.php\">Request Password</a></font>"; } if($type == "jail"){ $res = mysql_query("SELECT * FROM userdb WHERE email='$email'"); $playerinfo = mysql_fetch_array($res); echo "<font color=red face=Arial>You are in jail for another $playerinfo[jailtime] days.<p>Jailed by: <b>$playerinfo[jail_by]</b> for reason: <b>$playerinfo[jail_reason]</b>"; } if($type == "verify"){ echo "<font color=red face=Arial>Verification required. Please <a href=verify.php>login</a> here.</font>"; } } ?>
Kod:<?php @session_start(); $db = mysql_connect("localhost", "eternal_dbplayer", "fireball") or Die("I cannot connect to the database because: " . mysql_error()); mysql_select_db("eternal_dsdatabase") or Die("DB Error !"); $res = mysql_query("SELECT * FROM userdb WHERE email = '$email'"); $playerinfo = mysql_fetch_array($res); mysql_free_result($res); // Check Users Browser. If blacklisted, send them to Get-Bent! $agent = $_SERVER['HTTP_USER_AGENT']; $userip_addr = $_SERVER['REMOTE_ADDR']; $leach_query = mysql_query("SELECT agent FROM leachers WHERE verified='y' AND versioned='0'"); while(list($agent_db)=mysql_fetch_array($leach_query)){ if($agent == "$agent_db"){ header("Location: http://www.phpfreaks.com/get_bent.php"); exit(); } } if (!$dest) { $notonboat = mysql_query("update fishdb set outonboat='N' where owner='$playerinfo[id]'"); } $date1 = date(H); if ($date1 == 0) { $date11 = "21"; } if ($date1 == 1) { $date11 = "22"; } if ($date1 == 2) { $date11 = "23"; } if ($date1 == 3) { $date11 = "00"; } if ($date1 == 4) { $date11 = "01"; } if ($date1 == 5) { $date11 = "02"; } if ($date1 == 6) { $date11 = "03"; } if ($date1 == 7) { $date11 = "04"; } if ($date1 == 8) { $date11 = "05"; } if ($date1 == 9) { $date11 = "06"; } if ($date1 == 10) { $date11 = "07"; } if ($date1 == 11) { $date11 = "08"; } if ($date1 == 12) { $date11 = "09"; } if ($date1 == 13) { $date11 = "10"; } if ($date1 == 14) { $date11 = "11"; } if ($date1 == 15) { $date11 = "12"; } if ($date1 == 16) { $date11 = "13"; } if ($date1 == 17) { $date11 = "14"; } if ($date1 == 18) { $date11 = "15"; } if ($date1 == 19) { $date11 = "16"; } if ($date1 == 20) { $date11 = "17"; } if ($date1 == 21) { $date11 = "18"; } if ($date1 == 22) { $date11 = "19"; } if ($date1 == 23) { $date11 = "20"; } $date1 = $date11; $date1b = date(i); if ($date1 > 10) { $date2 = "$date1:$date1b"; } else { $date2 = "$date1:$date1b"; } $j = date(j); $m = date(m); $time = date("j\/m $date1:$date1b:s"); $realtime = date("YzHis"); mysql_query("update userdb set active='$time' where email='$email'"); mysql_query("update userdb set active2='$realtime' where email='$email'"); mysql_query("update userdb set ipaddress='$REMOTE_ADDR' where email='$email'"); $rankname = array( "Peasent", "Valet", "Squire", "Knight", "Lord", "Dol", "Earl", "Count", "Thane", "Duke", "Archduke", "Royal"); $rankypanky = $playerinfo[rank]; $merank = "$rankname[$rankypanky]"; // Days, months....etc.. $dayday = date ("D"); if ($dayday == "Mon"){$newday == "Lunae Dies";} if ($dayday == "Tue"){$newday == "Martis Dies";} if ($dayday == "Wed"){$newday == "Mercurii Dies";} if ($dayday == "Thu"){$newday == "Jovis Dies";} if ($dayday == "Fri"){$newday == "Veneris Dies";} if ($dayday == "Sat"){$newday == "Saturni Dies";} if ($dayday == "Sun"){$newday == "Solis Dies";} $monmon = date ("M"); if ($monmon == "Jan"){$newmon == "Month of Janus, God of doors and gates";} if ($monmon == "Feb"){$newmon == "Month of Februalia, sacrifices are made to atone for sins";} if ($monmon == "Mar"){$newmon == "Month of Mars, God of War";} if ($monmon == "Apr"){$newmon == "Month of Aperire, The buds open";} if ($monmon == "May"){$newmon == "Month of Maia, the Goddess of growth of plants";} if ($monmon == "Jun"){$newmon == "Month of Juno, time of Goddess Junius";} if ($monmon == "Jul"){$newmon == "Month of Quintilis Julius";} if ($monmon == "Aug"){$newmon == "Month of Sextilis, Augustus Caesar";} if ($monmon == "Sep"){$newmon == "Month of Septem";} if ($monmon == "Oct"){$newmon == "Month of Octo";} if ($monmon == "Nov"){$newmon == "Month of Novem";} if ($monmon == "Dec"){$newmon == "Month of Decem";} include "money_fns.php"; function jailerror($type, $email){ if($type == "jail"){ $res = mysql_query("SELECT * FROM userdb WHERE email='$email'"); $playerinfo = mysql_fetch_array($res); include("style5.css"); Echo "<center><img src=\"image/top.gif\" border=0 height=51 width=350><br><br></center>"; //echo "<body text=\"#800000\" bgcolor=\"#000000\"></body><font face=Arial>"; echo "<font color=red>You are in jail for another $playerinfo[jailtime] days.<p>Jailed by: <b>$playerinfo[jail_by]</b> for reason: <b>$playerinfo[jail_reason]</b>"; } } function gem($type) { if($type == "c"){ echo "<img src=\"image/gem_crystal.gif\">"; } if($type == "d"){ echo "<img src=\"image/gem_diamond.gif\">"; } if($type == "e"){ echo "<img src=\"image/gem_emerald.gif\">"; } if($type == "r"){ echo "<img src=\"image/gem_ruby.gif\">"; } } function error($type) { if($type == "field"){ include("style5.css"); Echo "<center><br><br></center>"; //echo "<body text=\"#800000\" bgcolor=\"#000000\"></body><font face=Arial>"; echo "<font color=red>You have left fields blank. Please <a href=\"index.php\">relogin</a>.</font>"; } if($type == "password"){ include("style5.css"); Echo "<center><br><br></center>"; // echo "<body text=\"#800000\" bgcolor=\"#000000\"></body><font face=Arial>"; echo "<font color=red>Incorrect password. Please <a href=\"index.php\">relogin</a>.</font>"; } if($type == "jail"){ include("style5.css"); Echo "<center><br><br></center>"; // echo "<body text=\"#800000\" bgcolor=\"#000000\"></body><font face=Arial>"; $res = mysql_query("SELECT * FROM userdb WHERE email='$email'"); $playerinfo = mysql_fetch_array($res); echo "<font color=red>You are in jail for another $playerinfo[jailtime] days.<p>Jailed by: <b>$playerinfo[jail_by]</b> for reason: <b>$playerinfo[jail_reason]</b>"; } if($type == "verify"){ include("style5.css"); Echo "<center><br><br></center>"; //echo "<body text=\"#800000\" bgcolor=\"#000000\"></body><font face=Arial>"; echo "<font color=red>Verification required. Please <a href=verify.php>verify</a> here.</font>"; } } ob_end_flush(); ?>
Przykladowe dane do polaczenia z baza
Kod:* Panel PHPMyAdmin: http://mysql1.yoyo.pl/ * Adres serwera MySQL: mysql1.yoyo.pl * Port: 3306 * Baza danych: db4754756 * Nazwa użytkownika: db4754756 * Hasło: Takie jakie podałeż podczas tworzenia/migracji strony (zmień)


Odpowiedz z cytatem
NIE POMAGAM NA GG, jeśeli zostaniesz zablokowany/a to nie miej do mnie pretensji. Zawsze lubię pogadać gdy mam na to czas. GG podaje jedynie do zgłaszania wszelkich problemów z forum jak i jego treści.
powinno być o tym w instalacji bo myżlałem że jest tylko w configu

Zakładki