Vous êtes sur la page 1sur 158

Web Based Member

Management
System
For Engineering Society of KDU

2014
Name of the Candidate: S.L.D De Silva
Membership Number: 990403816
Level of Project: Professional Graduate Diploma in IT
Submitted in: August 2014

BCS Professional Project

S.L.D De Silva 990403816

Declaration
I hereby certify that this documentation is my own work and effort and that it has not been
previously submitted for a Degree or a Diploma in any University. The information that has
been extracted from other sources has been included in the references.

______________________
Signature

______________________
Date

Sembukuttige Lahiru Darshana De Silva


(Name of the candidate)

i
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Abstract
General Sir John Kotelawala Defence University (KDU) is a University in Sri Lanka which
offers Undergraduate and Postgraduate Degree programmes in various disciplines for both
military and as well as civil students. Engineering Society (ESKDU) is a student based society
comprised of students who read for degree programmes in engineering disciplines of this
university. Due to the rapid expansion of resources of the university, the student intake has
been exponentially increased, which has resulted in increase of members of the society.
Therefore, managing this vast number of members of different Engineering specializations
has been an issue to the board of officials of the society. Especially things like
communicating a message to a certain target group, finding the opinion of members in
decision making and managing new registrations which have been the major difficulties
faced by officials where all these tasks are done manually.
Therefore to overcome these difficulties and provide a more efficient way for managing
members, a web based solution is the most ideal option that can be selected. A web based
member management system benefits officials by helping them manage their workload
more efficiently and also benefit members by providing a new user experience with the
society and other members of the society. Providing web based profiles to members
increase the enthusiasm of current members which enhances member retention and also
helps attracting new members who would like to experience these facilities. Moreover, it
enhances the connection between officials and members of the society.
The developed solution includes separate sections providing different functionalities for
both members and administrators. The website does not provide ability to make online
payments since transactions handled by the society is limited.
This system is designed using open source web technologies such as PHP, HTML 4 and 5,
JavaScript, CSS 3, MySQL and jQuery libraries. These technologies provide a wide range of
online support and much flexibility when developing the system since these have been tried
and tested by many experts and these are being used in almost all of the websites today.
System Testing is carried out while developing the solution component wise. In addition,
after developing the system, user feedback can be used to make any amendments to the
website. Initial Implementation of the website is done using a free hosting service which
provides support to all the technologies used, and also provides considerable database
space. Also a free domain service is used as the domain of the web site.

ii
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Acknowledgement
This project would not have become successful if it had not been for the support and
guidance I received. This diminutive but thankful word is for their support.

First of all, I would like to thank my project supervisor Mr. Daminda Herath, Lecturer of Esoft
Computer Studies, Sri Lanka for the guidance and support provided throughout the project
and for providing assistance in certain tough situations that had occurred while carrying on
this project and also I would like to thank him for spending his valuable time in guiding me.

My gratitude also goes to Mr.Umesh Tharinda, President of the Engineering Society of KDU
for providing me the opportunity to carry on the project for their society and for providing
any required help and resources when needed.

My father and my mother who have always been supportive are acknowledged with great
respect.

Finally, I could not have put this project together without a little help from some special
friends who provided valuable information, guidance, comments as well as lots of moral
support throughout this project.

iii
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Table of Contents
Declaration ............................................................................................................................................... i
Abstract ................................................................................................................................................... ii
Acknowledgement ................................................................................................................................. iii
Table of Contents ................................................................................................................................... iv
List of Acronyms ..................................................................................................................................... xi
Table of Tables ..................................................................................................................................... xvi
1. Introduction ........................................................................................................................................ 1
1.1

Requirement for the new system ........................................................................................... 1

1.2

Analysis of the current System ............................................................................................... 1

1.2.1

Current Operations ......................................................................................................... 1

1.2.2

Flaws of the current system ............................................................................................ 2

1.3

Proposed solution ................................................................................................................... 2

1.3.1

Available options ............................................................................................................. 2

1.3.2

Selected option ............................................................................................................... 2

1.3.3

Development Environment ............................................................................................. 3

1.4

Project Goal and Deliverables ................................................................................................. 3

1.4.1

Project Goal ..................................................................................................................... 3

1.4.2

Deliverables and Objectives ............................................................................................ 3

1.4.3

Expected advantages ...................................................................................................... 4

1.5

Project Architecture ................................................................................................................ 5

1.6

Project Limitations .................................................................................................................. 6

2. Requirement Specification .................................................................................................................. 7


2.1

Introduction ............................................................................................................................ 7

2.2

Facts gathered......................................................................................................................... 7

2.3

Fact finding techniques used .................................................................................................. 8

2.4

Functional Requirements ......................................................................................................10

2.4.1

Members .......................................................................................................................10

2.4.2

Administrators ..............................................................................................................11

2.4.3

Guests ...........................................................................................................................13

2.5

Non-functional Requirements ..............................................................................................13

2.5.1

Reliability .....................................................................................................................13

2.5.2

Availability ...................................................................................................................13
iv

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


2.5.3

Security.........................................................................................................................13

2.5.4

Usability .......................................................................................................................14

2.5.5

Portability ....................................................................................................................14

2.5.6

Flexibility .....................................................................................................................14

2.6

Hardware Specification .........................................................................................................15

2.6.1

Developer ......................................................................................................................15

2.6.2

User (Minimum Requirements) ....................................................................................15

2.7

Software specification...........................................................................................................15

2.7.1

Developer ......................................................................................................................15

2.7.2

User ...............................................................................................................................15

2.8

Requirement verification and validation (V and V) ..............................................................16

3. System Design ...................................................................................................................................17


3.1

Introduction ..........................................................................................................................17

3.2

Available standard system development methodologies.....................................................17

3.3

Selected methodology SSADM...........................................................................................17

3.4

Introduction to SSADM .........................................................................................................18

3.4.1

Stage 1 - Feasibility Study .............................................................................................18

3.4.2

Stage 2 - Investigation of the current environment .....................................................18

3.4.3

Stage 3 - Business systems options ...............................................................................18

3.4.4

Stage 4 Requirements Specification...........................................................................19

3.4.5

Stage 5 - Technical Systems options .............................................................................19

3.4.6

Stage 6 - Logical Design .................................................................................................19

3.4.7

Stage 7 - Physical design ...............................................................................................19

3.5

Feasibility Study ....................................................................................................................20

3.5.1

Technical Feasibility ......................................................................................................20

3.5.2

Operational Feasibility ..................................................................................................20

3.5.3

Schedule Feasibility .......................................................................................................21

3.5.4

Economic Feasibility ......................................................................................................21

3.5.5

Legal Feasibility .............................................................................................................21

3.6

Investigation of the current environment ............................................................................22

3.7

Business Systems Options .....................................................................................................22

3.8

Requirement Specification ....................................................................................................22

3.9

Technical Systems options ....................................................................................................22

3.9.1

Internal hosting .............................................................................................................22


v

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


3.9.2
3.10

External Hosting ............................................................................................................22

Logical Design........................................................................................................................24

3.10.1

Data Flow Diagrams(DFD) .............................................................................................24

3.10.2

Entity Relationship Diagrams ........................................................................................25

3.11

Physical Design ......................................................................................................................25

4. Physical Design ..................................................................................................................................26


4.1

Introduction ..........................................................................................................................26

4.2

Database design ....................................................................................................................26

4.3

User interface design ............................................................................................................29

4.3.1

Introduction ..................................................................................................................29

4.3.2

Home Page ....................................................................................................................29

4.3.3

Guest .............................................................................................................................31

4.3.4

Administrator ................................................................................................................32

4.3.5

Member ........................................................................................................................43

4.4

Security measures .................................................................................................................50

4.4.1

Password security .........................................................................................................50

4.4.2

Access restriction ..........................................................................................................50

5. Implementation ................................................................................................................................51
5.1

Introduction ..........................................................................................................................51

5.2

Development Environment ...................................................................................................51

5.2.1

Hardware and software requirements .........................................................................51

5.2.2

Tools, Packages and Languages used ............................................................................51

5.3

Implementation Environment...............................................................................................52

5.3.1

Client .............................................................................................................................52

5.3.2

Server ............................................................................................................................52

5.4

Reasons for choosing these options .....................................................................................53

5.4.1

PHP ................................................................................................................................53

5.4.2

MySQL ...........................................................................................................................53

5.4.3

MySQL Workbench .......................................................................................................53

5.4.4

Apache ..........................................................................................................................53

5.4.5

XAMPP...........................................................................................................................53

5.5

Implementation Procedure ...................................................................................................54

5.5.1

Hosting on developer environment ..............................................................................54

5.5.2

Hosting on client machine ............................................................................................54


vi

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


5.5.3

Getting client views and making changes .....................................................................54

5.5.4

Hosting ..........................................................................................................................54

5.5.5

Domain..........................................................................................................................55

5.6

Training .................................................................................................................................55

5.7

Configuration ........................................................................................................................55

6. Testing ...............................................................................................................................................56
6.1

Introduction ..........................................................................................................................56

6.2

Methods of Testing ...............................................................................................................56

6.2.1

White Box Testing .........................................................................................................56

6.2.2

Black Box Testing...........................................................................................................56

6.3

Levels of Testing ....................................................................................................................56

6.3.1

Unit Testing ...................................................................................................................57

6.3.2

Integration Testing ........................................................................................................57

6.3.3

System Testing ..............................................................................................................57

6.3.4

Acceptance Testing .......................................................................................................57

6.4

Test Cases..............................................................................................................................58

6.4.1

Admin Login ..................................................................................................................58

6.4.2

Add merchandise ..........................................................................................................59

6.4.3

Search Members ...........................................................................................................60

6.4.4

Add Admin.....................................................................................................................60

6.4.5

Edit admin profile..........................................................................................................61

6.4.6

Calculate GPA for one semester ...................................................................................61

6.4.7

Vote and comment for polls .........................................................................................62

6.4.8

Add new received payment ..........................................................................................63

6.4.9

Registration of new members.......................................................................................63

6.5

Corrections and debugging ...................................................................................................64

7. Critical Appraisal ...............................................................................................................................65


7.1

Introduction ..........................................................................................................................65

7.2

Evaluation of the end product ..............................................................................................65

7.3

Lessons learned .....................................................................................................................65

7.4

Strengths of the system ........................................................................................................66

7.4.1

Platform independence ................................................................................................66

7.4.2

Higher Benefit to cost ratio ...........................................................................................66

7.4.3

Easy setup and upgrading .............................................................................................66


vii

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


7.4.4

User-friendliness ...........................................................................................................66

7.4.5

Accessibility from any place ..........................................................................................66

7.4.6

Use of tried and tested technology ..............................................................................66

7.5

Weaknesses of the system ....................................................................................................67

7.5.1

Bandwidth limitation ....................................................................................................67

7.5.2

Potential risk of data security .......................................................................................67

7.5.3

Non-mobile optimized ..................................................................................................67

7.5.4

Occurrence of unfound bugs ........................................................................................67

7.6

Future additions ....................................................................................................................67

7.7

Conclusion .............................................................................................................................68

8. Bibliography ......................................................................................................................................69
Appendices............................................................................................................................................71
Appendix A Logical Design .................................................................................................................71
A.1

Data Flow Diagrams ..............................................................................................................71

A.1.1 Level 1 DFD for Members ....................................................................................................71


A.1.2 Level 1 DFD for Administrators ............................................................................................72
A.1.3 Level 1 DFD for Guests .........................................................................................................73
A.2

Use Case diagrams ................................................................................................................73

A.2.1 Use case diagram for Guests ...............................................................................................73


A.2.2 Use case diagram for Members ...........................................................................................74
A.2.3 Use case diagram for category 1 Administrators ................................................................75
A.2.4 Use case diagram for category 2 Administrators ................................................................76
A.2.5 Use case diagram for category 3 Administrators ................................................................77
A.3

Database Table Structures ....................................................................................................77

Appendix B Important Code...............................................................................................................83


1.

Admin ....................................................................................................................................83
1.1

Add admin - addadminprocess.php ..................................................................................83

1.2

Posts - postaddprocess.php ..............................................................................................83

1.3

Accept Registrations acceptregistrationprocess.php ....................................................86

1.4

Committee admins/committee/index.php ....................................................................87

1.5

Admin login .......................................................................................................................88

2.

Members ...............................................................................................................................89
2.1

Notifications members/posts/postsNormal.php ...........................................................89

2.2

Academic Records .............................................................................................................91


viii

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


Appendix C Sample Data ..................................................................................................................103
C.1 Admin Login ..............................................................................................................................103
C.2 Member Login ...........................................................................................................................103
Appendix D Reports Generated .......................................................................................................104
1.

Administrators ....................................................................................................................104
1.1

Generate Financial Statements .......................................................................................104

1.2

View administrator details and edit status .....................................................................104

1.3

Event Registrations .........................................................................................................105

1.4

Member search and evaluation ......................................................................................106

1.5

View Committee .............................................................................................................107

1.6

Notification report ..........................................................................................................108

1.7

Poll report .......................................................................................................................108

2.

Members .............................................................................................................................109
2.1

Academic Records ...........................................................................................................109

2.2

Member Payments..........................................................................................................111

2.3

Committee ......................................................................................................................111

Appendix E User Manual ..................................................................................................................112


1.

Admin ..................................................................................................................................112
1.1

Logging in ........................................................................................................................112

1.2

Posts ................................................................................................................................112

1.3

Polls .................................................................................................................................114

1.4

Merchandise ...................................................................................................................115

1.5

Process Merchandise Payments .....................................................................................116

1.6

Add new administrators..................................................................................................117

1.7

Appoint Committee.........................................................................................................119

1.8

Edit standard fees ...........................................................................................................120

1.9

Add Income .....................................................................................................................121

1.10

Sign out ...........................................................................................................................122

2.

Member ..............................................................................................................................123
2.1

Notifications ....................................................................................................................123

2.2

Polls .................................................................................................................................124

2.3

Order merchandise .........................................................................................................125

2.4

Add Academic Records ...................................................................................................125

2.5

Edit / Delete academic records .......................................................................................127


ix

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


2.6

Calculate GPA for one semester .....................................................................................128

2.7

Plan GPA ..........................................................................................................................129

2.8

Calculate Final GPA .........................................................................................................130

2.9

Edit Profile .......................................................................................................................131

2.10

Sign out ...........................................................................................................................131

2.11

Reset forgot password ....................................................................................................132

Appendix F Hosting ..........................................................................................................................134


1.

Registration .........................................................................................................................134

2.

Creating the web site ..........................................................................................................135

3.

Creating and importing database .......................................................................................135

4.

Uploading Files ....................................................................................................................137

5.

Initializing web site .............................................................................................................138

Appendix G GPA Calculation Details ................................................................................................139


Appendix H Evaluation Form............................................................................................................141

x
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

List of Acronyms
AJAX - Asynchronous JavaScript and XML
BO Board of Officials
CD ROM - Compact Disc Read Only Memory
CSS - Cascading Style Sheets
DBMS - Database Management Systems
DFD Data Flow Diagram
DSDM Dynamic System Development Methodology
ELH Entity Life Histories
ER - Entity Relationship
ESKDU Engineering Society Kotelawala Defence University
GUI - Graphical User Interface
HTML - Hypertext Mark-up Language
KDU - Kotelawala Defence University
MD5 Message Digest algorithm
PDF - Portable Document Format
PHP - Hypertext Pre-processor
PMBOK Project Management Body of Knowledge
RAD - Rapid Application Development
SDLC System Development Life Cycle
SHA - Secure Hash Algorithm
SSADM - Structured Systems Analysis and Design Methodology
SQL - Structured Query Language
URL - Uniform Resource Locator
*In this document, the word admin means administrator and the word admins mean
administrators.

xi
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Table of Figures
Figure 1.6.1 Client Server Architecture 1 ............................................................................... 5
Figure 1.6.2- Client Server Architecture 2 ................................................................................ 6
Figure 3.2.1 System Development Methodologies ............................................................. 17
Figure 3.4.1 SSADM .............................................................................................................. 18
Figure 3.10.1.1 Context Level DFD ....................................................................................... 24
Figure 3.10.2.1 ER Diagram .................................................................................................. 25
Figure 4.2.1 Admin Table Structure ..................................................................................... 27
Figure 4.2.2 - ER Diagram with Attributes .............................................................................. 28
Figure 4.3.1 Header .............................................................................................................. 29
Figure 4.3.2 - Footer................................................................................................................ 30
Figure 4.3.3 Home Page ....................................................................................................... 30
Figure 4.3.4 Member Registration ....................................................................................... 31
Figure 4.3.4 Administrator Login ......................................................................................... 32
Figure 4.3.5 Dashboard of Category 1 Admin ....................................................................... 33
Figure 4.3.6 Dashboard of Category 2 Admin ...................................................................... 34
Figure 4.3.7 - Dashboard of Category 3 Admin....................................................................... 35
Figure 4.3.8 Admin News View ............................................................................................ 36
Figure 4.3.9 Event View ....................................................................................................... 37
Figure 4.3.10 View Polls ....................................................................................................... 38
Figure 4.3.11 Admin Merchandise View .............................................................................. 39
Figure 4.3.12 Accounts Home .............................................................................................. 40
Figure 4.3.13 View / Edit Admin Profile ............................................................................... 41
Figure 4.3.14 Member search .............................................................................................. 41
Figure 4.3.15 Accept new members .................................................................................... 42
Figure 4.3.16 Member Login ................................................................................................ 43
Figure 4.3.17 Members Area ............................................................................................... 44
Figure 4.3.18 View Events/News ......................................................................................... 45
Figure 4.3.19 View Polls ....................................................................................................... 46
Figure 4.3.20 View Merchandise for Member ..................................................................... 47
Figure 4.3.21 GPA Home ...................................................................................................... 48
Figure 4.3.22 GPA Dashboard .............................................................................................. 48
Figure 4.3.23 Contact Us ...................................................................................................... 49
Figure 6.3.1 V-model of testing levels ................................................................................. 57
Figure A.1.1 Members Level 1 DFD ...................................................................................... 71
Figure A.1.2 Level 1 DFD for Administrators........................................................................ 72
Figure A.1.3 Level 1 DFD for Guests ..................................................................................... 73
Figure A.2.1 Use case diagram for Guests ........................................................................... 73
xii
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure A.2.2 Use case diagram for Members ....................................................................... 74


Figure A.2.3 Use case diagram for category 1 Administrators ............................................ 75
Figure A.2.4 Use case diagram for category 2 Administrators ............................................ 76
Figure A.2.5 Use case diagram for category 3 Administrators ............................................ 77
Figure A.3.1 admin_login table ............................................................................................ 77
Figure A.3.2 committee table .............................................................................................. 77
Figure A.3.3 decisions table ................................................................................................. 78
Figure A.3.4 events table ..................................................................................................... 78
Figure A.3.5 expenditure table ............................................................................................ 78
Figure A.3.6 fees table ......................................................................................................... 78
Figure A.3.7 marks table ...................................................................................................... 79
Figure A.3.8 member_payments table ................................................................................ 79
Figure A.3.9 members table ................................................................................................. 79
Figure A.3.10 mem_login table ............................................................................................ 79
Figure A.3.11 merchandise table ......................................................................................... 80
Figure A.3.12 news table...................................................................................................... 80
Figure A.3.13 order_merchandise table .............................................................................. 80
Figure A.3.14 other_payments table ................................................................................... 80
Figure A.3.15 participate table ............................................................................................ 81
Figure A.3.16 payments table .............................................................................................. 81
Figure A.3.17 position table ................................................................................................. 81
Figure A.3.18 posts table ..................................................................................................... 81
Figure A.3.19 tokens table ................................................................................................... 82
Figure A.3.20 vote table ....................................................................................................... 82
Figure D.1.1 Generate Financial Statement ....................................................................... 104
Figure D.1.2 Activate / Deactivate Administrators ............................................................ 105
Figure D.1.3 Confirm Participation .................................................................................... 105
Figure D.1.4 View Member Profile..................................................................................... 106
Figure D.1.5 View Member Profile..................................................................................... 107
Figure D.1.6 View Committees for Admin ......................................................................... 107
Figure D.1.6 View Committees for Admin ......................................................................... 108
Figure D.1.6 View Committees for Admin ......................................................................... 108
Figure D.2.1 View Records ................................................................................................. 109
Figure D.2.2 View Records ................................................................................................. 110
Figure D.2.3 Member Payments ........................................................................................ 111
Figure D.2.4 Committee view for members ...................................................................... 111
Figure E.1.1 Administrator Login with error ...................................................................... 112
Figure E.1.2 Add News ....................................................................................................... 112
Figure E.1.3 Add Event ....................................................................................................... 113
Figure E.1.4 Getting embed code manually ....................................................................... 113
Figure E.1.5 Add poll .......................................................................................................... 114
xiii
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.1.6 Edit Poll .......................................................................................................... 114


Figure E.1.7 Poll Add/Edit/Delete buttons......................................................................... 114
Figure E.1.8 Add Merchandise ........................................................................................... 115
Figure E.1.9 Merchandise Buttons ..................................................................................... 115
Figure E.1.10 Merchandise Item Edit Button ..................................................................... 116
Figure E.1.11 Edit Merchandise ......................................................................................... 116
Figure E.1.12 View and mark orders .................................................................................. 117
Figure E.1.13 Updated pending orders .............................................................................. 117
Figure E.1.14 Add new admin 1 ......................................................................................... 117
Figure E.1.15 Add new admin 2 ......................................................................................... 118
Figure E.1.16 Administrator registration e-mail ................................................................ 118
Figure E.1.17 Add committee 1 ......................................................................................... 119
Figure E.1.18 Add committee 2 ......................................................................................... 119
Figure E.1.19 Add committee 3 ......................................................................................... 120
Figure E.1.20 Edit Committee ............................................................................................ 120
Figure E.1.21 Edit standard fees ........................................................................................ 120
Figure E.1.22 Select payment type .................................................................................... 121
Figure E.1.23 Select member ............................................................................................. 121
Figure E.1.24 Add member payment ................................................................................. 121
Figure E.1.25 Add other payment ...................................................................................... 122
Figure E.1.26 Payment confirmation ................................................................................. 122
Figure E.1.27 Administrator Sign out 1 .............................................................................. 122
Figure E.1.28 Administrator Sign out 2 .............................................................................. 122
Figure E.2.1 Member News view ....................................................................................... 123
Figure E.2.2 Member Event register button ...................................................................... 123
Figure E.2.3 Member Event unregister button .................................................................. 123
Figure E.2.4 Vote for poll ................................................................................................... 124
Figure E.2.5 Change poll view ............................................................................................ 124
Figure E.2.6 Order Item View ............................................................................................. 125
Figure E.2.7 - Add Record 1................................................................................................... 125
Figure E.2.8 - Add Record 2................................................................................................... 125
Figure E.2.9 Add Record 3 .................................................................................................. 126
Figure E.2.10 Add Record 4 ................................................................................................ 126
Figure E.2.11 View / Edit record window........................................................................... 127
Figure E.2.12 Edit record .................................................................................................... 127
Figure E.2.13 Add record to existing record set ................................................................ 128
Figure E.2.14 Calculate GPA for 1 semester ...................................................................... 129
Figure E.2.15 Plan GPA ....................................................................................................... 130
Figure E.2.16 Calculate Final GPA ...................................................................................... 130
Figure E.2.17 Edit Member Profile ..................................................................................... 131
Figure E.2.18 Member Sign out 1....................................................................................... 131
xiv
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.2.19 Member Sign out 2....................................................................................... 131


Figure E.2.20 Forgot password 1........................................................................................ 132
Figure E.2.21 Forgot Password 2........................................................................................ 132
Figure E.2.22 Password reset email ................................................................................... 132
Figure E.2.22 Password reset email ................................................................................... 132
Figure E.2.23 Member login success message ................................................................... 133
Figure F.1 000webhost home page.................................................................................... 134
Figure F.2 000webhost account confirmation e-mail ........................................................ 134
Figure F.3 Create new account success message .............................................................. 135
Figure F.4 cPanel access selection ..................................................................................... 135
Figure F.5 Export database from phpMyAdmin on local host ........................................... 135
Figure F.6 Create new database on server ........................................................................ 136
Figure F.7 New database configuration details ................................................................. 136
Figure F.8 A part of cPanel ................................................................................................. 136
Figure F.9 phpMyAdmin on server .................................................................................... 137
Figure F.10 Importing database to the server ................................................................... 137
Figure F.11 Uploading files to the server ........................................................................... 137
Figure F.12 Remote host file view after connection was established ............................... 138
Figure F.13 Transferring files to server .............................................................................. 138
Figure F.14 Web site root when viewed from File Manager ............................................. 138
Figure G.1 GPA Definitions ................................................................................................ 139
Figure G.2 GPA Equations .................................................................................................. 140
Figure H.1 Evaluation Form................................................................................................ 141

xv
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Table of Tables
Table 2.1 - Fact Finding Techniques .......................................................................................... 9
Table 2.2 Access Control Matrix for administrators ............................................................ 12
Table 3.1 Types of Hosting ................................................................................................... 23
Table 5.1 Client Implementation Specifications .................................................................. 52
Table 5.2 Server Implementation Specifications ................................................................. 52
Table 6.1 Admin Login test cases ......................................................................................... 58
Table 6.2 Add merchandise test cases ................................................................................. 59
Table 6.3 Search Members test cases.................................................................................. 60
Table 6.4 Add admin test cases ........................................................................................... 60
Table 6.5 Edit Admin profile test cases ................................................................................ 61
Table 6.6 Calculate GPA test cases ...................................................................................... 62
Table 6.7 Vote and comment for polls test cases ................................................................ 62
Table 6.8 Add new received payment test cases................................................................. 63
Table 6.9 Member Registration test cases ........................................................................... 64
Table C.1 Admin Login........................................................................................................ 103
Table C.2 Member Login .................................................................................................... 103

xvi
BCS Professional Project (Professional Graduate Diploma in IT)

1. Introduction
1.1 Requirement for the new system
Engineering Society of KDU has experienced an exponential growth in new member
registrations and handling a large volume of data related to those members has
been a concern for the BO of ESKDU. Also, retention of current members and
popularizing the society among engineering students has been some of the recent
objectives of the society. In order to achieve these objectives a new website was
suggested as the best approach since it gives flexibility, mobility and also
connectivity between members and officials. This project would help to minimize
most of those difficulties faced by officials as well as members and would be a
prominent factor in the development of the society which would benefit all
members as well as non-members of this society who use this web site.

1.2 Analysis of the current System


1.2.1

Current Operations
The society currently has a manual system for all processes and data is
recorded mostly manually on record books and spreadsheets.

1.2.1.1

Registration of new members is done by issuing forms and completes


registration when registration fee is paid by members.

1.2.1.2

Since financial transactions are very limited, a simple ledger system is


maintained by the officials responsible for handling finances manually
and on a spreadsheet.

1.2.1.3

Members are informed about meetings and competitions through weekly


meetings and via batch representatives.

1.2.1.4

Decisions are taken by discussions done by BO and the organizing


committee (3rd year students) in monthly meetings.

1
BCS Professional Project

S.L.D De Silva 990403816

1.2.2

Flaws of the current system

1.2.2.1

Communicating a message to a set of members is a difficult process since


it is not possible to gather all the members for one meeting.

1.2.2.2

Prospective members find it difficult to get to know about the society


which has diminished its popularity among students.

1.2.2.3

Not being able to get the opinions of members when making certain
important decisions.

1.2.2.4

Lack of motivation of members in participating actively due to lack of


communication between members and the society.

1.2.2.5

Member registration process takes a long time and is inefficient.

1.2.2.6

Duplication of records when handling a large volume of data.

1.3 Proposed solution


1.3.1

Available options

1.3.1.1

Maintaining the same manual system without implementing any changes.

1.3.1.2

A web based solution which provides facilities for officials to maintain


records.

1.3.1.3

Web based solution which provides interaction for both members and
officials.

1.3.1.4

Software solution to be used only by the officials.

1.3.2

Selected option
A web based member management system was selected as the most optimum
solution for this scenario since it benefits both members as well as officials along
with flexibility and mobility.

2
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.3.3

Development Environment
It was decided that the system was to be designed using Apache Server, PHP and
MySQL. Also to configure and install PHP and Apache on the development
machine, XAMPP was used. Other tools that were required were -

1.3.3.1

Adobe Dreamweaver CC For overall coding process

1.3.3.2

MySQL Workbench 6.0 CE For database design

1.3.3.3

Microsoft Visio For diagram designing

1.3.3.4

Smart Draw For drawing DFDs Use and Cases

1.4 Project Goal and Deliverables


1.4.1

Project Goal
To provide a web based solution for this society so that officials could access
the system from any location, build interactions with members and improve
decision making and management process. Also it should enhance member
satisfaction and experience by providing web based services which would
make them participate more actively in society activities.

1.4.2

Deliverables and Objectives

1.4.2.1

User/Admin Management: Officials will act as administrators who will


have the power to register new administrators and also to suspend
accounts if needed.

1.4.2.2

Member Management: The web site will provide online facilities to apply
for membership. It will provide an efficient way for administrators to
reach members and build relationships. This will include searching
facilities and also ways to monitor member activities.

1.4.2.3

Voting: Members can involve in decision making by voting for decisions.


Administrators can use member views and comments in their policy
making.

1.4.2.4

Notifications: Members will be informed about new events, meetings and


competitions when they log into their accounts. Administrators can post

3
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

news and details about competitions and also make sure only targeted
groups receive the news.
1.4.2.5

Support Tools: A complete Grade Point Average (GPA) calculation and


planning tool, which has been configured in accordance with the GPA
scale of this university, will be integrated to the website which enables
members as well as non-members in calculating their GPA for a certain
semester. Members will get the added privilege of maintaining an
academic track record in the database.

1.4.2.6

Selling Merchandise: The society can advertise their merchandise and


members can place orders online.

1.4.3

Expected advantages

1.4.3.1

Improve member service and member retention.

1.4.3.2

Increase member registrations by attracting new members.

1.4.3.3

Improve efficiency of handling operations which were done manually.

1.4.3.4

Improve mobility so that administrators can work from anywhere.

1.4.3.5

Improve member satisfaction and motivate them in active participation.

1.4.3.6

Innovate decision making by getting ideas from members.

1.4.3.7

Selective information sharing which makes sure the right person gets the
right information on right time.

1.4.3.8

24x7 functionality (except during server breakdowns).

1.4.3.9

Elimination of data redundancy.

1.4.3.10

High data security and ability in making copies instantly.

4
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.5 Project Architecture


The proposed project is based on client-server architecture where clients request
some information from the server and the server simply provides that information if
it is able to, after processing the requests. Clients can be either members or
administrators who need to access the web site. Server is the place where the
website data and the databases are situated at. This actually refers to the web server
which is used to host the website.

Figure 1.6.1 Client Server Architecture 1


Image source: http://www.softwaretestinghome.com

This architecture was considered as 2 tiers earlier, but now is mostly considered
having 3 tiers where the server is considered as logic layer and database is
considered as data layer along with the client being considered as presentation
layer.

5
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure 1.6.2- Client Server Architecture 2


Image source: http://chapter10overview.files.wordpress.com/2012/02/3tier.jpg

1.6 Project Limitations


1.6.1

Limited bandwidth of the free hosting solution that could affect the growth of
visitors.

1.6.2

Web site will be hosted on one server which could result in website
unavailability due to server breakdowns.

1.6.3

Online payments for merchandise will not be integrated to the system.


Merchandise can only be ordered through the website.

6
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2. Requirement Specification
2.1 Introduction
Requirement specification focuses on extracting and discovering requirements of the
client for whom the new system is developed. For this, several standard and nonconventional fact collection methodologies were used.

2.2 Facts gathered


This organization has been operating without a website since its beginning. The only
internet-based option used by this organization is their private Facebook group that
provides basic information and news to connected members. Preliminary fact
gathering helped to extract information regarding the structure of the society and
information about main processes.
2.2.1

Society Structure Board of officials consists of final year students and the
organizing committee consists of 3rd year students. Each year a new board of
officials is appointed. Usually the board of officials is consisted of President,
Vice president, Secretary, Assistant Secretary, Treasurer, Assistant Treasurer,
Organizers, Editors and Coordinators.

2.2.2

Registration - Currently members have to contact an official of the society, get


a membership form and then pay registration fee to another official who
handles finances. It would take some time before the application form is
processed before accepting the registration.

2.2.3

Events/News - These are communicated mostly by batch representatives of


each batch or at monthly/weekly meetings. Other than that they use
noticeboards of the Engineering Faculty. Members who are in the private
Facebook group get to know about things posted on the group.

2.2.4

Financial records Spreadsheets are used to maintain member details and


financial records. In parallel with the spreadsheets, a manual record book is
maintained to enter financial records.

2.2.5

Payments - All payments made to the society by members and payments


made by the society are processed manually. When a member wants to buy
some merchandise, he/she should contact an official asking for availability of a
certain item.

7
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.3 Fact finding techniques used


Gathering facts and information about the current situation and specially the
requirements are the most difficult tasks in requirements analysis phase since it is
difficult to know where information needs to be extracted from and what the best
way is to extract information from a particular source.
Certain standard and non-standard methods were used to extract information for
this project.
Technique
Interviews

Observation

Document
Reading

Background
Reading

Description

Source/s of
information
Interviewing means meeting a person who is President
involved with the current system to get certain Treasurer
information by asking questions which are Editor
structured or unstructured. For interviewing, only
the most important few people are used since it
consumes time.
But it is one of the best ways to gather information
since the interviewer can ask cross questions to
clarify vague information and interviewee can
freely express his/her requirement.
Observation is usually done by visiting the Weekly meetings
organization and observing operations and held in the mini
activities to get an understanding of how actually auditorium.
things are being done.
But for this organization, since there is no exact
physical location, observation was only done by
visiting one of the meetings of the society
conducted by officials to interact with members.
Existing documents within the organization can be Accounts records
observed and analyzed to get an understanding on Spreadsheets
how currently the records are being kept.
Formal documents
For this project, this technique was used to get
information about the member records, financial
records and other administrative records.
This involves reading documents related to this KDU Prospectus
subject area.
Student Manual
For this project several documents were needed to
collect information and especially the KDU
Prospectus was an important document in finding
university regulations and GPA structure.
8

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Questionnaires Questionnaires are given to a set of people of the Members


organization to get information from a number of Officials
people.

Internet
research

Questionnaires can be used to collect a large


volume of data in a short time, but may not be
effective since not everyone would provide correct
information. Questionnaires can be distributed by
printing and as well as electronically (eg : Google
Docs Questionnaire)
Internet research can be used to compare similar Internet
projects and solutions that may benefit the user to
decide his/her requirements and also helps the
developer to suggest solutions which may assist
the developer in suggesting solutions to the client.
For this project Internet research was done to
inspect how student associations maintain their
websites. This would be helpful in deciding
technologies and techniques that can be used
when developing this solution.
Table 2.1 - Fact Finding Techniques

9
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.4 Functional Requirements


Functional requirements describe what the system must do and what the developers
will provide according to the needs of the client.
The proposed system will have 2 separate areas for members and administrators.
For this both administrators and members can use separate logins to log in to their
respective accounts. Moreover, guests who are neither members nor administrators
can use the website to get information about the society.

2.4.1

Members
Members are categorized into 5 levels. Levels 1-4 are assigned to members
belonging to academic years of the university. For example, a second year
student belongs to level 2 and so on. Level 5 members are those who have
graduated from the university.

2.4.1.1

View a summary of basic details in the members area.

2.4.1.2

View all payments done by the member.

2.4.1.3

View polls posted by administrators, vote for those polls and comment on
those polls to inform the management about their point of view.

2.4.1.4

View News and Events which are relevant to that specific member type.

2.4.1.5

View and place orders on merchandise online.

2.4.1.6

GPA Calculator and academic records.

2.4.1.6.1

View member academic track record and academic statistics in


the GPA calculator dashboard.

2.4.1.6.2

Calculate GPA for one semester.

2.4.1.6.3

Plan GPA for next semester to reach a certain targeted total GPA
at the end of that semester.

2.4.1.6.4

Record and save grades scored for each subject in each semester.

2.4.1.6.5

View past records.

2.4.1.7

View and edit member profile details along with the change password
option.

10
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.4.2

Administrators
There will be 3 categories of administrators who control information of the
website. All 3 administrators will have separate types of duties and will have
access according to their category.

2.4.2.1

Category 1 Decision making administrators.


Category 1 administrators are those responsible for overall administration of
the system and decision making. Also they have the power to add any type of
administrators to the system.

2.4.2.2

Category 2 Financial Administrators


These administrators handle financial activities of the organization. These
administrators have the power to accept new members and confirm
payments made to merchandise by members. Also these administrators can
add category 3 administrators to the system.

2.4.2.3

Category 3 Posting Administrators


Category 3 administrators are responsible for posting news items and event
details. These administrators cant view any financial records but can view
other common details.

11
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Function

Admin Category
3
1
2

Polls and decisions


View Polls, results and comments
Add Poll
Edit Poll (Posted by the same admin)
Delete Poll (Posted by the same admin)
News and Events
View News and Events
Add News and Events
Edit News and Events
Confirm event participation of members
Merchandise
View Merchandise
Add Merchandise
Edit Merchandise
Delete Merchandise
Confirm member payments on merchandise
Finances
View all Income and Expenditure
Add payment (Income/Expenditure)
Edit payment (Income/Expenditure)
View Income statement
Administrators
Add administrators
Activate/Deactivate administrators
View/Edit profile and password
Members
Accept new registrations
Search for members
Committee
View committee and past committees
Add committee
Edit committee

Table 2.2 Access Control Matrix for administrators

12
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.4.3

Guests

2.4.3.1

Apply for membership online.

2.4.3.2

Get to know information about membership and the society.

2.4.3.3

Inquire about certain specific details.

2.4.3.4

Use GPA calculator tool without the option of using the member
dashboard privileges.

2.5 Non-functional Requirements


According to Lawrence Chung, Non-functional requirement is a software
requirement that describes not what the software will do, but how the software will
do it, for example, software performance requirements, software external interface
requirements, design constraints, and software quality attributes. Nonfunctional
requirements are difficult to test; therefore, they are usually evaluated subjectively
(1).
Some of the below given requirements have been cited from IEEE Std 830 - 1993 (2).

2.5.1

Reliability

2.5.1.1

Since the hosting is done on a 3rd party server, server failures will be
handled by them, therefore the system down time will be reduced and
Mean Time to repair (MTTR) will be less.

2.5.1.2

Mean Time between Failures (MTBF) will be unpredictable but since the
system is not supposed to have unwanted amount of traffic and also 3rd
party servers are maintained by professionals, MTBF will be high.

2.5.2

Availability

2.5.2.1

2.5.3

The system will be available 24x7 and accessible from anywhere and will
be running perfectly while the server is up and running.

Security

2.5.3.1

The System is a standard web application which uses tried and tested
server side scripting technology for accessing databases and for server
side processing.

2.5.3.2

All user passwords will be salted and hashed for improved security.

2.5.3.3

Measures will be taken to prevent SQL injection wherever possible


13

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.5.3.4

Data will be validated before entering into the database to avoid any
complications and data type mismatches.

2.5.3.5

Sensitive member information will not be accessible to visitors and


unauthorized personnel.

2.5.4

Usability

2.5.4.1

The system will be easy to get used to and has an easy navigation system
to move between sections.

2.5.4.2

The user interface will have a flat metro like interface, making it easier to
read and navigate.

2.5.4.3

Users will be provided with easily understandable messages as errors or


success notifications.

2.5.5

Portability

2.5.5.1

Portability defines how efficiently the system can be transferred to


another environment.

2.5.5.2

Since the database is a MySQL database, data can be exported to a .sql


file along with table specifications and entity relationships, which can be
instantly imported to another MySQL database on another server.

2.5.5.3

Similarly all web pages can be transferred to another server simply by


uploading those files to another server and reconfiguring the database
connection file.

2.5.6

Flexibility

2.5.6.1

Administrators get the freedom of working from anywhere by accessing


the website and gives ability for many administrators to work on different
aspects at the same time.

2.5.6.2

Members get to interact with the society actively without physically


meeting officials.

14
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.6 Hardware Specification


2.6.1

Developer

2.6.1.1

Intel core i5 processor with compatible Motherboard

2.6.1.2

500GB Hard Disk Drive

2.6.1.3

RAM 4GB

2.6.1.4

Internet connection

2.6.2

User (Minimum Requirements)

2.6.2.1

Dual core processor

2.6.2.2

1GB RAM

2.6.2.3

Internet connection

2.6.2.4

At least 10GB hard disk space

2.7 Software specification


2.7.1

Developer

2.7.1.1

XAMPP with Apache Server

2.7.1.2

PHP 5 or higher

2.7.1.3

Web Browser with HTML5 and CSS3 compatibility

2.7.1.4

Adobe Dreamweaver CC

2.7.1.5

MySQL 5.5 with MySQL Workbench 6.0

2.7.1.6

Adobe Photoshop CS6

2.7.1.7

Microsoft Office 2010

2.7.1.8

Mercury eMail Server

2.7.2
2.7.2.1

User
Web Browser with HTML5 and CSS 3 compatibility and JavaScript enabled

15
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.8 Requirement verification and validation (V and V)


According to PMBOK guide (3),
Validation is,
The assurance that a product, service, or system meets the needs of the customer
and other identified stakeholders. It often involves acceptance and suitability with
external customers."
Verification is,
The evaluation of whether or not a product, service, or system complies with a
regulation, requirement, specification, or imposed condition. It is often an internal
process."
Final system should ensure that user requirements are met satisfactorily. System
Requirement Specification (SRS) will be providing a baseline for this verification and
validation process. How well the requirements are met will be decided by an official
of the society, by comparing requirements with delivered system.

16
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

3. System Design
3.1 Introduction
System Design is the process of defining the components, architecture and data,
which are the elements of a system needed to satisfy the requirements specified.

3.2 Available standard system development methodologies

SDLC

Agile

Waterfall

Scrum

Spiral
Extreme Programming
Incremental
Prototyping

DSDM

Figure 3.2.1 System Development Methodologies

3.3 Selected methodology SSADM


Out of the above mentioned methodologies, SSADM (Structured Systems Analysis
and Design Methodology), which is Waterfall based standard was selected for this
project.
SSADM was selected for this project because,
3.3.1

This project has clearly set requirements which are not supposed to change
much during the course of the development.

3.3.2

The project is not an extremely complex system or a critical system.

3.3.3

SSADM is a tried and tested standard which specifies clear stages of


development.

3.3.4

Each stage comprises of deliverables and because SSADM is based on


waterfall method, which is simple.

17
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

3.4 Introduction to SSADM


SSADM is a system development methodology developed as a framework by the UK
government in 1980s. SSADM consists of 7 stages starting from stage 0.

Stage 0

Stage 5

Stage 6

Feasibility Study

Logical Design

Physical design

Stage 1

Stage 4

Investigation of the
current environment

Technical Systems
options

Stage 2

Stage 3

Business systems
options

Requirements
specification

Figure 3.4.1 SSADM

3.4.1

Stage 1 - Feasibility Study


This is done prior to starting the project to see whether or not the project is
feasible. Usually feasibility is analyzed using the aspects of Technical,
Operational, Schedule, Economical and Legal.
Outcome Feasibility report

3.4.2

Stage 2 - Investigation of the current environment


Current situation of the environment is investigated by using fact finding
techniques such as interviews, questionnaires, group discussions, observations
etc.
Outcomes Requirements Catalogue, User catalogue, Context Diagram

3.4.3

Stage 3 - Business systems options


Different ways of approaching and providing solutions to the problem are
analysed. Business analysts prepare a list of options that could be used for the
18

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

problem varying from doing nothing to implementing a whole new system.


The client should select what the best option would be.
Outcome Selected Business Systems option

3.4.4

Stage 4 Requirements Specification


According to the user needs, business analyst needs to specify what the
system would provide. This is done for the business option selected by the
client. Here, 3 main techniques are used.

3.4.4.1

Logical Data modelling using Entity Relationship Diagrams (ER)

3.4.4.2

Data Flow Modelling using Data flow diagrams(DFD)

3.4.4.3

Entity Event Modelling using Entity Life Histories (ELH)


Outcome System Requirement Specification (SRS)

3.4.5

Stage 5 - Technical Systems options


Similar to business systems options, technical systems options are used to
specify the hardware implementation and the physical configuration of the
system intended. The client will be provided with several options out of which
he/she has to choose the most appropriate option. This could include
hardware, staffing, software, costs and other infrastructure that may be
required.
Outcome Selected Technical Systems option

3.4.6

Stage 6 - Logical Design


Human Computer Interfacing and user dialogues are given focus in this stage.
User requirements and the diagrams produced in stage 4 are used for
designing the ways of interaction of the system with user.
Outcome Logical Design

3.4.7

Stage 7 - Physical design


Transforming logical designs with requirements into software and
transforming technical system option into hardware is done in this stage.

19
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Logical data are transformed into databases and logical designs converted into
user interfaces which interact with databases.
Outcome Complete physical design

3.5 Feasibility Study


3.5.1

Technical Feasibility
Knowledge The system will be built using PHP, HTML, CSS, JavaScript and
other tried and tested web based technologies which will have plenty of
online support and resources due to their extensive usage.
Hardware Since the system is not extremely complex, no high performance
hardware is required for development. Also for the clients, no extra hardware
is required since the web site is hosted in a 3 rd party host where the client
does not need to provide any infrastructure.
Software A licensed copy of Adobe Dreamweaver will be required. Other
than that XAMPP, MySQL ad MySQL workbench is freely available software
which will not be a problem in downloading and installing.

3.5.2

Operational Feasibility
Operational feasibility looks into the aspect of how well users can interact
with the system. Since this is a web based system which uses similar
conventions as same as a normal web application, it will not be difficult to get
used to and work with the website.
The user interface will be a simple, easy to understand one with a good
navigation system which will improve operational feasibility. Also since there
are more than 25 members in the Board of Officials and organizing
committee, there will be enough personnel to act as administrators of the
system.

20
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

3.5.3

Schedule Feasibility
This looks at whether the project could be delivered within the specified time
period. When considering this project, since the scope is defined and limited
to a specific area, it could be delivered within the duration of 16-18 weeks.
Also implementation is only a matter of transferring files and configuring the
database connections. Therefore, very less time will be spent on
implementation. More time could be spent on system analyzing and design.
Even though this is an individual project, this project seems schedule feasible
during the agreed time limit.

3.5.4

Economic Feasibility
Economic feasibility looks at the financial aspect of the project, whether it is
financially viable for the client as well as for the developer.
This project uses open source technologies like PHP and even free open
source tools like XAMPP and MySQL workbench. Clients do not need new
hardware or software since they only need a normal computer with a HTML5
supporting web browser. Moreover, since initially hosting is done on a free
web host, the client will not need to spend on buying a domain and getting
web hosting services. But later when the client needs to move on to a paid
web host, the client will have to pay some amount but will not be an
extravagant amount since many web hosts provide cheap hosting plans
nowadays.

3.5.5

Legal Feasibility
Legal feasibility looks at the legal constraints that need to be considered when
developing the web site. The main legal concern that can be focused here is
the data protection act, which will be given adequate focus when developing
the web site. Additionally, design aspects will be focused on not infringing
intellectual property rights such as designs and logos. Moreover, internal
information of the society will not be disclosed by the developer to 3 rd parties
without the permission and consent of the Board of Officials. Therefore,
legally this project does not have many serious restrictions other than the
above mentioned factors which would make it legally feasible as well.

21
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

3.6 Investigation of the current environment


This section has been addressed in section 1.2 of this documentation. Section 2.3
elaborates on the types of fact collection techniques used.

3.7 Business Systems Options


For this system, not much business systems were available. Only viable solutions as
explained in section 1.3.1 were

Maintaining the same manual system with no changes.

A software solution that facilitates record keeping for administrators.

A web based solution for administrators to maintain records and member


registrations.

A web based solution that connects both administrators and members.

3.8 Requirement Specification


Requirement Specification has been elaborated in Section 2 of this documentation.

3.9 Technical Systems options


3.9.1

Internal hosting
Hosting the web site within the organizational premises using their own
hardware, software and employees.

3.9.2

External Hosting
Hosting the web site on a third party server. (4)

3.9.2.1

Free Hosting

3.9.2.2

Shared Hosting

3.9.2.3

Dedicated hosting

3.9.2.4

Collocated hosting

22
BCS Professional Project (Professional Graduate Diploma in IT)

Hosting Type

Hardware needed

Cost

Hosting within
client premises
using a clients
own server.

1
2
3
4

Comparatively
high since
purchasing
hardware and
maintenance is
of high cost

Free hosting

No extra hardware
needed by client.

Extremely low
cost

Shared hosting

No hardware needed
by the client since site
is placed on a shared
server.

Relatively low
cost

Dedicated
hosting

Dedicated server that


needs to be hired

Very high cost

Collocated
hosting

Need to purchase a
server

Extremely high
cost

External

Internal

S.L.D De Silva 990403816

Server
Software
Maintenance Staff
Internet
connection with a
good bandwidth

Reliability and
Maintainability
High reliability
High data security

1 Less reliability
2 Use of
advertisements
3 Limited security
and technical
support
1 Resources such
as bandwidth is
shared
2 Better technical
support and
security
Extremely reliable
and powerful
performance
Client has full
control of the
server

Table 3.1 Types of Hosting

23
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

3.10 Logical Design


3.10.1

Data Flow Diagrams(DFD)


Context Level or the level 0 DFD shows the data exchanged between the
system and the external entities. In this project, Member and Admin can be
considered as external entities to the system.
Refer Appendix A section A.1 for Level 1 DFDs.

Figure 3.10.1.1 Context Level DFD

24
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

3.10.2

Entity Relationship Diagrams


ER Diagrams show the relationships between entities of the system and is
used in modeling the database for the system. Below diagram shows the ER
diagram for the proposed system which has been modeled using MySQL
Workbench.

Figure 3.10.2.1 ER Diagram

3.11 Physical Design


This section has been illustrated in chapter 4 of this documentation.

25
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4 . Physical Design
4.1 Introduction
Physical design phase is where Logical design is implemented into databases with
table relations and user interfaces which are linked to each other.

4.2 Database design


The system uses a database named mms where all the tables shown in the ER
diagram have been implemented with all the shown relationships.
This database uses 21 tables.
1. admins - Used to store data of all the administrators of the system
2. admin_login Used to store login details of each admin
3. committee Used to save data about members who are holding positions of the
committee
4. decisions Used to store information related to polls
5. events Used to store details about events
6. expenditure Used to store expenditure details of the society
7. fees Used to store values regarding standard fees of the society such as the
registration fee and membership renewal fee
8. marks used to store academic records of members
9. members Used to store member details
10. member_payments Used to store payments made by members to the society
11. mem_login Used to store login details of members
12. merchandise Used to store merchandise details
13. news Used to store news details
14. order_merchandise Used to store information of the members who have
placed orders on merchandise

26
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

15. other_payments Used to store payments received by the society by other


sources
16. participate Used to store details about members who have registered and
participated in events
17. payments Used to store payments received by the society
18. position Used to store details about various positions of the committee
19. posts Used to store details about news and events
20. tokens Used to store token details of those who have requested for change in
passwords
21. vote Stores details about the votes placed by members on polls
Admin table structure
CREATE TABLE IF NOT EXISTS `admins` (
`adminId` int(11) NOT NULL AUTO_INCREMENT,
`fname` varchar(45) NOT NULL,
`lname` varchar(100) NOT NULL,
`category` smallint(6) NOT NULL,
`email` varchar(100) NOT NULL,
`creator` int(11) DEFAULT NULL,
PRIMARY KEY (`adminId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

Figure 4.2.1 Admin Table Structure


Refer Appendix A for the rest of the table structures

27
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure 4.2.2 - ER Diagram with Attributes

28
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3 User interface design


4.3.1

Introduction

User interface is one of the most important components of a system because it is the
tool used by users to interact with the system and transfer information. Since many
users of different perceptions interact with the system, designers should be careful
to design user interfaces in such a way that it satisfies user requirements.
In industry standards, ISO 9241 describes the standards that should be followed in
designing human computer interfaces. The main highlight of this standard is the
usability of a system which is the measure used to analyze the effectiveness of user
interface.
In this system there are 3 basic types of users: Administrators, members and guests.
The user interface has been designed in such a way that it caters all 3 types of users
and directs them into separate sections so that user specific functions could be
accessed with more clarity.
The theme that has been used for this web site is a metro like flat looking theme
with a range of contrasting colours and with clear sans serif fonts (mostly PT Sans
and Arial).

4.3.2
4.3.2.1

Home Page
Header
Header style and theme will be the same for all 3 types of users. For
administrators and members, their name will be displayed on the header
after logging in. Navigation menu bar used in this header is a simple and
responsive menu bar adapted from one of the designs of
www.cssmenumaker.com (5)

Figure 4.3.1 Header

29
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.2.2

Footer
The footer that has been used is same and consistent for all the web pages of
the website.

Figure 4.3.2 - Footer

Figure 4.3.3 Home Page

30
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.3

Guest
Guests will view the web site as a normal informative website which provides
information about the society and membership. In addition, guests have the
facility of using the GPA calculator without the result saving facility.
A guest can apply for membership online by submitting this registration form
online. Registrations will be manually processed by administrators after the
registration fee is paid.

Figure 4.3.4 Member Registration

31
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4
4.3.4.1

Administrator
Login Page

Figure 4.3.4 Administrator Login

4.3.4.2

Administrator Area
There are 3 types of administrators in this system and for each type of
admin; the content shown in the home page will be different. The header
will show only pages accessible to that specific type of admin. Admin
accessibility is shown in Table 2.2.

32
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.2.1

Category 1

Figure 4.3.5 Dashboard of Category 1 Admin

33
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.2.2

Category 2

Figure 4.3.6 Dashboard of Category 2 Administrator

34
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.2.3

Category 3

Figure 4.3.7 - Dashboard of Category 3 Administrator

35
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.3

News and Events


All administrators have the facility of viewing News and Events just as a
member would see and also confirm member participations for events but
only category 3 members get the option of adding, deleting and editing
News or Events.

Figure 4.3.8 Administrator News View


These posts can be posted targeting different streams and levels of
members so that it is ensured that only the required set of members views
the post. Number in front of the post shows the minimum member level
who can view that particular post.
When viewing the event details, administrators and members will be able to
view the event details along with the map.
Moreover, administrators can see how many members have been
registered for a particular event and also confirm member participation for
a certain event.

36
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure 4.3.9 Event View

37
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.4

Polls
All administrators can view polls, votes posted by members and also
comments provided by members regarding these polls and decisions which
can be used in decision making. Category 1 and 2 members can edit polls
posted by them and can change the status of the poll to accepted,
cancelled, declined or pending; so that members can see the progress of the
decision made.

Figure 4.3.10 View Polls

38
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.5

Merchandise
Administrators can view all merchandise such as T-shirts, mugs and gifts
which are to be sold by the society. Since Category 2 (financial)
administrators are those who are responsible for deciding prices of these
items, they are provided with the authority to add and make changes to
merchandise items.

Figure 4.3.11 Admin Merchandise View

39
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.6

Financial
Except Category 3 administrators, other administrators can view the
financial status of the society. Since the society has limited financial
transactions to be handled, a simple income/expenditure system has been
developed which could be used to record income received by members and
other parties along with the expenses incurred by the society.

Figure 4.3.12 Accounts Home


On the bottom of the page current net income is displayed along with
income and expenditure percentages which provide an overall idea about
the financial status of the organization.

40
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.7

View/Edit Profile
Administrators can view and make changes to their profiles including
password change.

Figure 4.3.13 View / Edit Admin Profile

4.3.4.8

Search Members
Administrators can search for members according to their names, level,
stream and even e-mail. Moreover the search page displays an overall
member distribution of the society.

Figure 4.3.14 Member search

41
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.4.9

Accept New Registrations


Registration requests of new members will be shown in new applicants
section. Only Category 2 administrators are permitted to accept new
members into the society since they are responsible for handling
registration fees of applicants. Here, the administrators can review the
application form of new members and once the registration fee has been
paid, new members could be provided the membership. When a new
member is accepted, registration fee paid by the member is taken from the
fees table and is automatically added to the member_payment table as a
payment made by that particular member to the society. At the same time
member will be activated and the member will be notified via an email
(Refer to Appendix B Section 1.3 for the complete code).

Figure 4.3.15 Accept new members

42
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.5
4.3.5.1

Member
Login Page
Similar to administrators, members will have a separate login to enter the
members area.

Figure 4.3.16 Member Login

4.3.5.2

Members Area
Members will be directed to the members area after logging in and
members would be able to view a summary of all the important information
in a dashboard type view which gives an overall idea about trending polls,
newly joined members, news, events and merchandise.
Theme will be consistent as in the admininstrator area, and the navigation
bar is the same as that included in the administrator area.

43
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure 4.3.17 Members Area

4.3.5.3

News and Events


News and Events view will be as same as that for administrators, except
members will only be able to view posts which are intended for their
streams, posts and member level. Furthermore, only top 10 news and
events will be displayed initially. If the user wants to see more news or
events, user will have to click on the buttons More Events or More News.
Then the web page will show the next 10 events or news items in reverse
chronological order. This has been achieved by integrating AJAX into the

44
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

section which displays the list of News and Events (Refer to Appendix B
section 2.1) (6)

Figure 4.3.18 View Events/News


Members will be able to know the time and venue with the map location
and will be able to know how many others have registered for that specific
event.
For events, members can register by clicking, Register for this event button
at the bottom of the post. But they will not be able to register after
registrations have been closed. Moreover while registrations are open,
members who have registered for a particular event will have the chance of
unregistering from that event.

45
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.5.4

Polls
Members are able to view trending polls posted by administrators regarding
administrative decisions and other new ideas. Members can provide their
comments and views regarding these decisions along with their vote. These
comments will be posted publicly so that both administrators and other
members will be able to view. But anonymity of the votes will be retained
and only the number of good/bad votes will be visible for both
administrators and members as vote results.

Figure 4.3.19 View Polls

46
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.5.5

Merchandise
Members are provided with the ability to view merchandise and souvenirs
available for sale. Members can view items in reverse chronological order
and place orders on items that are available. Online payments have not
been integrated with this system; therefore members will have to pay for
the items later to one of the officials in charge of merchandise and purchase
the item. This section has been designed similar to the way eBay displays
item lists to make it more familiar to the users.

Figure 4.3.20 View Merchandise for Member

4.3.5.6

GPA Calculator and academic records


Grade Point Average (GPA) calculator is one of the most important
functionalities that have been integrated to the system to motivate
members and help them use it to shape up their academic track. This tool
has been calibrated according to the 4.2 GPA scale of this university. (7)
GPA Calculator incorporates a separate side navigation system in addition
to the main dropdown navigation menu. This side navigation system too has
been adapted from a sample of www.cssmenumaker.com.

4.3.5.6.1

GPA Home
This page gives an overview about the GPA calculator tool and has
been mainly targeted towards new users.

47
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure 4.3.21 GPA Home


4.3.5.6.2

Dashboard
Dashboard provides a quick overview of the academic track record of
the member in a more graphical and innovative way. The member is
able to get an overall understanding of his/her current academic
situation by looking at the current net GPA, credit completion and
eligible class which will be displayed on the dashboard.

Figure 4.3.22 GPA Dashboard

48
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.3.5.7

Contact Us
This is accessible by any person who wants to contact the society. It has
been integrated with a simple human verification section to avoid spam and
email injection. (8)

Figure 4.3.23 Contact Us


This Section only contains the most prominent user interfaces. Refer
Appendix D (Reports Generated) and Appendix E (User Manual) for complete
user interfaces and their functionalities.

49
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

4.4 Security measures


4.4.1

Password security
All user passwords are salted and hashed before saving in the database for
additional security. (9)
Salting adding additional characters to increase the length of a password
Hashing converting the password string into a long series of characters
using a hashing algorithm.
In this system, a simple procedure has been applied for hashing and salting
the password. First the password entered by the user is hashed using MD5
and SHA algorithms and the salt is prepared.
<?php $salt = sha1(md5($password)); ?>
This salt is added to the password and then the whole string is again hashed
<?php $pass = md5($salt.$password); ?>
(Refer Appendix B section 1.1.2)

4.4.2

Access restriction
Every page of this system has its own access restriction and this is mainly
done by checking for sessions. Administrators cannot access admin area or
any page accessible to them unless they are logged in and similarly even
members cannot access permitted areas without logging in. Only certain
parts of the GPA calculator and certain areas of the home page are accessible
for users who are not logged in as Members or as Administrators.

50
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

5. Implementation
5.1 Introduction
This phase is where the system is transformed from the concept stage into the
reality. This stage focuses more on practical issues that arise while creating the
system in the real environment with changing conditions. The main objective of this
phase is to successfully deploying the system in the environment and starting
operation. At the end of this phase the end product or the resulted system is
compared with the initial requirements to analyze the success of the project.

5.2 Development Environment


5.2.1

Hardware and software requirements


Discussed in section 2.6

5.2.2
5.2.2.1

Tools, Packages and Languages used


Tools

5.2.2.1.1

MySQL workbench 6

5.2.2.1.2

Google Chrome and Chrome Developer Tools

5.2.2.1.3

Adobe Dreamweaver CC

5.2.2.1.4

Adobe Photoshop CS6

5.2.2.1.5

Microsoft Word 2010

5.2.2.1.6

Smart Draw 2014

5.2.2.1.7

Snipping tool and chrome extension for webpage screenshot

5.2.2.1.8

phpMyAdmin

5.2.2.1.9

Filezilla 3.9.0.3

5.2.2.2

Packages

5.2.2.2.1

XAMPP 1.8.1

51
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

5.2.2.3

Languages and Technologies

5.2.2.3.1

HTML 4/5

5.2.2.3.2

CSS 2/3

5.2.2.3.3

JavaScript

5.2.2.3.4

php 5.4.7

5.2.2.3.5

MySQL

5.3 Implementation Environment


5.3.1

Client
Hardware

Software

Intel Core i3 Processor

Windows or Linux OS

Minimum 20GB Hard disk space

HTML5 compatible browser

1GB RAM
Network connection with internet
access
Table 5.1 Client Implementation Specifications

5.3.2

Server
Hardware

Software

5 GB Database space

Windows or Linux OS

Minimum 20GB Hard disk space

Apache 2.4.10

2GB+ RAM

MySQL server

Network connection with internet cPanel with POP3 e-mail facility


access
Table 5.2 Server Implementation Specifications

52
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

5.4 Reasons for choosing these options


5.4.1

PHP
PHP is open source and therefore there are no costly licensing issues.
Learning curve of PHP too is much efficient due to this reason and has more
online support than other options such ASP.net. Moreover, finding a hosting
solution is much easier with PHP since it works on almost any server.

5.4.2

MySQL
MySQL is flexible with Windows and Linux platforms and is again open source
as PHP. Since extremely advanced features are not required for this project,
MySQL is the best choice, which has plenty of community support and
tutorials. Moreover, MySQL is very much compatible with PHP which would
make in server side scripting more efficient.

5.4.3

MySQL Workbench
MySQL workbench was mainly used to develop the logical design of the
system which is the database design. Its graphical model tool was used to
design tables and entities with relations among them. This graphical model
(Figure 4.2.2) was then reverse engineered to produce the MySQL database
which was much efficient and easier than creating tables one by one
manually and creating all logical connections.

5.4.4

Apache
The Apache web server was selected as the web server for implementing this
system because PHP and MySQL were used to develop the system. Other
than that Apache is free and has been the most popular web server for a long
time which is one of the most reliable options.

5.4.5

XAMPP
XAMPP is a free, open source package which reduces the effort of installing
Apache, PHP, MySQL and phpMyAdmin since all these are installed and
configured automatically when XAMPP is installed.

53
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

5.5 Implementation Procedure


5.5.1

Hosting on developer environment


Initially the system was designed and tested on the developers machine and
was hosted in the local host of the developer machine by installing XAMPP,
databases and other relevant software. After completion, the client was
demonstrated the performance of the system on developers machine and
client approval was taken.

5.5.2

Hosting on client machine


The system was installed and tested on several of clients machines to check
the functionalities and to get some feedback on performance.

5.5.3

Getting client views and making changes


After installing the system and testing on client side, several minor
adjustments had to be made to make the solution fully compatible with client
requirements.

5.5.4

Hosting
After making changes requested, the web site needed to be hosted on a 3 rd
party server since the client was not capable of hosting in-house. Since this
society is not a profit oriented organization, it was suggested to be hosted on
a free webhost when selecting technical systems options (section 3.9.2.1).
Several candidate options were looked into when selecting the free host
000webhost www.000webhost.com
Host-ed - http://www.host-ed.net/
Freehostia - http://www.freehostia.com/index2.html
Out of these 000webhost was selected as the host since it provides 100GB
bandwidth monthly along with unrestricted MySQL database space with PHP
compatibility. Moreover it provides email facilities and has cPanel
functionality.
Refer Appendix F to see the hosting process.

54
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Software specifications

Apache 2.2.19 (UNIX)

PHP 5.2

MySQL 5.1

cPanel

5.5.5 Domain
After hosting, a free domain was needed to be selected for the site. For this
purpose a free domain was obtained from www.dot.tk.
The domain of the hosted solution is www.eskdu.tk

5.6 Training
Officials were given a briefing about the main functionalities of the website when the
website was implemented on their machines before hosting. Since the website uses
normal website functionalities with normal conventions, no special training was
required. Officials will follow a train-the-trainer system so that future administrators
will be trained by their predecessors on maintaining the website which would help to
maintain standards of the society.

5.7 Configuration
5.7.1

Copy all the contents in the folder MMS into the root of the server.

5.7.2

Export the database as a sql script.

5.7.3

Create a database named mms and import the sql script to the server to
create tables.

5.7.4

If initially admins table is empty, create a new category 1 admin manually in


the table and also create a manual entry in the admin_login table.

5.7.5

Open the file MMS/include/dbconnection.php and change database settings.


(Refer Appendix F for complete hosting guide)
55

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

6. Testing
6.1 Introduction
This is the phase where a system is checked as to what extent it serves the purpose
and how much it is fit for the purpose. For any product, testing is an important phase
since it ensures the quality, reliability and integrity of the system.

6.2 Methods of Testing


6.2.1

White Box Testing


White box testing is where the tester looks into internal structure of the
system and performs various tests on functionalities. This requires in-depth
knowledge about the system structure and allows optimization of code and
finding root causes for errors.

6.2.2

Black Box Testing


Black box testing is done on the system without the knowledge of internal
structure or functions. Here, the main focus is directed upon checking
whether expected outputs are obtained when specific inputs are provided
irrespective of the internal functionalities. It is also known as behavioral
testing and is less complicated than white box testing.

6.3 Levels of Testing


There are 4 levels of testing (10)
1. Unit
2. Integration
3. System
4. Acceptance

56
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure 6.3.1 V-model of testing levels


Source: http://villesalonen.fi/2012/automatic-portability-testing/

6.3.1

Unit Testing
Unit testing verifies the functionality of isolated software components
separately.

6.3.2

Integration Testing
Integration testing focusses on errors and defects in links and connections
between components of a system.

6.3.3

System Testing
This concentrates on the behaviour of the system as a whole and tests the
whole system when all components are integrated together

6.3.4

Acceptance Testing
This is focussed on checking whether the system satisfies requirements
adequately and check whether the system is ready for deployment and
commencing operations.

57
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

6.4 Test Cases


A test case is a set of variables or conditions which can be used to determine and
evaluate whether the system functions correctly according to the requirements.
There can be an infinite amount of test cases that could check for errors in the
system in various angles, but due to limited resources only the major types of
common errors are usually focussed on.
There are various standards in preparing test cases. For this project, the main focus
is directed on to the input and expected result when preparing these sample test
cases. The following shows some of the test cases used to test the system
developed.

6.4.1

Admin Login

No

Test Case

Expected Output

Actual Output

Status

1.1

Provide valid
username and
password but
inactive account

Display error message- Admin was logged in Fail


Your account has and directed to the
been deactivated or admin area.
not yet active

1.2

Provide valid
username but
invalid password

Display error message

Displayed -Invalid
Username or
Password.

Pass

1.3

Provide invalid
username but valid
password

Display error message

Displayed -Invalid
Username or
Password.

Pass

1.4

Empty Username or
password

Display HTML5
validation error
messages

HTML5 validation error


messages were
displayed.

Pass

1.5

Provide valid
username and
password

Admin should be
directed to
administrators area

Admin was directed to Pass


administrators area
and content related to
the category of that
admin was only shown.

Table 6.1 Admin Login test cases

58
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

6.4.2

Add merchandise

Prerequisites Admin should be logged in and should be a category 2 admin


No

Test Case

Expected Output

Actual Output

Status

2.1

At least one field is


empty

Display HTML5
validation error
messages

HTML5 validation error


messages were
displayed.

Pass

2.2

Provide an invalid
Display error messageimage. Eg: A .psd file Invalid file type. Make
sure you upload only
gif,jpg,jpeg,png,x-png
or pjpeg

Displayed the expected


error message.

Pass

2.3

Provide an image
size greater than
500Kb

Display error message

Error message
displayed.

Pass

2.4

Insert HTML tags to


the description text
area.

Add text to
merchandise table
without tags.

Text will be added to


the table without tags.

Pass

2.5

Provide valid details

New record added to


merchandise table.
Image should be
uploaded to the
images/merchandise
folder. Display success
message.

Success message
displayed. Record
added succesfully with
the image.

Pass

Table 6.2 Add merchandise test cases

59
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

6.4.3

Search Members

Prerequisites Admin should be logged in.


No

Test Case

Expected Output

Actual Output

Status

3.1

Leave all text fields


empty

Show all members

Showed all members.

Pass

3.2

Fill several fields and Display results if


leave others empty
available, which are
related to provided
details

Displayed members
having related details.

Pass

Table 6.3 Search Members test cases

6.4.4

Add Admin

Pre-requisites Admin should be logged in and should be category 1 or 2.


No

Test Case

Expected Output

Actual Output

Status

4.1

Leave at least one


text field empty.

Display HTML5
validation error
messages

HTML5 validation error


messages were
displayed.

Pass

4.2

Provide an email
address that has
already been
registered

Display error

Displayed error An
error has occurred
when submitting the
form. An admin has
already been
registered in the
system having similar
details.

Pass

4.3

Provide valid details

Display success
message

Displayed success
message with the
autogenerated
password.

Pass

Table 6.4 Add admin test cases

60
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

6.4.5

Edit admin profile

Pre-requisites Admin should be logged in.


No

Test Case

Expected Output

Actual Output

Status

5.1

Provide an email
address that has
already been
registered

Display error

Displayed error The


email you provided has
already been
registered in the
system by another
admin.

Pass

5.2

Provide a current
password with
length less than 6
characters

Display error

Displayed error Invalid Pass


Password and current
password focused.

5.3

Provide invalid
current password

Display error

Display error Incorrect Pass


current password.

5.4

Provide nonmatching new


passwords

Display error

Display error message


Passwords dont
match.

Pass

5.3

Fill all fileds correcly


with valid data

Display success and


update admin_login
and administrators
tables

Success message was


displayed and both
tables were updated.

Pass

Table 6.5 Edit Admin profile test cases

6.4.6

Calculate GPA for one semester

No

Test Case

Expected Output

Actual Output

6.1

Provide a text as
number of subjects

Display error

Displayed error Please Pass


enter a valid number.

6.2

Invalid mark entered Display error

Displayed error Invalid Pass


Mark.

6.3

Leave at least one


subject field empty

Displayed error
Pass
Subject Name cant be
empty and focussed

Display error

Status

61
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

on that field.
6.4

Enter an invalid
credit value

Display Error

No error was
displayed. GPA was
indicated as NaN.

Fail

Display error

Error displayed You


have entered the same
subject twice and the
first of the duplicate
fileds was focussed.

Pass

Eg: 5E
6.5

Enter same subject


more than once

Press the button Add this to current GPA and calculate the final GPA
6.6

Enter an invalid
current GPA

Display error

Eg : 4.6 , 4.B

Display error next to


text field with an
example

Pass

Table 6.6 Calculate GPA test cases

6.4.7

Vote and comment for polls

No

Test Case

7.1
7.2

Expected Output

Actual Output

Status

Include HTML tags in Insert data to vote


comments
table without tags

Data inserted to
database.

Pass

Remove comment
details and add vote

Vote table update


without the comment

Pass

Update vote table

Table 6.7 Vote and comment for polls test cases

62
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

6.4.8

Add new received payment

No

Test Case

Expected Output

Actual Output

Status

8.1

Search for an invalid


member name or
member ID

Display nothing

No result was
displayed when
searched for a non
existing record

Pass

8.2

Enter an invalid
payment amount

Display HTML5
validation error

HTML 5 validtion error


was shown

Pass

8.3

Enter valid details


for payments

Display success
message

Payment has been


successfully added

Pass

Table 6.8 Add new received payment test cases

6.4.9

Registration of new members

No

Test Case

Expected Output

Actual Output

Status

9.1

Leave at least one


text field empty

Display HTML5
validation error

HTML 5 validtion error


was show.n

Pass

9.2

Provide a
Registration ID that
already exists.

Display error

Displayed error An
error has occurred
when submitting the
form. A user has
already been
registered in the
system having same
details.

Pass

9.3

Provide an email
Display error
that already exists in
the members table.

Displayed error An
error has occurred
when submitting the
form. A user has
already been
registered in the
system having same
details.

Pass

9.4

Provide different
Display error
password for retype
password field.

Error displayed
Passwords dont
match.

Pass

63
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

9.5

Provide invalid
contact number

Display error

Error displayed Please


provide a valid contact
number.

Pass

9.6

Provide valid details

Display success
message

Display success Your


application has been
successfully submitted.
Your account will be
activated once you pay
the registration fee.

Pass

Also insert member


details to members
table and mem_login
tables. Set active=0 in
mem_login.
Table 6.9 Member Registration test cases

6.5 Corrections and debugging


Test case 1.1 - Admin was permitted to log in even though inactive. The issue was
that when the code checked for active or not in adminvalidate.php, it had already
created other SESSION variables required for logging in. This was rectified by
changing the code to check active or not before creating other SESSION variables.
Test case 6.4 There was an error in scripts/calcsgpa.js in the function
validateCredit(id) where the function was not checking for Not a Number(NaN)
condition. This was eliminated by changing the line 200 to - if(id==NaN || id==""){

64
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

7. Critical Appraisal
7.1 Introduction
This section focuses on reviewing the system that has been developed and evaluate
the success of the project to find out how well it addresses the requirements of the
client. Also this section focuses on strengths and weaknesses of the developed
system.

7.2 Evaluation of the end product


This system was developed for a non-profit oriented student organization which had
been performing all of its managerial activities manually since its establishment. This
project was mainly selected due to developers familiarity with the university system
and student societies.
The primary objective of developing this system for the Engineering Society was to
develop and automate most of the difficult manual processes involved in
administration and to make operations of the society more efficient. Another
objective that was intended to be achieved through this was to enhance the user
experience of members, thus motivating them to actively participate in activities of
the society and also to attract more members to widen the reputation of this
organization.

7.3 Lessons learned


7.3.1

Working according to a strict time schedule and meeting deadlines.

7.3.2

Experience in handling clients and working with non-technical personnel.

7.3.3

Communicating ideas with clients, extracting their requirements and


transforming those requirements into technical specifications.

7.3.4

Development of communication and presentation skills.

7.3.5

Development of technical skills in many areas such as PHP, HTML, JavaScript,


MySQL, CSS and Graphic Designing.

7.3.6

Researching and report writing skills were improved along with the abilities
of self-studying skills.

65
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

7.4 Strengths of the system


7.4.1

Platform independence
Since the system has been developed using PHP and MySQL databases, it can
be setup on almost any platform and when suing the web site, any platform
which supports standard web technologies can be used.

7.4.2

Higher Benefit to cost ratio


Since all the technologies used for this are open source there are no licensing
costs involved. Since a free host is initially used to host the system, the client
incurs no cost at all as the client requires no in-house maintained hardware
and the client is not required to pay the hosting company.

7.4.3

Easy setup and upgrading


Setup is much easier for a website when compared to a software solution.
The web pages need to be uploaded to the server using an FTP client like
Filezilla or using the cPanel preinstalled on the server. Databases can be
instantly uploaded by uploading the sql script to the database using
phpMyAdmin installed on server. Moreover, moving the web site to another
server can be done within a short time.

7.4.4

User-friendliness
The system is made to be user-friendly by integrating standard web
functionalities which are familiar to anyone, which makes it easy to learn and
get used to which saves training effort and saves time. (11)

7.4.5

Accessibility from any place


Since this system has been hosted on a 3rd party server which is connected to
the internet 24x7, anyone with a proper internet connection could access the
system from anywhere using any device that supports standard web
functionalities.

7.4.6

Use of tried and tested technology


PHP and other web based technologies used here are well tested
technologies which have been in the use for a long time and since these are
open source technologies there is immense community support in
development of these tools than other vendor specific technologies.
66

BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

7.5 Weaknesses of the system


7.5.1

Bandwidth limitation
Since the system is hosted on a 3rd party server which provides limited
bandwidth, there may be a potential reduction in performance of the system
when traffic increases.

7.5.2

Potential risk of data security


All sensitive data of the organization resides on a server located outside the
organization which may result in issues related to data security.

7.5.3

Non-mobile optimized
The system has not been designed in such a way that it supports all mobile
devices. There may be issues related to graphics and viewing of the website
when using different mobile devices.

7.5.4

Occurrence of unfound bugs


There may still be certain bugs and glitches which had not been detected and
corrected during the testing phase as only limited time and resources were
available during that phase. Users must alert the society officials if any bugs
were to be found.

7.6 Future additions


7.6.1

Use of social media connectivity for member registrations which would


reduce the effort in registration.

7.6.2

Increasing mobile compatibility and making it more responsive so that the


system will be device independent.

7.6.3

Hosting the system on a paid web host which provides more bandwidth and
security options to increase reliability and availability.

67
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

7.7 Conclusion
This system has been developed for a student organization in order to transform
their manual processes into more efficient and innovative processes. There are
certain areas in which the system could have been improved such as integrating
social media connectivity. Other than that the system has been instrumental in
automating the registration process, decision making process, process of
communicating with members and promoting the organization. The project has been
completed within the provided time period to address the highest priority
requirements and also some other additional functionality, which were not initially
requested have been added to improve the user experience. Considering the limited
experience of the developer and the limited resources that were used in building this
solution, it seems that this project has achieved its purpose of automating most of
the manual processes of the Engineering Society of KDU and also providing a new
experience to the members.

68
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

8. Bibliography
1. Chung, L. Non Functional Requirements. Dallas : s.n.
2. 830-1993 - IEEE Recommended Practice for Software Requirements Specifications. New York : IEEE
Computer Soceity, 1994. 1-55937-395-4.
3. Guide to the Software Engineering Body of Knowledge (SWEBOK). [Online] [Cited: August 6, 2014.]
http://www.computer.org/portal/web/swebok/html/ch5#Ref2.
4. Types of web hosting services. website. [Online] [Cited: August 2, 2014.]
https://www.website.com/beginnerguide/webhosting/6/2/types-of-web-hosting-services.ws.
5. Animated responsive dropdown menu. CSS Menu Maker. [Online] [Cited: August 02, 2014.]
http://cssmenumaker.com/menu/animated-responsive-drop-down-menu.
6. Thamada, S. Twitter Style Load More Results with jQuery and Ajax. 9lessons. [Online] 2009. [Cited:
July 15, 2014.] http://www.9lessons.info/2009/12/twitter-style-load-more-results-with.html.
7. Student Prospectus 2013-2015. s.l. : Kotelawala Defence University, 2013.
8. Greig, S. How to Create a Contact Form using HTML5, CSS3 and PHP. [Online] [Cited: 8 12, 2014.]
http://tangledindesign.com/how-to-create-a-contact-form-using-html5-css3-and-php/.
9. Salted Password Hashing Doing it right. Crack Station. [Online] [Cited: June 22, 2014.]
https://crackstation.net/hashing-security.htm.
10. Salonen, V. Automatic Portability Testing. [Online] 2002. [Cited: August 6, 2014.]
http://villesalonen.fi/2012/automatic-portability-testing/.
11. 10 ADVANTAGES OF CHOOSING PHP WEB DEVELOPMENT. [Online] September 30, 2014. [Cited:
June 2, 2014.] http://www.sakshay.in/blog/10-advantages-of-choosing-php-web-development/.
12. Php random string generator. Stackoverflow. [Online] [Cited: June 22, 2014.]
http://stackoverflow.com/questions/4356289/php-random-string-generator.
13. Visualization : Pie Chart. Google Developers. [Online] July 30, 2014. [Cited: August 7, 2014.]
https://developers.google.com/chart/interactive/docs/gallery/piechart.
14. Visualization : Bar Chart. Google Developers. [Online] July 30, 2014. [Cited: August 8, 2014.]
https://developers.google.com/chart/interactive/docs/gallery/barchart.
15. Visualization: Line Chart. Google Developers. [Online] July 30, 2014. [Cited: August 8, 2014.]
https://developers.google.com/chart/interactive/docs/gallery/linechart.
16. Silverman, J.et al. Rules of the thumb : aguide for writers. New York : McGraw-Hill, 2002.
17. Niederst, J. Web Design in a Nutshell : A desktop quick reference. s.l. : O'Reillt (USA), 2006.
69
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


18. Search MySQL Database with Multiple Fields in a Form. Stackoverflow. [Online] [Cited: July 24,
2014.] http://stackoverflow.com/questions/9317836/search-mysql-database-with-multiple-fields-ina-form.
19. PHP Secure Emails. w3schools. [Online] [Cited: August 12, 2014.]
http://www.w3schools.com/php/php_secure_mail.asp.
20. Citing and Referencing in Harvard style. Citing and Referencing in Harvard style. [Online] [Cited:
August 10, 2014.] http://www.cardiff.ac.uk/insrv/resources/guides/inf057.pdf.
21. Coyier, C. Text Area tricks. CSS Tricks. [Online] [Cited: July 24, 2014.] http://csstricks.com/textarea-tricks/.
22. Sams Teach Yourself HTML, CSS and Javascript All In One. s.l. : Person Education, 2012.
23. MySQL count columns on specific value. Stackoverflow. [Online] April 12, 2013. [Cited: August
15, 2014.] http://stackoverflow.com/questions/15815011/mysql-count-columns-on-specific-value.
24. Visualization: Bar Chart. Google Developers. [Online] August 5, 2014. [Cited: August 15, 2014.]
https://developers.google.com/chart/interactive/docs/gallery/barchart.

70
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendices
Appendix A Logical Design
A.1 Data Flow Diagrams
A.1.1 Level 1 DFD for Members

Figure A.1.1 Members Level 1 DFD

71
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.1.2 Level 1 DFD for Administrators

Figure A.1.2 Level 1 DFD for Administrators

72
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.1.3 Level 1 DFD for Guests

Figure A.1.3 Level 1 DFD for Guests

A.2 Use Case diagrams


Even though Object Oriented methodology was not used for development of this
system, use case diagrams were incorporated in system analysis phase to identify
the functionalities that were required.

A.2.1 Use case diagram for Guests

Figure A.2.1 Use case diagram for Guests

73
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.2.2 Use case diagram for Members

Figure A.2.2 Use case diagram for Members

74
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.2.3 Use case diagram for category 1 Administrators

Figure A.2.3 Use case diagram for category 1 Administrators

75
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.2.4 Use case diagram for category 2 Administrators

Figure A.2.4 Use case diagram for category 2 Administrators

76
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.2.5 Use case diagram for category 3 Administrators

Figure A.2.5 Use case diagram for category 3 Administrators

A.3 Database Table Structures


A.3.1 admin_login

Figure A.3.1 admin_login table

A.3.2 committee

Figure A.3.2 committee table


77
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.3.3 decisions

Figure A.3.3 decisions table

A.3.4 events

Figure A.3.4 events table

A.3.5 expenditure

Figure A.3.5 expenditure table

A.3.6 fees

Figure A.3.6 fees table


78
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.3.7 marks

Figure A.3.7 marks table

A.3.8 member_payments

Figure A.3.8 member_payments table

A.3.9 members

Figure A.3.9 members table

A.3.10 mem_login

Figure A.3.10 mem_login table

79
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.3.11 merchandise

Figure A.3.11 merchandise table

A.3.12 news

Figure A.3.12 news table

A.3.13 order_merchandise

Figure A.3.13 order_merchandise table

A.3.12 other_payments

Figure A.3.14 other_payments table


80
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.3.15 participate

Figure A.3.15 participate table

A.3.16 payments

Figure A.3.16 payments table

A.3.17 position

Figure A.3.17 position table

A.3.18 posts

Figure A.3.18 posts table

81
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

A.3.19 tokens

Figure A.3.19 tokens table

A.3.20 vote

Figure A.3.20 vote table

82
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendix B Important Code


1. Admin
1.1 Add admin - addadminprocess.php
1.1.1 Function to auto generate password code adaptation from (12)
http://stackoverflow.com/questions/4356289/php-random-string-generator
function randomPasswordGenerate() {
$pwlength = 8; //length of password
$characters =
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
return substr( str_shuffle( $characters ), 0, $pwlength );
}

1.1.2 Hashing and salting password (9)


//generating password
$password=randomPasswordGenerate();
//salting the password for better security
$salt = sha1(md5($password));
$pass = md5($salt.$password);//hashed password

1.2 Posts - postaddprocess.php


1.2.1 Script to add a News or an Event
<?php
include("../checksession.php");
//to get Data Base connection
include("../../include/dbconnection.php");
//admin ID
$adminId=$_SESSION['adminId'];
//other common detils
$title=mysqli_real_escape_string($con,$_POST['title']);//title
$level=$_POST['level'];//level
//get target streams
$streams;
for($i=0; $i <=8; $i++)
{

83
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


if($_POST['streams_'.$i]=='')
continue;
$streams=$streams." ".$_POST['streams_'.$i]; //add value of each checked box to generate
stream code
}
//type of post
$postType=$_POST['postType'];
//----------------------------------------------------------//check whether this is a NEWS or an EVENT
if($postType=='N'){
//if this is a news
$description=mysqli_real_escape_string($con,$_POST['description']);//description
//for posts table
$sql1="INSERT INTO posts (postedBy,postType,memType,memLevel) VALUES
('$adminId','$postType','$streams','$level')";
//execute query for posts table
if(mysqli_query($con,$sql1)){
//add records
$pid=mysqli_insert_id($con);//to identify last record ID in posts table
$sql2="INSERT INTO news (postId,description,title) VALUES
('$pid','$description','$title')";//query to insert into news
//to execute the 2nd query
if(mysqli_query($con,$sql2)){
//redirect to the postadd.php display a success message
$msg1="News item has been successfully added";
header("Location:index.php?msg=$msg1");
}
else{
//redirect to the postadd.php display an error message
$msg1="An error has occured while adding. Please try again";
header("Location:postadd.php?id=$msg1");
}
}else{
//redirect to the postadd.php display an error message
$msg1="An error has occured while adding. Please try again";
header("Location:postadd.php?id=$msg1");
}
}
//--------------------------------------event ---------------------------if($postType=='E'){
//if this is an event
$eventDate=$_POST['eventDate'];//date
$from=$_POST['from'];//start time
//convert this to mysql format
$from = mysql_real_escape_string($from);
$from = strtotime($from);
$from = date('H:i:s',$from);
$from=mysql_real_escape_string($from);//removing unnecessary parts
$description=mysqli_real_escape_string($con,$_POST['description2']);//description
$venue=$_POST['venue'];

84
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

//get the url of embed code and stripping unwanted parts


$embedcode=$_POST['embedCode'];
if($embedcode!=''){
$s = explode('src="',$embedcode);//separate string where src occurs
$t = explode('"',$s[1]);//end stripping url
$url=strip_tags($t[0]);//remove any html tags in between
}else{
$url='';
}
//for posts table
$sql1="INSERT INTO posts (postedBy,postType,memType,memLevel) VALUES
('$adminId','$postType','$streams','$level')";
//execute query for posts table
if(mysqli_query($con,$sql1)){
//add records
$pid=mysqli_insert_id($con);//to identify last record ID in posts table
$sql2="INSERT INTO events
(postId,eventDescription,eventDate,venue,start,title,url,registration) VALUES
('$pid','$description','$eventDate','$venue','$from','$title','$url','Open')";//query to insert into
events
//to execute the 2nd query
if(mysqli_query($con,$sql2)){
//redirect to the postadd.php display a success message
$msg1="Event has been successfully created";
header("Location:index.php?msg=$msg1");
}
else{
//redirect to the postadd.php display an error message
$msg1="An error has occured while creating event. Please try again";
header("Location:postadd.php?id=$msg1");
//echo mysqli_error($con);
}
}else{
//redirect to the postadd.php display an error message
$msg1="An error has occured while creating event. Please try again";
header("Location:postadd.php?id=$msg1");
//echo mysqli_error($con);
}
}
?>

85
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.3 Accept Registrations acceptregistrationprocess.php


<?php
include('checksession.php');
include('../include/dbconnection.php');//connection
//only category 2 admins can accept members
if($_SESSION['category']==2){
//to get DB connection
include("../include/dbconnection.php");
//getting registration fee
$sqlfee="SELECT fee FROM fees WHERE feeType='registration'";
///execute query
$resultFee=mysqli_query($con,$sqlfee);
$row=mysqli_fetch_array($resultFee);
$fee=$row['fee'];//fee
//admin Id
$adminId=$_SESSION['adminId'];
//getting memId from acceptregistration.php
$memId=$_POST['memId'];
//SQL Queries
//update member records
$sql="UPDATE members SET dateJoined=CURDATE(),lastRenewal=CURDATE() WHERE
memId='$memId'";
//activate the account
$sql2="UPDATE mem_login SET active='1' WHERE memId='$memId'";
//------------------------//record payments
//record in payments table
$sql3="INSERT INTO payments (payment,reason,receivedBy,payType) VALUES ('$fee','Registration
Fee','$adminId','M')";
//executing queries
if(mysqli_query($con,$sql)){
if(mysqli_query($con,$sql2)){
if(mysqli_query($con,$sql3)){
//to identify last record ID in payments table
$pid=mysqli_insert_id($con);
//record in member_payment table
$sql4="INSERT INTO member_payments (payId,memId) VALUES
('$pid','$memId')";
if(mysqli_query($con,$sql4)){
//redirect to the editprofile.php display a success message
$msg1="Member has been successfully added";
header("Location: acceptregistration.php?msg=$msg1");
}else{

86
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


//redirect to the editprofile.php display a success
message
$msg1="An error has occured. Please try again";
header("Location: acceptregistration.php?msg=$msg1");
}
}else{
//redirect to the editprofile.php display a success message
$msg1="An error has occured. Please try again";
header("Location: acceptregistration.php?id=$msg1");
}
}else{
//redirect to the editprofile.php display a success message
$msg1="An error has occured. Please try again";
header("Location: acceptregistration.php?id=$msg1");
}
}else{
//redirect to the editprofile.php display a success message
$msg1="An error has occured. Please try again";
header("Location: acceptregistration.php?id=$msg1");
}
}
?>

1.4 Committee admins/committee/index.php


1.4.1 AJAX code to request data from committees.php when the value of dropdown
menu is changed
<script>
//ajax part to receive details about committees
function showDetails(str){
if (str==""){
document.getElementById("data").innerHTML="";
return;
}
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function(){
if (xmlhttp.readyState==4 && xmlhttp.status==200){
document.getElementById("data").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","committees.php?q="+str,true);
xmlhttp.send();
}
</script>

87
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.4.2 php script to load data to the drop down menu. The dropdown menu will show
the time period for which the committee was appointed
<select name="positionId" id="positionId" onchange="showDetails(this.value)">
<?php
while($row=mysqli_fetch_array($result)){
$startDate=date("F Y",strtotime($row['startDate']));
$endDate=$row['endDate'];
?>
<?php
if($endDate!=NULL){
echo $startDate.' - '.date("F Y",strtotime($endDate));
?>
<option value="<?php echo $endDate;?>">
<?php echo $startDate.' - '.date("F Y",strtotime($endDate));?>
</option>
<?php
}else{
?>
<option value="<?php echo 'current';?>"><?php echo "Current Committee";?></option>
<?php } ?>
<?php }} ?>
</select>

1.5 Admin login


<?php
//to start session
session_start();
//To get username and password
$username=$_POST['username'];//email
$password=$_POST['password'];
//salting the password
$salt = sha1(md5($password));
$pass = md5($salt.$password);//hashed password
require_once("include/dbconnection.php"); // or include("include/dbconnection.php");
//SQL code to combine admin_login and admins
$sql="SELECT * FROM admins as a, admin_login as l WHERE a.adminId=l.adminId AND
a.email='$username' AND l.password='$pass'";
//execute the SQL code
$result=mysqli_query($con,$sql);
//get no. of records
$nof=mysqli_num_rows($result);
if($nof!=0){
$row=mysqli_fetch_array($result);
//full name of member
$_SESSION['Aname']=$row['fname'].' '.$row['lname'];
$_SESSION['adminId']=$row['adminId'];//adminid
$_SESSION['email']=$row['email'];//email

88
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


$_SESSION['active']=$active=$row['active'];//0 for inactive and 1 for active
$_SESSION['category']=$row['category'];
if($active==0){
//Redirect to the login page if not active
$msg="Your account has been deactivated or not yet active";
header("Location:adminlogin.php?id=$msg");
}else{
header("Location:admins/index.php");
}
}
else{
//Redirect to the login page
$msg="Invalid username or password";
header("Location:adminlogin.php?id=$msg");
}
?>

2. Members
2.1 Notifications members/posts/postsNormal.php
2.1.1 AJAX code to receive more information from moreNews.php and display
postsNormal.php
Code adapted from http://www.9lessons.info/2009/12/twitter-style-load-more-resultswith.html
<script type="text/javascript">
//jquery function to show more news items in news panel
$(function()
{
$('.more').live("click",function()
{
var ID = $(this).attr("id");
if(ID)
{
$("#more"+ID).html('<img src="../../images/load_img.gif" />');
$.ajax({
type: "POST",
url: "moreNews.php",
data: "lastmsg="+ ID,
cache: false,
success: function(html){
$("ol#updates").append(html);
$("#more"+ID).remove(); // removing old more button
}
});
}
else{

89
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


$(".morebox").html('The End');// no results
}
return false;
});
});
</script>

2.1.2 php code to display the next 10 News items along with the already displayed list
of items moreNews.php
<?php
include('../checksession.php');
include('../../include/dbconnection.php');//connection
$level=$_SESSION['level'];
$stream=$_SESSION['stream'];
if(isset($_POST['lastmsg']))
{
$lastmsg=$_POST['lastmsg'];
$lastmsg=mysql_real_escape_string($lastmsg);
//select all recent 10 news items starting from last item displayed
$sql="SELECT n.postId,n.title,p.memLevel,p.postTime FROM news AS n, posts AS p WHERE
n.postId=p.postId AND p.postType='N' AND p.postId<'$lastmsg' AND p.memLevel<='$level' AND
p.memType LIKE '%$stream%' ORDER BY n.postId DESC LIMIT 10";
$result = mysqli_query($con,$sql);
$nof=mysqli_num_rows($result);//no of results
if($nof>0){
while($row = mysqli_fetch_array($result)){
//display obtained values
$pid=$row['postId'];//postId
?>
<li onclick="showDetails(this.value)" value="<?php echo $pid;?>" class="selectable"> <img
src="../../images/<?php echo $row['memLevel'];?>s.png" alt="0"/> <?php echo
$row['title'];?><br><span style="font-size:smaller; color:#999"><?php echo date("F j, Y g:i
a",strtotime($row['postTime']));?></span></li>
<?php }?>
<div id="more<?php echo $pid; ?>" class="morebox">
<a href="#" id="<?php echo $pid; ?>" class="more">More News</a>
</div>
<?php
}
}
?>

90
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.2 Academic Records


2.2.1 members/gpa/getuserview.php php code to display records related to the
selected semester and the GPA of that semester in viewrecord.php
<?php
include("include/checksession.php");
$q = intval($_GET['q']);//semester ID passed from viewrecord.php
$memId=$_SESSION['memId'];//ID of member
include('../../include/dbconnection.php');
if (!$con)
{
die('Could not connect: ' . mysql_error($con));
}
//function to return the grade
function returngrade($g){
if($g>=4.2){
return "A+";
}elseif($g>=4){
return "A";
}
elseif($g>=3.7){
return "A-";
}elseif($g>=3.3){
return "B+";
}elseif($g>=3){
return "B";
}elseif($g>=2.7){
return "B-";
}elseif($g>=2.3){
return "C+";
}elseif($g>=2){
return "C";
}elseif($g>=1.7){
return "C-";
}elseif($g>=1.3){
return "D+";
}elseif($g>=1){
return "D";
}else{
return "E";
}
}
//to get GPA of each semester
function semesterGPA($semid){
global $memId;
$sqlsem="SELECT credits,gradeval FROM marks WHERE semester='$semid' AND
memId='$memId'";
global $con;
$result1=mysqli_query($con,$sqlsem);

91
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


$nrows=mysqli_num_rows($result1);
$gradepoint=0;
$totgp=0;
$totcredit=0;
//fetch data to credit and gradeval
$i=0;
while($rowa=mysqli_fetch_array($result1)){
//data array
$credit[$i]=$rowa['credits'];
$gradeval[$i]=$rowa['gradeval'];
$i++;
}
//calculating gradepoint
for($i=0;$i<$nrows;$i++){
$gradepoint=$credit[$i]*$gradeval[$i];
$totgp=$totgp+$gradepoint;
$totcredit+=$credit[$i];
}
//calc GPA
if($totcredit==0){
$gpa=0;
}
else{
$gpa=($totgp/$totcredit);
}
return round($gpa, 4);
}
//to calculate final GPA
function calcGPA($credits,$gradeval){
$gradepoint=0;
$totgp=0;
$totcredit=0;
global $nof;
for($i=0;$i<$nof;$i++){
$gradepoint=$credits[$i]*$gradeval[$i];//grade point for 1 record
$totgp=$totgp+$gradepoint;//total grade point
$totcredit+=$credits[$i];//total credits for the semester
}
if($totcredit==0){
$gpa=0;
}else{
$gpa=($totgp/$totcredit);
}
return round($gpa, 4);
}

$sql="SELECT subject,credits,gradeval FROM marks WHERE semester=$q AND memId=$memId";


$result = mysqli_query($con,$sql);
$nof=mysqli_num_rows($result);//no of results
if($nof!=0){
?>
<table id='semresults'>

92
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


<tr>
<th align='center'>Subject</th>
<th align='center'>Credits</th>
<th align='center'>Grade</th>
<th colspan="2" align='center'>&nbsp;</th>
</tr>
<?php
$i=0;
while($row = mysqli_fetch_array($result))
{
//assign values to credit and grade arrays
$credit[$i]=$row['credits'];
$gradeval[$i]=$row['gradeval'];
$semId=$q;//semester number
?>
<tr>
<td><?php echo $row['subject']; ?></td>
<td><?php echo $row['credits'];?></td>
<td><?php echo returngrade($row['gradeval']);?></td>
<td class="btn" bgcolor="#0099CC">
<a href="editrecord.php?sid=<?php echo $semId;?>&s=<?php echo $row['subject'];?>"><img
src="../../images/edit16.png" height="16" width="16" />Edit</a>
</td>
<td class="btn" bgcolor="#CC0000">
<a href="deleterecord.php?sid=<?php echo $semId;?>&s=<?php echo $row['subject'];?>"><img
src="../../images/delete16.png" height="16" width="16" />Delete</a>
</td>
<?php
$i++; ?>
</tr>
<?php }?>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" bgcolor="#660099" align="center" style="color:#FFF">Semester GPA = <?php
echo semesterGPA($q);?></td>
</tr>
<tr>
<td colspan="5" align="center">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center" bgcolor="#FF3300" class="btn"><a
href="addrecord.php?sid=<?php echo $semId;?>">Add another record to this semester</a></td>
</tr>
</table>
<br/><br/>
<?php
}
mysqli_close($con);
?>

93
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.2.2 JavaScript code to calculate GPA for one semester scripts/sgpa.js


//validate No. of Subjects text box
function validateSubject(){
document.getElementById("formArea1").innerHTML="";
var id=document.getElementById('NoSubject').value;
if((id<1)||(id>15)){
alert("No. of subjects should be less than 15 and more than 1");
document.getElementById('NoSubject').focus();
return false;
}
else if(id==""){
alert("No. of subjects can't be blank");
document.getElementById('NoSubject').focus();
return false;
}
else if(id==NaN){
alert("The No. of subjects must be a number");
document.getElementById('NoSubject').focus();
return false;
}
else if(id % 1 != 0){
alert("The No. of subjects must be a whole number");
document.getElementById('NoSubject').focus();
return false;
}
return true;
}
//confirm the type of input
function dataPrompt(){
var sub=document.getElementById("NoSubject").value;
if(isNaN(sub)){
alert("Please enter a valid number");
return false;
}
else if((sub>25)||(sub<1)){
alert("Number of subjects should be between 0 and 25");
return false;
}
document.getElementById("prompt").innerHTML='</br><div align="center"><p>Select your
preferred option to enter data</p><table><tr><td><input type="button" id="Marks"
value="Marks" onclick="showMarks()" class="button"/></td><td><input type="button"
id="Grades" value="Grade" onclick="showGrade()" class="button"/></td></tr></table></div>';
return false;
}
//function to create marks table
function showMarks(){
var str='<form><table>';
str += '<tr><th>Subject</th><th>Credits</th><th>Marks</th><th></th></tr>';
var NoSubject= document.getElementById("NoSubject").value;
var i;
for (i = 0;i< NoSubject;i++) {

94
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


str += '<tr><td><input type="text" id="Subject'+i+'"/></td><td><input
type="number" id="Credit'+i+'" maxlength="2" required="required" /></td><td><input
type="number" id="Mark'+i+'" maxlength="3" onblur="return validateMarkGrade('+i+')" min="0"
max="100"/></td><td><span id="mark_grade'+i+'" style="padding-left:5px; paddingtop:5px;"></span></td></tr>';
}
str+='<tr><td align="right"><input type="button" id="sgpaCalcBtn" class="button"
value="Calculate SGPA" onclick="calcSGPAmark('+NoSubject+')" align="right"></td><td><input
type="reset" class="button"></td><td></td></tr></table>';
for(var i=0;i<NoSubject;i++){
document.getElementById("formArea1").value;
}
document.getElementById("formArea1").innerHTML=str;
}
//function to create grades table
function showGrade(){
var str='<form><table>';
str += '<tr><th>Subject</th><th>Credits</th><th>Grade</th></tr>';
var NoSubject= document.getElementById("NoSubject").value;
var i;
for (i = 0;i< NoSubject;i++) {
str += '<tr><td><input type="text" id="Subject'+i+'"/></td><td><input
type="number" id="Credit'+i+'" maxlength="2"/></td><td><select id="Grade'+i+'"><option
value="Aplus">A+</option><option value="A">A</option><option value="Aminus">A</option><option value="Bplus">B+</option><option value="B">B</option><option
value="Bminus">B-</option><option value="Cplus">C+</option><option
value="C">C</option><option value="Cminus">C-</option><option
value="Dplus">D+</option><option value="D">D</option><option value="E">E</option><option
value="AB">AB</option><option value="ex">ex</option></select></td></tr>';
}
str+='<tr><td align="right"><input type="button" class="button" id="sgpaCalcBtn"
value="Calculate SGPA" onclick="calcSGPA('+NoSubject+')"></td><td><input class="button"
type="reset"></td></tr></table>';
for(var i=0;i<NoSubject;i++){
document.getElementById("formArea1").value;
}
document.getElementById("formArea1").innerHTML=str;
document.getElementById("Subject0").focus();

function validateSubjectName(subName,NoSubject){
if(subName==""){
alert("Subject name can't be empty");
return false;
}
var subNam=0;
for(var j=0;j<NoSubject;j++){

95
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

if((document.getElementById('Subject'+j).value)==subName){
subNam+=1;
}
}
if(subNam>1){
alert("You have entered same subject more than once");
return false;
}
return true;

}
//function to calculate GPA using grades
function calcSGPA(NoSubject){
var totGPA=0;
var totCredit=0;
var NoSubject= parseInt(NoSubject);
var i=0;
document.getElementById("displayGPA").style.visibility="visible";
//calculating total no of credits
for (i = 0; i < NoSubject; i++) {
//validating subject name
if(validateSubjectName(document.getElementById('Subject'+i).value,NoSubject)==false){
document.getElementById('Subject'+i).focus();
return false;
}
//validating the text in credit fields
if(validateCredit(document.getElementById('Credit'+i).value)==false){
document.getElementById('Credit'+i).focus();
return false;
}
totCredit+=parseInt(document.getElementById('Credit'+i).value);
}
//calculate Grade point
for (i = 0; i < NoSubject; i++) {
var x = parseInt(document.getElementById('Grade'+i).selectedIndex);
var gradeVal=retGradeVal(x);
totGPA+=((document.getElementById('Credit'+i).value)*gradeVal);
}
//calculate GradePoint Average
var SGPA=totGPA/totCredit;
SGPA=SGPA.toPrecision(5);
document.getElementById("displayGPA").innerHTML='Your current GPA value for this
semester is </br><p style="font-size:20px; color:red;">'+SGPA+'</p></br></br><input
class="button" type="button" name="calcTotGPA" id="calcTotGPA" value="Add this to current
GPA and Calculate final GPA" onclick="showFGPA()" />';
//pass GPA and total credit values to hidden text fields to obtain later
document.getElementById("hiddenGPA").value=SGPA;
document.getElementById("hiddenCredit").value=totCredit;

96
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

return true;
}
//function to return grade value for each grade
function retGradeVal(grade){
switch(grade){
case 0:
return 4.2;
break;
case 1:
return 4.0;
break;
case 2:
return 3.70;
break;
case 3:
return 3.30;
break;
case 4:
return 3.0;
break;
case 5:
return 2.7;
break;
case 6:
return 2.3;
break;
case 7:
return 2.0;
break;
case 8:
return 1.7;
break;
case 9:
return 1.3;
break;
case 10:
return 1.0;
break;
case 11:
return 0;
break;
case 12:
return 0;
break;
case 13:
return 0;
break;
}
}
//function to validate credit value
function validateCredit(id){
if(id==NaN || id==""){
alert("The No. of Credits must be a number");
return false;
}

97
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


else if(id % 1 != 0){
alert("The No. of Credits must be a whole number");
return false;
}
else if((id<0)||(id>=8)){
alert("The No. of Credits must be a positive number not
exceeding 8");
return false;
}
else{
return true;
}
}
//calcuate GPA value using marks
function calcSGPAmark(NoSubject){
var totGPA=0;
var totCredit=0;
var NoSubject= parseInt(NoSubject);
var i=0;
document.getElementById("displayGPA").style.visibility="visible";
//calculating total no of credits
for (i = 0; i < NoSubject; i++) {
//validating subject name
if(validateSubjectName(document.getElementById('Subject'+i).value,NoSubject)==false){
document.getElementById('Subject'+i).focus();
return false;
}
//validating the text in credit fields
if(validateCredit(document.getElementById('Credit'+i).value)==false){
document.getElementById('Credit'+i).focus();
return false;
}
totCredit+=parseInt(document.getElementById('Credit'+i).value);
}
//calculate Grade point
for (i = 0; i < NoSubject; i++) {
var x = parseInt(document.getElementById('Mark'+i).value);
var gradeVal=retGradeValMark(x);
if(gradeVal==-1)
return false;
totGPA+=((document.getElementById('Credit'+i).value)*gradeVal);
}
//calculate GradePoint Average
var SGPA=totGPA/totCredit;
SGPA=SGPA.toPrecision(5);
document.getElementById("displayGPA").innerHTML='Your current GPA value for this semester
is</br><p style="font-size:20px; color:red;"> '+SGPA+'</p></br></br><input type="button"
name="calcTotGPA" id="calcTotGPA" value="Add this to current GPA and Calculate final GPA"
onclick="showFGPA()" />';
//pass GPA and total credit values to hidden text fields to obtain later

98
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


document.getElementById("hiddenGPA").value=SGPA;
document.getElementById("hiddenCredit").value=totCredit;
return true;
}
function retGradeValMark(mark){
if(mark>=85)
return 4.2;
else if(mark>=75)
return 4.0;
else if(mark>=70)
return 3.70;
else if(mark>=65)
return 3.30;
else if(mark>=60)
return 3.0;
else if(mark>=55)
return 2.7;
else if(mark>=50)
return 2.3;
else if(mark>=45)
return 2.0;
else if(mark>=40)
return 1.7;
else if(mark>=35)
return 1.3;
else if(mark>=30)
return 1.0;
else if(mark>=0)
return 0;
else if(mark=="AB")
return 0;
else if(mark=="ex")
return 0;
else if(mark=="E")
return 0;
else{
alert("Please enter a valid mark");
return -1;
}
}

2.2.3 JavaScript code to plan GPA for next semester


function calcNextGPA(){
document.getElementById("result").innerHTML="";
if(validatecurGPA()==true || validatecurCredit()==true || validateeGPA()==true||
validatecNext()==true){
//variables
var cgpa=parseFloat(document.getElementById('curGPA').value);//the current total GPA
value
var cNow=parseInt(document.getElementById('curCredit').value);//Total credit hours spent
up to now
var egpa=parseFloat(document.getElementById('eGPA').value);//expected GPA by the end of
next semester

99
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


var ngpa;//GPA that should be acieved for next semester
var cNext=parseInt(document.getElementById('cNext').value);//total number of credit hours
for the next semester
ngpa=(((egpa)*(cNext+cNow))-(cgpa*cNow))/(cNext);
ngpa=ngpa.toPrecision(5);
if(ngpa>4.2){
//to see whether the target GPA is actually possible
//min total credit hours needed to reach the goal if 4.2 is maintained
var xcredits=(cNow*(egpa-cgpa))/(4.2-egpa);
xcredits=Math.ceil(xcredits);
if(xcredits+cNow>135){
document.getElementById("result").innerHTML+="<p>You will
never be able to achieve the expected GPA for the whole course</p>";
return false;
}
else{
//try maximizing the available credit hours to get GPA
var Xcredits=135-cNow;
var Xgpa = (((egpa)*(Xcredits+cNow))-(cgpa*cNow))/(Xcredits);
document.getElementById("result").innerHTML+="<p>The GPA
value you expect cannot be achieved during the next semester. But you will be able to achieve
the GPA during the whole course </br>Optimum option to get a final a GPA of "+egpa+" is: </br>
Maintaining a GPA of "+Xgpa.toPrecision(5)+" for the rest of the "+Xcredits+" credit hours of the
course</p>";
return false;
}
}
else{
document.getElementById("result").innerHTML='Expected GPA for next semester is
</br><p style="font-size:20px; color:red;">'+ngpa+'</p></br></br>';
}
document.getElementById("Calc").focus();
return false;
}
document.getElementById("result").innerHTML="";
return false;
}
function validatecurGPA(){
document.getElementById("result").innerHTML="";
document.getElementById("curGPA1").innerHTML="";
var cgpa=document.getElementById('curGPA').value;
var dotpos=cgpa.indexOf(".");//position of the dot
if(isNaN(cgpa)){
document.getElementById("curGPA1").innerHTML="&nbsp;GPA has to be a
number";
document.getElementById("curGPA").focus();
return false;
}else if(cgpa==""){
document.getElementById("curGPA1").innerHTML="&nbsp;Current GPA has to be filled";

100
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816


document.getElementById("curGPA").focus();
return false;
}else if(cgpa.length<3 || dotpos!=1 || cgpa>4.2 ||
cgpa<0){
document.getElementById("curGPA1").innerHTML="&nbsp;Enter a valid GPA value for
example : 3.5678";
document.getElementById("curGPA").focus();
return false;
}
return true;
}
function validateeGPA(){
document.getElementById("result").innerHTML="";
document.getElementById("eGPA1").innerHTML="";
var egpa=document.getElementById('eGPA').value;
var dotpos=egpa.indexOf(".");//position of the dot
if(isNaN(egpa)){
document.getElementById("eGPA1").innerHTML="&nbsp;GPA has to be a number";
document.getElementById("eGPA").focus();
return false;
}else if(egpa==""){
document.getElementById("eGPA1").innerHTML="&nbsp;Expected GPA has to be filled";
document.getElementById("eGPA").focus();
return false;
}else if(egpa.length<3 || dotpos!=1 || egpa>4.2
||egpa<0){
document.getElementById("eGPA1").innerHTML="&nbsp;Enter a valid GPA value for
example : 3.5678";
document.getElementById("eGPA").focus();
return false;
}
return true;
}
function validatecurCredit(){
document.getElementById("result").innerHTML="";
document.getElementById("curCredit1").innerHTML="";
var cc=document.getElementById('curCredit').value;
if(isNaN(cc)){
document.getElementById("curCredit1").innerHTML="&nbsp;No. of credit hours
has to be a number";
document.getElementById("curCredit").focus();
return false;
}else if(cc==""){
document.getElementById("curCredit1").innerHTML="&nbsp;No.
of credit hours completed has to be filled";
document.getElementById("curCredit").focus();
return false;
}else if((cc.length<1)||(cc<1)){

101
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

document.getElementById("curCredit1").innerHTML="&nbsp;Enter a valid credit value for


example : 2";
document.getElementById("curCredit").focus();
return false;
}
return true;
}
function validatecNext(){
document.getElementById("result").innerHTML="";
document.getElementById("cNext1").innerHTML="";
var cn=document.getElementById('cNext').value;
if(isNaN(cn)){
document.getElementById("cNext1").innerHTML="&nbsp;No. of credit hours has to
be a number";
document.getElementById("cNext").focus();
return false;
}else if(cn==""){
document.getElementById("cNext1").innerHTML="&nbsp;No. of
credit hours completed has to be filled";
document.getElementById("cNext").focus();
return false;
}else if((cn.length<1)||(cn<1)){
document.getElementById("cNext1").innerHTML="&nbsp;Enter a valid credit value for
example : 2";
document.getElementById("cNext").focus();
return false;
}
return true;
}

102
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendix C Sample Data


C.1 Admin Login
It is important that if the Admin table is empty at the beginning, a Level 1 admin
must be created manually in the database before proceeding.
Category

Username/email

Password

hashangod@gmail.com

123456

super@acicts.lk

155555

suwa@gmail.com

123456

Table C.1 Admin Login

C.2 Member Login


Level

Username/email

Password

lahiru.dar@gmail.com

123456

dhanushka1991@gmail.com

1991abc

lahirudesilva@rocketmail.com

qwerty12345

Table C.2 Member Login

103
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendix D Reports Generated


This section will include report type information generated by the system for both
members and administrators.

1.

Administrators
1.1 Generate Financial Statements
Administrators have the facility of generating financial statements for certain specific
time periods of their choice.

Figure D.1.1 Generate Financial Statement

1.2 View administrator details and edit status


Category 1 administrators can view details of other administrators as a summary and
have the authority to change the status of other administrators to active or inactive
mode.
It has been prevented for the same administrator to change his/her status. Only
another administrator can change his/her status.

104
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure D.1.2 Activate / Deactivate Administrators

1.3 Event Registrations


This shows a list of those who have registered for a particular event and will only be
accessible only after the event is held.
All administrators have the authority to confirm participation of members for a
particular event. Administrators can view the list of registered members; check the
ones who have attended and process the data. These details will be updated into
participate table where participation of members will be recorded.

Figure D.1.3 Confirm Participation

105
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.4 Member search and evaluation


Member search page generates a dashboard type report below the search area
which can be accessed by all types of administrators to get an overall understanding
of the member distribution of the society. Google Charting tools have been used
here to provide graphical data representation (13).

Figure D.1.4 View Member Profile

106
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure D.1.5 View Member Profile

1.5 View Committee


All administrators can view the current committee members with their posts and
also members of past committees. A dropdown menu shows available past
committees and by selecting the committee, details can be viewed. This has been
achieved by using AJAX (Refer Appendix B section 1.4)

Figure D.1.6 View Committees for Admin

107
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.6 Notification report


This report generated using Google Charts (14) shows the number of events and
news items posted by each administrator.

Figure D.1.6 View Committees for Admin

1.7 Poll report


This report generated using Google Charts (14) shows the number of polls posted by
each administrator and the status of those polls.

Figure D.1.6 View Committees for Admin

108
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.

Members

2.1 Academic Records


Members are able to view their academic records for each semester, by selecting the
semester in dropdown menu. These records can be edited one by one if needed.

Figure D.2.1 View Records


Dashboard of the GPA section shows a report like information representation
showing academic statistics. The page shows GPA obtained by the member for each
semester along with credit values. (Refer Appendix B section 2.2.1).
This page incorporates Google Charts to improve graphical data representation
ability by using a line chart (15) and a bar chart (14).

109
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure D.2.2 View Records

110
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.2 Member Payments


Members are provided the ability to view payments made by them and print results.

Figure D.2.3 Member Payments

2.3 Committee
Committee details and past committee member details can be viewed in this section.

Figure D.2.4 Committee view for members

111
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendix E User Manual


1. Admin
1.1 Logging in
Administrators should provide a valid email and password and the account should be active
in order to log in. Administrator will be directed to the respective home page depending on
the category.

Figure E.1.1 Administrator Login with error

1.2 Posts
Category 3 administrators can add news and events as a new post.

Figure E.1.2 Add News

112
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

When posting details about an event, the system provides the facility of including a
Google Map location in the post. For this, the admin has to manually find the location of
the event in Google Maps, get the embed code of the map location and paste it in the
text field named Google Maps Embed code (Figure E.1.3). The system will then strip
the unwanted parts of that code and save the required part of embed code in the
database (refer Appendix B section 1.2.1 for code).

Figure E.1.3 Add Event

Figure E.1.4 Getting embed code manually

113
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.3 Polls
Category 1 and 2 administrators can add polls, view results, view comments posted by
members.

Figure E.1.5 Add poll


They can edit, change status of polls and delete polls posted by them .

Figure E.1.6 Edit Poll

Figure E.1.7 Poll Add/Edit/Delete buttons


114
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.4 Merchandise
Category 2 administrators have the authority to add new items. They can upload the
image of item smaller than 500kb, which will be stored in the file system.
Supported image types: gif, jpg, jpeg, png, x-png, pjpeg
It is important to provide price in Sri Lankan Rupees and correct stock value.

Figure E.1.8 Add Merchandise

Category 2 administrators will be shown add item and process member payments
buttons on top of merchandise page.

Figure E.1.9 Merchandise Buttons


These administrators will be shown a button called click here to make details
editable.

115
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.1.10 Merchandise Item Edit Button

Figure E.1.11 Edit Merchandise

1.5 Process Merchandise Payments


Category 2 administrators have been provided the authority for processing payments
made by members for the merchandise they have ordered. Since an automated online
payment system has not been implemented for this system, administrators must use
this facility to add the payments to the accounts after members have paid for what they
have ordered. These records will be recorded in the member-payments table as a
payment made by a member.

116
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.1.12 View and mark orders

Figure E.1.13 Updated pending orders

1.6 Add new administrators


New administrators can be added to the system by category 1 and 2 administrators.
Category 1 administrators can add any type of administrators while category 2
administrators can add only category 3 administrators.

Figure E.1.14 Add new admin 1

117
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

When creating a new admin, a random password will be generated by a user defined
function (Appendix B section 1.1.1) as a set of characters which will be the initial
password of the new admin. As a security mechanism, the generated password will
be hashed and salted (refer section 4.4.1 on password security and appendix B
section 1.1.2).

Figure E.1.15 Add new admin 2


The new admin will be informed about his/her login details via an email. But as a
security precaution the login details are shown to the creator who can manually
inform the new admin if the email was not properly sent.

Figure E.1.16 Administrator registration e-mail

118
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.7 Appoint Committee


Category 1 administrators can add new committees and appoint new Board of Officials.
Also they have the authority to edit the positions of officials. When appointing members
as officials; only level 4 members will be eligible for selection.

Figure E.1.17 Add committee 1


After selecting the members eligible for committee, the admin can appoint those
selected members into various positions such as the President, Secretary etc. Positions
available for selection will be loaded into the dropdown menus from position table of
the database.

Figure E.1.18 Add committee 2

119
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.1.19 Add committee 3

Figure E.1.20 Edit Committee

1.8 Edit standard fees


Category 2 administrators can edit registration and renewal fee which will be updated in
fees table.

Figure E.1.21 Edit standard fees

120
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.9 Add Income


Income is received as payments made to the society by members and other parties.
When adding a new payment, first the admin has to select the type of payment.

Figure E.1.22 Select payment type

1.9.1 Member payment


Member can be searched in the search field by member name or university ID.

Figure E.1.23 Select member

Figure E.1.24 Add member payment

121
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

1.9.2 Other payment

Figure E.1.25 Add other payment

Figure E.1.26 Payment confirmation

1.10 Sign out


Administrators can sign out by clicking on the link Sign out on the header.

Figure E.1.27 Administrator Sign out 1


They will then be signed out and directed to administrator login

Figure E.1.28 Administrator Sign out 2

122
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2. Member
2.1 Notifications
Members can view News and Events in Notifications section. To view details of each
news or event item, user needs to click on the items on left pane. Details will be
displayed on the right pane. Old posts can be viewed by clicking More News or More
Events button.

Figure E.2.1 Member News view


When viewing an Event, a member can register for it while registrations are open by
clicking Register for this event button at the bottom.

Figure E.2.2 Member Event register button


After registration, this button will turn into Unregister from this event and user will
be able to unregister while the registrations are open

Figure E.2.3 Member Event unregister button

123
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.2 Polls
Members can view polls and vote on those along with their comments

Figure E.2.4 Vote for poll


Members can change their vote or their comments in the details section after voting.

Figure E.2.5 Change poll view

124
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.3 Order merchandise


Members can order more than one item at once and the total payable amount will be
calculated at once by a client-side script and will be shown to the member.

Figure E.2.6 Order Item View


When quantity is typed, total payable amount will be automatically calculated. Also
order will not be placed if quantity is greater than the available amount.

2.4 Add Academic Records


This section allows members to add academic records of a whole semester. First the
member can select semester number; next select the number of subjects faced and
then select the mode of data entry: marks or grade.

Figure E.2.7 - Add Record 1

Figure E.2.8 - Add Record 2


125
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Then an array of text boxes will be generated from a JavaScript (refer Appendix B
section 2.2.2) where the member will be able to enter subject name, credit value and
grade obtained. Before the form is submitted, it will be validated for data mismatches
using JavaScript.

Figure E.2.9 Add Record 3


Finally, the form will be submitted and data will be stored in marks table and the
member will be shown the GPA of that particular semester.

Figure E.2.10 Add Record 4

126
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.5 Edit / Delete academic records


In the view record section, the user can edit individual changes to each record by
clicking Edit button next to each record. To select the relevant record set, select the
semester from dropdown menu.

Figure E.2.11 View / Edit record window


Then the user will be directed to another page where selected record can be edited.

Figure E.2.12 Edit record

To add a record to an existing record set, user will have to click on Add another record
to this semester.
Then the user will be directed to another page where new record can be added to the
existing record set of that particular semester.
127
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.2.13 Add record to existing record set

2.6 Calculate GPA for one semester


This is as same as adding a new record except it doesnt store the GPA result. This
function is accessible even for non-members (Refer Appendix B section 2.2.2).
Calculated GPA can then be integrated to the existing GPA and final GPA can be
obtained within the same page by clicking Add this to current GPA button.

128
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.2.14 Calculate GPA for 1 semester

2.7 Plan GPA


This can be used to calculate the amount of GPA that needs to be scored for next
semester in order to achieve a total target GPA by the end of that semester. For this the
user has to provide current GPA, total credits followed and credits to be covered in the
next semester as inputs.
The system will calculate the minimum GPA that needs to be achieved in the next
semester. If the target GPA cannot be reached by next semester, then the system will
calculate and see whether the target could be achieved within the full course. If so,
then it will calculate the GPA that needs to be maintained for the rest of the course in
order to attain the target GPA (Refer Appendix B section 2.2.3). This function too is
accessible for non-members.

129
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure E.2.15 Plan GPA

2.8 Calculate Final GPA


When the users provide current total GPA, completed credit hours, GPA obtained for
this semester and credit hours spent for this semester, it will integrate results of this
semester to the current total GPA and give the new final GPA value (Refer Appendix B
section 2.2.4).

Figure E.2.16 Calculate Final GPA

130
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.9 Edit Profile


Members can edit their name, e-mail, contact number and password which will be
validated before updating

Figure E.2.17 Edit Member Profile

2.10 Sign out


Members can signout by clicking on the link Sign out on the header.

Figure E.2.18 Member Sign out 1


They will then be signed out and directed to member login.

Figure E.2.19 Member Sign out 2

131
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2.11 Reset forgot password


Members can request for password change in case if they forgot their password by
clicking on the link Forgot Password in the login section. Then member will have to
enter his/her email.

Figure E.2.20 Forgot password 1


Next an automated email will be sent to that email with password reset link.

Figure E.2.21 Forgot Password 2

Figure E.2.22 Password reset email


When the reset link is visited, the user will be prompted to enter the new password
which will be set as the new password.

Figure E.2.22 Password reset email


132
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Then the member will be directed to member login.

Figure E.2.23 Member login success message

133
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendix F Hosting
1. Registration
First an account was registered in the selected free host 000webhost using a free
sub-domain option.

Figure F.1 000webhost home page


An email was received with account details which was used to log into the cPanel
account .

Figure F.2 000webhost account confirmation e-mail

This information was used to log in to the account.

134
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

2. Creating the web site


After logging in, a website account was created by selecting the free sub-domain
eskdu.herobo.com

Figure F.3 Create new account success message


Then the account was selected and cPanel was accessed.

Figure F.4 cPanel access selection

3. Creating and importing database


Existing database was exported to a .sql file using phpMyAdmin in local host.

Figure F.5 Export database from phpMyAdmin on local host

135
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Next, Manage Databases section in the account was accessed and a new database
was created with the following details.

Figure F.6 Create new database on server

Figure F.7 New database configuration details


This information was saved in a text file and phpMyAdmin was accessed in cPanel.

Figure F.8 A part of cPanel


The script that was exported from the local machine was then imported to the
created database using phpMyAdmin.

136
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure F.9 phpMyAdmin on server

Figure F.10 Importing database to the server

4. Uploading Files
This was done using Filezilla client. Details of eskdu account was used to establish a
connection between Filezilla client and the server and FTP was used to transfer files
to the server from local machine.

Figure F.11 Uploading files to the server

137
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure F.12 Remote host file view after connection was established

Figure F.13 Transferring files to server

5. Initializing web site


File manager of cPanel was used to access the root/public_html/include folder
where dbconnection.php was stored. This file was edited with the database details
obtained when creating the database.

Figure F.14 Web site root when viewed from File Manager
Next the file default.php in root/public_html folder was deleted.
Now the website is publicly accessible and a free domain eskdu.tk was used to
redirect to the actual sub-domain eskdu.herobo.com

138
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendix G GPA Calculation Details

Figure G.1 GPA Definitions


139
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Figure G.2 GPA Equations


These images were extracted from KDU Prospectus 2013-2015 (7)

140
BCS Professional Project (Professional Graduate Diploma in IT)

S.L.D De Silva 990403816

Appendix H Evaluation Form


Evaluation Form
Web Based Member Management System for Engineering Society of
KDU
Date (YYYY/MM/DD)
Use a tick to indicate your preference

User type: Administrator

Member

Feature

User satisfaction level


Exceptional

Good

Satisfactory

Bad

Worse

Interfaces
Colour scheme
Font size
Font weight
Error and success messages
Navigation
Performance and speed
Icons
Links
Data presentation
Validation of invalid data
Browser independence
Understanding functions
Mobile compatibility

On a scale of 1 to 10 where would you place this whole system?

Suggestions:
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
Figure H.1 Evaluation Form

141
BCS Professional Project (Professional Graduate Diploma in IT)