案例CS之Website it案例 Software Development Workshop On
当前位置:以往案例 > >案例CS之Website it案例 Software Development Workshop On
2018-09-06

project Two

Software Development Workshop One

Hand-in date: May 22th Tue 23:00

The project requires you to create a basic mini website for a car loan & insurance Company with Credit Score.  Users are expected to login or register. Admin can list all user’s details and credit score.

You will create:

· Login page

o Check username exist in the database

o display users details on successful login

· Registration page

o Check username doesn’t already exist

o Validate password criteria

o Calculate Age from ID card number

o calculate credit score and

o store data in the database table: usertable

· User List

o list all users in the database

o list in a html table with headings and last row shows the number of users displayed

Login form – (login.php)

Registration Form – (registration.php)

User List – (userList.php)

Username


Password




On successful login:

display users details:


NameMax HeadroomAge34Credit Score275

Link to Registration Page

Username –  (input text) – (check if exist)

Password –  (input text) – (validate)

· 10 + characters

· Start and end with uppercase

· 2 non-alphanumeric

· Minimum of 2 numerical characters

· Minimum of 2 lowercase

Confirm password  (input text)


Family Name (input text)

First Name (input text)

ID card number (input text)

Gender: Male or Female (radio button)

Province (select) – 4

· Municipalities

· Province

· Autonomous

· SAR

Loans (checkboxes)

· Loan for the house

· Master card

· Visa

· Store Card

· Other loan

Submit button


Link to Login Page

Display in a HTML table

Output 1 user record per row.


Users details:

· Family name

· Id number

· Age

· Gender

· Credit score



PHP:

· Process the form for login and registration

· Login

o Check whether the username and ID number match the information stored in database.

o Display users’ details – Full Name, Age, Credit Score

· Registration

o Calculate Age from ID Card No.

o Calculate Credit Score (initial score set to 0)

§ Male:     18-24yrs (credit -50), 25-40yrs (credit +25), 41-60yrs (credit +40), 61+ (credit +11)

§ Female: 18-24yrs (credit +25),  25-40yrs (credit +50), 41-60yrs (credit +40), 61+ (credit +1)

§ Municipalities (+100), Province (+60), Autonomous (+72), SAR (+123)

§ Loan for the house (+200), Master card (+55), Visa (+50), Store Card (-25), Other loan (-100)

o Create the function creditScoreCalc() just for calculating the credit score

o Create the function insertNewMember(parameters) for inserting user data

· User List

o Output userlist


· MySQL –

o Table – usertable.sql

Field names

comment

customernumber

int(10) Primary Key AUTO_INCREMENT

主键自增

username

varchar (30)

password

varchar (30)

id_number

varchar(18)

firstname

varchar (30)

familyname

varchar (30)

age

int (3)

gender

varchar (1)

M / F

houseloan

varchar (1)

Y / N

mastercard

varchar (1)

Y / N

visacard

varchar (1)

Y / N

storecard

varchar (1)

Y / N

otherloan

varchar (1)

Y / N

creditscore

int (10)


在线提交订单