Add project radio buttons

This commit is contained in:
2019-01-27 16:42:15 +01:00
parent 62b94624f0
commit 54426daca6
6 changed files with 101 additions and 74 deletions

View File

@@ -85,13 +85,14 @@ class Project extends PhpObject {
if($iProjectId > 0) $asInfo['constraint'] = array(Db::getId(self::PROJ_TABLE)=>$iProjectId);
$asProjects = $this->oDb->selectRows($asInfo, 'codename');
foreach($asProjects as &$asProject) {
foreach($asProjects as $sCodeName=>&$asProject) {
switch($asProject['mode']) {
case 0: $asProject['mode'] = self::MODE_PREVIZ; break;
case 1: $asProject['mode'] = self::MODE_BLOG; break;
case 2: $asProject['mode'] = self::MODE_HISTO; break;
}
$asProject['geofile'] = Spot::addTimestampToFilePath(self::GEO_FOLDER.$asProject['geofile']);
$asProject['codename'] = $sCodeName;
}
return $asProjects;
}