Thursday, March 19, 2009

shoping Cart

For many developers, the humble shopping cart holds a special place in their
hearts. Although PHP and MySQL are the fodder for a range of Web applications,
many developers learned their trade with the ambition to write the ubiquitous shopping
cart. If there is a Zen to Web development, it is likely to be experienced while
writing a shopping cart.
Although a common sight on the Web, shopping carts do come in a variety of
different flavors. The various incarnations typically differ in ways that are specific
to the type of business using the software. For example, the sale of items such as
books, CDs, and DVDs differs from the sale of cables, food, building materials, and
janitorial products. The core difference is quantity; you generally buy only a single
book or DVD at time, but it is not uncommon for a restaurant to buy 10 packs of
dinner rolls.
PROJECT OVERVIEW
In this project, you create the core features of a shopping cart. To get a clear idea of
how the project works, take a look at the following use case:
John needs to buy some teabags for his mobile café. He goes to a popular
online shop that was created by an owner of this very book. John does not
have a user account on the Web site but starts shopping anyway. He clicks
the Beverages category and sees the list of teabags. He clicks the Buy link
and is taken to another page, where he can choose the quantity. He selects
10 boxes of teabags and adds them to his shopping cart. The page now
refreshes, and he sees the contents of his shopping cart. John then buys coffee,
and his cart is updated again. John realizes he does not need the coffee
after all, so he clicks the X link to delete the coffee from his cart. John finishes
choosing items and clicks the Go to the Checkout link. He is prompted
for his address, which he fills in, and is taken to the payment screen. John
can choose to pay with PayPal or by check. John clicks the PayPal button
and taken to the PayPal payment screen at paypal.com, where he pays for the
order.
Pauline needs some teabags, too. Pauline already has an account on the site,
so she logs in. She adds the items she needs to her cart and clicks the Go to
the Checkout link. At the address page, she can choose between a new
address and the address stored with her user account. She chooses the
account address and is taken to the payment screen. Pauline chooses to pay
by check and is given instructions about where to send the check and to
whom to make it payable.
Ken runs the Web site and wants to see all current orders. He logs in with his
administrator username and password and is provided with a list of orders.
Ken looks at each item, packages the order, and writes the address on the
parcel. To confirm the completion of the order, Ken clicks the Confirm Payment
link. The order is now complete.
The shopping cart you build in this chapter satisfies all of the features discussed
in the preceding use case, but there is still a huge scope for development.
Shopping carts can become huge and complex systems, and an entire book would
do the subject of building shopping carts justice. This project will provide a solid
foundation in which you can continue to build in extra features.
BUILDING THE DATABASE
The database you will create is shown in Figure 6-1.

FIGURE 6-1 The database schema revolves around the main orders table.
BUILDING THE DATABASE
The database you will create is shown in Figure 6-1.
This entire project fundamentally hinges on orders stored in the orders table.
This table relates to the customers (contains registered customer address details)
and delivery_addresses (contains unregistered and alternative addresses) tables.
Each product (stored in the products table) in the order is stored in the order_items
table. Other tables include logins (stores the registered user’s login details), categories
(contains the categories that the products are part of), and admins (stores
administrator login details).
Implementing the Database
Start phpMyAdmin, create a new database called shoppingcart, and add the following
tables:
Note:
Always Know Your Status
In the orders table is a field called status. The purpose of this field is to indicate
at what point in the shopping cart the user has progressed. This field
has four possible values:
0 The user is still adding items to her shopping cart.
1 The user has entered her address.
2 The user has paid for the item.
10 The administrator has confirmed the transaction and sent the item.
The admins Table
■ id. Make this a TINYINT (lots of users are possible) and turn on auto_
increment. Set this field as a primary key.
■ username. Make this a VARCHAR with a length of 10.
■ password. Make this a VARCHAR with a length of 10.
The categories Table
■ id. Make this a TINYINT (there will be few categories) and turn on
auto_increment in the Extras column. Make this field a primary key.
■ name. Make this a VARCHAR and set the size to 20. (It is unlikely a category
title will be longer than 20 letters.)
The customers Table
■ id. Make this an INT (lots of users are possible) and turn on auto_increment.
Set this field as a primary key.
■ forename. Make this a VARCHAR with a length of 50.
■ surname. Make this a VARCHAR with a length of 50.
■ add1. Make this a VARCHAR with a length of 50.
■ add2. Make this a VARCHAR with a length of 50.
■ add3. Make this a VARCHAR with a length of 50.
■ postcode. Make this a VARCHAR with a length of 10.
■ phone. Make this a VARCHAR with a length of 20.
■ email. Make this a VARCHAR with a length of 100.
■ registered. Make this a TINYINT.
The delivery_addresses Table
■ id. Make this an INT (lots of users are possible) and turn on auto_increment.
Set this field as a primary key.
■ forename. Make this a VARCHAR with a length of 50.
■ surname. Make this a VARCHAR with a length of 50.
■ add1. Make this a VARCHAR with a length of 50.
■ add2. Make this a VARCHAR with a length of 50.
■ add3. Make this a VARCHAR with a length of 50.
■ postcode. Make this a VARCHAR with a length of 10.
■ phone. Make this a VARCHAR with a length of 20.
■ email. Make this a VARCHAR with a length of 100.
The logins Table
■ id. Make this an INT (lots of users are possible) and turn on auto_increment.
Set this field as a primary key.
■ customer_id. Make this an INT.
■ username. Make this a VARCHAR with a length of 10.
■ password. Make this a VARCHAR with a length of 10.
The orderitems Table
■ id. Make this an INT (lots of items are possible) and turn on auto_increment.
Set this field as a primary key.
■ order_id. Make this an INT.
■ product_id. Make this an INT.
■ quantity. Make this an INT.
The orders Table
■ id. Make this an INT (lots of orders are possible) and turn on
auto_increment. Set this field as a primary key.
■ customer_id. Make this an INT.
■ registered. Make this an INT.
■ delivery_add_id. Make this an INT.
■ payment_type. Make this an INT.
■ date. Make this a DATETIME.
■ status. Make this a TINYINT.
■ session. Make this a VARCHAR and set the size to 50.
■ total. Make this a FLOAT.
The products Table
■ id. Make this an INT (lots of images are possible) and turn on auto_increment.
Set this field as a primary key.
■ cat_id. Make this a TINYINT.
■ name. Make this a VARCHAR with a length of 100. It is likely there will be long
product names.
■ description. Make this a TEXT.
■ image. Make this a VARCHAR and set the size to 30.
■ price. Make this a FLOAT.
Insert Sample Data
With a solid set of tables ready to go, add some sample data to get started. Remember,
do not fill in a number in the id column; this is handled by auto_increment.
Feel free to add your own sample data, or use the suggested information.
Sample Data for the admins Table
Create a username and password for the administrator. This example uses jono as
the username and bacon as the password.
Sample Data for the categories Table
Add two categories: beverages and cakes.
Sample Data for the customers Table
Add the following customers, as shown in Table 6-1.
TABLE 6-1 The customers and logins tables store details about registered users.

Sample Data for the logins Table
Add the login details from Table 6-2 for each customer.
TABLE 6-2 Make sure you match the customer_id field to the id field in the customers
table.

Sample Data for the delivery_addresses TableLeave this table empty.
Sample Data for the products Table
Add the products shown in
Table 6-3 to the products table.

Tuesday, March 17, 2009

Thursday, February 26, 2009

vpn

Virtual Private Networking with Windows Server 2003: Overview

Microsoft Corporation
Published: March 2003




Abstract
This white paper provides an overview of virtual private networking and the virtual private network (VPN) technologies supported by Windows Server 2003 and Windows XP. Point-to-Point Tunneling Protocol (PPTP) and Layer Two Tunneling Protocol with Internet Protocol security (L2TP/IPSec) are described as the two industry standard methods for VPN connections. This paper also describes the set of features in Windows Server 2003 and Windows XP that provides advanced security capabilities and simplified administration of VPN connections for enterprise networks.






The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.
This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE INFORMATION IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
© 2003 Microsoft Corporation. All rights reserved.
Microsoft, Active Directory, Windows, Windows NT, Windows Server, and the Windows logo are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Contents
Introduction 1
Common Uses of VPNs 2
Remote Access Over the Internet 2
Connecting Networks Over the Internet 2
Connecting Computers Over an Intranet 3
Basic VPN Requirements 4
Tunneling Basics 5
Tunneling Protocols 6
How Tunneling Works 6
Tunneling Protocols and the Basic VPN Requirements 6
Point-to-Point Protocol (PPP) 7
Phase 1: PPP Link Establishment 7
Phase 2: User Authentication 7
Phase 3: PPP Callback Control 9
Phase 4: Invoking Network Layer Protocol(s) 9
Data-Transfer Phase 9
Point-to-Point Tunneling Protocol (PPTP) 9
Layer Two Tunneling Protocol (L2TP) 10
PPTP Compared to L2TP/IPSec 11
Advantages of L2TP/IPSec Over PPTP 11
Advantages of PPTP Over L2TP/IPSec 12
Tunnel Types 12
Voluntary Tunneling 12
Compulsory Tunneling 13
Advanced VPN Security Features 14
EAP-TLS and Certificate-based Authentication 14
Digital Certificates 14
Extensible Authentication Protocol (EAP) 15
EAP-Transport Level Security (EAP-TLS) 15
Network Access Quarantine Control 15
Remote Access Account Lockout 16
Remote Access Policy Profile Packet Filtering 16
VPN Administration 18
Authorizing VPN Connections 18
Scalability 18
RADIUS 18
Connection Manager and Managed VPN Connections 19
Connection Manager Client Dialer 19
Connection Manager Administration Kit 19
Connection Point Services 20
Accounting, Auditing, and Alarming 21
Summary 22
Related Links 23

Introduction
A virtual private network (VPN) is the extension of a private network that encompasses links across shared or public networks like the Internet. A VPN enables you to send data between two computers across a shared or public internetwork in a manner that emulates the properties of a point-to-point private link. The act of configuring and creating a virtual private network is known as virtual private networking.
To emulate a point-to-point link, data is encapsulated, or wrapped, with a header that provides routing information allowing it to traverse the shared or public transit internetwork to reach its endpoint. To emulate a private link, the data being sent is encrypted for confidentiality. Packets that are intercepted on the shared or public network are indecipherable without the encryption keys. The portion of the connection in which the private data is encapsulated is known as the tunnel. The portion of the connection in which the private data is encrypted is known as the virtual private network (VPN) connection.

Figure 1: Virtual private network connection
VPN connections allow users working at home or on the road to connect in a secure fashion to a remote organization server using the routing infrastructure provided by a public internetwork (such as the Internet). From the user's perspective, the VPN connection is a point-to-point connection between the user's computer and an organization server. The nature of the intermediate internetwork is irrelevant to the user because it appears as if the data is being sent over a dedicated private link.
VPN technology also allows a corporation to connect to branch offices or to other companies over a public internetwork (such as the Internet), while maintaining secure communications. The VPN connect

Wednesday, January 21, 2009

HELLO I'm

My company has product for sall that you buy by view product on this web to know catagory of the product.