Location: PHPKode > scripts > PHPMass Shopping Cart > phpmass-shopping-cart/user/logininfo.php
<?php
/******************************************************************
 * PHPMass Shopping Cart
 * The contents of this file are subject to the PHPMass License. 
 * If you do not agree with PHPMass License Terms and Conditions 
 * than you should not use this software.
 * A copy of the license file is available on www.phpmass.com/license.htm page.
 * 
 * PHPMass.com.
 * All Rights Reserved.
 ******************************************************************/
$SiteSection = 'user';
require('../includes/config.php');
// Cart and top products
$LastProducts = $Carts->getLastProducts();
if (is_array($LastProducts)) {
	$LastProduct = array_shift($LastProducts);
}
$smarty->assign('LastProduct', $LastProduct);
$smarty->assign('LastProducts', $LastProducts);

$TopProducts = $Categories->getTopProducts(0,false,true);
$smarty->assign('TopProducts', $TopProducts);

// END Cart and top products
if (isset($_POST['Update'])) {
	if ($_POST['newpassword'] == $_POST['newpasswordagain'] && hasLength($_POST['newpassword'],4,20)) {
		if (!$Users->changePassword($userid,$_POST['oldpassword'],$_POST['newpassword'])) $Error['oldPasswords'] = $Lang['OldPassword_NotValid'];
		else $InfoMessage['passUpdated'] = $Lang['Password_Updated'];
	}
	else $Error['samePasswords'] = $Lang['SamePasswords_NotValid'];
}
$userInfo = $Users->getUser($userid);
$smarty->assign('userInfo', $userInfo);

$smarty->assign('PageTitle', $Lang['Login_Info']);
$smarty->assign('Error', $Error);
$smarty->assign('InfoMessage', $InfoMessage);
$smarty->display(DOC_ROOT.'/skin/templates/user/'.'logininfo.tpl');

?>
Return current item: PHPMass Shopping Cart