index.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. <?php
  2. ///////
  3. // IdleIRC 2020
  4. // (C) Chris Dorman, GPLv3
  5. // https://notabug.org/Pentium44/idleirc
  6. ///////
  7. // Start session for username saves.
  8. session_start();
  9. include "config.php";
  10. if(!file_exists("users"))
  11. {
  12. mkdir("users", 0777);
  13. }
  14. function registerForm() {
  15. ?>
  16. <br>
  17. <div class="form">
  18. <form action="<?php echo $_SERVER['PHP_SELF']; ?>?register=go" method="post">
  19. <table>
  20. <tr><td>Username:</td><td> <input style="padding: 2px; width: 300px;" class="text" type="text" name="username"></td></tr>
  21. <tr><td>Password:</td><td> <input style="padding: 2px; width: 300px;" class="text" type="password" name="password"></td></tr>
  22. <tr><td>Password again:</td><td> <input style="padding: 2px;width: 300px;" class="text" type="password" name="password-again"></td></tr>
  23. <tr><td>Below forms:</td><td> The nickname form can be left blank and<br /> will be substituted with your username.</td></tr>
  24. <tr><td>Default Nickname:</td><td> <input style="padding: 2px; width: 300px;" class="text" type="text" name="nick"></td></tr>
  25. <tr><td>Autoconnect/focus channel:</td><td> <input style="padding: 2px; width: 300px;" class="text" type="text" name="channel" value="<?php echo $GLOBALS['default_channel']; ?>"></td></tr>
  26. <?php
  27. if($GLOBALS['allowMultiServer'] == "true") {
  28. ?>
  29. <tr><td>Server (IP:Port)</td><td> <input style="padding: 2px; width: 236px;" class="text" type="text" name="servaddr" value="<?php echo $GLOBALS['server']; ?>">:<input style="padding: 2px; width: 50px;" class="text" type="text" name="servport" value="<?php echo $GLOBALS['port']; ?>"></td></tr>
  30. <?php
  31. }
  32. ?>
  33. </table>
  34. <br />
  35. <input style="padding: 2px;" class="text" type="submit" name="submitBtn" value="Create account">
  36. </form>
  37. </div>
  38. <br />
  39. <?php
  40. }
  41. function loginForm(){
  42. ?>
  43. <br>
  44. <div class="form">
  45. <p>
  46. <?php echo $GLOBALS['desc']; ?><br />
  47. Don't have an account? <a href="index.php?register">Create one</a> here!<br />
  48. </p>
  49. <form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=login" method="post">
  50. <table>
  51. <tr><td>Username:</td><td> <input style="padding: 2px; width: 200px;" class="text" type="text" name="username"></td></tr>
  52. <tr><td>Password:</td><td> <input style="padding: 2px; width: 200px;" class="text" type="password" name="password"></td></tr>
  53. </table>
  54. <input style="padding: 2px;" class="text" type="submit" name="submitBtn" value="Login">
  55. </form>
  56. </div>
  57. <?php
  58. }
  59. //Logout
  60. if (isset($_GET['do']) && $_GET['do']=="logout") {
  61. $_SESSION['idleirc-user'] = null;
  62. $_SESSION['idleirc-channel'] = null;
  63. }
  64. if (isset($_GET['do']) && $_GET['do']=="settings") {
  65. $username = $_SESSION['idleirc-user'];
  66. $password = $_SESSION['idleirc-pass'];
  67. if (file_exists("users/$username.php")) {
  68. include("users/$username.php");
  69. } else {
  70. $userpass = "";
  71. }
  72. if (isset($_SESSION['idleirc-pass']) && $userpass != "" && $userpass == $_SESSION['idleirc-pass']) {
  73. if (isset($_POST['nick']) && $_POST['nick']!="") {
  74. file_put_contents("users/$username.php", "<?php \$usernickname='" . stripslashes(htmlentities($_POST['nick'])) . "'; ?>\n", FILE_APPEND);
  75. $_SESSION['idleirc-nick'] = stripslashes(htmlentities($_POST['nick']));
  76. }
  77. if (isset($_POST['channel']) && $_POST['channel']!="") {
  78. file_put_contents("users/$username.php", "<?php \$userchannel='" . stripslashes(htmlentities($_POST['channel'])) . "'; ?>\n", FILE_APPEND);
  79. $_SESSION['idleirc-channel'] = stripslashes(htmlentities($_POST['channel']));
  80. }
  81. if (isset($_POST['password']) && $_POST['password']!="") {
  82. file_put_contents("users/$username.php", "<?php \$userpass='" . md5($_POST['password']) . "'; ?>\n", FILE_APPEND);
  83. $_SESSION['idleirc-pass'] = md5($_POST['password']);
  84. }
  85. if ($allowMultiServer == "true") {
  86. if (isset($_POST['servaddr']) && $_POST['servaddr']!="") {
  87. file_put_contents("users/$username.php", "<?php \$userserver='" . stripslashes(htmlentities($_POST['servaddr'])) . "'; ?>\n", FILE_APPEND);
  88. $_SESSION['idleirc-servaddr'] = stripslashes(htmlentities($_POST['servaddr']));
  89. }
  90. if (isset($_POST['servport']) && $_POST['servport']!="") {
  91. file_put_contents("users/$username.php", "<?php \$userserverport='" . stripslashes(htmlentities($_POST['servport'])) . "'; ?>\n", FILE_APPEND);
  92. $_SESSION['idleirc-servport'] = stripslashes(htmlentities($_POST['servport']));
  93. }
  94. }
  95. header("refresh: 0;url=index.php");
  96. } else {
  97. header("refresh: 0;url=index.php");
  98. }
  99. }
  100. if (isset($_GET['register']) && $_GET['register'] == "go") {
  101. if(isset($_POST['password']) && $_POST['password'] != "" && isset($_POST['password-again']) && $_POST['password-again'] != "" && $_POST['password'] == $_POST['password-again']) {
  102. if(isset($_POST['username']) && $_POST['username'] != "") {
  103. $username = stripslashes(htmlentities($_POST['username']));
  104. $password = md5($_POST['password']);
  105. $channame = isset($_POST['channel']) && ($_POST['channel'] !== "") ? htmlentities(stripslashes($_POST['channel'])) : $default_channel;
  106. $nickname = isset($_POST['nick']) && ($_POST['nick'] !== "") ? htmlentities(stripslashes($_POST['nick'])) : $username;
  107. $servaddr = isset($_POST['servaddr']) && ($_POST['servaddr'] !== "") ? htmlentities(stripslashes($_POST['servaddr'])) : $server;
  108. $servport = isset($_POST['servport']) && ($_POST['servport'] !== "") ? htmlentities(stripslashes($_POST['servport'])) : $port;
  109. file_put_contents("users/$username.php", "<?php \$userpass = '" . $password . "'; \$userchannel='" . $channame . "'; \$usernickname='" . $nickname . "'; \$userserver='" . $servaddr . "'; \$userserverport='" . $servport . "'; ?>\n");
  110. file_put_contents("users/.$username.first", "First time, start up\n");
  111. $_SESSION['idleirc-user'] = $username;
  112. $_SESSION['idleirc-nick'] = $nickname;
  113. $_SESSION['idleirc-pass'] = $password;
  114. $_SESSION['idleirc-channel'] = $channame;
  115. $_SESSION['idleirc-servaddr'] = $servaddr;
  116. $_SESSION['idleirc-servport'] = $servport;
  117. header("refresh: 0;url=index.php");
  118. } else {
  119. echo "Please prove a username...";
  120. }
  121. } else {
  122. echo "ERROR: Passwords did not match...";
  123. }
  124. }
  125. // If web frontend is trying to login, process and connect
  126. if (isset($_GET['do']) && $_GET['do']=="login" && isset($_POST['submitBtn']) && isset($_POST['password']) && $_POST['password']!=""){
  127. $name = isset($_POST['username']) && ($_POST['username'] !== "") && file_exists("users/" . $_POST['username'] . ".php") ? htmlentities(stripslashes($_POST['username'])) : "Unnamed";
  128. if(file_exists("users/$name.php")) {
  129. include("users/$name.php");
  130. if(md5($_POST['password']) == $userpass) {
  131. $_SESSION['idleirc-user'] = $name;
  132. $_SESSION['idleirc-nick'] = $usernickname;
  133. $_SESSION['idleirc-pass'] = $userpass;
  134. $_SESSION['idleirc-channel'] = $userchannel;
  135. $_SESSION['idleirc-servaddr'] = $userserver;
  136. $_SESSION['idleirc-servport'] = $userserverport;
  137. header("refresh: 0;url=index.php");
  138. } else {
  139. echo "ERROR: Failed to login: password incorrect.";
  140. }
  141. } else {
  142. echo "ERROR: Password for $name does not match";
  143. }
  144. }
  145. ?>
  146. <!DOCTYPE html>
  147. <html>
  148. <head>
  149. <title><?php echo $title . " " . $version; ?></title>
  150. <link href="<?php echo $ui_theme; ?>.css" rel="stylesheet" type="text/css" />
  151. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  152. <meta name="description" content="<?php echo $desc; ?>" />
  153. <meta name="viewport" content="width=device-width, initial-scale=.5, shrink-to-fit=yes">
  154. <!--Needed for urls -->
  155. <script language="javascript" type="text/javascript">
  156. var nickName = "<?php echo $_SESSION['idleirc-user']; ?>";
  157. </script>
  158. <script language="javascript" type="text/javascript" src="core.js"></script>
  159. <script language="javascript" type="text/javascript">
  160. <?php
  161. if($hellFreezedOver == "yes") {
  162. ?>
  163. <!--
  164. var httpObject = null;
  165. var link = "";
  166. var link2 = "";
  167. var link3 = "";
  168. var pinglink = "";
  169. var ScrollDown = 0;
  170. var msgBox = document.getElementById('msgs');
  171. var userlist = document.getElementById('userlist');
  172. var timerID = 0;
  173. // Get the HTTP Object
  174. function getHTTPObject() {
  175. if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");
  176. else if (window.XMLHttpRequest) return new XMLHttpRequest();
  177. else {
  178. alert("Your browser does not support AJAX.");
  179. return null;
  180. }
  181. }
  182. // Change the value of the outputText field
  183. function setHtml() {
  184. if(ajaxVar.readyState == 4){
  185. var response = ajaxVar.responseText;
  186. var msgBox = document.getElementById("msgs");
  187. msgBox.innerHTML += response;
  188. ScrollDown = 0;
  189. MsgScrollDown();
  190. }
  191. }
  192. // Change the value of the outputText field
  193. function setAll() {
  194. if(ajaxVar.readyState == 4){
  195. var response = ajaxVar.responseText;
  196. var msgBox = document.getElementById("msgs");
  197. msgBox.innerHTML = response;
  198. ScrollDown = 0;
  199. MsgScrollDown();
  200. }
  201. }
  202. function doNotificationPm() {
  203. if(ajaxVar4.readyState == 4){
  204. var mentionUser = ajaxVar4.responseText;
  205. if(Notification.permission==="granted") {
  206. var notify = new Notification("Private message from " + mentionUser, { body: ""});
  207. }
  208. }
  209. }
  210. function getPmUser() {
  211. ajaxVar4 = getHTTPObject();
  212. //var randomnumber=Math.floor(Math.random()*10000);
  213. if (ajaxVar4 != null) {
  214. link4 = "server.php?get=notificationpmed&nick="+nickName;
  215. ajaxVar4.open("GET", link4 , true);
  216. ajaxVar4.onreadystatechange = doNotificationPm;
  217. ajaxVar4.send(null);
  218. }
  219. }
  220. function checkNotificationPm() {
  221. if(ajaxVar5.readyState == 4){
  222. var returnMsg = ajaxVar5.responseText;
  223. var compareString = "true";
  224. //console.log(returnMsg);
  225. if(returnMsg.trim() === compareString.trim()) {
  226. getPmUser();
  227. }
  228. }
  229. }
  230. function checkPmUrl() {
  231. ajaxVar5 = getHTTPObject();
  232. //var randomnumber=Math.floor(Math.random()*10000);
  233. if (ajaxVar5 != null) {
  234. link5 = "server.php?get=notificationpmedexists&nick="+nickName;
  235. ajaxVar5.open("GET", link5 , true);
  236. ajaxVar5.onreadystatechange = checkNotificationPm;
  237. ajaxVar5.send(null);
  238. }
  239. }
  240. function doNotificationMention() {
  241. if(ajaxVar2.readyState == 4){
  242. var mentionUser = ajaxVar2.responseText;
  243. if(Notification.permission==="granted") {
  244. var notify = new Notification("You were mentioned by " + mentionUser, { body: ""});
  245. }
  246. }
  247. }
  248. function getMentionUser() {
  249. ajaxVar2 = getHTTPObject();
  250. //var randomnumber=Math.floor(Math.random()*10000);
  251. if (ajaxVar2 != null) {
  252. link2 = "server.php?get=notificationmention&nick="+nickName;
  253. ajaxVar2.open("GET", link2 , true);
  254. ajaxVar2.onreadystatechange = doNotificationMention;
  255. ajaxVar2.send(null);
  256. }
  257. }
  258. function checkNotificationMention() {
  259. if(ajaxVar3.readyState == 4){
  260. var returnMsg = ajaxVar3.responseText;
  261. var compareString = "true";
  262. //console.log(returnMsg);
  263. if(returnMsg.trim() === compareString.trim()) {
  264. getMentionUser();
  265. }
  266. }
  267. }
  268. function checkMentionUrl() {
  269. ajaxVar3 = getHTTPObject();
  270. //var randomnumber=Math.floor(Math.random()*10000);
  271. if (ajaxVar3 != null) {
  272. link3 = "server.php?get=notificationmentionexists&nick="+nickName;
  273. ajaxVar3.open("GET", link3 , true);
  274. ajaxVar3.onreadystatechange = checkNotificationMention;
  275. ajaxVar3.send(null);
  276. }
  277. }
  278. // Implement business logic
  279. function serverWrite() {
  280. ajaxVar = getHTTPObject();
  281. if (ajaxVar != null) {
  282. link = "server.php?nick="+nickName+"&msg="+encodeURIComponent(document.getElementById('msg').value);
  283. ajaxVar.open("GET", link , true);
  284. ajaxVar.send(null);
  285. }
  286. }
  287. // Implement business logic
  288. function serverReload() {
  289. ajaxVar = getHTTPObject();
  290. //var randomnumber=Math.floor(Math.random()*10000);
  291. if (ajaxVar != null) {
  292. link = "server.php?get&nick="+nickName;
  293. ajaxVar.open("GET", link , true);
  294. ajaxVar.onreadystatechange = setAll;
  295. ajaxVar.send(null);
  296. }
  297. }
  298. function MsgScrollDown() {
  299. if(ScrollDown != 1) {
  300. var msgBox = document.getElementById("msgs");
  301. msgBox.scrollTop = msgBox.scrollHeight;
  302. ScrollDown = 1;
  303. }
  304. }
  305. function UpdateTimer() {
  306. serverReload();
  307. MsgScrollDown();
  308. checkPmUrl();
  309. checkMentionUrl();
  310. setTimeout(UpdateTimer, 1000);
  311. }
  312. function doLogin() {
  313. ajaxVar = getHTTPObject();
  314. if(ajaxVar != null) {
  315. link = "server.php?do=login&nick="+nickName;
  316. ajaxVar.open("GET", link, true);
  317. ajaxVar.onreadystatechange = setHtml;
  318. ajaxVar.send(null);
  319. setTimeout(function() { window.location.reload(); },1000);
  320. }
  321. }
  322. function doClearLog() {
  323. ajaxVar = getHTTPObject();
  324. if(ajaxVar != null) {
  325. link = "server.php?do=clearlog&nick="+nickName;
  326. ajaxVar.open("GET", link, true);
  327. ajaxVar.onreadystatechange = setHtml;
  328. ajaxVar.send(null);
  329. setTimeout(function() { window.location.reload(); },1000);
  330. }
  331. }
  332. function doLogout() {
  333. ajaxVar = getHTTPObject();
  334. if(ajaxVar != null) {
  335. link = "server.php?do=logout&nick="+nickName;
  336. ajaxVar.open("GET", link, true);
  337. ajaxVar.onreadystatechange = setHtml;
  338. ajaxVar.send(null);
  339. setTimeout(function() { window.location.reload(); },1000);
  340. }
  341. }
  342. /*window.onbeforeunload = function (e) {
  343. doLogout();
  344. };*/
  345. function wrapBBCode(tag) {
  346. var msgInput = document.getElementById('msg');
  347. var content = msgInput.value;
  348. var selectedContent = content.substring(msgInput.selectionStart, msgInput.selectionEnd);
  349. var beforeContent = content.substring(0, msgInput.selectionStart);
  350. var afterContent = content.substring(msgInput.selectionEnd, content.length);
  351. msgInput.value = beforeContent + '[' + tag + ']' + selectedContent + '[/' + tag + ']' + afterContent;
  352. }
  353. <?php
  354. // Lets test this
  355. }
  356. if(file_exists("users/." . $_SESSION['idleirc-user'] . ".pingfile"))
  357. {
  358. ?>
  359. function getInput() {
  360. // Send the server function the input
  361. var userInput = document.getElementById('msg');
  362. serverWrite(userInput.value);
  363. // Clean out the input values
  364. var msgBar = document.getElementById("msg");
  365. msgBar.value = "";
  366. msgBar.focus();
  367. }
  368. function keypressed(e) {
  369. if(e.keyCode=='13'){
  370. getInput();
  371. }
  372. }
  373. if(Notification.permission !== "granted") {
  374. Notification.requestPermission();
  375. }
  376. <?php
  377. } else {
  378. ?>
  379. function getInput() {
  380. // IRC bouncer not running, warn
  381. alert("You're not connected to the server, please connect your bouncer to send messages");
  382. }
  383. function keypressed(e) {
  384. if(e.keyCode=='13'){
  385. getInput();
  386. }
  387. }
  388. <?php
  389. }
  390. ?>
  391. //-->
  392. </script>
  393. </head>
  394. <body <?php if(!isset($_GET['register']) && !isset($_GET['logs']) && !isset($_GET['settings']) && isset($_SESSION['idleirc-user']) && file_exists("users/." . $_SESSION['idleirc-user'] . ".pingfile")) { echo 'onload="UpdateTimer();"'; } ?>>
  395. <div class="info"><?php echo $pagetitle;
  396. if(isset($_SESSION['idleirc-user'])) { echo " ~ " . $_SESSION['idleirc-servaddr'] . ":" . $_SESSION['idleirc-servport'] . " on " . $_SESSION['idleirc-channel']; } ?></div>
  397. <?php
  398. if (isset($_GET['register'])) {
  399. registerForm();
  400. }
  401. if (!isset($_SESSION['idleirc-user'])) {
  402. if(!isset($_GET['register'])) {
  403. loginForm();
  404. }
  405. } else if(isset($_GET['logs'])) {
  406. $username = $_SESSION['idleirc-user'];
  407. if(file_exists("users/$username.php")) {
  408. include("users/$username.php");
  409. } else {
  410. $userpass = "";
  411. }
  412. if(isset($_SESSION['idleirc-pass']) && $userpass != "" && $userpass == $_SESSION['idleirc-pass']) {
  413. echo "<div class='navbar'><a href='index.php'>Back to IRC</a> &bull; <a onclick='doClearLog();'>Clear IRC logs</a>";
  414. if(file_exists("users/$username.logcount")) {
  415. echo "<br />Archived: ";
  416. $archivedLogCount = file_get_contents("users/$username.logcount");
  417. for($x = $archivedLogCount ; $x > 0 ; $x--) {
  418. echo "<a href='index.php?logs&page=$x'>$x</a>&nbsp;";
  419. }
  420. }
  421. echo "</div><br />\n";
  422. if(isset($_GET['page']) && $_GET['page']!="") {
  423. $logcontents = file_get_contents("users/$username." . $_GET['page'] . ".log");
  424. echo "<div id='logmsgs'><table>\n" . $logcontents . "</table></div>\n";
  425. } else {
  426. $logcontents = file_get_contents("users/$username.log");
  427. echo "<div id='logmsgs'><table>\n" . $logcontents . "</table></div>\n";
  428. }
  429. }
  430. } else if(isset($_GET['settings'])) {
  431. $username = $_SESSION['idleirc-user'];
  432. $logcontents = file_get_contents("users/$username.log");
  433. if(file_exists("users/$username.php")) {
  434. include("users/$username.php");
  435. } else {
  436. $userpass = "";
  437. }
  438. if(isset($_SESSION['idleirc-pass']) && $userpass != "" && $userpass == $_SESSION['idleirc-pass']) {
  439. echo "<div class='navbar'><a href='index.php'>Back to IRC</a></div><br />\n";
  440. ?>
  441. <br>
  442. <div style="width: 500px; margin: 0 auto; text-align: center;">
  443. <p>Leave fields blank that you'd not like set. Fill in what you'd want to change and hit set. Settings will be saved and session will be updated</p>
  444. <form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=settings" method="post">
  445. <table>
  446. <tr><td>Default Nickname: </td><td> <input style="padding: 2px; width: 300px;" class="text" type="text" name="nick"></td></tr>
  447. <tr><td>Autoconnect/focus channel: </td><td> <input style="padding: 2px; width: 300px;" class="text" type="text" name="channel" value="<?php echo $default_channel; ?>"></td></tr>
  448. <tr><td>New password: </td><td> <input style="padding: 2px; width: 300px;" class="text" type="password" name="password"></td></tr>
  449. <?php
  450. if($allowMultiServer == "true") {
  451. ?> <tr><td>Server (IP:Port)</td><td> <input style="padding: 2px; width: 236px;" class="text" type="text" name="servaddr" value="<?php echo $server; ?>">:<input style="padding: 2px; width: 50px;" class="text" type="text" name="servport" value="<?php echo $port; ?>"></td></tr><?php
  452. }
  453. ?>
  454. </table>
  455. <input style="padding: 2px;" class="text" type="submit" name="submitBtn" value="Set">
  456. </form>
  457. </div>
  458. <?php
  459. }
  460. } else {
  461. ?>
  462. <div class="navbar">
  463. <a href="index.php?do=logout">Logout</a>
  464. <?php
  465. // If this is the first login, make sure to start the bouncer! From there, the user will have toggle control.
  466. if (!file_exists("users/." . $_SESSION['idleirc-user'] . ".pingfile") && file_exists("users/." . $_SESSION['idleirc-user'] . ".first")) {
  467. unlink("users/." . $_SESSION['idleirc-user'] . ".first");
  468. echo "<script language='javascript' type='text/javascript'>doLogin();</script>";
  469. }
  470. if (!file_exists("users/." . $_SESSION['idleirc-user'] . ".pingfile"))
  471. {
  472. echo "&bull;\n<a onclick='doLogin();'>Connect to server</a>\n";
  473. } else {
  474. echo "&bull;\n<a onclick='doLogout();'>Disconnect from server</a>\n";
  475. }
  476. ?>
  477. &bull;
  478. <a href="index.php?logs">IRC Logs</a>
  479. &bull;
  480. <a href="index.php?settings">Settings</a>
  481. </div><br />
  482. <table class="clientcontain">
  483. <tr><td id="userlist">
  484. </td><td id="client">
  485. <div id="msgs">
  486. <?php
  487. echo "<table>";
  488. $get = file_get_contents("users/" . $_SESSION['idleirc-user'] . ".log");
  489. echo $get;
  490. echo "</table>";
  491. ?>
  492. </div>
  493. <div id="msgbox" onkeyup="keypressed(event);">
  494. <table>
  495. <tr>
  496. <td>
  497. <textarea name="msg" id="msg"></textarea>
  498. </td>
  499. <td>
  500. <button onclick="getInput();">Send</button>
  501. </td>
  502. </tr>
  503. </table>
  504. </div>
  505. <?php
  506. }
  507. ?>
  508. </td>
  509. </tr></table>
  510. <div id="footer">Powered by <a href='https://notabug.org/Pentium44/idleirc'><?php echo $title . " " . $version; ?></a></div>
  511. </div>
  512. </body>
  513. </html>