IsLoggedIn()) { ?> You are logged in.
Welcome, Get("UserName")); ?>

SignalEvent("EVENT_REQUEST_SIDEBAR_CONTENT"); if (is_array($SideContent) && count($SideContent)) { foreach ($SideContent as $HandlerName => $Content) { print $Content; } } $AF->SignalEvent("EVENT_HTML_INSERTION_POINT", array($GLOBALS["AF"]->GetPageName(), "Sidebar Content")); ?>
SignalEvent("EVENT_APPEND_HTML_TO_FORM", array("PageName" => "", "FormName"=>"LoginForm", "Labels" => array(), "InputElements" => array(), "Notes" => array())); # Extract the results. $Labels = $Data["Labels"]; $InputElements = $Data["InputElements"]; $Notes = $Data["Notes"]; # Append them where required. for ($Index = 0; $Index < count($Labels); $Index++) { print("
" ."".$Labels[$Index]."" ."".$InputElements[$Index]."" ."
"); } } function EscapeRssValue($Value, $OutputCharset, $FeedCharset) { # escape special characters $Result = safehtmlspecialchars($Value, ENT_QUOTES, $FeedCharset, FALSE); # translate IS0-8859-1 to UTF-8 if (strcasecmp($OutputCharset, "UTF-8") === 0 && strcasecmp($FeedCharset, "ISO-8859-1") === 0) { $Result = utf8_encode($Value); } # translate UTF-8 to IS0-8859-1 elseif (strcasecmp($OutputCharset, "ISO-8859-1") === 0 && strcasecmp($FeedCharset, "UTF-8") === 0) { $Result = utf8_decode($Value); } return $Result; } function PrintRssFeedItem(array $Item, $Target, $Charset) { $DefaultCharset = $GLOBALS["G_SysConfig"]->DefaultCharacterSet(); $Map = array("Href" => "link", "Title" => "description", "Inner" => "title"); foreach ($Map as $VarName => $KeyName) { $$VarName = (isset($Item[$KeyName])) ? strip_tags($Item[$KeyName]) : NULL; $$VarName = EscapeRssValue($$VarName, $DefaultCharset, $Charset); } ?>
  • AutodetectEncoding(); $Encoding = $Feed->Encoding(); $Items = $Feed->GetItems($MaxItems); $Title = defaulthtmlspecialchars($Title); $Href = defaulthtmlspecialchars($Href); $Target = ($GLOBALS["G_SysConfig"]->ResourceLaunchesNewWindowEnabled()) ? "_blank" : "_self"; ?>
    SecureLogin() == 1) ? TRUE : FALSE; # if secure login has been enabled if ($GLOBALS["G_SysConfig"]->SecureLogin() > 0) { # retrieve the most recently generated cryptographic keypair $KeyPair = SPTUser::GetCryptKey(); # get the public key portion from the keypair $PubKeyParams = SPTUser::ExtractPubKeyParameters($KeyPair); # Check to make sure that we were able to generate a pubkey and # extract params from it. If that went poorly, fall back to # the regular login procedure if (strlen($PubKeyParams["Modulus"]) && strlen($PubKeyParams["Exponent"])) { # include the 'jsbn' javascript encryption library $JsbnFiles = array("prng4.js", "rng.js", "jsbn.js", "rsa.js", "base64.js"); foreach ($JsbnFiles as $FileName) { ?>Query("SELECT * FROM RSSFeeds"); $HaveLoadedFeedFromSite = FALSE; $DefaultCharset = $GLOBALS["G_SysConfig"]->DefaultCharacterSet(); while ($FeedInfo = $DB->FetchRow()) { if ($FeedInfo["Enabled"]) { # if we are on a page that this feed should be displayed on if (($FeedInfo["DisplayLocations"] & RSSDISP_ALLPAGES) || (($FeedInfo["DisplayLocations"] & RSSDISP_FRONTPAGE) && (basename($_SERVER["SCRIPT_NAME"]) == "index.php?P=Home")) || (($FeedInfo["DisplayLocations"] & RSSDISP_ADMINPAGE) && (basename($_SERVER["SCRIPT_NAME"]) == "index.php?P=SysAdmin")) || (($FeedInfo["DisplayLocations"] & RSSDISP_MTOOLPAGE) && (basename($_SERVER["SCRIPT_NAME"]) == "index.php?P=MDHome"))) { $RefreshTime = $HaveLoadedFeedFromSite ? 999999 : $FeedInfo["RefreshRate"]; $MaxItems = $FeedInfo["NumberItemsToDisplay"]; $Feed = new RSSClient($FeedInfo["URL"], $RFeedDB, $RefreshTime); $Title = (strlen($FeedInfo["Title"])) ? $FeedInfo["Title"] : strip_tags($Feed->GetChannelTitle()); $Href = strip_tags($Feed->GetChannelLink()); PrintRssFeedItems($Feed, $Title, $Href, $MaxItems); $HaveLoadedFeedFromSite = !$Feed->UsedCachedData(); } } } } }