Prev | Current Page 619 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

php?Logout');
if (isset ($_GET['AccountDetails']))
$this->mSelectedMenuItem = 'account';
elseif (isset ($_GET['CreditCardDetails']))
$this->mSelectedMenuItem = 'credit-card';
elseif (isset ($_GET['AddressDetails']))
$this->mSelectedMenuItem = 'address';
}
public function init()
{
if (isset ($_GET['Logout']))
{
Customer::Logout();
header('Location:' . $_SESSION['link_to_last_page_loaded']);
exit();
}
$customer_data = Customer::Get();
$this->mCustomerName = $customer_data['name'];
if (!(empty ($customer_data['credit_card'])))
$this->mCreditCardAction = 'Change';
if (!(empty ($customer_data['address_1'])))
$this->mAddressAction = 'Change';
}
}
?>
5. Create a new template file named customer_details.tpl in the presentation/templates folder,
and add the following code to it:
{* customer_details.tpl *}
{load_presentation_object filename="customer_details" assign="obj"}

Please enter your details:



CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 513


E-mail Address:
{if $obj->mEditMode}readonly="readonly"{/if} size="32" />
{if $obj->mEmailAlreadyTaken}

A user with that e-mail address already exists.


{/if}
{if $obj->mEmailError}

You must enter an e-mail address.


Pages:
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631

prezenty Athlete nowoczesne meble przechowywanie opon poznań Leona Lewis