<?php
if(isset($_COOKIE['login_auth'])) {
    list($User_uid, $User_username) = explode("\t", uc_authcode($_COOKIE['login_auth'], 'DECODE'));
    if($_GET['operation']=='upload'){
        echo uc_avatar($User_uid,'virtual',1);
    }
    if($_GET['act']=='getface'){
        if($_GET['size']=='middle'){
            echo '<img src="'.UC_API.'/avatar.php?uid='.$User_uid.'&size=middle" alt="" width=110px height=110px>';
        }
        if($_GET['size']=='small'){
            echo '<img src="'.UC_API.'/avatar.php?uid='.$User_uid.'&size=middle" alt="" width=110px height=110px>';
        }
        if($_GET['size']=='big'){
            echo '<img src="'.UC_API.'/avatar.php?uid='.$User_uid.'&size=middle" alt="" width=110px height=110px>';
        }
    }
}
else {
    $style->display('login.html');
}

?>