Uploaded by Brandon Garcia

Minard Final Revised Manuscript

advertisement
THE DEVELOPMENT OF BARANGAY WEB-BASED POPULATION
MANAGEMENT WITH MAPPING SYSTEM FOR BARANGAY PAGRANGAYAN
This Capstone Project Presented to the Faculty of the
College Computer Studies
AMA Computer College - Santiago
In Partial Fulfillment of the Requirements of the Degree of
Bachelor of Science in Information Technology (BSIT)
By:
Minard J. Llagas
Jackielyn H. Cabuyadao
Veberly T. Regero
S.Y 2022-2023
APPROVAL SHEET
In partial fulfillment of the requirements for the degree Bachelor of
Science in Information Technology, this Capstone project entitled “The
Development of Barangay Web-based Population Management with
Mapping System for Barangay Pagrang-ayan”, has been prepared and
submitted, by Minard J. Llagas, Jackielyn H. Cabuyadao and Veberly T.
Regero who are hereby recommended for project presentation.
Sheryl Joy M. Raspado,CpE,MIT
Adviser
Approved by the Committee of Oral Examination on March 21, 2023 with the
grade of_____.
Gaynesty L. Molino,CpE
Chairman
Angela Elaine L. Jacinto,CpE
Panel Member
Keith Leonard Lontoc,CpE
Panel Member
Accepted as partial fulfilment of the course requirements of the degree in
Bachelor of Science in Information Technology.
Sheryl Joy M. Raspado,CpE,MIT
Academic Coordinator
March 21, 2023
ii
ACKNOWLEDGEMENT
This study would not have been feasible without the wonderful assistance
and support of several people. We are grateful to AMA Computer College Santiago City for supporting our development on the personal and professional
levels. We want to express our gratitude to Ms. Sheryl Joy M. Raspado in
particular for her guidance and support throughout the project. The technical
knowledge, information, and abilities that our professors shared with us and that
we employed in our research were also very helpful. We would like to express
our gratitude to Ms. Katherine Joy S. Tulabing, and Ms. Gaynesty L. Molino,for
their expert guidance. The
panelists' candid assessments, ideas, and
suggestions for improving the study were also immensely valued. We also
appreciate the ongoing support and inspiration from our family and friends. Last
but not least, we give thanks to the All-Powerful God for giving us the fortitude
and wisdom necessary to finish this job on time and with enthusiasm.
iii
Abstract
In the past few decades, technology has made significant progress,
transformed our lives and enabled us to keep pace with the changes. Information
systems store data in sophisticated ways, making it easier to retrieve information.
Such systems offer various advantages, such as improved decision-making,
cooperation, and productivity.
The aim of this study is to create a reliable, secure, efficient, user-friendly,
portable, and convenient web-based Population Management and Mapping
System for Barangays. The system can manage and produce reports on the
population statistics of a Barangay, including the number of residents, senior
citizens, children, pregnant women, and mortalities. The integrated mapping
feature allows users to find residents' physical addresses easily. The system can
also generate barangay clearance, indigency certificates, and residence
certificates.
To achieve the desired results, the system underwent various processes,
methodologies, and multiple testing. The researchers utilized a descriptive
technique to explain the present system's procedures and challenges.
Additionally, quantitative research methods such as surveys and interviews were
used to evaluate the current system's procedures and the newly developed
system. The System Development Life Cycle (SDLC) and Rapid Application
Development (RAD) approach were used to build the system.
The researchers used PHP for the core system, MySQL for the database,
Sublime Text for the development environment, Bootstrap for interface
responsiveness, and Adobe Photoshop for image processing. The system
underwent system testing, unit testing, integration testing, system testing, alpha
testing, beta testing, and acceptance testing to check its functionality.
Most of the respondents rated the system "Outstanding" based on its
dependability, portability, security, efficiency, convenience, user-friendliness,
functionality, accuracy, usability, and availability. This indicates that the system
achieved its intended purpose.
iv
Table of Contents
Title ....................................................................................................................................i
Approval Sheet ............................................................................................................ii
AcknowledgEment .....................................................................................................iii
Abstract ........................................................................................................................ iv
Table of Contents ........................................................................................................ v
List of Tables ............................................................................................................. viii
List of Appendices ...................................................................................................... ix
Definition of Terms ...................................................................................................... x
Chapter 1 ........................................................................................................................ 1
Project And Its Background ...................................................................................... 1
Project Contexts ......................................................................................................... 1
Purpose and Description ........................................................................................... 3
Statement of the problem.......................................................................................... 3
Objective of the Study ............................................................................................... 4
Significance of the Study........................................................................................... 6
Advantages: ........................................................................................................ 9
Disadvantages: ................................................................................................... 9
Chapter 2 ...................................................................................................................... 10
Related Literature ..................................................................................................... 10
Foreign Literature ................................................................................................. 10
Local Literature ..................................................................................................... 13
Related Studies ...................................................................................................... 104
Foreign Studies..................................................................................................... 14
Local Studies......................................................................................................... 15
Synthesis ................................................................................................................... 16
Technical background ............................................................................................. 17
Chapter 3 ...................................................................................................................... 19
Methodology, Results And Discussion ................................................................. 19
Research Design and Software Development..................................................... 19
v
System Architecture ................................................................................................. 21
Conceptual Design ................................................................................................... 22
Cost Benefit Analysis ............................................................................................... 25
Hardware Cost .................................................................................................. 27
Software Development Cost ........................................................................... 28
Operational Cost............................................................................................... 28
Utility Expenses ................................................................................................ 29
Training Cost ..................................................................................................... 30
Summary Cost .................................................................................................. 30
Requirement Analysis.............................................................................................. 31
Functional Decomposition Diagram ...................................................................... 32
Block Diagram........................................................................................................... 33
System Flow.............................................................................................................. 33
Development and Testing ....................................................................................... 38
Input and Output Reports and Analysis ................................................................ 40
Description of the Prototype ................................................................................... 41
Implementation plan................................................................................................. 42
Data Gathering Procedure ...................................................................................... 42
Frequency Scale............................................................................................... 43
Likert Scale........................................................................................................ 43
Result of the Survey......................................................................................... 44
Tabulated Result of the Preliminary Survey................................................. 44
Result of the Final Survey ............................................................................... 45
Analysis of the Result of the Study........................................................................ 46
Statistical Analysis ................................................................................................... 47
Result of the Final Survey ....................................................................................... 48
Evaluation of the Study ........................................................................................... 48
Tabulated Result of the Evaluation ....................................................................... 50
Chapter 4 ...................................................................................................................... 52
Summary of Findings, Conclusion and Recommendation................................. 52
Recommendations ........................................................................................... 57
vi
BIBLIOGRAPHY ....................................................................................................... 58
Appendices A .................................................................................................... 61
Relevant Source Codes .................................................................................. 61
Evaluation Tool ....................................................................................................... 129
Questionnaire A. Preliminary........................................................................ 129
Questionnaire B. Technical........................................................................... 130
Survey Reports ............................................................................................... 131
Tabulation ................................................................................................................ 131
Preliminary............................................................................................................... 131
Technical ................................................................................................................. 131
Documentation........................................................................................................ 132
Story board/Program manual ............................................................................... 133
Biographical Sketch ............................................................................................... 146
vii
LIST OF TABLES
Table 3.1: Software ...................................................................................................... 25
Table 3.2: Hardware .................................................................................................... 28
Table 3.3: Hardware Cost ........................................................................................... 27
Table 3.4: Software Development Cost .................................................................... 28
Table 3.5: System Cost ............................................................................................... 28
Table 3.6: Stationaries and Supplies ........................................................................ 29
Table 3.7: Utility Expenses ......................................................................................... 29
Table 3.8: Training Cost .............................................................................................. 30
Table 3.9: Summary Cost ........................................................................................... 30
Table 3.10: Likert Scale Conversion ......................................................................... 43
Table 3.11: Breakdown of respondent according to Gende .................................. 44
Table 3.12 Tabulated Result of the Preliminary Survey......................................... 44
Table 3.13: Likert Scale Conversion ......................................................................... 47
Table 3.14: Result of the Final Survey...................................................................... 48
Table 3.15 Result of the final Survey from the Likert Scale .................................. 50
viii
LIST OF APPENDICES
Bibliography ................................................................................................................ 58
Appendices A .............................................................................................................. 61
Relevant Source Codes .......................................................................................... 61
Evaluation Tool ......................................................................................................... 129
Questionnaire A. Preliminary................................................................................ 129
Questionnaire B. Technical................................................................................... 130
Survey Reports ......................................................................................................... 131
Tabulation ................................................................................................................ 131
Preliminary................................................................................................................... 131
Technical ..................................................................................................................... 131
Documentation............................................................................................................ 132
Story board/Program manual ............................................................................... 133
ix
Definition of Terms
Acceptance Testing. Testing procedure performed in the final stage intended to
guarantee that the intended functionalities are accomplished.
Administration. Capability of the system that allows the administrator to set-up
or do configuration of the system.
Administrator. Authorized personnel administering the developed system.
Alpha Testing. Testing procedure performed by the programmers to ensure
correct system functionalities.
Beta Testing. Testing procedure performed by the actual user of the developed
system.
Bootstrap. Used to allow the interfaces be responsive regardless on what
computing device use to access the system.
Cost Benefit Analysis (CBA). Computational process used by the researcher to
weight the benefits of the clients in the utilizations of the system over
relevant to the cost of investment.
Web Browser. Browser for the web. To access or open the developed system,
an application was required.
Data. Facts and data gathered for reference or study.
Database. An electronic storage system was required to maintain track of the
data acquired by the system.
Dashboard. Displays the created system's home page or primary interface.
Flowchart. A graphical depiction of the created system's process flow.
Hardware. The physical components needed to run the designed system.
x
Likert Scale. The statistical approach used by the researcher to evaluate the
performance of the constructed system.
Login. The process of logging into a developed system.
Map. A diagram or other visual depiction of the inhabitants' actual location or
address.
MySQL. The database that is used to store the developed system.
Password. To get access to the system, use a mix of letters, symbols, and
numbers.
PHP. The primary scripting or programming language utilized by the researcher
in the system's development.
Reports. Records or information on the barangay population that can be created
by the system.
Software. Applications used by the developer in the system's development and
implementation.
Statistics. Values displaying the current population counts or statistics for the
barangay.
Username. Personal information or data is required to gain access to the
system.
Print. Allows the user to produce and print barangay clearance, indigency
certificate, and residential certificate.
xi
CHAPTER I
Project and Its Background
This chapter contains and presents the project context, purposed and
description, objective of the study, significance of the study, scope and limitation
proposed system.
Project Contexts
The impact of technology extends to communication, learning, and
thinking, improving society and influencing daily interactions, as stated by Allen
(2019). A web-based system, defined by Aezion (n.d.), is an application accessed
through HTTP and can be referred to as "web-based" apps, which according to
Khamooshi, have advantages over desktop programs as they can be accessed
online without installation.
Ramon, Isabela, located in Southern Isabela with a land area of 13,517.23
hectares, is bounded by the Diadi River on the west and neighboring towns on
the north, east, and south. As of 2020, it is a second-class municipality with a
population of 56,523 people, with 13,040 residents distributed among 19
barangays. The expanding population in each barangay since 2020 has been a
concern for the local administration, prompting the Municipal Population Office to
1
encourage Barangay Captains to conduct an emergency census and
survey of the population.
To address the issue of expanding population in the barangay, the
Municipal Population Office directed the barangays to perform a yearly survey to
acquire current information on the population. However, the current technique for
managing population data and record-keeping is inefficient, unreliable, and
difficult to update, with no centralized database for managing population-related
data. This results in delays and difficulties in obtaining certifications of residency,
indigence, and clearance for residents.
To address these problems, researchers proposed the development of a
web-based population management and mapping system. The proposed system
will enhance the current processes in managing the barangay population record
by providing access to population-related data, allowing the generation of reports
related to the population record, and facilitating the generation of barangay
clearance, certificate of indigency, and certificate of residency. The system will
be accessible through web browsers via the internet, providing a centralized
database for managing population-related data, and enabling more efficient and
reliable data processing.
2
Purpose and Description
The proposed Barangay Web-based Population Management and
Mapping System aims to enhance and streamline the current system, reducing
the workload of those involved. It is being considered for deployment in response
to the expanding population in the Municipality of Pagrang-ayan Ramon, Isabela.
The implementation of the system will improve the current process of
conducting a demographic census of households in the barangay, and the
Municipality of Ramon will benefit from the system's prompt and effective
response to the Municipal Population Office's concerns regarding the increasing
number of houses and the expanding population in each barangay.
Statement Of The Problem
The study is entitled “Barangay Web-based Population Management with
Mapping System for Barangay Pagrang-ayan”. The main purposed of the study
is to developed a Barangay Population Management and Mapping website
which helps the barangay secretary and health worker in providing annual and
monthly updates on barangay population record. The study intends to enhance
generation and issuance of barangay clearance, certificate of indigency and
certificate of residency.
Specifically, this study aimed to answer the following questions:
1. What are the problems of the current system in managing barangay
population record and generation and issuance of barangay clearance,
certificate of indigency and certificate of residency?
3
2. What procedure or method needs to be established or developed to
improve the current system?
3. How will the
proposed system be designed, developed and
implemented?
4. How will the proposed system be effective in terms of reliability,
portability,
security,
efficiency,
convenience,
user-friendliness,
functionality, accuracy, usability and availability?
Objective of The Study
The main objective of the study is to design and develop a Barangay Webbased Population Management with Mapping System which can be access
anytime and anywhere allowing the system administrator / barangay captain and
barangay secretary to collect and save data relevant to the barangay population
record like number of houses and families in the barangay which will be used to
update the Municipality's population records.
The study also aims to develop a system that allows the barangay captain
and barangay secretary to generate and issue certificates of residency, certificate
of indigency, and barangay clearance and also allows the barangay health worker
to manage the records of parents and their children.
The study aims to provide detailed information on the barangay's
household demographics. The proposed system intends to provide accurate and
up-to-date data to better serve communities and empower local government
authorities to make data-driven decisions.
4
Specifically, the researchers aim to:
•
To real timely monitor or view the Barangay’s population record and
efficiently send update to the Municipality’s population records.
•
In order to provide secured and accessible anytime and anywhere
barangay population record through cloud storage.
•
To provide mapping system in terms of finding resident’s physical
address.
•
To provide report generation system regarding on barangay’s
population record.
•
To developed a system that efficiently and reliably generates
certificates of residency, certificate of indigency, and barangay
clearance.
•
To better serve residents by providing them less effort request
process of certificates of residency, certificate of indigency, and
barangay clearance.
•
To come up with a better decision by providing a data-driven,
trustworthy and complete data available.
•
To employ a web-based approach to allow accessibility anytime and
anywhere.
•
To provide a system that will lessen the possibility of mistakes and
contradictions in the recording of population-related data.
5
•
To encourage improved interaction and coordination among the
system's users, including the barangay captain, health worker,
secretary, and residents.
Significance of The Study
The Implementation of the Barangay Web-based Population Management
and Mapping System is significant to the following individual or organizations:
Municipal Population Office. The proposed system will provide updated
and accurate population record while also providing more efficient for decisionmaking, planning, budget allocation and other relevant activities.
Barangay Officials and Secretary. The proposed system will help the
barangay official and barangay secretary to easily manage and generate report
on the population record of the Barangay specifically the households and the
resident’s information. The barangay official and barangay secretary can also
easily identify the location of the households using the map projected by the
system. The system will reduce administrative work effort specifically in
generation and issuance of barangay clearance, certificate of indigency and
certificate of residency as the systems provides automatic generation of these
documents which could result to more productive and efficient barangay service.
Residents of the Barangay. Through the use of the proposed system, the
residents can smoothly request for barangay clearance, certificate of indigency
and certificate of residency.
6
Researchers. The study enhances the technical skills of the researchers in
programming and in conducting research study. The study also served as their
legacy as students at AMA Computer College Santiago Campus.
Future Researchers. The study served as basis or guide for future
researchers and programmers in developing related system or research. The
information available provides future researchers on what are the methods and
procedures applied in the developed system.
Scope and Limitation
The proposed system a web-based “Web-based Population Management
with Mapping System for Barangay “intends to eliminate the problems
encountered in using the current process of population record management and
generation of barangay certificates, application with a mapping system that is
being developed to solve population monitoring problems in Barangay Pagrangayan.
The scope of the proposed system includes the following:
1. The system will allow the administrator manage barangay population
records allowing to add, update, search and print residents, senior citizens,
children, pregnant and mortalities.
2. The system will allow the system administrator to generate reports and
generate and issue barangay clearance, certificate of indigency and
certificate of residence.
3. The system will allow the Barangay health worker to manage and
monitor the profile of the mother and her children.
7
4. The system will allow the Barangay health worker to generate and
manage report on the natality and mortality rate record in the barangay.
5. The system will allow the barangay secretary to manage the profile of
the residents and senior citizens record. Also, the system allows the
barangay secretary to generate reports and generate and issue barangay
clearance, certificate of indigency and certificate of residence.
6. The system will allow the resident to register and access or view the
dashboard of the system.
7. The system will also allow the system user to retrieved account
password.
8. The system will also provide a dashboard display to present quick
statistic records related to the barangay population records.
9. The system can be access using web browsers in different computing
device like desktop computer, tablets and phone regardless of brand or
manufacturer.
The limitation of this study includes the following:
1. The system is only intended on improving the current process of
managing the barangay population records and generation and issuance of
barangay clearance, certificate of indigency and certificate of residency. Other
barangay records are not included in the study.
2. The system cannot be utilized in the absence of internet connection.
3. The performance of the system rely on the hardware specification used
by the respondent and internet speed subscription.
8
Advantages:
•
The web-based approach can give reliable and real-time data on
population statistics.
•
By identifying homes, tracking migration, and monitoring mortality and
natality rates, the system can aid in the effective management of the
Barangay's population.
•
The system's mapping capability can help in finding the physical address
of houses and provides a visual presentation of the population
distribution in the Barangay.
•
The system is responsive, allowing it to be accessible via various devices
such as desktop computers, tablets, and phones.
•
System users may use the system as long as they have internet access,
allowing for remote access to critical information.
Disadvantages:
•
The system may need a large initial investment in terms of hardware,
software, and staff training.
•
The system may not be able to capture all population-related data, as
certain surveys such as APIS, FLEMMS, HECS, SOF, and HSDV are not
included in the system.
•
Although the system may be accessed through mobile phones, several of
the tables are not responsive, making the system difficult to use on smaller
displays.
9
CHAPTER II
related literature
This chapter focuses on the many studies and other literatures from
international and local scholars that are relevant to the project. It focuses on
numerous areas that will aid in the system's growth.
Foreign Literature
M. Alshalalda (2020) wrote about Thomas Malthus, a prominent early
philosopher who warned about population growth. Malthus, an English professor
specializing in demography and political economy, argued in his landmark work
An Essay on the Principle of Population that population grows geometrically while
food resources only grow arithmetically. This will eventually result in massive
famines that will kill millions of people as food production fails to meet the
demands of the population. Poverty is still widespread today, with 925 million
people experiencing hunger every day, according to the UN Food and Agriculture
Organization.
Ester Boserup, a well-known Danish and French economist, disagreed
with Malthus. While Malthus claimed that population growth is determined by
agricultural methods and food availability, Boserup contended that population
growth is determined by agricultural practices
10
Boserup believed that people under duress will always find ways to
enhance food production, whereas Malthus believed that when food supplies are
insufficient, the extra population will perish.
The study explores the impacts of population growth on poverty, violence,
extremism, and environmental
destruction. The aim is to gain a better
understanding of these issues, identify the factors that contribute to population
growth, and suggest policy solutions and community-based activities to address
the problem. The study used a quantitative technique to gather data from 177
countries from MicroCase's Global file. It is divided into three parts: literature
review, methodology, and results and analysis.
The UNECE (2020) defines the "population census" as an official operation
that occurs regularly to count the population in a country's territory, including
homeless people and nomadic tribes, and gather information on various
demographic and social characteristics. Reliable and comprehensive statistics on
population number, distribution, and composition are necessary to plan and
execute economic and social development strategies, administrative activities, or
scientific research. The population census is the primary source of these
fundamental benchmark figures. Census data can be used to create statistics for
various geographical units, from the entire country to small towns or city blocks.
The UNECE (2020) also defines the "housing census" as an official
procedure that counts and classifies all dwelling units in a country's borders,
including information on selected housing attributes. The "population and housing
census" generates interrelated information on the population and housing stock
11
simultaneously, providing data on the population, family, household, and housing
situation for local regions or population sub-groups. The census is often the only
source of such information and serves as the starting point for a country's
population estimate program. It also provides a reliable framework for creating
sample frames for many countries. The census should be the focal point of an
integrated
national
statistical
system
that
includes
surveys,
registers,
administrative files, and other methods of gathering information on a country's
population size and composition.
According to the United Nations (2020), effective administration of a
country's economic and social affairs is based on evidence-based decisionmaking. The generation of relevant, accurate, and timely information is critical to
that approach, as is the generation of comprehensive statistics for tiny areas and
small demographic groupings. The population and housing census collects,
processes, and disseminates such precise small-area information on population
and its composition, features, spatial distribution, and structure (families and
households). Censuses are done on a regular basis in the majority of nations
across the world, most typically every ten years.
1. According to the Planning and Statistics Authority (2022), the census plays
a critical role in providing a comprehensive and holistic view of society,
especially during complex and ongoing changes that cannot be identified
by other data collection methods. Compared to other statistical methods,
the census has various advantages, including the provision of detailed and
comprehensive data on the entire population, their demographic, social,
12
and economic characteristics at the most basic administrative or
geographical level, and related rates and indicators. It also offers data for
evaluating the population situation throughout the inter-census period and
tracking changes occurring in different administrative divisions. The
census provides information on the number, distribution, and attributes of
expatriates in Qatar, supplying a database for population and workforce
estimates. It aids in investigating social processes and contributes to the
development, monitoring, and evaluation of plans for the provision of
services required by Qatari society. Additionally, the census offers
necessary frameworks for obtaining samples for future field research, data
on housing units and their amenities, features associated with living
conditions, public and private sector buildings, legal status, and economic
activity. This data is essential for designing and using samples for various
surveys, enabling a precise assessment of various phenomena such as
fertility, mortality, and migration, which are used to calculate population
growth rates and post-census population estimates.
Local Literature
To provide information services to businesses or institutions, computer-based
information retrieval uses software. It is a powerful tool for societal and industrial
advancement. An information service enables the electronic access, retrieval,
and transmission of information, as stated by Imus et al. (2018).
In their 2018 study, Mary Jane C. Samonte and Renz Jirhel D. Bahia aimed
to develop an interactive visualization tool for the National Household Target
13
System for Poverty Reduction (NHTS-PR) or Household List of the Department
of Social Welfare and Development in the Philippines, which is used for EGovernment Data Analysis. The Household List system manages information by
identifying impoverished people's location and demographics. The study focused
on e-government, proposing a technology that government agencies could use to
visualize and present multimedia data about impoverished households in the
Philippines through an interactive web-based tool with filters, comparisons, and
report generation. The researchers effectively utilized the Household List data to
assist social protection programs and other government agencies in decisionmaking during the planning phase, including selecting recipients eligible for
poverty programs.
Foreign Studies
Choudhary et al. (2019) suggest that a census-based management
information system (CB-MIS) can enhance public health initiatives by providing
up-to-date information on the target population, which can aid in the proper
planning and execution of programs that aim to engage the entire population. CBMISs have been utilized for various public health purposes such as demographic
monitoring, disease surveillance, vaccine safety assessments, epidemiological
research, and clinical trials. To avoid plagiarism, one can rephrase the ideas
presented using different words and sentence structures while retaining the
original meaning.
The threat of population expansion is a serious environmental concern,
according to Alshalalda (2020). As the world's population grows, the demand for
14
fossil fuels such as gas, oil, and coal increases, leading to more carbon dioxide
emissions and contributing to global warming. The use of nonrenewable
resources will also rise, resulting in conflicts for future generations. Fertility rate,
birth rate, mortality rate, net migration, and other factors influence population
growth rates in different countries. Population growth has significant social,
economic, and political impacts, such as poverty, unemployment, and societal
problems. To better understand the issue, this study recommends policy
measures and grassroots remedies to alleviate the problem and employs
quantitative methodologies using data from 177 nations (Alshalalda, 2020).
Several studies have been conducted on the long-term relationship
between population growth and economic development. However, most of these
academic studies employed cross-section regression analysis, which posed a
significant methodological issue. The research on the link between per capita
income and population growth using cross-section regression analysis was prone
to heteroskedasticity, while time-series regression analysis faced a lack of
appropriate data sets. Adesete (2018) conducted research on the relationship
between population growth and economic development in seven Latin American
countries and found that there was no long-term relationship between population
growth and per capita GDP growth.
Local Studies
The study's goal, according to the Capstone guidance (2020), is to
guarantee that all records are maintained up to date and conveniently available
for verification, monitoring, and reference. The system will automate record-
15
keeping and give accurate reports as well as file management. Because it needs
authorization before anybody can access the data, the system assures that they
are secure and protected. In the event of a technical breakdown, backup data for
the files will also be made. The project's goal is to change the file management
approach and procedure to ensure that all records are comprehensive and up to
date. The system's adoption will have a substantial influence on both Barangay
residents and system administrators, as well as the Barangay itself.
According to Martinez (2018), the Computerized Barangay Information
System is appropriate for usage by barangay workers who have direct reporting
access to barangay residents' personal information. Departmental organizational
personnel that require this knowledge for their business unit may also profit from
it. The method offers an effective and efficient approach to barangay employees
and residents, allowing them to finish chores faster and with less workers. It will
also deliver information to residents depending on their profiles.
A computer-based profiling system is defined by Academia (2020) as a
complementary
network
of hardware
and software used by people or
organizations to acquire, filter, analyze, create, and distribute data. Profiling
systems are used to improve an organization's performance and efficiency.
Synthesis
The associated literature includes a wide range of issues, including
Malthus and Boserup's perspectives on population rise, the significance of census
data, and computer-based information systems for effective data administration.
It also examines the creation of an interactive web-based visualization tool for
16
poverty reduction projects, as well as the potential advantages of computer-based
profiling systems for improving organizational efficiency.
The project for Barangay Pagrang-ayan, on the other hand, aims to
develop a sophisticated computerized system that will improve population
management by determining the number of households, registering migrants,
monitoring mortality and natality rates, and mapping household locations for easy
identification. The goal is to solve current challenges such as survey delays and
ambiguous population numbers.
While the relevant literature contains useful material on population growth,
census data, and computer-based information systems, there is a vacuum in
practical applications customized to individual Barangays like Pagrang-ayan. The
project's objectives emphasize the need to solve the difficulties of ambiguous
population data and survey delays by establishing a sophisticated computerized
system tailored to the needs of the Barangay. This initiative seeks to fill a void by
implementing a viable solution to improve population control in the Barangay of
Pagrang-ayan.
Technical background
For the
“The
Development
of
barangay
web-based
population
management with mapping system for barangay Pagrang-ayan”, the hardware
specifications used in developing the proposed system is the laptop device 7th
Generation Intel® Core™ i3-7020U CPU @ 2.30GHz 2.30GHz,4.00 GB RAM,
64-bit operating system minimum requirements and 4th Generation Intel Core i7-
17
4510U 3.1GHz Intel HD Graphics Family 2.6GB Memory 8GB DDr4-Storage 1TB
15.5 HD Display the recommended requirements and the matter most are LAN,
personal computer, keyboard, mouse, and Video Card (optional).
The software used for the development of the system is sublime text editor,
Hostinger server, and MySQL for the database. The programming languages and
scripts used are PHP, Bootstrap, HTML, Javascript, Ajax, and CSS.
For network, the proposed system always needs an internet connection,
and the developer used a Web Hosting for the storage and Domain hosts for
connectivity, which provide domain names that allow clients to access the web
content.
18
CHAPTER III
Methodology, Results and Discussion
This chapter presents the methodologies that were used by the
researchers in conducting the study. Specifically, the following will be discussed:
(1) the research design; (2) programming; (3) the security and backup plan; (4)
the research gathering procedures; (5) the data analysis tools; (6) the methods
used in system development; (7) the methods used in system evaluation; (8) the
methods used in system implementation.
Research Design And Software Development
The researchers used the descriptive method in this study. It describes the
data gathered and the process regarding the development of the Barangay Webbased Population Management and Mapping System. The research method is a
fact-finding study with adequate and accurate interpretation of findings. The
descriptive method of research helps the researcher obtained information and
justification needed to fully understand the research in connection to the
development of the system for the Barangay.
During this phase, quantitative research methods such as surveys and
personal interviews are used to gather further information for development.
19
The researchers conducted a preliminary inquiry, commencement, or
inception study of the cost and requirement definition of the proposed system
method usage in designing testing, implementation, and maintenance using the
System Development Life Cycle (SDLC) Rapid Application Development (RAD).
Figure 3.1: Rapid Application Development Model (RAD)
Figure 3.1 shows the process that the researchers used in developing the
system. There are four phases which are the requirement planning phase, on
which the researcher have determined the requirements for creating the system,
the designing phase, which the researcher used to create the appropriate design
of the system, the construction phase, on which the researcher created the
functionalities of the system and cut—over the phase or the final phase, on which
the researcher used to handle data convert from the current process to the
proposed system full-testing and user training.
20
System Architecture
Cloud Storage
Services
Secretary
W ireless
Rou ter
Sw itch
Br gy. Captain / A dmin
Server
Residents
Da tabase
BHW
Figure 3.2: Project Framework
Figure 3.2 above shows the technical framework of the study. The system
is a Web-based Application System. The Barangay Captain served as the
administrator of the system. The BHW was one of the client users that also access
the system with limited functionality as compared to the administrator. The figure
shows that the secretary can access the system using a client computer or a
Tablet. The figure shows that resident can access the system and register to view
the system dashboard. The figure shows that the system can be accessed online
by different users via internet connection. The server computer was managed by
the Barangay Captain. The figure shows that the database of the system serves
as the repository of information about the residents of the barangay on cloud
storage ensuring the system was secured and accessible anytime and anywhere.
21
Conceptual Design
New born, Mother Child Record
A ll functionality of the System
A ll functionality of the System
New born, Mother Child Record
BHW
Ba rangay
Ca ptain
Reg ister, dashboard
Requ est Information
Reg ister, dashboard
Resident
Ret rieve Information
BPMMS
Cloud
St orage
Services
Pr ofile, Survey, Statistics, Map
Pr ofile, Survey, Statistics, Map
Secretary
Figure 3.3: Conceptual Framework
Figure 3.3 shows the conceptual design of the Barangay Web-based
Population Management and Mapping System (BPMMS). The system can be
accessed by different users using their desktop computers/mobile device. The
system is a Web-based Application with a Mapping system. There are three types
of users in the system that will handle the different functionality of the system.
These are the following:
1. The Barangay Captain. The Barangay Captain served as the administrator of
the system. The administrator has full control of the entire system. The following
is the functionality that will be handled by the Barangay Captain:
a. System Setup. Where he can update the database of the system.
22
b. User Management. This functionality allows the administrator to
assign users to the system. He can also delete the account of the user
if necessary.
c. Profile of the Residents. Where the current profile of the
constituents is inputted by the Secretary of the Barangay.
d. Mother and Child Profile. This function shows the information on the
monitoring of the mother and child in the Barangay.
e. Mapping. This function shows the location of the households using
the Map.
f. Statistics. This functionality shows the population of the residents
as expressed by the tabular and graphical analysis.
g. Reports. All reports are also accessed by the administrator of the
system. This function will show the different reports such as monthly
and yearly monitoring of the households.
2. The Barangay Health Worker. The following are the functionality handled by
the BHW:
a. Profile of the mother and child. This allows the BHW to monitor the
records of the mother and child in the Barangay.
b. Newborn. This allows the BHW to record the information about the
mother and the child and their condition before and after giving birth.
c. Reports. The reports handled by the BHW are the following: Natality and
Mortality Rate in the Barangay. This is being monitored every month and
year.
23
3. The Barangay Secretary. The Barangay Secretary handles the following
functionality in the system:
a. Profile of the Residents. Where the current profile of the constituents is
inputted by the Secretary of the Barangay.
b. Mapping. This function shows the location of the households using the
Map.
c. Statistics/Survey.
This functionality
consolidates the information
gathered during the census. It shows the population of the residents as
expressed by the tabular and graphical analysis.
d. Reports. All reports are also accessed by the administrator of the
system. This function will show the different reports such as monthly and
yearly monitoring of the households.
4. The fourth User of the system is the Barangay Residents. The Barangay
Residents handle the following functionality in the system:
a. Dashboard. Can edit the profile and see the map.
24
Cost Benefit Analysis
Table 3.1: Software
The following software was utilized by the project's developers. The specs
and description are provided below, along with a specific request.
Software
Specification
Description
Windows 10
1 Gigahertz (GHz) or faster 32-bit (x86) or
64-bit (x64) processor 2GB RAM (64-bit )
16 GB available hard disk space 20 GB
(64-bit) Direct X 9 graphics device with a
higher driver. It was designed to work with
today’s multi-core processor.
A primary operating system
used to develop the system and
the web.
Windows 10, capable. Can
display up to 1024 x 768 screen
resolution. 3.0 GB available disk space. 1
gigahertz (GHz) x 64-bit processor. And
the memory capacity, 1 GB RAM (31-bit);
2GB RAM (64-bit)
Use for the documentation of
this project.
XAMPP
It requires only one zip, or exe file to be
downloaded and run. It also comes in a
number of other modules, including
phpMyAdmin. The size of XAMPP to
windows x 32 bit-119 Mb.
XAMPP is a completely free,
easy
to
install
Apache
distribution
containing
MariaDB, PHP, and Perl. The
XAMPP open-source package
has been set up to be incredibly
easy to install and to use.
Visual
Basic
Studio 2019
1.8 GHz or faster 64-bit processor; Quadcore or better recommended. ARM
processors are not supported.
The proponents used this
software application to create
and code the system.
Microsoft
Word
Office
Minimum of 4 GB of RAM. Many factors
impact the
resources
used;
we
recommend 16 GB RAM for typical
professional solutions.
Windows 365: Minimum 2 vCPU and 8
GB RAM. 4 vCPU and 16 GB of RAM are
recommended.
Hard disk space: Minimum of 850 MB up
to 210 GB of available space, depending
on features installed; typical installations
require 20-50 GB of free space. We
25
recommend installing Windows and
Visual Studio on a solid-state drive (SSD)
to increase performance.
Video card that supports a minimum
display resolution of WXGA (1366 by
768); Visual Studio will work best at a
resolution of 1920 by 1080 or higher.
Google Chrome
64-bit, 32 bit
It is used for accessing the
World Wide Web and running
Web-based applications.
Table 3.2: Hardware
The hardware utilized by the developers to build the project was detailed
in the section below. Hardware refers to the actual components of a computer, as
opposed to the data it holds or acts on. It has been determined by the developers
that it will be used to justify the project.
This section demonstrates the technique for calculating all expenses
associated with the proposed system's implementation, such as software,
hardware, and labor. This also contrasted the cost of implementing such an
application to the advantages produced by the application and demonstrated the
values brought to a certain institution by the project's application.
COMPUTERS
SPECIFICATION
Acer Aspire A315-42
Processor
AMD Ryzen 5 3500U with
Radeon Vega Mobile Gfx
2.10 GHz
Operating System
Windows 10 64Bit
Memory
4 GB RAM
26
DESCRIPTION
Acer Aspire (stylized as Aspire or
ΛSPIRE) is a series of personal
computers by Acer Inc. aimed at
the casual household user or for
small business use. The Aspire
series covers both desktop
computers and laptops. Acer
developed the series to range
Display
(15.6”),Screen
1920x1080
Resolution
Graphic
RADEON
AMD
Storage
128 GB
Tablet
Samsung Galaxy Tab S6 Lite
10.4", 128GB WiFi Tablet
Angora
Blue
SMP610NZBEXAR - S Pen
Included
Vega
from
essentials
performance.
to
high
Graphics
This will be used during survey to
the residents by the Barangay
Secretary.
On this section, it shows the procedure for estimating all costs involved like
the software, hardware and labor that are required for the application of the
proposed system. This also compared the cost to implement such an application
with the benefits delivered by the application and demonstrate the values added
to a given institution by the application of the project.
Hardware Cost
Recommended
Specifications
Quantity
Unit Price
Cost
Requirements
Processor
AMD Ryzen 5
3500U with Radeon
Vega Mobile Gfx
2.10 GHz
1
29,500.00
29,500.00
Keyboard
k28 mechanical
keyboard
1
835.00
835.00
Mouse
Zues
1
799.00
799.00
Printer
Epson L120
1
4,995.00
4,995.00
Total: ₱36,129.00
Table 3.3: Hardware Cost
Source: www.dynaquestpc.com, www.clipdata.com.ph, www.shopee.ph,
www.lazada.com.ph, chubpricelist.online
27
Software Development Cost
Personnel
No. of Personnel
Salary
Programmer
1
20,000.00
Researcher
1
19,000.00
System
1
39,000.00
Total: ₱78,000.00
Table 3.1: Software Development Cost
Source: www.glassdoor.com
Personnel Salary for 60 Days:
Programmer: 20,000.00/60 = ₱333.33
Researcher: 19,000.00/60 = ₱316.66
System Analyst: 39,000.00/60 = ₱650
Operational Cost
A. System Cost
Items
Specifications
Cost
Operating System
Windows 10 Home
6,650.00
Font End
C# Visual Studio 2019
Free
Back End
MySQL ver.8.0.22
Free
Total: ₱6,750.00
Table 3.2: System Cost
Source: www.dynaquestpc.com, www.web.z.com
B. Stationaries and Supplies
Items
Quantity
Price
28
Total
Bond Paper
1 Reams
209.00
209.00
Ink Bottle Refill
1
245.00
24500
1
245.00
245.00
Ballpen
2
10
20.00
Folder
5
10
50.00
(Black)
Ink Bottle Refill
(Colored)
Total: ₱769.00
Table 3.3: Stationaries and Supplies
Source: www.nationalbookstore.com, www.officewarehouse.com.ph
Utility Expenses
Particulars
Cost
Electricity
900.00
Internet
1700.00
Total: ₱2,600.00
Table 3.4: Utility Expenses
Source: Meralco Mobile Application, www.pldthome.com
Computer usage cost ₱3.00 per day for 10 hours used in 30 days
Printer usage cost ₱15.00 per day for 10 hours used in 30 days
The cost of usage was based and estimated using the Meralco Mobile Application
29
Training Cost
Personnel
Amount per
day
Days
Hours
Total
Administrator
400.00
1
8
400.00
Employee
350.00
1
8
350.00
Total: ₱750.00
Table 3.5: Training Cost
Summary Cost
Cost
Amount
Hardware Cost
27,129.00
Software Development Cost
78,000.00
System Cost
6,750.00
Stationaries and Supplies
769.00
Utility Expense
2,600.00
Training Cost
750.00
Total: ₱124,998.00
Table 3.6 Summary Cost
Estimated Benefits:
Accuracy and efficiency of the software at approximately 85%
Total estimated Benefits = 124,998.00* 85%
Total = ₱ 106,248.30
Payback Period
Payback Period = (Total Cost / Total Estimated Benefits) * 12
30
= (124,998.00/106,248.30) *12
Total = 14 months or 1 year and 2 months
Return of Investment
Return of Investment = (Total Estimated Benefits / Total Cost) * 100
= (106,248.30/ 124,998.00) * 100
Total = 85%
Requirement Analysis
Figure 3.1: V-Model
This is the first step of the development cycle in which the product
requirements are grasped from the client's perspective. To guarantee that the
system operates well, the target user should be instructed on how to use the
system from within the system.
31
Functional Decomposition Diagram
Figure 3.2: Decomposition Diagram of the System
Figure 3.5 depicts the system's Decomposition Diagram. The four users of
the system are, as shown in the figure, the Barangay Captain as administrator,
the Barangay Health Worker, the Barangay Residents, and the Barangay
Secretary. As indicated in the figure above, each user has varying levels of
access to the system.
32
Block Diagram
Map
location
New born,
Mother
Child Record
Generate
Certificate
Population
Management
Development of
Barangay Webbased Population
Management with
Mapping System
for Barangay
Pagrang-ayan.
Request
Information
Generate
Reports
Figure 3.6: Block Diagram
Figure 3.6 block diagram shows the cycle of processing documents, which
clearly shows what the system does and what it is all about.
System Flow
A Process Flow Diagram or Flowchart is a diagram that uses geometric
symbols and arrows to define the relationships. The Process Flow Diagram of the
proponents’ application is shown below:
Residents:
33
Admin:
34
Secretary:
35
Health Worker:
36
Resident:
Figure 3.3: Flowchart
37
Development and Testing
The following tools were utilized in the development of the Web-based
Barangay Population Management and Mapping System:
•
PHP. This programming language was picked by the developers since it
gives a comprehensive set of capabilities for creating dynamic websites.
● XAMPP. The researchers utilized this as a development tool, allowing
website designers and programmers to evaluate their work without
needing to connect to the internet.
● MySQL. The database management system employed by the researchers
was MySQL.
● Adobe Photoshop. Adobe Photoshop. It was used to trim and resize
photographs as well as design the system's banner.
● Subline Text. The researchers used subline text as a source code editor.
● Bootstrap – a way of loading a program into a computer that uses a few
initial instructions to allow the rest of the program to be presented as an
input device.
● Browsers. Google Chrome, Mozilla Firefox, and Internet Explorer are
examples of browsers. These browsers were used for system testing
and development. The system worked in all of the browsers.
Various forms of testing will be undertaken throughout the building phase
prior to installing the system to identify hazards and potential solutions.
38
Application testing, alpha testing, beta testing, performance testing, and
acceptance testing were all employed by supporters.
Application Testing is performed in three ways. First is the Unit Testing
to ensure that the system operates with reliability and accuracy and security
operating procedures are tested to determine if they are fit for use when all
modules are complete. Integration Testing is also performed to testify that the
modules operate correctly as a system. After unit and integration testing are
completed, System Testing will follow to ensure that all hardware and software
components are compatible and working together as a whole. System testing will
then be performed to simulate daily workloads and to make sure that the
processing speed and accuracy meet the specifications.
Alpha Testing was performed to ensure that the system's functionalities
are operational.
Beta Testing was used to gather new ideas, suggestions, and comments
from customers, as well as to allow them to evaluate the system in order to
improve it.
Unit Testing was performed to test the suitability of individual units of
source code, groups of one or more computer program modules, control data,
usage, processes, and operational procedures.
Acceptance Testing. This was performed to reassure the user that the
system does what it is supposed to accomplish.
39
Input and Output Reports and Analysis
Input
User's Login
Resident's
Profile
New borns
Records
Statistics
Mapping
Population
Survey
Process
Rapid
Application
Development
Planning
Analyzing
Design
Development
Implementation
Evaluation
Output
Developed
Web-based
Barangay
Population
Management
and Mapping
System
Feedback
Figure 3.4: Input, Process Output of the Proposed System
Figure 3.8 Input, Process Output of the proposed system. The input box
contains the information to be inputted to the system which include user’s login,
resident’s profile, User's Login, Resident's Profile, New born, Records, Statistics,
Mapping, Population, and Survey.
The process box contains the methodology used in developing the system.
It consisted of different phases of System Development Life Cycle: Planning,
Analysis, Design, Development, Implementation and Evaluation.
40
The output box represents the developed system titled Barangay Webbased Population Management System. The feedback is triggered when there is
a need for further improvement from the system. It will go back to the input box to
repeat the process.
Description of the Prototype
This
section
of
the
research
document
presents
the
detailed
system/software functions for each part. The system was implemented with firm
security measure to protect the confidentiality of each document, database, and
the user itself.
The system can be access by the administrator / barangay captain,
barangay secretary, barangay health worker, and barangay residents. The
Administrator has a full access of the system. The administrator performs the
maintenance and preservation of the system. The Secretary can access the
Dashboard, Residents' Profiles, Senior Citizens, and Certificates and Reports.
The health Workers can access the Children's Profiles, Pregnant Profiles,
Mortalities, and Reports. The Residents can only access the dashboard. The
dashboard page can view the map and statistics. The residents' page allows the
administrator and barangay secretary to add residents’ profiles and edit residents’
profiles. The senior citizen page allows the administrator and barangay secretary
to add residents (senior citizens) profiles and edit residents' (senior citizens)
profiles. The children's page allows the administrator and barangay health worker
to add children’s profiles and edit children’s profiles. The pregnant page allows
the administrator and barangay health worker to add pregnant profiles and edit
41
pregnant profiles. The mortalities page allows the administrator and barangay
health worker to add a dead person and edit death person. The certificates page
allows them to generate and print Barangay Clearance, Certificate of Indigency,
and Certificate of Residency. The reports page can view the statistics and print
the reports of pregnant, newborns, senior citizens, and mortalities.
Implementation plan
This system was deployed to the beneficiary after the approval from the
respondents. The researchers’ hand over the system together with its
documentation and served as a guide to the administrator who was assigned for
the system’s update and maintenance. The users have been trained on how to
manage and operate the system. All of the data on how to use the software was
also taught to them, including how the system works. A letter of agreement was
handed over to the respondents and the researchers are no longer responsible
for the updates.
Data Gathering Procedure
The
to
gather
data,
researcher
utilized
observation,
interview
questionnaire and survey questionnaire.
The current system was evaluated using the Frequency Scale approach.
Survey respondents must pick "Yes" or "No" to indicate if they are pleased or
dissatisfied with the current system's services and capabilities in terms of
dependability, portability, security, efficiency, convenience, user-friendliness,
usability, accuracy, functionality, and availability.
42
Frequency Scale
Frequency Scale Formula used in computing the result is:
Total Number of Response
Rating=----------------------------------------X100
Total Number of Respondents
Likert Scale
The proposed system was evaluated using the Likert Scale. This was used
to measure the degree to which individuals agree and disagree with their
statements using responses such as Outstanding (O), Very Satisfactory (VS),
Satisfactory (S), Unsatisfactory (U), and Needs Improvement (NI).
The Likert Scale Formula used in computing the result is:
It is evaluated to determine the result of the survey among its users. Each
receives a rating of 1 to 5.
Table 3.7: Likert Scale Conversion
This table shows the conversion of ratings that the researchers used in tabulating
the result of the conducted survey.
43
Result of the Survey
This part details the findings of the researchers' survey of the chosen
respondents, as well as the analysis and interpretation of the data, which are used
to further testify and establish the design's feasibility.
The preliminary survey was carried out to get input from respondents on
the challenges experienced by the barangay and its people. The questionnaires
were distributed to the respondents as part of the survey.
Table 3.8: Breakdown of Respondents according to Gender
Gender
Number of Respondents
Male
36
female
102
Total
138
Tabulated Result Of The Preliminary Survey
Table 3.12: Tabulated Result of the Preliminary Survey
NO.
1
2
3
4
5
6
7
QUESTIONS
Do you think the current resident’s profiling is efficient?
Is there a present mapping of residents in terms of population?
Do you manually count the senior citizens in the barangay?
Do you accurately monitor the natality rate in the barangay?
Do you have difficulties in identifying the households of the
barangay?
Does the number of mortalities in your barangay accurately
determine?
Do you experience delay in reporting the updated population in
higher authorities?
44
YES
NO
4
134
68
70
135
3
0
138
138
0
0
138
138
0
8
9
10
Does the number of pregnant women in the barangay properly
monitored?
Does the number of deaths accurately monitor?
Is there a population management system used in the barangay?
TOTAL
22
116
0
138
0
138
367
872
As shown in table 3.12, the preliminary survey’s tabulated results show
that respondents are dissatisfied with the current system or physical method and
that current working should be improved with barangay population management
and mapping system.
26%
74%
Male
Figure 3.5: Pie Representation of the Preliminary Survey
As shown in the figure above, it shows that 74% are female, and 26% is
the male respondent in the preliminary survey.
Result of the Final Survey
The purpose of the survey was to determine whether the system software
was functioning as intended. The researchers presented the system to a selected
group of respondents, demonstrating its operation, and then distributed
questionnaires to collect feedback on the project.
Based on the survey results, the system was rated as outstanding in terms
of reliability, with a mean value of 4.52, indicating that it performs its intended
45
function accurately. It was also rated as outstanding in terms of portability, with a
mean value of 4.65, meaning that it can operate on any operating system that
runs web browsers like Internet Explorer.
In terms of security, the system was rated as very satisfactory, with a mean
value of 4.44, indicating that it can identify users and protect against unauthorized
information alteration. The system's efficiency was rated as outstanding, with a
mean value of 4.90, meaning that it performs its function in less time and
produces the expected output from the input.
The system's convenience was rated as outstanding, with a mean value of
4.94, indicating that it is useful for monitoring population demographics, mapping
household locations, and generating statistics and reports. Its user-friendliness
was also rated as outstanding, with a mean value of 4.83, suggesting that it is
easy to use and understand.
The system's functionality was rated as outstanding, with a mean value of
4.63, meaning that it can be used by one or more users at a time. The system's
accuracy was also rated as outstanding, with a mean value of 4.68, indicating that
it produces output without errors and provides precise results for each function.
Finally, the system's availability was rated as outstanding, with a mean
value of 4.90, meaning that it can be accessed by users anywhere and anytime
through a web browser.
Analysis of the Result of the Study
In evaluating and analysis the results of the conducted survey, the Likert
Scale was used. It is a method used in computing for the result or gathered data
during the survey.
46
For the study:
{(O*5) + (VS*4) + (S*3) + (U*2) + (NI*1)}
Rating=
Total Number of Respondents
Where:
Rating= Total number of Evaluation
O= number of respondents who answered Outstanding
VS= number of respondents who answered Very Satisfactory
S= number of respondents who answered Satisfactory
U= number of respondents who answered Unsatisfactory
NI= number of respondents who answered Needs Improvement
Table 3.9: Likert Scale Conversion
The table above indicates the conversion of the ratings of the prototype
based on the survey conducted.
Statistical Analysis
The researchers distributed the final survey questionnaires to 137
respondents to attain the desired data for the viability and justification of the
study.
47
Result of The Final Survey
Table 3.10: Result of the Final Survey
QUESTION
I.
II.
III.
IV.
V.
VI.
Reliability.
The program has ability to performed its
intended function.
Portability.
The program run under any operating
system that run Internet Explorer or other
web browser.
Security.
The program provides the protection
against unauthorized information
alteration.
Efficiency.
The program performs its functions
successfully in less time.
Convenience.
The program is useful in monitor the
population, demographics, Map the
location of the household’s population,
statistics, and reports
User Friendliness.
The program is easy to use and
understand without difficulty.
VII.
Functionality.
The program contains functions based
on the user requirements.
VIII.
Accuracy.
The program provides output without
errors.
IX.
Usability.
The program will be able to be used
quality and easily.
X.
Availability.
The program will be available anywhere
and anytime.
PERCENTAGE
5
72
4
66
3
0
2
0
1
0
90
48
0
0
0
62
76
0
0
0
125
13
0
0
0
130
8
0
0
0
115
23
0
0
0
87
51
0
0
0
99
38
1
0
0
127
11
0
0
0
125
13
0
0
0
37.4% 10.06% 0.02%
The table shows that majority of the respondents thought that the system
is Outstanding followed by respondents who thought the system is Satisfactory.
Evaluation Of The Study
1. Reliability.
48
-The program has ability to performed its intended function.
Rating= ((72*5) + (66*4) + (0*3) + (0*2) + (0*1))/138 = 4.52
2.Portability.
-The program run under any operating system that run Internet Explorer
or other web browser.
Rating= ((90*5) + (48*4) + (0*3) + (0*2) + (0*1))/138 = 4.65
3. Security.
-The program provides the protection against unauthorized information
alteration.
Rating= ((62*5) + (76*4) + (0*3) + (0*2) + (0*1))/138 = 4.44
4. Efficiency.
-The program performs its functions successfully in less time.
Rating= ((125*5) + (13*4) + (0*3) + (0*2) + (0*1))/138 = 4.90
5.Convenience.
-The program is useful in monitor the population, demographics, Map the
location of the household’s population, statistics, and reports
Rating= ((130*5) + (8*4) + (0*3) + (0*2) + (0*1))/138 = 4.94
6.User Friendliness.
The program is easy to use and understand without difficulty.
Rating= ((115*5) + (23*4) + (0*3) + (0*2) + (0*1))/138 = 4.83
7.Functionality.
The program contains functions based on the user requirements.
Rating= ((87*5) + (51*4) + (0*3) + (0*2) + (0*1))/138 = 4.63
49
8.Accuracy.
The program provides output without errors.
Rating= ((99*5) + (38*4) + (0*3) + (0*2) + (0*1))/138 = 4.68
9.Usability.
The program will be able to be used quality and easily.
Rating= ((127*5) + (11*4) + (0*3) + (0*2) + (0*1))/138 = 4.92
10.Availability.
The program will be available anywhere and anytime.
Rating= ((125*5) + (13*4) + (0*3) + (0*2) + (0*1))/138 = 4.90
Tabulated Result of The Evaluation
Table 3.11: Result of the final Survey from the Likert Scale
Factors
Value
Rate
1.Reliability
4.52
Outstanding
2.Portability
4.65
Outstanding
3.Security
4.44
Very Satisfactory
4.Efficiency
4.90
Outstanding
5.Convenience
4.94
Outstanding
6.User Friendliness
4.83
Outstanding
7.Functionality
4.63
Outstanding
8.Accuracy
4.68
Outstanding
9.Usability
4.92
Outstanding
10.Availability
4.90
Outstanding
50
The table shows that in the over-all result, the majority of the respondents
evaluated the system as “Outstanding”, which means that the project system has
performed its intended functions according to its aspects.
51
CHAPTER IV
Summary of Findings, Conclusion and Recommendation
The study entitled “The Web-based Barangay Population Management
and Mapping System” is a web-based system that can be accessed by the system
users anytime and anywhere using different mobile computing device via the
internet to manage the barangay populations record and to generate barangay
clearance, certificate of indigency and certificate of residency. The study was
conducted at Barangay Pagrang-ayan, Ramon Isabela. The main objective of the
study is to enhance the current process of managing barangay’s population
record and generation and issuance of barangay clearance, certificate of
indigency and certificate of indigency in terms of reliability, portability, portability,
efficiency, convenience, user friendliness, functionality, accuracy, usability, and
availability. was created as a solution to several issues with the old approach,
including the time commitment required of barangay officials.
In the development of the study, the researcher used the system
development life cycle models specifically applied rapid application development
model as a development tool from data gathering, analysis, design, development,
implementation, testing and maintenance.
52
On the planning phase of the study, the researcher gathered data by
conducting an observation, interview, survey, library research and internet
research. Through these methods the researcher identified the processes of the
current system. The researcher found that the current system encountered
problems. The problems identified were, 1) current technique for keeping track of
and retaining information on the number of dwellings and families in Barangays
is inefficient and unreliable. 2) The Municipality's population growth statistics is
erroneous and difficult to update. 3) Due to the lack of a centralized database for
storing and managing
population-related
data, information retrieval and
administration are difficult. 4) Residents may face aggravation and delays as a
result of the slow and unreliable procedure for obtaining certifications of
residency, indigency, and clearance. 5)The lack of clear and updated data on
population trends and the mapping system makes decision-making difficult for
local government agencies. 6) The current method for processing populationrelated data lacks accountability and transparency, which may lead to data errors
and conflicts.
System development tools included the Gantt chart, Data Flow Diagram
(DFD),
flowchart,
conceptual
design,
system
architecture,
functional
decomposition, Hierarchical Input-Output-Process (HIPO), and Cost Benefits
Analysis (CBA).
The system was created by the researcher utilizing PHP as the primary
scripting language, MySQL for the database, Adobe Photoshop for picture
processing, and Bootstrap for responsiveness. To ensure that the desired
55
functionalities execute as expected, the proposed system has been subjected to
a variety of tests, including unit testing, integration testing, system testing, alpha
testing, beta testing, and acceptance testing. The researchers surveyed 138
people, including the barangay captain, authorities, residents, and three IT
professionals, to assess the system's effectiveness. The researcher made used
of the survey questionnaire to evaluate the proposed system. The Likert scale
was used to come up with the result analysis of the feedback from the
respondents.
Based on the software evaluation result, most of the respondents rated the
system as “Outstanding” based on its reliability, portability, security, efficiency,
convenience, user-friendliness, functionality, accuracy, usability and availability
which proved that the developed system performed its intended functions.
Conclusion
The researchers developed the system using PHP as the programming
language and mysql as the database. The researcher found out that the
developed system efficiently generates certificates, and the mapping feature
effectively display the physical address of the residents. The researcher found
out that the proposed system was convenient, user-friendly, dependable,
portable, secure, and efficient, with the capacity to manage several users and
produce correct output. The system is also deemed accessible and available from
any location using a web browser.
56
Recommendations
For future researchers who want to develop and improve the system, the
following are recommended:
1. For the dashboard, including consultation or reporting unusual activity in the
barangay.
2. Can add a request for documents issued by the barangay.
3. The system may be used by future scholars as the foundation for their thesis
proposals, which will help them be directed in creating a more creative and helpful
system.
4. Future researchers are recommended to conduct further studies on the
system's scalability, develop and integrate advanced data analytics, enhance the
user interface and experience, evaluate and improve the system's security
measures, expand its capabilities to integrate with other systems and assess its
impact on the community. These measures will help improve the system's
efficiency and effectiveness in managing data for the Barangay Pagrang-ayan
community.
57
Bibliography
Imus et al., (2018). Barangay Management Information System.
Retrieved from: Barangay Management Information System (BMIS) for
Cities and Municipalities in the Philippines (ijcaonline.org)
Mary Jane C. Samonte, Renz Jirhel D. Bahia (2018). NATIONAL HOUSEHOLD
TARGETING SYSTEM FOR POVERTY REDUCTION.
Retrieved from: NHTS-PR | DSWD - Field Office VI | @dswdserves
Capstoneguide (2020). Barangay Management Information System Capstone
Project Document.
Retrieved from: Barangay Management Information System Capstone
Project Document - Capstone Guide
Martinez (2018). Natural disasters, public spending, and creative destruction: A
case study of the Philippines.
Retrieved from: Natural disasters, public spending, and creative
destruction: A case study of the Philippines (econstor.eu).
Academia (2020). Barangay profilling /information system.
Retrieved form: (DOC) Barangay profilling /information system | Lizquen
Forever - Academia.edu
58
Choudhary, et.al., (2019). Effectiveness of a Census-Based Management
Information System for Guiding Polio Eradication and Routine Immunization
Activities: Evidence from the CORE Group Polio Project in Uttar Pradesh, India
Retrieved from: Effectiveness of a Census-Based Management
Information System for Guiding Polio Eradication and Routine Immunization
Activities: Evidence from the CORE Group Polio Project in Uttar Pradesh, India
in: The American Journal of Tropical Medicine and Hygiene Volume 101 Issue
4_Suppl (2019) (ajtmh.org)
Alshalalda (2020). Causes of Human Population Growth: A Quantitative Study.
Retrieved from: mr2020_alshalalda.pdf (methodist.edu)
Adesete (2018). Economics of Nigeria and West Africa Population Growth:
Panel ARDL Approach for West Africa.
Retrieved from: (PDF) Economics of Nigeria and West Africa Population
Growth: Panel ARDL Approach for West Africa (researchgate.net)
UNECE (2020). Conference of European Statisticians Recommendations for the
2020 Censuses of Population and Housing.
Retrieved from: 1525039_E_ECE_CES_41.pdf (unece.org)
United Nation (2020). Principles and Recommendations for Population and
Housing Censuses: the 2020 Round.
59
Retrieved from: Microsoft Word - CoverPage-BG-Censuses.doc (un.org)
Planning and Statistics Authority (2022). Importance and Objectives of Census
Retrieved from: Importance and Objectives of Census (psa.gov.qa).
Added Source in the introduction
Adams, H. (2019, October 28). Technological Influence on Society - BCTV.
BCTV. Retrieved from https://www.bctv.org/2019/11/07/technologicalinfluence-on-society/
Senthil.k-Wp. (2022, September 28). The Benefits of Web-Based Systems for
Business - Aezion. Aezion. Retrived from
https://www.aezion.com/blogs/the-benefits-of-web-based-systems-forbusiness/
The benefits of using web-based applications | Geeks Insights. (2019,
December 20). Geeks Ltd. Retrieved from
https://www.geeks.ltd.uk/insights/blog/the-benefits-of-using-web-basedapplications
60
Appendices A
RELEVANT SOURCE CODES
User index
<div class="block-header">
<h2>Users<span style="float: right;">
<?= $this->Html->link('<i class="material-icons text-white" style="marginleft: -10px;margin-top: -15px;">add</i>','',
['id'=>'add','class'=>'btn btn-raised bg-blue waves-effect textcenter','style'=>'width:5px;height:30px;margin-top: 3px;','escape'=>false])
?></span></h2>
</div>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover js-basicexample dataTable" id="users-datatable">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>Verified</th>
<th>Options</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
61
<th>Email</th>
<th>Role</th>
<th>Verified</th>
<th>Options</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<div class="modal fade" id="users-modal" tabindex="-1" role="dialog" databackdrop='false'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="largeModalLabel">Add User</h4>
</div>
<div class="modal-body">
<?= $this->Form->create($user,['id'=>'users-form']) ?>
<div class="input-group"> <span class="input-group-addon"> <i
class="zmdi zmdi-account"></i> </span>
<div class="form-line">
<?= $this->Form->control('email',['type'=>'email','class'=>'formcontrol',
'placeholder'=>'Email','label'=>false,'required','autofocus']) ?>
</div>
</div>
62
<div class="input-group"> <span class="input-group-addon"> <i
class="zmdi zmdi-account"></i> </span>
<div class="form-line">
<?= $this->Form->control('role',['class'=>'formcontrol','options'=>$this->Options->role(),'empty'=>'--Position-','label'=>false,'required']) ?>
</div>
</div>
<div class="input-group"> <span class="input-group-addon"> <i
class="zmdi zmdi-lock"></i> </span>
<div class="form-line">
<?= $this->Form>control('password',['type'=>'password','class'=>'form-control',
'placeholder'=>'Password','label'=>false,'required']) ?>
</div>
</div>
<div class="input-group">
<span class="input-group-addon">
<i class="zmdi zmdi-lock"></i>
</span>
<div class="form-line">
<?= $this->Form>control('confirm',['type'=>'password','class'=>'form-control',
'placeholder'=>'Confirm Password','label'=>false,'required'])?>
</div>
</div>+
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-link waves-effect">SAVE
CHANGES</button>
63
<button type="button" class="btn btn-link waves-effect" datadismiss="modal">CLOSE</button>
</div>
</div><?= $this->Form->end() ?>
</div>
</div>
</div>
User login
<div class="card-top"></div>
<div class="card">
<h1 class="title"><span>Pagrang-ayan Population Management
System</span></br>Login</h1>
<div class="col-md-12">
<div class="text-center"><?= $this->Flash->render() ?></div>
<?= $this->Form->create(null,['id'=>'sign_in']) ?>
<div class="input-group"> <span class="input-group-addon"> <i
class="zmdi zmdi-account"></i> </span>
<div class="form-line">
<?= $this->Form->control('email',['type'=>'text','class'=>'formcontrol',
'placeholder'=>'Email','label'=>false,'required','auto focus']) ?>
</div>
</div>
<div class="input-group"> <span class="input-group-addon"> <i
class="zmdi zmdi-lock"></i> </span>
<div class="form-line">
<?= $this->Form>control('password',['type'=>'password','class'=>'form-control',
'placeholder'=>'Password','label'=>false,'required']) ?>
64
</div>
</div>
<div>
<div class="text-center">
<button type="submit" class="btn btn-raised waves-effect g-bgcyan">LOGIN</button>
<?= $this->Html->link('REGISTER','/Register',['class'=>'btn btnraised waves-effect']) ?>
</div>
<div class="text-center"><?= $this->Html->link('Forgot
Password?','/Users/reset') ?></div>
</div>
<?= $this->Form->end() ?>
</div>
</div>
User reset
<div class="card-top"></div>
<div class="card">
<h1 class="title"><span>Pagrang-ayan Population Management
System</span></br>Forgot Password</h1>
<div class="col-md-12">
<div class="text-center"><?= $this->Flash->render() ?></div>
<?= $this->Form->create(null,['id'=>'sign_in','url'=>'/Users/reset']) ?>
<div class="input-group"> <span class="input-group-addon"> <i
class="zmdi zmdi-account"></i> </span>
<div class="form-line">
<?= $this->Form->control('email',['type'=>'text','class'=>'form-control',
'placeholder'=>'Email','label'=>false,'required','autofocus']) ?>
65
</div>
</div>
<div>
<div class="text-center">
<button type="submit" class="btn btn-raised waves-effect g-bgcyan">Send Link</button>
</div>
</div>
<?= $this->Form->end() ?>
</div>
</div>
Super user
<div class="card-top"></div>
<div class="card" style="width: 100%">
<h1 class="title"><span>Pagrang-ayan Population Management
System</span></br>Superuser</h1>
<div class="col-md-12">
<div class="text-center"><?= $this->Flash->render() ?></div>
<?= $this->Form->create(null,['id'=>'sign_up']) ?>
<div class="input-group">
<span class="input-group-addon">
<i class="zmdi zmdi-email"></i>
</span>
<div class="form-line">
<?= $this->Form->control('email',['type'=>'email','class'=>'formcontrol',
'placeholder'=>'Email Address','label'=>false,'required'])?>
66
</div>
</div>
<div class="input-group">
<span class="input-group-addon">
<i class="zmdi zmdi-lock"></i>
</span>
<div class="form-line">
<?= $this->Form>control('password',['type'=>'password','class'=>'form-control',
'placeholder'=>'Password','label'=>false,'required'])?>
</div>
</div>
<div class="input-group">
<span class="input-group-addon">
<i class="zmdi zmdi-lock"></i>
</span>
<div class="form-line">
<?= $this->Form->control('confirm',['type'=>'password','class'=>'formcontrol',
'placeholder'=>'Confirm Password','label'=>false,'required'])?>
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-raised g-bg-cyan waveseffect">SAVE</button>
</div>
<div class="m-t-10 m-b--5 align-center">
<?= $this->Html->link('Already Registered?','/Login') ?>
67
</div>
<?= $this->Form->end() ?>
</div>
</div>
Update pass
<div class="card-top"></div>
<div class="card">
<h1 class="title"><span>Pagrang-ayan Population Management
System</span></br>Update Password</h1>
<div class="col-md-12">
<div class="text-center"><?= $this->Flash->render() ?></div>
<?= $this->Form>create(null,['id'=>'sign_in','url'=>'/Users/updatePassword/'.$user->token]) ?>
<div class="input-group"> <span class="input-group-addon"> <i
class="zmdi zmdi-account"></i> </span>
<div class="form-line">
<?= $this->Form>control('password',['type'=>'password','class'=>'form-control',
'placeholder'=>'Password','label'=>false,'required','autofocus']) ?>
</div>
</div>
<div>
<div class="text-center">
<button type="submit" class="btn btn-raised waves-effect g-bgcyan">SAVE</button>
</div>
</div>
<?= $this->Form->end() ?>
68
</div>
</div>
Controller
Appcontroller
<?php
declare(strict_types=1);
namespace App\Controller;
use Cake\Controller\Controller;
use Cake\Event\EventInterface;
class AppController extends Controller
{
var $authUser;
/**
* Initialization hook method.
*
* Use this method to add common initialization code like loading
components.
*
* e.g. `$this->loadComponent('FormProtection');`
*
* @return void
*/
public function initialize(): void
{
69
parent::initialize();
$this->loadComponent("Auth", [
"authenticate" => [
"Form" => [
"fields" => [
"username" => "email",
"password" => "password"
],
"userModel" => "Users"
]
],
"loginAction" => [
"controller" => "Users",
"action" => "login"
],
"loginRedirect" => [
"controller" => "Home",
"action" => "index"
],
"logoutRedirect" => [
"controller" => "Users",
"action" => "login"
]
]);
$this->loadComponent('RequestHandler');
70
$this->loadComponent('Flash');
/*
* Enable the following component for recommended CakePHP form
protection settings.
* see https://book.cakephp.org/4/en/controllers/components/formprotection.html
*/
//$this->loadComponent('FormProtection');
}
function beforeFilter(\Cake\Event\EventInterface $event)
{
$this->Auth->allow(['login','sent']);
$this->authUser = $this->Auth->user();
}
function beforeRender(EventInterface $event)
{
$usersTbl = $this->fetchTable('Users');
$residentsTbl = $this->fetchTable('Residents');
if(!empty($this->authUser)){
if(!empty($this->authUser['resident_id'])){
$loggeduser = $residentsTbl->find()->where(['Residents.id'=>$this>authUser['resident_id']])->contain('Users')->first();
}else{
$loggeduser = $usersTbl->find()->where(['Users.id'=>$this>authUser['id']])->contain('Residents')->first();
71
}
$this->set(compact('loggeduser'));
}
if(!empty($this->Auth->user())){
if(!empty($this->Auth->user('resident_id'))){
$loggeduser = $residentsTbl->find()->where(['Residents.id'=>$this>Auth->user('resident_id')])->contain('Users')->first();
}else{
$loggeduser = $usersTbl->find()->where(['Users.id'=>$this->Auth>user('id')])->contain('Residents')->first();
}
$this->set(compact('loggeduser'));
}
}
}
Certificate
<?php
declare(strict_types=1);
namespace App\Controller;
/**
* Certificates Controller
*
* @method \App\Model\Entity\Certificate[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
72
class CertificatesController extends AppController
{
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
}
public function printCertificate($id = null)
{
$residentsTbl = $this->fetchTable('Residents');
$resident = $residentsTbl->get($id);
$this->set(compact('resident'));
}
/**
* View method
*
* @param string|null $id Certificate id.
* @return \Cake\Http\Response|null|void Renders view
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function barangayClearance($id = null)
73
{
$certificateTbl = $this->fetchTable('IssuedCertificates');
$certificate = $certificateTbl->newEmptyEntity();
$this->viewBuilder()->setLayout('pdf');
$residentsTbl = $this->fetchTable('Residents');
$resident = $residentsTbl->get($id);
$max = $certificateTbl->find('all',['fields'=>['max_id'=>'MAX(id)']])->first();
if($this->request->is('post')){
$data = $this->request->getData();
if(empty($max->max_id)){
$data['control_no'] = 1;
}else{
$data['control_no'] = $max->max_id + 1;
}
$data['date_issued'] = date('Y-m-d');
$certificate = $certificateTbl->patchEntity($certificate,$data);
$certificateTbl->save($certificate);
$this->set(compact('resident','certificate','data'));
}
}
public function certificateIndigency($id = null)
{
$certificateTbl = $this->fetchTable('IssuedCertificates');
$certificate = $certificateTbl->newEmptyEntity();
$this->viewBuilder()->setLayout('pdf');
$residentsTbl = $this->fetchTable('Residents');
74
$resident = $residentsTbl->get($id);
$max = $certificateTbl->find('all',['fields'=>['max_id'=>'MAX(id)']])->first();
if($this->request->is('post')){
$data = $this->request->getData();
if(empty($max->max_id)){
$data['control_no'] = 1;
}else{
$data['control_no'] = $max->max_id + 1;
}
$data['date_issued'] = date('Y-m-d');
$certificate = $certificateTbl->patchEntity($certificate,$data);
$certificateTbl->save($certificate);
$this->set(compact('resident','certificate','data'));
}
}
public function certificateResidency($id = null)
{
$certificateTbl = $this->fetchTable('IssuedCertificates');
$certificate = $certificateTbl->newEmptyEntity();
$this->viewBuilder()->setLayout('pdf');
$residentsTbl = $this->fetchTable('Residents');
$resident = $residentsTbl->get($id);
$max = $certificateTbl->find('all',['fields'=>['max_id'=>'MAX(id)']])->first();
if($this->request->is('post')){
$data = $this->request->getData();
if(empty($max->max_id)){
75
$data['control_no'] = 1;
}else{
$data['control_no'] = $max->max_id + 1;
}
$data['date_issued'] = date('Y-m-d');
$certificate = $certificateTbl->patchEntity($certificate,$data);
$certificateTbl->save($certificate);
$this->set(compact('resident','certificate','data'));
}
}
/**
* Add method
*
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
$certificate = $this->Certificates->newEmptyEntity();
if ($this->request->is('post')) {
$certificate = $this->Certificates->patchEntity($certificate, $this>request->getData());
if ($this->Certificates->save($certificate)) {
$this->Flash->success(__('The certificate has been saved.'));
return $this->redirect(['action' => 'index']);
}
76
$this->Flash->error(__('The certificate could not be saved. Please, try
again.'));
}
$this->set(compact('certificate'));
}
/**
* Edit method
*
* @param string|null $id Certificate id.
* @return \Cake\Http\Response|null|void Redirects on successful edit,
renders view otherwise.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function edit($id = null)
{
$certificate = $this->Certificates->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$certificate = $this->Certificates->patchEntity($certificate, $this>request->getData());
if ($this->Certificates->save($certificate)) {
$this->Flash->success(__('The certificate has been saved.'));
return $this->redirect(['action' => 'index']);
}
77
$this->Flash->error(__('The certificate could not be saved. Please, try
again.'));
}
$this->set(compact('certificate'));
}
/**
* Delete method
*
* @param string|null $id Certificate id.
* @return \Cake\Http\Response|null|void Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$certificate = $this->Certificates->get($id);
if ($this->Certificates->delete($certificate)) {
$this->Flash->success(__('The certificate has been deleted.'));
} else {
$this->Flash->error(__('The certificate could not be deleted. Please, try
again.'));
}
return $this->redirect(['action' => 'index']);
}
}
78
Children
<?php
declare(strict_types=1);
namespace App\Controller;
/**
* Children Controller
*
* @property \App\Model\Table\ChildrenTable $Children
* @method \App\Model\Entity\Child[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
class ChildrenController extends AppController
{
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$this->paginate = [
'contain' => ['Residents'],
];
$children = $this->paginate($this->Children);
$this->set(compact('children'));
79
}
public function getChildren()
{
$children = $this->Children->find()->contain('Residents');
$children = $this->Children->getAge($children);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$children]));
}
public function getNewborn()
{
$children = $this->Children->find()->contain('Residents');
$children = $this->Children->getBabies($children);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$children]));
}
public function getMother()
{
$residentTbl = $this->fetchTable('Residents');
$residents = $residentTbl->find()->where(['gender'=>2]);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$residents]));
}
/**
80
* View method
*
* @param string|null $id Child id.
* @return \Cake\Http\Response|null|void Renders view
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function view($id = null)
{
$child = $this->Children->get($id, [
'contain' => ['Residents'],
]);
$this->set(compact('child'));
}
/**
* Add method
*
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
$child = $this->Children->newEmptyEntity();
if ($this->request->is('post')) {
$data = $this->request->getData();
$data['birthdate'] = date('Y-m-d',strtotime($data['birthdate']));
81
$data['bcg'] = date('Y-m-d',strtotime($data['bcg']));
$data['hepa'] = date('Y-m-d',strtotime($data['hepa']));
$child = $this->Children->patchEntity($child, $data);
if ($this->Children->save($child)) {
$result = ['result'=>'success','message'=>'The child has been saved.'];
}else{
$result = ['result'=>'error','message'=>'The child could not be saved.
Please, try again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('child'));
}
/**
* Edit method
*
* @param string|null $id Child id.
* @return \Cake\Http\Response|null|void Redirects on successful edit,
renders view otherwise.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function edit($id = null)
{
$child = $this->Children->get($id, [
'contain' => ['Residents'],
82
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$data = $this->request->getData();
$data['birthdate'] = date('Y-m-d',strtotime($data['birthdate']));
$data['bcg'] = date('Y-m-d',strtotime($data['bcg']));
$data['hepa'] = date('Y-m-d',strtotime($data['hepa']));
$child = $this->Children->patchEntity($child, $data);
if ($this->Children->save($child)) {
$result = ['result'=>'success','message'=>'The child has been saved.'];
}else{
$result = ['result'=>'error','message'=>'The child could not be saved.
Please, try again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('child'));
}
/**
* Delete method
*
* @param string|null $id Child id.
* @return \Cake\Http\Response|null|void Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function delete($id = null)
83
{
$this->request->allowMethod(['post', 'delete']);
$child = $this->Children->get($id);
if ($this->Children->delete($child)) {
$this->Flash->success(__('The child has been deleted.'));
} else {
$this->Flash->error(__('The child could not be deleted. Please, try
again.'));
}
return $this->redirect(['action' => 'index']);
}
}
Home
<?php
declare(strict_types=1);
namespace App\Controller;
/**
* Home Controller
*
* @method \App\Model\Entity\Home[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
class HomeController extends AppController
84
{
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$childrenTbl = $this->fetchTable('Children');
$residentsTbl = $this->fetchTable('Residents');
$mortalitiesTbl = $this->fetchTable('Mortalities');
$pregnantsTbl = $this->fetchTable('Pregnants');
$children = $childrenTbl->find()->count();
$residents = $residentsTbl->find()->where(['alive'=>1])->count();
$mortalities = $mortalitiesTbl->find()->count();
$pregnants = $pregnantsTbl->find()->count();
$this->set(compact('children','residents','mortalities','pregnants'));
}
/**
* View method
*
* @param string|null $id Home id.
* @return \Cake\Http\Response|null|void Renders view
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function view($id = null)
85
{
$home = $this->Home->get($id, [
'contain' => [],
]);
$this->set(compact('home'));
}
/**
* Add method
*
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
$home = $this->Home->newEmptyEntity();
if ($this->request->is('post')) {
$home = $this->Home->patchEntity($home, $this->request->getData());
if ($this->Home->save($home)) {
$this->Flash->success(__('The home has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The home could not be saved. Please, try
again.'));
}
$this->set(compact('home'));
86
}
/**
* Edit method
*
* @param string|null $id Home id.
* @return \Cake\Http\Response|null|void Redirects on successful edit,
renders view otherwise.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function edit($id = null)
{
$home = $this->Home->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$home = $this->Home->patchEntity($home, $this->request->getData());
if ($this->Home->save($home)) {
$this->Flash->success(__('The home has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The home could not be saved. Please, try
again.'));
}
$this->set(compact('home'));
}
87
/**
* Delete method
*
* @param string|null $id Home id.
* @return \Cake\Http\Response|null|void Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$home = $this->Home->get($id);
if ($this->Home->delete($home)) {
$this->Flash->success(__('The home has been deleted.'));
} else {
$this->Flash->error(__('The home could not be deleted. Please, try
again.'));
}
return $this->redirect(['action' => 'index']);
}
}
Mortalities
<?php
declare(strict_types=1);
namespace App\Controller;
88
/**
* Mortalities Controller
*
* @property \App\Model\Table\MortalitiesTable $Mortalities
* @method \App\Model\Entity\Mortality[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
class MortalitiesController extends AppController
{
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$this->paginate = [
'contain' => ['Residents'],
];
$mortalities = $this->paginate($this->Mortalities);
$this->set(compact('mortalities'));
}
public function getResidentsByID($id = null)
{
$residentTbl = $this->fetchTable('Residents');
89
$residents = $residentTbl->get($id);
return $this->response->withType('application/json')
->withStringBody(json_encode($residents));
}
public function getMortalities()
{
$mortalities = $this->Mortalities->find()->contain(['Residents']);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$mortalities]));
}
public function view($id = null)
{
$mortality = $this->Mortalities->get($id, [
'contain' => ['Residents'],
]);
$this->set(compact('mortality'));
}
/**
* Add method
*
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
90
$residentTbl = $this->fetchTable('Residents');
$mortality = $this->Mortalities->newEmptyEntity();
if ($this->request->is('post')) {
$data = $this->request->getData();
$data['date_died'] = date('Y-m-d',strtotime($data['date_died']));
$mortality = $this->Mortalities->patchEntity($mortality, $data);
if ($this->Mortalities->save($mortality)) {
$resident = $residentTbl->find()->where(['id'=>$mortality>resident_id])->first();
$resident->alive = 0;
$residentTbl->save($resident);
$result = ['result'=>'success','message'=>'The mortality has been
saved.'];
}else{
$result = ['result'=>'error','message'=>'The mortality could not be
saved. Please, try again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('mortality'));
}
public function edit($id = null)
{
$mortality = $this->Mortalities->get($id, [
'contain' => ['Residents'],
91
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$data = $this->request->getData();
$data['date_died'] = date('Y-m-d',strtotime($data['date_died']));
$mortality = $this->Mortalities->patchEntity($mortality, $data);
if ($this->Mortalities->save($mortality)) {
$result = ['result'=>'success','message'=>'The mortality has been
saved.'];
}else{
$result = ['result'=>'error','message'=>'The mortality could not be
saved. Please, try again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('mortality'));
}
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$mortality = $this->Mortalities->get($id);
if ($this->Mortalities->delete($mortality)) {
$this->Flash->success(__('The mortality has been deleted.'));
} else {
92
$this->Flash->error(__('The mortality could not be deleted. Please, try
again.'));
}
return $this->redirect(['action' => 'index']);
}
}
Page
<?php
declare(strict_types=1);
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc.
(https://cakefoundation.org)
* @link
* @since
https://cakephp.org CakePHP(tm) Project
0.2.9
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
namespace App\Controller;
use Cake\Core\Configure;
93
use Cake\Http\Exception\ForbiddenException;
use Cake\Http\Exception\NotFoundException;
use Cake\Http\Response;
use Cake\View\Exception\MissingTemplateException;
class PagesController extends AppController
{
/**
* Displays a view
*
* @param string ...$path Path segments.
* @return \Cake\Http\Response|null
* @throws \Cake\Http\Exception\ForbiddenException When a directory
traversal attempt.
* @throws \Cake\View\Exception\MissingTemplateException When the view
file could not
* be found and in debug mode.
* @throws \Cake\Http\Exception\NotFoundException When the view file
could not
* be found and not in debug mode.
* @throws \Cake\View\Exception\MissingTemplateException In debug mode.
*/
public function display(string ...$path): ?Response
{
if (!$path) {
return $this->redirect('/');
}
if (in_array('..', $path, true) || in_array('.', $path, true)) {
94
throw new ForbiddenException();
}
$page = $subpage = null;
if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
$this->set(compact('page', 'subpage'));
try {
return $this->render(implode('/', $path));
} catch (MissingTemplateException $exception) {
if (Configure::read('debug')) {
throw $exception;
}
throw new NotFoundException();
}
}
}
Pregnant
<?php
declare(strict_types=1);
namespace App\Controller;
95
/**
* Pregnants Controller
*
* @property \App\Model\Table\PregnantsTable $Pregnants
* @method \App\Model\Entity\Pregnant[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
class PregnantsController extends AppController
{
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$this->paginate = [
'contain' => ['Residents'],
];
$pregnants = $this->paginate($this->Pregnants);
$this->set(compact('pregnants'));
}
public function getPregnants()
{
$pregnants = $this->Pregnants->find()->contain('Residents');
96
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$pregnants]));
}
public function getResidents()
{
$residentTbl = $this->fetchTable('Residents');
$residents = $residentTbl->find()->where(['gender'=>2,'alive'=>1]);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$residents]));
}
public function getResidentsByID($id = null)
{
$residentTbl = $this->fetchTable('Residents');
$residents = $residentTbl->get($id);
return $this->response->withType('application/json')
->withStringBody(json_encode($residents));
}
/**
* View method
*
* @param string|null $id Pregnant id.
* @return \Cake\Http\Response|null|void Renders view
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
97
public function view($id = null)
{
$pregnant = $this->Pregnants->get($id, [
'contain' => ['Residents'],
]);
$this->set(compact('pregnant'));
}
/**
* Add method
*
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
$residentsTbl = $this->fetchTable('Residents');
$pregnant = $this->Pregnants->newEmptyEntity();
if ($this->request->is('post')) {
$pregnant = $this->Pregnants->patchEntity($pregnant, $this->request>getData());
if ($this->Pregnants->save($pregnant)) {
$resident = $residentsTbl->get($pregnant->resident_id);
if($resident->pregnant!=2){
$resident->pregnant = 2;
$residentsTbl->save($resident);
}
98
$result = ['result'=>'success','message'=>'The pregnant has been
saved.'];
}else{
$result = ['result'=>'error','message'=>'The pregnant could not be
saved. Please, try again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('pregnant'));
}
/**
* Edit method
*
* @param string|null $id Pregnant id.
* @return \Cake\Http\Response|null|void Redirects on successful edit,
renders view otherwise.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function edit($id = null)
{
$pregnant = $this->Pregnants->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$pregnant = $this->Pregnants->patchEntity($pregnant, $this->request>getData());
99
if ($this->Pregnants->save($pregnant)) {
$this->Flash->success(__('The pregnant has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The pregnant could not be saved. Please, try
again.'));
}
$residents = $this->Pregnants->Residents->find('list', ['limit' => 200])->all();
$this->set(compact('pregnant', 'residents'));
}
/**
* Delete method
*
* @param string|null $id Pregnant id.
* @return \Cake\Http\Response|null|void Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$pregnant = $this->Pregnants->get($id);
if ($this->Pregnants->delete($pregnant)) {
$this->Flash->success(__('The pregnant has been deleted.'));
} else {
100
$this->Flash->error(__('The pregnant could not be deleted. Please, try
again.'));
}
return $this->redirect(['action' => 'index']);
}
}
Register
<?php
declare(strict_types=1);
namespace App\Controller;
use Cake\Auth\DefaultPasswordHasher;
/**
* Register Controller
*
* @method \App\Model\Entity\Register[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
class RegisterController extends AppController
{
public function beforeFilter(\Cake\Event\EventInterface $event)
{
$this->Auth->allow(['index','sent','add']);
}
/**
* Index method
101
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$this->viewBuilder()->setLayout('login');
$residentsTbl = $this->fetchTable('Residents');
$resident = $residentsTbl->newEmptyEntity();
$this->set(compact('resident'));
}
public function add()
{
$this->autoRender = false;
$residentsTbl = $this->fetchTable('Residents');
$resident = $residentsTbl->newEmptyEntity();
if ($this->request->is('post')) {
$data = $this->request->getData();
if($data['user']['password']!=$data['confirm']){
$this->Flash->error(__('Password did not matched. Please, try
again.'));
return $this->redirect(['/Register/index']);
}
$data['user']['token'] = (new DefaultPasswordHasher())>hash($data['user']['email'].$data['user']['password']);
$data['user']['role'] = 'resident';
$resident = $residentsTbl->patchEntity($resident,
$data,['associated'=>['Users']]);
102
if ($residentsTbl->save($resident)) {
$this->Flash->success(__('An email will be sent if your application is
approved.'));
return $this->redirect('/Register/sent');
}
$this->Flash->error(__('The user could not be saved. Please, try
again.'));
}
}
public function sent()
{
$this->viewBuilder()->setLayout('login');
}
}
Reports
<?php
declare(strict_types=1);
namespace App\Controller;
use function
Symfony\Component\Config\Definition\Builder\validateConcreteNode;
/**
* Reports Controller
*
* @method \App\Model\Entity\Report[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
103
class ReportsController extends AppController
{
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$pregnantsTbl = $this->fetchTable('Pregnants');
$pregnants = $pregnantsTbl->find();
}
public function getPregnants()
{
$year = $this->request->getQuery('year');
$pregnantsTbl = $this->fetchTable('Pregnants');
if(empty($year)){
$pregnants = $pregnantsTbl->find()->contain('Residents');
}else{
$pregnants = $pregnantsTbl->find()->contain('Residents')>where(['YEAR(Pregnants.created)'=>$year]);
}
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$pregnants]));
}
public function getNewborn()
104
{
$year = $this->request->getQuery('year');
$childrenTbl = $this->fetchTable('Children');
if(empty($year)){
$children = $childrenTbl->find()->contain('Residents');
}else{
$children = $childrenTbl->find()->contain('Residents')>where(['YEAR(Children.birthdate)'=>$year]);
}
$children = $childrenTbl->getBabies($children);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$children]));
}
public function getSeniors()
{
$seniorsTbl = $this->fetchTable('Residents');
$residents = $seniorsTbl->find()->where(['alive'=>1]);
$residents = $seniorsTbl->getSeniors($residents);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$residents]));
}
public function getMortalities()
{
$year = $this->request->getQuery('year');
$mortalitiesTbl = $this->fetchTable('Mortalities');
if(empty($year)){
105
$mortalities = $mortalitiesTbl->find()->contain('Residents');
}else{
$mortalities = $mortalitiesTbl->find()->contain('Residents')>where(['YEAR(Mortalities.date_died)'=>$year]);
}
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$mortalities]));
}
public function getStat()
{
}
public function printPregnants($year = null)
{
$this->viewBuilder()->setLayout('pdf');
$pregnantsTbl = $this->fetchTable('Pregnants');
if(empty($year)){
$pregnants = $pregnantsTbl->find()->contain('Residents');
}else{
$pregnants = $pregnantsTbl->find()->contain('Residents')>where(['YEAR(Pregnants.created)'=>$year]);
}
$this->set(compact('pregnants','year'));
}
public function printNewborn($year = null)
106
{
$this->viewBuilder()->setLayout('pdf');
$childrenTbl = $this->fetchTable('Children');
if(empty($year)){
$children = $childrenTbl->find()->contain('Residents');
}else{
$children = $childrenTbl->find()->contain('Residents')>where(['YEAR(Children.birthdate)'=>$year]);
}
$children = $childrenTbl->getBabies($children);
$this->set(compact('children','year'));
}
public function printSeniors()
{
$this->viewBuilder()->setLayout('pdf');
$seniorsTbl = $this->fetchTable('Residents');
$residents = $seniorsTbl->find()->where(['alive'=>1]);
$seniors = $seniorsTbl->getSeniors($residents);
$this->set(compact('seniors'));
}
public function printMortalities($year = null)
{
$this->viewBuilder()->setLayout('pdf');
$mortalitiesTbl = $this->fetchTable('Mortalities');
if(empty($year)){
$mortalities = $mortalitiesTbl->find()->contain('Residents');
107
}else{
$mortalities = $mortalitiesTbl->find()->contain('Residents')>where(['YEAR(Mortalities.date_died)'=>$year]);
}
$this->set(compact('mortalities','year'));
}
/**
* View method
*
* @param string|null $id Report id.
* @return \Cake\Http\Response|null|void Renders view
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function view($id = null)
{
$report = $this->Reports->get($id, [
'contain' => [],
]);
$this->set(compact('report'));
}
/**
* Add method
*
108
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
$report = $this->Reports->newEmptyEntity();
if ($this->request->is('post')) {
$report = $this->Reports->patchEntity($report, $this->request>getData());
if ($this->Reports->save($report)) {
$this->Flash->success(__('The report has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The report could not be saved. Please, try
again.'));
}
$this->set(compact('report'));
}
/**
* Edit method
*
* @param string|null $id Report id.
* @return \Cake\Http\Response|null|void Redirects on successful edit,
renders view otherwise.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
109
public function edit($id = null)
{
$report = $this->Reports->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$report = $this->Reports->patchEntity($report, $this->request>getData());
if ($this->Reports->save($report)) {
$this->Flash->success(__('The report has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The report could not be saved. Please, try
again.'));
}
$this->set(compact('report'));
}
/**
* Delete method
*
* @param string|null $id Report id.
* @return \Cake\Http\Response|null|void Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function delete($id = null)
110
{
$this->request->allowMethod(['post', 'delete']);
$report = $this->Reports->get($id);
if ($this->Reports->delete($report)) {
$this->Flash->success(__('The report has been deleted.'));
} else {
$this->Flash->error(__('The report could not be deleted. Please, try
again.'));
}
return $this->redirect(['action' => 'index']);
}
}
Residents
<?php
declare(strict_types=1);
namespace App\Controller;
use Cake\Auth\DefaultPasswordHasher;
/**
* Residents Controller
*
* @property \App\Model\Table\ResidentsTable $Residents
* @method \App\Model\Entity\Resident[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
class ResidentsController extends AppController
111
{
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$this->paginate = [
'contain' => ['Users'],
];
$residents = $this->paginate($this->Residents);
$this->set(compact('residents'));
}
public function getResidents()
{
$residents = $this->Residents->find()->where(['alive'=>1]);
$residents = $this->Residents->getAge($residents);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$residents]));
}
public function getLatLng()
{
$residents = $this->Residents->find()->where(['alive'=>1]);
112
return $this->response->withType('application/json')
->withStringBody(json_encode($residents));
}
public function getSeniors()
{
$residents = $this->Residents->find()->where(['alive'=>1]);
$residents = $this->Residents->getSeniors($residents);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$residents]));
}
public function seniorCitizens()
{
}
/**
* View method
*
* @param string|null $id Resident id.
* @return \Cake\Http\Response|null|void Renders view
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function view($id = null)
{
$resident = $this->Residents->get($id, [
113
'contain' => ['Users', 'HouseholdMembers', 'Mortalities'],
]);
$this->set(compact('resident'));
}
/**
* Add method
*
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
$residentTbl = $this->fetchTable('Residents');
$resident = $this->Residents->newEmptyEntity();
if ($this->request->is('post')) {
$path = 'img/residents';
$data = $this->request->getData();
$data['user']['token'] = (new DefaultPasswordHasher())>hash($data['user']['email'].$data['user']['password']);
$data['birthdate'] = date('Y-m-d',strtotime($data['birthdate']));
$image = $data['image'];
$data['user']['role'] = 'resident';
$data['user']['verified'] = 1;
if($image['error']==0){
$data['image'] = $image['name'];
}else{
114
$data['image'] = 'no_image.png';
}
$user = $this->Residents->patchEntity($resident,
$data,['associated'=>['Users']]);
if ($this->Residents->save($user)) {
move_uploaded_file($image['tmp_name'],
WWW_ROOT.$path.DS.$image['name']);
$result = ['result'=>'success','message'=>'The resident has been
saved'];
}else{
$result = ['result'=>'error','message'=>'The resident could not be
saved. Please, try again'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('resident'));
}
/**
* Edit method
*
* @param string|null $id Resident id.
* @return \Cake\Http\Response|null|void Redirects on successful edit,
renders view otherwise.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function edit($id = null)
115
{
$resident = $this->Residents->get($id, [
'contain' => [],
]);
$pregnantTbl = $this->fetchTable('Pregnants');
if ($this->request->is(['patch', 'post', 'put'])) {
$savedImage = $resident->image;
$path = 'img/residents';
$data = $this->request->getData();
$data['birthdate'] = date('Y-m-d',strtotime($data['birthdate']));
$image = $data['image'];
if($image['error']==0){
$data['image'] = $image['name'];
}else{
if(!empty($savedImage)){
unset($data['image']);
}
}
if(empty($image['name'])&&empty($savedImage)){
$data['image'] = 'no_image.png';
}
$resident = $this->Residents->patchEntity($resident, $data);
if ($this->Residents->save($resident)) {
if(!empty($savedImage)){
if($savedImage!='no_image.png'){
if($image['error']==0){
if(file_exists(WWW_ROOT.$path.DS.$savedImage)){
116
unlink(WWW_ROOT.$path.DS.$savedImage);
}
move_uploaded_file($image['tmp_name'],
WWW_ROOT.$path.DS.$data['image']);
}
}
}
$result = ['result'=>'success','message'=>'The resident has been
updated'];
}else{
$result = ['result'=>'error','message'=>'The resident could not be
updated. Please, try again'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('resident'));
}
/**
* Delete method
*
* @param string|null $id Resident id.
* @return \Cake\Http\Response|null|void Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
117
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$resident = $this->Residents->get($id);
if ($this->Residents->delete($resident)) {
$this->Flash->success(__('The resident has been deleted.'));
} else {
$this->Flash->error(__('The resident could not be deleted. Please, try
again.'));
}
return $this->redirect(['action' => 'index']);
}
}
User
<?php
declare(strict_types=1);
namespace App\Controller;
use Cake\Auth\DefaultPasswordHasher;
use Cake\Mailer\Mailer;
/**
* Users Controller
*
118
* @property \App\Model\Table\UsersTable $Users
* @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface
paginate($object = null, array $settings = [])
*/
class UsersController extends AppController
{
public function beforeFilter(\Cake\Event\EventInterface $event)
{
$this->Auth>allow(['superuser','login','verification','add','reset','updatePassword']);
}
public function login()
{
$this->viewBuilder()->setLayout('login');
$users = $this->Users->find('all')->count();
if($users<1){
return $this->redirect('/Users/superuser');
}
if ($this->request->is('post')) {
$user = $this->Auth->identify();
if ($user) {
if($user['verified']){
$this->Auth->setUser($user);
return $this->redirect($this->Auth->redirectUrl());
}else{
$this->Flash->error(__('User not yet verified'));
}
119
}
$this->Flash->error(__('Invalid username or password, try again'));
}
}
public function superuser()
{
$this->viewBuilder()->setLayout('login');
$user = $this->Users->newEmptyEntity();
if ($this->request->is('post')) {
$data = $this->request->getData();
if($data['password']!=$data['confirm']){
$this->Flash->error(__('Password did not matched. Please, try
again.'));
return $this->redirect(['controller'=>'Users','action'=>'superuser']);
}
$data['token'] = (new DefaultPasswordHasher())>hash($data['email'].$data['password']);
$data['role'] = 'superuser';
$data['verified']=1;
$user = $this->Users->patchEntity($user,$data);
if ($this->Users->save($user)) {
$this->Flash->success(__('The superuser has been saved.'));
return $this->redirect('/Users/login');
}
$this->Flash->error(__('The user could not be saved. Please, try
again.'));
}
120
}
/**
* Index method
*
* @return \Cake\Http\Response|null|void Renders view
*/
public function index()
{
$user = $this->Users->newEmptyEntity();
$this->set(compact('user'));
}
public function getUsers()
{
$users = $this->Users->find()->contain(['Residents'])>where(['NOT'=>['role'=>'superuser']]);
return $this->response->withType('application/json')
->withStringBody(json_encode(['data'=>$users]));
}
/**
* View method
*
* @param string|null $id User id.
* @return \Cake\Http\Response|null|void Renders view
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
121
*/
public function view($id = null)
{
$user = $this->Users->get($id, [
'contain' => ['Residents'],
]);
$this->set(compact('user'));
}
/**
* Add method
*
* @return \Cake\Http\Response|null|void Redirects on successful add,
renders view otherwise.
*/
public function add()
{
$this->autoRender = false;
$user = $this->Users->newEmptyEntity();
if ($this->request->is('post')) {
$data = $this->request->getData();
if($data['password']!=$data['confirm']){
$result = ['result'=>'error','message'=>'Password did not matched.
Please, try again.'];
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
122
$data['token'] = (new DefaultPasswordHasher())>hash($data['email'].$data['password']);
$data['verified'] = 1;
$user = $this->Users->patchEntity($user,
$data,['associated'=>['Residents']]);
if ($this->Users->save($user)) {
$result = ['result'=>'success','message'=>'The user has been saved'];
}else{
$result = ['result'=>'error','message'=>'The user could not be saved.
Please, try again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
}
public function verification($token=null)
{
$this->autoRender = false;
$user = $this->Users->find()->where(['token'=>$token])->first();
if(!empty($user)){
$user->verified = 1;
if($this->Users->save($user)){
$this->Flash->success(__('Your email has been verified. You can
login.'));
return $this->redirect('/Users/login');
}
$this->Flash->error(__('The user could not be verified. Please, try
again.'));
123
}else{
$this->Flash->error(__('Patient not found. Please, try again.'));
return $this->redirect('/Users/login');
}
}
public function sendVerification($id=null)
{
$user = $this->Users->get($id);
$mailer = new Mailer('default');
$mailer->setTransport('smtp');
$mailer->setFrom(['pmms@mlcitsolutions.tech' => 'Pagrang-ayan LGU'])
->setTo($user->email)
->setEmailFormat('html')
->setSubject('Verify New Account')
->deliver('Hi <br/>Please confirm your email link below<br/><a
href="https://pagrang-ayan.online/Users/verification/'.$user->token.'">
Verify Email</a><br/>Thank you for registration.');
$result = ['result'=>'success','message'=>'Verification Link sent'];
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
/**
* Edit method
*
* @param string|null $id User id.
124
* @return \Cake\Http\Response|null|void Redirects on successful edit,
renders view otherwise.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function edit($id = null)
{
$user = $this->Users->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$data = $this->request->getData();
if($data['password']!=$data['confirm']){
$result = ['result'=>'error','message'=>'Password did not matched.
Please, try again.'];
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$user = $this->Users->patchEntity($user, $data);
if ($this->Users->save($user)) {
$result = ['result'=>'success','message'=>'The user has been saved'];
}else{
$result = ['result'=>'error','message'=>'The user could not be saved.
Please, try again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
$this->set(compact('user'));
125
}
public function reset(){
$this->viewBuilder()->setLayout('login');
if($this->request->is('post')){
$email = $this->request->getData('email');
$user = $this->Users->find()->where(['email'=>$email])->first();
//
var_dump(pr($user));
if(!empty($user)){
$mailer = new Mailer('default');
$mailer->setTransport('smtp');
$mailer->setFrom(['pmms@mlcitsolutions.tech' => 'Pagrang-ayan
LGU'])
->setTo($user->email)
->setEmailFormat('html')
->setSubject('Passwword Reset link')
->deliver('Hi <br/>Please click the link below to update your
password<br/><a href="https://pagrangayan.online/Users/updatePassword/'.$user->token.'">
Reset Password</a>');
$this->Flash->success(__('An link has been sent to your email'));
}else{
$this->Flash->success(__('Email not found!'));
}
return $this->redirect('/Users/login');
}
}
126
public function updatePassword($token){
$this->viewBuilder()->setLayout('login');
$token = urldecode($token);
$user = $this->Users->find()->where(['token'=>$token])->first();
if($this->request->is('post')){
if(!empty($user)){
$user->password = $this->request->getData('password');
$this->Users->save($user);
$this->Flash->success(__('Password successfully updated!'));
return $this->redirect('/Users/login');
}
}
$this->set(compact('user'));
}
/**
* Delete method
*
* @param string|null $id User id.
* @return \Cake\Http\Response|null|void Redirects to index.
* @throws \Cake\Datasource\Exception\RecordNotFoundException When
record not found.
*/
public function delete($id = null)
{
$path = 'img/residents';
$residentsTbl = $this->fetchTable('Residents');
127
$resident = $residentsTbl->find()->where(['id'=>$id])->first();
$this->request->allowMethod(['post', 'delete']);
$user = $this->Users->get($id);
if ($this->Users->delete($user)) {
if(!empty($resident)){
if(file_exists(WWW_ROOT.$path.DS.$resident->image)){
unlink(WWW_ROOT.$path.DS.$resident->image);
}
}
$result = ['result'=>'success','The user has been deleted.'];
} else {
$result = ['result'=>'success','The user could not be deleted. Please, try
again.'];
}
return $this->response->withType('application/json')
->withStringBody(json_encode($result));
}
public function logout()
{
return $this->redirect($this->Auth->logout());
}
}
128
Evaluation Tool
Questionnaire a. Preliminary
Ama computer college
Preliminary questionnaire on web based barangay population
management and mapping system
Name:___________________________________
Age:_____________
Gender:____________
OBJECTIVE: The objective of this study is to create a web-based system that will
help the organization or the Barangay to monitor their population and the
demographics of the households.
DIRECTION: Please check under one of the choices in each question that corresponds to your
honest reaction.
NO.
QUESTIONS
YES
1
Do you think the current resident’s profiling is efficient?
2
Is there a present mapping of residents in terms of population?
3
Do you manually count the senior citizens in the barangay?
4
Do you accurately monitor the natality rate in the barangay?
5
Do you have difficulties in identifying the households of the
barangay?
Does the number of mortalities in your barangay accurately
determine?
Do you experience delay in reporting the updated population in
higher authorities?
Does the number of pregnant women in the barangay properly
monitored?
Does the number of deaths accurately monitor?
6
7
8
9
10
Is there a population
management
barangay?
129
system used in the
NO
Questionnaire b. Technical
Name:___________________________________
Age:_____________
Gender:____________
Thank you for spending some time to test and view the software “WEB BASED
BARANGAY POPULATION MANAGEMENT AND MAPPING SYSTEM” the developers
would like to get your comments and suggestions regarding the software.
Outstanding – 5, Very Satisfactory – 4, Satisfactory – 3, Unsatisfactory – 2,
Needs Improvement - 1
DIRECTION: Please check under one of the choices in each question that corresponds to your
honest reaction.
Evaluation for the system (acceptability of the Software)
QUESTION
5
1.
Reliability.
The program has ability to performed its intended
function.
2. Portability.
The program run under any operating system that
run Internet Explorer or other web browser.
3. Security.
The program provides the protection against
unauthorized information alteration.
4. Efficiency.
The program performs its functions successfully in
less time.
5. Convenience.
The program is useful in monitor the population,
demographics, Map the location of the household’s
population, statistics, and reports
6. User Friendliness.
The program is easy to use and understand without
difficulty.
7. Functionality.
The program contains functions based on the user
requirements.
8. Accuracy.
The program provides output without errors.
9. Usability.
The program will be able to be used quality and
easily.
10. Availability.
The program will be available anywhere and
anytime.
130
4
3
2
1
Survey Reports
Tabulation
Preliminary
In Preliminary reports the total number of YES is 367 and the total number
of NO is 872.
Technical
In the technical tabulation the total number of (5)Outstanding is 1,032,
the total number of (4)Very Satisfactory is 347 and the total number of
(3)Satisfactory is 1.
131
Documentation
132
Story board/Program manual
133
134
135
136
137
138
139
140
141
142
143
144
145
Biographical Sketch
MINARD J. LLAGAS
Minard J. Llagas is 24 years old from Cabulay Santiago City. He was born
on August 13, 1993. He is the elder son of Ferdinand and Minerva J. Llagas. He
is currently taking Bachelor of Science in Information Technology at AMA
Computer College Santiago Campus. He graduated his elementary at Santiago
North Central School and Finished his high school and senior high school at
Cabulay High school.
146
JACKIELYN H. CABUYADAO
Jackielyn H. Cabuyadao is 31 years old from Pangal Sur, Echague,
Isabela. She was born on July 27, 1991. She is a brave single mom to her only
child and a working student as well. She is a daughter of Eduardo and Nelda
Hernandez.
She is currently
taking Bachelor of Science in Information
Technology at AMA Computer College Santiago Campus. She graduated her
elementary at Guipos Central Elementary School and finished her high school at
Guipos National High School.
147
VEBERLY T. REGERO
Veberly T. Regero is 30 years old from Lucena City Quezon.She was
born September 10, 1992.She is the youngest of Marina Regero and Dionesio
Anong.She is currently taking Bachelor of Science of Information Technology at
AMA Computer College Lucena Campus. She is graduated her elementary at
Naga-Naga Elementary School and finish her high school at Palo National High
School, Province of Leyte.
148
Download