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 = ($SysConfig->ResourceLaunchesNewWindowEnabled())
? "_blank" : "_self";
?>
IncrementalKeywordSearchEnabled())
{
$GLOBALS["AF"]->RequireUIFile("CW-Keyboard.js");
$GLOBALS["AF"]->RequireUIFile("CW-QuickSearch.js");
}
?>
IsLoggedIn()) { ?>
You are logged in.
Welcome, Get("UserName")); ?>
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,
# fallback to the regular login procedure
if (strlen($PubKeyParams["Modulus"])>0 &&
strlen($PubKeyParams["Exponent"])>0 )
{
# Include the 'jsbn' javascript encryption library, configure it to encrypt
# with the public key from our keypair:
?>
Privileges();
if ($UserPrivs->IsGreaterThan($Schema->AuthoringPrivileges()))
{
PrintMDTMenuEntry("Add New Resource", "index.php?P=EditResource&ID=NEW");
}
if ($User->HasPriv(PRIV_CLASSADMIN, PRIV_NAMEADMIN,
PRIV_SYSADMIN, PRIV_COLLECTIONADMIN))
{
if ($User->HasPriv(PRIV_NAMEADMIN))
{
PrintMDTMenuEntry("Add New Controlled Name", "index.php?P=AddControlledName");
PrintMDTMenuEntry("Edit Controlled Names", "index.php?P=EditControlledName&FieldId=0");
PrintMDTMenuEntry("Edit Option Lists", "index.php?P=EditOptionList");
}
if ($User->HasPriv(PRIV_CLASSADMIN))
{
PrintMDTMenuEntry("Add/Edit Classifications", "index.php?P=EditClassifications");
}
if ($User->HasPriv(PRIV_SYSADMIN, PRIV_COLLECTIONADMIN))
{
PrintMDTMenuEntry("Metadata Field Editor", "index.php?P=DBEditor");
}
print("
");
PrintMDTMenuEntry("Metadata Tool Help", "index.php?P=MetadataToolIntroductionHelp", TRUE);
}
?>
GetSearchesForUser($User->Id());
if (count($Searches))
{
?>
IsLoggedIn())
{
$EventLog->LimitFindToUser();
$Searches = $EventLog->FindEvents(NULL, NULL, 0, 50,
SptEventLog::SPTEVENT_SEARCH, SptEventLog::SPTEVENT_ADVANCEDSEARCH);
}
elseif (FALSE) // (need to add system configuration option to disable before allowing this)
{
$EventLog->AddSqlConditionForFind("UserId >= 0");
$Searches = $EventLog->FindEvents(NULL, NULL, 0, 50, SptEventLog::SPTEVENT_SEARCH);
}
if (isset($Searches) && count($Searches))
{
?>
Query("SELECT * FROM RSSFeeds");
$HaveLoadedFeedFromSite = FALSE;
$DefaultCharset = $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();
}
}
}
}
?>
SignalEvent("EVENT_REQUEST_SIDEBAR_CONTENT");
if (is_array($SideContent) && count($SideContent))
{
foreach ($SideContent as $HandlerName => $Content) { print $Content; }
}
?>
IncrementalKeywordSearchEnabled()) { ?>