<?php global $CFG; // ELGG recent activity page // Run includes require_once dirname(dirname(__FILE__)) . "/../includes.php"; // Initialise functions for user details, icon management and profile management run("profile:init"); // Whose friends are we looking at? global $page_owner; // Weblog context define("context", "weblog"); // You must be logged on to view this! protect(1); templates_page_setup(); cleanup_messages(time() - 86400 * 30); $title = run("profile:display:name") . " :: " . __gettext("Recent activity"); // If we haven't specified a start time, start time = 1 day ago $starttime = optional_param('starttime', time() - 86400, PARAM_INT); $body = "<p>" . __gettext("Currently viewing recent activity since ") . gmstrftime("%B %d, %Y", $starttime) . ".</p>"; $body .= "<p>" . __gettext("You may view recent activity during the following time-frames:") . "</p>"; $body .= "<ul><li><a href=\"index.php?starttime=" . (time() - 86400) . "\">" . __gettext("The last 24 hours") . "</a></li>"; $body .= "<li><a href=\"index.php?starttime=" . (time() - 86400 * 2) . "\">" . __gettext("The last 48 hours") . "</a></li>"; $body .= "<li><a href=\"index.php?starttime=" . (time() - 86400 * 7) . "\">" . __gettext("The last week") . "</a></li>"; $body .= "<li><a href=\"index.php?starttime=" . (time() - 86400 * 30) . "\">" . __gettext("The last month") . "</a></li></ul>"; $body .= "<h2>" . __gettext("Your recent messages") . "</h2>"; $user_messages = get_messages($page_owner, null, time() - $starttime); if (is_array($user_messages) && !empty($user_messages)) { foreach ($user_messages as $user_message) { $body .= "<div class=\"user_message\">" . display_message($user_message) . "</div>"; }
if ($x7s->loggedin == 1) { $x7p = new profile_info($x7s->username); $x7c->usersettings(); } // Include the language file include_once "./lang/" . $x7c->settings['default_lang'] . ".php"; // Include the output library include_once "./lib/output.php"; // Load the skin data $print = new load_skin($x7c->settings['default_skin']); // Run these cleanups only if you are not part of a frame include_once "./lib/cleanup.php"; if (@$_GET['act'] != "frame") { cleanup_banned(); resurgo(); cleanup_messages(); cleanup_temp_objects(); if ($x7c->settings['autopay']) { pay_salary(); } } // Now before all else we have to get them logged in if they are not already // We also have to check and make sure they are not trying to register or //remember their password which they stupidly forgot or get help or anything // like that // THis array contins the functions that you don't hvae to be logged in to do $no_login_req[] = "register"; $no_login_req[] = "forgotmoipass"; $no_login_req[] = "sm_window"; $no_login_req[] = "help"; if ($x7s->loggedin == 0 && !in_array(@$_GET['act'], $no_login_req)) {