public static function echoMenuEntry($page) { echo '<li'; if (HelperFunctions::getActivePage() == $page) { echo ' class="active"'; } echo '><a href="./?page=' . $page . '">' . TranslationManager::getText($page) . '</a></li>'; }
require_once dirname(__FILE__) . '/PermissionManager.php'; require_once dirname(__FILE__) . '/MurmurClasses.php'; require_once MUMPHPI_MAINDIR . '/classes/TranslationManager.php'; require_once MUMPHPI_MAINDIR . '/classes/HelperFunctions.php'; require_once MUMPHPI_MAINDIR . '/classes/MessageManager.php'; if (extension_loaded('ice') && function_exists('Ice_intVersion') && Ice_intVersion() >= 30400) { $ICE_INCLUSION_FILENAME = 'Ice.php'; // Ice.php is a hard dependency. Whatever includes this file will require Ice to work. if (!stream_resolve_include_path($ICE_INCLUSION_FILENAME)) { MessageManager::addError(TranslationManager::getText('error_iceInclusionFileNotFound')); MessageManager::echoAll(); exit; } if (!stream_resolve_include_path(SettingsManager::getInstance()->getIceGeneratedMurmurPHPFileName())) { MessageManager::addError(TranslationManager::getText('error_iceMurmurPHPFileNotFound') . ' Current setting: ' . SettingsManager::getInstance()->getIceGeneratedMurmurPHPFileName()); MessageManager::echoAll(); exit; } require_once $ICE_INCLUSION_FILENAME; require_once SettingsManager::getInstance()->getIceGeneratedMurmurPHPFileName(); } /** * Provides murmur server functionality */ class ServerInterface { private static $instance = null; /** * @return ServerInterface_ice */
} // new texture //TODO reimplement setting texture if (isset($_FILES['texture'])) { if (!file_exists($_FILES['texture']['tmp_name'])) { MessageManager::addWarning(tr('profile_texture_notempfile')); } else { $imgData = file_get_contents($_FILES['texture']['tmp_name']); ServerInterface::getInstance()->updateUserTexture($_SESSION['serverid'], $_SESSION['userid'], $imgData); } } } ?> <div id="content"> <h1><?php echo TranslationManager::getText('profile_head'); ?> </h1> <form action="?page=profile&action=doedit" method="post" style="width:420px;"<?php if (isset($_GET['action']) && $_GET['action'] == 'edit_texture') { echo ' enctype="multipart/form-data"'; } ?> > <table class="fullwidth"> <tr><?php // SERVER Information (not changeable) ?> <td class="formitemname"><?php echo tr('server'); ?>
/** * Global function for easier access * @param $key Language Translation key * @return string text value (translated) */ function tr($key) { return TranslationManager::getText($key); }