function getOnlineUsersText() { global $OnlineUsersFid; $refreshCode = ""; if (!isset($OnlineUsersFid)) { $OnlineUsersFid = 0; } if (Settings::get("ajax")) { $refreshCode = format("\n\t\t<script type=\"text/javascript\">\n\t\t\tonlineFID = {0};\n\t\t\twindow.addEventListener(\"load\", startOnlineUsers, false);\n\t\t</script>\n\t", $OnlineUsersFid); } $onlineUsers = OnlineUsers($OnlineUsersFid); return "<div style=\"min-height:16px;\" id=\"onlineUsers\">{$onlineUsers}</div>{$refreshCode}"; }
<?php $ajaxPage = true; echo OnlineUsers((int) $_GET['id'], false);
} } $isIgnored = FetchResult("select count(*) from ignoredforums where uid=" . $loguserid . " and fid=" . $fid, 0, 0) == 1; if ($loguserid && $forum['minpowerthread'] <= $loguser['powerlevel']) { if ($isIgnored) { $links .= "<li><a href=\"forum.php?id=" . $fid . "&unignore\">" . __("Unignore Forum") . "</a></li>"; } else { $links .= "<li><a href=\"forum.php?id=" . $fid . "&ignore\">" . __("Ignore Forum") . "</a></li>"; } $links .= "<li><a href=\"newthread.php?id=" . $fid . "\">" . __("Post Thread") . "</a></li>"; $links .= "<li><a href=\"newthread.php?id=" . $fid . "&poll=1\">" . __("Post Poll") . "</a></li>"; } DoPrivateMessageBar(); $bucket = "userBar"; include "./lib/pluginloader.php"; $onlineUsers = OnlineUsers($fid); if (!$noAjax) { write("\n\t<script type=\"text/javascript\">\n\t\tonlineFID = {0};\n\t\twindow.addEventListener(\"load\", startOnlineUsers, false);\n\t</script>\n", $fid, $onlineUsers); } if ($rssBar) { write("\n\t<div style=\"float: left; width: {1}px;\"> </div>\n\t<div id=\"rss\">\n\t\t{0}\n\t</div>\n", $rssBar, $rssWidth + 4); } write("\n\t<div class=\"header0 cell1 center outline smallFonts margin\" style=\"overflow: auto;\">\n\t\t \n\t\t<span id=\"onlineUsers\">\n\t\t\t{0}\n\t\t</span>\n\t\t \n\t</div>\n", $onlineUsers, $rssBar, $rssWidth); MakeCrumbs(array(__("Main") => "./", $forum['title'] => "forum.php?id=" . $fid), $links); $total = $forum['numthreads']; $tpp = $loguser['threadsperpage']; if (isset($_GET['from'])) { $from = (int) $_GET['from']; } else { $from = 0; }
$rPost = Query($qPost); if (!NumRows($rPost)) { die(__("Unknown post ID.")); } $post = Fetch($rPost); if (!CanMod($loguserid, $post['fid'])) { die(__("No.")); } if (isset($_GET['o'])) { $post['deleted'] = 0; $post['unfoldhax'] = 1; } die(MakePost($post, $post['thread'], $post['fid'])); } else { if ($action == "ou") { die(OnlineUsers((int) $_GET['f'], false)); } else { if ($action == "tf") { include "css/themelist.php"; $theme = $_GET['t']; if (!$themes[$theme]) { die("css/default.css|img/themes/default/logo.png"); } $themeFile = "css/" . $theme . ".css"; if (!file_exists($themeFile)) { $themeFile = "css/" . $theme . ".php"; if (!file_exists($themeFile)) { $themeFile = "css/default.css"; } } $logopic = "img/themes/default/logo.png";
<?php //Editar respuestas* require 'core/core.php'; OnlineUsers(); if (isset($_GET['view'])) { if (file_exists('core/controllers/' . strtolower($_GET['view']) . 'Controller.php')) { include 'core/controllers/' . strtolower($_GET['view']) . 'Controller.php'; } else { include 'core/controllers/errorController.php'; } } else { include 'core/controllers/indexController.php'; }
include "lib/common.php"; $numThreads = FetchResult("select count(*) from threads"); $numPosts = FetchResult("select count(*) from posts"); //$stats = Plural($numThreads, "thread")." and ".Plural($numPosts,"post")." total"; $stats = Format(__("{0} and {1} total"), Plural($numThreads, __("thread")), Plural($numPosts, __("post"))); $newToday = FetchResult("select count(*) from posts where date > " . (time() - 86400)); $newLastHour = FetchResult("select count(*) from posts where date > " . (time() - 3600)); $stats .= "<br />" . format(__("{0} today, {1} last hour"), Plural($newToday, __("new post")), $newLastHour); $numUsers = FetchResult("select count(*) from users"); $numActive = FetchResult("select count(*) from users where lastposttime > " . (time() - 2592000)); //30 days $percent = $numUsers ? ceil(100 / $numUsers * $numActive) : 0; $rLastUser = Query("select id,name,displayname,powerlevel,sex from users order by regdate desc limit 1"); $lastUser = Fetch($rLastUser); $last = format(__("{0}, {1} active ({2}%)"), Plural($numUsers, __("registered user")), $numActive, $percent) . "<br />" . format(__("Newest: {0}"), UserLink($lastUser)); $onlineUsers = OnlineUsers(); $pl = $loguser['powerlevel']; if ($pl < 0) { $pl = 0; } if ($loguserid && ($_GET['action'] == "markallread" || $_GET['action'] == "markasread" && isset($_GET['fid']))) { $where = $_GET['action'] == 'markallread' ? "" : " WHERE threads.forum=" . (int) $_GET['fid']; Query("REPLACE INTO threadsread (id,thread,date) SELECT " . $loguserid . ", threads.id, " . time() . " FROM threads" . $where); die(header('Location: index.php')); } // Mega-Mario: could be optimized to // $rBirthdays = Query("select birthday, id, name, displayname, powerlevel, sex from users where birthday>0 and from_unixtime(birthday, '%c-%e')='".date('n-j')."' order by name"); // but then I don't know about birthday timezones and all // and especially why we're using gmdate() $rBirthdays = Query("select birthday, id, name, displayname, powerlevel, sex from users where birthday > 0 order by name"); $birthdays = array();