.
*/
function ryzom_app_render($title, $content, $style='', $files=array(), $homeLink=false) {
$c = '';
// get Lua code
$c .= ryLua::get(RYZOM_IG);
$at_end = ryLua::getEnd(RYZOM_IG);
// Render header
$title_prefix = '';
if (ON_IPHONE) {
$title_prefix = 'Ryzom - ';
}
if (!RYZOM_IG)
$c .= ''."\n";
$c .= '
'."\n";
$c .= ' '.$title_prefix.(translation_exists($title)?_t($title):$title).''."\n";
if (!RYZOM_IG)
$c .= ' '."\n";
$events = '';
if (!RYZOM_IG) {
$c .= ryzom_render_header();
$c .= ryzom_render_header_www();
if (function_exists('newrelic_get_browser_timing_header'))
$c .= newrelic_get_browser_timing_header();
if(ON_IPHONE) $events = 'onorientationchange="updateOrientation();" ';
} else {
#if (!$style)
$style='bgcolor="#00000000"';
}
if (!RYZOM_IG) {
// Javascript
$extra_code = '';
if (is_string($files))
$files = array($files);
foreach ($files as $file) {
$sfile = explode('.', $file);
if ($sfile[count($sfile)-1] == 'js')
$extra_code .= ' '."\n";
else if ($sfile[count($sfile)-1] == 'css')
$extra_code .= ' '."\n";
}
$c .= $extra_code;
}
$c .= ' '."\n";
$c .= ' '."\n";
if (!RYZOM_IG) {
$c .= ryzom_render_www(ryzom_render_window($title, $content, $homeLink));
$c .= '';
if (function_exists('newrelic_get_browser_timing_header'))
$c .= newrelic_get_browser_timing_footer();
} else {
$c .= $content.'
'.ryLogger::getInstance()->getLogs().' |
';
}
$c .= '