本文整理汇总了PHP中DataAccess::GetLastCreatedTime方法的典型用法代码示例。如果您正苦于以下问题:PHP DataAccess::GetLastCreatedTime方法的具体用法?PHP DataAccess::GetLastCreatedTime怎么用?PHP DataAccess::GetLastCreatedTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataAccess
的用法示例。
在下文中一共展示了DataAccess::GetLastCreatedTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Execute
public function Execute()
{
$viewData = array();
// check if user is not specified or hidden
if (!getCurrentUser()) {
// all maps in archive
$mode = "all";
$count = $_GET["count"];
if (!$count) {
$count = 30;
}
$maps = DataAccess::GetMaps(0, 0, 0, 0, null, $count, "ID");
$categories = DataAccess::GetCategoriesByUserID();
$users = DataAccess::GetAllUsers(true);
$viewData["Title"] = _SITE_TITLE;
$viewData["LastCreatedTime"] = date("r", DataAccess::GetLastCreatedTime());
$viewData["Description"] = _SITE_DESCRIPTION;
$viewData["WebsiteUrl"] = Helper::GlobalPath("index.php");
} else {
// specified archive
$mode = "user";
if (!getCurrentUser()->Visible) {
die;
}
$users[getCurrentUser()->ID] = getCurrentUser();
$maps = DataAccess::GetMaps(getCurrentUser()->ID);
$categories = DataAccess::GetCategoriesByUserID(getCurrentUser()->ID);
$viewData["Title"] = __("PAGE_TITLE");
$viewData["LastCreatedTime"] = date("r", DataAccess::GetLastCreatedTime(getCurrentUser()->ID));
$viewData["Description"] = __("RSS_DESCRIPTION");
$viewData["WebsiteUrl"] = Helper::GlobalPath("index.php?" . Helper::CreateQuerystring(getCurrentUser()));
}
$viewData["Items"] = array();
foreach ($maps as $map) {
$item = array();
$user = $users[$map->UserID];
$item["Title"] = hsc(Helper::DateToLongString(Helper::StringToTime($map->Date, true)) . ": " . $map->Name);
$item["URL"] = $map->MapImage ? Helper::GlobalPath('show_map.php?user=' . urlencode($user->Username) . '&map=' . $map->ID) : "";
$atoms = array();
if (__("SHOW_MAP_AREA_NAME") && $map->MapName != "") {
$atoms[] = $map->MapName;
}
if (__("SHOW_ORGANISER") && $map->Organiser != "") {
$atoms[] = $map->Organiser;
}
if (__("SHOW_COUNTRY") && $map->Country != "") {
$atoms[] = $map->Country;
}
$atoms2 = array();
if (__("SHOW_DISCIPLINE") && $map->Discipline != "") {
$atoms2[] = hsc($map->Discipline);
}
if (__("SHOW_RELAY_LEG") && $map->RelayLeg != "") {
$atoms2[] = __("RELAY_LEG_LOWERCASE") . ' ' . hsc($map->RelayLeg);
}
$item["Description"] = ($mode == "all" ? hsc($user->FirstName . " " . $user->LastName . '<br />') : '') . __("CATEGORY") . ": " . hsc($categories[$map->CategoryID]->Name) . hsc('<br />') . hsc(join(", ", $atoms)) . hsc('<br />') . join(", ", $atoms2);
$item["PubDate"] = hsc(date("r", Helper::StringToTime($map->CreatedTime, true)));
$viewData["Items"][] = $item;
}
return $viewData;
}