<?php /* [UCenter] (C)2001-2099 Comsenz Inc. This is NOT a freeware, use is subject to license terms $Id: avatar.php 1144 2013-01-31 06:47:43Z zhangjie $ */ error_reporting(0); _get_script_url(); define('UC_API', strtolower(($_SERVER['HTTPS'] == 'on' ? 'https' : 'http') . '://' . 'static.jx3pve.com' . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')))); $uid = isset($_GET['uid']) ? $_GET['uid'] : 0; $size = isset($_GET['size']) ? $_GET['size'] : ''; $random = isset($_GET['random']) ? $_GET['random'] : ''; $type = isset($_GET['type']) ? $_GET['type'] : ''; $check = isset($_GET['check_file_exists']) ? $_GET['check_file_exists'] : ''; $avatar = './data/avatar/' . get_avatar($uid, $size, $type); if (file_exists(dirname(__FILE__) . '/' . $avatar)) { if ($check) { echo 1; exit; } $random = !empty($random) ? rand(1000, 9999) : ''; $avatar_url = empty($random) ? $avatar : $avatar . '?random=' . $random; } else { if ($check) { echo 0; exit; } $size = in_array($size, array('big', 'middle', 'small')) ? $size : 'middle'; $avatar_url = 'images/noavatar_' . $size . '.gif';
<?php /* * @copyright Leyun internet Technology(Shanghai)Co.,Ltd * @license http://www.dzzoffice.com/licenses/license.txt * @package DzzOffice * @link http://www.dzzoffice.com * @author zyx(zyx@dzz.cc) */ error_reporting(E_ERROR); set_magic_quotes_runtime(0); define('IN_DZZ', TRUE); define('DZZ_ROOT', substr(dirname(__FILE__), 0, -11)); define('UC_PATH', dirname(__FILE__) . '/'); $_SERVER['PHP_SELF'] = htmlspecialchars(_get_script_url()); define('UC_API', strtolower(($_SERVER['HTTPS'] == 'on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')))); define('UC_DATADIR', DZZ_ROOT . './data/'); define('UC_DATAURL', substr(UC_API, 0, -11) . 'data'); define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc()); require_once UC_PATH . './fun.php'; unset($GLOBALS, $_ENV, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_ENV_VARS); $_GET = daddslashes($_GET, 1, TRUE); $_POST = daddslashes($_POST, 1, TRUE); $_COOKIE = daddslashes($_COOKIE, 1, TRUE); $_SERVER = daddslashes($_SERVER); $_FILES = daddslashes($_FILES); $_REQUEST = daddslashes($_REQUEST, 1, TRUE); $a = getgpc('a'); if ($a == 'uploadavatar') { $data = onuploadavatar(); echo is_array($data) ? XMLserialize($data, 1) : $data;