Professional Documents
Culture Documents
of Information Technology
In Partial Fulfillment
Subject of Capstone
Cadawas, Ryan
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
ACKNOWLEDGEMENTS
The researchers would like to express their deepest gratitude to the following who
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
Participation of Guidance Counselors in charge Ma’am Tess Gumabao, who provided all
To Ma’am Cherrylyn Cruz, who provided additional ideas and assistance to the
Calata, Engr. Dario Malazo and Ma’am Cherrylyn Cruz, for being the researcher
To their families, who gave their prayers, love, understanding, concern, advice and
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
Table of Contents
INTRODUCTION............................................................................................................................................1
Project Context.............................................................................................................................1
Purpose and Description.................................................................................................................3
Ojectives of the study..................................................................................................................... 4
Scope and Limitation.....................................................................................................................6
Related Literature.............................................................................................................................................8
Related Studies...........................................................................................................................10
Explanation................................................................................................................................12
Conclusion.................................................................................................................................12
TECHNICAL BACKGROUND....................................................................................................................13
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
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
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
The Pamantasan ng Lungsod ng Marikina (simply known as PLMar) is the first city
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
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.
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
This system aims to improve the Guidance office capability to serve better to every
Guidance Office – This system can help the guidance office to recognize by the
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.
Appointment
WEB-BASED APPOINTMENT FOR GUIDANCE CONSULTATION AND
COUNSELING FOR PAMANTASAN NG LUNGSOD NG MARIKINA 4
Moreover, the study aims the following specific objectives according to these
parameters.
A. System
Guidance Counselors
d) To secure their appointments without any conflicts and to get a fit schedule for the
e) To easily locate the information and account that has been recorded to the guidance
B. Security
a) To provide admin account that can operate different functions that is inside the
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
Marikina Counselor
b) To inform the Students about the basic web-based Appointment for Guidance
d) To properly turn over the Web-based Appointment for Guidance Consultation and
Counselling for PLMar will record only all students who has been
to five in the evening working hours while the schedules are plainly
and counselling. Along the process, recording of data will be made accurate
and reliable by validating its account provided by the system. Those account
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
Admin which is the Guidance Counselor surely for security purpose and the
student. Lastly the student account can perform comment using feedback
Limitation
limits its coverage for the Consultation and Counselling of Guidance office
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
relevant to this study. This section is divided into four parts: Foreign Literature, Local
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:
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
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
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
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
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 guest list names to the log book, difficulties in making reservations and
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
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
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
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
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
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
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
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
The table below shows the software specifications that are needed for development
of the system:
SOFTWARE DESCRIPTION
The operating system that will be
The table below show the hardware specification for the development of the
proposed system:
HARDWARE DESCRIPTION
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:
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
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.
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
system process.
Database. This is where all the data held in a computer, student and admin
information.
SQL. Domain specific language in programming used for managing data of every
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
organizational changes will take place. The Agile method ensures that value is organized
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
FISHBONE DIAGRAM
21
System Architecture
This diagram shows the interconnected from the request to the responses process
Student
Guidance
School
Assistance
Set an appointment
Guidance office
Student Problem
Fill up information
Store information
Record schedule
File cabinet
25
Requirements Documentation
FUNCTIONAL DECOMPOSITION
26
FUNCTIONAL DECOMPOSITION
27
FUNCTIONAL DECOMPOSITION
28
ENTITY RELATIONSHIP DIAGRAM
29
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
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
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
human experience.
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
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:
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
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:
CHARACTER REFERENCE:
DARIO MALAZO : Computer Engineer (09176297328)
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:
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:
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
<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;
}
?>
<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>
</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
<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();
$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'];
if($action == 'DeclineAccount')
{
$Id = $_POST['Id'];
if($action == 'ApproveAppointment')
{
$Id = $_POST['Id'];
$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'];
if($action == 'DisapproveAppointment')
{
$Id = $_POST['Id'];
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'];
if($action == 'RemoveFeedback')
{
$Id = $_POST['Id'];
if($action == "GetAppointments")
{
session_start();
$color = "";
$pendingAccount = array();
$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'];
if($action == "CancelAppointment")
{
$Id = $_POST['Id'];
$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_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'];
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();
if($select_row['u_id'] == $_SESSION['id']){
$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'];
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)
{
}
}
}
if($action == "DeleteAppointments")
{
date_default_timezone_set("Asia/Manila");
$Id = $_POST['Id'];
$startDateStr = strtotime($startDate);
$nowDate = strtotime($dateNow);
$datediff = $startDateStr - $nowDate;
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);
$startDateStr = strtotime($startDate);
$nowDate = strtotime($dateNow);
$datediff = $startDateStr - $nowDate;
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";
}
}
?>