Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.43 KB | None | 0 0
  1. <?php
  2. require_once('../../class2.php');
  3. if (!defined('e107_INIT')) { exit; }
  4.  
  5. require_once(HEADERF);
  6.  
  7. $lightirc = e107::pref('lightirc');
  8. e107::lan('lightirc');
  9.  
  10. $text = '
  11. <div id="lightIRC_maindiv">
  12. <div id="lightIRC" style="height:100%; text-align:center;">
  13. <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
  14. </div>
  15. </div>';
  16. $text .= ' <script type="text/javascript"> var flashvars = false;';
  17.  
  18.  
  19. if ($lightirc['lightirc_host'] == ""){
  20. $text .= "var params = {host:\"".$lightirc['lightirc_host']."\"".($lightirc['lightirc_port'] != "" ? ",
  21. port:\"".$lightirc['lightirc_port']."\"};\n" : "};\n")."
  22. var attributes = {allowfullscreen:true};";
  23. }
  24. else {
  25. $text .= "var params = {host:\"".$lightirc['lightirc_host']."\"".($lightirc['lightirc_port'] != "" ? ",
  26. port:\"".$lightirc['lightirc_port']."\"};\n" : "};\n");
  27. if (USER)
  28. $text .= "\t\tparams.nickselectSuggestion = \"".USERNAME."\";\n";
  29. else {
  30. $text .= "\t\tparams.nickselectSuggestion = \"".$lightirc['lightirc_nickselectSuggestion']."25\";\n";
  31. }
  32. if ($lightirc['nickselect'] == "yes"){
  33. $text .= "\t\tparams.nickselect = \"yes\";\n";
  34. $nselect = true;
  35. }else {
  36. if (USER)
  37. $text .= "\t\tparams.nick = \"".USERNAME."\";\n";
  38. else
  39. $text .= "\t\tparams.nick = \"".$lightirc['lightirc_nickselectSuggestion']."25\";\n";
  40. }
  41. if ($lightirc['nickServAuth'] == "yes") {
  42. $text .= "\t\tparams.nickServAuth = \"yes\";\n";
  43. if (!$nselect)
  44. $text .= "\t\tparams.nickselect = \"yes\";\n";
  45. }
  46. if ($lightirc['useFlashStyleUrl'] == "yes")
  47. $text .= "\t\tparams.styleURL = \"styles/".strtolower($lightirc['lightirc_styleURL']).".swf\";\n";
  48. else {
  49. $text .= "\t\tparams.URLTextColor = \"#".$lightirc['lightirc_URLTextColor']."\";
  50. params.buttonTextColor = \"#".$lightirc['lightirc_buttonTextColor']."\";
  51. params.buttonNewMessageTextColor = \"#".$lightirc['lightirc_buttonNewMessageTextColor']."\";
  52. params.buttonNewInfoTextColor = \"#".$lightirc['lightirc_buttonNewInfoTextColor']."\";
  53. params.infoLineColor = \"#".$lightirc['lightirc_infoLineColor']."\";\n";
  54. }
  55. if ($lightirc['fontSize'] >= 6)
  56. $text .= "\t\tparams.fontSize = \"".$lightirc['lightirc_fontSize']."\";\n";
  57. if ($lightirc['serverPassword'] == "yes")
  58. $text .= "\t\tparams.serverPassword = \"".$lightirc['lightirc_serverPassword']."\";\n";
  59. if (trim($lightirc['autojoin']) != "")
  60. $text .= "\t\tparams.autojoin = \"".$lightirc['lightirc_autojoin']."\";\n";
  61. if ($lightirc['showServerWindowButton'] == "no")
  62. $text .= "\t\tparams.showServerWindowButton = \"".$lightirc['lightirc_showServerWindowButton']."\";\n";
  63. if ($lightirc['soundAlerts'] == "no")
  64. $text .= "\t\tparams.soundAlerts = \"".$lightirc['lightirc_soundAlerts']."\";\n";
  65. if ($lightirc['autoReconnect'] == "no")
  66. $text .= "\t\tparams.autoReconnect = \"".$lightirc['lightirc_autoReconnect']."\";\n";
  67. if ($lightirc['showNavigationBar'] == "no")
  68. $text .= "\t\tparams.showNavigationBar = \"".$lightirc['lightirc_showNavigationBar']."\";\n";
  69. if ($lightirc['nickCentral'] == "yes")
  70. $text .= "\t\tparams.nickCentral = \"".$lightirc['lightirc_nickCentral']."\";\n";
  71. if ($lightirc['doubleClickForQuery'] == "yes")
  72. $text .= "\t\tparams.doubleClickForQuery = \"".$lightirc['lightirc_doubleClickForQuery']."\";\n";
  73. if ($lightirc['showActionsButton'] == "yes")
  74. $text .= "\t\tparams.showActionsButton = \"".$lightirc['lightirc_showActionsButton']."\";\n";
  75. if ($lightirc['userListWidth'] != "160" && intval($lightirc['lightirc_userListWidth']))
  76. $text .= "\t\tparams.userListWidth = \"".$lightirc['lightirc_userListWidth']."\";\n";
  77. if ($lightirc['policyPort'] != "843" && intval($lightirc['lightirc_policyPort']))
  78. $text .= "\t\tparams.policyPort = \"".$lightirc['lightirc_policyPort']."\";\n";
  79. if ($lightirc['showListButton'] == "no")
  80. $text .= "\t\tparams.showListButton = \"".$lightirc['lightirc_showListButton']."\";\n";
  81. if ($lightirc['showJoinPartMessages'] == "no")
  82. $text .= "\t\tparams.showJoinPartMessages = \"".$lightirc['lightirc_showJoinPartMessages']."\";\n";
  83. if ($lightirc['showButtonBar'] == "no")
  84. $text .= "\t\tparams.showButtonBar = \"".$lightirc['lightirc_showButtonBar']."\";\n";
  85. if ($lightirc['showRichTextControls'] == "no")
  86. $text .= "\t\tparams.showRichTextControls = \"".$lightirc['lightirc_showRichTextControls']."\";\n";
  87. if ($lightirc['showNickChangeButton'] == "no")
  88. $text .= "\t\tparams.showNickChangeButton = \"".$lightirc['lightirc_showNickChangeButton']."\";\n";
  89. if ($lightirc['showTimestamps'] == "no")
  90. $text .= "\t\tparams.showTimestamps = \"".$lightirc['lightirc_showTimestamps']."\";\n";
  91. if ($lightirc['chatAreaClickOnUser'] != "select")
  92. $text .= "\t\tparams.chatAreaClickOnUser = \"".$lightirc['lightirc_chatAreaClickOnUser']."\";\n";
  93.  
  94. $text .= "\t\tparams.language = \"".$lightirc['lightirc_language']."\";\n";
  95.  
  96. }
  97. $text .= ' swfobject.embedSWF("lightIRC.swf", "lightIRC", "100%", "100%", "10.0.0", "expressInstall.swf", params);
  98. </script> ';
  99.  
  100. $title = LIRC_CORE_00;
  101. $ns -> tablerender($title, $text);
  102. ?>
  103.  
  104. <?php
  105. require_once(FOOTERF);
  106. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement