<?php

/********************************************************/
/* NSN Your Account                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.fr                            */
/* Original Script www.nukescripst.net                  */
/* Copyright  2000-2005 by NukeScripts Network         */
/* ==================================================== */
/* Based from:                                          */
/* PHP-NUKE: Web Portal System                          */
/********************************************************/
if (!defined('MAXIMUS')) {
header("Location: index.php");
  die();
}
if (!defined('IN_YA')) { die("You can't access this file directly."); }

 
if (is_user($user)) {       
    getusrinfo($user);
    cookiedecode($user);
    incoh();
    title(_YA_AVATARSUCCESS);
    Max_OpenTable();
    nav();
    Max_CloseTable();
    echo "<br />\n";
    Max_OpenTable();
    $db->sql_query("UPDATE ".TABLE_USERS." SET user_avatar='$avatar', user_avatar_type='2' WHERE username='$cookie[1]'");
    echo "<center><font class=\"content\">"._YA_AVATARFOR." ".$cookie[1]." "._YA_SAVED."</font></center><br />";
    if (ereg("(http)", $avatar)) {
        echo "<center>"._YA_NEWAVATAR.":<br /><IMG alt=\"\" src=\"$avatar\"><br />";
        echo "[ <a href=\"modules.php?name=$module_name&op=edituser\">"._YA_BACKPROFILE."</a> | <a href=\"modules.php?name=$module_name\">"._YA_DONE."</a> ]</center>";
    } elseif ($avatar) {
        echo "<center>"._YA_NEWAVATAR.":<br /><IMG alt=\"\" src=\"modules/Forums/images/avatars/$avatar\"><br />";
        echo "[ <a href=\"modules.php?name=$module_name&op=edituser\">"._YA_BACKPROFILE."</a> | <a href=\"modules.php?name=$module_name\">"._YA_DONE."</a> ]</center>";
    }
    Max_CloseTable();
    incof();
} else { notuser(); }
?>