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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. if (strlen($nick) == 0) {
  41. $nick = SITE_NAME.'Guest????';
  42. } else {
  43. if (is_numeric(substr($nick, 0, 1))) {
  44. $nick = '_' . $nick;
  45. }
  46. }
  47. ?>
  48. <div class="thin">
  49. <div class="header">
  50. <h3 id="general">IRC</h3>
  51. </div>
  52. <div class="box pad" style="padding: 10px 0px 0px 0px;">
  53. <div style="padding: 0px 10px 10px 20px;">
  54. <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>
  55. </div>
  56. <iframe src="<?echo 'https://chat.'.SITE_DOMAIN.'?nick='.$nick?>" width="100%" height="600" style="border:0;">
  57. </iframe>
  58. </div>
  59. </div>
  60. <?
  61. }
  62. }
  63. View::show_footer();
  64. ?>