First commit
This commit is contained in:
21
api/avatar/index.php
Normal file
21
api/avatar/index.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
require_once '../../source/class/class_core.php';
|
||||
|
||||
$discuz = C::app();
|
||||
$discuz->init();
|
||||
if(getgpc('m') !== 'user' || getgpc('a') !== 'rectavatar') {
|
||||
exit;
|
||||
}
|
||||
loaducenter();
|
||||
if(!UC_AVTPATH) {
|
||||
$avtpath = './data/avatar/';
|
||||
} else {
|
||||
$avtpath = str_replace('..', '', UC_AVTPATH);
|
||||
}
|
||||
define('UC_UPAVTDIR', realpath(DISCUZ_ROOT.$avtpath).'/');
|
||||
if(!empty($_G['uid'])) {
|
||||
echo uc_rectavatar($_G['uid']);
|
||||
} else {
|
||||
echo uc_rectavatar(0);
|
||||
}
|
Reference in New Issue
Block a user