<?php /* * https://auth.methuselah.ru/toolbox/allNames.php */ define('METHUSELAH_INCLUDE_CHECK', true); require_once "toolbox_internal.php"; $uuid = filter_input(INPUT_GET, 'uuid', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH) or responseWithError("Profile is not specified", "Good bye."); $skin = filter_input(INPUT_GET, 'skin', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH) or responseWithError("Skin URL is not specified", "Good bye."); if (isProfileExist($uuid) && !isProfileGuest($uuid)) { setProfileClothesSkin($uuid, $skin, false); response(); } responseWithError("Profile doesn't not exist");
function getProfileClothesSimplified($uuid) { global $authserver; $defaultSkinGuests = "http://voxile.ru/skins/default_guest.png"; $defaultSkinRegistered = "http://voxile.ru/skins/dinnerbone.png"; $query = "SELECT `skin`, `cape`, `slim` FROM `authserver`.`account_props` WHERE `uuid` = '{$uuid}';"; $result = $authserver->query($query) or responseWithError("InternalDatabaseError"); if ($result->num_rows) { return $result->fetch_assoc(); } return array('skin' => isProfileGuest($uuid) ? $defaultSkinGuests : $defaultSkinRegistered); }