Вы находитесь на странице: 1из 8

Php project

PROJECT
420-M14-AS

Developing web application with php & MySQL

Deadline: April, 12th 2019

Page 1
Php project

SUBJECT : CLASSIFIED ADS

The project consists in designing and developing a web application that


manages classified ads.

The project is divided into two phases:

Phase I: Design, implementation and validation of the database using


MySQL relational database management system

Phase II: Development of the application and implementation of user


interfaces using php (classes and programs), html, css, javascript and Ajax.
(Other elements can be added)

STAGE I : DESIGN, IMPLEMENTATION AND VALIDATION OF THE


DATABASE

I. 1/ DESIGN OF THE DATABASE : (10% OF PROJECT MARK)

The purpose of this step is to design a database that corresponds to the


information of web site that manages classified ads. (Eg www.lespac.com or
www.kijiji.com)

To help you, below some information / guidelines to consider:

1. The website is presented in several languages and corresponding flags (ex:


french, english)
2. If any user wants to post and Ad he must registered to Ad web site
3. To register : the user enters his name, address, city, state, phone, email and
password (you can use for the identification information : the username
(=email), and the password (its length is greater than 6 characters and must
contain at least one uppercase and lowercase letter and one digit)
4. Any registered user become a member of the system and can be either
(administrator, employee or member)
5. The system will grants Ad discounts for the lucky members.(See 11)
6. An Ad belongs to only one category and one sub category.
7. An Ad may contain one or many articles (the articles are given and entered in
the Ad description. The article information are : name, price, quantity, …There
is no question to have a logical structure to store the article).
8. When the Ad description has many articles that belong to many categories
(and/or sub categories), I suggest that you assign the Ad to the category: “no
category”.(sub category : “no sub category”.
9. Each ad has a start date (register date) and end date (expire date)
10. There are two types of Ads:
- Free ads: Are located in the area of free ads(see ad section 2
below). A Free ad doesn’t have a picture and its duration doesn’t
exceed 10 days. After this period it will be deleted (the system informs
the administrator to delete this Ad)

Page 2
Php project

-Paid ads : Are located in a reserved area (top of the web page (left
right most recent ad  oldest ad) ) (see ad section 1 below).

The payment of the ad is given in the following sheet :

Payment Max number of Duration


pictures
5$ 1 Less than 1 weeks
10$ >=1 and <=5 More than 1 and less than
2 weeks
15$ >=1 and <=10 More than 2 weeks and
less than 1 month

When the number of picture exceed the maximum number in the sheet, an
increase of 0.5$/picture is applied.

11. Every day the system performs a drawing lots of members, the lucky
member will receive a discount between 10 – 50% of the payment of the one
member Ad. The discount has an expired date (7 days after drawing lots date)

Question I: By using ERD, design the database of classified ads

Page 3
Php project

I.2/ IMPLEMENTATION OF THE DATABASE:

Using MySQL, Create a database and add some data (choose a real data)

I. 3: Validation of the database

The goal of the step of the project is to validate your database by answering to the
request bellow

Q1- Website language:


- Display categories in English or French
(category id, category description)

Q2- Members:
- Members: (id,name,address,phone,email,member type,password)
- Member’s ads: (ad id, description, register date, expire date, image,category id)

Q3- Payment:
- Member’s payment : (ad id, payment of the add, total number of images , total
payment)

Q4- All type of Ads :


- Ads per category : Ad id, ad description, image, register date, category id,
category name ordered in descending order of register date

Q5- Paid ads :


- Paid ads : Ad id, ad description, image, register date ordered in descending
order of register date

If your database can answer to all questions, your database is validated if not, you
have to review your database and make some changes

Page 4
Php project

STAGE II : DEVELOP THE APPLICATION

II.1 / BUILD CLASSES :

1) Based on object-oriented programming, create the php classes

 Is the responsibility of the team to determine which class to create.


 Every class must have : constructor, setters and getters, toString create,
update, delete and find (for data manipulation, data query you must use PDO)

II. 2/ BUILD USER INTERFACES AND VALIDATE DATA


The purpose of this step is to design and implement user interfaces using HTML,
CSS, Javascript and integrate php classes, programs and ajax
Start doing the following interfaces:

 Members user Interface: It allows for basic operations (addition,


modification, deletion, consultation, and suspension list)

 Use a captcha to prevent infinite data entry with robot


 Provide a field to confirm the password
 Do not forget to do the validation at the client side

Note:
 There's a member who is the administrator of the site. The latter

has the right to do all the operations on the data (add,


update, find, delete, and suspend a member, disable ad, etc.. )

 Category interface : In this interface you enter different categories (and sub
categories)

 Ads interface : This interface allows manipulate ads and provides the
following tasks

 Post : add, modify, delete and view ads


 List all ads of a member (including the status of each ad, total payment )
 Pay ads (ex push button pay ads )
 Task to hide/disable an ad if is not already paid (by administrator

Page 5
Php project

 Design of the user interface of the website

Menu

ad-section1

Search: ............

category 1 category 2 category n


... ... ...

ad-section 2 ad-section 2 ad-section 2

Menu : contains like the options : French, English, Register, PostAdd,...


ad-section1 : contains the paid ads ordered (left-right) from recent posted
date..oldest posted date
ad-section2 : contains category1 followed by a list of ads (free ads)
Search : Find all ads that meet the search criteria

Example 01:

Page 6
Php project

Example 02:

When you click on a specific ad, additional information will be displayed

Page 7
Php project

Schema 1 (Example)

Menu

Area of paid ads displayed in descending order of date of registration (left-right)

Area search criteria

Area free ads displayed per category

Page 8

Вам также может понравиться