} } if ($diff == 0) { $color = xk(4); } else { $color = xk(8); } $diff = "/" . ($diff + 1) * 8; xk_ircsend("102|" . xk(7) . "User {$loguser['name']} (id {$loguserid}) changed from IP " . xk(8) . $loguser['lastip'] . xk(7) . " to " . xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) . " ({$color}{$diff}" . xk(7) . ")"); } $sql->query("UPDATE users SET lastactivity=" . ctime() . ",lastip='{$userip}',lasturl='" . addslashes($url) . "',lastforum=0,`influence`='{$influencelv}' WHERE id={$loguserid}"); } } else { $sql->query("INSERT INTO guests (ip,date,useragent,lasturl) VALUES ('{$userip}'," . ctime() . ",'" . addslashes($_SERVER['HTTP_USER_AGENT']) . "','" . addslashes($url) . "')"); } $header = makeheader($header1, $headlinks, $header2); $footer = "\t</textarea></form></embed></noembed></noscript></noembed></embed></table></table>\n<br>" . ($loguser['id'] && strpos($PHP_SELF, "index.php") === false ? adbox() . "<br>" : "") . "\n<center>\n\n<!--\n<img src='adnonsense.php?m=d' title='generous donations to the first national bank of bad jokes and other dumb crap people post' style='margin-left: 44px;'><br>\n<img src='adnonsense.php' title='hotpod fund' style='margin: 0 22px;'><br>\n<img src='adnonsense.php?m=v' title='VPS slushie fund' style='margin-right: 44px;'>\n-->\n<br>\n\t{$smallfont}\n\t<br><br><a href={$siteurl}>{$sitename}</a>\n\t<br>" . filter_string($affiliatelinks) . "\n\t<br>\n\t<table cellpadding=0 border=0 cellspacing=2><tr>\n\t\t<td>\n\t\t\t<img src=images/poweredbyacmlm.gif>\n\t\t</td>\n\t\t<td>\n\t\t\t{$smallfont}\n\t\t\tAcmlmboard - <a href='https://github.com/Xkeeper0/jul'>" . (file_exists('version.txt') ? file_get_contents("version.txt") : shell_exec("git log --format='commit %h [%ad]' --date='short' -n 1")) . "</a>\n\t\t\t<br>©2000-" . date("Y") . " Acmlm, Xkeeper, Inuyasha, et al. \n\t\t\t</font>\n\t\t</td>\n\t</tr></table>\n\t" . ($x_hacks['mmdeath'] >= 0 ? "<div style='position: absolute; top: -100px; left: -100px;'>Hidden preloader for doom numbers:\n\t\t<img src='numgfx/death/0.png'> <img src='numgfx/death/1.png'> <img src='numgfx/death/2.png'> <img src='numgfx/death/3.png'> <img src='numgfx/death/4.png'> <img src='numgfx/death/5.png'> <img src='numgfx/death/6.png'> <img src='numgfx/death/7.png'> <img src='numgfx/death/8.png'> <img src='numgfx/death/9.png'>" : "") . "\n<!-- Piwik -->\n<script type=\"text/javascript\">\nvar pkBaseURL = ((\"https:\" == document.location.protocol) ? \"https://stats.tcrf.net/\" : \"http://stats.tcrf.net/\");\ndocument.write(unescape(\"%3Cscript src='\" + pkBaseURL + \"piwik.js' type='text/javascript'%3E%3C/script%3E\"));\n</script><script type=\"text/javascript\">\ntry {\nvar piwikTracker = Piwik.getTracker(pkBaseURL + \"piwik.php\", 4);\npiwikTracker.trackPageView();\npiwikTracker.enableLinkTracking();\n} catch( err ) {}\n</script><noscript><p><img src=\"http://stats.tcrf.net/piwik.php?idsite=4\" style=\"border:0\" alt=\"\" /></p></noscript>\n<!-- End Piwik Tag -->\n<!--<script type=\"text/javascript\" src=\"http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.min.js\"></script>\n<script type=\"text/javascript\" src=\"js/useful.js\"></script> -->\n\n</body></html>\n "; if ($ipbanned) { if ($loguser['title'] == "Banned; account hijacked. Contact admin via PM to change it.") { $reason = "Your account was hijacked; please contact Xkeeper to reset your password and unban your account."; } elseif ($loguser['title']) { $reason = "Ban reason: " . $loguser['title'] . "<br>If you think have been banned in error, please contact Xkeeper."; } else { $reason = $sql->resultq("SELECT `reason` FROM ipbans WHERE {$checkips}", 0, 0); $reason = $reason ? "Reason: {$reason}" : "<i>(No reason given)</i>"; } die("{$header}<br>{$tblstart}{$tccell1}>\n\t\tYou are banned from this board.\n\t\t<br>" . $reason . "\n\t\t<br>\n\t\t<br>If you think you have been banned in error, please contact the administrator:\n\t\t<br>E-mail: xkeeper@gmail.com\n\t\t{$tblend}{$footer}"); } if ($torbanned) { die("{$header}<br>{$tblstart}{$tccell1}>\n\tYou appear to be using a Tor proxy. Due to abuse, Tor usage is forbidden.\n\t<br>If you have been banned in error, please contact Xkeeper.\n\t<br>\n\t<br>E-mail: xkeeper@gmail.com\n\t{$tblend}{$footer}"); }
if ($hotcount <= 0) { $hotcount = 0xffff; } $ppp = $_GET['ppp'] ? intval($_GET['ppp']) : ($log ? $loguser['postsperpage'] : 20); $ppp = max(min($ppp, 500), 1); $tpp = $_GET['tpp'] ? intval($_GET['tpp']) : ($log ? $loguser['threadsperpage'] : 50); $tpp = max(min($tpp, 500), 1); $page = intval($_GET['page']); $min = $page * $tpp; $newthreadbar = $forumlist = ''; if ($id) { $forumlist = doforumlist($id); $fonline = fonlineusers($id); if ($log) { $headlinks .= " - <a href=index.php?action=markforumread&forumid={$id}>Mark forum read</a>"; $header = makeheader($header1, $headlinks, $header2 . ($fonline ? "{$tblstart}{$tccell1s}>{$fonline}{$tblend}" : "")); } $newthreadbar = "<td align=right class=fonts>" . ($forum['pollstyle'] != -2 ? "<a href=newthread.php?poll=1&id={$id}>{$newpollpic}</a>" : "<img src=\"images/nopolls.png\" align=\"absmiddle\">") . " - <a href=newthread.php?id={$id}>{$newthreadpic}</a></td>"; } $infotable = "<table width=100%><tr>\r\n\t\t\t<td align=left class='font'><a href=index.php>{$boardname}</a> - {$forum['title']}</td>\r\n\t\t\t{$newthreadbar}\r\n\t\t</tr></table>"; $forumpagelinks = ''; if ($threadcount > $tpp) { $query = $id ? "id={$id}" : ($user ? "user={$user}" : "fav=1"); if ($_GET['tpp']) { $query .= "&tpp={$tpp}"; } $forumpagelinks = "<table width=100%><tr>\r\n\t\t\t<td align=left class='fonts'>Pages:"; for ($k = 0; $k < $threadcount / $tpp; $k++) { $forumpagelinks .= $k != $page ? " <a href='?{$query}&page={$k}'>" . ($k + 1) . '</a>' : ' ' . ($k + 1); } $forumpagelinks .= "</td></tr></table>";
$forumid = intval($thread['forum']); $forum = $sql->fetchq("SELECT title,minpower,minpowerreply,id,specialscheme FROM forums WHERE id={$forumid}"); if ($forum['minpower'] && $power < $forum['minpower']) { $forum['title'] = ''; $thread['title'] = '(restricted thread)'; } $specialscheme = $forum['specialscheme']; $windowtitle = "{$boardname} -- {$forum['title']}: {$thread['title']} -- New Reply"; $thread['title'] = str_replace('<', '<', $thread['title']); require_once 'lib/layout.php'; $smilies = readsmilies(); if (!filter_int($ppp)) { $ppp = !$log ? 20 : $loguser['postsperpage']; } $fonline = fonlineusers($forumid); $header = makeheader($header1, $headlinks, $header2 . "\t{$tblstart}{$tccell1s}>{$fonline}{$tblend}"); if (mysql_num_rows($sql->query("SELECT user FROM forummods WHERE forum='{$forumid}' and user='******'"))) { $ismod = 1; } $modoptions = ""; if ($ismod) { if ($thread['sticky'] == 1) { $sticky = "checked"; } $modoptions = "\t<tr>{$tccell1}><b>Moderator Options:</b></td>{$tccell2l} colspan=2>\n\t\t{$inpc}=\"close\" id=\"close\" value=\"1\"><label for=\"close\">Close</label> -\n\t\t{$inpc}=\"stick\" id=\"stick\" value=\"1\" {$sticky}><label for=\"stick\">Sticky</label>"; } if ($forum['minpowerreply'] > $power && $forum['minpowerreply'] > 0) { $restricted = true; } $header = "{$header}\n\t\t{$fonttag}<a href=index.php>{$boardname}</a> - <a href=forum.php?id={$forumid}>{$forum['title']}</a> - {$thread['title']}<form action=newreply.php name=replier method=post autocomplete=\"off\"> {$tblstart}"; // Post preview
$downloadcode = ""; $youtubedownloadcode = ""; } if ($kroaxsettings['kroax_set_bannerimg']) { $videoimg = $kroaxsettings['kroax_set_bannerimg']; } else { $videoimg = ""; } opentable("---> " . $title . ""); if ($kroaxsettings['kroax_set_keepalive'] == "1") { echo "<div id ='onlinestatus'>"; echo '<div style="height: 30px;"><em><IMG SRC="/infusions/the_kroax/img/loading.gif">' . $locale['MKROAX116'] . '</em></div>'; echo '</div>'; } if (!isset($p)) { makeheader(); echo "<div id='lajv'>"; echo "</div>"; } if ($kroaxsettings['kroax_set_related'] == "1") { echo " <table width='120px;' align='left'>"; echo "<tr width='15%'><td class ='tbl2' width='15%' align='center'>" . $locale['MKROAX105'] . "</td></tr>"; $relresult = dbquery("select * from " . $db_prefix . "kroax WHERE " . groupaccess('kroax_access') . " AND " . groupaccess('kroax_access_cat') . " AND kroax_cat='" . $data['kroax_cat'] . "' AND kroax_approval='' ORDER BY RAND() DESC LIMIT 0,5"); while ($reldata = dbarray($relresult)) { echo "<tr><td align='center' class='tbl2'>"; $rtype = substr($reldata['kroax_url'], -3, 3); if ($rtype == "mp3") { $showimg = "<img src='" . INFUSIONS . "the_kroax/img/musicstream.jpg' width='50' height='30'>"; } elseif ($reldata['kroax_tumb']) { $showimg = "<IMG SRC='" . $reldata['kroax_tumb'] . "' width='70' height='50'>"; } else {
$content = trim(htmlspecialchars($content)); $path = 'pages/' . $page . '.tm2'; $file = fopen($path, "w") or die("Can't access file!"); fwrite($file, $content); fclose($file); die('Post successful! Refreshing!<meta http-equiv="refresh" content="0;url="">'); } /* Main execution starts here */ if (!file_exists('config.php')) { die('Config file doesn\'t exist. Did you rename the example file?'); } include 'config.php'; if (!$enabled) { die('Wiki is not currently enabled. You can change this in the config file.'); } if (isset($_GET["page"])) { $page = ucfirst($_GET["page"]); } else { $page = $mainpage; } if (isset($_GET["mode"]) && $_GET["mode"] == "edit") { $edit = true; } else { $edit = false; } makeheader($page, $name); makepage($page, $edit); if (isset($_POST['send'])) { post($page, $_POST['content'], $_POST['captcha']); } makefooter($page, $edit);