NOTICE <-- * This file is part of the core development branch, changing its contents will * make you unable to use the automatic updates manager. Please refer to the * documentation for further information about customizing Wootook. * */ define('DISABLE_IDENTITY_CHECK', true); require_once dirname(dirname(__FILE__)) . '/application/bootstrap.php'; define('FONT_FILE', dirname(__FILE__) . '/resources/fonts/visitor/visitor.ttf'); define('BACKGROUND_FILE', dirname(__FILE__) . '/resources/backgrounds/default.png'); define('TIMEZONE', 'Europe/Paris'); date_default_timezone_set(TIMEZONE); if (isset($_GET['id'])) { $id = (int) $_GET['id']; } else { header('HTTP/1.1 412 Precondition Failed'); die(); } $textColor = array( Wootook_Core_Model_Image_Png::COLOR_RED => 0xEF, Wootook_Core_Model_Image_Png::COLOR_GREEN => 0xEF, Wootook_Core_Model_Image_Png::COLOR_BLUE => 0xEF ); $db = Wootook_Database::getSingleton(); $sql = << Wootook::getGameConfig('game/general/name'), 'date' => date('d M Y') ), doquery($sql, '', true) ); $image = new Wootook_Core_Model_Image_Png(); $image ->setBackground(BACKGROUND_FILE) ->addText($data['game_name'], 24, FONT_FILE, 5, 37, 0, $textColor) ->addText($data['username'], 24, FONT_FILE, 250, 37, 0, $textColor) ->addText('Batiments:', 14, FONT_FILE, 5, 50, 0, $textColor) ->addText(Math::render($data['build_points']), 14, FONT_FILE, 100, 50, 0, $textColor) ->addText('Flottes:', 14, FONT_FILE, 5, 70, 0, $textColor) ->addText(Math::render($data['fleet_points']), 14, FONT_FILE, 100, 70, 0, $textColor) ->addText('Technologies:', 14, FONT_FILE, 205, 50, 0, $textColor) ->addText(Math::render($data['tech_points']), 14, FONT_FILE, 320, 50, 0, $textColor) ->addText('Total:', 14, FONT_FILE, 205, 70, 0, $textColor) ->addText(Math::render($data['total_points']), 14, FONT_FILE, 320, 70, 0, $textColor) ; foreach ($image->getHeaders() as $headerName => $headerValue) { header(sprintf('%s: %s', $headerName, $headerValue)); } echo $image->render();