. */ function ryzom_app_render($title, $content, $ig=false, $bgcolor='', $javascript=array(), $homeLink=false) { $c = ''; // Render header $title_prefix = ''; if (ON_IPHONE) { $title_prefix = 'Ryzom - '; } if (!$bgcolor) $bgcolor = '#000000'.($ig?'00':''); if (!$ig) { $c .= ''."\n"; $c .= ' '."\n"; $c .= ' '.$title_prefix.(translation_exists($title)?_t($title):$title).''."\n"; $c .= ' '."\n"; $c .= ryzom_render_header(); $c .= ryzom_render_header_www(); $events = ON_IPHONE ? 'onorientationchange="updateOrientation();" ' : ''; $c .= ' '."\n"; $c .= ' '."\n"; // Javascript $js_code = ''; foreach ($javascript as $js) $js_code .= ''; $c .= $js_code; $c .= ryzom_render_www(ryzom_render_window($title, $content, $homeLink)); $c .= ''; } else { $c .= ''; $c .= $content; $debug = ryLogger::getInstance()->getLogs(); if ($debug) $c .= '
'.$debug.'
'; $c .= ''; } return $c; } function ryzom_render_header() { if (ON_IPHONE) { return ''; } else { return ' '; } } // Call this inside the part if you want to use ryzom_render_www function ryzom_render_header_www() { if (ON_IPHONE) { return ' '; } else { return ' '; } } // Render a Ryzom style window function ryzom_render_window($title, $content, $homeLink=false) { return ryzom_render_window_begin($title, $homeLink) . $content . ryzom_render_window_end(); } function ryzom_render_window_begin($title, $homeLink=false) { if ($homeLink === false) $homeLink = ''._t('home').''; return '
'.(translation_exists($title)?_t($title):$title).$homeLink.'
'; } function ryzom_render_window_end() { return '
'.ryLogger::getInstance()->getLogs().'

powered by ryzom-api

'; } // Render a webpage using www.ryzom.com style function ryzom_render_www($content) { return ryzom_render_www_begin() . $content . ryzom_render_www_end(); } function ryzom_render_www_begin($url='') { $style1 = 'position: relative; padding-top: 20px; padding-right: 30px; margin-bottom: -3px'; $style2 = 'position: absolute; bottom: 0; right: 0; '; if (ON_IPHONE) { $style1 = 'position: relative; padding-top: 30px; padding-right: 30px; '; $style2 = 'position: fixed; top: 0; right: 0; padding-right: 0px;'; $marginBottom = ''; } if (!$url) { $url_params = parse_query($_SERVER['REQUEST_URI']); unset($url_params['lang']); $url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.http_build_query($url_params); } return '
English French German Russian
'; } function ryzom_render_www_end() { return '
'; } function ryzom_render_login_form($char, $aligned=true) { $c = ''; if ($aligned) { $c .= '
'; $c .= ''; $c .= ''; $c .= ''; $c .= ''; $c .= ''; } else { $c .= '
'._t('enter_char').'
'._t('enter_password').'
'; $c .= ''; $c .= ''; $c .= ''; $c .= ''; $c .= ''; } $c .= '
'._t('login').'
'._t('password').'
'; return $c; } ?>