online book sales with mobile smsmcs142144/documents/bookiepedia_report.pdfbonafide certificate...

46
ONLINE BOOK SALES WITH MOBILE SMS A MINI PROJECT REPORT Submitted by BRABU. V (1010106014) RAMKI. R (1010106086) SASIDHARAN. R (1010106100) SURESH. P (1010106127) in partial fulfillment for the award of the degree on U10IT611 MINI PROJECT IN III YEAR / VI SEMESTER INFORMATION TECHNOLOGY SONA COLLEGE OF TECHNOLOGY, SALEM (AUTONOMOUS) JULY 2013

Upload: others

Post on 22-Jul-2020

22 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

ONLINE BOOK SALES WITH MOBILE SMS

A MINI PROJECT REPORT

Submitted by

BRABU. V (1010106014)

RAMKI. R (1010106086)

SASIDHARAN. R (1010106100)

SURESH. P (1010106127)

in partial fulfillment for the award of the degree

on

U10IT611 MINI PROJECT

IN

III YEAR / VI SEMESTER INFORMATION TECHNOLOGY

SONA COLLEGE OF TECHNOLOGY, SALEM

(AUTONOMOUS)

JULY 2013

Page 2: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

i

ONLINE BOOK SALES WITH MOBILE SMS

A MINI PROJECT REPORT

Submitted by

BRABU. V (1010106014)

RAMKI. R (1010106086)

SASIDHARAN. R (1010106100)

SURESH. P (1010106127)

in partial fulfillment for the award of the degree

on

U10IT611 MINI PROJECT

IN

III YEAR / VI SEMESTER INFORMATION TECHNOLOGY

SONA COLLEGE OF TECHNOLOGY, SALEM

(AUTONOMOUS)

JULY 2013

Page 3: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

ii

SONA COLLEGE OF TECHNOLOGY, SALEM

(AUTONOMOUS)

DEPARTMENT OF INFORMATION TECHNOLOGY

BONAFIDE CERTIFICATE

Certified that this mini project report “ONLINE BOOK SALES WITH

MOBILE SMS” is the bonafide work of “ BRABU. V, RAMKI. R,

SASIDHARAN. R, SURESH. P ” who carried out the project work under my

supervision.

SIGNATURE SIGNATURE

DR . J . AKILANDESWARI M.E., Ph.D MRS. J. JEBA EMILYN M.E., (Ph.D)

HEAD OF THE DEPARTMENT SUPERVISOR

Professor Professor

Information technology, Information technology,

Sona College of Technology, Sona College of Technology,

Thiagarajar Polytechnic College Road, Thiagarajar Polytechnic College Road,

Salem – 636 005 Salem – 636 005

INTERNAL EXAMINER EXTERNAL EXAMINER

Page 4: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

iii

TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

ACKNOWLEDGEMENT iv

ABSTRACT v

LIST OF TABLES vi

LIST OF FIGURES vi

1. INTRODUCTION

1.1 General Information 1

1.2 Objective 1

2. HARDWARE AND SOFTWARE REQUIREMENTS

2.1 Front-End Development tools 2

2.2 Back-End Development tools 2

3. LITERATURE REVIEW 3

4. SYSTEM DEVELOPMENT METHODOLOGY 4

5. DESIGN ARCHITECTURE 5

6. PROJECT DESCRIPTION 23

7. SCREEN SHOTS 25

8. PSEUDO CODE 28

9. CONCLUSION 36

10. FUTURE ENHANCEMENTS 37

11. REFERENCES 38

Page 5: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

iv

ACKNOWLEDGEMENT

First and foremost, we thank to Power of Almighty for showing us inner peace

and for all blessings.

Special gratitude to our Parents, for showing their support and love always.

We like to acknowledge the constant support provided by Sri. C. Valliappa,

Chairman, for his consistent motivation in pursuing my project.

Our gratitude thanks to our secretary Sri. A. Dhirajlal, who leads us in a

narrow path towards success in all the way.

We are immensely grateful to our principal who has been my constant source of

inspiration.

We express our sincere thanks to the Head of Information Technology, Prof.

Dr. J. Akilandeswari, M.E., Ph.D., for providing adequate laboratory facilities to

complete this thesis.

We feel elated to keep on record our heartfelt thanks and gratitude to Mrs. Jeba

Emilyn, our steadfast inspiration, for her valuable guidance, untiring patience and

diligent encouragement during the entire span of this project.

We feel proud in sharing this success with my staff members, non-teaching

staffs and friends who helped directly or indirectly in completing this project

successfully.

Page 6: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

v

ABSTRACT

The main scope of this project is to reduce the man power involved in sales

and to reduce the effort of storing books in each center. To give an online customer

support in order to clarify the doubts in the purchasing process. An universal site

that would help the process of buying books. To provide a standard and easy to use

interface, which makes the book purchasing process pleasing. Provide the

subscription mechanism, which would help the customers to get latest updates

about the books of their interest.

Page 7: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

vi

LIST OF TABLES

Table number Table name Page no

1. 2.1 Software Requirements 2

2. 5.1 Use case report 12

LIST OF FIGURES

Figure number Figure name Page no

1. 4.1 Description diagram 4

2. 5.1 ER diagram 5

3. 5.2 Database schema diagram 6

4. 5.3 Use Case model survey 7

5. 5.4 Architecture diagram 10

6. 5.5 Class diagram 11

7. 5.6.2.1 Activity diagram for registration 17

8. 5.6.2.2 Activity diagram for book search 18

9. 5.6.3.1 Sequence diagram for registration 20

10. 5.6.3.2 Sequence diagram for purchase 22

Page 8: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

vii

Page 9: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

1

1. INTRODUCTION

1.1 General Information

The main scope of this project is to reduce the man power involved in

sales and to reduce the effort of storing books in each center. To give an online

customer support in order to clarify the doubts in the purchasing process. A

universal site that would help the process of buying books. To provide a

standard and easy to use interface, this makes the book purchasing process

pleasing. Provide the subscription mechanism, which would help the customers

to get latest updates about the books of their interest.

The major five users of this system are:

1. Corporate users,

2. Retail users,

3. Non-members,

4. Administrator and

5. Stock manager.

1.2 Objective

Anyone can search for the books and the search result lists the details of

the books, which match the search key. In the registration form, the name,

mobile number, e-mail id, account type, address, username and password fields

are made mandatory. The details of the members are saved in a compact format

as in XML. Administrator can access all the details of members and the

database. Non-members can become members by registering in the website

and by activating the account. The members are allowed to perform actions

like login, logout, place order, cancel order, give feedback, rate books, suggest

books, subscribe for a category, deactivate the account, etc. The details of the

members are protected in a highly confidential manner. The customers are

provided with a live chat help during the day time. Reselling of books is

accepted, if their condition is good. Five types of payment methods are

supported by this website.

Page 10: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

2

2. HARDWARE AND SOFTWARE REQUIREMENTS

2.1 Front End Development Tools:

Rational Software Architect v7.0 (RSA)

Rational Application Developer (RAD)

Google Chrome - Web browser

2.2 Back End Development Tools:

DB2 – IBM Database

2.3 Software Requirements:

The software components required are shown in the table

below.

System Software needed

Client side Web browser

Web server Websphere Application Server (WAS)

Database server DB2

SMS server Android application

Table 2.1: Software requirements

2.4 Hardware Requirements:

The minimum client side hardware requirements are as follows.

Processor : INTEL® Core2Duo or AMD Athlon processor

RAM : 512 MB

Processor speed : 1.7 GHz

Page 11: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

3

3. LITERATURE REVIEW

Existing System

Registration for the non-members so that they become members.

Searching for the books which facilitate the purchase. Purchasing of the selected

books.

Drawbacks of the Existing System

People cannot resell the books, once they have bought. No proper

customer support is provided. There are no facilities to suggest books to friends. No

SMS subscription facility available.

Proposed System

Bookiepedia site will help the registered users to purchase book(s) online.

Arrival of new books is intimation for the customers through e-mail and SMS.

Reselling of books is accepted if their condition is good. Four step easy process of

purchasing books, with user-friendly interface. Online customer support throughout

the day time via live chat. Mobile number and Email verification during registration.

Approximate shipping date automatically updated based on the availability of book(s)

in the stock. Online searching of books with enhanced categorization. Support for the

sending of invites to the non-members, which calls them for registration. Members

can suggest books for their friends.

Page 12: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

4

4. SYSTEM DEVELOPMENT METHODOLOGY

The client requests the web pages (XHTML/HTML/JSP) through the browser, which

directly communicates with the HTTP/HTTPS protocols. The TCP/IP protocol helps

in transferring the data between the client users and the server. Taking necessary data

from the database (DB2), the application server (WAS) provides the data required by

the authorized client systems. Incremental methodology has been used employed for

developing our project.

Figure 4.1: Description diagram

Language Used

Server Side

JAVA, JSP, Java Servlet, SQL, Android

Client Side

HTML, CSS, Java Script, JQuery, AJAX, XML

Page 13: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

5

5. DESIGN ARCHITECTURE

5.1 ER Diagram

Figure 5.1: ER diagram

Page 14: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

6

5.2 Database Schema Diagram

Figure 5.2: Database schema Diagram

Page 15: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

7

5.3 Use Case Model Survey

Figure 5.3: Use case diagram

Page 16: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

8

5.3.1 Non-member

Any person who has not yet registered with the online book store system is

treated as a non-member. Non-members can register with the system in order to

become a member or can search for the books by category and author. They can also

give feedback about Bookiepedia site.

5.3.2 Corporate users

The members registered themselves in the site, who buy books in large

quantities are denoted as corporate users. This category of users include library and

book sellers (shopkeepers). The discount percentage will be more for the corporate

users comparing to that of the retail users. The corporate users can search books,

purchase books, rate and comment on the books.

5.3.3 Retail users

Members, who buy books in retail, are classified as retail users. These

members can search and purchase books at a discount price applicable to them based

on the points assigned to them depending upon the number of books that they have

purchased so far. They can also suggest books to the other members or non-members.

Page 17: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

9

5.3.4 Administrator

The administrator is the person who manages the overall system. It is (s)he

who has the right to send SMS/Email to the customers. The registration link and the

verification code are generated by the admin. The admin can view all the details of

the customer in the database including their purchase history. He/she can also assign

points to the users based on their transaction with the Bookiepedia site.

5.3.5 Stock manager

The stock manager maintains the overall stock of the books available in the

Bookiepedia site. He can add books to the stock and can also remove them.

Page 18: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

10

5.4 Architecture Diagram

APPLICATION LAYER BUSINESS LAYER DATABASE LAYER

Figure 5.4: Architecture diagram

Page 19: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

11

5.5 Class Diagram

Figure 5.5: Class diagram

Page 20: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

12

5.6 Specific Requirements

1. Use case report

2. Activity diagrams

3. Sequence diagrams

5.6.1 Use Case Reports

This table gives details about the activities that could be done by the actors and

their descriptions.

S. No Activity Actor(s) Description

1. Register Non-member Non-members must fill up the

registration form in order to become

members of the site. Once this is

done, the administrator will confirm

their registration after verifying their

mobile number and E-mail ID.

2. Login Corporate user, retail

user, administrator

Upon giving the user name and

password in the corresponding

fields, the users are allowed to login

if their password matches with their

corresponding user name.

3. Logout Corporate user, retail

user, administrator

Once the user clicks the logout

button, the user will logged out and

then their login status will be

updated.

Page 21: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

13

4. Search Corporate user, retail

user, administrator,

Non-member

After the selection of the

category, author and typing of the

keywords, a list of matching books

will be displayed.

5. Subscribe Corporate user, retail

user

Once the customer is subscribed

for particular categories of books,

he/she will be intimated via SMS

upon arrival of new books of that

category.

6. Purchase Corporate user, retail

user

The customers can purchase

books. The corporate users will be

making a bulk purchase, whereas the

retailers used to make retail

purchase.

7. Cancel order Corporate user, retail

user

Placed order will be

canceled ,if the status is not sent,

after getting the reason for

cancellation.

8. Make

payment

Corporate user, retail

user

By choosing any one of the five

payment types, the member can

make payment for purchasing the

books.

9. Feedback Corporate user, retail

user, non-member

Members and non-members can

share their views about the website

and they can also give any

suggestion for the improvement of

the website.

Page 22: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

14

10. Order status Corporate user, retail

user

Members can view the status of

the given order by entering the given

order ID.

11. Live help

(chat)

Corporate user, retail

user

Any issue related to the website

in purchasing, subscribing, etc. can

be clarified via live chat .

12. Rate book Corporate user, retail

user

Members can add some value

to the book by rating it .

13. Send invites Corporate user, retail

user

Members can send invites to

their friends, who are non-members,

for joining the site.

14. Suggest

books

Corporate user, retail

user

Members can suggest books to

other members for purchasing them.

15. Unsubscribe Corporate user, retail

user

If the customer does not want to

be subscribed for a particular

category any more, he/she can

unsubscribe from that particular

category.

16. Deactivate Corporate user, retail

user

After getting the reason for

deactivation, the account will be

deactivated and then the

membership will be canceled, if the

user prefers to deactivate his/her

account.

17. Modify stock Stock manager,

administrator

Books count will be managed

by the stock manager.

Page 23: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

15

18. View stock Stock manager,

administrator

Books available in the stock can

be viewed by the stock manager and

administrator.

19. Add stock Stock manager,

administrator

New books will be will be added

to the stock by the stock manager.

20. E-mail Administrator Administrator will be sending

verification E-mail to a non-member

who has just registered and also to

the subscribed members.

21. SMS Administrator Administrator can send

verification code through SMS to a

non-member during the registration

process and also to the members

who have subscribed for at least one

category.

Table 5.1: Activities done by the Actors

Page 24: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

16

5.6.2 Activity Diagrams

5.6.2.1 Register

On clicking the register button, the registration form will be displayed. User

has to enter the username. On checking the availability of the username, further

details will be obtained from the user. After clicking the submit button, if the all the

mandatory fields are filled, then the admin will send a link to the user's mail ID and

an verification code to his/her mobile. For completing the registration process, the

verification code must be entered in the link which had been sent to the user's email.

Page 25: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

17

Figure 5.6.2.1: Activity diagram for non-member registration

Page 26: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

18

5.6.2.2 Book Search

Members have to choose the category, author and also they have to mention

some keywords of the book that they are searching for. After receiving the details, the

list of books matching the given criteria is shown to the customer.

Figure 5.6.2.2: Activity diagram for book search

Page 27: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

19

5.6.3 Sequence Diagrams

5.6.3.1 Register

When the non-member clicks the sign-up button, he/she is requested to fill

his/her details in a form. Once the form is filled by the customer, it is checked for the

validity of the username, password, date of birth, mobile number and e-mail ID. The

non-member is requested to agree with the terms and conditions and to confirm

registration. Once the non-member clicks the confirm registration button, the details

are stored in the database and a activation link is sent to the non-member's mail ID

and verification code is sent to the mobile via SMS. The customer is requested to

click the activation link, enter the verification code and click the activate button. The

activation link and the corresponding verification code are verified for match. Upon

their match, a confirmation for registration and membership ID are sent to the non-

member's mail ID and mobile via SMS.

Page 28: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

20

Figure 5.6.3.1: Sequence diagram for non-member registration

Page 29: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

21

5.6.3.2 Purchase

If the customer selects book(s) from the website, when he/she is logged in, the

books are added to the cart. The cart is displayed to the customer and the customer is

asked if he/she would like to shop more. If the customer selects the place order option

in the cart, the customer is requested for the shipping details and the payment

method. Once the customer enters the requested details, they are proceeded for the

confirm order step and by clicking the confirm order, the order ID along and the

order summary are sent to the customer through SMS and Email respectively.

Page 30: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

22

Figure 5.6.3.2: Sequence diagram for place order

Page 31: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

23

6. PROJECT DESCRIPTION

Several features have been implemented in our project. Those features are

explained as follows.

SMS

The SMS functionality has been added to this project with the help of 2 servers

namely the WebSphere Application Server (Web server) and the SMS server

(Android server). The SMS server is implemented in Android using the Java

language. Whenever the Web server sends data to the SMS server, the SMS server

receives that data and sends the data as SMS to the designated member’s mobile

number.

Report Generation

Once the books are delivered to the members, an invoice is generated as a

Portable Document Format and is being sent to them via email attachment. This PDF

generation is done with the help of the IText API available for Java.

Security

Since all form field values are verified for correctness before submitting, this

site will never be affected by XSS (Cross site scripting) attack. If the user enters

invalid login credentials subsequently more than 3 times, he/she will have to enter a

CAPTCHA to proceed with the sign in process. Hence, it is merely impossible to

perform brute force password cracking. Moreover, the members’ passwords are

stored securely in encrypted format in the database using the famous Vignere Cipher

encryption algorithm.

Page 32: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

24

Email

The JavaMail API is used for automating the process of sending email to the

clients whenever required. Whenever a new user registers into Bookiepedia, an email

with the verification link is being sent to the clients in order to verify his/her email

ID. Only after clicking on the verification link, the account will be activated.

Search

The users can search for the books using ISBN, title of the book or name of

one of the authors of the book. If no book is found with the exact match, then a

related search is performed by

1. Splitting the words in the given search string,

2. Removing a character,

3. Inserting a character,

4. Swapping adjacent characters and

5. Replacing a character by some other character

If a result is still not found, a message is displayed to the user.

Page 33: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

25

7. SCREEN SHOTS

Figure 7.1: Screenshot of ‘About Us’ page

Figure 7.2: Screenshot of ‘Order confirmation’ page

Page 34: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

26

Figure 7.3: Screenshot of ‘Registration’ page

Figure 7.4: Screenshot of ‘Order status’ page

Page 35: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

27

Figure 7.5: Screenshot of ‘Resell’ page

Figure 7.6: Screenshot of ‘Search’ page

Page 36: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

28

8. PSEUDO CODE

8.1 Ajax Code:

function getXMLObject()

{

if(typeof XMLHttpRequest!="undefined")

return new XMLHttpRequest();

else if(window.ActiveXObject)

{

var aVersions= [

"MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XML

Http","Microsoft.XMLHttp" ];

for(var i=0;i<aVersions.length;i++)

{

try

{

var oXHR=new ActiveXObject(aVersions[i]);

return oXHR;

}

catch(oError)

{

}

}

throw new Error("Your browser does not support AJAX");

}

function openXML(lang, file)

{

Page 37: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

29

com_http.open("GET", "xml/" + lang + "/" + file, false);

com_http.send();

com_doc=com_http.responseXML;

return com_doc;

}

function openSpecificXML(lang, file)

{

com_http.open("GET", "xml/" + lang + "/" + file, false);

com_http.send();

spe_doc=com_http.responseXML;

return spe_doc;

}

8.2 JavaScript Code:

function checkUserName(req)

{

var status = document.getElementById("val_uid");

var reg = RegExp("^[a-zA-Z][a-zA-Z0-9_]{5,19}$");

var text = document.getElementsByName("username")[0].value;

if(text.length > 0)

{

if(text.length < 6)

status.innerHTML="Enter at least 6 characters";

else if(!reg.test(text))

status.innerHTML="Use alphanumeric characters and '_' only";

else

{

Page 38: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

30

var ajax = getXMLObject();

ajax.open("get", "ajax/check_user.jsp?uid=" + text, true);

ajax.onreadystatechange = function()

{

if (ajax.readyState == 4)

{

if (ajax.status == 200 || ajax.status == 304)

var stat = ajax.responseText;

}

};

ajax.send(null);

}

8.3 Java Code for SQL Processing using Locking:

try

{

Class.forName(database_driver);

con = DriverManager.getConnection(database_url, database_username,

database_password);

tmp = con.createStatement();

rs = tmp.executeQuery("SELECT SUM(COUNT*COST) FROM WISHLIST WHERE

MID='" + mid + "'");

int amount = 0;

if(rs.next())

amount = rs.getInt(1);

else

return;

con.setAutoCommit(false);

Page 39: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

31

String qry = "INSERT INTO ORDER VALUES('" + oid + "', CURRENT DATE, 'O', '" +

mid + "', " + (amount < FREE_AFTER? amount + CHARGE: amount) + ", " + (message != null?

("'" + message + "'"): "null") + ", '" + fname + "', '" + lname + "', '" + dno + "', '" + st1 + "', '" + st2 +

"', '" + city + "', '" + pin + "', '" + state + "', '" + country + "', '" + mobile + "', '" + w + "')";

System.out.println(qry);

stmt = con.prepareStatement(qry);

if(stmt.executeUpdate() == 0)

{

con.rollback();

return;

}

if(stmt != null)

stmt.close();

tmp = con.createStatement();

rs = tmp.executeQuery("SELECT * FROM WISHLIST WHERE MID='" + mid + "'");

while(rs.next())

{

String isbn = rs.getString("ISBN");

int count = rs.getInt("COUNT");

qry = "INSERT INTO ORDER_DETAILS VALUES('" + oid + "', '" + isbn + "', " +

count + ", " + rs.getInt("COST") + ")";

stmt = con.prepareStatement(qry);

if(stmt.executeUpdate() == 0)

{

con.rollback();

return;

}

if(stmt != null)

stmt.close();

Page 40: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

32

qry = "UPDATE BOOK SET NEW_COUNT=NEW_COUNT-" + count + ",

PURCHASE_COUNT=PURCHASE_COUNT+" + count + " WHERE ISBN='" + isbn + "'";

stmt = con.prepareStatement(qry);

if(stmt.executeUpdate() == 0)

{

con.rollback();

return;

}

}

con.commit();

con.setAutoCommit(true);

b = new StringBuilder("Order successfully placed.");

}

8.4 SMS Sending Code:

import java.io.DataOutputStream;

import java.net.Socket;

interface Settings

{

String IP = "172.16.5.2";

int PORT = 4444;

String DELIMITER = "~";

}

class SMS

{

static String mobile;

static String message;

}

Page 41: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

33

try

{

SMS.mobile = mob;

SMS.message = mes;

Socket clientSocket = new Socket(IP, PORT);

DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());

outToServer.writeBytes(SMS.mobile + DELIMITER + SMS.message);

clientSocket.close();

}

8.5 Mail Sending Code:

{

int port = 25000;

ServerSocket serverSocket = new ServerSocket(port);

System.out.println("Mail Server Started and listening to the port 25000.\n");

while(true)

{

//Reading the message from the client

socket = serverSocket.accept();

InputStream is = socket.getInputStream();

InputStreamReader isr = new InputStreamReader(is);

BufferedReader br = new BufferedReader(isr);

String TO="",TEXT="",SUBJECT="";

TO = br.readLine();

SUBJECT = br.readLine();

TEXT = br.readLine();

GmailSender aa= new GmailSender(TO,SUBJECT,TEXT);

aa.send();

Page 42: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

34

OutputStream os = socket.getOutputStream();

OutputStreamWriter osw = new OutputStreamWriter(os);

bw = new BufferedWriter(osw);

bw.write("Mail Sent Successfully\n");

System.out.println("Mail sent successfully!");

bw.flush();

}

8.6 XML Code:

<sign_up>

<title>Register into Bookiepedia</title>

<fname>First Name</fname>

<lname>Last Name</lname>

<username>User Name</username>

<password>Password</password>

<confirm_password>Confirm Password</confirm_password>

<mobile_no>Mobile Number</mobile_no>

<email>Email</email>

<gender>Gender</gender>

<male>Male</male>

<female>Female</female>

<dob>Date Of Birth</dob>

<door_no>Door Number</door_no>

<street1>Street1</street1>

<street2>Street2</street2>

<city>City</city>

<pincode>PIN Code</pincode>

<state>State</state>

Page 43: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

35

<country1>India</country1>

<member_type>Member Type</member_type>

<iagree>I Agree the Terms and Conditions.</iagree>

<aemail>Send me email updates.</aemail>

<asms>Send me SMS updates.</asms>

<submit_button>Submit</submit_button>

</sign_up>

8.7 Java Servlet Pages Code:

<form action="sign_in.jsp" method="post" >

<input type="hidden" value="<%=request.getParameter("returnurl")%>" name="returnurl" />

<input type="hidden" value="Invalid username and password combination. Please try again"

name="content" />

<table border="0" cellpadding="3px" cellspacing="3px" >

<tr><td><span id="signin_uname" >Username/Email ID</span></td>

<td><input type="text" name="username" /></td></tr>

<tr><td align="right" ><span id="signin_passwd" >Password</span></td>

<td><input type="password" name="password" /></td></tr>

<tr><td><a href="sign_up.jsp" style="color:blue;" ><span id="signin_register">Sign

up</span></a></td>

<td align="right" ><input type="submit" value="Sign in" id="signin_button" /></td></tr>

</table>

</form>

Page 44: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

36

9. CONCLUSION

With a user-friendly interface, Bookiepedia is an easy to use Online

Book Purchase website, which has been successfully implemented by us. In

this project, we have developed a web application for the purchase of books on

line, using appropriate methods and algorithms. Comparing to the existing on

line shopping sites, our application is designed in such a way that the

efficiency is much better. We have successfully experimented on the

implementation.

Page 45: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

37

10. FUTURE ENHANCEMENTS

Online Payment

As of now, Cash on Delivery is the only payment method that is allowed in

Bookiepedia. In future, online payment will be made possible, so that the members

Mobile Search

In future, mobile search can be made possible by using the broadcast receiver

concept available can make the payment with at ease.in Android, so that searching of

books can be done from anywhere even without a computer system.

QR/Bar Code Generation

If a QR code is generated for the Order ID, then the users can check the status

of their order, simply by scanning it. Also, it will be easy for the administrators to

change the order status.

Social Networking Integration

Social networking is the ruling the Internet world, now-a-days. With social

networking integration of Bookiepedia into Facebook, the members will be able to

suggest books to their Facebook friends directly from Bookiepedia.

Page 46: ONLINE BOOK SALES WITH MOBILE SMSmcs142144/documents/Bookiepedia_report.pdfBONAFIDE CERTIFICATE Certified that this mini project report “ONLINE BOOK SALES WITH MOBILE SMS” is the

38

11. REFERENCES

1. http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14877865

2. http://www.ibm.com/developerworks/forums/thread.jspa?threadID=263760

3. www.flipkart.com

4. http://publib.boulder.ibm.com/infocenter/cmgmt/v8r3m0/index.jsp?topic=%2Fcom.ibm.sysad

min.hlp%2Fcsa10010.htm

5. http://www.google.co.in/url?sa=t&rct=j&q=find+db2+port+number&source=web&cd=2&cad

=rja&ved=0CDkQFjAB&url=http%3A%2F%2Fwww.dbforums.com%2Fdb2%2F1217368-

how-find-db2sport-

number.html&ei=SuPfUPnJDcTQrQfcuIHAAg&usg=AFQjCNH6V8WBQGBpuCsXdNmGH

FR0tw1XMA&bvm=bv.1355534169,d.bmk

6. http://technonstop.com/db2-database-ubuntu-linux

7. http://www.ibm.com/developerworks/forums/thread.jspa?threadID=231439

8. http://publib.boulder.ibm.com/infocenter/cmgmt/v8r3m0/topic/com.ibm.sysadmin.hlp/csa1001

0.htm

9. http://www.ibm.com/developerworks/forums/message.jsp?messageID=14826110

10. http://www-01.ibm.com/software/data/db2/express-c/

11. http://www-01.ibm.com/software/data/db2/express-c/download.html

12. http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=

%2Fcom.ibm.db2.luw.admin.cmd.doc%2Fdoc%2Fr0002029.html

13. http://www.dbforums.com/db2/1622381-db2-error-db2-sql-error-sqlcode-204-sqlstate-42704-

sqlerrmc.html

14. http://www-01.ibm.com/support/docview.wss?uid=swg21503879

15. http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r1mx/index.jsp?topic=/com.ibm.wsadap

ters.610.jca_jdbc.doc/doc/rjdb_problemsolutions.html

16. http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etoo

ls.mft.doc%2Fac00415_.htm

17. http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad

min/c0004821.htm

18. http://www.javadocexamples.com/java_source/__/re/ResultSetUpdate.java.html

19. http://www.ibm.com/developerworks/forums/message.jspa?messageID=14159474

20. http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.

doc.intro%2Fsrc%2Ftpc%2Fdb2z_stringdatatypes.htm

21. http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.

admin.dbobj.doc%2Fdoc%2Ft0020098.html

22. http://blog.boringguys.com/2006/10/db2-creating-faking-boolean-datatype.html