<?php defined('CORE_PATH') or die('No direct script access.'); /** * @file error.php * @author Daniel Becker <*****@*****.**> * @date 27.02.2015 * @package game_core * @subpackage views * * @description * The error-view of the game * * @var string $s_error_message the given error message * @var string $s_error_code the given error code * @var string $s_error_file the given error file * @var string $s_error_line the given error line */ if (strpos($s_error_code, 'TEMPLATE') !== false) { echo $s_error_message; echo '<br><br><b>Code: ' . $s_error_code . '</b>'; } else { Replacer::output($s_error_message); Replacer::output('<br><b>Code: ' . $s_error_code . '</b>'); Replacer::output('<br><b>File: ' . $s_error_file . '</b>'); Replacer::output('<br><b>Line: ' . $s_error_line . '</b>'); }
<?php defined('CORE_PATH') or die('No direct script access.'); /** * @file start.php * @author Daniel Becker <*****@*****.**> * @date 27.02.2015 * @package game_core * @subpackage views * * @description * The first start-view file of the game * */ Replacer::addnav('Titel 1'); Replacer::addnav('Link 1', BASE_URL); Replacer::addnav('Titel 2'); Replacer::output('Testcontent 1'); Replacer::output('Testcontent 2'); Replacer::addcharstat('stat_title_vital'); Replacer::addcharstat('stat_value_health', 'Rechte Seite 1'); Replacer::addcharstat('Status'); Replacer::addcharstat('stat_value_attack', 'Rechte Seite 2');
<?php defined('CORE_PATH') or die('No direct script access.'); /** * @file install.php * @author Daniel <*****@*****.**> * @date 04.08.2015 * @package game_core * @subpackage views * * @description * The view for the install-script of the game * * @var string $i_step the current step of installation */ $a_supported_languages = I18N::get_all_supported_languages(false); $s_html = '<form method="post" action="' . BASE_URL . '"> '; $s_html .= '<select name="game_language">'; foreach ($a_supported_languages as $s_language_code => $s_language_name) { $s_is_selected = null; if (I18N::get_language() === $s_language_code) { $s_is_selected = 'selected'; } $s_html .= '<option ' . $s_is_selected . ' value="' . $s_language_code . '">' . $s_language_name . '</option>'; } $s_html .= '</select> <input type="submit" value="' . __('form_choose_submit_form', 'form') . '"> </form>'; Replacer::output($s_html);