You are on page 1of 77

University of Sheffield

CITY Liberal Studies


Department of Computer Science
Final year project
CITYs Alumni Web Site
This report is submitted in partial fulfillment of the requirement for the degree
of Bachelor of Science with Honours in Computer Science by
Filip Apostolski
May, 2009
Approved
Ms Anna Sotiriadou
Dr. Konstantinos Dimopolous
2
CITYs Alumni Web Site
By
Filip Apostolski
Ms. Anna Sotiriadou
Abstract
The following report contains information related to the development of CITYs
alumni web site. The main aim of the project is to develop a web based application that is
going to make it possible for the former students of CITY College to keep in touch with
each other and that will substitute the manual system of the alumni office with an
automated one. First of all, the tasks that need to be completed are stated. There is a
separate chapter where each task that was identified as necessary in order to successfully
develop the alumni web site of CITY College is presented and described in detail. After
each phase of the software development life cycle will be explained, the created system will
be evaluated together with the software development process that was applied in order to
implement the web site.
3
DECLARATION
All sentences or passages quoted in this thesis from other people's work have been
specifically acknowledged by clear cross referencing to author, work and page(s). I understand that
failure to do this amounts to plagiarism and will beconsideredgrounds for failure in this thesis and
the degree examination as a whole.
Name : Ivo Neskovic
Singed: Date: 29 May, 2009
4
1. Introduction....................................................................7
1.1Aim.................................................................................................................................7
1.2 Objectives......................................................................................................................8
1.3 Project Content..............................................................................................................9
2. Literature Review.........................................................10
2.1 Similar Work...............................................................................................................10
2.1.1 Sheffield Hallams alumni web site -...................................................................10
2.1.1.1 Users..................................................................................................................11
2.1.1.2 Functionalities...................................................................................................11
2.1.1.3 User Interface....................................................................................................11
2.1.2 Melbournes alumni web site -.............................................................................12
2.1.2.1 Users..................................................................................................................12
2.1.2.2 Functionalities...................................................................................................13
2.1.2.3 User Interface....................................................................................................13
2.1.3 Oxfords alumni web site -...................................................................................14
2.1.3.1 Users..................................................................................................................14
2.1.3.2 Functionalities...................................................................................................14
2.1.3.3 User Interface....................................................................................................15
2.1.4 Harvards alumni web site -.................................................................................16
2.1.4.1 Users..................................................................................................................16
2.1.4.2 Functionalities...................................................................................................16
2.1.4.3 User Interface....................................................................................................17
2.1.5 Manchesters alumni web site - ...........................................................................18
2.1.5.1 Users..................................................................................................................18
2.1.5.2 Functionalities...................................................................................................18
2.1.5.3 User interface....................................................................................................19
2.1.6 Summary..............................................................................................................19
3. Project Management.....................................................20
3.1 Software Development Process..................................................................................20
3.2 Project Plan.................................................................................................................21
4. Analysis........................................................................24
4.1 Current Situation at CITY...........................................................................................24
4.2 Requirements elicitation.............................................................................................24
4.2.1 Identifying the Users and Functional Requirements............................................24
4.2.2 Use Case Diagram................................................................................................26
4.2.2.1 Register.............................................................................................................27
4.2.2.2 Log In................................................................................................................28
4.2.2.3 Add News..........................................................................................................29
4.2.2.4 Modify news.....................................................................................................30
4.2.2.5 Remove news....................................................................................................30
4.2.2.6 View News........................................................................................................31
4.2.2.7 Add Event.........................................................................................................32
5
4.2.2.8 Modify event.....................................................................................................32
4.2.2.9 Remove event....................................................................................................32
4.2.2.10 View event......................................................................................................32
4.2.2.11 View Profile....................................................................................................33
4.2.2.12 Update Profile.................................................................................................33
4.2.2.13 Find member...................................................................................................34
4.2.2.14 Add Alumnus of the Month............................................................................35
4.2.2.15 View Alumnus of the Month..........................................................................35
4.2.2.16 Broadcast e-mail .............................................................................................35
4.2.2.17 Add Alumni Officer........................................................................................36
5. Design...........................................................................37
5.1 Design of the database................................................................................................37
5.1.1 Entity Relationship Diagram (ERD)....................................................................37
5.1.2 J ustification of the proposed ERD.......................................................................38
5.1.2.1 The EVENT Entity............................................................................................38
5.1.2.2 The NEWS Entity.............................................................................................38
5.1.2.3 The USER entity...............................................................................................39
5.1.2.4 The MEMBER Entity.......................................................................................39
5.1.2.5 The ALUMNUS OF THE MONTH Entity......................................................40
5.1.3 Relational Schema................................................................................................40
5.2 Architectural Design...................................................................................................42
6. Implementation.............................................................43
6.1 Technologies Comparison...........................................................................................43
6.1.1 Hypertext Preprocessor (PHP).............................................................................43
6.1.2 Active Server Pages (ASP)..................................................................................43
6.1.3 J ava Server Pages (J SP).......................................................................................44
6.1.4 Ajax......................................................................................................................45
6.1.5 Summary..............................................................................................................45
6.2 Development Tools and Technologies........................................................................46
6.2.1 HTML ..................................................................................................................46
6.2.2 CSS.......................................................................................................................46
6.2.3 PHP......................................................................................................................46
6.2.4 MySQL.................................................................................................................46
6.2.5 Apache.................................................................................................................46
6.3 Implementation flow...................................................................................................47
6.3 Essential code and implementation justification.....................................................48
6.3.1Connect to database..............................................................................................48
6.3.2 Register................................................................................................................49
6.3.3 Log In...................................................................................................................50
6.4.4 Find Member........................................................................................................51
6.4.5 View Personal Profile..........................................................................................52
6.4.6 Update Profile......................................................................................................52
6.4.7 Add alumni officer...............................................................................................53
6.4.8 Broadcast e-mail ..................................................................................................54
6
6.4.9 View events..........................................................................................................54
6.4.10. Add event..........................................................................................................55
6.4.11. Modify event.....................................................................................................55
6.4.12 Remove event.....................................................................................................56
7. Testing..........................................................................57
7.1 Unit Testing.................................................................................................................57
7.2 Integration Testing......................................................................................................57
7.3 System Testing............................................................................................................58
8. Evaluation.....................................................................59
8.1 Process and plan evaluation........................................................................................59
8.1.1 Process Plan.........................................................................................................59
8.1.2 Process Evaluation...............................................................................................59
8.2 System Evaluation.......................................................................................................60
9. Future development and Summary...............................61
9.1 Future work.................................................................................................................61
9.1.1 Contact alumni officer .........................................................................................61
9.1.2 Submit CV............................................................................................................61
9.1.3 Discussion forum.................................................................................................61
9.1.4 Setting personal information private or public....................................................62
9.2 Summary.....................................................................................................................62
10. Bibliography...............................................................63
Appendix A Interview...................................................64
Appendix B Use Cases..................................................65
B.1 Log In.....................................................................................................................65
B.2 Add event...............................................................................................................65
B.3 Modify Event..........................................................................................................66
B.4 Remove Event........................................................................................................66
B.5 View eventa............................................................................................................67
Appendix C Code Listing..............................................68
C-1 register.php.............................................................................................................68
C-2 logIn.php................................................................................................................69
C-3 findMember.php.....................................................................................................70
C-4 updateProfile.php...................................................................................................72
C-5 addEvent.php..........................................................................................................74
C-6 modifyEvent.php....................................................................................................75
Appendix D Poster.........................................................77
7
1. Introduction
Many universities around the world offer services and benefits to thealumni students. This
is the main roll of the alumni offices. In order to make the services and benefits available
for the graduated students, many universities have alumni websites. An alumni website is a
web based application where the former students can take advantage of the benefits and
services that a university offers after they graduate.
Being a member of an alumni web site of a university offers many services and
benefitsfor the graduatedstudents. For example, the alumni web siteof auniversity keeps a
person in track with the events that are organized by the university and informs the
members when some important events will occur that have not been organized by the
university. Furthermore, an alumni website contains information about some important
newswhich is related to the university or some important news that is related to a persons
field of study. Another advantage of being a member of an alumni web site, which is
considered to be the main reasons why many universities have an alumni web site, is that a
person can easily find some information concerning a former student and the person can
easily contact any other member of the alumni community.
Citys alumni web site is of great importance to the university at the moment.
Because of the fact that the number of people that have graduated at City is growing fast,
maintaining contact with the graduates has become a very important issue. Furthermore, it
is also very important for CITY to make it possible for a graduated student to be able to
maintain contact with another graduated student. At this moment, Citys alumni web page
does exist, however it is not functional. The online community doesnt exist at this point.
The web site only offers information about the benefits and services that the online
community should offer and information about some news and events that have occurred or
will occur in the future.
1.1Aim
The aim of the project is to create a web based application that is going to make it
possible for the alumni students to keep in touch with each other and that will
substitute the manual system of the alumni office with an automated one.
The graduated students can easily find some information such as contact details for
another graduate of CITY College using the application, which means that they can easily
contact any person that is a member of the alumni web site. Making it possible for the
former students to keep in touch is not the only functionality that the application will offer.
The former students can easily contact the alumni officer if some help is required.
Furthermore, the former students will have access to some news that are related to CITY
8
college and some events that have happened inside the college. Another reason why such an
application can be found useful is that City College can easily monitor a persons career,
which is a very important issue for many educational institutions around the world.
1.2 Objectives
The aim of a project is divided into many different steps called objectives. In order to
eventually get to the aim of the project, the following objectives should be completed:
A literature review must be conducted about other universitys alumni web sites in
order to gain an idea of what the application should offer. A literature review is also
very useful when it comes to adding some extra functionalities that can be found
useful and have not been requested by the client.
Interviewing the person in charge of Citys alumni officein order to see what are
His/her expectations.
Identifying the different types of users that Citys alumni web site should have.
Formally defining the requirements in order to create some scenarios. The use case
specifications and the scenarios are found to be very useful later on in thedesign,
implementation and testing phase. Furthermore, the use cases forma mean for
determining that the user requirements have been met.
Conducting a literature review about the possible technologies that can be used to
make Citys alumni web site in order to find the most suited one for such an
application.
Choosing a software engineering methodology that is considered to be the best
choice for this type of application.
Making a thorough analysis of the system in order to understand exactly what the
system should do and in order to create a good quality design of the system.
Designing a possible solution to the problem.
Implementing all the appropriate classes using the previously chosen technology
and connecting them so that they can communicatewith each other.
After the code has been implemented a proper amount of testing must be done in
order to make the application fully functional and free of any possible bugs or
errors.
9
1.3 Project Content
The following chapters illustrate the work that has been done in order to make the alumni
web site. First of all, in chapter 2, a literature about similar works and the technologies that
can be used in order to implement the application have been presented. In the 3
rd
chapter,
the software development process that was used for the development of the application is
briefly explained and the reason why it was chosen is justified. Furthermore, a detailed plan
of action that was followed through the last 8 months is presented. The 4
th
chapter presents
the analysis of the system. The interview that was done in order to capture the requirements
and the different types of users of the system is illustrated. Furthermore, the analysis
chapter contains the use case diagram together with the use cases. The 5
th
chapter is mainly
focused on the design of the database that is going to be used to store the information
required for the alumni web site and also the architecture of the system is explained. The 6
th
chapter contains information about the implementation of the application. The tools and
technologies that are required in order for the application to work are described together
with the technologies that were used in order to implement the interface of the web site and
the appropriate functionalities. Also, some important code is presented and the internal
logic of the system is described. The 7
th
chapter contains information about the testing
strategies that were imposed to the application, during the implementation phase and after
the application has been finished. The 8
th
chapter is focused on the evaluation of the
software development process that was used and the evaluation of the system. The final
chapter of the report presents some extra functionalities that can be added to the system that
could be very useful and a conclusion.
10
2. Literature Review
2.1 Similar Work
As mentioned above many universities around the world have already created an alumni
web site. Even though the functionalities that the application should offer are clear, a proper
amount of literature review must be conducted. By making a literature review for similar
works, extra functionalities can be added to the application that can be useful and have not
been requested by the client. It is very important to pay attention to the human - computer
interaction (HCI) issues, meaning carefully examining the appearance of the websites in
order to make Citys alumni web siteeasy to use and navigate.
2.1.1 Sheffield Hallams alumni web site -
http://arum.lits.shu.ac.uk/NetCommunity/Page.aspx?pid=202&srcid=309
Figure 2.1 Sheffield's alumni web site
11
2.1.1.1 Users
Onthe alumni web site of Sheffield Hallamuniversity three different types of users can be
identified. The first type of users is everyone that wants to visit the alumni web site. The
second type of users is the members of the alumni community. The members of the online
community are the former students that have graduated. The third type of users is the
alumni officer. The alumni web site must have at least one alumni officer. The alumni
officer is the person that is responsible for modifying and maintaining the web site.
2.1.1.2 Functionalities
The non-member users have access to only a few links that are concerned with the benefits
and services of being a member of the alumni community and to the links that are
concerned with the news and events that have happened or will happen in the future.
Furthermore, a person that is not a member of the alumni web site and has graduated on
Shefield Hallam Universityhas access to the register functionality, which is used to become
a member of the alumni web site. The non member users do not have access to the
functionalities that the online community offers.
The users which are members of the alumni web sitehave access to everything that the non-
member users have plus the functionalities that the online alumni community offers. The
main functionalities that the alumni community offers are viewing and updating the
personal profile, finding a member of the community and sending and receiving e-mails.
Extrafunctionalities whichcan be found useful are access to theclass notes, subscription to
the universitysmagazine and e-mail forwarding. The main functionalities are the ones that
an alumni web site must offer and the extra functionalities are functionalities which are
useful however they are optional.
The alumni officer users probably haveaccess to everything that the members can
access except for view and update profile. They are the people responsible for modifying
and maintaining the web site. Some functionalities of the alumni officer users that can be
identified and which are used to maintain the web site are add and delete news, add and
delete events and add and remove class notes. Furthermore, broadcast e-mail functionality
might exist because most of the members will subscribe to the universitys magazine which
is sent by e-mail. It would be very time consuming for the alumni officers to send e-mails to
each of the members one by one if the broadcast e-mail functionality does not exist.
2.1.1.3 User Interface
The interface of the web site is user friendly, meaning that it is easy to use and to navigate.
The interface is user-friendly because thewebsite is not overcrowded with many links that
are not connected with the alumni web site. Further on, another reason why the interface is
12
user-friendly is that the different types of links are separated into different frames. The links
that can be visited by both member and non-member users are located in a frame on the left
side of the window. The links that can be used only by the members of the online
community are separated from the other links in a frame and they are located on the right
side of the window.
2.1.2 Melbournes alumni web site -
http://www.unimelb.edu.au/alumni/
Figure 2.2 Melbourne's alumni web site
2.1.2.1 Users
On the alumni web site of the University of Melbourne threedifferent types of user
can be identified. The first type of user is the non-member user which can beinterested in
visiting the university's web site for any reason. The second type of users isthe members of
the alumni web site. A member can be every person that has graduated on the University of
13
Melbourne. Finally, the thirdtype of usersis the alumni officers. There must be at least one
or more alumni officer users.
2.1.2.2 Functionalities
The first type of users, the non-member users can not use the functionalities that the online
community offers. They can access only someof thelinks that contain information about
the services and the benefits that the online community offers. Furthermore, the non-
member user can access the news and events links and they can download a sample of the
university's magazine. At last, people that have graduated on the University of Melbourne
can register and become members of the alumni web site.
The second type of users, the former students that have graduated and which are
members of the alumni web site, haveaccess to everything that the non-member users can
access and they can use the functionalities that the online community offers. The main
functionalities that the online community offers are view profile, update profile, find a
member of the alumni community and sending and receiving e-mail. Furthermore, members
have access to some more events than the non-member users, events which take place
inside the university. Extra functionalities that can be found useful are downloading the
universitysmagazine, view publications and e-mail forwarding.
The alumni officer users most likely have access to everything that the members can
access. They are responsible for modifying and maintaining the web site. The
functionalities which are used to maintain the web site are add and remove news, add and
remove events, upload magazine and add and remove publication.
2.1.2.3 User Interface
The interface of the web site is not user friendly, meaningthat it is not easy to use and to
navigate. The site is contains many links which are not related to the alumni community.
This means that the web site is overcrowded with many unnecessary links. A person that
will visit the web site for the first time will might have difficulties in finding the
information that s\he was looking for.
14
2.1.3 Oxfords alumni web site -
http://www.alumni.ox.ac.uk/
Figure 2.3 Oxford's alumni web site
2.1.3.1 Users
Four different types of users can be identified in Oxford's alumni web site. The first type of
users can be every person that wants to visit the web site and is not a member of the alumni
web site. The second type of users is the former students of the University of Oxford that
have graduated. In the Oxford alumni web site, the current students of the university can
also become members of the alumni web site. The current students are identified as the
third type of users. Thefourthtype of usersis the alumni officers.
2.1.3.2 Functionalities
The non-member users can visit the web site and see only information about the services of
the alumni community. Furthermore, this type of users canview some news and events that
have occurred or will occur in the future, however not all of them. The local events can be
viewed only by the members of the web site. If a non-member user is a current student or a
15
graduated student from the University of Oxford, the register functionality can be used in
order to become a member of the alumni web site.
The second type of users, the former students which are members of the web site
can do everything that the non-member users can. They also have access to the
functionalities that the online community offers. The functionalities that the alumni web
site offers to graduated students who are members are access to all events, view profile,
update profile, finda person that is a member of the web site, sendingand receivinge-mail
and e-mail forwarding. Furthermore, the graduated students have the benefit of receiving
career advice.
The current students have access to everything that the graduated students who are
members of the alumni web site have, except for the e-mail forwarding functionality and
the benefit of receiving career advices.
The alumni officers most probably have access to everything that the site offers.
They are responsible for modifying and maintaining the web site. Some functionalities that
are used in order to maintain the web site are add and remove news and add and remove
events.
2.1.3.3 User Interface
The interface that the site offers is very simple and user friendly, meaning that it is easy to
use and to navigate. The web site is not overcrowded with many links. Eachlink that can be
accessed by both people that are not members and people that are members is located in a
frame on the top of the window. It is very useful that the site offers a link that leads the user
to the new information or events that have been added by the alumni officer.
16
2.1.4 Harvards al umni web site -
http://www.haa.harvard.edu/haa/html/index.shtml
Figure 2.4 Harvard's alumni web site
2.1.4.1 Users
In Harvards alumni association web site three different types of users can be identified.
The first type of users are the people that are not a member of the alumni association. The
second type of users arethe members of the online community. The members of the web
site are the former students that have graduated. The third type of user is the alumni officer.
At least one alumni officer must exist that is in charge of maintaining and modifying the
web site.
2.1.4.2 Functionalities
The users which are not members of the alumni association can only have access to some
links that are concerned with the services and benefits of being a member of the online
community. Furthermore, they have access to the news and events that have occurred and
17
the events that will occur in the future. Furthermore, they can register if they have
graduated on the University f Harvard.
The members of the alumni association, the former graduated students have access
to all of the functionalities and services that the alumni web site offers. The typical
functionalities that the online community offers are viewing and updating your profile,
finding another member of the alumni web site and sending and receiving e-mail.
Furthermore, extra functionalities that can be found very useful are e-mail forwarding and
joining a Harvard group. It is very useful that the web site has a discussion link. The
discussion link is a forum where the members can open any topic for discussion that is
connected to a persons field of studies.
The alumni officers probably have access to everything that the site offers. They are
responsible for modifying and maintaining the web site. The only functionalities which can
be identified that are used in order to maintain the web site are add news, remove news, add
event and remove event.
2.1.4.3 User Interface
The interface of Harvards alumni web site is user friendly which means that it is easy to
use and to navigate. All the links that are concerned with the alumni web site are located in
a frame which is located on the right side of the web site. On the top of the page we can see
another frame with links. On this frame useful links can be found such as a link to
Harvards home page and to the different departments that Harvard has. On the right side of
the web site the log in frame is placedwhich means that the membersor the alumni officers
can directly log in when they open the alumni web site. It is important to mention that the
site is not overcrowded with many unnecessary links that are not connected to the alumni
associationor the university.
18
2.1.5 Manchester s alumni web site -
http://www.manchester.ac.uk/alumni/
Figure 2.5 Manchester's alumni web site
2.1.5.1 Users
On the University of Manchester threedifferent types of users can be found. The first type
of users is the people that are not members of the online community. The second type of
users isthe graduated students. Finally, the thirdtype of users isthe alumni officers.
2.1.5.2 Functionalities
The non-member users have access to the alumni web site. They can view the information
about the services and benefits of becoming a member of the online community.
Furthermore they can view the events and news that are taking place inside the university.
Also they can see some publications that have been added by the alumni officer. In order to
become a member non-member usershave to graduate onthe University of Manchester and
register on the web site.
19
The graduated students have access to everything that the non-members users have
plus the functionalities that the alumni association offers. The typical functionalities that the
web site offers areview and updateprofile, find another alumnus and send and receive e-
mail. Some extra functionalities that can be found useful are subscription to the online
magazine and e-mail forwarding.
The alumni officers type of users is the people in charge of maintaining the web
site. At least one alumni officer must exist in order to maintain the web site. The
functionalities that can be identified and are used to maintain and modify the web site are
add and remove news, add and remove event and upload magazine.
2.1.5.3 User interface
The interface of the web site is user friendly which means that it is easy to use and to
navigate. Furthermore, the web site is not overcrowded with links. However there are some
unnecessary links such inside the alumni website such as links to restaurants and hotels
which are near the university. This is useful for the prospective students and not for the
former students because of the fact that they already have knowledge about theseissues.
2.1.6 Summary
Conducting a literature review about similar works is very important. The reason why it is
important is that a person can better understand what an alumni community is and why it is
useful. First of all, after the literature review about similar works has been completed, the
main functionalities that an online alumni community must offer were identified. The main
functionalities are viewing and updating the personal profile, view news, view events and
find a member. Also, one extra functionality that has not beenrequested by the client and
can be found very useful for the alumni officer was identified. This extra functionality is
broadcast e-mail which is used to send e-mail to all the members of the online community.
Second of all, after the similar works have been covered, an idea was gained of how the
user interface should look in order to be easy to use and navigate. Making a user friendly
interface that is not going to be overpopulated with any unnecessary links was the only non-
functional requirement that was requested by the client.
20
3. Project Management
3.1 Software Development Process
A software development process is a set of stages which is imposed to the development of a
software product [1]. There are many different software development processes and all of
them can be applied on any type of software. The best suited process for a software depends
on many issues such as the size and complexity of the software, whether the software might
be imposed to some changes, whether the functional requirements are clear etc. Each
software development process includes different steps that form the softwares lifecycle.
The software development process model that was used to create CITYs alumni
web site is the Waterfall model. The Waterfall model is a linear and sequential software
development process, meaning that the different phases are done one after the other in a
sequential manner. The Waterfall model is divided in five different phases: Analysis
(Requirements Elicitation), Design, Implementation, Testing (Validation) and Maintenance
[2]. There are many advantages of using the Waterfall model. First of all, each phase of the
software development lifecycle has its own start and end time. This will lead to customer
satisfaction because the work done can be presented to the client at any point. Furthermore,
the requirement specification is described in detail at the early stage of the software
development process, which means that the implementation and testing phase will be made
easier if the requirements will not go through some changes. The main disadvantage of the
Waterfall model is that the requirements are frozen, meaning that they can not be easily
changed. If something has to be changed in the implementation phase, the analysis and
design have to be reviewed and changed. This leads to great complexity and confusion.
Figure 3.1 Waterfall model phases
Furthermore, the Waterfall model is use-case driven, which means that use-cases are
used in order to capture the functional requirements. The use-cases are also used to create
21
test scenarios which are very useful for testing. The reason why the Waterfall model was
chosenfor building CITYs alumni web siteis to simplify the development process of the
application. Because the functional requirements were very clear, the Waterfall model was
found to be the most suitable choice for building the alumni web site. There was no room
left for changes in the functionalities in the system and no changes occurred.
3.2 Project Plan
Figure 3.2 Project Plan
22
After the user requirements were captured and after the software development process that
was followed was selected, a detailed plan of how the work should progress had to be
created. All the different steps that were necessary to be taken in each stage of the Waterfall
model were identified. Taking into consideration that the deadline for the submission was in
seven months, enough time was allocated to each phase of the software development
process. The project plan is presented using a Gantt chart. The chart presents the amount of
days that were allocatedto every objective.
The first objective identified was to conduct a literature survey about related work
and the technologies. The literature review was identified as very important in order to
better understand what the task of an alumni web site reallyis. The literature review related
to similar work was also identified as important because some extra functionalities could be
identified which could be very useful. The literature review about the technologies was
planed to be finished at the very beginning of the project in order to choose which
technology is going to be used for implementing the alumni web site. If the technology is
chosen at the start of the project, adequate time for familiarizing with the selected
technology would be available. The time allocated to finish the literature review was 35
days.
After the complete literature survey is finished, detailed analysis of the system
should be prepared. The time given for analyzing the system was 5 days. The steps which
were identified as compulsory were creating a use case diagram, defining the non-formal
specification of the user requirements and developing use cases. The use case diagram
illustrates which type of user has access to which functionality that the web site will offer.
One day was allocated to the use case diagram. The remaining four days were reserved for
creating the use cases and the non-formal specification of the user requirements.
Right after the analysis has been finished, a possible solution for the design of the
database and the architecture of the application had to be offered. In order to design the
database that the alumni web site will be connected to, the tasks identified were creating an
Entity Relationship Diagram, which will identify the appropriate entities, together with the
attributes and relations, creating a Relational Schema, which is used to identify which
attributes should be added to which entities in order to hold a relation to another entity and
the proposed ERD should have been justified. The time given to complete the design was 5
days.
Once the analysis and the design phase of the Waterfall model have been finished,
45 days were allocated for familiarizing with the selected technology. The reason why a
longer period of time was allocated to familiarizing with the selected technology is because
the technology selected was going to be used for the very first time.
23
After my skills and knowledge in the selected technology would have been
increased, the implementation of the system was supposed to be started. The time allocated
for the implementation phase was 30 days.
After the implementation phase would be finished, the application needs to be
carefully tested in order to ensure that the application does not have any bugs. The time
allocated for the testing phase was 15 days. 7 days were allocated for testing each class
independently and then another 8 days for testing the application as a whole.
Once the application has been implemented and fully tested, it was identified that
the process selected and the final version of the system should be evaluated. The process
evaluation is concerned with how the process selected was followed and whether the
selected process was suitable for building CITYs alumni web site. 3 days were allocated
for evaluation.
Finally, after everything would have been finished, 15 days were allocated for
review. The review is necessary in order to improve the code that has been implemented
and to correct and mistakes that could have been made in each phase of the Waterfall
model.
24
4. Anal ysis
4.1 Current Situation at CITY
Currently CITY has an alumni office however all the procedures are handledmanually. The
information about the graduated students is kept on paper. Because everything is done
manually it is very difficult for CITY College to keep track of the careers of their former
students. Furthermore, it is almost impossible for the graduated students to find information
about other former students, which means that they might eventually lose contact. If a
person wants to find some informationconcerning a former student for any reason, s/he will
have to contact the head of the alumni officeandthe head of the alumni office will have to
find the proper document manually. Furthermore, if an alumni student wants to update
his/her profile, s/he will have to contact the alumni office by telephone and tell the alumni
officer to manually modify the profile. This is very impractical and time consuming.
Additionally, it is very difficult for CITY College to offer services and benefits for the
graduated students which is a crucial issue for every university. The above stated issues can
be taken care of by building an online alumni community. Thats why it is crucial for CITY
College to have a functional alumni web site as soon as possible.
4.2 Requirements elicitation
In order to get the requirements, list of questions have beenprepared to form aninterview. I
interviewed the head of the alumni office, Ms. Eleni Karaiskou. After the interview was
over thefunctionalities that the application should offer were captured. The next step is to
define each requirement and to identify the different type of users inside the applicationin
order to better understand what the system is supposed to do and how it will do it. The
requirements that were captured with the interview were all functional requirements. Some
questions were asked in order to capture any non functional requirements. However, the
client was only concerned with the functionalities that the application should offer. (see
Appendix A - Interview)
4.2.1 Identifying the Users and Functional Requirements
The interview lead to the identification of four different types of users of CITYs alumni
web site. The first type of user can be every person that is interested in visiting the alumni
website. The second type of users is the members of the online community. Members of the
online community can be the graduated students of CITY College. The third type of usersis
the alumni officers which is responsible for modifyingthe web site. Finally, the forth type
of user is the administrator of the system. Only one administrator will exist in the system.
The administrator is the person which is responsible for maintaining the database where the
some information about the graduated students is stored.
25
The following table presents the different types of user together with the
functionalities that they can access. The functionalities will be described in detail in the
next section.
User Functionality
Non-member - view news
- view events
- view alumnus of the month
- register
Member - view news
- view events
- view alumnus of the month
- log in
- view personal profile
- find member
- update profile
Alumni officer - view news
- view events
- view alumnus of the month
- log in
- find member
- add/modify/removenews
- add/modify/remove event
- add alumnus of the month
- broadcast e-mail
Administrator - view news
- view events
- view alumnus of the month
- log in
- find member
- add/modify/remove news
- add/modify/remove event
- add alumnus of the month
- broadcast e-mail
- add alumni officer
26
4.2.2 Use Case Di agram
Figure 4.1 Use Case Diagram
27
4.2.2.1 Register
Use Case: Register
Actors Non-member
Preconditions The user should not already be a member and the user should have graduated on CITY
College.
Postconditions A new member is registered and his/her profile is created.
Description A new member of the online alumni community is created together with his/her profile.
Action Num. User System
Main Success Scenario
1. Insertsname.
2. Inserts department
3. Inserts year of graduation
4. Insert username.
5. Insert password.
6. Submit to the system.
7. Checks if the combination of the name
and the fathers name exists in the
database where information about the
former students are stored.
8. Checks if the combination of the
username and password are already taken
by another member.
9. Creates a new profile which is empty.
10. Retrieves name, birth date, department,
year of graduation and degree from the
database of former students and adds
them to the profile.
11. Saves the profile to the database together
with the username and password.
12. Sends a confirmation message back to the
new member.
Extension
7a The combination of the name and id does
not exist in the database
7a.1 Informs the user that s/he can not become
a user.
8a The combination of the username and
password already exists in the system.
8a.1 Notifies the user.
8a.2 Inserts new username.
8a.3 Inserts new password.
8a.4 Submits the new username and password to
the system.
Priority High
Risk Critical
Use Case Table 4.1 Register
28
Every person that has graduated on CITY College can become a member of the online
community. In order to become a member a person needs to fill in the new member form.
The person will have to insert his/her name, department, year of graduation, user name and
password. First of all, the system will check if the combination of the name, department and
year of graduationexist in the database of former students. If the combination does not exist
the system will notify the user that s/he can not become a member of the alumni web site.
Second of all, the system will check if the combination of the username and password are
already taken by another person. If the combination of the username and password is not
available, the system will notify the user and the user will choose a different username or
password. Otherwise, a new member will be created together with his/her profile. When the
profile is created, the system will automatically add the name, department and year of
graduation. The other attributes of the profile will be empty when the profile is created. In
order to fill all the necessary information the member will have to use the update profile
functionality.
4.2.2.2 Log In
Use Case: Log In
Actors Administrator, Alumni officer, member
Preconditions The user should not be already logged in the system
Postconditions The user logs in to the system.
Description The users can log in the system in order to use the functionalities that the online
community offers.
Action Num. User System
Main Success Scenario
1 Insert username.
2. Insert password.
3. Submits username and password
4. Checks weather the combination of the
username and password exists in the
database.
Extension
4a The combination of the username and
password that were inputted do not exist.
4a.1 Confirmation message is sent back to the
user.
4a.2 Inserts username
4a.3 Insert password
4a.4 Submit to the system.
Priority High
Risk Critical
Use Case Table 4.2 Log In
29
The members of the alumni web site, the alumni officers and the administrator of the
system can log in, in order to use the functionalities that the application will offer. They can
log in by inputting their user name and password. The system will check if the combination
of the username and password is valid. If it is not valid, the user will be notified and s/he
will be able to try to log in again. If the username and password are valid, a person will be
loggedin.
4.2.2.3 Add News
Use Case: Add news
Actors Alumni officer, Administrator
Preconditions The alumni officer or the administrator must be logged in.
Postconditions News is added to a list of local or non-local news.
Description The alumni officer or the administrator adds some news to the web site.
Action Num. User System
Main Success Scenario
1. Select the type of news.
2. Insert title.
3. Insert description.
4. Submit to the system.
5. Indexes the news.
6. Adds the news to the list of local on non-
local news depending on the choice of the
user.
7. Confirmation message is sent back to the
user.
Priority High
Risk Critical
Use Case Table 4.3 Add news
The alumni officers and the administrator of the system will be able to add news. There are
two types of news, local and non-local.. News is consisted of a title and a description. After
the type of news has been selected, the title and a short description should be added and
submitted to the system. The system will index the news and it will add the news to the list
of local or non-local news, depending on the choice that the alumni officer or the
administrator will make and it will notify the user. The index will be a number which is
derived from the number of events in the list plus one. It is used for ordering the news in the
list.
30
4.2.2.4 Modify news
Use Case: Modify news
Actors Alumni officer, Administrator
Preconditions The alumni officer or the administrator must be logged in.
Postconditions The selected news are modified
Description The alumni officer or the administrator can modify the news
Action Num. User System
Main Success Scenario
1. Selectsthe modify link next to the news
that need to be modified.
2. Insertstitle (optional)
3. Insertsdescription (optional)
4. Submitsto the system.
5. Updates the title and/of the description of
the selected news
6. Confirmation message is sent back to the
user.
Priority Low
Risk Low
Use Case Table 4.4 Modify News
The alumni officers and the administrator of the system will be able to modify the news.
First of all, the view news link should be selected and the system will generate a list of
news and send it back to the person that had this request. Next to every news in the list,
modify and a remove link will be located. The modify link has to be selected next to the
news that needs to be modified. After that, the alumni officer or the administrator will input
a new title or a new description. The new information will be submitted to the system. The
system will update the selected news and will send back a confirmation message back to the
user.
4.2.2.5 Remove news
Use Case: Remove news
Actors Alumni officer, Administrator
Preconditions The administrator or the alumni officer must be logged in.
Postconditions The selected news are removed from the database
Description The alumni officers or the administrator can remove news from the web site
Action Num. User System
Main Success Scenario
1. Select the remove link next to the news
that needs to be modified.
2. Removes the selected news from the
database.
3. Confirmation message is sent back to the
31
user.
Priority Medium
Risk Medium
Use Case Table 4.5 Remove News
The alumni officers and the administrator of the system will be able to remove
news. The view news link should be selected and the system will generate a list of news.
Next to every news, modify and remove link will be located. The user will select the
remove link next to the news that needs to be removed. After that the system will remove
the selected news from the database and it will send a confirmation message back to the
person that had this request.
4.2.2.6 View News
Use Case: View news
Actors Non-member, Member, Alumni officer, Administrator
Preconditions At least one news must exist in the database
Postconditions A list of news is generated.
Description The users can view all the news that has been added by the alumni officer.
Action Num. User System
Main Success Scenario
1. Selects the News link.
2. Checks whether news exists in the list of
news.
3. Generates the list of news and orders the
news according to the index
4. Sends the list of news back to the user.
Extension
2a The list of news is empty
2a.1 Confirmation message is send back to the
user telling him/her that the list of news
is empty.
Priority High
Risk Critical
Use Case Table 4.6 View News
Each type of user can view both the local and non-local news that has been added by an
alumni officer or the administrator. The user will select the view news link and then the
system will generate a list of news and send it back to the user. The order of the news in the
list will be arranged according to the index that is stored when the news has been added.
The last news that has been added will be the first one in the list and the first news that has
been added will be the last one in the list. Furthermore, the user will be able to choose
whether to see all news, only the local news or only non-local news.
32
4.2.2.7 Add Event
The alumni officersand the administrator of the system will be able to add an event. There
are two types of events, local and non-local. An event is consisted of a title, description,
date and time. The alumni officer or the administrator will select the type of event and then
input the necessary information andsubmit them to the system. The system will add a new
event in the list of eventsand send back a confirmation messageto the user.
4.2.2.8 Modify event
The alumni officers and the administrator of the system will be able to modify the events.
First of all, theview events link should be selected and the system will generate a list of
events and send it back to the person that had this request. Next to every event in the list,
modify and a remove link will be located. The modify link has to be selected next to the
event that needs to be modified. After that, the alumni officer or the administrator will input
a new title, description, date or time. The new information will be submitted to the system.
The system will update the selected event and will send back a confirmation message to the
user.
4.2.2.9 Remove event
The alumni officers and the administrator of the system will be able to remove events. The
events link should be selected and the system will generate a list of events. Next to every
event, modify andremove link will be located. The user will select the remove link next to
the event that needs to be removed. After that the system will remove the selected event
from the database and it will send a confirmation message back to the person that had this
request.
4.2.2.10 View event
Each type of users can view both the local and the non-local events that havebeen added by
the alumni officer or by the administrator. The user will select the events link. The system
will check the list of the selected type of events. If the list is empty, the user will be
notified. Otherwise, the system will generate a list of all events. The event will be ordered
in the list by the time that they will occur. An event that is earliest will be the first one in
the list and anevent that has the latest time will be the last one in thelist.
33
4.2.2.11 View Profile
Use Case: View profile
Actors Member
Preconditions The member needs to be logged in the system.
Postconditions The information of the profile are retrieved from the database
Description The users can view their personal profiles.
Action Num. User System
Main Success Scenario
1. Selects my profile link.
2. Retrieves the information of the profile
from the database.
3. Send the profile back to the person that
had this request.
Priority High
Risk Critical
Use Case Table 4.7 View Profile
The members of the alumni web site can view their personal profiles. A member needs to
select the my_profile link. The system will retrieve the information of the profile from the
database and return them back to the user.
4.2.2.12 Update Profile
Use Case: Update Profile
Actors Member
Preconditions The member must be logged in.
Postconditions The profile of a member is updated.
Description The members can update some of the information in their profile.
Action Num. User System
Main Success Scenario
1. Inserts date of birth(optional)
2. Inserts occupation (optional).
3. Inserts former employment (optional).
4. Inserts current employment (optional).
5. Insert e-mail address (optional)
6. Inserts telephone (optional).
7. Inserts address (optional).
8. Submits information to the system.
9. Updates the profile with the new
information.
10. Sends a confirmation message back to
the user.
Priority High
Risk Critical
Use Case Table 4.8 Update Profile
34
The members of the online community can update their profile. They should be able to
modify the date of birth, former employment, current employment, occupation, telephone,
email and address. The user will input the information that need to be change and submit
them to the system. The system will update the profile and send a confirmation message
back to the member.
4.2.2.13 Find member
Use Case: Find Member
Actors Member, Alumni Officer, Administrator
Preconditions The user needs to be logged in to the system.
Postconditions A list of names matching the criteria is generated.
Description A member, alumni officer or the administrator can search for another member of the
alumni community and see the information of his/her profile that are public.
Action Num. User System
Main Success Scenario
1. Insert name (optional)
2. Insert department (optional).
3. Insert year of graduation (optional).
4. Submit to the system.
5. Searches for the people in the database
that will match the inputted criteria
6. Sends a list of all peopletogether with the
information of the profilethat match the
inputted criteriaback to the user
Extension
5a There isnt any person that matches the
criteria.
5a.1 Confirmation message is send back to the
user telling him/her that there are no
people that match the inputted criteria.
Priority High
Risk Critical
Use Case Table 4.9 Find Member
The members of the alumni web site, the alumni officers and the administrator of the
system can search for a member of the web site. They need to be able to view the profile of
the person that they are searching for. The person that searches for a member of the alumni
web site will insert the name, department or the year of graduation and s/he will submit to
the system. The system will search in the database if people exist that will match the
inputted criteria. If no people exist the user will be notified. Otherwise, the system will
generate a list of all people that match the criteria and the list would be sent back to the
person that had sent the request (see Appendix C Figure C8).
35
4.2.2.14 Add Alumnus of the Month
The alumni officer and the administrator of the system should be able to addthealumnus of
the month. The alumnus of the month is consisted of a picture of that person (optional),
name, department, year of graduation, month, year and a description of why has that person
been selected to be the alumnus of the month. The alumni officer or the administrator
should input all the necessary information.
4.2.2.15 View Alumnus of the Month
Each type of users will have access to this functionality. They should be able to see the
name of the alumnus, picture, department, year of graduation, month, year and description
of the reason why this person was selected to be the alumnus of the month. When the
alumnus of the month link is selected the system will send the alumnus students of each
month back to the user.
4.2.2.16 Broadcast e-mail
Use Case: Broadcast e-mail
Actors Alumni officer, Administrator
Preconditions The alumni officer or the administrator must be logged in
Postconditions An e-mail is sent to each member of the system.
Description The alumni officer or the administrator can send an e-mail to all the members of the web
site.
Action Num. User System
Main Success Scenario
1. Select the broadcast e-mail link.
2. Insert subject.
3. Insert message.
4. Submit to the system.
5. Retrieve all the e-mails of all members of
the system.
6. Sends e-mail to each e-mail address that
was retrieved from the database.
7. Confirmation message is sent back to the
user.
Priority Low
Risk Low
Use Case Table 4.10 Broadcast Email
36
The alumni officers and the administrator of the system need to be able to send e-mail to
every member of the alumni web site. It is impossible to send e-mail to every member of
the alumni web site at the same time if the system does not offer broadcast e-mail
functionality. When this functionality is used, the system will retrieve the e-mails of all the
members from the database and an e-mail will be sent to all of them.
4.2.2.17 Add Alumni Officer
Use Case: Add Alumni Officer
Actors Administrator
Preconditions The administrator must be logged in.
Postconditions An alumni officer is added to the system.
Description The administrator will be able to add an alumni officer. The alumni officer will be the
person responsible for maintaining the web site.
Action Num. User System
Main Success Scenario
1. Inserts name
2. Insert username.
3. Inserts password.
4. Submitsto the system
5. Check weather the combination of the
username and password already exist in
the database.
6. Checks whether the username is already
taken by another alumni officer.
7. Creates the new alumni officer.
8. Send a confirmation message back to the
administrator
Extension
5a The combination of the username and
password already exist in the database
5a.1 Notifies the administrator.
5a.2 Insert new username.
5a.3 Insert new password.
5a.4 Submits to the system.
Priority High
Risk Critical
Use Case Table 4.11 Add Alumni Officer
The administrator should be able to create an alumni officer. The alumni officer is
the person which is in charge of maintaining the web site. The administrator will add the
name, user name and password of the alumni officer. The system will check in the database
if the combination of the username and password are already taken by another member. If
the username and password are not available the system will notify the administrator to
input another username or password. Otherwise, an alumni officer will be created and a
confirmation message will be sent to the administrator.
37
5. Design
5.1 Design of the database
5.1.1 Entity Relationship Diagram (ERD)
38
Figure 5.1 Entity Relationship Diagram
5.1.2 Justification of the proposed ERD
5.1.2.1 The EVENT Entity
Figure 5.2 EVENT Entity
The EVENT entity contains all the information that forms an event. The attributes of the
EVENT entity are: index, which is also the primary key, type, description, title, and a
compound attribute time. The time has four attributes: Hour, Minutes, Month and Day. The
EVENT entity does not have a relation to any other entity of the database.
5.1.2.2 The NEWS Entity
Figure 5.3 NEWS Entity
39
A NEWS entity should be created in the database because all the information that forms the
news will be stored in this entity. The NEWS entity has four different attributes: The Id,
ehich is also the primary key of this entity, title, description and type. The NEWS entity
does not have a relation to any other entity in the database.
5.1.2.3 The USER entity
Figure 5.4 USER Entity
The USER entity will be used to store some information of the different types of users of
the system. This entity has five attributes: Id, which is the primary key, password,
username, type and name. The USER entity contains on relation. It is related to the
MEMBER entity because the user of the system can be a member of the online community.
5.1.2.4 The MEMBER Entity
Figure 5.5 MEMBER Entity
40
The reason why the MEMBER entity is identified is because this entity will hold all the
information of the profiles of the members, except for the username and password which is
stored in the USER entity. The MEMBER entity contains the following attributes: Id,
which is the primary key, name year of graduation, address, telephone, e-mail, employment,
former employment, occupation, department and a compound attribute birth date. The birth
day attribute contains three attributes: day, month and year. The MEMBER entity has one
relation. It is related to the ALUMNUS OF THE MONTH entity because a member of the
system will be the alumnus of the month.
5.1.2.5 The ALUMNUS OF THE MONTH Entity
Figure 5.6 ALUMNUS OF THE MONTH Entity
The ALUMNUS OF THE MONTH entity is identified because the information concerning
the alumnus of the month will be stored here. The ALUMNUS OF THE MONTH entity
contains eight attributes: Index, which is the primary key of theentity, name, department,
year of graduation, month, year, photo and description. This entity has on relation. It is
related to the MEMBER entity because a member is the alumnus of the month.
5.1.3 Relational Schema
The relational schema is done in order to illustrate how some entities will be related with
each other. As illustrated above in the entity relationship diagram, there will be two
relations between the entities. The first relation is between the USER and the MEMBER
entity and the second relation is between the MEMBER and the ALUMNUS OF THE
MONTH entity. In order to relate the entities, the primary key of the MEMBER entity
should be added to the USER entity in order to make a reference from the USER table to
the MEMBER table. Furthermore, the ID of an alumnus of the month should be added to
41
the MEMBER entity that will serve as a secondary key to the ALUMNUS OF THE
MONTH entity.
Figure 5.7 Relational Schema
42
5.2 Architectural Design
Figure 5.8 Architecture
The CITYs alumni web site will be installed on CITYs Web server. A client of the web
site can be every person that has an internet connection. The clients will access the web
server through CITYs firewall. Theywill send requests to the firewall and the firewall will
access the web server where the system will be stored. Furthermore, CITYs alumni web
site will be connected to the MySQL Relational Database where all the related information
that is needed will be added and stored. So, a client sends request to the firewall, the
firewall contacts the web server where the web site is installed and adds or accesses the
information which are stored in the database.
43
6. Implementation
The following chapter is mainly concerned with the implementation of the application. The
technologies and tools that were used for the implementation will be briefly discussed and
the reason why they were chosen will be justified. Furthermore, the implementation flow
and decisions and the development process will be described in detail.
6.1 Technologies Comparison
Many different technologies exist that can be used to create Citys alumni web site. Which
technology is the best depends on the type of application that needs to be built. In order to
select the best suited onefor the application, the most commonly used technologieshave to
be reviewed and compared.
6.1.1 Hypertext Preprocessor (PHP)
PHP is an open source, general-purpose scripting language that is especially suited for web
development [3]. It was originally designed to build dynamic web pages. It works on many
platforms and operating systems and can be connected to many database management
systems. PHP is best suited for Linux servers. However, it is suitable for Windows servers
too.
The advantages of usingPHP are:
- It is fast and stable.
- It is a simple language, meaning that it is easy to learn and understand.
- There is an online community that is very useful in order to get support or help
when you are experiencing some difficulties.
The disadvantages of PHP are:
- The security holes are well known so if the developer does not take some steps to
close these holes, the web site can be easily attacked.
- It is not a 100% Object oriented scripting language, meaning that object oriented
programming with PHP is difficult to achieve.
-
6.1.2 Active Server Pages (ASP)
ASP is a server-side scripting platform which is developed by Microsoft. The default
scripting language is VBScript, however many other languages can be used, for example
J avaScript. ASP is a technology for developing dynamic and interactive web pages. Active
44
Server Pages is a technology that allows for the programmatic construction of HTML pages
just before they are delivered to the browser [4].
The advantages of ASP are:
- It is fast and reliable.
- It offers many levels of security which means that it is protected from attacks.
- It can be connected to many database management systems such as Oracle, MySQL,
etc.
- The technology is regularly updated.
The disadvantages of ASP are:
- The syntax of the scripting languages that can be used is difficult and also it is
difficult to understand it.
- Recovering from a badASP selection decisioncan be expensive and time
consuming.
6.1.3 Java Server Pages (JSP)
J SP is a scripting technology that allows rapid web development that is dynamic and easily
maintainable [5]. J SP is an extension of the J ava Servlet technology. J SP controls the
appearance of a web site using servlets, which are small programs that run on a web server.
These programs modify a web site before it is sent to some user. The syntax of J SP is a
combination of HTML and XML syntax.
The advantages of J SP are:
- It is fast and reliable.
- Very big application can easily be developed.
- It can easily be connected to many database management systems.
- It is secure which means that it has a protection from attacks.
The disadvantages of J SP are:
- J SP sites require almost the double amount of memory than other scripting
languages such as PHP or ASP in order to hold a page.
- A person must have knowledge in java in order to understand J SP.
- J SP pages are compiled on a server when they are first accessed which means that
the pages will take a while to load when they are used for the first time.
45
6.1.4 Ajax
Ajax is scripting language which is derived from grouping of more different technologies
and it is used to create interactive web applications [6]. Ajax is also known as asynchronous
J avaScript and XML. In order to use Ajax technology, a person must possess great
knowledge in J avaScript and XML. Unlike other technologies, Ajax lowers the times that a
computer needs to connect to the server, because scripts need to be requested only one time.
The advantages of using Ajax are:
- Reduces required bandwidth
- The time required to load a page is really low.
- Can be easily connected to many database management systems.
The disadvantages of using Ajax are:
- Some older browsers do not support Ajax.
- Ajax developed applications can not be accessed by all browsers because each
browser has different implementation of the XMLHttpRequest object.
- It is sometimes difficult to test because standards for Ajax programming have not
been still have not been accepted.
6.1.5 Summary
As I mentioned above all of the most commonly used technologies can be used to develop
Citys alumni web site. The best choice for building the alumni web site is Hypertext
Preprocessor (PHP). There are many reasons why PHP is the most suited technology for
the alumni web site. First of all, ASP is not a good choice because recovering form a bad
ASP decision is found to be very difficult. Second of all, J SP is not a good choice because it
requires double the amount of memory in order to load a page that other scripting languages
such as PHP or ASP. Third of all, Ajax is not the best choice because Ajax built application
can not be accessed by all browsers and because standards for programming do not exists
for this technology.
Furthermore, PHP is fast and stable. The language is very simple which means that
it is very easy to use it and understand it. It is of great advantage that PHP has an online
community that offers support. If some problems or difficulties are faced, help can be asked
on the forum of the community. However, it is very important to take security
measurements in each phase of the software development life cycle in order to avoid the
security pitfalls, because the security holes in PHP are very well known.
46
6.2 Development Tools and Technologies
This section identifies and explains the tools and technologies that were used in the
implementation of the application. Furthermore, the database management system that is
used and the server on which the web site will be installed are briefly discussed. The tools
and technologies used are: HTML, CSS, PHP, MySQL and Apache.
6.2.1 HTML
Hyper Text Markup Language (HTML) was used to create the interface of the alumni web
site. Html is a markup language used to create web pages. It provides ways to transfer the
text based information from a document to a web site offering different view using the html
tags.
6.2.2 CSS
Cascading Style Shits (CSS) was used in order to apply the styles of the interface. CSS is a
style sheet language which is used in order to apply the style of a document created in a
markup language, meaning that it is used to describe how an html document will be
presented. CSS separates the content of a document, and includes styles such as fonts,
colors and layouts[7].
6.2.3 PHP
PHP Hypertext Procesor (PHP) was the technology selected for the implementation of the
application. PHP is a scripting language that is used in order to make dynamic web pages.
The advantages and disadvantages of the PHP technology were previously described in the
literature review, in section Technologies.
6.2.4 MySQL
MySQL is a relational database management system which was used in order to insert and
to retrieve the data that is required in order for the alumni web site to function. It runs as a
server which means that it allows multi user access. It is the leading open source database
management system which has more than 6 million installations[8]. MySQL is popular for
web applicationsand acts as the database component of the LAMP software stack.
6.2.5 Apache
Apache server is the server installed in order to interpret the PHP code and generate html
markups. Furthermore, the apache interprets the PHP code that is used to establish a
connection to the mySQL server and to store or retrieve information from the database.
Apache is the leading open source server which is available for many different platforms
[9].
47
6.3 Implementation flow
The first step in the implementation of the application was implementing the database
where all the information related to the alumni web site will be stored. After the database
was created together with the appropriate entities, another database had to be implemented
that has only one entity where the graduated students of CITY College are supposed to be
stored. The entity will have four attributes: student id, name, year of graduation and
department. The reason why the database of former students was implemented is that it
serves as a replica of the database of CITY College where some information about the
graduated students is stored. The database of former students is accessed only when a
person wants to become a member of the alumni web site, because a person can become a
member only if s/he has graduated on CITY College. The register functionality will be
described in more detail further on in the report.
After the databases have been implemented and reviewed in order to ensure that
everything is implemented as it is supposed to and to avoid any further problems, the
interface of the application was created. The interface was created at the very beginning of
the implementation stage in order to gain a better understanding of how the links to the
functionalities that the web site should offer should be placed, so that the access to some
links will be restricted for some users based on their type.
Figure 6.1 CITYs Alumni Web Sites Interface
48
After the interface of the web site was finalized, each functionality that the system
should offer was implemented following the use cases and the informal specifications that
were covered in the Analysis chapter. After the complete functionality set had been
implemented, all the parts were integrated together in order to create the final complete
version of the alumni web site.
6.3 Essential code and implementation justification
This section is mainly focused on the development process of the web site. The essential
functionalities and .php pages will be described in detail. Furthermore, screen shots from
the code will be presented in order to better understand the internal logic of the system,
meaning what is happening inside the system. Only small parts of the code will be
presented. The full code for each functionality will be located in the Appendix C. The
reason why some functionalities are not described in the following sections is that many of
them are applied on the same way and they have the same flow. This means that only one
view, one add, one modify and one remove function will be presented.
6.3.1Connect to database
<?php
f unct i on db_connect ( )
{
$dhost =" l ocal host " ;
$duser =" r oot " ;
$dpass=" " ;
$dat abase=mysql _connect ( $dhost , $duser , $dpass) ;
$db=mysql _sel ect _db( ' dat abase' , $dat abase) ;
}
?>
The connectDatabase page is created in order to establish a connection to the server and to
select the database where all the information related to the alumni web site will be stored. A
connection to the mySql server is opened using the built in function of PHP
mysql_connect(), which accepts as parameters the location of the mysql server and the
username and password of a user of the database. After an connection to the mysql server
has been established, the database is selected using the built in function mysql_select_db(),
which accepts as parameter the name of the database and the database server reference. The
connectDatabase.php file is used by any function where a connection to the database is
required. The code of the file is added to the pages that need to establish a connection to the
database using the built in function require(). The require() function accepts one
parameter, which is the name of the file that needs to be added.
49
6.3.2 Register
The register.php page is used in order for a person to become a member of the system.
After the user inputs the requested information, the page is redirected to another function
called register.php. This function does all the work. First, a connection is established to the
database where the information concerning the former students of CITY are stored. The
system gets the input from the user using the built in function $_POST[], which accepts as
parameter the name of an input fields and searches the database of former students. If the
inputted information are found in the database of former students, they will be added to the
alumni database using the INSERT INTO query. PHP contains a built in function
mysql_query(), which accepts as a parameter an Sql query and is used to insert or retrieve
data from or to any table identified in the database. The name, department and year of
graduation will be added to the member table, together with the id of the member which is
automatically added. After that, the inserted username and password will be added to the
user table together with the name and id of the member, which will serve as a reference to
the member. The value of the id attribute of the member table will always be equal to the
memberID attribute from the user table. Furthermore, the type of user will be automatically
set to former student when the information are stored in the user table. If the user
registers, s/he will be redirected to the login.php page. Otherwise, an message will appear
stating that the user is not able to register and s/he will be redirected to the register.php page
again, using the built in function header() which accepts as parameters a command and an
URL or a path. In our case, the command will be Location: (see full code - Appendix C C-
1 register.php).
<?php
$r esul t = mysql _quer y( " Sel ect * Fr omst udent s WHERE name = ' $name' &&
depar t ment = ' $depar t ment ' && year of gr aduat i on = ' $year ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
i f ( $num! =0)
{
$nname = mysql _r esul t ( $r esul t , $i , " Name" ) ;
$ddepar t ment = mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$yyear = mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
$dhost =" l ocal host " ;
$duser =" r oot " ;
$dpass=" " ;
$ddat abase=mysql _connect ( $dhost , $duser , $dpass) ;
$db=mysql _sel ect _db( " dat abase" , $ddat abase) ;
mysql _quer y( " I NSERT I NTO member ( name, depar t ment ,
year of gr aduat i on) VALUES ( ' $nname' , ' $ddepar t ment ' , ' $yyear ' ) " ) ;
$r esul t = mysql _quer y( " SELECT * FROM member WHERE
name=' $nname' && depar t ment =' $depar t ment ' " ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
$member i d = $r ow[ ' I D' ] ;
mysql _quer y( " I NSERT I NTO user ( member I D, t ype, user name,
passwor d, name) VALUES ( ' $member i d' ,
' f or mer st udent ' , ' $user name' , ' $passwor d' , ' $nname' ) " ) ;
mysql _cl ose( $ddat abase) ;
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / l oggi n. php' ) ;
}
50
?>
6.3.3 Log In
The login.php page is used in order for the users to be able to log into the system and be
able to use the functionalities that the online community offers. After a user inserts
username and password, the page is redirected to select.php. In the select.php file, the first
thing that it is done is the username and password inputted by the user are retrieved. After
that, the system checks to see if there is a row in the user table that matches the input given
by the user. If a user with the inserted username and password exists, the id of the user will
be saved until the user decides to log off. In order to save the id of the user until s/he logs
off, the $_SESSION[] function was used, that accepts as a parameter a string. In order to
save the value of the id, the value has to be set to the $_SESSION[] function
($_SESSION[id] =row[ID]). After the id of the user that logged in has been saved, the
page will be redirected depending on the type of the user. The reason why the type of user
affects which page should be redirected is because the users dont have access to all the
functionalities that the system offers. For example, if the type of user is member, the page
will be redirected to homeMember.php, where some links will be found that lead to the
functionalities that can be accessed by the member user. The links that lead to
functionalities that can not be accessed by the member user will not appear on the web site.
If the user is alumni officer or administrator, different links will be displayed. In this way,
the access restriction for the different type of users of the application is solved. (see full
code- Appendix C C-2 logIn.php)
<?php
sessi on_st ar t ( ) ;
r equi r e( " 1. php" ) ;
db_connect ( ) ;
$user =$_POST[ ' user ' ] ;
$pass=$_POST[ ' pass' ] ;
$sql = " SELECT * FROM user WHERE user name LI KE ' $user ' AND passwor d LI KE
' $pass' " ;
$r esul t = mysql _quer y( $sql ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
$i d=$r ow[ ' I D' ] ;
$t ype=$r ow[ ' Type' ] ;
$_SESSI ON[ ' i d' ] =$r ow[ ' I D' ] ;
i f ( $t ype==' f or mer st udent ' )
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / homeMeber . php' ) ;
exi t ;
}
el se i f ( $t ype==' al umni Of f i cer ' )
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / homeAl umni Of f i cer . php' ) ;
exi t ;
}
el se
{
51
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / homeadmi ni st r at or . php' ) ;
exi t ;
}
?>
6.4.4 Find Member
The findMember.php page is used to find information about a former student which is a
member of the web site. First of all, the user should input the name, department and/or year
of graduation. All fields are optional. After the user inputs data, the system will retrieve the
inputted information and it will make a search in the member table to see if there are any
members that match the inputted criteria. The search is done using the SELECT Sql
statement. If a person that matches the inputted criteria is not found, the user will be
notified that no such person exists in the database. Otherwise, the system will output all the
people that match the criteria. All members that match the criteria are printed using a while
loop, in order to go through all the rows. Another reason why the while loop was necessary
is in order to temporarily store the id of the members that matched the criteria. The id is
required in order to be able to retrieve all the information of the profile of a user. If the user
wants to see all the information that are found in the profile of the member, the view profile
link which is located next to each person needs to be accessed. When the view profile link
next to a member is selected, the page will be redirected to viewProfile.php and a value for
the index will be sent. The page viewProfile.php page will retrieve the id which was passed
by the findMember.php function. The value of the id is used to retrieve all the information
of the selected members profile. Finally, all the information of the profile of the selected
member are outputted to the user. (see full code - Appendix C C-3 findMember.php)
<?php
r equi r e( connect Dat abase. php) ;
$name=$_POST[ ' name' ] ;
$depar t ment =$_POST[ ' depar t ment ' ] ;
$year =$_POST[ ' year ' ] ;
$r esul t = mysql _quer y( " SELECT * FROM member WHERE name LI KE ' %$name%' &&
depar t ment =' $depar t ment ' && year of gr aduat i on=' $year ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num)
{
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
?>
52
6.4.5 View Personal Profile
The viewPersonalProfile.php page is used by a member in order to see his/her profile. The
id of the member needs to be found in order to access the correct row in the member table.
In order to find the id of the member, the id of the user which is stored in the $_SESSION[]
function is retrieved and stored in a variable. After that, the user id is used to select the
corresponding member id from the user table. When the member id is retrieved, the
following query is passed to the database Select * FROM member WHERE id =
memberid. This query selects everything from the member table where the id attribute is
equal to the member id.
<?php
sessi on_st ar t ( ) ;
$i d=$_SESSI ON[ i d ] ;
r equi r e( " 1. php" ) ;
db_connect ( ) ;
$quer y = mysql _quer y( " SELECT * FROM user WHERE i d = ' $i d' " ) ;
$r oww = mysql _f et ch_ar r ay( $quer y) ;
$member i d=$r oww[ ' Member I D' ] ;
$r esul t = mysql _quer y( " SELECT * FROM member WHERE i d = ' $member i d' " ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
$name=$r ow[ ' Name' ] ;
$depar t ment =$r ow[ ' Depar t ment ' ] ;
$year gr =$r ow[ ' Year Of Gr aduat i on' ] ;
$day=$r ow[ ' Day' ] ;
$mont h=$r ow[ ' Mont h' ] ;
$year =$r ow[ ' Year ' ] ;
$occupat i on=$r ow[ ' Occupat i on' ] ;
$empl oyment =$r ow[ ' Empl oyment ' ] ;
$f or mer =$r ow[ ' For mer Empl oyment ' ] ;
$addr ess=$r ow[ ' Addr ess' ] ;
$emai l =$r ow[ ' Emai l ' ] ;
$t el ephone=$r ow[ ' Tel ephone' ] ;
echo " Name: <b>$name <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on: $year gr
<br > Bi r t h dat e: $day $mont h $year <br >
Occupat i on: $occupat i on <br > Empl oyment : $empl oyment <br > For mer Empl oyment :
$f or mer <br > Addr ess: $addr ess <br > E- mai l : $emai l <br > Tel ephone: $t el ephone" ;
?>
6.4.6 Update Profile
The updateProfile.php is used by a member in order to update the information of his/her
personal profile. The id of the user is storedusing the $_SESSION function. In order for the
member to be able to update his/her profile the value of the session is retrieved and stored
in a variable. The value of the id in session is used to retrieve the member id which is
located in the user table. After the member id has been found, it is used in order to set a
condition for which row of the member table to be retrieved. The information that are found
53
will be displayed in the corresponding html input fields. After, the user can change the
information that are found in the fields and submit them to the system. The system will then
update the member table where the attribute id is equal to the member id which was found
in the user table. (see full code - Appendix C C-4 updateProfile.php)
<?php
sessi on_st ar t ( ) ;
r equi r e( " 1. php" ) ;
$i dd = $_SESSI ON[ ' i d' ] ;
db_connect ( ) ;
$r esul t = mysql _quer y( " SELECT * FROM user WHERE I D = ' $i dd' " ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
$member I d = $r ow[ ' Member I D' ] ;
$r esul t = mysql _quer y( " SELECT * FROM member WHERE I D = ' $member I d' " ) ;
$num= mysql _numr ows( $r esul t ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
i f ( i sset ( $_GET[ ' act i on' ] ) && $_GET[ ' act i on' ] == " updat e" )
{
$day=$_POST[ ' day' ] ;
$mont h=$_POST[ ' mont h' ] ;
$year =$_POST[ ' year ' ] ;
$occupat i on=$_POST[ ' occupat i on' ] ;
$empl oyment =$_POST[ ' empl oyment ' ] ;
$f or mer empl oyment =$_POST[ ' f or mer empl oyment ' ] ;
$addr ess=$_POST[ ' addr ess' ] ;
$emai l = $_POST[ ' emai l ' ] ;
$t el ephone = $_POST[ ' t el ephone' ] ;
$sql = " UPDATE member SET Day=' $day' , Mont h = ' $mont h' , Year = ' $year ' ,
Occupat i on = ' $occupat i on' , Empl oyment = ' $empl oyment ' , `For mer
Empl oyment ` = ' $f or mer empl oyment ' , Addr ess =
' $addr ess' ,
Emai l = ' $emai l ' ,
Tel ephone = ' $t el ephone'
WHERE I D = ' $member I d' ; " ;
$r esul t = mysql _quer y( $sql ) ;
<?php
6.4.7 Add alumni officer
The addAlumniOficer.php is used by the administrator in order to create an alumni officer
that is going to be in charge of maintaining and modifying the web site. The administrator
should add the name of the alumni officer and the username and password. The system will
then check if the username and password are already taken by another user of the system. If
the username and password are already taken, the administrator would be asked to enter a
new username and password. Otherwise a new user will be added in the user table and the
type would be automatically set to alumni officer. After the alumni officer has been
created, the administrator will be redirected to the homeAdmin.php page.
<?php
r equi r e( connect Dat abase. php) ;
$user =$_POST[ ' user ' ] ;
$pass=$_POST[ ' pass' ] ;
$name=$_POST[ ' name' ] ;
54
mysql _quer y( " I NSERT I NTO user ( t ype, user name, passwor d, name) VALUES
( ' al umni Of f i cer ' , ' $user ' , ' $pass' , ' $name' ) " ) ;
?>
6.4.8 Broadcast e-mail
The broadcatEmail.php page will be used in order to send an e-mail message to all the
members of the alumni web site. The user of this functionality needs to input only the
subject of the message and the actual message. The input by the user will then be
temporarily stored by the system In order to make this functionality work, the built in
mail() function was used. The mail() function accepts four parameters: the recipient e-mail
address, the subject, the message and possibly header, which contains information such as
the format of the e-mail. The input inserted by the user will be passed to the mail() function
to satisfy the second and the third parameter. Finally, all the e-mail addresses are retrieved
from the member table and are added to the mail() function as the first parameter.
<?php
r equi r e( " 1. php" ) ;
db_connect ( ) ;
$message = $_POST[ ' message' ] ;
$message = wor dwr ap( $message, 70) ;
$t i t l e = $_POST[ ' t i t l e' ] ;
$f r om= ' Al umni Of f i cer ' ;
$sql = " SELECT * FROM member " ;
$r es = mysql _quer y( $sql ) or di e( mysql _er r or ( ) ) ;
$t o = ' ' ;
whi l e( $r ow = mysql _f et ch_ar r ay( $r es) )
{
$t o = $r ow[ ' Emai l ' ] ;
mai l ( $t o, $t i t l e, $message) ;
}
?>
6.4.9 View events
Different page will be accessed depending of the type of the user that is logged in. This
means that the member user has a different view than the alumni officer or the
administrator. If the type is member or non-member, when the view events link is chosen,
all the events will be outputted unless the events table is empty. The events are selected
from the events table using the SELECT Sql statement and are outputted using a while
loop, in order to go through andprint every event and to store the id of the event in the case
when the type of user will be alumni officer or administrator. The events will be ordered by
the date and time on which they are going to occur. If the type of user is administrator or
alumni officer, a modify and a remove link will be located next to every event. The view
news and view alumnus of the month functionality are based on this very same method.
<?php
55
r equi r e( " connect Dat abase. php" ) ;
$quer y=" SELECT * FROM event " ;
$r esul t =mysql _quer y( $quer y) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num) {
$t i t l e=mysql _r esul t ( $r esul t , $i , " t i t l e" ) ;
$hour =mysql _r esul t ( $r esul t , $i , " hour " ) ;
$mi nut e=mysql _r esul t ( $r esul t , $i , " mi nut e" ) ;
$day=mysql _r esul t ( $r esul t , $i , " day" ) ;
$mont h=mysql _r esul t ( $r esul t , $i , " mont h" ) ;
$descr i pt i on=mysql _r esul t ( $r esul t , $i , " descr i pt i on" ) ;
echo " Ti t l e: <b>$t i t l e <br > Ti me: $hour : $mi nut e<br >Dat e: $day
$mont h<br >Descr i pt i on: $descr i pt i on<br >" ;
echo" <a hr ef =del et eEvent . php?i ndex=$i ndex>del et e</ a> <br >" ;
echo " <a hr ef =modi f yEvent s. php?cmd=modi f y&&i ndex=$i ndex>modi f y</ a> <br >" ;
$i ++; }
?>
6.4.10. Add event
The addEvent.php page will be used to add a new event to the event table. The user must
input all the required information. The system will retrieve the inputted information from
the input fields using the $_POST[] built in function of PHP and it will create and insert a
new event in the events table. The add news and add alumnus of the month functionality are
based on the same principal. (see full code - Appendix C C-5 addEvent.php)
<?php
r equi r e( " connect Dat abase. php" ) ;
$t ype=$_POST[ ' t ype' ] ;
$t i t l e=$_POST[ ' t i t l e' ] ;
$hour =$_POST[ ' hour ' ] ;
$mi nut es=$_POST[ ' mi nut es' ] ;
$day=$_POST[ ' day' ] ;
$mont h=$_POST[ ' mont h' ] ;
$descr i pt i on=$_POST[ ' descr i pt i on' ] ;
mysql _quer y( " I NSERT I NTO event ( t ype, t i t l e, hour , mi nut e, day, mont h,
descr i pt i on) VALUES ( ' $t ype' , ' $t i t l e' , ' $hour ' , ' $mi nut es' , ' $day' , ' $mont h' ,
' $descr i pt i on' ) " ) ;
?>
6.4.11. Modify event
In order for the alumni officer or the administrator to modify some events, they have to
select the link that leads to viewEventsAdmin.php page. By selecting this link, all the
events are outputted and a modify and remove link is placed next to every event. As
mentioned in the View Events section, a while loop is used in order to print and to store the
index of each news. The modify link has to be selected next to the event that needs to be
changed. By selecting the modify link, the appropriate index is sent to the modifyEvent.php
page. First of all, the information concerning the selected event will appear on the html
input fields. If the user changes the information, the selected event will be modified using
the UPDATE Sql statement. Finally, the page will be redirected back to the
56
viewEventsAdmin.php page. The modify news functionality is implemented on the very
same way. (see full code - Appendix C C-6 modifyEvent.php)
<?php
r equi r e( " connect Dat abase. php" ) ;
$t ype=$_POST[ ' t ype' ] ;
$t i t l e=$_POST[ ' t i t l e' ] ;
$hour =$_POST[ ' hour ' ] ;
$mi nut es=$_POST[ ' mi nut es' ] ;
$day=$_POST[ ' day' ] ;
$mont h=$_POST[ ' mont h' ] ;
$descr i pt i on=$_POST[ ' descr i pt i on' ] ;
$i ndex = $_GET[ ' i ndex' ] ;
$sql = " UPDATE member SET Day=' $day' , Mont h = ' $mont h' , Year = ' $year ' ,
Occupat i on = ' $occupat i on' , Empl oyment = ' $empl oyment ' ,
`For mer Empl oyment ` = ' $f or mer empl oyment ' , Addr ess = ' $addr ess' , Emai l =
' $emai l ' , Tel ephone = ' $t el ephone' WHERE I D = ' $member I d' ; " ;
$r esul t = mysql _quer y( $sql ) ;
?>
6.4.12 Remove event
As for the modify event functionality, the remove functionality is implemented on a similar
manner. First of all, the viewEventsAdmin.php should be selected. After that, the remove
link next to the event that needs to be removed should be selected. By selecting this link,
the corresponding index will be passed to the removeEvents.php function. This function
removes from the table events wherethe index is equal to the index that was received. After
the event has been deleted, the user will be redirected back to the viewEventsAdmin.php
page. The remove news and the remove alumnus of the month functionality are based on
the same method.
<?php
i f ( i sset ( $_GET[ ' i ndex' ] ) )
{
r equi r e( " connect Dat abase. php" ) ;
$i ndex = $_GET[ ' i ndex' ] ;
mysql _quer y( " DELETE FROM `dat abase`. `event ` WHERE `event `. `I ndex` = $i ndex
LI MI T 1 " ) or di e( mysql _er r or ( ) ) ;

mysql _cl ose( $dat abase) ;
}
?>
57
7. Testing
This chapter is concerned with the testing phase of the software. The techniques used to test
the application are presented and described. Both White Box and Black box testing
techniques have been used.
7.1 Unit Testing
Unit testing is a method of testingthat verifies whether the individual units of source code
are correct [10]. A unit is a small part of an application that is able to be tested
independently of the entire application. The main purpose of unit testing is to validate that
the individual parts of a program are working as they are supposed to. Unit testing is very
useful because it simplifies the integration testing technique, which was also applied for the
alumni web site.
After each functionality that the system was supposed to offer was implemented
separately, it was separately tested. The unit testing was done using a White Box method.
White Box testing is a technique where the tester is familiarized with the code and the
internal logic of a program. In order to test all the individual parts, all possible paths that a
unit can go thorough have to be identified. The possible paths can be identified only by
reviewing the implemented code. After all possible paths have been identified, the inputs
that are supposed to go through each path were determined together with the appropriate
outputs in some cases. Those inputs were then used in order to test the separate units of the
application and where then compared to see if the outputs received are equal to the
expected outputs.
The results of the Unit testing were highly satisfactory. By testing each possible
path of each individual unit, it was assured that the functionalities are working properly.
Some bugs were identified and immediately taken care off.
7.2 Integration Testing
Integration testing is a method of testing in which some units are being related and tested as
a group [11]. Integration testing is done after Unit testing and before System testing. The
integration testing technique is done using a Black Box testing method. Black Boxtesting is
a technique where the tester is not familiarized with the code and is not familiarized with
the internal logic of the application that is tested. In order to do Black Box testing, the use
cases are used in order to predetermine some inputs together with the corresponding
outputs.
58
After the inputs have been identified together with the desired outputs, the
Integration testing was started. The predetermined inputs were passed to the system and the
outputs which were received were compared to the outputs that were previously
determined. Some bugs were identified and have been taken care of at once using the
Integration testing technique.
7.3 System Testing
System testing is performed on a complete system to assess the system's compliance with
its specified requirements such as attribute, capability, characteristic, or quality of the
system [12]. It is done after every single unit has been integrated. System testing is required
in order to assess the systems compliance with the previously specified functional
requirements. System testing is done using a Black Box method. Even though the units
have been grouped and tested using Integration testing method, it is still necessary to ensure
that everything will function properly after the whole system has been integrated. The
system testing was done on the same way as the unit and integration testing. Inputs were
being passed to the final version of the system and the outputs have been compared to the
desired outputs. All the bugs were identified andfixed.
59
8. Evaluation
8.1 Process and plan evaluation
This section is mainly focused on the evaluation of the Waterfall model which was applied
for the development of the application. Furthermore, some information about whether the
guidelines of the project plan which was created at the beginning of the development
process were followed.
8.1.1 Process Plan
As mentioned in the project plan section, enough time was allocated for each step that
needed to be completed in order to develop and evaluate the alumni web site. The
guidelines of the plan were followed up until the implementation phase. However, even
though enough time was allocated for the implementation, some problems and delays were
met, which means that the estimated end time of the development of the application was
prolonged. First of all, some difficulties were experienced in setting up the Apache server.
However, the problem was solved and only a few days which were allocated to the
implementation were lost. The main reason why the deadline for the implementation was
not met is because the complexity and the size of the project were underestimated. The
main source of problems was the development of the log in functionality, because the web
site has four different types of users and each of them has access to different functionalities.
A lot of the time allocated for the implementation was wasted in order to find a good
solution to the above mentioned problem. The solution to the problem was to redirect the
page to a different view depending onthe type of the user and to store the unique id of the
user that is currently logged in, using sessions.
After the functionalities that the system should offer were implemented separately,
it was really difficult and time consuming to integrate them. A lot of time was spent in
order to integrate the web site and to make the web sites interface user friendly, meaning
easy to use and to navigate. Because the time allocated for the implementation phase of the
software development life cycle was underestimated, the time allocated for testing,
evaluating and reviewing was shortened. The outcome of this problem was that the time
available to evaluate the system was not adequate.
8.1.2 Process Evaluation
As mentioned in the project management chapter, the software development process used to
develop the application was the Waterfall model. The Waterfall modes turned out to be a
suitable choice for the development of the alumni web site. Because the requirements of the
60
system did not change at any point, no major problems and difficulties were faced. The
Waterfall model was identified to be the simplest and most efficient software development
process that could be applied to the alumni web site project. Another reason why the
Waterfall model turned out to be the most suitable software development process for the
development of the alumni web site is because the Waterfall model is sequential, meaning
that each phase has its own life time and one phase can not be started before the phases
that come before have been finished. This means that before the actual implementation was
started, the analysis and design of the project were finalized and described in detail. This
was proved to be very useful because the requirements and the design of the database were
clear, which lead to simplification of the implementation phase.
8.2 System Evaluation
As I mentioned in the previous chapter, because of the underestimation of the complexity,
size and the time needed to develop the software, the system was not appropriately
evaluated. Some evaluations techniques were planed to be applied after the final version of
the application has been finalized, however, because the time required to apply those
techniques was not adequate, some of them were not followed. In order to evaluate the
system, a meeting with the client was supposed to occur in order to see if the client is
satisfied with the outcome. This meeting would also have been very useful in order to see if
the client likes the web sites interface. Furthermore, another evaluation technique was
thought of. The technique was to monitor a person that has never used the application
before in order to see if the application is easy to use and to navigate and to be able to see if
the functionalities offered will satisfy the needsof the user.
The application that was created meets the aim of the project which was stated in
the first chapter of the report. Furthermore, all the functionalities that were required by the
client have been added to the application. This means that the results of the project are
satisfactory.
61
9. Future development and Summary
9.1 Future work
This chapter contains information about some functionalities that the system that was
implemented does not offer, however they can be found very useful. The reason why some
of the functionalities presented in this section are not implemented in CITYs alumni web
site is because the client did not request them, even though some of them were explained
and offered on the interview.
9.1.1 Contact alumni officer
It would be very useful if the members of the alumni web site which are former students of
CITY College could directly contact the alumni officer through the web site. The system
that was implemented does not offer this functionality. However it is easy to find the e-mail
address of the alumni officer because it will be placed on the home page of the online
community. The contact alumni officer functionality could be easily implemented using
PHP, using the already build in function of PHP mail(), which is also used in order to
implement the broadcast e-mail functionality that the alumni web site offers.
9.1.2 Submit CV
It would be very useful if the former students would be able to directly submit their CV
using the alumni web site. This could be found very useful because of the fact that CITY
College cooperates with many different companies in Greece. The CVs would be stored on
the server where some companies would be able to access them if they are looking for a
new employ. This means that another type of user should be added to the system. As
mentioned above, the alumni office of CITY College offers many benefits and services to
the former graduated students. One of those services is to help the graduated students to get
employed. If the alumni students were able to submit a CV and the companies would have
been able to access those CVs, the alumni office would be able to help the graduates get
employed without direct interference.
9.1.3 Discussion forum
A very useful functionality from which the alumni members could benefit would be if the
web site had a forum where any discussion could be opened that is related to a persons
field of study. Many universities around the world have a forum on their alumni web site.
62
Separate forums must be created for each department. The forum could also be used to ask
some question.
9.1.4 Setting personal information private or public
Some people would not like the idea that their information could be seen by everybody that
is a member of the alumni web site. That is why it would be useful to be able to set some
information, such as the contact details as private or public. This could be done very easy
with the use of radio buttons.
9.2 Summary
The development of the web site started with the interview with the alumni officer of City
College. After the user requirements were captured, literature review was conducted about
related work in order to better understand the role of an alumni web site and to get some
ideas concerning how the interface should look like. Further on, the software development
process selected for developing the alumni web site was the Waterfall model. The tasks that
had to be completed in each phase of the Waterfall model were identified right after the
process has been selected.
The analysis of the system identifies the different type of users and their access to
the functionalities and presents a detailed picture of the functionalities by developing the
non-formal specifications for the user requirements and by developing use cases. The
design of the application mainly focuses on the design of the database and also briefly
describes the architecture of the web based application. Further on, the implementation
chapter contains information about the tools and technologies that were used and are
required in order for the application to run. The implementation process is then described
and some essential code was presented.
After the application has been implemented, it was tested in order to find some bugs
and repair them. Three different testing techniques were used: Unit testing, Integration
testing and System testing. Finally, after each phase of the waterfall model was completed,
the system and the software engineering process which was chosen are evaluated.
63
10. Bibliography
[1] SoftwareDevelopment Process, Software Development Life Cycle , Innotechor, 2008
http://www.innotechor.com/software.php
[2] Waterfall model, One stop testing 2003 2009
http://www.onestoptesting.com/sdlc-models/waterfall-model/
[3] PHP: What can PHP do?, What is PHP
http://www.php.net/manual/en/intro-whatcando.php
Last updated: Fri, 29 May 2009
[4] Dynamic web pages and ASP[ASP3wiki], Active Server Pages 3.0Wiki, 2003
http://asp3wiki.wrox.com/wiki/1-1-3-dynamic-web-pages-and-asp
Last updated: 12 J une 2003
[5] J avaServer Pages Overview Sun Developer Network (SDN), 2009
http://java.sun.com/products/jsp/overview.html
[6] Moore, J ohn (2008-07-07). "What is Ajax?". RIAspot.com.
http://www.riaspot.com/articles/entry/What-is-Ajax-.
Retrieved on 2008-07-07.
[7] Bert Bos, Cascading style shits, W3C
http://www.w3.org/Style/CSS/
Last updated $Date: 2009/04/24
[8] Charles Babcock "Sun Locks Up MySQL, Looks To Future Web Development".
Information week
http://www.informationweek.com/news/showArticle.jhtml?articleID=206900327.
Retrieved on 2008-02-27.
[9] The apache Software Fundation 2009
http://www.apache.org/
[10] Kolawa, Adam; Huizinga, Dorota (2007). automated Defect Prevention: Best
Practices in Software Management. Wiley-IEEE Computer Society Press. p. 75. ISBN
0470042125.
[11] What is Integration Testing? a Definition from WhatIs.com 2006 - 2009
http://searchsoftwarequality.techtarget.com/sDefinition/0,,sid92_gci1243430,00.html
64
Appendix A Interview
1. What does the Alumni web site currently offer?
2. What are the current problems than need to be solved?
3. What functionalities should the web site offer?
4. What are the different types of users of the system?
5. Which user has access to which functionalities?
6. How can the graduated students become members of the alumni?
Automatically / Manually?
7. Do you have any specific ideas concerning the interface of the web site?
8. Should the web site offer different views for the different users?
9. What should a users profile consist of?
10. Does the site need to have some links not connected to the alumni?
11. If yes, what links should be added?
12. Should I interview someone except for some former students?
13. Is there something important that you would like to add that I have not asked?
65
Appendix B Use Cases
B.1 Log In
Use Case: Log In
Actors Administrator, Alumni officer, member
Preconditions The user should not be already logged in the system
Postconditions The user logs into the system.
Description The users can log in the system in order to use the functionalities that the online
community offers.
Action Num. User System
Main Success Scenario
1 Insert username.
2. Insert password.
3. Submits username and password
4. Checks weather the combination of the
username and password exists in the
database.
Extension
4a The combination of the username and
password that were inputted do not exist.
4a.1 Confirmation message is sent back to the
user.
4a.2 Inserts username
4a.3 Insert password
4a.4 Submit to the system.
Priority High
Risk Critical
Use Case Table B.1 Log In
B.2 Add event
Use Case: Add event
Actors Alumni officer, Administrator
Preconditions The alumni officer or the administrator should be logged in.
Postconditions An event is added to the list of local or non-local events.
Description A new event is added to the website.
Action Num. User System
Main Success Scenario
1. Select type of event.
2. Insert title.
3. Insert description.
4. Insert date.
5. Insert time.
66
6. Submit to the system.
7. Adds the event to the list of events
Confirmation message is sent back to the
user.
Priority High
Risk Critical
Use Case Table B.2 Add Event
B.3 Modify Event
Use Case: Modify event
Actors Alumni officer, Administrator
Preconditions The administrator or the alumni officer must log in.
Postconditions The selected event is modified
Description The alumni officer or the administrator can modify the events
Action Num. User System
Main Success Scenario
1. Select the modify link next to the event
that need to be modified.
2. Insert title (optional)
3. Insert description (optional)
4. Insert date (optional)
5. Insert time (optional)
6. Submit to the system. Updates the title, the description, the date
and/or the time of the selected event
7. Confirmation message is sent back to the
user.
Priority Low
Risk Low
Use Case Table B.3 Modify Event
B.4 Remove Event
Use Case: Remove event
Actors Alumni officer, Administrator
Preconditions The administrator or the alumni officer must be logged in
Postconditions The selected event is removed from the database.
Description The alumni officers or the administrator can remove event from the web site
Action Num. User System
Main Success Scenario
1. Select the remove link next to the event
that needs to be removed.
2. Removes the selected event from the
database.
3. Confirmation message is sent back to the
67
user.
Priority Medium
Risk Medium
Use Case Table B.4 Remove Event
B.5 View eventa
Use Case : View events
Actors Non-member, Member, Alumni officer, Administrator
Preconditions At least one event must exist in the list of events
Postconditions A list of events is generated.
Description The users can view all the events that have been added by the alumni officer.
Action Num. User System
Main Success Scenario
1. Selects events link
2. Retrives the events from the database and
sends them back to the user.
Extension
Priority High
Risk Critical
Use Case Table B.5 View Events
68
Appendix C Code Listing
C-1 register.php
<?php
r equi r e( " connect Dat abase. php" ) ;
$name=$_POST[ ' name' ] ;
$depar t ment =$_POST[ ' depar t ment ' ] ;
$year =$_POST[ ' year ' ] ;
$user name=$_POST[ ' user name' ] ;
$passwor d=$_POST[ ' passwor d' ] ;
i f ( $name! =nul l && $depar t ment ! =nul l && $year ! =nul l && $user name! =nul l &&
$passwor d! =nul l )
{
$r esul t = mysql _quer y( " Sel ect * Fr omst udent s WHERE name = ' $name' &&
depar t ment = ' $depar t ment ' && year of gr aduat i on = ' $year ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
i f ( $num! =0)
{
i f ( $name! =nul l && $depar t ment ! =nul l && $year ! =nul l )
{
$nname = mysql _r esul t ( $r esul t , $i , " Name" ) ;
$ddepar t ment = mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$yyear = mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
$dhost =" l ocal host " ;
$duser =" r oot " ;
$dpass=" " ;
$ddat abase=mysql _connect ( $dhost , $duser , $dpass) or
di e( mysql _er r or ( ) ) ;
$db=mysql _sel ect _db( " dat abase" , $ddat abase) or
di e( mysql _er r or ( ) ) ;
mysql _quer y( " I NSERT I NTO member ( name, depar t ment ,
year of gr aduat i on) VALUES ( ' $nname' , ' $ddepar t ment ' , ' $yyear ' ) " ) ;
$r esul t = mysql _quer y( " SELECT * FROM member WHERE
name=' $nname' && depar t ment =' $depar t ment ' " ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
$member i d = $r ow[ ' I D' ] ;
mysql _quer y( " I NSERT I NTO user ( member I D, t ype, user name,
passwor d, name) VALUES ( ' $member i d' ,
' f or mer st udent ' , ' $user name' , ' $passwor d' , ' $nname' ) " ) ;
mysql _cl ose( $ddat abase) ;
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / l oggi n. php' ) ;
}
}
el se
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / r egi st er . php' ) ;
echo " You have not gr aduat ed on CI TY Col l ege" ;
69
}
}
el se
{
i f ( $name == nul l | | $depar t ment == nul l | | $year == nul l | | $user name ==
nul l | | $passwor d == nul l )
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / r egi st er . php' ) ;
echo " Pl eese f i l l i n al l t he f i el ds" ;
}
}
mysql _cl ose( $dat abase) ;
?>
C-2 logIn.php
<?php
sessi on_st ar t ( ) ;
r equi r e( " 1. php" ) ;
db_connect ( ) ;
$user =$_POST[ ' user ' ] ;
$pass=$_POST[ ' pass' ] ;
$sql = " SELECT * FROM user WHERE user name LI KE ' $user ' AND passwor d LI KE
' $pass' " ;
$r esul t = mysql _quer y( $sql ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
$i d=$r ow[ ' I D' ] ;
$t ype=$r ow[ ' Type' ] ;
$num= mysql _numr ows( $r esul t ) ;
i f ( ( $user ==nul l | | $pass==nul l ) | | $num==0)
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / l oggi n. php' ) ;
exi t ;
}
el se i f ( $num! = 0)
{
$_SESSI ON[ ' i d' ] =$r ow[ ' I D' ] ;
i f ( $t ype==' f or mer st udent ' )
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / myPr of i l e. php' ) ;
exi t ;
}
el se i f ( $t ype==' al umni Of f i cer ' )
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / f unc/ vi ewNews. php' ) ;
exi t ;
}
el se
{
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / f unc/ vi ewNewsAdmi n. php' ) ;
exi t ;
}
}
el se
{
70
header ( ' Locat i on: ' . $_SERVER[ ' ROOT_DOCUMENT' ] . ' / l oggi n. php' ) ;
}
?>
C-3 findMember.php
<ht ml >
<body>
<f or mact i on+" f i ndMember . php" met hod=POST>
Name: <i nput t ype=t ext name=name><br >
Depar t ment : <i nput t ype=t ext name=depar t ment ><br >
Year of Gr aduat i on: <i nput t ype=t ext name=year > <br >
<i nput t ype=submi t val ue=" Sear ch" ><p>
</ f or m>
<?php
r equi r e( connect Dat abase. php) ;
$name=$_POST[ ' name' ] ;
$depar t ment =$_POST[ ' depar t ment ' ] ;
$year =$_POST[ ' year ' ] ;
i f ( $name! =nul l && $depar t ment ==nul l && $year ==nul l )
{
$r esul t = mysql _quer y( " SELECT * FROM member WHERE name LI KE ' %$name%' " ) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num) {
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
}
el se i f ( $name==nul l && $depar t ment ! =nul l && $year ==nul l )
{
$r esul t = mysql _quer y( " SELECT * FROM member WHERE depar t ment = ' $depar t ment ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num) {
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
}
el se i f ( $name==nul l && $depar t ment ==nul l && $year ! =nul l )
71
{
$r esul t = mysql _quer y( " SELECT * FROM member WHERE year of gr aduat i on = ' $year ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num) {
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
}
el se i f ( $name! =nul l && $depar t ment ! =nul l && $year ==nul l )
{
$r esul t = mysql _quer y( " SELECT * FROM member WHERE name LI KE ' %$name%' &&
depar t ment =' $depar t ment ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num) {
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
}
el se i f ( $name! =nul l && $depar t ment ==nul l && $year ! =nul l )
{
$r esul t = mysql _quer y( " SELECT * FROM member WHERE name LI KE ' %$name%' &&
year of gr aduat i on=' $year ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num) {
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
}
el se i f ( $name==nul l && $depar t ment ! =nul l && $year ! =nul l )
{
$r esul t = mysql _quer y( " SELECT * FROM member WHERE depar t ment =' $depar t ment ' &&
year of gr aduat i on=' $year ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
72
$i =0;
whi l e ( $i < $num) {
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
}
el se i f ( $name! =nul l && $depar t ment ! =nul l && $year ! =nul l )
{
$r esul t = mysql _quer y( " SELECT * FROM member WHERE name LI KE ' %$name%' &&
depar t ment =' $depar t ment ' && year of gr aduat i on=' $year ' " ) ;
$num=mysql _numr ows( $r esul t ) ;
$i =0;
whi l e ( $i < $num) {
$i d=mysql _r esul t ( $r esul t , $i , " I D" ) ;
$nname=mysql _r esul t ( $r esul t , $i , " Name" ) ;
$depar t ment =mysql _r esul t ( $r esul t , $i , " Depar t ment " ) ;
$year of gr aduat i on=mysql _r esul t ( $r esul t , $i , " Year Of Gr aduat i on" ) ;
echo " Name: <b>$nname <br > Depar t ment : $depar t ment <br > Year of Gr aduat i on:
$year of gr aduat i on <br > <a hr ef =vi ewPr of i l e. php?i d=$i d>vi ew pr of i l e</ a> <br ><br >" ;
$i ++;
}
}
mysql _cl ose( $dat abase) ;
?>
</ body>
</ ht ml >
C-4 updateProfile.php
<?php
sessi on_st ar t ( ) ;
r equi r e( " 1. php" ) ;
$i dd = $_SESSI ON[ ' i d' ] ;
db_connect ( ) ;
$r esul t = mysql _quer y( " SELECT * FROM user WHERE I D = ' $i dd' " ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
$member I d = $r ow[ ' Member I D' ] ;
$r esul t = mysql _quer y( " SELECT * FROM member WHERE I D = ' $member I d' " ) ;
$num= mysql _numr ows( $r esul t ) ;
$r ow = mysql _f et ch_ar r ay( $r esul t ) ;
i f ( i sset ( $_GET[ ' act i on' ] ) && $_GET[ ' act i on' ] == " updat e" )
{
$day=$_POST[ ' day' ] ;
$mont h=$_POST[ ' mont h' ] ;
$year =$_POST[ ' year ' ] ;
$occupat i on=$_POST[ ' occupat i on' ] ;
73
$empl oyment =$_POST[ ' empl oyment ' ] ;
$f or mer empl oyment =$_POST[ ' f or mer empl oyment ' ] ;
$addr ess=$_POST[ ' addr ess' ] ;
$emai l = $_POST[ ' emai l ' ] ;
$t el ephone = $_POST[ ' t el ephone' ] ;
$sql = " UPDATE member SET Day=' $day' ,
Mont h = ' $mont h' , Year = ' $year ' , Occupat i on = ' $occupat i on' ,
Empl oyment = ' $empl oyment ' , `For mer Empl oyment ` = ' $f or mer empl oyment ' ,
Addr ess = ' $addr ess' , Emai l = ' $emai l ' , Tel ephone = ' $t el ephone'
WHERE I D = ' $member I d' ; " ;
$r esul t = mysql _quer y( $sql ) ;
i f ( $r esul t ) header ( " Locat i on: " . $_SERVER[ ' ROOT_DOCUMENT' ] . " / myPr of i l e. php" ) ;
el se echo mysql _er r or ( ) ;
}
?>
<ht ml >
<body>
<b><cent er >Updat e Pr of i l e</ cent er ></ b><br ><br >
<t abl e al i gn=cent er >
<f or mact i on=" <?php echo $_SERVER[ ' ROOT_DOCUMENT' ]
?>/ f unc/ updat ePr of i l e2. php?act i on=updat e" met hod=POST>
<t r ><t d><b>Dat e of Bi r t h: </ b></ t d><t d al i gn=r i ght ><i nput t ype=t ext si ze=2
name=day val ue=<?php echo $r ow[ ' Day' ] ; ?>>
&nbsp <sel ect name=mont h>
<opt i on val ue=" <?php echo $r ow[ ' Mont h' ] ; ?>" ><?php echo
$r ow[ ' Mont h' ] ; ?></ opt i on>
<opt i on val ue=" J anuar y" >J anuar y</ opt i on>
<opt i on val ue=" Febr uar y" >Febr uar y</ opt i on>
<opt i on val ue=" Mar ch" >Mar ch</ opt i on>
<opt i on val ue=" Apr i l " >Apr i l </ opt i on>
<opt i on val ue=" May" >May</ opt i on>
<opt i on val ue=" J une" >J une</ opt i on>
<opt i on val ue=" J ul y" >J ul y</ opt i on>
<opt i on val ue=" August " >August </ opt i on>
<opt i on val ue=" Sept ember " >Sept ember </ opt i on>
<opt i on val ue=" Oct omber " >Oct omber </ opt i on>
<opt i on val ue=" Nover mber " >November </ opt i on>
<opt i on val ue=" December " >December </ opt i on>
</ sel ect ></ t d></ t r >
<t r ><t d><b>Year : </ b></ t d><t d al i gn=r i ght ><i nput t ype=t ext name=year val ue=<?php
echo $r ow[ ' Year ' ] ; ?>> </ t d></ t r >
<t r ><t d><b>Occupat i on: </ b></ t d><t d al i gn=r i ght ><i nput t ype=t ext name=occupat i on
val ue=<?php echo $r ow[ ' Occupat i on' ] ; ?>></ t d></ t r >
<t r ><t d><b>Empl oyment : </ b></ t d><t d al i gn=r i ght ><i nput t ype=t ext name=empl oyment
val ue=<?php echo $r ow[ ' Empl oyment ' ] ; ?>></ t d></ t r >
<t r ><t d><b>For mer Empl oyment : </ b></ t d><t d al i gn=r i ght > <i nput t ype=t ext
name=f or mer empl oyment val ue=<?php echo $r ow[ ' For mer Empl oyment ' ] ; ?>></ t d></ t r >
<t r ><t d><b>Addr ess: </ b></ t d><t d al i gn=r i ght > <i nput t ype=t ext name=addr ess
val ue=<?php echo $r ow[ ' Addr ess' ] ; ?>></ t d></ t r >
<t r ><t d><b>E- mai l : </ b></ t d><t d al i gn=r i ght > <i nput t ype=t ext name=emai l
val ue=<?php echo $r ow[ ' Emai l ' ] ; ?>></ t d></ t r >
<t r ><t d><b>Tel ephone: </ b></ t d><t d al i gn=r i ght ><i nput t ype=t ext name=t el ephone
val ue=<?php echo $r ow[ ' Tel ephone' ] ; ?>></ t d></ t r >
<t r ><t d></ t d> <t d al i gn=r i ght ><i nput t ype=submi t val ue=" Submi t " ></ t d></ t r >
</ f or m>
</ t abl e>
<?php
74
?>
</ body>
</ ht ml >
C-5 addEvent.php
<ht ml >
<body>
<f or mact i on+" l ogi n. php" met hod=POST>
Type: <sel ect name=t ype>
<opt i on val ue=" l ocal " >Local </ opt i on>
<opt i on val ue=" non- l ocal " >Non- l ocal </ opt i on>
</ sel ect ><br >
Ti t l e: <i nput t ype=t ext name=t i t l e><br >
Ti me: <i nput t ype=t ext name=hour si ze=5>: <i nput t ype=t ext name=mi nut es><br >
Dat e: <i nput t ype=t ext name=day>

<sel ect name=mont h>
<opt i on val ue=" J anuar y" >J anuar y</ opt i on>
<opt i on val ue=" Febr uar y" >Febr uar y</ opt i on>
<opt i on val ue=" Mar ch" >Mar ch</ opt i on>
<opt i on val ue=" Apr i l " >Apr i l </ opt i on>
<opt i on val ue=" May" >May</ opt i on>
<opt i on val ue=" J une" >J une</ opt i on>
<opt i on val ue=" J ul y" >J ul y</ opt i on>
<opt i on val ue=" August " >August </ opt i on>
<opt i on val ue=" Sept ember " >Sept ember </ opt i on>
<opt i on val ue=" Oct omber " >Oct omber </ opt i on>
<opt i on val ue=" Nover mber " >November </ opt i on>
<opt i on val ue=" December " >December </ opt i on>
</ sel ect ><br >
Descr i pt i on: <t ext ar ea r ows=" 5" col s=" 10" name=descr i pt i on> </ t ext ar ea>
<i nput t ype=submi t val ue=" Submi t " ><p>
</ f or m>
<?php
r equi r e( " connect Dat abase. php" ) ;
$t ype=$_POST[ ' t ype' ] ;
$t i t l e=$_POST[ ' t i t l e' ] ;
$hour =$_POST[ ' hour ' ] ;
$mi nut es=$_POST[ ' mi nut es' ] ;
$day=$_POST[ ' day' ] ;
$mont h=$_POST[ ' mont h' ] ;
$descr i pt i on=$_POST[ ' descr i pt i on' ] ;
i f ( $t i t l e! =nul l ) {
mysql _quer y( " I NSERT I NTO event ( t ype, t i t l e, hour , mi nut e, day, mont h,
descr i pt i on) VALUES ( ' $t ype' , ' $t i t l e' , ' $hour ' , ' $mi nut es' , ' $day' , ' $mont h' ,
' $descr i pt i on' ) " ) ;
}
mysql _cl ose( $dat abase) ;
?>
</ body>
</ ht ml >
75
C-6 modifyEvent.php
<ht ml >
<body>
<f or mact i on+" addEvent . php" met hod=POST>
Type: <sel ect name=t ype>
<opt i on val ue=" l ocal " >Local </ opt i on>
<opt i on val ue=" non- l ocal " >Non- l ocal </ opt i on>
</ sel ect ><br >
Ti t l e: <i nput t ype=t ext name=t i t l e><br >
Ti me: <i nput t ype=t ext name=hour si ze=5>: <i nput t ype=t ext name=mi nut es><br >
Dat e: <i nput t ype=t ext name=day>

<sel ect name=mont h>
<opt i on val ue=" J anuar y" >J anuar y</ opt i on>
<opt i on val ue=" Febr uar y" >Febr uar y</ opt i on>
<opt i on val ue=" Mar ch" >Mar ch</ opt i on>
<opt i on val ue=" Apr i l " >Apr i l </ opt i on>
<opt i on val ue=" May" >May</ opt i on>
<opt i on val ue=" J une" >J une</ opt i on>
<opt i on val ue=" J ul y" >J ul y</ opt i on>
<opt i on val ue=" August " >August </ opt i on>
<opt i on val ue=" Sept ember " >Sept ember </ opt i on>
<opt i on val ue=" Oct omber " >Oct omber </ opt i on>
<opt i on val ue=" Nover mber " >November </ opt i on>
<opt i on val ue=" December " >December </ opt i on>
</ sel ect ><br >
Descr i pt i on: <t ext ar ea r ows=" 2" col s=" 20" name=descr i pt i on> </ t ext ar ea>
<i nput t ype=submi t val ue=" Submi t " ><p>
</ f or m>
<?php
r equi r e( " connect Dat abase. php" ) ;
$t ype=$_POST[ ' t ype' ] ;
$t i t l e=$_POST[ ' t i t l e' ] ;
$hour =$_POST[ ' hour ' ] ;
$mi nut es=$_POST[ ' mi nut es' ] ;
$day=$_POST[ ' day' ] ;
$mont h=$_POST[ ' mont h' ] ;
$descr i pt i on=$_POST[ ' descr i pt i on' ] ;
$i ndex = $_GET[ ' i ndex' ] ;
$t t ype=mysql _quer y( " SELECT ' Type' FROM ' dat abase' . ' event ' WHERE
' i ndex' =' $i ndex' " ) ;
$mmont h =mysql _quer y( " SELECT ' Mont h' FROM ' dat abase' . ' event ' WHERE
' i ndex' =' $i ndex' " ) ;
i f ( $_GET[ " cmd" ] ==" modi f y" )
{
i f ( $t ype! =$t t ype)
{
$quer y1= " UPDATE `dat abase`. `event ` SET `Type` = ' $t ype' WHERE
`event `. `I ndex` =' $i ndex' LI MI T 1" ;
mysql _quer y( $quer y1) or di e( mysql _er r or ( ) ) ;
}
i f ( $t i t l e! =nul l )
{
$quer y2= " UPDATE `dat abase`. `event ` SET `Ti t l e` = ' $t i t l e' WHERE
`event `. `I ndex` =' $i ndex' LI MI T 1" ;
76
mysql _quer y( $quer y2) or di e( mysql _er r or ( ) ) ;
}
i f ( $hour ! =nul l )
{
$quer y3= " UPDATE `dat abase`. `event ` SET `Hour ` = ' $hour ' WHERE
`event `. `I ndex` =' $i ndex' LI MI T 1" ;
mysql _quer y( $quer y3) or di e( mysql _er r or ( ) ) ;
}
i f ( $mi nut es! =nul l )
{
$quer y4= " UPDATE `dat abase`. `event ` SET `Mi nut e` = ' $mi nut es' WHERE
`event `. `I ndex` =' $i ndex' LI MI T 1" ;
mysql _quer y( $quer y4) or di e( mysql _er r or ( ) ) ;
}
i f ( $day! =nul l )
{
$quer y5= " UPDATE `dat abase`. `event ` SET `Day` = ' $day' WHERE
`event `. `I ndex` =' $i ndex' LI MI T 1" ;
mysql _quer y( $quer y5) or di e( mysql _er r or ( ) ) ;
}
i f ( $mont h! =$mmont h && $mont h! =nul l )
{
$quer y6= " UPDATE `dat abase`. `event ` SET `Mont h` = ' $mont h' WHERE
`event `. `I ndex` =' $i ndex' LI MI T 1" ;
mysql _quer y( $quer y6) or di e( mysql _er r or ( ) ) ;
}
i f ( $descr i pt i on! =nul l )
{
$quer y7= " UPDATE `dat abase`. `event ` SET `Descr i pt i on` = ' $descr i pt i on'
WHERE `event `. `I ndex` =' $i ndex' LI MI T 1" ;
mysql _quer y( $quer y7) or di e( mysql _er r or ( ) ) ;
}
}
mysql _cl ose( $dat abase) ;
?>
</ body>
</ ht ml >
77
Appendix D Poster
Figure D.1 Poster

You might also like