Online jewlry shop management

109
A Project on Date of Submission: 12 th January, 2013 Developed by: Supervised By: Mohammed Asiqur Rahman Lecturer of IIUC, Dept. of CSE Mohammad MarufChy Matric No:C091031 Email: Mohammad Anik Islam Matric No:C091012 Email: Mohammad ForhadSikder Matric No:C091004

Transcript of Online jewlry shop management

A Project on

Date of Submission: 12th January, 2013

Developed by:

1

Supervised By:

Mohammed Asiqur Rahman

Lecturer of IIUC, Dept. of CSE

Mohammad MarufChyMatric No:C091031Email: [email protected]

Mohammad Anik IslamMatric No:C091012Email: [email protected]

Mohammad ForhadSikder

Matric No:C091004

RECOMANDATION

This is certified that Md. MarufChy(C091031), Md. Anik

Islam(C091012) and Md. ForhadSikder (C091004) students

of International Islamic University Chittagong under

the department of Computer Science & Engineering, had

carried out the project on “Online Jewellery Shopping

Management System (JSMS)” successfully under our

supervision.

2

Signature of Supervisor

…………………………………………

(Mohammed Asiqur Rahman)

Lecturer of IIUC, Dept. of CSE

Signature of Convener, ThesisCommittee

…………………………………………

(Mohammed Mahadi Hassan)

Associate Professor, Dept. of

DECLARATION

We hereby declare that the work have been done by our

self under the supervision of Mohammed Asiqur Rahman,

Lecturer, Department of Computer Science & Engineering, International

Islamic University Chittagong. No portion of the work contained

in this thesis has been submitted in support of any

application for any other degree or qualification of

this or any other university or institute of learning.

Signature of students

3

4

……………………………..

(Mohammad MarufChy)

……………………………..

(Mohammad Anik Islam)

……………………………..

(Mohammad ForhadSikder)

DEDICATION

5

THIS PROJECT IS DEDICATED

TO OUR PARENT

&

TO ALL OF OUR FRIENDS

ACKNOWLEDGEMENT

A work is never a work of an individual. We owe a sense of

gratitude to the intelligence and co-operation of those people

who had been so easy to let us understand what we needed from

time to time for completion of this exclusive project.

At first we would like to heartiest thank to our almighty ALLAH

(SWT) who help us to develop our project.

We want to express our gratitude towards to our project

supervisor Mr. Md. Asiqur Rahman who provided us his valuable time

and inspiration needed to detail out of this project.

We would like to thank our teacher Mr. Md. Mahmudur Rahman who

gives his intellectual suggestions.

We also would like to thank Mr. Md. Mahadi Hassan and Mr. Md. Arif

Hasnayeen for giving us an opportunity to do this project.

We also grateful to all of our respective teachers of our

University for their advice and co-operation, who are directly

and indirectly help us to stay committed for the project.

And the special thanks to our classmates and lab attendants who

have contributed greatly to the success of this project.

Md. MarufChy

6

Md. Anik Islam

Md. ForhadSikder

7

ABSTRACT

This document fully and formally describes the

requirements of the proposed said project system. It

sets out the functional and non-functional requirements

and includes a description of Feasibility Study and all

specification with its all diagram and database table.

All modules for Online Jewellery Shop Management System

which is called JSMS are described in this paper.

8

INDEX

List of Contents Page no

Title PageRECOMANDATION ii

DECLARATION iii

DEDICATION iv

ACKNOWLEDGEMENT v

ABSTRACT vi

CHAPTER 1INTRODUCTION

1.1 Benefit of this Project1213

CHAPTER 2E-Commerce

2.1 Online Shopping2.2 Existing System2.3 Popular online retailing

corporations2.4 Online Shopping website in

Bangladesh

1414141415

CHAPTER 3METHODOLOGY

3.1 Necessity of Methodology3.2 Software Development Life Cycle

(SDLC)

161616

CHAPTER 4PROJECT REQUEST 18

CHAPTER 5FEASIBILITY STUDY 19

9

5.1 Economic Feasibility5.2 Technical Feasibility5.3 Operational Feasibility5.4 Schedule Feasibility5.5 Feasibility Study Output

5.5.1 Objectives/Goals of the System5.6 Objects list of JSMS5.7 Process Name of JSMS5.8 Process Related object name of JSMS5.9 Event and their related Process

19191919202020212121

CHAPTER 6REQUIREMENTS DEFINITION

6.1 User List of JSMS6.2 Functional Requirements of JSMS6.3 Interface Requirements of JSMS6.4 Fact gathering forms

6.4.1 Environmental characteristics6.4.2 Behavioral Characteristics6.4.3 Solution Characteristics

2323242425252729

CHAPTER 7SYSTEM SPECIFICATION

7.1 Functional Description7.1.1 Admin Panel7.1.2 User Panel

30303031

CHAPTER 8SYSTEM DESIGN

8.1 Flow Chart8.2 Use Case diagram

323233

10

8.3 Activity Diagram8.4 Sequence Diagram8.5 Database Design

8.5.1 E-R Diagram8.6 Data Flow Diagram (DFD)8.7 Structured Chart

373943444555

CHAPTER 9PROGRAM DESIGN

9.1 Implemented software9.2 Logical Schema9.3 Table of JSMS

56565859

CHAPTER 10TESTING

10.1 Software Testing Types6464

CHAPTER 11IMPLEMENTATION AND MAINTENANCE

11.1 User Panel11.2 Admin Panel

656569

CHAPTER 12SECURITY 12.1 Different security mechanism 73

CHAPTER 13CONCLUSION

13.1 Limitations13.2 Future Plans13.3 Conclusion

74747475

Reference 76

11

Appendix A 77

Appendix B 81

List of Figures

Buying product for online customer in JSMS Fig 1.1

Software Development Life Cycle for JSMS Fig 3.1Flow chart buying product by user Fig 8.1Flow chart for admin Fig 8.2

Use case diagram for General Customer Fig 8.3Use case diagram for Register Customer Fig 8.4Use case diagram for Admin Fig 8.5Activity diagram for Admin Fig 8.6Activity diagram for Register Customer Fig 8.7Sequence Diagram for Admin Fig 8.8Sequence Diagram for Register Customer Fig 8.9ERD for JSMS Fig 8.10DFD Level 0 for JSMS Fig 8.11DFD Level 1 for Admin Fig 8.12DFD Level 1 for Customer Fig 8.13DFD Level 2- Admin process 1.1(Add loancustomer)

Fig 8.14

DFD Level 2- Admin process 1.2(ShopConfigure)

Fig 8.15

DFD Level 2- Admin process 1.3(Expense

Category)

Fig 8.16

DFD Level 2- Admin process 1.4(Expense

Info)

Fig 8.17

DFD Level 2- Admin process 1.5(Product Fig 8.18

12

category)DFD Level 2- Admin process 1.6(Product

info)

Fig 8.18

DFD Level 2- Admin process 1.6(Product

info)

Fig 8.19

DFD Level 2- Admin process 1.7(Order info) Fig 8.20DFD Level 2- Customer process

1.1(Register)

Fig 8.21

DFD Level 2- Customer process 1.3(Profile) Fig 8.22DFD Level 2- Customer process 1.6(Cart) Fig 8.23DFD Level 2- Customer process 1.7(Shipping

Details)

Fig 8.24

Structured chart for JSMS Fig 8.25

13

List of Tables

Process related event for JSMS Table 5.1Minimum System Requirement table Table 6.1Platform and Tools table Table 6.2Stakeholders recording schedule table Table 6.3Problem requirements list Table 6.4object inventory list Table 6.5process list Table 6.6event list Table 6.7Information generation requirements Table 6.8System function outline recording schedule Table 6.9Table of Admin_info Table 9.1Table of Cart_info Table 9.2Table of Customer_info Table 9.3Table of Expense_cat Table 9.4Table of Expense_info Table 9.5Table of Product_cat Table 9.6Table of Product_info Table 9.7Table of Order_info Table 9.8Table of shop_config Table 9.9

14

CHAPTER 1

INTRODUCTION

The existing system of buying goods has several disadvantages. Itrequires lots of time to travel to the particular shop to buy thegoods. Also there are expenses for travelling from house to shop.More over the shop from where we would like to buy something maynot be open. Hence we have to adjust our time with theshopkeeper’s time or vendor’s time.

In order to overcome these, we have e-commerce solution, i.e oneplace where we can get all required goods/products online. Theproposed system helps in building a website to buy, sell productsor goods online using internet connection. Purchasing of goodsonline, user can choose different products based on categories,online payments, hence covering the disadvantages of the existingsystem and making the buying easier and helping the vendors toreach wider market. Using these websites, we can buy goods orproducts online just by visiting the website and ordering theitem online by making payments online. And also shopkeeper canmanage his inventory.

15

1.1 Benefits of this System

The proposed system has several benefits which has given below:

In this JSMS provides an user friendly environment where ashopkeeper can manage his loan customer information andmanage his jewellery product.

Provides accurate level of security so that transactions canbe made confidentially.

A customer can view the complete specification of theproduct along with various images so they can visualize andcompare the products properly.

Add To Shopping Cart feature which would allow the customerto add a product to or remove a product from the shopping

16

Fig 1.1: Buying product for online customer in JSMS

cart by dragging the product in to the shopping cart or outof the shopping cart.

Customers can search for products, view a completedescription of the products and order the products.

Reduce paper works and time.

17

CHAPTER 2

E-Commerce

Electronic commerce commonly known as e-commerce, is the buying and selling of product or service over electronic systems such asthe Internet and other computer networks.

2.1 Online Shopping

Online shopping is a form of electronic commerce allowing consumers to directly buy goods or services from a seller over the Internet without an intermediary service. An online shop, e-shop, e-store, Internet shop, web-shop, web-store, online store, or virtual store evokes the physical analogy of buying products or services at a shopping center. The process is called business-to-consumer (B2C) online shopping. When a business buys from another business it is called business-to-business (B2B) online shopping. 2.2 Existing System

Presently there are only few sites offering online sales specifically in Bangladesh. In Bangladesh online sales is not much popular and all types of products are not available on internet present. Most of the jewellery shop sell their product and manage their inventory in manual way they need paperwork.

2.3 Popular online retailing corporations

The largest online retailing corporations are E-Bay and Amazon.com, both of which are based in the US.

2.3.1 E-Bay

eBay Inc. is an American multinational internet consumer-to-consumer corporation that manages eBay.com, an online auction and

18

shopping website in which people and businesses buy and sell a broad variety of goods and services worldwide. Founded in 1995, eBay is one of the notable success stories of the dot-com bubble,it is now a multi-billion dollar business with operations localized in over thirty countries.

2.3.2 Amazon.com

Amazon.com, Inc. is an American multinational electronic commercecompany with headquarters in Seattle, Washington, United States. It is the world's largest online retailer. The company also produces consumer electronics—notably the Amazon Kindle e-book reader and the Kindle Fire tablet computer—and is a major provider of cloud computing services.Amazon has separate retail websites for the following countries: United States, Canada, United Kingdom, France, Germany, Austria, Italy, Spain, Brazil, Japan, and China, with international shipping to certain other countries for some of its products.

2.4 Online Shopping website in Bangladesh

In Bangladesh there are several website for buying goods orproducts in online. Some of them are:

Clickbd.com

muktobazaar.com etc.

2.4.1 clickbd.com

ClickBD.com started its operations in April 14, 2005 as the firste-commerce portal in Bangladesh. ClickBD is an online marketplacewhere anyone can sell or buy almost anything. The site has astrong and growing community of users who trade in a wide rangeof item categories including Electronics, Cameras, Phones,Computers, CDs, Mobiles, Fashion Accessories, Music, and Travel.Through a world-class technology infrastructure ClickBD enables &simplifies e-commerce for Bangladesh's ever expanding onlinecommunity.

19

2.4.2 muktobazaar.com

This is another website for selling Bangladeshi product inonline. Which spread over in Bangladesh with the increase of E-commerce.

CHAPTER 3

METHODOLOGY

Methodology is a set of practices. This term may be used to refer

to practices which are widely used across an industry or

scientific discipline, the techniques used in a particular

research study, or the techniques used to accomplish a particular

project. People may also use the term “methodology” to refer to

the study of such methods, rather than the methods themselves.

20

A methodology can be considered to include multiple methods, each

as applied to various facets of the whole scope of the

methodology. The research can be divided between two parts, they

are qualitative research and quantitative research.

3.1 Necessity of Methodology

The Project Management Methodology enables the delivery

organization to tackle these projects comprehensively,

systematically, and in an integrated manner for acceptable risk.

Because of this, it provides benefits at the strategic, tactical

and operational levels. In writing about our project when we have

completed the project we need an explanation of our methodology

so that others can understand the significance of what we have

done and make sense of how it all worked. The methodology piece

says why we did what we did. It also enables us to write about

what we did not do and why, and about the weaknesses or

limitations of our project as well as its strengths. Every

research or project has a limitation of some sort and it is

perfectly acceptable to identify the weaknesses of our own study.

3.2 Software Development Life Cycle (SDLC)

Software Development Life Cycle (SDLC) gives us an overview and

guidelines to develop best quality software. Whenever SDLC is

employed, the goal is to create a system that meets the primary

owner’s expectations. For “Jewellery Shop Management System

21

(JSMS)”, we follow Software Development Life Cycle to make our

software reliable for the user.

22

Fig 3.1:Software Development Life Cycle for JSMS

CHAPTER 4

PROJECT REQUEST

In day to day life, we will need to buy lots of goods or productsfrom a shop. It may be food items, electronic items, house holditems etc. Now a day, it is really hard to get some time to goout and get them by ourselves due to busy life style or lots ofworks.

Internet is attracting all type people day by day. As it getspopularity there are many sites offering products online. Peoplehave the choice to buy the product online. But all the businesssegment people can’t able to sell the product online because thetechnology problem. In Bangladesh sell or buy jewellery productin online is not common. Most of the jewellery shop sell theirproduct and manage their inventory in manual way. Here we made anattempt to provide a generalized program where people can buyjewellery product in online and jewellery shop can manage theirproduct and manage their loan customer through our system.

Three types of customer use our system, loan customer who have nodirect access to the system. There are two types of onlinecustomer register customer and general customer. An administratoris required who can add loan customer, add, update and deleteproducts. Who have total access through the system.

23

CHAPTER 5

FEASIBILITY STUDY

Feasibility studies aim to objectively and rationally uncover the

strengths and weaknesses of the existing business or proposed

venture, opportunities and threats as presented by the

environment, the resources required to carry through, and

ultimately the prospects for success.

The five areas of feasibility - Economic, Technical, Legal,

Operational and Scheduling.

5.1 Economic Feasibility

It is the study of economical benefits of this software. More

commonly known as cost/benefit analysis, the procedure is to

24

determine the benefits and savings that are expected from a

candidate system and compare them with costs. If benefits

outweigh costs, then the decision is made to design and implement

the system. An entrepreneur must accurately weigh the cost versus

benefits before taking an action. These website save our money

and time. By this website we can buy jewellery product in online.

Today everybody is busy, so time saving is another important

thing of our life.

5.2 Technical Feasibility

Technical feasibility determines whether the work for the project

can be done with the existing equipment, software technology and

available personnel. Technical feasibility is concerned with

specifying equipment and software that will satisfy the user

requirement.

The proposed system can run on any machines supporting Windows

and Internet services and works on the best software and hardware

that had been used while designing the system so it would be

feasible in all technical terms of feasibility.

5.3 Operational Feasibility

Operational feasibility is a measure of how well a proposed

system solves the problems, and takes advantage of the

opportunities identified during scope definition and how it

satisfies the requirements identified in the requirements

analysis phase of system development.

5.4 Schedule Feasibility

25

A project will fail if it takes too long to be completed before

it is useful. Typically this means estimating how long the system

will take to develop, and if it can be completed in a given time

period using some methods like payback period. Schedule

feasibility is a measure of how reasonable the project timetable

is. Our Schedule Feasibility is just time submission of the

project. But sometimes political violence, bad weather took

effect to submit our project due time.

5.5 Feasibility Study Output

5.5.1 Objectives/Goals of the System

The goal of this system is to develop a web based interface for

online customers and to manage the product and loan customer

information by the shopkeeper of jewellery shop. The system would

be easy to use and hence make the shopping experience pleasant

for the users. The goals of this application are:-

To develop an easy to use web based interface where

customers can search for products, view a complete

description of the products and order the products.

To provide an easy way to search for Products specific to

their needs.

To allow a customer to add a product to or remove a product

from the shopping cart by dragging the product in to the

shopping cart or out of the shopping cart.

To provide complete specification of the product along with

various images so they can visualize and compare the

products properly.

26

To provide an user friendly environment where a shopkeeper

can manage his loan customer information and manage his

jewellery product.

To provide accurate level of security so that transactions

can be made confidentially.

5.6 Objects list of JSMS

Objects, which are instances of classes are used to interact with one

another to design applications and computer programs.

Money Software Web server Customers Products Shop Administrator

5.7 Process Name of JSMS

Selling Buying Validating Managing stock Giving security Adding loan customer information Adding Shop Information Giving loan Money transaction

5.8 Process Related object name of JSMS Selling is related to operator and products.

27

Buying is related to customers and products. Validating is related to customers and administrator. Giving loan is related to customers and administrator. Money transaction is related to customers and administrator. Giving security is related to money and web server. Adding Shop information is related to operator and shop. Money transaction is related to customer and shop.

5.9 Event and their related Process

Process Event

Selling Customer got product.

Shop got money.

Buying Customer got product.

Shop got money.

Validating Validate the product and customer info.

Validate the database.

Giving Security Security provided for money.

Security ensure the legal money is earned.

Giving loan Customer got money

Shop got jewellery products.

Adding Loan Customer Money reduce in shop

Customer got money

28

Table 5.1: Process related event for JSMS

29

CHAPTER 6

REQUIREMENTS DEFINITION

Requirementsdefinition provides a detailed and accurate

description of the needs of the user, together with a

prioritization of those needs. Here feasibility and early system

description are used as input. Through the output we get the

system user, statement of requirement and system scope.

6.1 User List of JSMS

There are 4 types of user in JSMS. Which are:

Online Customer/general customer

Online Register Customer

Loan Customer

Administrator

6.1.1 Online Customer/general customer

General Customer can use the system to see the product and their

prices. They cannot buy product. These are the Primary user and

Secondary user.

6.1.2 Online Register Customer

Register Customer can see product details and order product. They

can add product to shopping cart. Online Register Customer can

buy their product in online, although in our system we provide

cash on delivery method, so customer just need to give their

30

shipping information. These are also Primary user and Secondary

user.

6.1.3 Loan Customer

Loan Customer are those customer who gets loans from the

jewellery shop. They have no access to the system. These are the

Secondary User.

6.1.4 Administrator

Administrator is Primary User of the system.Administrator can add

loan customer. Can add product , he can update and delete it.

6.2 Functional Requirements of JSMS

The system must provide following functionalities:

Keep the record of loan customer.

Keep the record of register customer.

Keep the record of product.

Keep details about the product it is deliver or not, it is

available or not.

Update and delete product record.

Showing expense report, order report, customer report, and

delivery report.

6.3 Interface Requirements of JSMS

6.3.1 Hardware Interface

Minimum System Requirement:

31

Operating Systems Windows 2000,Linux,Unix etc.

Computer/Processor Celeron

Memory At least 256 MB RAM

Web Server PHP compatible web server

Required memory on the

server

1 GB

6.3.2 Software Interface

Platform and Tools:

Database My SQL 5.1.41

Web Browser

Any PHP supported Web

Browser

Such as Mozilla, Google

Chrome, Internet Explorer

32

Table 6.1: Minimum System Requirementtable

Editor Notepad ++

Microsoft Word Version 7

6.4 Fact gathering forms

6.4.1 Environmental characteristics

6.4.1.1Stakeholders recording schedule

Name Primary/Secondary

Function Objective Dependencies

Problems

Administrator

Primary Provide product informationFor customer.

Adding , updating and deleting product.

Adding loan customer information. Giving loan to customer.Ensure trusted transaction.

Validate online transactionsMaintain order reportsand delivery reports.Maintain expenses of shop.

To provide the customer with enough information for buying products.

To provide loan facility to customer.

To provide a secure transaction system.

Product availability, maintenance conditions

Money availability.

maintenance conditions

Difficult to ensure good experience ifthe customer doesn’t have requirement ideas.

Difficult to ensure good experience ifthe customer doesn’t have requirement ideas.

There is no a100% security.

Loan Custome

Secondary Taking loan To complete a successful and

Money availabili

money might not be

33

Table 6.2: Platform and Tools table

r trusted loan transaction

ty available alltime in shop.

Online register customer

Primary Buying products in online

To provide all information about products and secure transaction

Product availability

Product mightnot be available in stock

Generalcustomer

primary Showing product information

To provide all information about products

Product availability

Product mightnot be available in stock

6.4.1.2Problem requirement list

Problem reference

Symptoms Impact on organization

Cause of problem

Priority

Not available The system hasno available products but the systems showing it has

Unwanted hazards

Routine database updates not done

1

Not ordered The system hasavailable products but the system showing it doesn’t

The customer doesn’t get desired facilities / products

Forgetful database maintenance

1

Null accounts The customer has payments due but the system showinghe/she doesn’t

Loss of service payments, lossof balance in accounts

Mismanaged financial information byaccounts

1

Non cleared accounts

The customer has paid all dues but the system showinghe/she has more dues

Unwanted hazardCustomer dissatisfaction

Mismanaged financial information byaccounts

1

34

Table 6.3: Stakeholders recordingschedule table

Table 6.4: problem requirements list

6.4.2 Behavioral Characteristics

6.4.2.1 Object inventory:

Object name Description Dependencies Access availability & Location

Possible states

Processed by

ProductsRegister-CustomerAdministrator

Admin add product where register customer look for available products and order or buy if they have proper facilities

- productAvailability

- web sites - Showing info- order- Cancel

- product query-customer query

Register- customerAdministrator

Verify accounts and customer info when ordering products

ordered product

- websites - ordered- Not ordered

- customerquery

Loan customerAdministrat

Loan customer take loan

Took loan - Front desk

- Key in Front desk- Key not

- loan customer query

35

or and admin add their information.

in Front desk- shop keeper available- shopkeeper not available-customer available-customer not available

6.4.2.2 Processes:

Process name

Part of function

Description Users Objects Start / Stop events

Buying Web site Online register customer can buy their product.

Online register customer

-Customer-products

- Customer asking for product- product available/ product notavailable

Selling Web site After seeing the order report by admin he complete the delivery.

ProductAdministrator

-admin-product

- show order report- complete delivery

Adding loancustomer

Front deskWeb site

The customer came to shop, take loan and admin give loan and add customer

-loan Customer-administrator

- customer-admin

- customer came shop-complete loan transaction

36

Table 6.5: object inventory list

info. Finally give receipt.

Maintain stock and expense

WebsiteFront deskRoutine jobs

Admin add, delete and update product information. Can add ,update and delete expense.

-administrator

-product-admin

-product availability or new product or expense-complete add, deleteand update.

6.4.2.3 Events list:

Event name Description Event caused by Associated Function / Process

Customer got loan Customer came to shop and took loanby mortgaging his jewellery shop

The customer requesting for loan

Taking and giving loan

Customer got product

Only register customer has this facility to buy product in online if the product is available

The customer requesting for product

Buy and selling product

Product added, deleted and updated

Product maintain by admin

New product is required to add oncustomer demand

Stock maintain

Expenses added, deleted and updated

Expenses maintain by admin

New expense is available

Expense maintain

6.4.3 Solution Characteristics

6.4.3.1 Information generation requirements:

37

Table 6.6: process list

Table 6.7: event list

Report name Generate by process

For user Contents

Query result Database search Customer product availability info

Pay info Loan customer account

Customer Details of loan info

6.4.3.2 System function outline recording schedule:

Function Reference

Objective Outline Purpose User

Keepingloan customer info

Booking customer details whotook loan.

Supports:- Database update- Generate report

To provide a trustedtransaction.

Admin

CRUD for product

Adding a product andupdate or delete it if necessary

Supports- Database update

To ensure that the customer get all information about product

Admin

CRUD for expense

Adding expense andupdate or delete it if necessary

Supports-database update

To see monthly expense

Admin

38

Table 6.8: Information generation requirements

Table 6.9: System function outline recording schedule

CHAPTER 7

SYSTEM SPECIFICATION

The Functional Specification is created after the Software

Requirements Document. It provides more detail on selected items

originally described in the Software Requirements Document. Some

software development organizations combine these two documents

into a single document.

The Functional Specification describes the features of the

software product. It describes the product's behavior as seen by

an external observer, and contains the technical information and

39

data needed for the design. The Functional Specification defines

what the functionality will be, but not how that functionality

will be implemented.

Objectives: To provide a complete description of the

functionality of the proposed system.

Input: Requirement, feasibility study, outline system

description.

Process: Embodiment of user requirements into an operational

system.

Output: Process specification, data specification, constraints

and special needs.

7.1 Functional Description

The problem under study is being divided into several

modules/functions discussed below to understand the approach to

the solution in the broader way:

7.1.1 Admin Panel

Admin panel is only can access by system administrator, who haveaccess all over the system.

Login Page : Here login option is provided to login. There is noneed to sign up for admin. 1 or 2 admin could have in system.

Add new customer Page: Here admin add the information of customerwho come to take loan from shop.

Expense Page: Here admin can add expense category , edit andupdate expense category and add category info.

40

Report: Here admin can see customer report, expense report, andorder report by date.

Stock: Here admin can show product inventory, where he can editand delete product info.

Products: In this page admin can add Product category and also hecan edit and delete product category. He also add product infohere.

Search: Here admin search the loan customer info and generatepaper reports which have to give to customer.

Settings: Settings is normal function for admin to edit his username and password.

My shop: This is related to the about us page, which can see byuser and this information must add by user.

7.1.2 User Panel

User panel is only for user or customer. Customer buy therejewellery product here. To use the facilities of buying productevery customer have to create an account.

Home or main page: Here customer can see only product name, pricewith image but they cannot buy without registration or login.

Login: Customer login here to use the full facilities of thesystem.

Sign up: If customer are not register , they can sign up here tocreate a new account.

About Us: This is a page to show the information about the owner.

Contact us: This is a page to contact with the administratorwhere administrator info has given.

41

View Cart Screen :View cart screen shows all the selected items,here quantity as to be entered. And also option is provided todeselect the products.

Order Details Screen : This screen shows the final products inthe view cart. This gives product list, quantity, Total Amountetc., So user will get the clear information that how much is thetotal amount of this selection.

Order Confirmation Screen : This is the final screen in buyingprocess. Here customer as confirm the order.

Chapter 8

System Design

System design is the process of creating alternative solutions tosatisfy the study goals, evaluating the choices and then drawingup the specifications for the chosen alternative.

Objective: Transformation of the system specification into andoperational system design.

Input: Project goals, user requirement priorities, specification.

Process: Transformation often with several alternatives whosecosts and benefits must be quantified and compared.

42

Output: Logical system design, production schedule, software andhardware requirements.

8.1 Flow Chart

A flow chart is a graphical or symbolic representation of

process. The flow chart symbols are linked together with arrows

showing the process flow direction.

8.1.1 Flow chart buying product by user

8.1.2 Flow chart for admin

43

Fig 8.1: Flow chart buying product by user

8.2 Use Case diagram

A use case diagram in the Unified Modeling Language (UML) is a

type of behavioral diagram defined by and created from a Use-case

analysis. The main purpose of a use case diagram is to show what

system functions are performed for which actor.

8.2.1Relationships

Use case relationship explains how the use case is related to

other use case and users. The four basic types of relationships

are association, extend, include and generalization.

Association

44

Fig 8.2: Flow chart for admin

An association relationship documents the communication that

takes place between the use case and the actors that use the use

case. An actor is the UML representation for the role that a user

plays in the use case.

Extends

An extend relationship represent the extension of the

functionality of the use case to incorporate optional behavior.

Include

An include relationship represents the mandatory inclusion of

another use case. The include relationship enable functional

decomposition. It breaks up of a complex use case into several

simpler one.

Generalization

The generalization relationship allows use cases to support

inheritance.

8.2.2 Use case diagrams depict

Use Cases

A use case describes a sequence of actions that provide something

of measurable value to an actor and is drawn as a horizontal

ellipse.

Actors

45

An actor is a person, organization, or external system that plays

a role in one or more interactions with your system. Actors are

drawn as stick figures

Associations

Associations between actors and use cases are indicated in use

case diagrams by solid lines. An association exists whenever an

actor is involved with an interaction described by a use case.

Associations are modeled as lines connecting use cases and actors

to one another, with an optional arrowhead on one end of the

line. The arrowhead is often used to indicating the direction of

the initial invocation of the relationship or to indicate the

primary actor within the use case. The arrowheads are typically

confused with data flow and as a result I avoid their use.

System Boundary Boxes (Optional)

You can draw a rectangle around the use cases, called the system

boundary box, to indicates the scope of your system. Anything

within the box represents functionality that is in scope and

anything outside the box is not. System boundary boxes are

rarely used, although on occasion I have used them to identify

which use cases will be delivered in each major release of a

system.

Packages (Optional)

Packages are UML constructs that enable you to organize model

elements (such as use cases) into groups. Packages are depicted

as file folders and can be used on any of the UML diagrams,

46

including both use case diagrams and class diagrams. I use

packages only when my diagrams become unwieldy, which generally

implies they cannot be printed on a single page, to organize a

large diagram into smaller ones.

8.2.3 Use case diagram for General Customer

47

Fig 8.3: Use case diagram for General Customer

8.2.4 Use Case Diagram for Online Register Customer

48

Register

Customer

Login

Show Product info

Add to cart

Shipping info

Buy Product

Shipping info

Edit account

Fig 8.4: Use case diagram for Register Customer

8.2.5 Use Case Diagram for Admin

8.3 Activity Diagram

Activity diagram is UML behavior diagram which shows flow of

control or object flow with emphasis on the sequence and

conditions of the flow. The actions coordinated by activity

models can be initiated because other actions finish executing,

49

Fig 8.5: Use case diagram for Admin

because objects and data become available, or because some events

external to the flow occur. Activity diagrams are graphical

representations of workflows of stepwise activities and actions

with support for choice, iteration and concurrency.

8.3.1 Construction

Activity diagrams are constructed from a limited number of

shapes, connected with arrows. The most important shape types:

Rounded rectangles represent activities;

Diamonds represent decisions;

Bars represent the start (split) or end (join) of concurrent

activities;

A black circle represents the start (initial state) of the

workflow;

An encircled black circle represents the end (final state).

8.3.2 Activity Diagram of Admin

50

8.3.3 Activity Diagram of Online Register Customer

51

Fig 8.6: Activity diagram for Admin

8.4 Sequence Diagram

UML sequence diagrams model the flow of logic within your system

in a visual manner, enabling you both to document and validate

your logic, and are commonly used for both analysis and design

purposes.  Sequence diagrams are the most popular UML artifact

for dynamic modeling, which focuses on identifying the behavior

within your system. Other dynamic modeling techniques include

activity diagramming, communication diagramming, timing

diagramming, and interaction overview diagramming.

8.4.1 Sequence Diagrams are typically used to Model

52

Fig 8.7: Activity diagram for Register Customer

a. Usage Scenarios

A usage scenario is a description of a potential way your system

is used. The logic of a usage scenario may be part of a use case,

perhaps an alternate course. It may also be one entire pass

through a use case, such as the logic described by the basic

course of action or a portion of the basic course of action, plus

one or more alternate scenarios. The logic of a usage scenario

may also be a pass through the logic contained in several use

cases. For example, a student enrolls in the university, and then

immediately enrolls in three seminars.

b. The Logic of Methods

Sequence diagrams can be used to explore the logic of a complex

operation, function, or procedure.  One way to think of sequence

diagrams, particularly highly detailed diagrams, is as visual

object code.

c. The Logic of Services

A service is effectively a high-level method, often one that can

be invoked by a wide variety of clients.  This includes web-

services as well as business transactions implemented by a

variety of technologies such as CICS/COBOL or CORBA-compliant

object request brokers (ORBs).

8.4.2 Elements of Sequence Diagram

Object: Represents an object in the system or one of its

components.

53

Separator: Represents an interface or boundary between

subsystems.

Call Message: A call (procedure) message between header elements

Message: A simple message between header elements

Return Message: A return message between header elements

Lifeline: Denotes the life of an object during a sequence.

|

|

8.4.3 Sequence diagram of Admin

54

55

Fig 8.8: Sequence Diagram for Admin

8.4.4 Sequence diagram of Online Register Customer

56

Fig 8.9: Sequence Diagram for Register Customer

8.5 Database Design

Database design is the process of producing a detailed data model

of a database. This logical data model contains all the needed

logical and physical design choices and physical storage

parameters needed to generate a design in a Data Definition

Language, which can then be used to create a database. A fully

attributed data model contains detailed attributes for each

entity. The term database design can be used to describe many

different parts of the design of an overall database system.

8.5.1 E-R Diagram

In software engineering, an entity-relationship model (ER model

for short) is an abstract and conceptual representation of data.

Entity-relationship modeling is a database modeling method, used

to produce a type of conceptual schema or semantic data model of

a system, often a relational database, and its requirements in a

top-down fashion. Diagrams created by this process are called

entity-relationship diagrams, ER diagrams.

57

8.5.1.1 ERD of JSMS

58

59

Fig 8.10: ERD for JSMS

8.6 Data Flow Diagram (DFD)

Data flow diagrams are highly essential for requirement

specification of the system. Data flow diagrams are an intuitive

way of showing how data is processed by a system. Those are used

to show how data flows through a sequence of processing steps.

The data is transformed at each step or transformations are

program functions when data flow diagrams are used to documents a

system.

8.6.1 DFD Levels:

Level-0 DFD or Context diagram

Overview of the organizational system. Representation of

system’s major processes at high level of abstraction.

Level-1 DFD

Results from decomposition of Level 0 diagram

Level-n DFD

Results from decomposition of Level n-1 diagram

8.6.2 Symbols of Data Flow Diagram

60

8.6.3 Context Diagram

A context diagram is a graphic design that clarifies the

interfaces and boundaries of the project or process at hand. It

not only shows the process or project in its context, it also

shows the project’s interactions with other systems and users. A

System Context Diagram (SCD) in software engineering and systems

engineering is a diagram that represents the actors outside a

system that could interact with that system. This diagram is the

highest level view of a system. It is similar to a Block diagram.

8.6.4 A context diagram will fall into one of two categories of

rigor

• The first lacks any formal structure; an object is simply

placed in its context, showing its interaction with external

entities from a high level. This type of context diagram is

normally produced by those who have not had formal training

in producing context diagrams, but who, for a presentation

or marketing purposes, want to show an object or system in

its context.

• The second type is a bit more rigid, drawing from the same

rules, syntax, and symbols established for data flow

61

diagrams. In this instance, the context diagram is a subset

of a data flow diagram with the context diagrams being the

simplest form of data flow diagrams.

8.6.5 DFD for Online Jewellery Shop Management System

62

63

Fig 8.11: DFD Level 0 for

64

Fig 8.12: DFD Level 1

65

1.1 Add loan customer

1.1.1 Insert

Inform admin

Customer info

DB queryCustomer_info

Fig 8.13: DFD Level 1 for

66

1.2 Shop Configur-e

1.2.1 Insert

Inform admin

Shop info

DB queryShop_config

1.3 Expense Category

1.3.1 Insert

Inform admin

Expense catgory

DB queryExpense_cat1.3.2

Update

1.3.3 Delete

Inform admin

Delete info

Update info

Inform admin

DB query

DB query

Fig 8.14: DFD Level 2- Admin process

Fig 8.15: DFD Level 2- Admin process

67

Fig 8.16: DFD Level 2- Admin process

1.4 Expense info

1.4.1 Insert

Inform admin

Expense info

DB queryExpense_info

Fig 8.17: DFD Level 2- Admin process

1.5 Product category

1.5.1 Insert

Inform admin

Product category

DB queryProduct_cat1.5.2

Update

1.5.3 Delete

Inform admin

Delete info

Update info

Inform admin

DB query

DB query

68

Fig 8.18: DFD Level 2- Admin process

1.6 Product category

1.6.1 Insert

Inform admin

Product info

DB queryProduct_info1.6.2

Update

1.6.3 Delete

Inform admin

Delete info

Update info

Inform admin

DB query

DB query

69

Fig 8.19: DFD Level 2- Admin process

1.7 Order info

1.7.1 Update order

Inform admin

Order info

DB queryOrder_info

Fig 8.20: DFD Level 2- Admin process

1.1 Register

1.1.1 Insert

Inform user

User info

DB queryUser_info

70

Fig 8.21: DFD Level 2- Customer process

1.3 Profile

1.3.1 Update

Inform user

Update info

DB queryUser_info

Fig 8.22: DFD Level 2- Customer process

1.6 Cart

1.6.1 Insert

Inform admin

Cart info

DB queryCart_info1.6.2

Update

1.6.3 Delete

Inform admin

Delete info

Update info

Inform admin

DB query

DB query

71

Fig 8.23: DFD Level 2- Customer process

1.7 Shipping details

1.7.1 Insert

Inform user

shipping info

DB queryOrder_info

Fig 8.24: DFD Level 2- Customer process

8.7 Structured Chart

72

Fig 8.25: Structured chart for JSMS

CHAPTER 9

PROGRAM DESIGN

9.1 Implemented software

We implement this software using given below

Front End:

HTML

CSS

JAVA SCRIPT

JQUARY

Back End:

MYSQL

PHP

Local Server: XAMPP 1.7.2

Editor: Notepad++, Dream Weber CS5

9.1.1 PHP

PHP is powerful server side scripting language for creating

dynamic and interactive websites. PHP is the widely used, free

and efficient alternative to competitors such as Microsoft’s ASP.

PHP is perfectly suited for web development and can be embedded

directly into the HTML code. The PHP syntax is very similar to

Perl and C. PHP is often used together with apache on various

operating systems. It also supports ISPI and can be used with

Microsoft IIS on Windows.

9.1.2 HTML

73

HTML is a language for instructing the browser how to display web

page. It’s the building block for building web site.

HTML stands for Hyper Text Markup Language

An HTML file is a text file containing small markup tags

The markup tag tell the web browser how to display the page

An HTML file must have an htm or html file extension

An HTML file can be created using a simple text editor

9.1.3 CSS

Cascading Style Sheets (CSS) is a style sheet language used to

describe the presentation semantics of a document written in a

markup language.

CSS Pages load faster.

Easy maintenance

Superior styles to HTML

CSS saves time

9.1.4 Java Script

JavaScript is used in millions of Web pages to improve the

design, validate forms, detect browsers, crate cookies, and much

more.

JavaScript is the most popular scripting language on the

internet, and work in all major browsers, such as internet

explorer, Firefox and Opera.

JavaScript was designed to add interactivity to HTML Page

74

JavaScript is a scripting language

JavaScript language is a lightweight programming language

JavaScript is usually embedded directly into HTML

9.1.5 MYSQL

MySQL is most commonly used for Web applications and for embedded

applications and has become a popular alternative to proprietary

database systems because of its speed and reliability. MySQL can

run on UNIX, Windows and Mac-OS. MySQL is a client-server system

runs over TCP/IP network. In other words, the server runs on a

machine with a IP address (or hostname), on a chosen TCP port

number. The default TCP port number for MySQL is 3306, but you

are free to choose another port number between 1024 and 65535 to

run the server. Users can access the server via a client program.

A MySQL database server contains one or more databases.

9.2 Logical Schema

admin_info (id, ad_ username, ad_password)

cart_info (c_id, user_id, product_id, c_session, c_date,

c_qty)

customer_info (c_id, c_name, c_add, c_phone, c_mess,

c_measure, c_paid_amount, c_receive_amount, c_interest,

c_image, c_in_date, c_status)

75

expense_cat (e_id, e_category)

expense_info (ex_id, e_category, ex_amount, ex_date)

product_cat (cat_id, cat_name)

product_info (product_id, cat_id, scat_name, product_price,

pro_desc, pro_qty, product_image)

user_info (user_id, log_password, log_sal, log_fname,

log_lname, log_gender, log_email, log_reg_date)

order_info (o_id, user_id, product_id, c_fname, c_lname,

c_address, c_mobileno, c_province, c_city, c_postalcode,

order_status, order_qty, order_date, last_update,

c_session, order_totalprice)

shop_config (shop_id, s_name, s_add, s_phone, s_email,

s_country, s-aboutus)

76

9.3 Table of JSMS

Field Name Data Type Key Value

1. idvarchar (10) PK

Not Null (Auto

Increment)

2. ad_username varchar (10) Not Null

3. ad_password varchar (10) Not Null

Field Name Data Type Key Value

1. c_idint (20) PK

Not Null (Auto

Increment)

2. user_name varchar (40) FK Not Null

3. product_id int (20) FK Not Null

4. c_qty int (10) Not Null

77

Fig 9.1: Table of Admin_info

5. c_date datetime Not Null

6. c_session char (30) Not Null

Field Name Data Type Key Value

1. c_id varchar (20) PK Not Null

2. c_name varchar (10) Not Null

3. c_add varchar (50) Not Null

4. c_phone int (20) Not Null

5. c_mess int (20) Not Null

6. c_measure varchar (10) Not Null

7. c_paid_amount int (20) Not Null

8. c_receive_amount int (20) Not Null

9. c_interest int (20) Not Null

10. c_image Varchar (50) Not Null

11. c_in_date date Not Null

78

Fig 9.2: Table of Cart_info

12. c_status int (10) Not Null

Field Name Data Type Key Value

1. e_idint (100) PK

Not Null (Auto

Increment)

2. e_category varchar (20) Not Null

Field Name Data Type Key Value

1. ex_idint (200) PK

Not Null (Auto

Increment)

2. e_category varchar (20) Not Null

3. ex_amount int (200) Not Null

4. ex_date date Not Null

79

Fig 9.3: Table of Customer_info

Fig 9.4: Table of Expense_cat

Fig 9.5: Table of Expense_info

Field Name Data Type Key Value

1. cat_idint (100) PK

Not Null (Auto

Increment)

2. cat_name varchar (20) Not Null

Field Name Data Type Key Value

1. product_idint (255) PK

Not Null (Auto

Increment)

2. cat_id int (100) FK Not Null

3. scat_name varchar (20) Not Null

4. product_price varchar (20) Not Null

5. pro_desc text Not Null

6. pro_qty int (100) Not Null

7. product_image varchar

(100)Not Null

Field Name Data Type Key Value

1. o_id int (20) PK Not Null (Auto

80

Fig 9.6: Table of Product_cat

Fig 9.7: Table of Product_info

Increment)

2. user_id varchar (40) FK Not Null

3. product_id int (20) FK Not Null

4. c_fname varchar (40) Not Null

5. c_lname varchar (40) Not Null

6. c_address varchar (40) Not Null

7. c_mobileno varchar (40) Not Null

8. c_province varchar (40) Not Null

9. c_city varchar (40) Not Null

10. c_postalcode varchar (40) Not Null

11. order_status varchar (20) Not Null

12. order_date date Not Null

13. last_update date Not Null

14. order_qty int (20) Not Null

15. total_price int (100) Not Null

16. c-session varchar

(100)Not Null

81

Fig: Table of Order_info

Fig 9.10: Table of Order_info

Field Name Data Type Key Value

1. s_idint (100) PK

Not Null (Auto

Increment)

2. s_name varchar

(100) Not Null

3. s_address varchar

(100) Not Null

5. s_phone varchar

(100)Not Null

6. s_email varchar

(100)Not Null

7. s_country varchar

(100)Not Null

8. s_aboutus text Not Null

82

Fig 9.11: Table of shop_config

CHAPTER 10

TESTING

Software testing is an investigation conducted to provide

stakeholders with information about the quality of the product or

service under test. Software testing can also provide an

objective, independent view of the software to allow the business

to appreciate and understand the risks of software

implementation.

Software testing can be stated as the process of validating and

verifying that a software application:

1. meets the requirements that guided its design and

development;

2. works as expected, and

3. Can be implemented with the same characteristics.

10.1 Software Testing Types

10.1.1 Black box testing: Internal system design is not

considered in this type of testing. Tests are based on

requirements and functionality.

10.1.2 White box testing: This testing is based on knowledge ofthe internal logic of an application’s code. Also known as Glass

box Testing. Internal software and code working should be known

83

for this type of testing. Tests are based on coverage of code

statements, branches, paths, conditions.

10.1.3 Unit testing: Testing of individual software componentsor modules. Typically done by the programmer and not by testers,

as it requires detailed knowledge of the internal program design

and code may require developing test drive modules or test

harnesses.

10.1.4 Functional testing: This type of testing ignores the internal parts and focus on the output is as per requirement or

not. Black-box type testing geared to functional requirements of

an application.

84

CHAPTER 11

IMPLEMENTENTATION AND MAINTENANCE11.1 User Panel

Index Page: Here unregistered user can see the product. But they

can’t buy product.

Sing Up page: Here user can create their account to buy product

in online.

85

Login Page: Here register User can Login.

Welcome Page: This is the welcome page after login.

86

87

User Home Page: This is the user home page, from where he can see

his account details and view product.

Product display page: Here user can see product by selecting

category , after selecting product user can add the product into

cart.

88

Cart Info Page: Here user can see all products which are in his

shopping cart. From here he either buys the product or can add

more product into his shopping cart.

89

Add Shipping Details: This is page to add shipping details for

buying a product.

90

Success Page:

11.2 Admin Panel

Login Page:

91

Add New customer page: Here admin add loan customer info.

Expense page: Here Admin can Insert , Delete , Update expense

category , and add expense.

92

Report Page: In this page admin can check customer report,

expense report and order report.

For example: customer report as follows

93

Stock Page: Here admin can see product details and edit them.

94

Product Page: This is the page to add product category and

product info.

Search Customer Page: Here admin can search loan customer by ID

95

CHAPTER 12

SECURITY

Data security is the means of ensuring that data is kept safe

from corruption and that access to it is suitably controlled.

Thus data security helps to ensure privacy. It also helps in

protecting personal data. Data security is part of the larger

practice of Information security.

12.1 Different Security Mechanism

12.1.1 Encryption:

Encryption is the usual way to meet the data confidentiality

requirements and although using a symmetric algorithm could be

used, there are good reasons for using symmetric (such as DES,

AES etc.).

12.1.2 Message Authentication:

A Message Authentication Code (MAC) is cryptographic checksum,

calculated using a symmetric algorithm, which is appended to a

message and which can be verified by the recipient of the

message. The use of MAC is one method of providing the integrity

and authentication services, but it is not appropriate for

meeting the requirements for non-repudiation.

96

CHAPTER 13

CONCLUSION

13.1 Limitations:

As we planned and make the system in some requirement and we

think it will fulfill our desires.

Some limitation of the project still in their for our time

limitation as it is a large project.

Limitations are:

Customers have no wish list.

A customer does not get any notification in the email

when new product is added.

Customer does not give multiple shipping information.

Visualization is not good enough.

Security system should be stricter.

However we will glade if we get more suggestion about the

project, so that we can make our project user friendly.

13.2 Future Plans:

• The current system can be extended to allow the Customers tosave products in to wish list.

97

• The Customers could subscribe for price alerts which would enable them to receive messages when price for products fallbelow a particular level and when a new product is added.

• Customers can have multiple shipping and billing informationsaved.

• Customers can give feedback.

98

13.3 Conclusion

Finally I would like to conclude that in the 6 months while we

were working on this project and we came to know about many new

technologies, concepts and also have learned about working in a

team. Our project, is based on the PHP. Our website will support

to those operating systems and database, which support PHP. This

project followed the maintenance SDLC, which involved the steps

of the

Planning

Feasibility Study

System Specification and Design

Program Design & Coding Testing

Implementation and Maintenance

With due regards, we want to express our heart-felt thanks to

all, for their support and co-operation towards the completion of

our project.

99

ReferenceBooks

Database System Concepts by Silberschatz, Korth, Sudarshan.

Lecture Notes

System Analysis and Design (Dr. M. Shahadat Hossain,

Associate Professor, Dept of CSE, Chittagong University)

System Analysis and Design, Web Programming (Mohammed Arif

Hasnayeen, Lecturer, Dept of CSE, IIUC)

Distributed Database (Mohammed Mahmudur Rahman, Lecturer,

Dept of CSE, IIUC )

Internet

http://en.wikipedia.org/wiki/Systems_Development_Life_Cycle

http://www.w3schools.com/

http://www.google.com

http://www.wikipedia.com

100

Appendix A

Database Connection:

<?php $con = mysql_connect("localhost","root","");if (!$con)

{die('Could not connect: ' . mysql_error());

}mysql_select_db("gj", $con); ?>

Database Query for User Panel

For user sing up:

$query = mysql_query("INSERT INTO userinfo (log_sal,log_fname,log_lname,log_gender,log_email,username,log_password,log_regdate) VALUES ('$sal','$fname','$lname','$gender','$email','$username','$password','$date')") or die(mysql_error());Check username and password:

if(isset($_POST['submitMain'])) { $user =$_POST['txt_username']; $password=$_POST['txt_password']; $query = mysql_query("SELECT * FROM userinfo WHERE username = '$user' AND log_password = '$password' ") or die(mysql_error()); if(mysql_num_rows($query)>0){ $_SESSION['user']=$user; echo "<script>window.location='home.php';</script>"; } else { echo '<div align="center"><strong><font color="#FF0000">User Name& Password not match !!</font></Strong></div>'; }

101

}Check Unique Username:

<?php include("connection.php"); $user=$_REQUEST['user']; //echo "user : ". $user; $get_user= @mysql_query("SELECT * FROM userinfo WHERE username='$user' "); $num_rows= @mysql_num_rows($get_user);?> <input type="hidden" name="noofrows" id="noofrows" value="<?php echo $num_rows; ?>" /> <?php if($num_rows>0 && $user!=""){ echo "User Name Already Exists"; } if($num_rows==0 && $user!=""){ echo "User Name Is Available"; }?>Insert into Cart info:if (isset($_GET['p']) && (int)$_GET['p'] > 0) {

$productId = (int)$_GET['p'];$result = mysql_query("SELECT product_id, pro_qty FROM product_info where product_id='$productId' ");if ($result >0) {

$row = mysql_fetch_assoc($result);$currentStock = $row['pro_qty'];if($currentStock==0){

//echo "Out of stock";echo "<script>alert('Out of stock!!');</script>";echo

"<script>window.location='productdisplay.php'</script>";exit;

}$sid = session_id();

102

$result = mysql_query("SELECT product_id FROM cart_info WHERE product_id = '$productId' AND c_session = '$sid' AND username = '$username'");if (mysql_num_rows($result) == 0) {

$result = mysql_query("INSERT INTO cart_info (product_id,ct_qty,c_date,c_session,username)

VALUES ('$productId', 1,NOW(),'$sid','$username')");} else {

$result = mysql_query("UPDATE cart_info SET ct_qty = ct_qty + 1

WHERE c_session = '$sid' AND product_id = '$productId' AND username = '$username' ");

}header("Location: cart.php?id=$productId ");

}}

Insert into order info and Delete for cart info and update in product info:

$query = mysql_query("INSERT INTO order_info (username,o_fname,o_lname,o_add,o_mob,o_state,o_city,o_postal,o_status,o_od,o_lud,o_qty,total_price,product_id,c_session) VALUES ('$username','$fname','$lname','$address','$phone','$state','$city','$pcode','$status','$date','$date','$qty','$totalprice','$pid','$sid')") or die(mysql_error());

if($query){$del = mysql_query("DELETE from cart_info WHERE username='$username' AND c_id='$cid' AND c_session='$sid' AND product_id='$pid'") or die(mysql_error());

$avl= mysql_query("SELECT pro_qty from product_info where product_id='$pid'");

if($avl){$row=mysql_fetch_assoc($avl);$pis=$row['pro_qty'];$pro_avl=$pis-$qty;

}$upquery=mysql_query("UPDATE product_info SET

pro_qty='$pro_avl' where product_id='$pid'");

103

echo "<script>alert('Your information has been inserted !!');</script>";

echo "<script>window.location='success.php?un=$username'</script>";

}

Database Query for Admin Panel

Insert into customer info:

$result = mysql_query("INSERT INTO customer_info(c_name,c_id,c_add,c_phone,c_paid,c_percent,c_mess,c_measure,c_image,c_in_d,c_in_m,c_in_y,c_status)

VALUES('$c_name','$c_id','$c_address','$c_phone','$c_paid','$c_percent','$c_mess','$c_measure','$file_name','$r_day','$r_month','$r_year','$c_status')");

Insert, Delete, Update in Expense Category and Insert to expense info:

$result = mysql_query("INSERT INTO expences(e_catagory,ex_amount,ex_d,ex_m,ex_y)

VALUES('$e_catagory','$ex_amount','$ex_day','$ex_month','$ex_year')");

$result = mysql_query("INSERT INTO expenc_cat(e_catagory)VALUES('$e_catagory')");

$result = mysql_query("SELECT * FROM expenc_cat WHERE e_catagory='$ed_catagory'");

if($result!=0){$result = mysql_query("SELECT * FROM expenc_cat");if($result != 0){

$ediresult = mysql_query("UPDATE expenc_cat SET e_catagory='$ed_name' where e_catagory='$ed_catagory'");

if($ediresult != 0){header("Location: expences.php?

edcatagorys=success ");}else{

104

header("Location: expences.php?edcatagory=fail");}

}}

$result = mysql_query("DELETE FROM expenc_cat WHERE e_catagory='$d_catagory'");

105

Insert, Delete, Update in Product Category:

$product_catagory= $_POST['product_name'];$result = mysql_query("INSERT INTO product_cat(cat_name)VALUES('$product_catagory')");

$ed_name= $_POST['ed_name'];$ed_catagory= $_POST['ed_catagory'];$result = mysql_query("SELECT * FROM product_cat WHERE cat_name='$ed_catagory'");if($result!=0){$result = mysql_query("SELECT * FROM product_cat");if($result != 0){$ediresult = mysql_query("UPDATE product_cat SET cat_name='$ed_name' where cat_name='$ed_catagory'");if($ediresult != 0){header("Location: product.php?edcatagorys=success ");}else{header("Location: product.php?edcatagory=fail");}}}

$d_catagory= $_POST['d_catagory'];$result = mysql_query("DELETE FROM product_cat WHERE cat_name='$d_catagory'");

Insert, Delete, Update in Product Info:

$result = mysql_query("INSERT INTO product_info(scat_name,product_price,pro_desc,pro_qty,product_image,cat_id) VALUES('$product_name','$product_price','$product_desc','$product_qty','$file_name','$c_id')");

$id=$_GET['Id'];$result = mysql_query("DELETE FROM product_info WHERE product_id='$id'");

$result= mysql_query("SELECT * FROM product_info");if($result!= 0) {

106

$ediresult = mysql_query("UPDATE product_info SET scat_name='$ed_name',product_price='$ed_pr',pro_desc='$ed_de',pro_qty='$ed_qt' where product_id='$id'");

if($ediresult != 0) {header("Location: stock_details.php?

productId=$id");}else{

header("Location: stock_details.php?productId=$id");

}}

107

Appendix B

Short Cut

KeysAbbreviations

JSMS Jewellery Shopping management

system

SDLC Software Development Life

Cycle

ERD Entity Relationship Diagram

DFD Data Flow Diagram

SCD System Context Diagram

HTML Hyper Text Markup Language

CSS Cascading Style Sheets

MAC Message Authentication Code

108

109