login  Naam:   Wachtwoord: 
Registreer je!
 Forum

config

Offline stijnhau - 08/05/2005 14:59 (laatste wijziging 08/05/2005 15:08)
Avatar van stijnhauOnbekend er zit een fout in lijn 92
  1. <?php /* ------------------------- */
  2.  
  3. if(!(@mysql_pconnect("localhost","webscripters","01az23er") && @mysql_select_db("webscripters_nl_db"))) {
  4. print <<<ENDHTML
  5.  
  6. <html>
  7.  
  8.  
  9. <head>
  10. <title>DarkCriminal</title>
  11. <link rel="stylesheet" type="text/css" href="css-v1.css">
  12.  
  13. </head>
  14.  
  15.  
  16. <body style="background: #000000; margin: 0px;">
  17.   <table width=100%>
  18.   <tr><td class="subTitle"><b>Database Error</b></td></tr>
  19.   <tr><td class="mainTxt">
  20. Er is een fout opgetreden in de database.waarshijnlijk omdat ik er mee bezig ben.<br>
  21.   blijft het zich voort doen stuur me dan een mail stijn.haulotte@skynet.be<br>
  22.   </td></tr>
  23.   </table>
  24. </body>
  25. </html>
  26. ENDHTML;
  27. }
  28.  
  29.  
  30. include("_include-funcs.php");
  31. if(isset($_SESSION['naam'])) {
  32. $dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'");
  33. $data = mysql_fetch_object($dbres);
  34. }
  35.  
  36. if(((count($_POST) > 0 && !isset($_POST['omnilog'])) || ($_POST['omnilog'] == 1 && count($_GET) > 1)) && isset($OMNILOG)) {
  37. $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP'];
  38. $forwardedFor = preg_replace('/, .+/','',$forwardedFor);
  39. $postVars = addslashes(var_export($_POST,TRUE));
  40. if($postVars == "array (\n)" || (count($_POST) == 1 && isset($_POST['omnilog'])))
  41. $postVars = "";
  42. $getVars = addslashes(var_export($_GET,TRUE));
  43. if($getVars == "array (\n)")
  44. $getVars = "";
  45. mysql_query("INSERT INTO `[omnilog]` VALUES(NOW(),'{$_COOKIE['login']}','{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SERVER['PHP_SELF']}','$postVars','$getVars')");
  46. }
  47. foreach($_POST as $key => $value) {
  48. if(gettype($_POST[$key]) == "array")
  49. foreach($_POST[$key] as $key2 => $value2)
  50. $_POST[$key][$key2] = addslashes($_POST[$key][$key2]);
  51. else
  52. $_POST[$key] = addslashes($_POST[$key]);
  53. }
  54. foreach($_GET as $key => $value) {
  55. if(gettype($_GET[$key]) == "array")
  56. foreach($_GET[$key] as $key2 => $value2)
  57. $_GET[$key][$key2] = addslashes($_GET[$key][$key2]);
  58. else
  59. $_GET[$key] = addslashes($_GET[$key]);
  60. }
  61. foreach($_COOKIE as $key => $value) {
  62. if(gettype($_COOKIE[$key]) == "array")
  63. foreach($_COOKIE[$key] as $key2 => $value2)
  64. $_COOKIE[$key][$key2] = addslashes($_COOKIE[$key][$key2]);
  65. else
  66. $_COOKIE[$key] = addslashes($_COOKIE[$key]);
  67. }
  68.  
  69.  
  70.  
  71. $clientIP = $_SERVER['REMOTE_ADDR'];
  72. $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
  73. $forwardedFor = preg_replace('/, .+/','',$forwardedFor);
  74. $dbres = mysql_query("SELECT `ip` FROM `[bans]` WHERE (`ip`='$clientIP' OR `ip`='$forwardedFor')");
  75. if(mysql_num_rows($dbres) != 0) {
  76. print <<<ENDHTML
  77. <html>
  78. <head>
  79. <title>[GEO-D]</title>
  80. <link rel="stylesheet" type="text/css" href="css-v1.css">
  81. </head>
  82. <body style="background-image:url(mid.gif); background-attachment:fixed; background-repeat:no-repeat" style="margin: 0px;">
  83. <table width=100% height=100%>
  84. <tr><td class="subTitle"><b>Ban</b></td></tr>
  85. <tr><td class="mainTxt">
  86. Het IP waarmee je speelt is geband
  87. </td></tr>
  88. </table>
  89. </body>
  90. </html>

8 antwoorden

Gesponsorde links
Offline Legolas - 08/05/2005 15:02
Avatar van Legolas Onbekend Kun je nou eens zeggen WAT de fout is?
en lijn 92, dat </html>, is volgens mij niet veel mis mee
Offline stijnhau - 08/05/2005 15:03 (laatste wijziging 08/05/2005 15:08)
Avatar van stijnhau Onbekend deze fout geeft hij.
Parse error: parse error in /data/members/free/tripod/nl/w/e/b/webscripters/htdocs/config.php on line 92
Offline stijnhau - 08/05/2005 15:13
Avatar van stijnhau Onbekend is opgelost heb een anderegenomen wand snap e fout ni is tovh i fout die lijn.
Offline Legolas - 08/05/2005 15:15 (laatste wijziging 08/05/2005 15:16)
Avatar van Legolas Onbekend jij doet beetje vreemd, beter is:
  1. <?php
  2. if(!(@mysql_pconnect("localhost","webscripters","01az23er") && @mysql_select_db("webscripters_nl_db"))) {
  3. ?>
  4. <html>
  5. <head>
  6. <title>DarkCriminal</title>
  7. <link rel="stylesheet" type="text/css" href="css-v1.css">
  8. </head>
  9. <body style="background: #000000; margin: 0px;">
  10. <table width=100%>
  11. <tr><td class="subTitle"><b>Database Error</b></td></tr>
  12. <tr><td class="mainTxt">
  13. Er is een fout opgetreden in de database.waarshijnlijk omdat ik er mee bezig ben.<br>
  14. blijft het zich voort doen stuur me dan een mail stijn.haulotte@skynet.be<br>
  15. </td></tr>
  16. </table>
  17. </body>
  18. </html>
  19. <?
  20. }
  21. include("_include-funcs.php");
  22. if(isset($_SESSION['naam'])) {
  23. $dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'");
  24. $data = mysql_fetch_object($dbres);
  25. }
  26. if(((count($_POST) > 0 && !isset($_POST['omnilog'])) || ($_POST['omnilog'] == 1 && count($_GET) > 1)) && isset($OMNILOG)) {
  27. $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP'];
  28. $forwardedFor = preg_replace('/, .+/','',$forwardedFor);
  29. $postVars = addslashes(var_export($_POST,TRUE));
  30. if($postVars == "array (\n)" || (count($_POST) == 1 && isset($_POST['omnilog'])))
  31. $postVars = "";
  32. $getVars = addslashes(var_export($_GET,TRUE));
  33. if($getVars == "array (\n)")
  34. $getVars = "";
  35. mysql_query("INSERT INTO `[omnilog]` VALUES(NOW(),'{$_COOKIE['login']}','{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SERVER['PHP_SELF']}','$postVars','$getVars')");
  36. }
  37. foreach($_POST as $key => $value) {
  38. if(gettype($_POST[$key]) == "array")
  39. foreach($_POST[$key] as $key2 => $value2)
  40. $_POST[$key][$key2] = addslashes($_POST[$key][$key2]);
  41. else
  42. $_POST[$key] = addslashes($_POST[$key]);
  43. }
  44. foreach($_GET as $key => $value) {
  45. if(gettype($_GET[$key]) == "array")
  46. foreach($_GET[$key] as $key2 => $value2)
  47. $_GET[$key][$key2] = addslashes($_GET[$key][$key2]);
  48. else
  49. $_GET[$key] = addslashes($_GET[$key]);
  50. }
  51. foreach($_COOKIE as $key => $value) {
  52. if(gettype($_COOKIE[$key]) == "array")
  53. foreach($_COOKIE[$key] as $key2 => $value2)
  54. $_COOKIE[$key][$key2] = addslashes($_COOKIE[$key][$key2]);
  55. else
  56. $_COOKIE[$key] = addslashes($_COOKIE[$key]);
  57. }
  58. $clientIP = $_SERVER['REMOTE_ADDR'];
  59. $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
  60. $forwardedFor = preg_replace('/, .+/','',$forwardedFor);
  61. $dbres = mysql_query("SELECT `ip` FROM `[bans]` WHERE (`ip`='$clientIP' OR `ip`='$forwardedFor')");
  62. if(mysql_num_rows($dbres) != 0) {
  63. ?>
  64. <html>
  65. <head>
  66. <title>[GEO-D]</title>
  67. <link rel="stylesheet" type="text/css" href="css-v1.css">
  68. </head>
  69. <body style="background-image:url(mid.gif); background-attachment:fixed; background-repeat:no-repeat" style="margin: 0px;">
  70. <table width=100% height=100%>
  71. <tr><td class="subTitle"><b>Ban</b></td></tr>
  72. <tr><td class="mainTxt">
  73. Het IP waarmee je speelt is geband
  74. </td></tr>
  75. </table>
  76. </body>
  77. </html>

Is volgens mij beter:cool:
edit: jammer dat je een ander neemt al snap je de fout even niet, want dit moet het doen:(
Offline Martijn1989 - 08/05/2005 16:14
Avatar van Martijn1989 PHP ver gevorderde
  1. if(mysql_num_rows($dbres) != 0) {


Lijn 64 word tog niet afgesloten :S?
Offline Steven - 08/05/2005 17:18 (laatste wijziging 08/05/2005 17:21)
Avatar van Steven HTML interesse volgens mij moet je zoiezo dit helemaal bovenaan je pagina zetten:

  1. <?php
  2. include("_include-funcs.php");
  3. ?>


en dat van line 31/32 weghalen
Offline Duikboot - 08/05/2005 17:35
Avatar van Duikboot Grafische gevorderde De fout was denk ik dat je bij html php niet afgesloten hebt.
Offline delta_004 - 09/05/2005 08:01
Avatar van delta_004 Onbekend nu bent ge deze } vergeten
Je hebt 1 geopend maar niet gesloten
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2025 Sitemasters.be - Regels - Laadtijd: 0.221s