Oppaitime's version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?
  2. enforce_login();
  3. View::show_header('IRC');
  4. $DB->query("
  5. SELECT IRCKey
  6. FROM users_main
  7. WHERE ID = $LoggedUser[ID]");
  8. list($IRCKey) = $DB->next_record();
  9. if (false && empty($IRCKey)) {
  10. ?>
  11. <div class="thin">
  12. <div class="header">
  13. <h3 id="irc">IRC Rules - Please read these carefully!</h3>
  14. </div>
  15. <div class="box pad" style="padding: 10px 10px 10px 20px;">
  16. <p>
  17. <strong>Please set your IRC Key on your <a href="user.php?action=edit&amp;userid=<?=$LoggedUser['ID']?>">profile</a> first! For more information on IRC, please read the <a href="wiki.php?action=article&amp;name=IRC+-+How+to+join">wiki article</a>.</strong>
  18. </p>
  19. </div>
  20. </div>
  21. <?
  22. } else {
  23. if (!isset($_POST['accept'])) {
  24. ?>
  25. <div class="thin">
  26. <div class="header">
  27. <h3 id="irc">IRC Rules - Please read these carefully!</h3>
  28. </div>
  29. <div class="box pad" style="padding: 10px 10px 10px 20px;">
  30. <? Rules::display_irc_chat_rules() ?>
  31. <form class="confirm_form center" name="chat" method="post" action="chat.php">
  32. <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
  33. <input type="submit" name="accept" value="I agree to these rules" />
  34. </form>
  35. </div>
  36. </div>
  37. <?
  38. } else {
  39. $nick = $LoggedUser['Username'];
  40. $nick = preg_replace('/[^a-zA-Z0-9\[\]\\`\^\{\}\|_]/', '', $nick);
  41. if (strlen($nick) == 0) {
  42. $nick = SITE_NAME.'Guest????';
  43. } else {
  44. if (is_numeric(substr($nick, 0, 1))) {
  45. $nick = '_' . $nick;
  46. }
  47. }
  48. ?>
  49. <div class="thin">
  50. <div class="header">
  51. <h3 id="general">IRC</h3>
  52. </div>
  53. <div class="box pad" style="padding: 10px 0px 0px 0px;">
  54. <div style="padding: 0px 10px 10px 20px;">
  55. <p>If you have an IRC client, refer to <a href="wiki.php?action=article&amp;name=IRC">this wiki article</a> for information on how to connect.</p>
  56. </div>
  57. <iframe src="<?echo 'https://chat.'.SITE_DOMAIN?>" width="100%" height="600" style="border:0;">
  58. </iframe>
  59. </div>
  60. </div>
  61. <?
  62. }
  63. }
  64. View::show_footer();
  65. ?>