You are on page 1of 151

Web Based Appointment for Guidance

Consultation and Counselling for


Pamantansan ng Lungsod ng Marikina

A Capstone Project Presented to

the Faculty of PLMar College

of Information Technology

In Partial Fulfillment

of the Requirements of the

Subject of Capstone

Cadawas, Ryan

Delos Reyes, Aron James

Del Rosario, Jonas

Zabala, Jeric

2019
iv

Executive Summary

This project regards the construction on how the appointment of the students and

their student school information be recorded. The goal is to help the Guidance office to

record the student appointments and provide statistics that will help the guidance

Counselor to monitor monthly and yearly transaction. Upon examining the project, it helps

to incorporate the students and guidance office by the web-based appointment. It basically

creating a bridge concept towards the unoriented student about the program that Guidance

office has. The project will gradually help students by the assistance of the guidance

counselor to approach the student about their personal problems. We hope to update the

very system to improve and to have a more efficient Appointment system.


v

ACKNOWLEDGEMENTS

The researchers would like to express their deepest gratitude to the following who

helped and contributed to the success of this capstone project.

First and foremost, our almighty God for the good health, strength, blessings,

wisdom He had given the researchers all throughout the venture for its fulfillment, to God

be the Glory!

This work would not have been possible without the supporting idea and critical

thinking of our adviser Mr. Crisanto Sarmiento, the idea and its premise that may solve the

existing problem from time to time. For the most part it gave us insight towards achievable

goals and deep awareness on what we need to improve technically, and can only achieve

by complying to each requirement.

To the Pamantasan ng Lungsod ng Marikina (PLMar) – Marikina city in

Participation of Guidance Counselors in charge Ma’am Tess Gumabao, who provided all

necessary information for the fulfillment of this capstone project.

To Ma’am Cherrylyn Cruz, who provided additional ideas and assistance to the

development of this capstone project.


To the Panelist namely, Prof. Renjun Orain, Prof. Rhy Obra and Prof. Bryran

Calata, Engr. Dario Malazo and Ma’am Cherrylyn Cruz, for being the researcher

consultant who helped to improve the capabilities of the system.

To their families, who gave their prayers, love, understanding, concern, advice and

moral support when the researchers needed it.

The efforts and affection from all of their friends and classmates who are always

willing to help had given them those cheerful smiles and inspiring messages which give

more strength to the researchers in times of hardship.

Again, their sincerest gratitude


i

Table of Contents

INTRODUCTION............................................................................................................................................1

Project Context.............................................................................................................................1
Purpose and Description.................................................................................................................3
Ojectives of the study..................................................................................................................... 4
Scope and Limitation.....................................................................................................................6

REVIEW OF RELATED LITERATURE AND STUDIES.............................................................................8

Related Literature.............................................................................................................................................8
Related Studies...........................................................................................................................10
Explanation................................................................................................................................12
Conclusion.................................................................................................................................12

TECHNICAL BACKGROUND....................................................................................................................13

Table 3.2 Development Requirements............................................................................................14


Table 3.3 Hardware requirements...................................................................................................15
Table 3.4 Software Requirements...................................................................................................16
Peopleware.................................................................................................................................17
Definition of Terms..................................................................................................................18

REQUIREMENTS ANALYSIS.....................................................................................................................19

Fishbone Diagram..........................................................................................................................................20
Figure 4.2 Level 0 DFD................................................................................................................21
Figure 4.3 Level 1 DFD................................................................................................................22
Figure 4.4 Level 2 DFD................................................................................................................23
System Architecture.....................................................................................................................24
Functional Decomposition............................................................................................................25
Entity Relationship Diagram.........................................................................................................28
Implementation plan ...................................................................................................................29

RECOMENDATION......................................................................................................................................30

APPENDICES................................................................................................................................................31
ii

Transcript of Interview..................................................................................................................................32
Current Documentation................................................................................................................32
Data gathering.............................................................................................................................33
Proposed System DFD
Figure 4.2 Level 0 DFD................................................................................................................34
Figure 4.3 Level 1 DFD................................................................................................................35
Figure 4.4 Level 2 DFD................................................................................................................36
Gantt Chart.................................................................................................................................38
Final Screen layouts.....................................................................................................................41
Sample Input and Output..............................................................................................................56
User Guide/Manual......................................................................................................................77
Relevant Source Code..................................................................................................................98
iii

LIST OF TABLES

Table 3.2 Development Requirements.....................................................................................14


Table 3.3 Hardware requirements............................................................................................15
Table 3.4 Software Requirements...........................................................................................................16
iv

LIST OF FIGURES
Current system
Fishbone Diagram......................................................................................................................................20
Figure 4.2 Level 0 DFD...........................................................................................................21
Figure 4.3 Level 1 DFD...........................................................................................................22
Figure 4.4 Level 2 DFD...........................................................................................................23
Proposed DFD
Figure 4.2 Level 0 DFD...........................................................................................................34
Figure 4.3 Level 1 DFD...........................................................................................................35
Figure 4.4 Level 2 DFD...........................................................................................................36
Chapter 1

INTRODUCTION
Project Context
Exposure to technology is changing our cognitive processes and our ability to take

in information because of its daily use. In this approach we come up something technology

related, a way to prevent depression and to overcome their hard time expressing what they

feel by providing web-based Appointment for consultation and counselling operated by

Guidance Counsellor that has a large responsibility in this Campus. In this era, manual

transactions evolved into online transaction and proof that growing is constant. Manual

systems turned out to be slow and inaccurate resulting to problems that can turn into

downfall of trust for its surrounding.

The Pamantasan ng Lungsod ng Marikina (simply known as PLMar) is the first city

government-funded university in Marikina City, Philippines. It was established to provide

quality but affordable tertiary education to the residents of Marikina through Ordinance

No. 015 Series of 2003. It is a state university in Marikina City. It is in Brazil St., Green

heights Subdivision, Conception Uno, and Marikina City near H. Bautista Elementary

School. The school population continues to grow based on the results of enrolled students

per year. It was started in year 2003 with 1,424 students. While in last 2012-2016

enrollment is 12,051 and approximately this year is doubled by K12 program.


WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 2

Usually every student doesn’t know where to come when there’s a problem

regarding to academic, family, bullying, professor issues, gender equality even himself.

According to Ma’am Tess Gumabao, Guidance Counselor of Pamantasan ng Lungsod ng

Marikina, they conduct survey to every student that shows 80% of student in PLMar are

not showing or hiding their problems because they can handle it. And the rest 20% has

difficulty at handling their problems regarding to academics and personal issues. Guidance

Professionals usually ask every student with this line “If you have a problem, whom you

come?” almost98% they said to their friends and the rest 2% to their family.

However, we provide the idea that technology can connect students and guidance

office and enhance their consultation and counselling services using Appointment. This

known as the Web-Based Appointment for Guidance Consultation and Counselling. It will

help the student by Appointing them to Guidance counsellor while they can easily

approach or engage with the system. It can practically become a bridge for every student

and to know that guidance office exists. Aims to help the Guidance office and the student

allocate only the amount of time that will be needed for that particular appointment so that

the individuals will be able to know exactly how much time they have for the meeting and

also be able to schedule something else that can be productive in the remaining amount of

time as well as there will be no conflict of schedule before the meeting. You can make sure

that the whole working day is scheduled in such a way that you make the most of your

time and that there is no time during the day that you will be idle or wasting time. It

promotes guidance office and encouraging the students to associate with the office.
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 3

Purpose and Description

This system aims to improve the Guidance office capability to serve better to every

student in Pamantasan ng Lungsod ng Marikina (PLMar):

 Guidance Office – This system can help the guidance office to recognize by the

students and to encourage students to communicate with guidance professionals.

Guidance Counsellor – Help them to be more productive and reduce their room by room interaction.
 Students – Help them to express their thoughts and not be afraid to share.

 Researcher – To enhance the researcher’s skills and logic in creating a system, to

enhance our knowledge about the flow of this system.

 Future Researcher - Help them to get some reference about Web-based

Appointment
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 4

Objectives of the study


The main objective of the researcher is to create Web-Based Appointment system

for Guidance Office of Pamantasan ng Lungsod ng Marikina (PLMar) towards an advance

student counselling and consultation.

Moreover, the study aims the following specific objectives according to these

parameters.

A. System

a) To be able to accept all pending accounts of every student of Pamantasan by

Guidance Counselors

b) To gather some suggestions or feedbacks from the students

c) To record registered student data after the validation of the admin

d) To secure their appointments without any conflicts and to get a fit schedule for the

student using our proposed system

e) To easily locate the information and account that has been recorded to the guidance

database as soon as they registered and leave the school.

B. Security

a) To provide admin account that can operate different functions that is inside the

system, sensible user access.

b) To provide backup and restore feature that can recover data and prevent data loss.
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 5

C. Implementation and Deployment

a) To conduct Web-Based Appointment for Guidance Consultation and Counselling

orientation and training for Guidance Office of Pamantasan ng Lungsod ng

Marikina Counselor

b) To inform the Students about the basic web-based Appointment for Guidance

Consultation and Counselling for (PLMar) instructions

c) To implement Web-based Appointment for Guidance Consultation and Counselling

for Pamantasan ng Lungsod ng Marikina (PLMar)

d) To properly turn over the Web-based Appointment for Guidance Consultation and

Counselling for Pamantasan ng Lungsod ng Marikina Guidance Office for use.


WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 6

Scope and Limitation study


Scope

The Web-Based Appointment for Guidance Consultation and

Counselling for PLMar will record only all students who has been

registered to its Web based Appointment. Response at eight in the morning

to five in the evening working hours while the schedules are plainly

organized based on the availability of Guidance Counselor for consultation

and counselling. Along the process, recording of data will be made accurate

and reliable by validating its account provided by the system. Those account

of the students who graduated, transferred or dropped to the university will

exist approximately 5 years. Guidance Office can use the record even the

student has no longer in Pamantasan, and the record will be used for reports

or history of consultation and counselling. The Web-based Appointment for

Guidance consultation and counselling has two types of account. The

Admin which is the Guidance Counselor surely for security purpose and the

student. Lastly the student account can perform comment using feedback

section and wait to be validated by the admin.


WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 7

Limitation

Web-based Appointment for Guidance Consultation and Counselling

limits its coverage for the Consultation and Counselling of Guidance office

that are advising and recommending about their personal matters.

Unexpected Canceling of schedule by the student must be 3 days before the

settled Appointment. Not all student information and student of Pamantasan

are covered by Web-based Appointment. Setting an appointment can be

only performs once a month for every students account. Student information

that will be stored in database will come from registration of each student.
8

Chapter 2

REVIEW OF RELATED LITERATURE AND STUDIES


This chapter discussed the related foreign and local literature and studies that

relevant to this study. This section is divided into four parts: Foreign Literature, Local

Literature, Foreign Studies and Local Studies.

It will also provide more perception to have a better understanding and perspective

Related Literature
Here are some Foreign and Local literatures related to the current study according

to Gordon Smith, 2007 (Foreign) and Bituin Abi, August 2010 (Local)

Foreign Literature
To the objectives of the study:

- Senior Scheduling System is a powerful tool designed to help create school’s

master schedule. The schedule created by the scheduling system can be analyzed,

adjusted and rerun an unlimited number of times until the desired results are

achieved. The power of Scheduling system will greatly reduce the

time it takes to create school’s faculty schedules.

- The need for a computerized system is very much essentials to establishments,

especially schools. It provides a great help when it comes to organizing and

speeding up process of work in offices.


WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 9

Local Literature
- As the result of the competition between different hotels, various business

strategies had been made to attract customers, such as putting discounts, having

beautiful and relaxing environment and above all having a state-of-the-art

computer system and facilities. The current problem observed is the manual

guest list records, the manual reservation of guests, the manual booking of

rooms for the guests which takes a long time to accomplish. According to the

manager in the establishment, because they keep on doing their job manually, it

resulted to a very messy office, lots of papers around the desks and sometimes

important documents disappear. $rom the information gathered, the proponents

came up with an idea of proposing a system that is relevant to the needs of the

establishment, highly efficient to meet their needs and most of all simple, easy

to use system. The D8 Apartelle Enline "reservation management System is not

only a database for guest list but also an online reservation system, where

potential guest can have online reservation which will automatically be sent to

the database of the D8 Apartelle. 6ased on the proponent? Observation and

interview, they have found many problems such as time-consuming logging of

the guest list names to the log book, difficulties in making reservations and

difficulties in retrieving information on their previous guests because of the

papers that are scattered everywhere and misplacing of the guestless records. As

a conclusion, this system is like our system in the solution on that going to

provide to the user. Such as finding a room for a guest, and receive service
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 10

Related Studies

Here are some Foreign and Local Studies related to the current study

according to C.F. Niederriter, 2007 / According to Graysail (2010) (Foreign) and

Catalogue Horse, 2013 (Local)

Foreign Study
The core functionality of the system allows designating faculty and staff to set

schedule of availability and designate individuals enter the system and schedule

appointments as needed with the faculty and staff. The schedule system provides equitable

access to a variety of rooms, time management and faculty information, as well as to

provide the students to search more information on their own. Faculty overloading has

been a known and documented problem since as long as the (1993 – 1992) school years,

this fact adds to the teacher’s work burden as well as their availability for fruitful

interaction with the students. Our proposed software will alleviate this burden and allows

the teacher more time teaching and interacting with the student. This will allow the teacher

to feel more job satisfaction as well giving the student the feeling of a more personalized

education within the system.


WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 11

Local Study
An online hotel catalogue in Philippine. The Microtel Inn & Suites by Wyndham

Manila/At Mall of Asia is strategically situated near SMX Convention Center, SM Mall of

Asia and Ninoy Aquino International Airport. It is near major business districts and tourist

destinations. It is easily accessible by private and public transport. The hotel has a

restaurant serving international cuisine and function room for 200 persons. The swimming

pool located at the roof deck will be operational soon. Free Wi-Fi in lobby, Restaurant

Only. Php 100 hour for in-room internet use. Free buffet breakfast in all rooms. Hotel does

not offer room only rate. Microtel by Wyndhamn stands out from other properties because

of the system wide design of its buildings and furnishings that stress function, comfort, and

convenience, while at the same time meeting international quality standards. The online

system did not provide an instant booking system. Guests will have to wait for

confirmation within (24 hours after their booking). To enhance the current system, system

is developed to enables guest have availability checks and instant confirmation of the

booking. The purpose of this feature is to save valuable time and to cut cost, as it will

eliminate email exchanges between guests and reservation department. Valuable

reservations staff time is saved because reservation requests will no longer have to be

processed.
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 12

Explanation:
Those Citations above are existing and legitimately true. Based on what we

gathered, they have the existing or traditional way of schedule reservation, in short

appointment. The work is similar to our proposed project because of its appointment

capabilities, the validation within the given time interval based on what the system

proficiency and how it varies from the other might be the best question for our proposed

system. Our system known as Web-Based Appointment for Guidance Consultation and

Counseling for PLMar, the main objective when constructing an appointment system

throughout the development is the conflict of schedule but because of our better

understanding by the help of our professors willfully we provide some graphical

presentation or what we called statistics. Having statistics will put a lot of time to work or

to analyze but it can positively help the guidance office to know when or where the best

approach and to put maximum effort in the specific month/year.

Conclusion:
Accordance to Citations above. There’s a lot of ways or method that can be used for

Scheduling but having advantages has a big factor. Technically and practically technology

era has begun and while it exists it prolong its great help because it is a powerful tool

inside the competition. Meanwhile the old ones are becoming inactive because of

continuous growth of technology. The updated or mainstream nowadays can speed up the

process and provide great satisfaction by meeting the user needs. It saves valuable time

including the paper works, retrieving information and cutting the cost of printing papers.

Technology layout better outcome and give proof that it is limitless gradually.
13

Chapter 3

TECHNICAL BACKGROUND
This chapter intends to identify the technical background and the software and

hardware requirements in order to develop the proposed system.

The Guidance Office uses traditional paper-based system and in its transaction

processes. Guidance Counsellor uses paper to record Transaction whenever it happens and

uses manual. At the end of the day guidance counselor reviews and checks the paper that

have been taken for the file cabinet.


WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 14

The table below shows the software specifications that are needed for development

of the system:

Table 3.2 Development Requirements

SOFTWARE DESCRIPTION
The operating system that will be

Windows 7-10 compatible to support the software

that will be in use.


An application builder that will be

in used to develop the point

Sublime Guidance Office Consultation and

Information Management System


Bootstrap A framework to help you design

websites faster and easier.


MySQL Database
DreamWeaver 8 Design
Photoshop Application used to design a photo
or edit layout
Browser
(Google Chrome) To test the proposed system
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 15

The table below show the hardware specification for the development of the

proposed system:

Table 3.3 Hardware requirements

HARDWARE DESCRIPTION

Laptops/Desktop Intel i3 core processor 2.7 GHz/


Higher
Minimum of 500gb hard disk space
to store the required installation of
Hard disk drive software to be used in the
development of proposed system.
RAM Memory minimum of 2gb /
Maximum of 8gb
Video Card (Standard)

Monitor
(1600 x 900) To display output
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 16

The table shows the software specification of the desktop and laptops that will be used in
Web-based Appointment for Guidance Consultation and Counselling:

Table 3.4 Software Requirements

SOFTWARE DESCRIPTION
Operating system that will be in
Windows 7-10 used to support the platform of the
system
Application builder that will be
Sublime used to run the Web-based
Guidance Consultation and
Information Management System
MySQL DATABASE
Browser
(Google Chrome) To run the system
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 17

Peopleware

Peopleware is basically to anything that has something to do with the development


or use of computer software and hardware system.

PEOPLE DESCRIPTION
A Web developer is a kind of programmer who
specializes in the development of applications
Web Developer relating to the World Wide Web or distributed
network applications, which typically run protocols
like HTTP from a Web server to a web browser
Assess, plan, and enact security measures to help
Security Analyst protect an organization from security breaches and
attacks on its computer networks and systems
Is a specialized computer systems administrator
who maintains a successful database environment
by directing or performing all related activities to
Database Administrator keep data secured The top responsibility of a DBA
professional is to maintain data integrity. This
means the DBA will ensure that data is secure from
unauthorized access but is available to users.
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 18

Definition of terms
For better understanding, the following terms in the study were defined based on

what it is.

 Web-based. A computerized System like the proposed appointment system that is

efficient and lots of capability.

 Counselling. A way or method of providing a solution to a problem of a student

 Depression. A student deepest fear or self-doubt that become serious problem

 Transaction. A process whenever there’s an appointment or interaction

 Reports. A process based from what in the system statistics will show

 Appointment. An agreement to meet someone using the time availability from the

proposed system

 Information. Registered students give their school information, facts provided

 Administrator. A person which is guidance counselors responsible for running the

system process.

 Database. This is where all the data held in a computer, student and admin

information.

 Process. A series of action for each button or any executable portion

 Schedule. Arrange of time or plan towards the guidance office

 SQL. Domain specific language in programming used for managing data of every

student and guidance counselors.

 DATA. Facts and statistics collected together by the use of the system
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 19

Chapter 4

REQUIREMENTS ANALYSIS
This chapter presented the methods and procedures on how the research will be

done. It includes discussion on research method and techniques, systems development

methodology, requirements analysis, requirement documentation, design of software,

development and testing, implementation plan and implementation results.

Research Methods and Techniques


The use of Agile method in an approach to a project management is that important

organizational changes will take place. The Agile method ensures that value is organized

throughout the development process. It easily adapts to changing requirements throughout

the process by measuring and evaluating the status of a project. The measuring and

evaluating allows accurate and early visibility into the progress of each project

The researchers decided to follow the process to be able to create and develop a

system that would fit for the user. The agile methodology helps the researchers to adjust

and to be able to adapt changes in a period. The agile process explains how to have an

accurate and satisfying project by following its phase.


20

FISHBONE DIAGRAM
21

Figure 4.2 Context Diagram


22

Figure 4.3 Level 1 DFD


23

Figure 4.3 Level 2 DFD


24

System Architecture

This diagram shows the interconnected from the request to the responses process

Reach out for help

Student
Guidance
School
Assistance

Set an appointment

Guidance office
Student Problem

Fill up information

Store information

Form Record book

Record schedule

File cabinet
25

Requirements Documentation

FUNCTIONAL DECOMPOSITION
26

FUNCTIONAL DECOMPOSITION
27

FUNCTIONAL DECOMPOSITION
28
ENTITY RELATIONSHIP DIAGRAM
29

Implementation Plan (TABLE)

PERSONS
STRATEGY ACTIVITIES DURATION
INVOLVE
Hands on Training Guidance Counselor
Orientation & Training 3 Days
Lectures OSFAD
General Assembly Guidance Counselor
Poster OSFAD
Promotion of the project 1 Week
Official Facebook page po
PLMAR PLMar Admin

Implementation of Web- Researcher


Base Appointment for Proper turnover of the
Guidance Consultation and website to the guidance 5 hours
Guidance Counselor
Counseling for Pamantasan office and OSFAD
ng Lungsod ng Marikina
OSFAD
Chapter 5

RECOMENDATION
This will help the future researcher to enrich their understanding and gather some

knowledge about Web-Based Appointment for Guidance Consultation and Counseling for

Pamantasan ng Lungsod ng Marikina. Hence this will be a guide for them to continue the

study of this proposed system/project.

1. Responsive interface – This can be applicable to any mobile devices that are currently

using by many of us. To be more capable when it comes on using mobile and desktop

device.

2. Page content – Contains news and other extra-curricular activities provided by the

Guidance Office.

3. Interface Enhancement – The resolution of the picture must be fit in the web browser

and the articles should be readable and understandable.

4. Design Enhancement – To look presentable and having a intention of improving

human experience.

5. Security enhancement -Websites are vulnerable in every attack so we recommend to

the future researcher to improve its security.


APPENDICES
TRANSCRIPT OF INTERVIEW

Question: Is there any kind of recent project proposal before ours? Is there any problem

occur while the recent project proposal is being develop? What it is?

Response: It was done by some students and that’s alright for us. But there’s a main

problem when it comes to statistical analysis and I said that if can they do the computation

using the formula attached to statistical analysis, but each item must be classified to know

the outcome or result and how it falls to one category to eliminate the assortment of results

unless the result will be separate. We want to know the ratings of all the first-year students

on each item, because its uses manual frequency computation and the previous group

stopped on that part but nonetheless everything was fine. But it was insufficient because

we need to save papers, so we put some guidance data that is included in student profile.

Question: Have you encounter any problem when performing consultation and

counseling?

Response: No problem at all and those records has 5 years handled by the Guidance office

or existence. We seldom use this because at the first place it was assorted and hassle to

locate, unlike the computerized process, few clicks, and it will appear and that’s the

advantage of having a systematic process. There’s a file but it takes a lot of time to locate

and you can’t appreciate the way of storing of information.


Current Documentation
Data Gathering
35

Figure 4.2 Context Diagram


Figure 4.3 Level 1 DFD
37
36
Figure 4.4 Level 2 DFD
Figure 4.4 Level 2 DFD
38
GANNT CHART
USER MANUAL
FEED FUNCTION
- You can give suggestions and concerns regarding to the webpage and experienced
performance by the student.
LOGIN
- You can log in as student if you are registered
- You can easily login as an administrator and monitor the transaction
SIGNUP
- You need to fill up everything inside this form then attach ID picture to easily validate
and approve the account by the admin.
MY PROFILE ADMIN
- In this form, admin can update all of their information
YEARLY STATISTICS
- Admin can monitor statistics yearly
MONTHLY STATISTICS
- Admin can monitor statistics monthly
ADMIN CALENDAR
- Admin can monitor and at the same time it can approve and cancel appointment
STUDENT ACCOUNT
- Admin can easily know approved accounts
STUDENT PENDING ACCOUNT
- Admin can validate the pending accounts if it is legitimate or not
ADMIN APPOINTMENT LIST
- Admin can approve or cancel their appointment and admin can give a remark after the
consultation.
ADMIN FEEDBACK
- Admin can approve relevant feedbacks and decline unimportant feedback
REMINDERS FOR STUDENT
- Shows instruction and responsibilities of using the system as a student
STUDENT PANEL
- Shows the time and date availability
DATE APPOINTMENT
- Shows the date
TIME APPOINTMENT
- Shows the time
STUDENT APPOINTMENT LIST
- After the student choose the date and time, you must wait for admin validation
STUDENT APPROVED APPOINTMENT
- After the admin validates the request appointment, it will notify to your e-mail and it
will turn to green which means approved.
STUDENT APPROVED APPOINTMENT LIST
- After the admin validates the request appointment, it will notify to your e-mail and it
will turn to green which means approved.
CURRICULUM VITAE
C U R R I C U L U M V I T A E

RYAN D. CADAWAS
Address : #26 P.Paterno St. Parang Marikina City
Contact : 09358074141
E-mail : ryan.cadawas@gmail.com

OBJECTIVE:

A hard working, passionate and dependable individual who seeks to work/associate with an
organization who values human resources, strong customer service, and communication skills and gives
opportunity to enhance myself technically, professionally and personally as a more productive working
student.

PERSONAL INFORMATION:
Nationality : Filipino
Gender : Male
Date of Birth : Feb. 24, 1991
Age : 27 Years
Civil Status : Single

SPECIAL SKILLS:
 Software : MS (Word/Power Point/Excel).
 Languages : English and Filipino (Speaking/Reading/Writing).
 Interpersonal : Excellent communicator, great listening skills, creative, hardworking, friendly,
motivated, patient, respectful, multi-tasking and Cooperative.

EDUCATIONAL QUALIFICATION:

 University : Pamantasan ng Lungsod ng Marikina


Period 2015 up to Present

CHARACTER REFERENCE:
 EZRA JOY CELINO : Web Developer (09176297328)

RYAN D. CADAWAS
I hereby certify that above information are true and correct.
C U R R I C U L U M V I T A E

ARON JAMES M. DELOS REYES


Address : Jocson st. Purok 1 Malanday Marikina City
Contact : 09297697499 / 9196020
E-mail : delrosariojonas05@yahoo.com

OBJECTIVE:

A hard working, passionate and dependable individual who seeks to work/associate with an
organization who values human resources, strong customer service, and communication skills and gives
opportunity to enhance myself technically, professionally and personally as a more productive working
student.

PERSONAL INFORMATION:
Nationality : Filipino
Gender : Male
Date of Birth : July 27, 1999
Age : 19 Years
Civil Status : Single

SPECIAL SKILLS:
 Software : MS (Word/Power Point/Excel).
 Languages : English and Filipino (Speaking/Reading/Writing).
 Interpersonal : Excellent communicator, great listening skills, creative, hardworking, friendly,
motivated, patient, respectful, multi-tasking and Cooperative.

EDUCATIONAL QUALIFICATION:

 University : Pamantasan ng Lungsod ng Marikina


Period 2015 up to Present

 Secondary School : Sta.Elena High School


Period 2011-2015

 Primary School : Malanday Elementary School


Period 2005-2011

CHARACTER REFERENCE:
 DARIO MALAZO : Computer Engineer (09176297328)

ARON JAMES M. DELOS REYES

I hereby certify that above information are true and correct.


C U R R I C U L U M V I T A E

JONAS C. DELROSARIO
Address : #29 1st.St Sto.Niño, Paliparan Marikina City
Contact : 09297697499 / 9196020
E-mail : delrosariojonas05@yahoo.com

OBJECTIVE:

A hard working, passionate and dependable individual who seeks to work/associate with an
organization who values human resources, strong customer service, and communication skills and gives
opportunity to enhance myself technically, professionally and personally as a more productive working
student.

PERSONAL INFORMATION:
Nationality : Filipino
Gender : Male
Date of Birth : July 5, 1998
Age : 19 Years
Civil Status : Single

SPECIAL SKILLS:
 Software : MS (Word/Power Point/Excel).
 Languages : English and Filipino (Speaking/Reading/Writing).
 Interpersonal : Excellent communicator, great listening skills, creative, hardworking, friendly,
motivated, patient, respectful, multi-tasking and Cooperative.

EDUCATIONAL QUALIFICATION:

 University : Pamantasan ng Lungsod ng Marikina


Period 2015 up to Present

 Secondary School : Sto.Niño National High School


Period 2011-2015

 Primary School : Sto. Nino Elementary School


Period 2005-2011

CHARACTER REFERENCE:
 REYNALDO : Chem. Engineer (09176297328)
DELROSARIO
 RENEE VALENTIN : Teacher (09328902433)
AUSTRIA
 MARNELLE TATAD : Nurse (09206713342)

JONAS C. DELROSARIO
I hereby certify that above information are true and correct.
C U R R I C U L U M V I T A E

JERIC B. ZABALA
Address # 2C Banahaw St. Marikina Village Nangka Marikina City
Contact : 09297697499 / 9196020
E-mail : delrosariojonas05@yahoo.com

OBJECTIVE:

A hard working, passionate and dependable individual who seeks to work/associate with an
organization who values human resources, strong customer service, and communication skills and gives
opportunity to enhance myself technically, professionally and personally as a more productive working
student.

PERSONAL INFORMATION:
Nationality : Filipino
Gender : Male
Date of Birth : April 3, 1993
Age : 25 Years
Civil Status : Single

SPECIAL SKILLS:
 Software : MS (Word/Power Point/Excel).
 Languages : English and Filipino (Speaking/Reading/Writing).
 Interpersonal : Excellent communicator, great listening skills, creative, hardworking, friendly,
motivated, patient, respectful, multi-tasking and Cooperative.

EDUCATIONAL QUALIFICATION:

 University : Pamantasan ng Lungsod ng Marikina


Period 2015 up to Present

 Secondary School : Sto.Niño National High School


Period 2011-2015

 Primary School : Sto. Nino Elementary School


Period 2005-2011

CHARACTER REFERENCE:
 Lolita Baniel : Housewife (09176297328)

JERIC B. ZABALA
I hereby certify that above information are true and correct.
FINAL SCREEN LAYOUT
HOMEPAGE

ABOUT US
FEEDBACK SECTION
LOGIN

STUDENT PROFILE
ADMIN CALENDAR
SIGN UP
ADMIN APPOINTMENT LIST
FEEDBACK ADMIN
VALIDATION FORM
STUDENT PANEL
ADMIN PROFILE
DASHBOARD
STUDENT APPOINTMENT LIST
Screen Input and Output
REGISTER
SUBMITED
PENDING ACCOUNTS
VALIDATE ACCOUNT
STUDENT ACCOUNT LIST
FEEDBACK PORTION
FEEDBACK SUBMITTED
PENDING FEEDBACK
FEEDBACK APPROVED
SET APPOINTMENT
CHOOSE SPECIFIC TIME AND DATE
STUDENT PENDING APPOINTMENT LIST
STUDENT CALENDAR
APPOINTMENT APPROVAL

Are you sure you want to


approve this appointment?
ADMIN APPOINTMENT LIST
ADMIN ACCOUNT LIST
RELEVANT SOURCE CODE
Appoinment

<section id="container" >


<!--header start-->
<?php include '../helpers/header.php'; ?>
<!--header end-->
<?php include '../helpers/sidebar.php'; ?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">

<header class="panel-heading">Apointment list</header>


<section class="panel">
<div class="panel-body">
<div class="adv-table">
<table class="display table table-bordered table-striped dynamic-table"
id="appointmentId">
<thead>

<tr>
<th width="15%">Student number</th>
<th width="20%">Name</th>
<th width="20%">Date</th>
<th width="20%">Observation</th>
<th width="10%">Status</th>
<th width="10%"></th>
</tr>
</thead>
<tbody>

<?php
$select = mysqli_query($db,"SELECT A.ap_id as 'apid', A.u_id as 'uid', A.ap_start as
'date',
A.ap_status as 'status', A.ap_description as 'observation',
U.u_firstname as 'firstname', U.u_lastname as 'lastname',
U.y_id as 'year', CRS.crs_code as 'course', U.s_id as 'semester',
U.u_studentnumber as 'studno', SEC.sec_name as 'section'
FROM appointment as A
INNER JOIN user AS U
ON A.u_id = U.u_id
INNER JOIN course AS CRS
ON U.crs_id = CRS.crs_id
INNER JOIN section AS SEC
ON U.sec_id = SEC.sec_id
WHERE A.ap_status >= 0");
while($select_row = mysqli_fetch_array($select))
{
?>
<tr>
<td><?php echo $select_row['studno']; ?></td>
<td>
<?php
$sem = 0;
switch($select_row['year']){
case 1:
$sem = $select_row['semester'];
break;
case 2:
$sem = 2+$select_row['semester'];
break;
case 3:
$sem = 4+$select_row['semester'];
break;
case 4:
$sem = 6+$select_row['semester'];
break;
default:
$sem;
}

echo $select_row['firstname'].' '.$select_row['lastname'].' ( '.$select_row['year'].


$select_row['course'].$sem.'-'.$select_row['section'].' )'; ?>
</td>
<td><?php echo date("F d, Y h:i:s a", strtotime($select_row['date'])); ?>
<td><?php echo $select_row['observation']; ?>
</td>
<?php
if($select_row['status'] == 0){
?>
<td><span class='label label-warning'>Pending</span> </td>
<td><a onclick="btn_approve(<?php echo $select_row['apid'] ?>)"
class="btn-sm btn-warning" title="Approve appointment" ><i class="fa fa-check"></i></a>
<a onclick="btn_disapprove(<?php echo $select_row['apid'] ?>)"
class="btn-sm btn-danger" title="Disapprove appointment"><i class="fa fa-times"></i></a></td>
<?php
}
elseif($select_row['status'] == 1)
{

?>
<td><span class='label label-success'>Approved</span> </td>
<td><a onclick="btn_update(<?php echo $select_row['apid'] ?>)" class="btn-
sm btn-success" title="Update appointment" ><i class="fa fa-check"></i></a> <a
onclick="btn_cancel(<?php echo $select_row['apid'] ?>)" class="btn-sm btn-danger" ><i class="fa
fa-ban"></i></a></td>
<?php
}
else{
?>
<td><span class='label label-primary'>Done</span> </td>
<td><a href="javascript:void(0)" class="btn-sm btn-default" title="Done
appointment" ><i class="fa fa-check"></i></a> <a href="javascript:void(0)" class="btn-sm btn-
default"><i class="fa fa-times"></i></a></td>
<?php
}
?>
</td>

</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</section>

<div class="modal fade in" id="upDateAppointmentModal" tabindex="-1"


role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
hidden="true">×</button>
<h4 class="modal-title">Update Appointment</h4>
</div>
<div class="modal-body">
<div class="approveContent">
</div>
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default"
type="button">Close</button>
<button class="btn btn-primary" id="btn_update_appointment"
type="button"> Save</button>
</div>
</div>
</div>
</div>

</section>
</section>
<div class="right-sidebar">
<div class="search-row">
<input type="text" placeholder="Search" class="form-control">
</div>
<div class="right-stat-bar">
<ul class="right-side-accordion">
<li class="widget-collapsible">
<a href="#" class="head widget-head red-bg active clearfix">
</a>
<ul class="widget-container">
<li>
<div class="prog-row side-mini-stat clearfix">
<div class="side-mini-graph">
<div class="target-sell">
</div>
</div>
</div>
</li>
</ul>
</li>

</ul>
</div>
</div>
<!--right sidebar end-->
</section>
<?php include '../helpers/scripts.php'; ?>
<?php include '../js/admin/js_appointment.js'; ?>

Update Appointment

<?php

include '../php/dbconnection.php';

?>

<div>
<input id="AppId" type="hidden" value="<?php echo $_GET['id']?>" name="" >
<textarea class="form-control" style="resize: none; color: #000" cols="5" rows="5"
id="AppObservation" placeholder="Write status (optional)"></textarea>
</div>
Feedback

<section id="container" >


<!--header start-->
<?php include '../helpers/header.php'; ?>
<!--header end-->
<?php include '../helpers/sidebar.php'; ?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">

<header class="panel-heading">Feedback list</header>


<section class="panel">
<div class="panel-body">
<div class="adv-table">
<table class="display table table-bordered table-striped dynamic-table" id="">
<thead>

<tr>
<th width="20%">Name</th>
<th width="20%">Email</th>
<th width="20%">Message</th>
<th width="20%">Date</th>
<th width="10%">Status</th>
<th width="10%"></th>
</tr>
</thead>
<tbody>

<?php
$select = mysqli_query($db,"SELECT * FROM comment WHERE c_status != 2");
while($select_row = mysqli_fetch_array($select))
{
?>
<tr>
<td><?php echo $select_row['c_name']; ?></td>
<td><?php echo $select_row['c_email']; ?></td>
<td><?php echo $select_row['c_message']; ?></td>
<td><?php echo date("F d, Y h:i:s a", strtotime($select_row['c_date'])); ?>
</td>
<?php
if($select_row['c_status'] == 0){
?>
<td><span class='label label-warning'>Pending</span> </td>
<td><a onclick="btn_readFeedback(<?php echo $select_row['c_id'] ?>)"
class="btn-sm btn-warning" title="Read Feedback" ><i class="fa fa-check"></i></a>
<a href="javascript:void(0)" onclick="btn_removeFeedback(<?php echo
$select_row['c_id'] ?>)" class="btn-sm btn-danger" title="Remove Feedback"><i class="fa fa-
times"></i></a></td>
<?php
}
else{
?>
<td><span class='label label-primary'>Read</span> </td>
<td><a href="javascript:void(0)" class="btn-sm btn-default" title="Read" ><i
class="fa fa-check"></i></a> <a href="javascript:void(0)" onclick="btn_removeFeedback(<?php
echo $select_row['c_id'] ?>)" class="btn-sm btn-danger" title="Remove appointment"><i class="fa
fa-times"></i></a></td>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</section>

</section>
</section>
<div class="right-sidebar">
<div class="search-row">
<input type="text" placeholder="Search" class="form-control">
</div>
<div class="right-stat-bar">
<ul class="right-side-accordion">
<li class="widget-collapsible">
<a href="#" class="head widget-head red-bg active clearfix">
</a>
<ul class="widget-container">
<li>
<div class="prog-row side-mini-stat clearfix">
<div class="side-mini-graph">
<div class="target-sell">
</div>
</div>
</div>

</li>
</ul>
</li>

</ul>
</div>
</div>
<!--right sidebar end-->
</section>
<?php include '../helpers/scripts.php'; ?>
<?php include '../js/admin/js_feedback.js'; ?>

Admin Function

<?php

include '../dbconnection.php';

date_default_timezone_set("Asia/Manila");

$action = $_POST['Action'];

if($action == 'PendingAccount')
{
$pendingAccount = array();

$select = mysqli_query($db,"SELECT U.u_id as 'u_id', U.u_studentnumber as 'studno',


U.u_firstname as 'firstname', U.u_lastname as ' lastname',
U.u_mobile as 'mobile', U.u_email as 'email', U.u_address as 'address', U.u_profile as '
profile',A.a_type as 'type', A.a_status as 'status',
A.a_date_register as 'dateregister',
A.a_date_approve as 'dateapprove'
FROM user AS U
INNER JOIN account AS A
ON U.u_id = A.u_id
WHERE A.a_status = 0");
while($select_row = mysqli_fetch_array($select))
{
$pendingAccountObject = array();

$pendingAccountObject['studno'] = $select_row['studno'];
$pendingAccountObject['name'] = $select_row['firstname'].' '.$select_row['lastname'];
$pendingAccountObject['mobile'] = $select_row['mobile'];
$pendingAccountObject['dateregister'] = $select_row['dateregister'];
$pendingAccountObject['action'] = '<a href="javascript:void(0)"
onclick="btn_approve('.$select_row['u_id'].')" class="btn-sm btn-primary"><i class="fa fa-
check"></i></a> <a href="javascript:void(0)" onclick="btn_decline('.$select_row['u_id'].')"
class="btn-sm btn-danger"><i class="fa fa-times"></i></a>';
array_push($pendingAccount, $pendingAccountObject);
}
echo json_encode($pendingAccount);
}

if($action == 'ApproveAccount')
{

date_default_timezone_set("Asia/Manila");
$date = date("Y-m-d H:i:s");

$Id = $_POST['Id'];

$select_account = mysqli_query($db,"SELECT COUNT(*) as 'allstudent'


FROM user AS U
INNER JOIN account as A
ON U.u_id = A.u_id
WHERE A.a_status = 1");
$row_count = mysqli_fetch_array($select_account);

$select_account_reg = mysqli_query($db,"SELECT u_reg_school, u_regular FROM user WHERE


u_id = '$Id'");
if($row = mysqli_fetch_array($select_account_reg))
{
$ab = 'A';
if($row['u_regular'] == 'No')
{
$ab = 'B';
}

$stuNo = "PM-".substr($row['u_reg_school'], 2)."-".sprintf('%05d',$row_count['allstudent'])."-".


$ab;

$update_user = "UPDATE user SET u_studentnumber = '$stuNo' WHERE u_id = '$Id'";


if(mysqli_query($db,$update_user))
{
$approve_account = "UPDATE account SET a_date_approve = '$date', a_status = 1
WHERE u_id = '$Id'";
if(mysqli_query($db,$approve_account))
{
echo "0";
}
else
{
echo "U :Error occurred while sending the data";
}
}
else
{
echo "U :Error occurred while sending the data";
}

if($action == 'DeclineAccount')
{
$Id = $_POST['Id'];

$approve_account = "UPDATE account SET a_status = 2 WHERE u_id = '$Id'";


if(mysqli_query($db,$approve_account))
{
echo "0";
}
else
{
echo "U :Error occurred while sending the data";
}
}

if($action == 'ApproveAppointment')
{
$Id = $_POST['Id'];

$select = mysqli_query($db,"SELECT A.ap_start AS 'apDate', U.u_firstname AS 'name' ,


U.u_email AS 'email'
FROM appointment AS A
INNER JOIN user AS U
ON A.u_id = U.u_id
WHERE A.ap_id = '$Id'");
$select_row = mysqli_fetch_array($select);

$name = $select_row['name'];
$apDate = date("F d, Y h:i:s a", strtotime($select_row['apDate']));
$email = $select_row['email'];

try
{
$mailto = $email;
$mailSub = "Appointment Status";
$message = '<p>Dear <b>'.$name.'</b>,</p>';
$message .= 'Congratulations! Your appointment on <b>'.$apDate.' </b> has been approved.';
$message .= '<br><br>';
$message .= 'Please come on time. Thank you.';
$message .= '<br><br><br><br>';
$message .= 'Sincerely,';
$message .= '<br><br>';
$message .= 'Pamantasan ng Lungsod ng Marikina - Guidance Office';
require 'PHPMailer-master/PHPMailerAutoload.php';
$mail = new PHPMailer(true);
$mail ->IsSmtp();
$mail ->SMTPDebug = 0;
$mail ->SMTPAuth = true;
$mail ->SMTPSecure = 'ssl';
$mail ->Host = "smtp.gmail.com";
$mail ->Port = 465; // or 587
$mail ->IsHTML(true);
$mail ->Username = "plmarguidance@gmail.com";
$mail ->Password = "plmarpassword";
$mail ->SetFrom("plmarguidance@gmail.com");
$mail ->Subject = $mailSub;
$mail ->Body = $message;
$mail ->AddAddress($mailto);
if(!$mail->Send())
{
echo "Email Not Sent";
}
else
{
$apporove_appointment = "UPDATE appointment SET ap_status = '1' WHERE ap_id
= '$Id'";
if(mysqli_query($db,$apporove_appointment))
{
echo "0";
}
else
{
echo "D : Error occurred while sending the data";
}
}

}
catch(Exception $e)
{
echo $e->errorMessage();
}

if($action == 'UpdateAppointment')
{
// Select name
//email create
//email send
// if send to below

$AppId = $_POST['AppId'];
$AppObservation = $_POST['AppObservation'];

$update_appointment = "UPDATE appointment SET ap_status = '2', ap_description =


'$AppObservation' WHERE ap_id = '$AppId'";
if(mysqli_query($db,$update_appointment))
{
echo "0";
}
else
{
echo "U : Error occurred while sending the data";
}
}

if($action == 'DisapproveAppointment')
{

$Id = $_POST['Id'];

$select = mysqli_query($db,"SELECT A.ap_start AS 'apDate', U.u_firstname AS 'name' ,


U.u_email AS 'email'
FROM appointment AS A
INNER JOIN user AS U
ON A.u_id = U.u_id
WHERE A.ap_id = '$Id'");
$select_row = mysqli_fetch_array($select);
$name = $select_row['name'];
$apDate = date("F d, Y h:i:s a", strtotime($select_row['apDate']));
$email = $select_row['email'];

try
{
$mailto = $email;
$mailSub = "Appointment Status";
$message = '<p>Dear <b>'.$name.'</b>,</p>';
$message .= 'Sorry, your appointment on <b>'.$apDate.' </b> has been <b>disapproved.
</b>.';
$message .= '<br><br>';
$message .= 'Please create your appointment again. Thank you.';
$message .= '<br><br><br><br>';
$message .= 'Sincerely,';
$message .= '<br><br>';
$message .= 'Pamantasan ng Lungsod ng Marikina - Guidance Office';
require 'PHPMailer-master/PHPMailerAutoload.php';
$mail = new PHPMailer(true);
$mail ->IsSmtp();
$mail ->SMTPDebug = 0;
$mail ->SMTPAuth = true;
$mail ->SMTPSecure = 'ssl';
$mail ->Host = "smtp.gmail.com";
$mail ->Port = 465; // or 587
$mail ->IsHTML(true);
$mail ->Username = "plmarguidance@gmail.com";
$mail ->Password = "plmarpassword";
$mail ->SetFrom("plmarguidance@gmail.com");
$mail ->Subject = $mailSub;
$mail ->Body = $message;
$mail ->AddAddress($mailto);
if(!$mail->Send())
{
echo "Email Not Sent";
}
else
{
$disapprove_appointment = "UPDATE appointment SET ap_status = '-2' WHERE
ap_id = '$Id'";
if(mysqli_query($db,$disapprove_appointment))
{
echo "0";
}
else
{
echo "D : Error occurred while sending the data";
}
}

}
catch(Exception $e)
{
echo $e->errorMessage();
}

if($action == 'ReadFeedback')
{
$Id = $_POST['Id'];

$read_comment = "UPDATE comment SET c_status = '1' WHERE c_id = '$Id'";


if(mysqli_query($db,$read_comment))
{
echo "0";
}
else
{
echo "U : Error occurred while sending the data";
}
}

if($action == 'RemoveFeedback')
{
$Id = $_POST['Id'];

$remove_comment = "UPDATE comment SET c_status = '2' WHERE c_id = '$Id'";


if(mysqli_query($db,$remove_comment))
{
echo "0";
}
else
{
echo "U : Error occurred while sending the data";
}
}

if($action == "GetAppointments")
{
session_start();
$color = "";
$pendingAccount = array();

$removeDate = date('Y-m-d', strtotime('-1 day', strtotime(date('Y-m-d'))));

$select = mysqli_query($db,"SELECT ap_id, u_id, ap_start, ap_end, ap_description, ap_status


FROM appointment
WHERE DATE(ap_start) > '$removeDate'
AND ap_status > 0");
while($select_row = mysqli_fetch_array($select))
{

if($select_row['ap_start'] > date("Y-m-d h:i:s"))


{
$color = "#378006";
}
else
{
$color = "#EC6459";
}

$pendingAccountObject = array();

$pendingAccountObject['Id'] = $select_row['ap_id'];
$pendingAccountObject['UserId'] = $select_row['u_id'];
$pendingAccountObject['Title'] = $select_row['u_id'];
$pendingAccountObject['Start'] = $select_row['ap_start'];
$pendingAccountObject['End'] = $select_row['ap_end'];
$pendingAccountObject['Description'] = $select_row['ap_description'];
$pendingAccountObject['Status'] = $select_row['ap_status'];
$pendingAccountObject['Color'] = $color;
array_push($pendingAccount, $pendingAccountObject);
}
echo json_encode($pendingAccount);

if($action == "Admin_UpdateProfile")
{
session_start();
$AdminFirstname = $_POST['AdminFirstname'];
$AdminLastname = $_POST['AdminLastname'];
$AdminMobilenum = $_POST['AdminMobilenum'];
$AdminEmail = $_POST['AdminEmail'];
$AdminAddress = $_POST['AdminAddress'];

$select_email = mysqli_query($db,"SELECT u_email FROM user WHERE u_email


= '$AdminEmail' and u_id != ".$_SESSION['id']." ");
$select_email_row = mysqli_fetch_array($select_email);
if($select_email_row == false)
{
$update_admin_profie = "UPDATE user SET u_firstname =
'$AdminFirstname', u_lastname = '$AdminLastname', u_mobile = '$AdminMobilenum', u_email =
'$AdminEmail', u_address = '$AdminAddress' WHERE u_id = ".$_SESSION['id']." ";
if(mysqli_query($db,$update_admin_profie))
{
echo "0";
}
else
{
echo "U : Error occurred while sending the data";
}
}
else
{
echo "Email already exist!";
}
}

if($action == "CancelAppointment")
{
$Id = $_POST['Id'];

$select = mysqli_query($db,"SELECT A.ap_start AS 'apDate', U.u_firstname AS 'name' ,


U.u_email AS 'email'
FROM appointment AS A
INNER JOIN user AS U
ON A.u_id = U.u_id
WHERE A.ap_id = '$Id'");
$select_row = mysqli_fetch_array($select);

$name = $select_row['name'];
$apDate = date("F d, Y h:i:s a", strtotime($select_row['apDate']));
$email = $select_row['email'];

try
{
$mailto = $email;
$mailSub = "Appointment Status";
$message = '<p>Dear <b>'.$name.'</b>,</p>';
$message .= 'For emergency reasons, your appointment on <b>'.$apDate.' </b> has been
cancelled.';
$message .= '<br><br>';
$message .= 'Please create an appointment again. Thank you for understading.';
$message .= '<br><br><br><br>';
$message .= 'Sincerely,';
$message .= '<br><br>';
$message .= 'Pamantasan ng Lungsod ng Marikina - Guidance Office';
require 'PHPMailer-master/PHPMailerAutoload.php';
$mail = new PHPMailer(true);
$mail ->IsSmtp();
$mail ->SMTPDebug = 0;
$mail ->SMTPAuth = true;
$mail ->SMTPSecure = 'ssl';
$mail ->Host = "smtp.gmail.com";
$mail ->Port = 465; // or 587
$mail ->IsHTML(true);
$mail ->Username = "plmarguidance@gmail.com";
$mail ->Password = "plmarpassword";
$mail ->SetFrom("plmarguidance@gmail.com");
$mail ->Subject = $mailSub;
$mail ->Body = $message;
$mail ->AddAddress($mailto);
if(!$mail->Send())
{
echo "Email Not Sent";
}
else
{
$cancel_appointment = "UPDATE appointment SET ap_status = '-1' WHERE ap_id =
'$Id'";
if(mysqli_query($db,$cancel_appointment))
{
echo "0";
}
else
{
echo "D : Error occurred while sending the data";
}
}

}
catch(Exception $e)
{
echo $e->errorMessage();
}

?>

Landingpage Function

<?php

include '../dbconnection.php';

date_default_timezone_set("Asia/Manila");

$action = $_POST['Action'];

if($action == 'register_student')
{
$RegisterFirstname = $_POST['RegisterFirstname'];
$RegisterLastname = $_POST['RegisterLastname'];
$RegisterMobilenum = $_POST['RegisterMobilenum'];
$RegisterEmail = $_POST['RegisterEmail'];
$RegisterGender = $_POST['RegisterGender'];
$RegisterAddress = $_POST['RegisterAddress'];
$RegisterUsername = $_POST['RegisterUsername'];
$RegisterPassword = sha1($_POST['RegisterPassword']);
$RegisterCourse = $_POST['RegisterCourse'];
$RegisterYear = $_POST['RegisterYear'];
$RegisterSemester = $_POST['RegisterSemester'];
$RegisterRegular = $_POST['RegisterRegular'];
$RegisterSchooldate = $_POST['RegisterSchooldate'];
$RegisterSection = $_POST['RegisterSection'];

$name = $_FILES['file']['name'];
$temp_name = $_FILES['file']['tmp_name'];

if(!empty($name))
{
$ext = substr($name, strrpos($name, ".") + 1);
if($ext == 'jpg' || $ext == 'jpg'|| $ext == 'png' || $ext == 'gif')
{

$renameImage = Date('Ymdhs').$name;
$targetPath = "../../landingpage/assets/id/";
$targetPathFile = $targetPath.$renameImage;
if(move_uploaded_file($_FILES['file']['tmp_name'], $targetPathFile ))
{

$select_email = mysqli_query($db,"SELECT u_email


FROM user WHERE u_email = '$RegisterEmail'");
$select_email_row =
mysqli_fetch_array($select_email);
if($select_email_row == false)
{

$select_username =
mysqli_query($db,"SELECT a_username FROM account WHERE a_username =
'$RegisterUsername'");
$select_username_row =
mysqli_fetch_array($select_username);
if($select_username_row == false)
{
$register_user = "INSERT INTO user
(u_firstname, u_lastname, u_mobile, u_email, u_gender, u_address, u_profile, crs_id, y_id, s_id,
u_regular, u_reg_school, sec_id)
VALUES('$RegisterFirstname','$RegisterLastname','$RegisterMobilenum','$RegisterEmail','$Registe
rGender','$RegisterAddress','$renameImage','$RegisterCourse','$RegisterYear','$RegisterSemester','$
RegisterRegular','$RegisterSchooldate', '$RegisterSection')";
if(mysqli_query($db,$register_user))
{

$select_id =
mysqli_query($db,"SELECT u_id FROM user WHERE u_email = '$RegisterEmail'");
$select_id_row =
mysqli_fetch_array($select_id)['u_id'];

$insert_account = "INSERT
INTO account (u_id, a_username, a_password, a_type) VALUES('$select_id_row',
'$RegisterUsername', '$RegisterPassword', '2')";
if(mysqli_query($db,
$insert_account))
{
echo 0;
}
else
{
echo "Error occurred
while sending the data.";
}
}
else
{
echo "Error occurred while
sending the data.";
}
}
else
{
echo "Username already exist!";
}
}
else
{
echo "Email already exist!";
}

}
else
{
echo "Error occurred when uploading image";
}
}
else
{
echo "Please select image only in id picture.";
}
}
else
{
echo "Please select id picture!";
}
}

if($action == 'comment')
{

$Name = $_POST['Name'];
$Email = $_POST['Email'];
$Message = $_POST['Message'];

$insert_comment = "INSERT INTO comment (c_name, c_email, c_message)


VALUES('$Name', '$Email', '$Message')";
if(mysqli_query($db,$insert_comment))
{echo "0";}
else
{echo "Error occurred while sending the data.";}

if($action == 'login')
{
$LoginUsername = $_POST['LoginUsername'];
$LoginPassword = sha1($_POST['LoginPassword']);

$login = mysqli_query($db,
"SELECT U.u_id as 'u_id', U.u_studentnumber as 'studno', U.u_firstname as
'firstname', U.u_lastname as 'lastname',
U.u_mobile as 'mobile', U.u_email as 'email',
U.u_address as 'address', U.u_profile as 'profile',
A.a_type as 'type', A.a_status as 'status'
FROM user AS U
INNER JOIN account AS A
ON U.u_id = A.u_id
WHERE A.a_username = '$LoginUsername' and A.a_password =
'$LoginPassword'");
$login_row = mysqli_fetch_array($login);
if( $login_row == false)
{
echo "Account does not exist! Please check your username and password.";
}
else
{

if($login_row['status'] == 0)
{
echo "Account is not activated. Please wait the admin to confirm your
account.";
}

else if($login_row['status'] == 1)
{

session_start();
$_SESSION['id'] = $login_row['u_id'];
$_SESSION['studno'] = $login_row['studno'];
$_SESSION['firstname'] = $login_row['firstname'];
$_SESSION['lastname'] = $login_row['lastname'];
$_SESSION['mobile'] = $login_row['mobile'];
$_SESSION['email'] = $login_row['email'];
$_SESSION['address'] = $login_row['address'];
$_SESSION['profile'] = $login_row['profile'];
$_SESSION['type'] = $login_row['type'];

if ($login_row['type'] == 2)
{
echo "2";
}
else
{
echo "1";
}
}

else if($login_row['status'] == 2)
{
echo "Account was not approved by admin.";
}

?>

Student Function

<?php
include '../dbconnection.php';
date_default_timezone_set("Asia/Manila");
$action = $_POST['Action'];

if($action == "GetAppointments")
{
session_start();
$color = "";
$pendingAccount = array();

$removeDate = date('Y-m-d', strtotime('-1 day', strtotime(date('Y-m-d'))));

$select = mysqli_query($db,"SELECT ap_id, u_id, ap_start, ap_end, ap_description, ap_status


FROM appointment WHERE DATE(ap_start) > '$removeDate' and ap_status >= 0 ");
while($select_row = mysqli_fetch_array($select))
{

if($select_row['u_id'] == $_SESSION['id']){

if($select_row['ap_start'] > date("Y-m-d h:i:s"))


{
$color = "#378006";
}
else
{
$color = "#EC6459";
}
}else{
$color = "#A8A8A8";
}
$pendingAccountObject = array();

$pendingAccountObject['Id'] = $select_row['ap_id'];
$pendingAccountObject['UserId'] = $select_row['u_id'];
$pendingAccountObject['Title'] = $select_row['u_id'];
$pendingAccountObject['Start'] = $select_row['ap_start'];
$pendingAccountObject['End'] = $select_row['ap_end'];
$pendingAccountObject['Description'] = $select_row['ap_description'];
$pendingAccountObject['Status'] = $select_row['ap_status'];
$pendingAccountObject['Color'] = $color;
array_push($pendingAccount, $pendingAccountObject);
}
echo json_encode($pendingAccount);

if($action == "SaveAppointments")
{ session_start();

date_default_timezone_set("Asia/Manila");

$AppointmentID = $_POST['AppointmentID'];
$StudentID = $_POST['StudentID'];
$Start = $_POST['Start'];

$startDate = str_replace('/', '-', $Start );


$newStartDate = date("Y-m-d H:i", strtotime($startDate));

$nowStartDatefroExplode = date("Y-m-d", strtotime($startDate));


$nowExplode = explode ("-", $nowStartDatefroExplode);
$nowYear = $nowExplode[0];
$nowMonth = $nowExplode[1];

$replaceDate = str_replace('/', '-', $startDate );


$replaceDateVal = strtotime($replaceDate);
$addMinutes = date("Y-m-d H:i", strtotime('+15 minutes', $replaceDateVal));

$dateNowComp = date('Y-m-d H:i');


$dateAppComp = $newStartDate;

if($dateAppComp < $dateNowComp){


echo "Invalid date!";
}
else
{
$checkHour = date("H", strtotime($startDate));
$checkDay = date("l", strtotime($startDate));
if($checkHour < 8 || $checkHour >= 17 || $checkDay == 'Saturday' || $checkDay == 'Sunday')
{
echo "Sorry, You can only set an appointment during weekdays 8AM-5PM. Thankyou. ";
}
else
{

$appointments = mysqli_query($db,"SELECT COUNT(*) AS 'appointed'


FROM appointment
WHERE u_id = '$StudentID'
AND MONTH(ap_start) = '$nowMonth'
AND ap_status >= 0");
$appointments_row = mysqli_fetch_array($appointments);
if($appointments_row['appointed'] > 0 && $AppointmentID == 0)
{
echo "You already have an appointment! Try again next month.";
}

else
{
$check_existDate = mysqli_query($db,"SELECT COUNT(*) as 'existDate' FROM
appointment WHERE ap_start = '$newStartDate' AND ap_status >= 0");
$check_existDate_row = mysqli_fetch_array($check_existDate);
if($check_existDate_row['existDate'] > 0)
{
echo "The date is no longer available, Please choose another date.";
}
else
{
if($AppointmentID > 0)
{

$select_appointment = mysqli_query($db,"SELECT ap_status FROM appointment


WHERE ap_id = '$AppointmentID'");
$select_appointment_row = mysqli_fetch_array($select_appointment);
if($select_appointment_row['ap_status'] != 0)
{
echo "Sorry, This appointment is already approved.";
}
else
{
$update_appointment = "UPDATE appointment SET ap_start = '$newStartDate',
ap_end = '$addMinutes' WHERE ap_id = '$AppointmentID'";
if(mysqli_query($db,$update_appointment))
{
echo "0";
}
else
{
echo "U : Error occurred while sending data";
}
}
}
else
{
$insert_appointment = "INSERT INTO appointment (u_id, ap_start, ap_end)
VALUES('$StudentID', '$newStartDate', '$addMinutes')";
if(mysqli_query($db,$insert_appointment))
{
echo "0";
}
else
{
echo "I : Error occurred while sending data";
}
}
}

}
}
}

if($action == "DeleteAppointments")
{
date_default_timezone_set("Asia/Manila");
$Id = $_POST['Id'];

$select_appointment = mysqli_query($db,"SELECT ap_status FROM appointment WHERE


ap_id = '$Id'");
$select_appointment_row = mysqli_fetch_array($select_appointment);
if($select_appointment_row['ap_status'] != 0)
{
$select_date = mysqli_query($db,"SELECT DATE(ap_start) AS 'startDate' FROM
appointment WHERE ap_id = '$Id'");
$select_date_row = mysqli_fetch_array($select_date);

$startDate = str_replace('/', '-', $select_date_row['startDate']);


$dateNow = date('Y-m-d');

$startDateStr = strtotime($startDate);

$nowDate = strtotime($dateNow);
$datediff = $startDateStr - $nowDate;

$days = ($datediff / (60 * 60 * 24));

if($days <= 3)
{
echo "Sorry, This appointment is already approved. You cannot cancel 3 days before the
appointment";
}
else
{
$delete_appointment = "DELETE FROM appointment WHERE ap_id ='$Id'";
if(mysqli_query($db,$delete_appointment))
{
echo "0";
}
else
{
echo "D : Error occurred while sending the data";
}
}
}
else
{
$delete_appointment = "DELETE FROM appointment WHERE ap_id ='$Id'";
if(mysqli_query($db,$delete_appointment))
{
echo "0";
}
else
{
echo "D : Error occurred while sending the data";
}
}

if($action == "StudentCancelAppointment")
{
date_default_timezone_set("Asia/Manila");
$Id = $_POST['Id'];
$select_appointment = mysqli_query($db,"SELECT ap_status FROM appointment WHERE
ap_id = '$Id'");
$select_appointment_row = mysqli_fetch_array($select_appointment);
if($select_appointment_row['ap_status'] != 0)
{
$select_date = mysqli_query($db,"SELECT DATE(ap_start) AS 'startDate' FROM
appointment WHERE ap_id = '$Id'");
$select_date_row = mysqli_fetch_array($select_date);

$startDate = str_replace('/', '-', $select_date_row['startDate']);


$dateNow = date('Y-m-d');

$startDateStr = strtotime($startDate);

$nowDate = strtotime($dateNow);
$datediff = $startDateStr - $nowDate;

$days = ($datediff / (60 * 60 * 24));

if($days <= 3)
{
echo "Sorry, This appointment is already approved. You cannot cancel 3 days before the
appointment";
}
else
{
$delete_appointment = "DELETE FROM appointment WHERE ap_id ='$Id'";
if(mysqli_query($db,$delete_appointment))
{
echo "0";
}
else
{
echo "D : Error occurred while sending the data";
}
}
}
else
{
$delete_appointment = "DELETE FROM appointment WHERE ap_id ='$Id'";
if(mysqli_query($db,$delete_appointment))
{
echo "0";
}
else
{
echo "D : Error occurred while sending the data";
}
}

?>

You might also like