* @version 1.7.3 (2013-05-19) * @info $Id: userpic.php 2643 2013-03-26 17:13:31Z slaver7 $ * @link http://2moons.cc/ */ define('MODE', 'BANNER'); define('ROOT_PATH', str_replace('\\', '/', dirname(__FILE__)) . '/'); set_include_path(ROOT_PATH); if (!extension_loaded('gd')) { clearGIF(); } require 'includes/common.php'; $id = HTTP::_GP('id', 0); if (!isModulAvalible(MODULE_BANNER) || $id == 0) { clearGIF(); } $LNG = new Language(); $LNG->getUserAgentLanguage(); $LNG->includeData(array('L18N', 'BANNER', 'CUSTOM')); require 'includes/classes/class.StatBanner.php'; $banner = new StatBanner(); $Data = $banner->GetData($id); if (!isset($Data) || !is_array($Data)) { clearGIF(); } $ETag = md5(implode('', $Data)); header('ETag: ' . $ETag); if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $ETag) { HTTP::sendHeader('HTTP/1.0 304 Not Modified'); exit; } $banner->CreateUTF8Banner($Data);
case "stats": if (TIMESTAMP >= $CONF['stat_last_update'] + 60 * $CONF['stat_update_time']) { update_config('stat_last_update', TIMESTAMP); require_once ROOT_PATH . 'includes/classes/class.statbuilder.php'; $stat = new Statbuilder(); $result = $stat->MakeStats(); } break; case "opdb": if (TIMESTAMP >= $CONF['stat_last_db_update'] + 60 * 60 * 24) { update_config('stat_last_db_update', TIMESTAMP); $prueba = $db->query("SHOW TABLE STATUS from " . DB_NAME . ";"); $table = ""; while ($pru = $db->fetch_array($prueba)) { $compprefix = explode("_", $pru["Name"]); if ($compprefix[0] . "_" == DB_PREFIX) { $table .= "`" . $pru["Name"] . "`, "; } } $db->query("OPTIMIZE TABLE " . substr($table, 0, -2) . ";"); } break; case "banner": if (!CheckModule(37) && TIMESTAMP >= $CONF['stat_last_banner_update'] + 60 * $CONF['stat_banner_update_time']) { update_config('stat_last_banner_update', TIMESTAMP); require_once ROOT_PATH . 'includes/classes/class.StatBanner.php'; $banner = new StatBanner(); $banner->BuildIMGforAll(); } break; }
# * (at your option) any later version. # # * # # * This program is distributed in the hope that it will be useful, # # * but WITHOUT ANY WARRANTY; without even the implied warranty of # # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # * GNU General Public License for more details. # # * # # * You should have received a copy of the GNU General Public License # # * along with this program. If not, see <http://www.gnu.org/licenses/> # # * # ############################################################################## define('INSIDE', true); define('LOGIN', false); define('INSTALL', false); define('IN_CRON', true); define('ROOT_PATH', './'); include ROOT_PATH . 'extension.inc'; include ROOT_PATH . 'common.' . PHP_EXT; $id = request_var('id', 0); if (CheckModule(37) || $id == 0) { exit; } includeLang('INGAME'); require_once ROOT_PATH . "includes/classes/class.StatBanner.php"; if (!isset($_GET['debug'])) { header('Expires: ' . gmdate('D, d M Y H:i:s', TIMESTAMP + 7200)) . ' GMT'; header("Cache-Control: max-age=7200, private"); header("Content-type: image/png"); } $banner = new StatBanner(); $banner->ShowStatBanner($id);