$revisionData) { $changelogHTML .= '
'; $changelogHTML .= 'Revision '. $revisionId .' ('. ucfirst($revisionData[0]) .')'; unset($revisionData[0]); foreach(array_reverse($revisionData) as $id => $changeData) { $changelogHTML .= '
'; switch($changeData['type']) { case 'ADD': $changelogHTML .= 'Added'; break; case 'REM': $changelogHTML .= 'Removed'; break; case 'FIX': $changelogHTML .= 'Fixed'; break; case 'UPD': $changelogHTML .= 'Updated'; break; default: $changelogHTML .= 'Unknown'; } $changelogHTML .= ''; $changelogHTML .= $changeData['change']; $changelogHTML .= ''; $changelogHTML .= ''; $changelogHTML .= $changeData['user']; $changelogHTML .= ''; $changelogHTML .= '
'; } $changelogHTML .= '
'; } // Get special template file $tpl = file_get_contents(ROOT .'_sakura/templates/changeLog.tpl'); // Parse tags $tpl = str_replace('{{ version }}', SAKURA_VERSION, $tpl); $tpl = str_replace('{{ version_label }}', SAKURA_VLABEL, $tpl); $tpl = str_replace('{{ version_type }}', SAKURA_STABLE ? 'Stable' : 'Development', $tpl); $tpl = str_replace('{{ colour }}', SAKURA_COLOUR, $tpl); $tpl = str_replace('{{ changeloghtml }}', $changelogHTML, $tpl); // Print template print $tpl;