login  Naam:   Wachtwoord: 
Registreer je!
 Forum

fout in mijn chat

Offline Zerato - 20/11/2004 19:54
Avatar van ZeratoOnbekend Warning: Supplied argument is not a valid MySQL result resource in c:\apache\htdocs\exofusion\chatmsgs.php on line 35

  1. <?php print "<META HTTP-EQUIV=Refresh CONTENT=\"15;url=chatmsgs.php?userid=$userid\">"; ?>
  2. <style type=text/css>
  3. a {
  4. text-decoration: none;
  5. text-transform: none;
  6. color: black;
  7. }
  8. a:hover {
  9. text-decoration: none;
  10. text-transform: none;
  11. color: 0066cc;
  12. }
  13. body, iframe, select, textarea {
  14. scrollbar-face-color: white;
  15. scrollbar-highlight-color: black;
  16. scrollbar-shadow-color: black;
  17. scrollbar-3dlight-color: white;
  18. scrollbar-arrow-color: black;
  19. scrollbar-track-color: white;
  20. scrollbar-darkshadow-color: white;
  21. scrollbar-base-color: white;
  22. }
  23. * { font-family: verdana; font-size: 10px; }
  24. .normal { color: gray; }
  25. .admin { color: #0066cc; }
  26. .event { color: red; }
  27. .me { color: green; }
  28. .whisper { color: tan; }
  29. </style>
  30.  
  31. <?php
  32. include("config.php");
  33. if ($view == chat || !$view) {
  34. $csel = mysql_query("select * from chat where target=-1 order by id desc limit 15");
  35. while ($chat = mysql_fetch_array($csel)) {
  36. print "<b>$chat[user]</b>: $chat[chat]<br>";
  37. }
  38. }
  39. if ($view == whispers) {
  40. $csel = mysql_query("select * from chat where target=$userid order by id desc limit 20");
  41. while ($chat = mysql_fetch_array($csel)) {
  42. print "<b>$chat[user]</b>: $chat[chat]<br>";
  43. }
  44. }
  45. if ($view == reference) {
  46. print "<b><u>Emoticons</b></u><br>";
  47. print "<table>";
  48. print "<tr><td><img src=back.gif></td><td>-</td><td> [back]</td></tr>";
  49. print "<tr><td><img src=bigsmile.gif></td><td>-</td><td> [bigsmile]</td></tr>";
  50. print "<tr><td><img src=cry.gif></td><td>-</td><td> [cry]</td></tr>";
  51. print "<tr><td><img src=forward.gif></td><td>-</td><td> [forward]</td></tr>";
  52. print "<tr><td><img src=frown.gif></td><td>-</td><td> [frown]</td></tr>";
  53. print "<tr><td><img src=frustrated.gif></td><td>-</td><td> [frustrated]</td></tr>";
  54. print "<tr><td><img src=mad.gif></td><td>-</td><td> [mad]</td></tr>";
  55. print "<tr><td><img src=pause.gif></td><td>-</td><td> [pause]</td></tr>";
  56. print "<tr><td><img src=play.gif></td><td>-</td><td> [play]</td></tr>";
  57. print "<tr><td><img src=smile.gif></td><td>-</td><td> [smile]</td></tr>";
  58. print "<tr><td><img src=stop.gif></td><td>-</td><td> [stop]</td></tr>";
  59. print "<tr><td><img src=suprised.gif></td><td>-</td><td> [suprised]</td></tr>";
  60. print "<tr><td><img src=tongue.gif></td><td>-</td><td> [tongue]</td></tr>";
  61. print "</td></tr></table><br>";
  62. print "<b><u>Commands</b></u><br>";
  63. print "<table>";
  64. print "<tr><td>/addadmin [id]</td><td>-</td><td>Adds an admin.</td></tr>";
  65. print "<tr><td>/deladmin [id]</td><td>-</td><td>Deletes an admin.</td></tr>";
  66. print "<tr><td>/silence</td><td>-</td><td>Only administrators can speak.</td></tr>";
  67. print "<tr><td>/unsilence</td><td>-</td><td>Removes silence status.</td></tr>";
  68. print "<tr><td>/me [action]</td><td>-</td><td>Makes green italic text.</td></tr>";
  69. print "<tr><td>/whisper [id] [msg]</td><td>-</td><td>Adds a whisper to the ID's whisper window.</td></tr>";
  70. print "</td></tr></table><br>";
  71. print "<b><u>Formatting</b></u><br>";
  72. print "<table>";
  73. print "<tr><td>[b]text[/b]</td><td>-</td><td>Makes <b>bold</b> text.</td></tr>";
  74. print "<tr><td>[u]text[/u]</td><td>-</td><td>Makes <u>underline</u> text.</td></tr>";
  75. print "<tr><td>[i]text[/i]</td><td>-</td><td>Makes <i>italic</i> text.</td></tr>";
  76. print "<tr><td>[s]text[/s]</td><td>-</td><td>Makes <s>strikeout</s> text.</td></tr>";
  77. print "</table>";
  78. }
  79. $psel = mysql_query("select * from players where page='Chat'");
  80. $ctime = time();
  81. while ($pl = mysql_fetch_array($psel)) {
  82. $span = ($ctime - $pl[lpv]);
  83. if ($span <= 180) {
  84. if ($pl[rank] == Admin) {
  85. $on = "$on [!$pl[tag]<A href=view.php?view=$pl[id]>$pl[user]</a> ($pl[id])] ";
  86. } else {
  87. $on = "$on [$pl[tag]<A href=view.php?view=$pl[id]>$pl[user]</a> ($pl[id])] ";
  88. }
  89. $numon = ($numon + 1);
  90. }
  91. }
  92. print "<font class=normal><center><br><br><br>$on<br>";
  93. $numchat = mysql_num_rows(mysql_query("select * from chat"));
  94. print "There are <b>$numchat</b> chat lines. | <b>$numon</b> players in chat.<br>";
  95. print "[<a href=chatmsgs.php?view=chat&userid=$userid>Chat</a>][<a href=chatmsgs.php?view=whispers&userid=$userid>Whispers</a>][<A href=chatmsgs.php?view=reference&userid=$userid>cML</a>]</font>";
  96. ?>



de fout zit em op de 35 ste regel:s

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.193s