Sie sind auf Seite 1von 90

Smart Shop

(USING ASP.NET 2.0THROUGH C#)

Smart Shop

CHAPTER-1 INTRODUCTION

The SMARTSHOP Web site is the application that provides customers with online mobile shopping. Through a Web browser, a customer can browse the catalog, place items to purchase into a virtual shopping cart, create and sign in to a user account, and purchase the shopping cart contents by placing an order with a credit card.

The Application is a working demonstration of how to use blueprints principles in a real application design. This document is an online guide to the design and the implementation of the application Enterprise Applications with web technology. Each release of the application maintains consistent design features such as separating logic and presentation, using web component for control and web pages for presentation, using business components, and so on. High-level design features, this document goes deeper into the implementation details of the current application release.

Shopping online instead of going to a traditional "brick and mortar" store has emerged as a major trend amongst American consumers over the last decade (Levin et al). The tangibility of going into stores to touch and hold merchandise, talk to a knowledgeable salesperson for advice and reassurance and finally making a purchasing decision is becoming a thing of the past. A major shift is putting forth a different shopping experience and new consumer behavior - the new wave of an online commodity system. Consumers may browse numerous websites on the Internet and attempt to match what they want to the product or service information available. After much deliberation, a purchasing decision is made whether right or wrong.

If a consumer who shops online knows exactly what they want to purchase, online shopping can be direct and hassle free, but if they are not exactly sure, it may be difficult to decide on a product without some additional assistance. In some cases an online

Smart Shop

consumer may not even know what they want or need in regards to use or features of a product, so they might be forced to decide based on product information given by a manufacturer or retailer without knowing what to expect until the product arrives.

1.1 Description of the function of Smart Shop

We are providing Major project on online shopping website On PHP language with fully functionality. The main features of the projects are

1. Login and Logout Panel 2. New User Registration 3. Product Registration 4. Selling and Purchasing Product 5. Displaying The Product Category wise 6. Displaying The Product Cost, Details and Images 7. Search any Product available on the Site. 8. Register new Product, details, title, image, cost and other. 9. Edit the Product Details anytime.

If you wish to buy the product then the minimum cost of the product will be given there.

Smart Shop

1.2 How We're Different


Consumer-needs-first vs. Product-features approach to product research Currently, the online consumer can approach product research in a variety of ways. The following is a brief scenario of how one may go about looking for nokia mobiles on SmartShop.com

1. Select the product category: Nokia, Blackberry, Samsung, Lava, Motorola

2. Select: Nokia 3. Consider the choices - there are hundreds of mobiles - click on a mobile that looks Interesting 4. Next, be presented with a webpage of product images, ratings, purchasing information, a link to the brand website, the choice between new, used or refurbished products. If you're interested you can see what other customers ultimately buy after viewing this item, or you can explore similar items, or see special offers and product promotions, and items frequently bought together.

5. Also, there are technical details, product details, product descriptions, more photos, accessories and product ads from external websites.

6. You can rate this item to improve your recommendations, scroll down and see customer reviews, see ratings in detail, see the most helpful customer reviews, rate the reviews as helpful or not, and create your own review. Next there is a customer discussion section.

Smart Shop

1.3 MODULES OF SMARTSHOP

Each SMART SHOP module has different requirements from the others. This section describes the requirements, design, and implementation of each module. Control module The control module dispatches requests to business logic, controls screen flow, coordinates component interactions, and activates user sign on and registration. The control module is implemented by the WAF and application-specific WAF extensions. Shopping cart module The shopping cart tracks the items a user has selected for purchase.

Sign on module The sign on module requires a user to sign on before accessing certain screens, and manages the sign on process. Messaging module The messaging module asynchronously transmits purchase orders from the pet store to the OPC.

Catalog module The catalog module provides a page-based view of the catalog based on user search criteria. Customer module The customer module represents customer information: addresses, credit cards, contact information, and so on.

Smart Shop

CHAPTER-2 PROBLEM DEFINITION

Title: SmartShop

Companies are going online to reach new customers and new markets, and companies are paying attention to the changing customer landscape. Online commerce is beginning to mirror consumerism in the brick-and-mortar world, that web site provide purchasing mobile online clearly resembling general consumer preferences. This will continue as the internet enables more mainstream consumer market offerings. In addition, companies are very interested in increasing customer loyalty. Companies are aware of the fact that reaching new customers on the internet is very costly, so they are very interested in retaining their existing customer base.

Other reasons for companies to start selling online include: reach new customers increase customer loyalty increase revenues improve service customer communication increase distribution cut costs order processing efficiency improve margins support channel partners offer more products

Smart Shop

Companies have figured out that in order for their sites to be successful, they must be easy to navigate, updated frequently, informative, and interactive. In addition, the more successful sites seem to be better at providing a feeling of "community" (like allowing visitors to share information with one another--see the lands end site, where you can shop with a friend) and customizing the online experience. Most important though, is to make their sites secure for credit card transactions.

Smart Shop

CHAPTER-3 OBJECTIVE & SCOPE OF THE PROJECT

3.1 OBJECTIVE OF THE PROJECT


The objective of this software is to completely automate the following processes: Maintaining close interaction with the Government of India in formulating National IT policies with specific focus on IT software and services Maintaining a state of the art information database of IT software and services related activities for use of both the software developers as well as interested companies overseas. Encourage members to provide world-class quality products, services and solutions in India and overseas and help build brand equity for the Indian IT software and services industry. Provide an ideal forum for overseas and domestic companies to explore the vast potential available for Joint Ventures, Strategic Alliances, Marketing Alliances, Joint Product Development, etc., by organizing Business Meets with delegations of various countries. Work actively with Overseas Governments, Embassies to make the Visa and Work Permit Rules more "India Industry Friendly". Disseminate various policies, market information and other relevant statistics by sending more than 200 circulars (annually) to all members.

Smart Shop

3.2 SCOPE OF THE PROJECT


Online shopping is rising day by day in India. Because India is the country where computer user's are increasing day by day so as the online shopping trends are also increasing. Technology makes it easy and convenience. Online shopping trend has introduced new dimensions with the rapidly changing requirements of the people all over the globe. It saves the wastage of time that is consumed when one goes for shopping in the store, meeting other different huddles on the way like traffic, vehicle issue, jams, and many others. We can term online shopping as A hunt of new world where all your searches ends at one destination.

Smart Shop

CHAPTER-4 PLATEFORM USED

4.1 HARDWARE SPECIFICATIONS


Pentium: RAM: Hard Disk: 4th 128MB 20GB/40GB

4.2 SOFTWARE SPECIFICATIONS


Front END: Back End: Operating System: PHP, HTML MYSQL Windows XP/7

Smart Shop

10

CHAPTER-5 METHODOLOGY USED

5.1 Phases of System Development Methodology


1 . Initiation Phase The initiation of a system (or project) begins when a business need or opportunity is identified. A Project Manager should be appointed to manage the project. This business need is documented in a Concept Proposal. After the Concept Proposal is approved, the System Concept Development Phase begins.

2 . System Concept Development Phase Once a business need is approved, the approaches for accomplishing the concept are reviewed for feasibility and appropriateness. The Systems Boundary Document identifies the scope of the system and requires Senior Official approval and funding before beginning the Planning Phase.

3. Planning Phase The concept is further developed to describe how the business will operate once the approved system is implemented, and to assess how the system will impact employee and customer privacy. To ensure the products and /or services provide the required capability on-time and within budget, project resources, activities, schedules, tools, and reviews are defined. Additionally, security certification and accreditation activities begin with the identification of system security requirements and the completion of a high level vulnerability assessment.

Smart Shop

11

4. Requirements Analysis Phase Functional user requirements are formally defined and delineate the requirements in terms of data, system performance, security, and maintainability requirements for the system. All requirements are defined to a level of detail sufficient for systems design to proceed. All requirements need to be measurable and testable and relate to the business need or opportunity identified in the Initiation Phase.

5. Design Phase The physical characteristics of the system are designed during this phase. The operating environment is established, major subsystems and their inputs and outputs are defined, and processes are allocated to resources. Everything requiring user input or approval must be documented and reviewed by the user. The physical characteristics of the system are specified and a detailed design is prepared. Subsystems identified during design are used to create a detailed structure of the system. Each subsystem is partitioned into one or more design units or modules. Detailed logic specifications are prepared for each software module.

6. Development Phase The detailed specifications produced during the design phase are translated into hardware, communications, and executable software. Software shall be unit tested, integrated, and retested in a systematic manner. Hardware is assembled and tested.

Smart Shop

12

7. Integration and Test Phase The various components of the system are integrated and systematically tested. The user tests the system to ensure that the functional requirements, as defined in the functional requirements document, are satisfied by the developed or modified system. Prior to installing and operating the system in a production environment, the system must undergo certification and accreditation activities.

8. Implementation Phase The system or system modifications are installed and made operational in a production environment. The phase is initiated after the system has been tested and accepted by the phase. This phase continues until the system is operating in production in accordance with the defined user requirements.

9. Operations and Maintenance Phase The system operation is ongoing. The system is monitored for continued performance in accordance with user requirements, and needed system modifications are incorporated. The operational system is periodically assessed through In-Process Reviews to determine how the system can be made more efficient and effective. Operations continue as long as the system can be effectively adapted to respond to an organizations needs. When modifications or changes are identified as necessary, the system may reenter the planning phase.

Smart Shop

13

CHAPTER-6 LIFE CYCLE OF THE PROJECT

6.1 SDLC Objectives


This guide was developed to disseminate proven practices to system developers, project managers, program/account analysts and system owners/users throughout the DOJ.

The specific objectives expected include the following:


To reduce the risk of project failure To consider system and data requirements throughout the entire life of the system To identify technical and management issues early To disclose all life cycle costs to guide business decisions To foster realistic expectations of what the systems will and will not provide To provide information to better balance programmatic, technical, management, and

cost aspects of proposed system development or modification


To encourage periodic evaluations to identify systems that are no longer effective To measure progress and status for effective corrective action To support effective resource management and budget planning To consider meeting current and future business requirements

Smart Shop

14

6.2 Key Principles of SDLC


This guidance document refines traditional information system life cycle management approaches to reflect the principles outlined in the following subsections. These are the foundations for life cycle management. Life Cycle Management Should be used to Ensure a Structured Approach to Information Systems Development, Maintenance, and Operation This SDLC describes an overall structured approach to information management. Primary emphasis is placed on the information and systems decisions to be made and the proper timing of decisions. The manual provides a flexible framework for approaching a variety of systems projects. The framework enables system developers, project managers, program/account analysts, and system owners/users to combine activities, processes, and products, as appropriate, and to select the tools and methodologies best suited to the unique needs of each project.

1. Support the use of an Integrated Product Team

The establishment of an Integrated Product Team (IPT) can aid in the success of a project. An IPT is a multidisciplinary group of people who support the Project Manager in the planning, execution, delivery and implementation of life cycle decisions for the project. The IPT is composed of qualified empowered individuals from all appropriate functional disciplines that have a stake in the success of the project. Working together in a proactive, open communication, team oriented environment can aid in building a successful project and providing decision makers with the necessary information to make the right decisions at the right time.

2. Each System Project must have a Program Sponsor

To help ensure effective planning, management, and commitment to information systems, each project must have a clearly identified program sponsor. The program sponsor serves in a leadership role, providing guidance to the project team and securing, from senior Smart Shop

15

management, the required reviews and approvals at specific points in the life cycle. An approval from senior management is required after the completion of the first seven of the SDLC phases, annually during Operations and Maintenance Phase and six-months after the Disposition Phase. Senior management approval authority may be varied based on dollar value, visibility level, congressional interests or a combination of these. The program sponsor is responsible for identifying who will be responsible for formally accepting the delivered system at the end of the Implementation Phase.

3. A Single Project Manager must be Selected for Each System Project

The Project Manager has responsibility for the success of the project and works through a project team and other supporting organization structures, such as working groups or user groups, to accomplish the objectives of the project. Regardless of organizational affiliation, the Project Manager is accountable and responsible for ensuring that project activities and decisions consider the needs of all organizations that will be affected by the system. The Project Manager develops a project charter to define and clearly identify the lines of authority between and within the agencys executive management, program sponsor, (user/customer), and developer for purposes of management and oversight.

4. A Comprehensive Project Management Plan is required for Each System Project

The project management plan is a pivotal element in the successful solution of an information management requirement. The project management plan must describe how each life cycle phase will be accomplished to suit the specific characteristics of the project. The project management plan is a vehicle for documenting the project scope, tasks, schedule, allocated resources, and interrelationships with other projects. The plan is used to provide direction to the many activities of the life cycle and must be refined and expanded throughout the life cycle.

Smart Shop

16

5. Specific Individuals must be assigned to Perform Key Roles throughout the Life Cycle

Certain roles are considered vital to a successful system project and at least one individual must be designated as responsible for each key role. Assignments may be made on a fullor part-time basis as appropriate. Key roles include program/functional management, quality assurance, security, telecommunications management, data administration, database administration, logistics, financial, systems engineering, test and evaluation, contracts management, and configuration management. For most projects, more than one individual should represent the actual or potential users of the system (that is, program staff) and should be designated by the Program Manager of the program and organization

Smart Shop

17

CHAPTER-7 LANGUAGE SPECIFICATION

7.1 PHP (Hypertext Preprocessor)


PHP is best summarized as an embedded server-side Web-scripting language that provides developers with the capability to quickly and efficiently build dynamic Web applications. PHP bears a close resemblance; both syntactically and grammatically, to the C programming language, although developers havent been shy to integrate features from a multitude of languages, including Perl, Java, and C++. Several of these valuable borrowed features include regular expression parsing, powerful array-handling capabilities, an object-oriented methodology, and vast database support. For writing applications that extend beyond the traditional, static methodology of Web page development (that is, HTML), PHP can also serve as a valuable tool for creating and managing dynamic content, embedded directly beside the likes of JavaScript, Stylesheets, WML (Wireless Markup Language) and many other useful languages. Providing hundreds of predefined functions, PHP is capable of handling just about anything a developer can dream of Extensive support is offered for graphic creation and manipulation, mathematical calculations, ecommerce, and burgeoning technologies such as Extensible Markup Language (XML), open database connectivity (ODBC),and Macromedia Shockwave. This vast range of capabilities eliminates the need for the tedious and costly integration of several third-party modules, making PHP the tool of choice for developers worldwide. One of the main strengths of PHP is the fact that because it can be embedded directly alongside HTML code, there is no need to write a program that has many commands just to output the HTML. HTML and PHP can be used interchangeably as needed, working alongside one another in unison. With PHP, we can simply do the following:

Smart Shop

18

<html> <title><? print Hello world!; ?></title> </html> And Hello world! will be displayed in the Web page title bar. Interestingly, the single line print statement is enclosed in what are commonly known as PHPs escape characters (<? ?>) is a complete program. No need for lengthy prefacing code or inclusion of libraries; the only required code is what is needed to get the job done!

7.1.1 DATA TYPES USED IN PHP

PHP supports eight primitive types. Four scalar data types: Boolean Integer Float (floating-point number, aka double) String

Two compound types: Array Object

And finally two special types: Resource NULL

This manual also introduces some pseudo-types for readability reasons: Mixed Number Callback

And the pseudo-variable $... . Some references to the type "double" may remain in the manual. Consider double the same as float; the two names exist only for historic reasons.

Smart Shop

19

The type of a variable is not usually set by the programmer; rather, it is decided at runtime by PHP depending on the context in which that variable is used.

Note: To check the type and value of an expression, use the var_dump() function. To get a human-readable representation of a type for debugging, use the gettype() function. To check for a certain type, do not use gettype(), but rather the is_type functions. Some examples:

<?php $a_bool = TRUE; // a boolean $a_str = "foo"; // a string $a_str2 = 'foo'; // a string $an_int = 12; // an integer

echo gettype($a_bool); // prints out: boolean echo gettype($a_str); // prints out: string

// If this is an integer, increment it by four if (is_int($an_int)) { $an_int += 4; }

// If $bool is a string, print it out // (does not print out anything) if (is_string($a_bool)) { echo "String: $a_bool"; } ?>

To forcibly convert a variable to a certain type, either cast the variable or use the settype() function on it. Note that a variable may be evaluated with different values in certain situations, depending on what type it is at the time.

Smart Shop

20

7.1.2 Characteristics of PHP


PHP is about providing the programmer with the necessary tools to get the job done in a quick and efficient fashion. Five important characteristics make PHPs practical nature possible: Familiarity Simplicity Efficiency Security Flexibility One final characteristic makes PHP particularly interesting: its free!

Familiarity
Programmers from many backgrounds will find themselves already accustomed to the PHP language. Many of the languages constructs are borrowed from C and Perl, and in many cases PHP code is almost indistinguishable from that found in the typical C or Pascal program. This minimizes the learning curve considerably.

Simplicity
A PHP script can consist of 10,000 lines or one line: whatever you need to get the job done. There is no need to include libraries, special compilation directives, or anything of the sort. The PHP engine simply begins executing the code after the first escape sequence (<?) and continues until it passes the closing escape sequence (?>). If the code is syntactically correct, it will be executed exactly.

Efficiency
Efficiency is an extremely important consideration for working in a multi-user environment such as the WWW. PHP 4.0 introduced resource allocation mechanisms and more pronounced support for object-oriented programming, in addition to session management features. Reference counting has also been introduced in the latest version, eliminating unnecessary memory allocation. Smart Shop

21

Security
PHP provides developers and administrators with a flexible and efficient set of security safeguards. These safeguards can be divided into two frames of reference: system level and application level.

System-Level Security Safeguards


PHP furnishes a number of security mechanisms that administrators can manipulate, providing for the maximum amount of freedom and security when PHP is properly configured. PHP can be run in what is known as safe mode, which can limit users attempts to exploit the PHP implementation in many important ways. Limits can also be placed on maximum execution time and memory usage, which if not controlled can have adverse effects on server performance. Much as with a cgi-bin folder, administrators can also place restrictions on the locations in which users can view and execute PHP scripts and use PHP scripts to view guarded server information, such as the password file. Application-Level Security Safeguards Several trusted data encryption options are supported in PHPs predefined function set. PHP is also compatible with many third-party applications, allowing for easy-integration with secure ecommerce technologies. Another advantage is that the PHP source code is not viewable through the browser because the script is completely parsed before it is sent back to the requesting user. This benefit of PHPs server-side architecture prevents the loss of creative scripts to users.

Flexibility
Because PHP is an embedded language, it is extremely flexible towards meeting the needs of the developer. Although PHP is generally touted as being used in conjunction solely with HTML, it can also be integrated alongside languages like JavaScript, WML, XML, and many others. Additionally, as with most other mainstream languages, wisely planned PHP applications can be easily expanded as needed. Browser dependency is not an issue because PHP scripts are compiled entirely on the server side before being sent to the user. In fact, PHP scripts can be sent to just about any kind of device containing a browser, including cell phones, personal digital assistant (PDA) devices, pagers, laptops, not to mention the traditional PC. People who want to develop shell-based applications

Smart Shop

22

can also execute PHP from the command line. Since PHP contains no server-specific code, users are not limited to a specific and perhaps unfamiliar Web server. Apache, Microsoft IIs, Netscape Enterprise Server, Stronghold, and Zeus are all fair game for PHP's server integration. Because of the various platforms that these servers operate on, PHP is largely platform independent, available for such platforms as UNIX, Solaris, FreeBSD, and Windows 95/98/NT. Finally, PHP offers access to external components, such as Enterprise Java Beans and Win32 COM objects.

7.2 HTML
Hypertext Markup Language (HTML) is a language for describing how pages of text, graphics, and other information are organized. Hypertext means text stored in electronic form with cross-reference links between pages. HTML pages are standard interface to the Internet. A web browser just retrieves a file and put it on the screen. It actually assembles the component parts of a page and arranges those parts according to commands hidden in the text by the author of the file. Those commands are written in the HTML. The most popular HTML compatible browsers are Internet Explorer and Netscape Navigator.

7.3 INTRODUCTION TO My SQL Server


In today's connected world, data and the systems that manage that data must always be secure yet available to our users. With MySQL , users and information technology (IT) professionals across your organization will benefit from reduced application downtime, increased scalability and performance, and tight yet flexible security controls. MySQL also includes many new and improved capabilities to help make your IT staff more productive.

My Sql Server is comprehensive operating environment that packs h power of mainframe relation database management system into users microcomputer. It provides a set of functional program that user can use as tools to build structures and perform tasks. Because applications are developed on Sql Server are completely portable to the other versions of the programmer can create a complex application in a single user, environment and then move it to a multi-user platform. Users do not have to be an expert

Smart Shop

23

to appreciate Sql Server but the better user understands the program, the more productively and creatively he can use the tools it provides.

Relational Database Management System


Sql Server the right tool Sql Server gives you High Capacity Database management tools Structure of Sql Server Database

Sql Server database can be describe at two different levels


Physical Structure Logical Structure

Physical Structure:
a) One or more data files b) Two or more log files c) One control file

Logical Structure
a) b) c) d) Table spaces Segments Extents Data Blocks

The data files contain all user data in terms of tables, index and views. The log files contain the information to open and be recovered, of undone after a transaction (Rollback).

The control file physical data, media information to open and manage data files. If the control file is damaged the server will not be able to open or use the database even if the database is undamaged.

Smart Shop

24

CHAPTER-8 Data Flow Diagram

8.1 DFD
DFD is an important tool used by system analysts. The main merit of DFD is that it can provide an over view of what data a system would process, what transformation of data are done, what files are used and where the result flows. The graphical representation of the system makes it a user and analyst. DFDs are structured in such a way that starting from a simple diagram which provides a broad overview at a glance, there can be expanded to a hierarchy of diagrams giving to more and more details. Square: -Source or destination of data (External or Internal)

As the name suggested does not fall within system boundary, hence they are defined as source or destination of data. Rounded rectangle/Circle: Process

This can be defined at place where transformation of data takes place; this transformation includes additional modification deletion or accumulation of data. Open ended rectangle/parallel lines, data store.

This symbolically represents place where data is stored the data can be stored for future procession (or) it can be processed for future return any place where data is stored is called data stored.

Smart Shop

25

Data flow can take place: 1.Between process 2.File to process 3.External entity to process 4.Process to external entity 5. Process to file

8.2 Information Flow of Data for Testing

Software Configuration

Test Results

Evaluation

Testing Error Rate Debug Data

Test Co nfiguratio n

Expected Results

Reliability Model

Co rrectio ns

Fig-8.2 Information Flow of Data Testing

Smart Shop

26

8.3 Work Flow of SmartShop

8.3.1 0 Level DFD

User

Smart Shop

Admin
Fig-8.3.1

Smart Shop

27

8.3.2 1 Level DFD

Fig-8.3.2

Smart Shop

28

8.3.3 2Level DFD

Fig-8.3.3

Smart Shop

29

CHAPTER-9 ER-Diagram

Fig-9.1

Smart Shop

30

CHAPTER-10 TABLE STUCTURE

Table Structure

Login

Order Details

Payment

Smart Shop

31

Product

Stock

User Details

Smart Shop

32

CHAPTER-11 TESTING & TECHNOLOGY

TESTING:Acceptance Testing
Testing conducted to unable a user/customer to determine whether to accept a software product. Normally perform to validate the software meets a set to agreed accepted criteria. The developed product is handed over to the user in order to test it in real time scenario. The product is validated to find out if it works according to the system specification and satisfies all the requirements. These tests are conducted by the end user/customer and may range from adhoc tests to well planned, systematic series of test. Acceptance testing may be conducted for few weeks or months. The discovered errors will be delivered to the customer.

Regression Testing
Changed software is required to be retested in order to ensure that changes work correctly and these changes, have not adversely affective other part of software. This is necessary because small change in one part of software may have sub changes, undesired effects in other seemingly unrelated parts of the software

Regression testing is the process of retesting the modified parts of the software and ensuring that no new errors have been introduced. Therefore, regression testing tests both the modified code and other parts of the programme that may be affected by the programme change.

Smart Shop

33

It serves many purposes such as:1. Increase confidence in the correctness of the modified programme. 2. Locate error in the correctness of the modified programme. 3. Preserve the quality and reliability of the software. 4. Ensure the software continued operation.

Smart Shop

34

CHAPTER-12 SYSTEM DESIGN & ANALYSIS

12.1 MODEL VIEW CANTROLLER (MVC)


MODEL It handles data processing and database works part. Model processes events sent by controller. After processing these events then it sends processed data to controller (thus, controller may reprocess it) or directly to view side.

Fig-12.1(a)

Smart Shop

35

VIEW View prepares an interface to show to the user. Controller or model tells view what to show to the user. Also view handles requests from user and informs controller.

CONTROLLER Lets say controller is like brain of the system. That is right. Because it processes every request, prepares other parts of the system like model and view. Then the system determines what to do by controllers commands.

Fig-12.1(b)

As you see above if you split your project three part like Application Development, Database and Data processing and Interface development then of course you project will be more understandable and developers can work more efficiently.

Smart Shop

36

12.1.1 BENEFITS OF MVC DESIGN


Following are the few of the benefits of MVC design pattern. Since MVC handles the multiple views using the same enterprise model it is easier to maintain, test and upgrade the multiple system. It will be easier to add new clients just by adding their views and controllers. Since the Model is completely decoupled from view it allows lot of flexibilities to design and implement the model considering reusability and modularity. This model also can be extended for further distributed application. It is possible to have development process in parallel for model, view and controller.

Smart Shop

37

12.2 MODEL USED:In this project we are using waterfall model. The waterfall model is a sequential software development process, in which progress is seen as flowing steadily downwards (like a waterfall) through the phases of Conception, Initiation, Analysis, Design, Construction, Testing and Maintenance. Waterfall approach was first Process Model to be introduced and followed widely in Software Engineering to ensure success of the project. In "The Waterfall" approach, the whole process of software development is divided into separate process phases. The phases in Waterfall model are: Requirement Specifications phase, Software Design, Implementation and Testing & Maintenance. All these phases are cascaded to each other so that second phase is started as and when defined set of goals are achieved for first phase and it is signed off, so the name "Waterfall Model". All the methods and processes undertaken in Waterfall Model are more visible.

Fig-12.2

Smart Shop

38

CHAPTER-13 The Future Contribution of the Project

The concept of e-commerce has been catching on with raging speed just like wildfire in a forest. There are stories all over the place about people becoming millionaires by selling on the net. International trade has become easier and so have the procedures and processes associated with import/export of goods and services, not to mention the innovative concept of global sourcing in order to find out the best suited price of a product or a service. But one might stop for a moment and reflect that has really ecommerce made such a difference in the phenomenon of international trade which even existed centuries before the advent of e-commerce. Of course import/export and global sourcing are some things which did not require e-commerce for their development at least in the earlier days, however indispensable this technology may have become for the current times.

Some experts are not so optimistic about the future of e-commerce and they feel that although as of now the figures may be on the rise but this will not remain so in the times to come. Of course they give different reasons for this, but whatever may be the reason the fact remains that despite the risks involved about the future of e-commerce its usage in current international trade, import/export and global sourcing is on the rise. Of course nothing can be said with guaranteed surely about any technology in the long term future be it e-commerce or any other technology, yet the immediate future certainly does seem bright for the use of e-commerce in the ever expanding phenomenon of international trade, import/export and global sourcing.

Whatever the pessimistic experts might think, the other side of the coin is quite positive and sales figures have been rising drastically over the years and certainly the scope of ecommerce in international trade, import/export and global sourcing is going to rise in the

Smart Shop

39

future times to come.

Hence it can be concluded that one should take a balanced view when considering about e-commerce any making any decisions which involved spending time or money in terms of long term investment in the arena of international trade, import/export or global sourcing using e-commerce. The era of e-commerce may not be a total bed of roses with all advantages and no drawbacks; nevertheless it is not something which can be thrown away at a moments notice. Rather the usage of e-commerce with certain keep on rising and the phenomenon of international trade would continue to benefit the trade of goods and services in form of import/export and the search of optimum products and services via global sourcing.

Smart Shop

40

CHAPTER-14 SOFTWARE REQUIRMENT SPECIFICATION

PURPOSE: The SMARTSHOP.COM Web site is the application that provides customers with online shopping. Through a Web browser, a customer can browse the catalog, place items to purchase into a virtual shopping cart, create and sign in to a user account, and purchase the shopping cart contents by placing an order with a credit card,debitcard,cash card.

USER FRIENDLINESS: This project will have user-friendly screens. The screens designed will have very simple functionality for retrieving/ adding/ updating the in information.

CONSISTENCY: The consistency in the proposed system will provide high efficiency due to smaller learning curves and increased data integrity.

COMPATIBILITY: This project offers great compatibility, as it will be designed with proper methodology, new tools and technology.

SECURITY: This project is a secured system, which will provide corporate level security. Only the authorized people will be able to access critical information. Also that will enable a user to view /edit/ add the information, based on roles and privilege assigned to that user.

Smart Shop

41

RELIABILITY & ROBUSTNESS: This project is built with proper architecture and design and it will provide a reliable and robust application to the users.

PERFORMANCE: The performance of this application will be high because of its optimize design and sound architecture.

EXTENSIBILITY: This project has a modular design and would provide the flexibility of adding, future modules to the application

FLEXIBILITY: This project has the flexibility of adding new modules when needed.

Smart Shop

42

CHAPTER-15 COST & BENEFIT ANALYSIS

A cost benefit analysis is done to determine how well, or how poorly, a planned action will turn out. Although a cost benefit analysis can be used for almost anything, it is most commonly done on financial questions. Since the cost benefit analysis relies on the addition of positive factors and the subtraction of negative ones to determine a net result, it is also known as running the numbers. A cost benefit analysis is done to determine how well, or how poorly, a planned action will turn out. Although a cost benefit analysis can be used for almost anything, it is most commonly done on financial questions. Since the cost benefit analysis relies on the addition of positive factors and the subtraction of negative ones to determine a net result, it is also known as running the numbers.

By reducing the positive and negative impacts of a project to their equivalent money value Cost-Benefit Analysis determines whether on balance the project is worthwhile. The equivalent money value are based upon information derived from consumer and producer market choices; i.e., the demand and supply schedules for the goods and services affected by the project. Care must be take to properly allow for such things as inflation. When all this has been considered a worthwhile project is one for which the discounted value of the benefits exceeds the discounted value of the costs; i.e., the net benefits are positive. This is equivalent to the benefit/cost ratio being greater than one and the internal rate of return being greater than the cost of capital.

Smart Shop

43

15.1 Principal of cost & benefit analysis


One of the problems of CBA is that the computation of many components of benefits and costs is intuitively obvious but that there are others for which intuition fails to suggest methods of measurement. Therefore some basic principles are needed as a guide.

15.2 Example of Cost & Benefit Analysis


As the Production Manager, you are proposing the purchase of a $1 Million stamping machine to increase output. Before you can present the proposal to the Vice President, you know you need some facts to support your suggestion, so you decide to run the numbers and do a cost benefit analysis. You itemize the benefits. With the new machine, you can produce 100 more units per hour. The three workers currently doing the stamping by hand can be replaced. The units will be higher quality because they will be more uniform. You are convinced these outweigh the costs. There is a cost to purchase the machine and it will consume some electricity. Any other costs would be insignificant. You calculate the selling price of the 100 additional units per hour multiplied by the number of production hours per month. Add to that two percent for the units that aren't rejected because of the quality of the machine output. You also add the monthly salaries of the three workers. That's a pretty good total benefit. Then you calculate the monthly cost of the machine, by dividing the purchase price by 12 months per year and divide that by the 10 years the machine should last. The manufacturer's specs tell you what the power consumption of the machine is and you can get power cost numbers from accounting so you figure the cost of electricity to run the machine and add the purchase cost to get a total cost figure. You subtract your total cost figure from your total benefit value and your analysis shows a healthy profit. All you have to do now is present it to the VP, right? Wrong. You've got the right idea, but you left out a lot of detail.

Smart Shop

44

CHAPTER-16 SNAPSHOTS

HOME PAGE

Fig-16.1

Smart Shop

45

BROWS CATAGORIES (NOKIA)

Fig-16.2

Smart Shop

46

BROWS CATAGORIES (BLACKBERRY)

Fig-16.3

Smart Shop

47

REGISTER PAGE

Fig-16.4

Smart Shop

48

WANNA SEE ! PAGE

Fig-16.5

Smart Shop

49

WANNA BUY ! PAGE

Fig-16.6

Smart Shop

50

PAYMENT DETAILS PAGE

Fig-16.7

Smart Shop

51

CUSTOMERS FEEDBACK PAGE

Fig-16.8

Smart Shop

52

CHAPTER-17 CODING

HOME PAGE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include("index1.php");?> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>Untitled Document</title> <link href="style.css" rel="stylesheet" type="text/css"/> </head> <body> <table width="1003" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td id="header" valign="top"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="303"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="name">SMART SHOP</td> </tr> <tr> <td class="tag">&nbsp;</td> </tr> </table></td> <td width="700" align="center" valign="top"><img src="images/mobile.jpg" alt="Mobile Smart Shop

53

Store" width="653" height="209"/></td> </tr> </table></td> </tr> <tr> <td height="1" bgcolor="#fff"></td> </tr> <tr> <td height="8" bgcolor="#F66D05"></td> </tr> <tr> <td id="links-bg"><table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="toplinks"><a href="home.php">Homepage</a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php?cat=10">New Products</a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php?cat=11">SPECIALS</a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php ?cat=18">CONTACT US </a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php?cat=12">REGISTER</a></td>

</tr> </table></td> </tr> <tr><td height="1" bgcolor="#fff"></td></tr> <tr><div class="inner_copy"><div class="inner_copy">Best selection of premium <a href="http://www.templatemonster.com/pack/joomla-1-6-templates/">Joomla 1.6 templates</a></div></div> <td valign="top"><table width="903" border="0" align="center" cellpadding="0" cellspacing="0"> <tr>

Smart Shop

54

<td width="203" valign="top" bgcolor="#ccc"> <table width="100%" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td class="cat-head">Browse Categories</td> </tr> <tr> <td height="1" bgcolor="#fff"></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=1">Nokia</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=2">Samsung</a></td> </tr>

<tr> <td class="catlinks"><a href="home.php?cat=3">Blackberry</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=4">Lava</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=5">Micromax</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=6">Sony ericsson</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=7">Panasonic</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=8">Lemon</a></td> </tr>

Smart Shop

55

<tr> <td class="catlinks"><a href="home.php?cat=9">Spice</a></td> </tr> <tr> <td class="catlinks"><a href="#" target="_blank"></a></td> </tr> <tr> <td class="catlinks"><a href="#" target="_blank"></a></td> </tr> </table> </td>

<td width="900" valign="top" bgcolor="#fff"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main-head">Featured Products</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="170" align="center"><?php if(@$_REQUEST['cat']==1) { include("nokia.php"); } if(@$_REQUEST['cat']==2) { include("Samsung.php"); } if(@$_REQUEST['cat']==3) { include("Blackberry.php"); }if(@$_REQUEST['cat']==4)

Smart Shop

56

{ include("Lava.php"); }if(@$_REQUEST['cat']==5) { include("Micromax.php"); }if(@$_REQUEST['cat']==6) { include("Sony ericsson.php"); }if(@$_REQUEST['cat']==7) { include("Panasonic.php"); }if(@$_REQUEST['cat']==8) { include("Lemon.php"); } if(@$_REQUEST['cat']==9) { include("Spice.php"); } if(@$_REQUEST['cat']==10) { include("New products.php"); } if(@$_REQUEST['cat']==11) { include("Specials.php"); } if(@$_REQUEST['cat']==12) { include("Register.php"); } if(@$_REQUEST['cat']==13) {

Smart Shop

57

include("Welcome.php"); } if(@$_REQUEST['cat']==14) { include("login.php"); } if(@$_REQUEST['cat']==15) { include("viewind.php"); } //if($_REQUEST['cat']==16) //{ //include("order.php"); //} if(@$_REQUEST['cat']==17) { include("subord.php"); } if(@$_REQUEST['cat']==18) { include("contact.php"); } if(@!$_REQUEST['cat']) { include("Specials.php"); } ?>&nbsp;</td> </tr> </table></td> <td width="1" valign="top" bgcolor="#E0E0E0"></td> <td valign="top">&nbsp;</td> </tr> <tr>

Smart Shop

58

<td height="1" colspan="3" bgcolor="#E0E0E0"></td> </tr> </table></td> </tr> <tr>

</tr> <tr> <td id="main"><p> </p> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="8" bgcolor="#F66D05"></td> </tr> <tr> <td height="40" bgcolor="#343434"> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="bottomlinks"><a href="home.php">Homepage</a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=10">NEW PRODUCTS </a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=11">SPECIALS</a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=18">Conatct US </a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=12">Register</a></td> </tr>

Smart Shop

59

</table> </td> </tr> <tr> <td> <div id="footer"> <div class="fleft">&copy;SMART SHOP</div> <div class="fright"></div> <div class="fcenter"></div> </div> </td> </tr> </table> </body> </html>

Smart Shop

60

INDEX PAGE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include("index1.php");?> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>Untitled Document</title> <link href="style.css" rel="stylesheet" type="text/css"/> </head> <body> <table width="1003" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td id="header" valign="top"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="303"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="name">SMART SHOP</td> </tr> <tr> <td class="tag">&nbsp;</td> </tr> </table></td> <td width="700" align="center" valign="top"><img src="images/mobile.jpg" alt="Mobile Store" width="653" height="209"/></td> </tr> </table></td> </tr> <tr> <td height="1" bgcolor="#fff"></td> </tr> Smart Shop

61

<tr> <td height="8" bgcolor="#F66D05"></td> </tr> <tr> <td id="links-bg"><table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="toplinks"><a href="home.php">Homepage</a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php?cat=10">New Products</a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php?cat=11">SPECIALS</a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php ?cat=18">CONTACT US </a></td> <td class="sap">|</td> <td class="toplinks"><a href="home.php?cat=12">REGISTER</a></td>

</tr> </table></td> </tr> <tr><td height="1" bgcolor="#fff"></td></tr> <tr><div class="inner_copy"><div class="inner_copy">Best selection of premium <a href="http://www.templatemonster.com/pack/joomla-1-6-templates/">Joomla 1.6 templates</a></div></div> <td valign="top"><table width="903" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="203" valign="top" bgcolor="#ccc"> <table width="100%" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td class="cat-head">Browse Categories</td> </tr> <tr> <td height="1" bgcolor="#fff"></td>

Smart Shop

62

</tr> <tr> <td class="catlinks"><a href="home.php?cat=1">Nokia</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=2">Samsung</a></td> </tr>

<tr> <td class="catlinks"><a href="home.php?cat=3">Blackberry</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=4">Lava</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=5">Micromax</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=6">Sony ericsson</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=7">Panasonic</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=8">Lemon</a></td> </tr> <tr> <td class="catlinks"><a href="home.php?cat=9">Spice</a></td> </tr> <tr> <td class="catlinks"><a href="#" target="_blank"></a></td> </tr> <tr>

Smart Shop

63

<td class="catlinks"><a href="#" target="_blank"></a></td> </tr> </table> </td>

<td width="900" valign="top" bgcolor="#fff"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main-head">Featured Products</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="170" align="center"><?php if(@$_REQUEST['cat']==1) { include("nokia.php"); } if(@$_REQUEST['cat']==2) { include("Samsung.php"); } if(@$_REQUEST['cat']==3) { include("Blackberry.php"); }if(@$_REQUEST['cat']==4) { include("Lava.php"); }if(@$_REQUEST['cat']==5) { include("Micromax.php"); }if(@$_REQUEST['cat']==6) {

Smart Shop

64

include("Sony ericsson.php"); }if(@$_REQUEST['cat']==7) { include("Panasonic.php"); }if(@$_REQUEST['cat']==8) { include("Lemon.php"); } if(@$_REQUEST['cat']==9) { include("Spice.php"); } if(@$_REQUEST['cat']==10) { include("New products.php"); } if(@$_REQUEST['cat']==11) { include("Specials.php"); } if(@$_REQUEST['cat']==12) { include("Register.php"); } if(@$_REQUEST['cat']==13) { include("Welcome.php"); } if(@$_REQUEST['cat']==14) { include("login.php"); } if(@$_REQUEST['cat']==15)

Smart Shop

65

{ include("viewind.php"); } //if($_REQUEST['cat']==16) //{ //include("order.php"); //} if(@$_REQUEST['cat']==17) { include("subord.php"); } if(@$_REQUEST['cat']==18) { include("contact.php"); } if(@!$_REQUEST['cat']) { include("Specials.php"); } ?>&nbsp;</td> </tr> </table></td> <td width="1" valign="top" bgcolor="#E0E0E0"></td> <td valign="top">&nbsp;</td> </tr> <tr> <td height="1" colspan="3" bgcolor="#E0E0E0"></td> </tr> </table></td> </tr> <tr>

</tr>

Smart Shop

66

<tr> <td id="main"><p> </p> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="8" bgcolor="#F66D05"></td> </tr> <tr> <td height="40" bgcolor="#343434"> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="bottomlinks"><a href="home.php">Homepage</a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=10">NEW PRODUCTS </a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=11">SPECIALS</a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=18">Conatct US </a></td> <td class="sap2">|</td> <td class="bottomlinks"><a href="home.php?cat=12">Register</a></td> </tr> </table> </td> </tr> <tr> <td> <div id="footer"> <div class="fleft">&copy;SMART SHOP</div>

Smart Shop

67

<div class="fright"></div> <div class="fcenter"></div> </div> </td> </tr> </table> </body> </html>

Smart Shop

68

REGISTER PAGE

<?php include("confg.php"); $as=@$_REQUEST['ob']; echo $as; $title=@$_REQUEST['sel1']; $fname=@$_REQUEST['t1']; $lname=@$_REQUEST['t2']; $gen=@$_REQUEST['r1']; $id=@$_REQUEST['t3']; $pass=@$_REQUEST['t4']; $phone=@$_REQUEST['t5']; $add=@$_REQUEST['t6']; $city=@$_REQUEST['t7']; $coun=@$_REQUEST['t8']; $dob=@$_REQUEST['t9']; if(@$_REQUEST['sub']) { $sel=mysql_query("select id from reg where id='$id' "); $arr=mysql_fetch_array($sel);

if($arr['id']!=$id) { if(mysql_query("insert into reg values('$fname','$lname','$id','$pass','$phone','$add','$dob','$coun','$city','$gen','$title')")) { echo "<script>location.href='home.php?cat=13 & ob=$as & wel=$id'</script>";

} } else

Smart Shop

69

{ echo "user already exists"; }

} ?> <html> <head> <script> function fnam() { var fnam=/^[a-zA-Z]{4,15}$/; if(document.f1.t1.value.search(fnam)==-1) { alert("enter correct first name"); document.f1.t1.focus(); return false; } }

function lnam() { var lnam=/^[a-zA-Z]{4,15}$/; if(document.f1.t2.value.search(lnam)==-1) { alert("enter correct last name"); document.f1.t2.focus(); return false; } }

function email() {

Smart Shop

70

var email=/^[a-zA-Z0-9-_\.]+@[a-zA-Z]+\.[a-zA-Z]{2,3}$/; if(document.f1.t3.value.search(email)==-1) { alert("enter correct email"); document.f1.t3.focus(); return false; } }

function pass() { var pass=/^[a-zA-Z0-9-_]{6,16}$/; if(document.f1.p1.value.search(pass)==-1) { alert("enter correct pass"); document.f1.p1.focus(); return false; } } function phone() { var phn=/^[0-9]{9,14}$/; if(document.f1.t5.value.search(phn)==-1) { alert("enter correct phone no"); document.f1.t5.focus(); return false; } }

function add() { var add=/^[a-zA-Z0-9 ]{10,150}$/;

Smart Shop

71

if(document.f1.t6.value.search(add)==-1) { alert("enter correct address"); document.f1.t6.focus(); return false; } }

function city() { var city=/^[a-zA-Z]{5,30}$/; if(document.f1.t7.value.search(city)==-1) { alert("enter correct city"); document.f1.t7.focus(); return false; }

} function coun() { var city=/^[a-zA-Z]{5,30}$/; if(document.f1.t8.value.search(city)==-1) { alert("enter correct country"); document.f1.t8.focus(); return false; }

function vali() {

Smart Shop

72

var nam=/^[a-zA-Z]{4,15}$/; var email=/^[a-zA-Z0-9-_\.]+@[a-zA-Z]+\.[a-zA-Z]{2,3}$/; var pass=/^[a-zA-Z0-9-_]{6,16}$/; var phn=/^[0-9]{9,14}$/; var add=/^[a-zA-Z0-9 ]{10,150}$/; var city=/^[a-zA-Z]{5,30}$/;

if(document.f1.t1.value.search(nam)==-1) { alert("enter correct first name"); document.f1.t1.focus(); return false; }

else if(document.f1.t2.value.search(nam)==-1) { alert("enter correct last name"); document.f1.t2.focus(); return false; }

else if(document.f1.t3.value.search(email)==-1) { alert("enter correct login name"); document.f1.t3.focus(); return false; }

else if(document.f1.p1.value.search(pass)==-1) { alert("enter correct pass");

Smart Shop

73

document.f1.p1.focus(); return false; }

else if(document.f1.t5.value.search(phn)==-1) { alert("enter correct phone no"); document.f1.t5.focus(); return false; }

else if(document.f1.t6.value.search(add)==-1) { alert("enter correct address"); document.f1.t6.focus(); return false; }

else if(document.f1.t7.value.search(city)==-1) { alert("enter correct city"); document.f1.t7.focus(); return false; }

else if(document.f1.t8.value.search(city)==-1) { alert("enter correct country");

Smart Shop

74

document.f1.t8.focus(); return false; }

else { return true; } }

</script> </head> <body> <form method="post" name="f1" onSubmit="return vali()"> <table width="420" border="25" align="center" bordercolor="#B7CF1A"> <tr> <td><div align="center"><strong><font size="+1" face="Comic Sans MS">Title:</font></strong></div></td> <td><label> <select name="sel1" id="sel1"> <option value="Mr.">Mr.</option> <option value="Ms.">Ms.</option> <option value="Mrs.">Mrs.</option> </select> </label></td> </tr> <tr> <td width="164"><div align="center"><font size="+1" face="Comic Sans MS"><b> First&nbsp;Name:</b></font></div></td> <td width="192">

<input name="t1" type="text" id="t1" onChange="return fnam()"> </td>

Smart Shop

75

</tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><strong>Last name:</strong></font></div></td> <td><input name="t2" type="text" id="t2" onChange="return lnam()" ></td> </tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><b>&nbsp;Gender:</b> </font></div></td> <td><input name="r1" type="radio" value="male"> <strong>Male</strong> <input name="r1" type="radio" value="female"> <strong>Female</strong></td> </tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><b>&nbsp;Enter Email : </b></font></div></td> <td><input name="t3" type="text" id="t3" onChange="return email()"></td> </tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><b>&nbsp;Choose a Password:</b> </font></div></td> <td><input name="t4" type="text" id="t4" onChange="return pass()"></td> </tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><b>Phone no: </b></font></div></td> <td><input name="t5" type="text" id="t5" onChange="return phone()"></td> </tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><strong>Address:</strong></font></div></td> <td><label> <textarea name="t6" id="t6" value="return add()"></textarea>

Smart Shop

76

</label></td> </tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><strong>City:</strong></font></div></td> <td><input name="t7" type="text" id="t7" onChange="return city()"></td> </tr> <tr> <td><div align="center"><font size="+1" face="Comic Sans MS"><strong>Country:</strong></font></div></td> <td><input name="t8" type="text" id="t8" onChange="return coun()"></td> </tr> <tr> <td><div align="center"><strong><font size="+1" face="Comic Sans MS">Date of Birth: </font></strong></div></td> <td><label> <input name="t9" type="text" id="t9"> </label></td> </tr> <tr> <td colspan="2"><label><br> <center> <input name="sub" type="submit" id="sub" value="Create my Account"> </center> </label></td> </tr>

</table> </form> </fieldset> </div> </center>

Smart Shop

77

</div>

</body> </html>

Smart Shop

78

WELCOME PAGE

<html> <head> <body> <table width="100%" align="center" height="100%" border="00" cellspacing="00" cellpadding="00"> <br> <br> <br> <br> <br> <p align="center">Welcome user you are successfully registered ....</p> <p align="center">your email id is: <?php echo $_REQUEST['wel'];?></p> </table> </body> </html>

Smart Shop

79

LOGIN PAGE

<?php include("confg.php"); $as=@$_REQUEST['v1']; if(@$_REQUEST['submit']) { $id=@$_REQUEST['t1']; $pass=@$_REQUEST['t2']; include("confg.php"); $sel=mysql_query("select * from reg where id='$id'"); $arr=mysql_fetch_array($sel); if(($arr['id']==$id) and( $arr['pass']==$pass)) { echo "<script> location.href='order.php? ob=$as &id=$id '</script>"; if($_REQUEST['c1']) { setcookie("id","$id",time()+3600); setcookie("pass","$pass",time()+3600); } } else { $er="user does not exists"; } }

?> <html> <head> <script> function cook()

Smart Shop

80

{ if("<?php echo $_COOKIE['id'];?>"!=null) { if(document.f1.t1.value=="<?php echo $_COOKIE['id'];?>") { document.f1.t2.value="<?php echo $_COOKIE['pass'];?>"; } else { document.f1.t2.value=""; } } }

</script> <script> function vali() { /*var em=/^[a-zA-Z0-9-_\.]+@[a-zA-Z]+\.[a-zA-Z]{2,3}$/; var pass=/^[a-zA-Z0-9-_]{8,16}$/; if(document.f1.t1.value.search(em)==-1) { alert("enter coreect id"); document.f1.t1.focus(); return false; } else if(document.f1.t2.value.search(pass)==-1) { alert("enter coreect pass"); document.f1.t2.focus(); return false; } else

Smart Shop

81

{ return true; }*/ } </script> <body> <form name="f1" method="post" onSubmit="return vali()" enctype="multipart/form-data"> <table width="320" height="255" border="25" align="center" cellpadding="00" cellspacing="00" bordercolor="#B7CF1A"> <tr> <td width="74" height="42"><strong>Email -id </strong></td> <td width="145"><input type="text" name="t1" onBlur="cook()"></td> </tr> <tr> <td height="35"><strong>Password</strong></td> <td><input name="t2" type="password" ></td> </tr> <tr> <td height="46" colspan="2"><input name="c1" type="checkbox" id="c1" value="checkbox" > <strong> Remember me </strong></td> </tr> <tr> <td><input name="submit" type="submit" id="submit" value="Sign in" ></td> <td><div align="center"><strong><a href="home.php?cat=12 ">Sign up </a></strong></div></td> </tr> <tr> <td height="41" colspan="2"> <font color='red'><?php echo @$er?> </font>&nbsp;</td> </tr> <tr> <td height="67" colspan="2"><strong>Forgot your password? </strong></td> </tr>

Smart Shop

82

</table> </form> </body> </html>

Smart Shop

83

CONTACT PAGE

<?php include("confg.php"); $nam=@$_REQUEST['t1']; $mob=@$_REQUEST['t2']; $add=@$_REQUEST['t3']; $sub=@$_REQUEST['t4']; $msg=@$_REQUEST['t5']; if(@$_REQUEST['Send']) { mysql_query("insert into fed values('$nam','$mob','$add','$sub','$msg')"); echo "ur message has been sent"; } ?> <html> <head> <script> function vali() { var nam=/^[a-zA-Z]{4,15}$/; var phn=/^[0-9]{9,14}$/; var add=/^[a-zA-Z0-9 ]{10,150}$/;

if(document.f1.t1.value.search(nam)==-1) { alert("enter correct name"); document.f1.t1.focus(); return false; }

else if(document.f1.t2.value.search(phn)==-1)

Smart Shop

84

{ alert("enter correct phone number"); document.f1.t2.focus(); return false; }

else if(document.f1.t3.value.search(add)==-1) { alert("enter correct address"); document.f1.t3.focus(); return false; }

else if(document.f1.t4.value.search(nam)==-1) { alert("enter correct subject"); document.f1.t4.focus(); return false; }

else if(document.f1.t5.value.search(nam)==-1) { alert("enter correct message"); document.f1.t5.focus(); return false; }

else {

Smart Shop

85

return true; } }

</script>

</head> <body> <form method="post" name="f1" onSubmit="return vali();"> <table width="100%" border="00" cellspacing="00" cellpadding="00" align="center" > <tr> <td colspan="2"><center><b>This website is designed to let you purchase your own choice handsets on a single click..... </b></center></td> </tr> <tr> <td colspan="2"><center> <p>&nbsp;</p> <p><b>For any further inquiries you can contact us ..... <br/>Email address: smartshop@gmail.com<br> Conatct number: 7417651441 <br> Address: IFTM UNIVERSITY,<br>MORADABAD <br> </b></p> <p>&nbsp;</p> </center></td> </tr> <tr> <td colspan="2"><center><b>Send us your feedback and any queries here...</b></center> </td> </tr> <tr> <td colspan="2"><table width="225" border="25" cellspacing="00" cellpadding="00" bordercolor="b7cf1a"align="center">

Smart Shop

86

<tr> <td height="37">Name</td> <td><input name="t1" type="text" id="t1"></td> </tr> <tr> <td>Mobile no </td> <td><input name="t2" type="text" id="t2"></td> </tr> <tr> <td height="31">Address</td> <td><input name="t3" type="text" id="t3"></td> </tr> <tr> <td height="27">Sub</td> <td><input name="t4" type="text" id="t4"></td> </tr> <tr> <td height="38">Message</td> <td><input name="t5" type="text" id="t5"></td> </tr> <tr> <td colspan="2" align="center"><input name="Send" type="submit" id="Send" value="Send"></td> </tr> </table></td> </tr>

<tr> <td colspan="2"> <p><center><b>Thanks for visiting our website</b> </center></p></td> </tr> <tr> <td>&nbsp;</td>

Smart Shop

87

<td>&nbsp;</td> </tr> </table> </form> </body> </html>

Smart Shop

88

CHAPTER-18 CONCLUSION

Website is a revolutionary idea with a very bright future with further scope for advancements. The opportunities provided from this medium are immense and many organizations are making use of this medium to better their practices. Organizations are no longer at the mercy of the media to advertise or convey their message. With the help of social networking they can advertise or communicate in a more efficient way.

For example, Starbucks have started a very successful program in which a person from any part of the world can login to a website to write comments and discuss issues. Similarly people dont have to rely on newspapers or TV to get their daily dose of news it can all be obtained from a social networking site. People can follow or get information from any part of the world. For example Twitter allows a user to follow anything from airline timing to the next breaking news from China. It is even used by politicians to get their message across.

The world is getting closer everyday and everyone wants to be connected. Static blogs and websites are losing popularity. World is moving more towards "information streams". The information comes to users rather than users have to make effort to get the information. The social networks can be extended to other media The future of social networking looks very promising but still it has to deal with the problems associated with it.

Smart Shop

89

REFERENCES

Book referencing: 1. PHP a beginners guide. 2. Software Engineering referencing KK Agarwal for SRS preparation 3. DBMS referencing Kourth for Database formation

Faculty referencing: 1. Sanjeev Bhardwaj Asst. Prof. IT Dept. 2. Naveen Prakash Asst. Prof. IT Dept.

Website Refrencing: 1. www.w3schools.com/php/ 2. w3schools.in/php-mysql.php 3. www.php.net/

Smart Shop

90

Das könnte Ihnen auch gefallen