<?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                          */
/********************************************************/
defined('IN_YA') OR die ('Access denied savecomm MAXIMUS directly...');
defined('MAXIMUS') OR header("Location: index.php");

if (defined('USER_ALLOW')) {
    cookiedecode($user);
    $check  = $cookie[1];
    $check2 = $cookie[2];
    $result = $db->sql_query("SELECT `user_id`, `user_password` FROM `".TABLE_USERS."` WHERE `username`='$check'");
    $row    = $db->sql_fetchrow($result);
    $vuid   = $db->XMFnum($row['user_id']);
    $ccpass = stripslashes($row['user_password']);
    if (($user_id == $vuid) AND ($check2 == $ccpass)) {
        if(isset($noscore)) $noscore=1; else $noscore=0;
        $db->sql_query("UPDATE `".TABLE_USERS."` SET `umode`='$umode', `uorder`='$uorder', `thold`='$thold', `noscore`='$noscore', `commentmax`='$commentmax' WHERE `user_id`='$user_id'");
        getusrinfo($user);
        yacookie($userinfo['user_id'],$userinfo['username'],$userinfo['user_password'],$userinfo['storynum'],$userinfo['umode'],$userinfo['uorder'],$userinfo['thold'],$userinfo['noscore'],$userinfo['ublockon'],$userinfo['theme'],$userinfo['commentmax']);
        redirect_url("modules.php?name=$module_name");
    }
} else { 
	notuser();
}