login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Fouten eruit halen

Offline HumanX - 04/01/2005 21:17
Avatar van HumanXHTML interesse Hoi
kan ieamdn mischien de fouten hiwer uit halen want de fout komt in dit script voor alvast bedankt


  1. <?php /* ------------------------- */
  2.  
  3. if(!(@mysql_pconnect("localhost","criminals","1024") && @mysql_select_db("criminals"))) {
  4. print <<<ENDHTML
  5. <html>
  6.  
  7.  
  8. <head>
  9. <title>[( Criminals )]</title>
  10. <link rel="stylesheet" type="text/css" href="css-v1.css">
  11.  
  12. </head>
  13.  
  14.  
  15. <body style="background: #AA3C3C; margin: 0px;">
  16.   <table width=100%>
  17.   <tr><td class="subTitle"><b>Database Error</b></td></tr>
  18.   <tr><td class="mainTxt">
  19. Er is een fout opgetreden in de database
  20.   </td></tr>
  21.   </table>
  22. </body>
  23.  
  24. </html>
  25. ENDHTML;
  26. }
  27.  
  28.  
  29. include("_include-funcs.php");
  30. if(isset($_SESSION['login'])) {
  31. $dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'");
  32. $data = mysql_fetch_object($dbres);
  33. }
  34.  
  35. if(((count($_POST) > 0 && !isset($_POST['omnilog'])) || ($_POST['omnilog'] == 1 && count($_GET) > 1)) && isset($OMNILOG)) {
  36. $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP'];
  37. $forwardedFor = preg_replace('/, .+/','',$forwardedFor);
  38. $postVars = addslashes(var_export($_POST,TRUE));
  39. if($postVars == "array (\n)" || (count($_POST) == 1 && isset($_POST['omnilog'])))
  40. $postVars = "";
  41. $getVars = addslashes(var_export($_GET,TRUE));
  42. if($getVars == "array (\n)")
  43. $getVars = "";
  44. mysql_query("INSERT INTO `[omnilog]` VALUES(NOW(),'{$_COOKIE['login']}','{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SERVER['PHP_SELF']}','$postVars','$getVars')");
  45. }
  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['HTTP_CLIENT_IP'];
  73. $forwardedFor = preg_replace('/, .+/','',$forwardedFor);
  74. $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `level`='-1' AND (`IP`='$clientIP' OR `IP`='$forwardedFor')");
  75. if(mysql_num_rows($dbres) != 0) {
  76. print <<<ENDHTML
  77. <html>
  78.  
  79.  
  80. <head>
  81. <title>[( Criminals )]</title>
  82. <link rel="stylesheet" type="text/css" href="css-v1.css">
  83.  
  84. </head>
  85.  
  86.  
  87. <body style="background: #AA3C3C; margin: 0px;">
  88.   <table width=100% height=100%>
  89.   <tr><td class="subTitle"><b>Ban</b></td></tr>
  90.   <tr><td class="mainTxt">
  91. Het IP waarmee je speelt is geband
  92.   </td></tr>
  93.   </table>
  94. </body>
  95.  
  96. </html>
  97. ENDHTML;
  98. }
  99.  
  100.  
  101.  
  102. if(isset($UPDATE_DB)) {
  103. $dbres = mysql_query("SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `[cron]`");
  104. while($x = mysql_fetch_object($dbres))
  105. $update[$x->name] = $x->time;
  106.  
  107. if(floor($update['hour']/3600) != floor(time()/3600)) {
  108. $dbres = mysql_query("SELECT GET_LOCK('hour_update',0)");
  109. if(mysql_result($dbres,0) == 1) {
  110. $cron_pass = "secretcronpassword";
  111. mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'");
  112. include("_cron_hour.php");
  113. mysql_query("SELECT RELEASE_LOCK('hour_update')");
  114. }
  115. }
  116.  
  117. if(floor($update['day']/86400) != floor(time()/86400)) {
  118. $dbres = mysql_query("SELECT GET_LOCK('day_update',0)");
  119. if(mysql_result($dbres,0) == 1) {
  120. $cron_pass = "secretcronpassword";
  121. mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='day'");
  122. include("_cron_day.php");
  123. mysql_query("SELECT RELEASE_LOCK('day_update')");
  124. }
  125. }
  126.  
  127. if(floor($update['week']/604800) != floor(time()/604800)) {
  128. $dbres = mysql_query("SELECT GET_LOCK('week_update',0)");
  129. if(mysql_result($dbres,0) == 1) {
  130. $cron_pass = "secretcronpassword";
  131. mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='week'");
  132. include("_cron_week.php");
  133. mysql_query("SELECT RELEASE_LOCK('week_update')");
  134. }
  135. }
  136.  
  137. if(date('n',$update['month']) != date('n',time())) {
  138. $dbres = mysql_query("SELECT GET_LOCK('month_update',0)");
  139. if(mysql_result($dbres,0) == 1) {
  140. $cron_pass = "secretcronpassword";
  141. mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='month'");
  142. include("_cron_month.php");
  143. mysql_query("SELECT RELEASE_LOCK('month_update')");
  144. }
  145. }
  146.  
  147. if((date('G',time()) >= 16 && date('z',time()) != date('z',$update['horserace'])) || (date('G',time()) >= 21 && date('G',$update['horserace']) < 21)) {
  148. $dbres = mysql_query("SELECT GET_LOCK('horserace_update',0)");
  149. if(mysql_result($dbres,0) == 1) {
  150. $cron_pass = "secretcronpassword";
  151. mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='horserace'");
  152. include("_cron_horserace.php");
  153. mysql_query("SELECT RELEASE_LOCK('horserace_update')");
  154. }
  155. }
  156. }
  157.  
  158. /* ------------------------- */ ?>

0 antwoorden

Gesponsorde links
Er zijn nog geen reacties op dit bericht.
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.309s