function ryzom_app_render($title, $content, $style = '', $javascript = 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 .= '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' . "\n"; } $c .= '<html><head>' . "\n"; $c .= ' <title>' . $title_prefix . (translation_exists($title) ? _t($title) : $title) . '</title>' . "\n"; if (!RYZOM_IG) { $c .= ' <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8" />' . "\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 $js_code = ''; if (is_string($javascript)) { $javascript = array($javascript); } foreach ($javascript as $js) { $js_code .= ' <script type="text/javascript" src="' . $js . '"></script>' . "\n"; } $c .= $js_code; } $c .= ' </head>' . "\n"; $c .= ' <body ' . $events . ' ' . $style . '>' . "\n"; if (!RYZOM_IG) { $c .= ryzom_render_www(ryzom_render_window($title, $content, $homeLink)); $c .= '</body>'; if (function_exists('newrelic_get_browser_timing_header')) { $c .= newrelic_get_browser_timing_footer(); } } else { $c .= $content . '<br /><table bgcolor="#000000"><tr><td>' . ryLogger::getInstance()->getLogs() . '</td></tr></table></body>'; } $c .= '</html>' . $at_end; return $c; }
<?php require_once 'ryzom_api/ryzom_api.php'; if (isset($_POST['key']) && $_POST['key'] != '') { header('Location: ?ckey=' . ryzom_encrypt($_POST['key'])); } ryzom_ckey_handle(); header('Content-Type:text/html; charset=UTF-8'); echo ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Character Profile</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> ' . ryzom_render_header() . ' ' . ryzom_render_header_www() . ' </head> <body> '; if (isset($_GET['ckey']) && $_GET['ckey'] != '') { ryzom_log_start('example_profile'); // Display the profile $ckey = $_GET['ckey']; $key = ryzom_decrypt($ckey); $uid = 0; $gid = 0; $slot = 0; $full = false; if (ryzom_character_valid_key($key, $uid, $slot, $full)) { $xml = ryzom_character_simplexml($key, 'full'); } else {