本文整理汇总了PHP中DataAccess::GetAllMaps方法的典型用法代码示例。如果您正苦于以下问题:PHP DataAccess::GetAllMaps方法的具体用法?PHP DataAccess::GetAllMaps怎么用?PHP DataAccess::GetAllMaps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataAccess
的用法示例。
在下文中一共展示了DataAccess::GetAllMaps方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetAllMaps
function GetAllMaps($request)
{
$success = false;
// validate username and password
$user = DataAccess::GetUserByUsernameAndPassword($request["Username"], $request["Password"]);
if (!$user) {
$errorMessage = "Invalid username and/or password.";
} else {
$maps = array();
$dbMaps = DataAccess::GetAllMaps($user->ID);
foreach ($dbMaps as $m) {
$maps[] = array("ID" => $m->ID, "UserID" => $m->UserID, "CategoryID" => $m->CategoryID, "Date" => date("c", Helper::StringToTime($m->Date, true)), "Name" => $m->Name, "Organiser" => $m->Organiser, "Country" => $m->Country, "Discipline" => $m->Discipline, "RelayLeg" => $m->RelayLeg, "MapName" => $m->MapName, "ResultListUrl" => $m->ResultListUrl, "Comment" => $m->Comment);
}
$errorMessage = mysql_error();
$success = $errorMessage == "";
}
return array('Success' => $success, 'ErrorMessage' => $errorMessage, 'Maps' => $maps);
}
示例2: GetMapsForRerunRequest
public static function GetMapsForRerunRequest()
{
if (USE_3DRERUN == "1") {
$maps = DataAccess::GetAllMaps();
$ret = array();
foreach ($maps as $map) {
if ((is_null($map->RerunID) || $map->RerunID == 0) && $map->RerunTries < RERUN_MAX_TRIES && $map->IsGeocoded) {
$user = new User();
$user->Load($map->UserID);
$ret[] = $map->ID . ";" . $user->Username;
}
}
if (count($ret) > 0) {
return implode(",", $ret);
} else {
return null;
}
}
}