Chuck Stuart Basa Sotto
Chuck Stuart Basa Sotto
Thesis/Dissertation Adviser:
Concepcion L. Khan
Faculty of Information and Communication Studies
Date of Submission
8 June 2021
Student’s Signature:
Signature of Thesis/Dissertation/Adviser:
University Permission Page
e-BAGAM |i
Acceptance Page
e - B A G A M | ii
Acknowledgement
I would first like to thank my thesis advisor Assoc. Prof. Concepcion L. Khan of the
Master of Information Systems at University of the Philippines Open University. Prof.
Khan's email was always open whenever I ran into a trouble spot or had a question about
my research or writing. She consistently allowed this paper to be my work but steered me
in the right direction whenever she thought I needed it.
I would also like to thank the experts who were involved in the validation of this
research project: Dr. Alexander G. Flor and the rest of the Faculty of Information and
Communication Studies. Without their passionate participation and inputs, the
completeness of the project could not have been successfully conducted.
Finally, I must express my very profound gratitude to the Lord Almighty for the
guidance throughout the process. I also want to give my utmost thanks to my parents and
to my partner for providing me with unfailing support and continuous encouragement
throughout my years of study and through the process of researching and writing this
thesis. This accomplishment would not have been possible without them. Thank you.
e - B A G A M | iii
Abstract
The information system aims to aid the barangay in resolving incidents within the
community. The researcher was able to identify the problems within the community that
contributes to the unresolved and unreported incidents. One of the problems that were
identified as the inability to report an incident due to distance from the Barangay Hall to do it
personally, this was addressed through the addition of the SMS feature of e-BAGAM from
which it uses a local API that processes the incoming SMS. The problem of the provision of
immediate response to the incidents from which could be resolved within the area was also
addressed by e-BAGAM through the incident management by assigning the incident to the
appropriate Team Leader of the Area. Another feature of the information system is the ability
to provide the registered users with the status of their reported incident which is also available
The researcher used the 4+1 approach as a guide in Software Architecture wherein
this model focuses on the viewpoint of different stakeholders. The views considered were
necessary for the software development from which some were changed a bit to suffice those
that are necessary to the information system. The researcher was able to identify Use Case
View, Logical View, Data View, and the Development view as the views necessary for e-
BAGAM. Using this method the researcher was able to identify those modules and classes
that are necessary to the information system from which contributed to its success.
e - B A G A M | iv
Table of Contents
V. Conclusion ------------------------------------------------------------------------------------------- 19
References ----------------------------------------------------------------------------------------------- 21
Appendices ----------------------------------------------------------------------------------------------- 22
e-BAGAM |v
List of Figures
e - B A G A M | vi
Chapter I
The barangay, being the smallest administrative division in the Philippines that has
jurisdiction to amicably settle all disputes between parties residing in the community,
This study is directed to address the unreported incidents within the community
and aims to improve service delivery through answering the following questions:
• Will all the reported incidents within the community to be reported and acted
• Can the barangay officials keep track of the status of reported incidents?
• Were the people that reported an incident to the barangay able to keep track
e-BAGAM |1
2. Background and Objectives of the Project
barangays are unable to cope up with the current trends in terms of technology. One
of which is Barangay Irisan from wherein the barangay currently does not have an
community. Most of the time the Barangay Secretary takes note of the incident through
encoding it on their file saved at the computer and through writing it on the logbook.
The process then continues with the reported incidents measured by severity to be
decided by the Barangay Officials. Immediate action will be initiated by the barangay
from which the issues with a low priority are often left unresolved.
Some of the members of the community were not able to file an incident to the
barangay for the reason that they live far from the barangay and would cost them much
The funds for the Barangay do not include the provision of internet connectivity to
the barangay from which is a necessity nowadays to be able to reach out to the
the personal mobile load of the Barangay Official and by then the Queries sent online
information system that caters to those reports by the constituents that live afar from
e-BAGAM |2
3. Significance and Scope of the Project
It is crucial that incidents are reported immediately or at least within the day of their
raises the awareness of Barangay Officials on things that could go wrong so that
The study aims to bridge the gap between the members of the community and its
The researcher aims to assist the barangay officials through the provision of an
community. The information system can gather inquiries through user input and
through SMS to cater to those members of the community that lives far from the
Barangay Hall. Having an information system for incidents will have a great impact on
• Better end-user satisfaction rate from the residents because of the immediate
response to incidents.
For the above mentioned the researcher now then made an information system
that has two modules, the administrator module, and the user module, whereas the
• Residents who are not registered on the system cannot log in to the system
• The information system targets the Barangays that has no internet connection
e-BAGAM |3
and could receive still receive SMS from the residents
• Residents that sent SMS to the information system automatically will reflect on
• User is not limited to sending an SMS but can also register to the system to file
a complaint
• The system can still be improved by adding an option to reply to the sent SMS,
e-BAGAM |4
4. Documentation of Existence and Seriousness of the Problem
Incident reporting has been around for quite some time and this is designed to
improve safety in the community. The barangay officials also need to understand
why incident reporting makes a huge difference in terms of safety in the community,
residents in the community. Here are the three reasons why incident reporting is
would help the barangay identify the severity of an incident and from this, the
barangay officials could now prioritize those that are in dire need of help from
them.
resolution to the problems of the residents and also the provision of an immediate
resolution to reported incidents. The project will provide the barangay officials aid
through an information system that will systematize their records of incidents and
would provide them the capability to monitor the status of the reported incidents.
e-BAGAM |5
Chapter II
There are numerous information systems for barangay management that exist
and some of which are Hybrid Barangay Information Management System by Rogelio
Bon Intud Jr. which is mainly focused on automation of the current processes and
transactions in the barangay. The information system also records and monitors the
data and has a functional responsive web portal. The information system aims to
reduce the waiting time of the client by automating the generation of barangay-
requirements and is based on the Barangay Citizen's Charter. This gives priority to the
client's request. The Barangay Poblacion Incident Recording System is where the
complaints of the client are kept a record in a local computer. The Barangay Poblacion
Project Monitoring System is where the effective monitoring of projects is taken into
accountability in the barangay. The Barangay Poblacion Profiling System is where the
collecting, analyzing, and documenting necessary information that defines the current
barangay profile. It covers the census, organizational chart, vision and mission, and
barangay status. This proposal doesn't mention closing an incident case (hearing),
system that uses the SMS Notification feature for announcements on the users. the
Barangay Management Information System. This is a system that will display the
e-BAGAM |6
master list, profiles, population, information about the Barangay constituents, and the
certificate that is being required of the constituents this system has SMS support to
researcher was able to gather data from which the e-BAGAM could capitalize. The
information system which is the ability to receive inquiries through SMS which is also
present at the Online Barangay Management Information System but the problem is
the information system needs to be deployed and hosted online and also the SMS
capability of this information system is mostly outbound and there is no way that they
can check incoming SMS. The researcher then made a localized API that catches the
needed information on all of the incoming SMS which in this case is the incidents
reported by our residents. Having been able to know the incident immediately through
SMS prompts the barangay officials to deliver the necessary services that the
residents need. Also, the information system can monitor the status of their report from
which is very essential to the residents because another problem with existing
information systems that are on the Barangay level is that the information system is
not collaborative and engaging to the people. The residents need to know this so that
the process is not repetitive and we can start with this information system by
e-BAGAM |7
Chapter III
PROJECT PLAN
Methodology
The researcher used some of the views defined in the 4+1 model by
users.
Describes the actors and use cases for the system, this view
• Logical View
o Audience: Designers.
e-BAGAM |8
• Data View
• Development View
This will give additional context on the usage of our system and the interactions
Between the components. 2.1 Lists the actors and has a brief description for each
in overall use of the system. 2.2 shows the most common use-cases and is an
outline and illustrated using UML diagrams and sequence diagrams for the
2.1. Actors
Barangay Official
The barangay official will be utilizing the admin page from which he or
she can manage Incidents, Action Team Leaders, and Area Team Leader.
e-BAGAM |9
Walk-in User
and logging in to the information system. The user could manage his/her
SMS User
The SMS user is not needed to access the information system. The
validation.
User is registered and User is redirected to the User Page when Already
Registered.
e - B A G A M | 10
Figure 2. User Registration Sequence Diagram
Users (via SMS and Walk-in) file a report and was received by the
Barangay Official then updates the status upon assigning to the proper Area
Team Leader.
e - B A G A M | 11
Figure 4. Incident Reporting Sequence Diagram
The Barangay Official updates the status of the reported incident. The incident
e - B A G A M | 12
Figure 6. Incident Updating Sequence Diagram
3. Logical View
The components are defined in this wherein we can define interfaces through
which they will communicate and interact with one another. The need to isolate the
components is the reason for defining the system components from which we could
4. Data View
Using the Data Flow Diagram, we can further picture how data will flow between
e - B A G A M | 13
Figure 8. Incident Reporting Level 0 Data Flow Diagram
e - B A G A M | 14
5. Deployment View
The Application will be hosted locally with a running Apache and MySQL server.
The application will include an internal API for handling SMS then used by the
information system for processing the newly reported incidents by the residents.
e - B A G A M | 15
Chapter IV
Given limited time the researcher was able to gather data from the barangay
officials as to what they wanted with the system to be able to have an information
system that can gather all the reported incidents regardless of the distance from the
Barangay Hall, Able to help the officials provide an immediate response to the
constituents, Status update as to the progress of the reported incident and of which
the registered residents on the information system can also monitor their filed
complaint.
Upon interviewing with the barangay official, the researcher was able to identify
that one of the problems that they wanted to resolve was to be able to cater to those
residents that live far from the barangay hall wherein some of them choose not to
report an incident. To be able to cater to the specific problem, the researcher now then
integrated SMS feature to the information system wherein the system is capable of
gathering incidents send through text. This solution made the officials happy because
not only it was cost-efficient but also, they said that they could improve service delivery
in the future.
system would provide them with a Cluster-Based approach to resolve a problem that
clustering is per area and geographical location of the residents which in the case of
e - B A G A M | 16
information system that caters the inquiries on the barangay wherein the majority of
them answered that needed to know the status of their reported incident through the
information system. The researcher then added a module on the information system
for user registration wherein they could monitor their report from the barangay.
With the mentioned features of the system added the researcher now then
conducted a usability assessment using usability scale by John Brooke in 1986 on the
evaluation of the respondents towards the functionality and usability of the e-BAGAM
information system. The responses were tallied and statistically treated to facilitate the
Initially, the users were asked to rate the prototype using the same system
usability scale from which the average was around 75 to 82.5 which was relatively low
and this was a good time for the researcher to gather more data that the officials need
for the proposed information system. Among of the revision that the prototype was
slow and causes their computer to crash even when doing office-related tasks, the
officials also inquired if it is possible for them to have a web-based application which
operates offline and the last one is they simply wanted an information system that is
With the inputs gathered from the respondents, the researcher then revised the
localhost. The researcher then placed all the inputs from the users to the information
The respondents were barangay officials and the majority of them answered
the odd-numbered questions with 4 to 5 points and the even-numbered questions with
1 to 3 wherein indicates that the users were able to understand and will able to use
the information system. In general, the respondents were able to rate the information
e - B A G A M | 17
system in the range of 87.5 to 95. The response from the users indicates that they are
e - B A G A M | 18
Chapter V
CONCLUSION
delivery of service within the barangay through reaching out to the residents using the
easiest and available option to be able to report incidents. The information system was
SMS feature was added to cover all of the inquiries regardless of the distance to the
The information system can manage the incoming incidents through the Admin
or Chairman's page from which he can provide immediate resolution or assign the
incident to other barangay officials. The researcher made sure that there is a user
input in case the barangay official updates the status of the incident and this is
inclusive of the security feature wherein the timestamp of editing will be included in the
e-BAGAM also provides the Administrator access to monitor the status of the
Pending Grievance, and Closed Grievance. Defining each of the statuses we state
that Newly Received Grievance is for incoming reported incidents, Pending Grievance
are incidents that are assigned to Officials and tagged as being acted upon, and the
last is Closed Grievances which are the reported incidents that are either closed
because it was already resolved or closed because it was escalated on higher justice
implementing body. The registered residents could view the status of their reported
incident through the user's page wherein they can also check on who is acting upon
their report.
e - B A G A M | 19
Chapter VI
RECOMMENDATIONS
excellent service delivery on barangays. With this being said further studies on the
• Since the information system made has an API for incoming messages. The
information system can also do reply to the incoming messages. The Addition
of a reply or assign to the area team leader module can be added for proper
• Inclusion of notification system from which the numbers who texted their report
to the system will be notified when the status of their inquiry was updated.
• Inclusion of web-based API that also gathers messages which can be used by
e - B A G A M | 20
REFERENCES
e - B A G A M | 21
APPENDICES
e - B A G A M | 22
• <h3>Barangay Action Officer</h3>
• </div>
• <div class="module-body">
•
• <?php if(isset($_POST['submit']))
• {?>
• <div class="alert alert-success">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Well done!</strong> <?php echo
htmlentities($_SESSION['msg']);?><?php echo htmlentities($_SESSION['msg']
="");?>
• </div>
• <?php } ?>
•
• <?php if(isset($_GET['del']))
• {?>
• <div class="alert alert-error">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Oh snap!</strong> <?php echo
htmlentities($_SESSION['delmsg']);?><?php echo htmlentities($_SESSION['de
lmsg']="");?>
• </div>
• <?php } ?>
•
• <br />
•
• <form class="form-horizontal row-
fluid" name="Action Officer" method="post" >
•
• <div class="control-group">
• <label class="control-label" for="basicinput">Action Officer Name</label>
• <div class="controls">
• <input type="text" placeholder="Enter Action Officer" name="category" cla
ss="span8 tip" required>
• </div>
• </div>
•
• <div class="control-group">
• <label class="control-
label" for="basicinput">Description</label>
• <div class="controls">
• <textarea class="span8" na
me="description" rows="5"></textarea>
• </div>
• </div>
•
• <div class="control-group">
• <div class="controls">
• <button type="submit" name
="submit" class="btn">Create</button>
• </div>
• </div>
• </form>
• </div>
• </div>
•
• <div class="module">
• <div class="module-head">
• <h3>Manage Categories</h3>
• </div>
e - B A G A M | 23
• <div class="module-body table">
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-
striped display" width="100%">
• <thead>
• <tr>
• <th>#</th>
• <th>Action Officer</th>
• <th>Description</th>
• <th>Creation date</th>
• <th>Last Updated</th>
• <th>Action</th>
• </tr>
• </thead>
• <tbody>
•
• <?php $query=mysqli_query($con,"select * from category");
• $cnt=1;
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td><?php echo htmlentities($c
nt);?></td>
• <td><?php echo htmlentities($r
ow['categoryName']);?></td>
• <td><?php echo htmlentities($r
ow['categoryDescription']);?></td>
• <td> <?php echo htmlentities($
row['creationDate']);?></td>
• <td><?php echo htmlentities($r
ow['updationDate']);?></td>
• <td>
• <a href="edit-
category.php?id=<?php echo $row['id']?>" ><i class="icon-edit"></i></a>
• <a href="category.php?id=<?php
echo $row['id']?>&del=delete" onClick="return confirm('Are you sure you w
ant to delete?')"><i class="icon-remove-sign"></i></a></td>
• </tr>
• <?php $cnt=$cnt+1; } ?>
•
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
e - B A G A M | 24
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Change password
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• if(isset($_POST['submit']))
• {
• $sql=mysqli_query($con,"SELECT password FROM admin where password='".md5(
$_POST['password'])."' && username='".$_SESSION['alogin']."'");
• $num=mysqli_fetch_array($sql);
• if($num>0)
• {
• $con=mysqli_query($con,"update admin set password='".md5($_POST['newpassw
ord'])."', updationDate='$currentTime' where username='".$_SESSION['alogin
']."'");
• $_SESSION['msg']="Password Changed Successfully !!";
• }
• else
• {
• $_SESSION['msg']="Old Password not match !!";
• }
• }
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="The change password page.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Change Password</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
e - B A G A M | 25
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• <script type="text/javascript">
• function valid()
• {
• if(document.chngpwd.password.value=="")
• {
• alert("Current Password Filed is Empty !!");
• document.chngpwd.password.focus();
• return false;
• }
• else if(document.chngpwd.newpassword.value=="")
• {
• alert("New Password Filed is Empty !!");
• document.chngpwd.newpassword.focus();
• return false;
• }
• else if(document.chngpwd.confirmpassword.value=="")
• {
• alert("Confirm Password Filed is Empty !!");
• document.chngpwd.confirmpassword.focus();
• return false;
• }
• else if(document.chngpwd.newpassword.value!= document.chngpwd.confirmpassw
ord.value)
• {
• alert("Password and Confirm Password Field do not match !!");
• document.chngpwd.confirmpassword.focus();
• return false;
• }
• return true;
• }
• </script>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Admin Change Password</h3>
• </div>
• <div class="module-body">
•
• <?php if(isset($_POST['submit']))
• {?>
• <div class="alert alert-success">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <?php echo htmlentities($_SESSION[
'msg']);?><?php echo htmlentities($_SESSION['msg']="");?>
• </div>
• <?php } ?>
e - B A G A M | 26
• <br />
•
• <form class="form-horizontal row-
fluid" name="chngpwd" method="post" onSubmit="return valid();">
•
• <div class="control-group">
• <label class="control-label" for="basicinput">Current Password</label>
• <div class="controls">
• <input type="password" placeholder="Enter your current Password" name="pa
ssword" class="span8 tip" required>
• </div>
• </div>
•
• <div class="control-group">
• <label class="control-label" for="basicinput">New Password</label>
• <div class="controls">
• <input type="password" placeholder="Enter your new current Password" name
="newpassword" class="span8 tip" required>
• </div>
• </div>
•
• <div class="control-group">
• <label class="control-label" for="basicinput">Current Password</label>
• <div class="controls">
• <input type="password" placeholder="Enter your new Password again" name="
confirmpassword" class="span8 tip" required>
• </div>
• </div>
•
•
•
• <div class="control-group">
• <div class="controls">
• <button type="submit" name
="submit" class="btn">Submit</button>
• </div>
• </div>
• </form>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• </body>
e - B A G A M | 27
• <?php } ?>
• Closed Complaint
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Manage Grievance</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• <script language="javascript" type="text/javascript">
• var popUpWin=0;
• function popUpWindow(URLStr, left, top, width, height)
• {
• if(popUpWin)
• {
• if(!popUpWin.closed) popUpWin.close();
• }
• popUpWin = open(URLStr,'popUpWin', 'toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+5
00+',height='+600+',left='+left+', top='+top+',screenX='+left+',screenY='+
top+'');
• }
•
• </script>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Resolved Grievances</h3>
• </div>
• <div class="module-body table">
e - B A G A M | 28
•
•
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-striped display" >
• <thead>
• <tr>
• <th>Grievance No</th>
• <th> complainant Name</th>
• <th>Reg Date</th>
• <th>Status</th>
•
• <th>Action</th>
•
•
• </tr>
• </thead>
•
• <tbody>
• <?php
• $st='closed';
• $query=mysqli_query($con,"select tblcomplaints.*,users.fullName as name fr
om tblcomplaints join users on users.id=tblcomplaints.userId where tblcomp
laints.status='$st'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td><?php echo htmlentities($r
ow['complaintNumber']);?></td>
• <td><?php echo htmlentities($r
ow['name']);?></td>
• <td><?php echo htmlentities($r
ow['regDate']);?></td>
•
• <td><button type="button" clas
s="btn btn-success">Closed</button></td>
•
• <td> <a href="complaint-
details.php?cid=<?php echo htmlentities($row['complaintNumber']);?>"> View
Details</a>
• </td>
• </tr>
•
• <?php } ?>
• </tbody>
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
e - B A G A M | 29
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Complaint details
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="Contains the grievance details.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Grievance Details</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• <script language="javascript" type="text/javascript">
• var popUpWin=0;
• function popUpWindow(URLStr, left, top, width, height)
• {
• if(popUpWin)
• {
• if(!popUpWin.closed) popUpWin.close();
• }
• popUpWin = open(URLStr,'popUpWin', 'toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+6
00+',height='+600+',left='+left+', top='+top+',screenX='+left+',screenY='+
top+'');
e - B A G A M | 30
• }
•
• </script>
•
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
•
•
• <div class="module">
• <div class="module-head">
• <h3>Grievance Details</h3>
• </div>
• <div class="module-body table">
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-
striped display" width="100%">
•
• <tbody>
•
• <?php $st='closed';
• $query=mysqli_query($con,"select tblcomplaints.*,users.fullName as name,ca
tegory.categoryName as catname from tblcomplaints join users on users.id=t
blcomplaints.userId join category on category.id=tblcomplaints.category wh
ere tblcomplaints.complaintNumber='".$_GET['cid']."'");
• while($row=mysqli_fetch_array($query))
• {
•
• ?>
• <tr>
• <td><b>Grievance Number</b></t
d>
• <td><?php echo htmlentities($r
ow['complaintNumber']);?></td>
• <td><b>Complainant Name</b></t
d>
• <td> <?php echo htmlentities($
row['name']);?></td>
• <td><b>Reg Date</b></td>
• <td><?php echo htmlentities($r
ow['regDate']);?>
• </td>
• </tr>
•
• <tr>
• <td><b>Action Officer </b></td
>
• <td><?php echo htmlentities($r
ow['catname']);?></td>
• <td><b>Area Team Leader</b></t
d>
• <td> <?php echo htmlentities($
row['subcategory']);?></td>
• <td><b>Grievance Type</b></td>
e - B A G A M | 31
• <td><?php echo htmlentities($r
ow['complaintType']);?>
• </td>
• </tr>
• <tr>
• <td><b>Street/Purok/DIstrict <
/b></td>
• <td><?php echo htmlentities($r
ow['street']);?></td>
• <td ><b>Nature of Grievance</b
></td>
• <td colspan="3"> <?php echo ht
mlentities($row['noc']);?></td>
•
• </tr>
• <tr>
• <td><b>Grievance Details </b><
/td>
•
• <td colspan="5"> <?php echo ht
mlentities($row['complaintDetails']);?></td>
•
• </tr>
•
• </tr>
• <tr>
• <td><b>File(if any) </b></td>
•
• <td colspan="5"> <?php $cfile=
$row['complaintFile'];
• if($cfile=="" || $cfile=="NULL")
• {
• echo "File NA";
• }
• else{?>
• <a href="../users/complaintdocs/<?php echo htmlentities($row['complaintFil
e']);?>" target="_blank"/> View File</a>
• <?php } ?></td>
• </tr>
•
• <tr>
• <td><b>Final Status</b></td>
•
• <td colspan="5"><?php if($row[
'status']=="")
• { echo "Newly Received";
• } else {
• echo htmlentities($row['status'])
;
• }?></td>
•
• </tr>
•
• <?php $ret=mysqli_query($con,"select complaintremark.remark as remark,comp
laintremark.status as sstatus,complaintremark.remarkDate as rdate from com
plaintremark join tblcomplaints on tblcomplaints.complaintNumber=complaint
remark.complaintNumber where complaintremark.complaintNumber='".$_GET['cid
']."'");
• while($rw=mysqli_fetch_array($ret))
• {
• ?>
• <tr>
e - B A G A M | 32
• <td><b>Remark</b></td>
• <td colspan="5"><?php echo htmlentities($rw['remark']); ?> <b>Remark Date
:</b><?php echo htmlentities($rw['rdate']); ?></td>
• </tr>
•
• <tr>
• <td><b>Status</b></td>
• <td colspan="5"><?php echo htmlentities($rw['sstatus']); ?></td>
• </tr>
• <?php }?>
•
• <tr>
• <td><b>Action</b></td>
•
• <td>
• <?php if($row['status']=="clos
ed"){
•
• } else {?>
• <a href="javascript:void(0);" onClick="popUpWindow('http://localhost/cms/a
dmin/updatecomplaint.php?cid=<?php echo htmlentities($row['complaintNumber
']);?>');" title="Update order">
• <button type="button" class="
btn btn-primary">Take Action</button></td>
• </a><?php } ?></td>
• <td colspan="4">
• <a href="javascript:void(0);"
onClick="popUpWindow('http://localhost/cms/admin/userprofile.php?uid=<?php
echo htmlentities($row['userId']);?>');" title="Update order">
• <button type="button" class="
btn btn-primary">View User Detials</button></a></td>
•
• </tr>
• <?php } ?>
•
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
e - B A G A M | 33
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Edit category
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
•
• if(isset($_POST['submit']))
• {
• $category=$_POST['category'];
• $description=$_POST['description'];
• $id=intval($_GET['id']);
• $sql=mysqli_query($con,"update category set categoryName='$category',categ
oryDescription='$description' where id='$id'");
• $_SESSION['msg']="Action Officer Updated !!";
•
• }
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="Area to change or edit Barangay Acti
on head.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Action Officer</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
e - B A G A M | 34
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Action Officer</h3>
• </div>
• <div class="module-body">
•
• <?php if(isset($_POST['submit']))
• {?>
• <div class="alert alert-success">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Well done!</strong> <?php echo
htmlentities($_SESSION['msg']);?><?php echo htmlentities($_SESSION['msg']
="");?>
• </div>
• <?php } ?>
•
• <br />
•
• <form class="form-horizontal row-
fluid" name="Action Officer" method="post" >
• <?php
• $id=intval($_GET['id']);
• $query=mysqli_query($con,"select * from category where id='$id'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <div class="control-group">
• <label class="control-label" for="basicinput">Action Officer Name</label>
• <div class="controls">
• <input type="text" placeholder="Enter Action Officer" name="category" val
ue="<?php echo htmlentities($row['categoryName']);?>" class="span8 tip" r
equired>
• </div>
• </div>
•
• <div class="control-group">
• <label class="control-
label" for="basicinput">Description</label>
• <div class="controls">
• <textarea class="span8" na
me="description" rows="5"><?php echo htmlentities($row['categoryDescripti
on']);?></textarea>
• </div>
• </div>
• <?php } ?>
•
• <div class="control-group">
• <div class="controls">
• <button type="submit" name
="submit" class="btn">Update</button>
• </div>
• </div>
• </form>
• </div>
• </div>
•
•
•
e - B A G A M | 35
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Edit street
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
•
• if(isset($_POST['submit']))
• {
• $street=$_POST['street'];
• $description=$_POST['description'];
• $id=intval($_GET['id']);
• $sql=mysqli_query($con,"update street set streetName='$street',streetDescr
iption='$description' where id='$id'");
• $_SESSION['msg']="Street/Purok/DIstrict info Updated !!";
•
• }
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="Area to edit Purok/Streek/Area.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
e - B A G A M | 36
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Street/Purok/DIstrict</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Street/Purok/DIstrict</h3>
• </div>
• <div class="module-body">
•
• <?php if(isset($_POST['submit']))
• {?>
• <div class="alert alert-success">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Well done!</strong> <?php echo
htmlentities($_SESSION['msg']);?><?php echo htmlentities($_SESSION['msg']
="");?>
• </div>
• <?php } ?>
•
• <br />
•
• <form class="form-horizontal row-
fluid" name="Action Officer" method="post" >
• <?php
• $id=intval($_GET['id']);
• $query=mysqli_query($con,"select * from street where id='$id'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <div class="control-group">
• <label class="control-
label" for="basicinput">Street/Purok/DIstrict Name</label>
• <div class="controls">
• <input type="text" placeholder="Enter Action Officer" name="street" value
="<?php echo htmlentities($row['streetName']);?>" class="span8 tip" requi
red>
• </div>
• </div>
•
• <div class="control-group">
• <label class="control-
label" for="basicinput">Description</label>
e - B A G A M | 37
• <div class="controls">
• <textarea class="span8" name="description" rows="5"><?php echo htmlentiti
es($row['streetDescription']);?></textarea></div>
• </div>
• <?php } ?>
•
• <div class="control-group">
• <div class="controls">
• <button type="submit" name
="submit" class="btn">Update</button>
• </div>
• </div>
• </form>
• </div>
• </div>
•
•
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Edit subcategory
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
e - B A G A M | 38
•
• if(isset($_POST['submit']))
• {
• $category=$_POST['category'];
• $subcat=$_POST['subcategory'];
• $id=intval($_GET['id']);
• $sql=mysqli_query($con,"update subcategory set categoryid='$category',subc
ategory='$subcat' where id='$id'");
• $_SESSION['msg']="Action Officer Updated !!";
•
• }
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="Area to edit the Area Leader.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Edit Area Team Leader</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Edit Area Team Leader</h3>
• </div>
• <div class="module-body">
•
• <?php if(isset($_POST['submit']))
• {?>
• <div class="alert alert-success">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Well done!</strong> <?php echo
htmlentities($_SESSION['msg']);?><?php echo htmlentities($_SESSION['msg']
="");?>
• </div>
• <?php } ?>
•
• <br />
•
• <form class="form-horizontal row-
fluid" name="Action Officer" method="post" >
• <?php
e - B A G A M | 39
• $id=intval($_GET['id']);
• $query=mysqli_query($con,"select category.id,category.categoryName,subcate
gory.subcategory from subcategory join category on category.id=subcategory
.categoryid where subcategory.id='$id'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
•
• <div class="control-group">
• <label class="control-label" for="basicinput">Action Officer</label>
• <div class="controls">
• <select name="category" class="span8 tip" required>
• <option value="<?php echo htmlentities($row['id']);?>"><?php echo htmlenti
ties($catname=$row['categoryName']);?></option>
• <?php $ret=mysqli_query($con,"select * from category");
• while($result=mysqli_fetch_array($ret))
• {
• $cat=$result['categoryName'];
• if($catname=$cat)
• {
• continue;
• }
• else{
• ?>
• <option value="<?php echo $result['id'];?>"><?php echo $result['categoryNa
me'];?></option>
• <?php } }?>
• </select>
• </div>
• </div>
•
• <div class="control-group">
• <label class="control-
label" for="basicinput">Area Team Leader Name</label>
• <div class="controls">
• <input type="text" placeholder="Enter Action Officer" name="subcategory"
value="<?php echo htmlentities($row['subcategory']);?>" class="span8 tip"
required>
• </div>
• </div>
•
• <?php } ?>
•
• <div class="control-group">
• <div class="controls">
• <button type="submit" name
="submit" class="btn">Update</button>
• </div>
• </div>
• </form>
• </div>
• </div>
•
•
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
e - B A G A M | 40
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Get subcat
• <?php
• include('include/config.php');
• if(!empty($_POST["cat_id"]))
• {
• $id=intval($_POST['cat_id']);
• $query=mysql_query("SELECT * FROM subcategory WHERE categoryid=$id");
• ?>
• <option value="">Select Subcategory</option>
• <?php
• while($row=mysql_fetch_array($query))
• {
• ?>
• <option value="<?php echo htmlentities($row['id']); ?>"><?php echo htmle
ntities($row['subcategory']); ?></option>
• <?php
• }
• }
• ?>
• Index
• <?php
• session_start();
• error_reporting(0);
• include("include/config.php");
• if(isset($_POST['submit']))
• {
• $username=$_POST['username'];
• $password=md5($_POST['password']);
• $ret=mysqli_query($con,"SELECT * FROM admin WHERE username='$username' and
password='$password'");
• $num=mysqli_fetch_array($ret);
• if($num>0)
e - B A G A M | 41
• {
• $extra="change-password.php";//
• $_SESSION['alogin']=$_POST['username'];
• $_SESSION['id']=$num['id'];
• $host=$_SERVER['HTTP_HOST'];
• $uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
• header("location:http://$host$uri/$extra");
• exit();
• }
• else
• {
• $_SESSION['errmsg']="Invalid username or password";
• $extra="index.php";
• $host = $_SERVER['HTTP_HOST'];
• $uri = rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
• header("location:http://$host$uri/$extra");
• exit();
• }
• }
• ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="The Landing Page.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>e-BAGAM | Admin login</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• </head>
• <body>
•
• <div class="navbar navbar-fixed-top">
• <div class="navbar-inner">
• <div class="container">
• <a class="btn btn-navbar" data-toggle="collapse" data-
target=".navbar-inverse-collapse">
• <i class="icon-reorder shaded"></i>
• </a>
•
• <a class="brand" href="index.html">
• e-BAGAM | Admin
• </a>
•
• <div class="nav-collapse collapse navbar-inverse-
collapse">
•
• <ul class="nav pull-right">
•
• <li><a href="http://localhost/cms/">
• Back to Portal
•
• </a></li>
•
e - B A G A M | 42
•
•
•
• </ul>
• </div><!-- /.nav-collapse -->
• </div>
• </div><!-- /navbar-inner -->
• </div><!-- /navbar -->
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <div class="module module-login span4 offset4">
• <form class="form-vertical" method="post">
• <div class="module-head">
• <h3>Sign In</h3>
• </div>
• <span style="color:red;" ><?php echo htmlentities(
$_SESSION['errmsg']); ?><?php echo htmlentities($_SESSION['errmsg']="");?>
</span>
• <div class="module-body">
• <div class="control-group">
• <div class="controls row-fluid">
• <input class="span12" type="text" id="
inputEmail" name="username" placeholder="Username">
• </div>
• </div>
• <div class="control-group">
• <div class="controls row-fluid">
• <input class="span12" type="password" id="inputPas
sword" name="password" placeholder="Password">
• </div>
• </div>
• </div>
• <div class="module-foot">
• <div class="control-group">
• <div class="controls clearfix">
• <button type="submit" class="btn btn-
primary pull-right" name="submit">Login</button>
•
• </div>
• </div>
• </div>
• </form>
• </div>
• </div>
• </div>
• </div><!--/.wrapper-->
•
• <div class="footer">
• <div class="container">
•
•
• <b class="copyright">© 2021 e-BAGAM: Barangay SMS-
Based Grievance with Action Team Management System </b> All rights reserve
d.
• </div>
• </div>
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
e - B A G A M | 43
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• </body>
• Inprocess Complaint
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="The complaint that is on the process
.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Manage Grievance</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• <script language="javascript" type="text/javascript">
• var popUpWin=0;
• function popUpWindow(URLStr, left, top, width, height)
• {
• if(popUpWin)
• {
• if(!popUpWin.closed) popUpWin.close();
• }
• popUpWin = open(URLStr,'popUpWin', 'toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+5
00+',height='+600+',left='+left+', top='+top+',screenX='+left+',screenY='+
top+'');
• }
•
• </script>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
e - B A G A M | 44
•
• <div class="module">
• <div class="module-head">
• <h3>On the process Grievances</h3>
• </div>
• <div class="module-body table">
•
•
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-striped display" >
• <thead>
• <tr>
• <th>Grievance No</th>
• <th> complainant Name</th>
• <th>Reg Date</th>
• <th>Status</th>
•
• <th>Action</th>
•
•
• </tr>
• </thead>
•
• <tbody>
• <?php
• $st='in process';
• $query=mysqli_query($con,"select tblcomplaints.*,users.fullName as name fr
om tblcomplaints join users on users.id=tblcomplaints.userId where tblcomp
laints.status='$st'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td><?php echo htmlentities($r
ow['complaintNumber']);?></td>
• <td><?php echo htmlentities($r
ow['name']);?></td>
• <td><?php echo htmlentities($r
ow['regDate']);?></td>
•
• <td><button type="button" clas
s="btn btn-warning">In Process</button></td>
•
• <td> <a href="complaint-
details.php?cid=<?php echo htmlentities($row['complaintNumber']);?>"> View
Details</a>
• </td>
• </tr>
•
• <?php } ?>
• </tbody>
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
e - B A G A M | 45
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Logout
• <?php
• session_start();
• $_SESSION['alogin']=="";
• session_unset();
• //session_destroy();
• $_SESSION['errmsg']="You have successfully logout";
• ?>
• <script language="javascript">
• document.location="index.php";
• </script>
• Manage Users
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• if(isset($_GET['uid']) && $_GET['action']=='del')
• {
• $userid=$_GET['uid'];
• $query=mysqli_query($con,"delete from users where id='$userid'");
• header('location:manage-users.php');
• }
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
e - B A G A M | 46
• <head>
• <meta name="description" content="manage registered barangay constitue
nts.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Manage Users</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• <script language="javascript" type="text/javascript">
• var popUpWin=0;
• function popUpWindow(URLStr, left, top, width, height)
• {
• if(popUpWin)
• {
• if(!popUpWin.closed) popUpWin.close();
• }
• popUpWin = open(URLStr,'popUpWin', 'toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+6
00+',height='+600+',left='+left+', top='+top+',screenX='+left+',screenY='+
top+'');
• }
•
• </script>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Manage Barangay Constituents</h3>
• </div>
• <div class="module-body table">
•
•
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-
striped display" width="100%">
• <thead>
• <tr>
• <th>#</th>
• <th> Name</th>
• <th>Email </th>
• <th>Contact no</th>
• <th>Reg. Date </th>
• <th>Action</th>
•
• </tr>
e - B A G A M | 47
• </thead>
• <tbody>
•
• <?php $query=mysqli_query($con,"select * from users");
• $cnt=1;
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td><?php echo htmlentities($c
nt);?></td>
• <td><?php echo htmlentities($r
ow['fullName']);?></td>
• <td><?php echo htmlentities($r
ow['userEmail']);?></td>
• <td> <?php echo htmlentities($
row['contactNo']);?></td>
•
• <td><?php echo htmlentities($r
ow['regDate']);?></td>
•
• <td><a href="javascript:void(0);" onClick="popUpWindow('http://localhost/c
ms/admin/userprofile.php?uid=<?php echo htmlentities($row['id']);?>');" ti
tle="View Details">
• <button type="button" class="btn btn-primary">View Detials</button>
• </a>
• <a href="manage-
users.php?uid=<?php echo htmlentities($row['id']);?>&&action=del" title="D
elete" onClick="return confirm('Do you really want to delete ?')">
• <button type="button" class="btn btn-danger">Delete</button></a>
•
• </td>
•
• <?php $cnt=$cnt+1; } ?>
•
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
e - B A G A M | 48
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Pending Complaint
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• echo "<pre>";
• shell_exec('taskkill/f /im node.exe');
• echo "</pre>";
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="Newly Created Complaints Either by S
MS or by logging in to the system.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Manage Grievance</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• <script language="javascript" type="text/javascript">
• var popUpWin=0;
• function popUpWindow(URLStr, left, top, width, height)
• {
• if(popUpWin)
• {
• if(!popUpWin.closed) popUpWin.close();
• }
• popUpWin = open(URLStr,'popUpWin', 'toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+5
00+',height='+600+',left='+left+', top='+top+',screenX='+left+',screenY='+
top+'');
• }
•
• </script>
e - B A G A M | 49
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Incoming Grievance</h3>
• <td><button type="button" class="btn btn-
success" onClick="popUpWindow('http://localhost/cms/modemgsm/jsontosql.php
')">Check SMS</button></td>
• <td><button type="button" class="btn btn-
warning" onClick="popUpWindow('http://localhost/cms/modemgsm/deletesmsmsg.
php')">Delete old SMS</button></td>
• </div>
• <div class="module-body table">
•
•
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-striped display" >
• <thead>
• <tr>
• <th>Grievance No</th>
• <th> complainant Name</th>
• <th>Reg Date</th>
• <th>Status</th>
•
• <th>Action</th>
•
•
• </tr>
• </thead>
•
• <tbody>
• <?php
• $query=mysqli_query($con,"select tblcomplaints.*,users.fullName as name fr
om tblcomplaints join users on users.id=tblcomplaints.userId where tblcomp
laints.status is null ");
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td><?php echo htmlentities($r
ow['complaintNumber']);?></td>
• <td><?php echo htmlentities($r
ow['name']);?></td>
• <td><?php echo htmlentities($r
ow['regDate']);?></td>
•
• <td><button type="button" clas
s="btn btn-danger">Newly Received</button></td>
•
• <td> <a href="complaint-
details.php?cid=<?php echo htmlentities($row['complaintNumber']);?>"> View
Details</a>
• </td>
e - B A G A M | 50
• </tr>
•
• <?php } ?>
• </tbody>
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Street
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• if(isset($_POST['submit']))
• {
• $street=$_POST['street'];
• $description=$_POST['description'];
• $sql=mysqli_query($con,"insert into street(streetName,streetDescription) v
alues('$street','$description')");
• $_SESSION['msg']="Street/Purok/DIstrict added Successfully !!";
e - B A G A M | 51
•
• }
•
• if(isset($_GET['del']))
• {
• mysqli_query($con,"delete from street where id = '".$_GE
T['id']."'");
• $_SESSION['delmsg']="Street/Purok/DIstrict deleted !!";
• }
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="add Area.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Street/Purok/DIstrict</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Street/Purok/DIstrict</h3>
• </div>
• <div class="module-body">
•
• <?php if(isset($_POST['submit']))
• {?>
• <div class="alert alert-success">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Well done!</strong> <?php echo
htmlentities($_SESSION['msg']);?><?php echo htmlentities($_SESSION['msg']
="");?>
• </div>
• <?php } ?>
•
• <?php if(isset($_GET['del']))
• {?>
• <div class="alert alert-error">
• <button type="button" class="close
" data-dismiss="alert">×</button>
e - B A G A M | 52
• <strong>Oh snap!</strong> <?php echo
htmlentities($_SESSION['delmsg']);?><?php echo htmlentities($_SESSION['de
lmsg']="");?>
• </div>
• <?php } ?>
•
• <br />
•
• <form class="form-horizontal row-
fluid" name="Action Officer" method="post" >
•
• <div class="control-group">
• <label class="control-
label" for="basicinput">Street/Purok/DIstrict Name</label>
• <div class="controls">
• <input type="text" placeholder="Enter Street/Purok/DIstrict Name" name="s
treet" class="span8 tip" required>
• </div>
• </div>
•
• <div class="control-group">
• <label class="control-
label" for="basicinput">Description</label>
• <div class="controls">
• <textarea class="span8" na
me="description" rows="5"></textarea>
• </div>
• </div>
•
• <div class="control-group">
• <div class="controls">
• <button type="submit" name
="submit" class="btn">Create</button>
• </div>
• </div>
• </form>
• </div>
• </div>
•
• <div class="module">
• <div class="module-head">
• <h3>Manage States</h3>
• </div>
• <div class="module-body table">
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-
striped display" width="100%">
• <thead>
• <tr>
• <th>#</th>
• <th>Street/Purok/DIstrict</th>
• <th>Description</th>
• <th>Creation date</th>
• <th>Last Updated</th>
• <th>Action</th>
• </tr>
• </thead>
• <tbody>
•
• <?php $query=mysqli_query($con,"select * from street");
• $cnt=1;
• while($row=mysqli_fetch_array($query))
e - B A G A M | 53
• {
• ?>
• <tr>
• <td><?php echo htmlentities($c
nt);?></td>
• <td><?php echo htmlentities($r
ow['streetName']);?></td>
• <td><?php echo htmlentities($r
ow['streetDescription']);?></td>
• <td> <?php echo htmlentities($
row['postingDate']);?></td>
• <td><?php echo htmlentities($r
ow['updationDate']);?></td>
• <td>
• <a href="edit-
street.php?id=<?php echo $row['id']?>" ><i class="icon-edit"></i></a>
• <a href="street.php?id=<?php e
cho $row['id']?>&del=delete" onClick="return confirm('Are you sure you wan
t to delete?')"><i class="icon-remove-sign"></i></a></td>
• </tr>
• <?php $cnt=$cnt+1; } ?>
•
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Subcategory
•
e - B A G A M | 54
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
• if(isset($_POST['submit']))
• {
• $category=$_POST['category'];
• $subcat=$_POST['subcategory'];
• $sql=mysqli_query($con,"insert into subcategory(categoryid,subcategory) va
lues('$category','$subcat')");
• $_SESSION['msg']="Area Team Leader Created !!";
•
• }
•
• if(isset($_GET['del']))
• {
• mysqli_query($con,"delete from subcategory where id = '"
.$_GET['id']."'");
• $_SESSION['delmsg']="Area Team Leader deleted !!";
• }
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="Add Area Leader.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Area Team Leader</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Area Team Leader</h3>
• </div>
• <div class="module-body">
•
• <?php if(isset($_POST['submit']))
• {?>
• <div class="alert alert-success">
e - B A G A M | 55
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Well done!</strong> <?php echo
htmlentities($_SESSION['msg']);?><?php echo htmlentities($_SESSION['msg']
="");?>
• </div>
• <?php } ?>
•
• <?php if(isset($_GET['del']))
• {?>
• <div class="alert alert-error">
• <button type="button" class="close
" data-dismiss="alert">×</button>
• <strong>Oh snap!</strong> <?php echo
htmlentities($_SESSION['delmsg']);?><?php echo htmlentities($_SESSION['de
lmsg']="");?>
• </div>
• <?php } ?>
•
• <br />
•
• <form class="form-horizontal row-
fluid" name="subcategory" method="post" >
•
• <div class="control-group">
• <label class="control-label" for="basicinput">Action Officer</label>
• <div class="controls">
• <select name="category" class="span8 tip" required>
• <option value="">Select Action Officer</option>
• <?php $query=mysqli_query($con,"select * from category");
• while($row=mysqli_fetch_array($query))
• {?>
•
• <option value="<?php echo $row['id'];?>"><?php echo $row['categoryName'];?
></option>
• <?php } ?>
• </select>
• </div>
• </div>
•
•
• <div class="control-group">
• <label class="control-
label" for="basicinput">Area Team Leader Name</label>
• <div class="controls">
• <input type="text" placeholder="Enter Area Team Leader Name" name="subcat
egory" class="span8 tip" required>
• </div>
• </div>
•
• <div class="control-group">
• <div class="controls">
• <button type="submit" name
="submit" class="btn">Create</button>
• </div>
• </div>
• </form>
• </div>
• </div>
•
• <div class="module">
e - B A G A M | 56
• <div class="module-head">
• <h3>Sub Action Officer</h3>
• </div>
• <div class="module-body table">
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-
striped display" width="100%">
• <thead>
• <tr>
• <th>#</th>
• <th>Action Officer</th>
• <th>Description</th>
• <th>Creation date</th>
• <th>Last Updated</th>
• <th>Action</th>
• </tr>
• </thead>
• <tbody>
•
• <?php $query=mysqli_query($con,"select subcategory.id,category.categoryNam
e,subcategory.subcategory,subcategory.creationDate,subcategory.updationDat
e from subcategory join category on category.id=subcategory.categoryid");
• $cnt=1;
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td><?php echo htmlentities($c
nt);?></td>
• <td><?php echo htmlentities($r
ow['categoryName']);?></td>
• <td><?php echo htmlentities($r
ow['subcategory']);?></td>
• <td> <?php echo htmlentities($
row['creationDate']);?></td>
• <td><?php echo htmlentities($r
ow['updationDate']);?></td>
• <td>
• <a href="edit-
subcategory.php?id=<?php echo $row['id']?>" ><i class="icon-edit"></i></a>
• <a href="subcategory.php?id=<?
php echo $row['id']?>&del=delete" onClick="return confirm('Are you sure yo
u want to delete?')"><i class="icon-remove-sign"></i></a></td>
• </tr>
• <?php $cnt=$cnt+1; } ?>
•
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
e - B A G A M | 57
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• Update complaint
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else {
• if(isset($_POST['update']))
• {
• $complaintnumber=$_GET['cid'];
• $status=$_POST['status'];
• $remark=$_POST['remark'];
• $query=mysqli_query($con,"insert into complaintremark(complaintNumber,stat
us,remark) values('$complaintnumber','$status','$remark')");
• $sql=mysqli_query($con,"update tblcomplaints set status='$status' where co
mplaintNumber='$complaintnumber'");
•
• echo "<script>alert('Grievance details updated successfully');</script>";
•
• }
•
• ?>
• <script language="javascript" type="text/javascript">
• function f2()
• {
• window.close();
• }ser
• function f3()
• {
• window.print();
• }
• </script>
• <!DOCTYPE html PUBLIC "-
//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xh
tml1-transitional.dtd">
• <html xmlns="http://www.w3.org/1999/xhtml">
• <head>
• <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
e - B A G A M | 58
• <title>User Profile</title>
• <link href="style.css" rel="stylesheet" type="text/css" />
• <link href="anuj.css" rel="stylesheet" type="text/css">
• </head>
• <body>
•
• <div style="margin-left:50px;">
• <form name="updateticket" id="updatecomplaint" method="post">
• <table width="100%" border="0" cellspacing="0" cellpadding="0">
• <tr>
• <td > </td>
• <td > </td>
• </tr>
• <tr height="50">
• <td><b>Grievance Number</b></td>
• <td><?php echo htmlentities($_GET['cid']); ?></td>
• </tr>
• <tr height="50">
• <td><b>Status</b></td>
• <td><select name="status" required="required">
• <option value="">Select Status</option>
• <option value="in process">In Process</option>
• <option value="closed">Closed</option>
•
• </select></td>
• </tr>
• <tr height="50">
• <td><b>Assigned to</b></td>
• <td>
• <select name="subcategory" id="subcategory" class="form-control">
• <option value="">Select Area Team Leader</option>
• <?php $sql=mysqli_query($con,"select id,subcategory from subcategory ");
• while ($rw=mysqli_fetch_array($sql)) {
• ?>
• <option value="<?php echo htmlentities($rw['id']);?>"><?php echo htmlent
ities($rw['subcategory']);?></option>
• <?php
• }
• ?>
• </select></td></tr>
•
• <tr height="50">
• <td><b>Remark</b></td>
• <td><textarea name="remark" cols="50" rows="10" required="required">
</textarea></td>
• </tr>
•
•
• <tr height="50">
• <td> </td>
• <td><input type="submit" name="update" value="Submit"></td>
• </tr>
•
• <tr><td colspan="2"> </td></tr>
•
• <tr>
• <td></td>
• <td >
• <input name="Submit2" type="submit" class="txtbox4" value="Close thi
s window " onClick="return f2();" style="cursor: pointer;" /></td>
e - B A G A M | 59
• </tr>
•
•
•
• </table>
• </form>
• </div>
•
• </body>
• </html>
•
• <?php } ?>
• User logs
•
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
•
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta name="description" content="Monitor User Logs.">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
• <title>Admin| Login Trail</title>
• <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="styl
esheet">
• <link type="text/css" href="bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
• <link type="text/css" href="css/theme.css" rel="stylesheet">
• <link type="text/css" href="images/icons/css/font-
awesome.css" rel="stylesheet">
• <link type="text/css" href='http://fonts.googleapis.com/css?family=Ope
n+Sans:400italic,600italic,400,600&display=swap' rel='stylesheet'>
• </head>
• <body>
• <?php include('include/header.php');?>
•
• <div class="wrapper">
• <div class="container">
• <div class="row">
• <?php include('include/sidebar.php');?>
• <div class="span9">
• <div class="content">
•
• <div class="module">
• <div class="module-head">
• <h3>Login Trail</h3>
• </div>
• <div class="module-body table">
•
•
• <table cellpadding="0" cellspacing="0" bor
der="0" class="datatable-1 table table-bordered table-
striped display" width="100%">
e - B A G A M | 60
• <thead>
• <tr>
• <th>#</th>
• <th> User Email</th>
• <th>User IP </th>
• <th>Login Time</th>
• <th>Logout Time </th>
• <th>Status </th>
•
• </tr>
• </thead>
• <tbody>
•
• <?php $query=mysqli_query($con,"select * from userlog");
• $cnt=1;
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td><?php echo htmlentities($c
nt);?></td>
• <td><?php echo htmlentities($r
ow['username']);?></td>
• <td><?php echo htmlentities($r
ow['userip']);?></td>
• <td> <?php echo htmlentities($
row['loginTime']);?></td>
• <td><?php echo htmlentities($r
ow['logout']); ?></td>
• <td><?php $st=$row['status'];
•
• if($st==1)
• {
• echo "Successfull";
• }
• else
• {
• echo "Failed";
• }
• ?></td>
•
•
• <?php $cnt=$cnt+1; } ?>
•
• </table>
• </div>
• </div>
•
•
•
• </div><!--/.content-->
• </div><!--/.span9-->
• </div>
• </div><!--/.container-->
• </div><!--/.wrapper-->
•
• <?php include('include/footer.php');?>
•
• <script src="scripts/jquery-
1.9.1.min.js" type="text/javascript"></script>
• <script src="scripts/jquery-ui-
1.10.1.custom.min.js" type="text/javascript"></script>
e - B A G A M | 61
• <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></s
cript>
• <script src="scripts/flot/jquery.flot.js" type="text/javascript"></scr
ipt>
• <script src="scripts/datatables/jquery.dataTables.js"></script>
• <script>
• $(document).ready(function() {
• $('.datatable-1').dataTable();
• $('.dataTables_paginate').addClass("btn-group datatable-
pagination");
• $('.dataTables_paginate > a').wrapInner('<span />');
• $('.dataTables_paginate > a:first-
child').append('<i class="icon-chevron-left shaded"></i>');
• $('.dataTables_paginate > a:last-
child').append('<i class="icon-chevron-right shaded"></i>');
• } );
• </script>
• </body>
• <?php } ?>
• User profile
• <?php
• session_start();
• include('include/config.php');
• if(strlen($_SESSION['alogin'])==0)
• {
• header('location:index.php');
• }
• else{
•
• ?>
• <script language="javascript" type="text/javascript">
• function f2()
• {
• window.close();
• }ser
• function f3()
• {
• window.print();
• }
• </script>
• <!DOCTYPE html PUBLIC "-
//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
• <html xmlns="http://www.w3.org/1999/xhtml">
• <head>
• <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
• <title>User Profile</title>
• <link href="style.css" rel="stylesheet" type="text/css" />
• <link href="anuj.css" rel="stylesheet" type="text/css">
• </head>
• <body>
•
• <div style="margin-left:50px;">
• <form name="updateticket" id="updateticket" method="post">
• <table width="100%" border="0" cellspacing="0" cellpadding="0">
• <?php
•
• $ret1=mysqli_query($con,"select * FROM users where id='".$_GET['uid']."'");
• while($row=mysqli_fetch_array($ret1))
• {
• ?>
e - B A G A M | 62
•
•
•
•
• <tr>
• <td colspan="2"><b><?php echo $row['fullName'];?>'s profile</b></td>
•
• </tr>
•
•
• <tr>
• <td > </td>
• <td > </td>
• </tr>
• <tr height="50">
• <td><b>Reg Date:</b></td>
• <td><?php echo htmlentities($row['regDate']); ?></td>
• </tr>
• <tr height="50">
• <td><b>User Email:</b></td>
• <td><?php echo htmlentities($row['userEmail']); ?></td>
• </tr>
•
• <tr height="50">
• <td><b>User Contact no:</b></td>
• <td><?php echo htmlentities($row['contactNo']); ?></td>
• </tr>
•
•
• <tr height="50">
• <td><b>Address:</b></td>
• <td><?php echo htmlentities($row['address']); ?></td>
• </tr>
•
• <tr height="50">
• <td><b>Street/Purok/District:</b></td>
• <td><?php echo htmlentities($row['State']); ?></td>
• </tr>
•
• <tr height="50">
• <td><b>Country:</b></td>
• <td><?php echo htmlentities($row['country']); ?></td>
• </tr>
•
• <tr height="50">
• <td><b>Pincode:</b></td>
• <td><?php echo htmlentities($row['pincode']); ?></td>
• </tr>
•
• <tr height="50">
• <td><b>Last Updation:</b></td>
• <td><?php echo htmlentities($row['updationDate']); ?></td>
• </tr>
• <tr height="50">
• <td><b>Status:</b></td>
• <td><?php if($row['status']==1)
• { echo "Active";
• } else{
• echo "Block";
• }
e - B A G A M | 63
• ?></td>
• </tr>
•
• <tr>
•
• <td colspan="2">
• <input name="Submit2" type="submit" class="txtbox4" value="Close this windo
w " onClick="return f2();" style="cursor: pointer;" /></td>
• </tr>
•
• <?php }
•
•
• ?>
•
• </table>
• </form>
• </div>
•
• </body>
• </html>
•
• <?php } ?>
e - B A G A M | 64
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | User Change Password</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <!--external css-->
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
datepicker/css/datepicker.css" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
daterangepicker/daterangepicker.css" />
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
• <script type="text/javascript">
• function valid()
• {
• if(document.chngpwd.password.value=="")
• {
• alert("Current Password Filed is Empty !!");
• document.chngpwd.password.focus();
• return false;
• }
• else if(document.chngpwd.newpassword.value=="")
• {
• alert("New Password Filed is Empty !!");
• document.chngpwd.newpassword.focus();
• return false;
• }
• else if(document.chngpwd.confirmpassword.value=="")
• {
• alert("Confirm Password Filed is Empty !!");
• document.chngpwd.confirmpassword.focus();
• return false;
• }
• else if(document.chngpwd.newpassword.value!= document.chngpwd.confirmpassw
ord.value)
• {
• alert("Password and Confirm Password Field do not match !!");
• document.chngpwd.confirmpassword.focus();
• return false;
• }
• return true;
• }
• </script>
• </head>
•
• <body>
•
• <section id="container" >
• <?php include("includes/header.php");?>
• <?php include("includes/sidebar.php");?>
• <section id="main-content">
• <section class="wrapper">
• <h3><i class="fa fa-angle-right"></i> Change Password</h3>
•
• <!-- BASIC FORM ELELEMNTS -->
e - B A G A M | 65
• <div class="row mt">
• <div class="col-lg-12">
• <div class="form-panel">
• <h4 class="mb"><i class="fa fa-angle-
right"></i> User Change Password</h4>
•
• <?php if($successmsg)
• {?>
• <div class="alert alert-success alert-dismissable">
• <button type="button" class="close" data-
dismiss="alert" aria-hidden="true">×</button>
• <b>Well done!</b> <?php echo htmlentities($successms
g);?></div>
• <?php }?>
•
• <?php if($errormsg)
• {?>
• <div class="alert alert-danger alert-dismissable">
• <button type="button" class="close" data-dismiss="alert" aria-
hidden="true">×</button>
• <b>Oh snap!</b> </b> <?php echo htmlentities($errorm
sg);?></div>
• <?php }?>
•
• <form class="form-horizontal style-
form" method="post" name="chngpwd" onSubmit="return valid();">
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-
label">Current Password</label>
• <div class="col-sm-10">
• <input type="password" name="password" r
equired="required" class="form-control">
• </div>
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-
label">New Password</label>
• <div class="col-sm-10">
• <input type="password" name="newpassword
" required="required" class="form-control">
• </div>
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-
label">Confirm Password</label>
• <div class="col-sm-10">
• <input type="password" name="confirmpass
word" required="required" class="form-control">
• </div>
• </div>
• <div class="form-group">
• <div class="col-sm-10" style="padding-
left:25% ">
• <button type="submit" name="submit" class="btn btn-
primary">Submit</button>
• </div>
• </div>
•
• </form>
• </div>
e - B A G A M | 66
• </div>
• </div>
•
•
•
• </section><! --/wrapper -->
• </section><!-- /MAIN CONTENT -->
• <?php include("includes/footer.php");?>
• </section>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
• <script class="include" type="text/javascript" src="assets/js/jquery.d
cjqaccordion.2.7.js"></script>
• <script src="assets/js/jquery.scrollTo.min.js"></script>
• <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></
script>
•
• <!--common script for all pages-->
• <script src="assets/js/common-scripts.js"></script>
•
• <!--script for this page-->
• <script src="assets/js/jquery-ui-1.9.2.custom.min.js"></script>
•
• <!--custom switch-->
• <script src="assets/js/bootstrap-switch.js"></script>
•
• <!--custom tagsinput-->
• <script src="assets/js/jquery.tagsinput.js"></script>
•
• <!--custom checkbox & radio-->
•
• <script type="text/javascript" src="assets/js/bootstrap-
datepicker/js/bootstrap-datepicker.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/date.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/daterangepicker.js"></script>
•
• <script type="text/javascript" src="assets/js/bootstrap-
inputmask/bootstrap-inputmask.min.js"></script>
•
•
• <script src="assets/js/form-component.js"></script>
•
•
• <script>
• //custom select box
•
• $(function(){
• $('select.styled').customSelect();
• });
•
• </script>
•
• </body>
• </html>
• <?php } ?>
• Check availability
• <?php
e - B A G A M | 67
• require_once("includes/config.php");
• if(!empty($_POST["email"])) {
• $email= $_POST["email"];
•
• $result =mysqli_query($con,"SELECT userEmail FROM users WHERE user
Email='$email'");
• $count=mysqli_num_rows($result);
• if($count>0)
• {
• echo "<span style='color:red'> Email already exists .</span>";
• echo "<script>$('#submit').prop('disabled',true);</script>";
• } else{
•
• echo "<span style='color:green'> Email available for Registration .</s
pan>";
• echo "<script>$('#submit').prop('disabled',false);</script>";
• }
• }
•
• ?>
• Complaint details
• <?php session_start();
• error_reporting(0);
• include('includes/config.php');
• if(strlen($_SESSION['login'])==0)
• {
• header('location:index.php');
• }
• else{ ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | Grievance Details</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
• </head>
•
• <body>
•
• <section id="container" >
• <?php include('includes/header.php');?>
• <?php include('includes/sidebar.php');?>
• <section id="main-content" style="padding-left:5%; color:#000">
• <section class="wrapper site-min-height">
• <h3><i class="fa fa-angle-right"></i> Grievance Details</h3>
• <hr />
•
e - B A G A M | 68
• <?php $query=mysqli_query($con,"select tblcomplaints.*,category.categoryN
ame as catname from tblcomplaints join category on category.id=tblcomplain
ts.category where userId='".$_SESSION['id']."' and complaintNumber='".$_GE
T['cid']."'");
• while($row=mysqli_fetch_array($query))
• {?>
• <div class="row mt">
• <label class="col-sm-2 col-sm-2 control-
label"><b>Grievance Number : </b></label>
• <div class="col-sm-4">
• <p><?php echo htmlentities($row['complaintNumber']);?></p>
• </div>
• <label class="col-sm-2 col-sm-2 control-label"><b>Reg. Date :</b></label>
• <div class="col-sm-4">
• <p><?php echo htmlentities($row['regDate']);?></p>
• </div>
• </div>
•
• <div class="row mt">
• <label class="col-sm-2 col-sm-2 control-
label"><b>Action Officer :</b></label>
• <div class="col-sm-4">
• <p><?php echo htmlentities($row['catname']);?></p>
• </div>
• <label class="col-sm-2 col-sm-2 control-
label"><b>Area Team Leader :</b> </label>
• <div class="col-sm-4">
• <p><?php echo htmlentities($row['subcategory']);?></p>
• </div>
• </div>
•
e - B A G A M | 69
•
• </p>
• </div>
• </div>
• <div class="row mt">
• <label class="col-sm-2 col-sm-2 control-
label"><b>Grievance Details </label>
• <div class="col-sm-10">
• <p><?php echo htmlentities($row['complaintDetails']);?></p>
• </div>
•
• </div>
•
• <?php
• $ret=mysqli_query($con,"select complaintremark.remark as remark,complaintr
emark.status as sstatus,complaintremark.remarkDate as rdate from complaint
remark join tblcomplaints on tblcomplaints.complaintNumber=complaintremark
.complaintNumber where complaintremark.complaintNumber='".$_GET['cid']."'"
);
• while($rw=mysqli_fetch_array($ret))
• {
• ?>
• <div class="row mt">
•
• <label class="col-sm-2 col-sm-2 control-label"><b>Remark:</b></label>
• <div class="col-sm-10">
• <?php echo htmlentities($rw['remark']); ?> <br /><b>Remark
Date: <?php echo htmlentities($rw['rdate']); ?></b>
• </div>
• </div>
• <div class="row mt">
•
• <label class="col-sm-2 col-sm-2 control-label"><b>Status:</b></label>
• <div class="col-sm-10">
• <?php echo htmlentities($rw['sstatus']); ?>
• </div>
• </div>
•
• <?php } ?>
•
• <div class="row mt">
•
• <label class="col-sm-2 col-sm-2 control-
label"><b>Final Status :</b></label>
• <div class="col-sm-4">
• <p style="color:red"><?php
•
• if($row['status']=="NULL" || $row['status']=="" )
• {
• echo "Not Process yet";
• } else{
• echo htmlentities($row['status']);
• }
• ?></p>
• </div>
• </div>
•
•
• <?php } ?>
e - B A G A M | 70
• </section><! --/wrapper -->
• </section><!-- /MAIN CONTENT -->
• <?php include('includes/footer.php');?>
• </section>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
• <script src="assets/js/jquery-ui-1.9.2.custom.min.js"></script>
• <script src="assets/js/jquery.ui.touch-punch.min.js"></script>
• <script class="include" type="text/javascript" src="assets/js/jquery.d
cjqaccordion.2.7.js"></script>
• <script src="assets/js/jquery.scrollTo.min.js"></script>
• <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></
script>
•
• <!--common script for all pages-->
• <script src="assets/js/common-scripts.js"></script>
•
• <!--script for this page-->
•
• <script>
• //custom select box
•
• $(function(){
• $('select.styled').customSelect();
• });
•
• </script>
•
• </body>
• </html>
• <?php } ?>
• Complaint history
• <?php
• session_start();
• error_reporting(0);
• include('includes/config.php');
• if(strlen($_SESSION['login'])==0)
• {
• header('location:index.php');
• }
• else{
• ?>
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | Grievance Monitoring</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <!--external css-->
e - B A G A M | 71
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
•
• <!-- Custom styles for this template -->
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
•
• <link href="assets/css/table-responsive.css" rel="stylesheet">
•
• <!-
- HTML5 shim and Respond.js IE8 support of HTML5 elements and media querie
s -->
• <!--[if lt IE 9]>
• <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.j
s"></script>
• <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.mi
n.js"></script>
• <![endif]-->
• </head>
•
• <body>
•
• <section id="container" >
• <?php include("includes/header.php");?>
• <?php include("includes/sidebar.php");?>
•
• <section id="main-content">
• <section class="wrapper">
• <h3><i class="fa fa-angle-right"></i>e-
BAGAM | Grievance Monitoring</h3>
• <div class="row mt">
• <div class="col-lg-12">
• <div class="content-panel">
• <section id="unseen">
• <table class="table table-bordered table-
striped table-condensed">
• <thead>
• <tr style="text-align: center">
• <th style="text-
align: center">Grievance Number</th>
• <th style="text-
align: center">Reg Date</th>
• <th style="text-
align: center">last Updation date</th>
• <th style="text-
align: center">Status</th>
• <th style="text-
align: center">Action</th>
•
• </tr>
• </thead>
• <tbody>
• <?php $query=mysqli_query($con,"select * from tblcomplaints where userId
='".$_SESSION['id']."'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
• <tr>
• <td align="center"><?php echo htmlentiti
es($row['complaintNumber']);?></td>
• <td align="center"><?php echo htmlentiti
es($row['regDate']);?></td>
e - B A G A M | 72
• <td align="center"><?php echo htmlentiti
es($row['lastUpdationDate']);
•
• ?></td>
• <td align="center"><?php
• $status=$row['status'];
• if($status=="" or $status=="NULL")
• { ?>
• <button type="button" class="btn btn
-theme04">Not Process Yet</button>
• <?php }
• if($status=="in process"){ ?>
• <button type="button" class="btn btn-warning">In Process</button>
• <?php }
• if($status=="closed") {
• ?>
• <button type="button" class="btn btn-success">Closed</button>
• <?php } ?>
• <td align="center">
• <a href="complaint-
details.php?cid=<?php echo htmlentities($row['complaintNumber']);?>">
• <button type="button" class="btn btn-primary">View Details</button></a>
• </td>
• </tr>
• <?php } ?>
•
• </tbody>
• </table>
• </section>
• </div><!-- /content-panel -->
• </div><!-- /col-lg-4 -->
• </div><!-- /row -->
•
•
•
• </section><! --/wrapper -->
• </section><!-- /MAIN CONTENT -->
• <?php include("includes/footer.php");?>
• </section>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
• <script class="include" type="text/javascript" src="assets/js/jquery.d
cjqaccordion.2.7.js"></script>
• <script src="assets/js/jquery.scrollTo.min.js"></script>
• <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></
script>
•
• <!--common script for all pages-->
• <script src="assets/js/common-scripts.js"></script>
•
• <!--script for this page-->
•
•
• </body>
• </html>
• <?php } ?>
• Dashboard
• <?php session_start();
• error_reporting(0);
e - B A G A M | 73
• include('includes/config.php');
• if(strlen($_SESSION['login'])==0)
• {
• header('location:index.php');
• }
• else{ ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | Grievance Tickets</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <!--external css-->
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
• <link rel="stylesheet" type="text/css" href="assets/css/zabuto_calenda
r.css">
• <link rel="stylesheet" type="text/css" href="assets/js/gritter/css/jqu
ery.gritter.css" />
• <link rel="stylesheet" type="text/css" href="assets/lineicons/style.cs
s">
•
• <!-- Custom styles for this template -->
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
•
• <script src="assets/js/chart-master/Chart.js"></script>
•
• <!-
- HTML5 shim and Respond.js IE8 support of HTML5 elements and media querie
s -->
• <!--[if lt IE 9]>
• <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.j
s"></script>
• <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.mi
n.js"></script>
• <![endif]-->
• </head>
•
• <body>
•
• <section id="container" >
• <?php include("includes/header.php");?>
• <?php include("includes/sidebar.php");?>
• <section id="main-content">
• <section class="wrapper">
•
• <div class="row">
• <div class="col-lg-9 main-chart">
•
•
• <div class="col-md-2 col-sm-2 box0">
• <div>
e - B A G A M | 74
•
• </div></div>
•
•
• <div class="col-md-2 col-sm-2 box0">
• <div class="box1">
• <span class="li_news"></span>
• <?php
•
• $rt = mysqli_query($con,"SELECT * FROM tblcomplaints where userId='".$_SES
SION['id']."' and status is null");
• $num1 = mysqli_num_rows($rt);
• {?>
• <h3><?php echo htmlentities($num1);?></h3>
• </div>
• <p><?php echo htmlentities($num1);?> Grievance Received<
/p>
• </div>
• <?php }?>
•
• <div class="col-md-2 col-sm-2 box0">
• <div class="box1">
• <span class="li_news"></span>
• <?php
• $status="in Process";
• $rt = mysqli_query($con,"SELECT * FROM tblcomplaints where userId='".$_SES
SION['id']."' and status='$status'");
• $num1 = mysqli_num_rows($rt);
• {?>
• <h3><?php echo htmlentities($num1);?></h3>
• </div>
• <p><?php echo htmlentities($num1);?> Grievance Status in
process</p>
• </div>
• <?php }?>
•
• <div class="col-md-2 col-sm-2 box0">
• <div class="box1">
• <span class="li_news"></span>
• <?php
• $status="closed";
• $rt = mysqli_query($con,"SELECT * FROM tblcomplaints where userId='".$_SES
SION['id']."' and status='$status'");
• $num1 = mysqli_num_rows($rt);
• {?>
• <h3><?php echo htmlentities($num1);?></h3>
• </div>
• <p><?php echo htmlentities($num1);?> Grievance Resolved<
/p>
• </div>
•
• <?php }?>
•
•
• </div><!-- /row mt -->
•
•
•
•
•
•
e - B A G A M | 75
• </section>
• </section>
• <?php include("includes/footer.php");?>
• </section>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/jquery-1.8.3.min.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
• <script class="include" type="text/javascript" src="assets/js/jquery.d
cjqaccordion.2.7.js"></script>
• <script src="assets/js/jquery.scrollTo.min.js"></script>
• <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></
script>
• <script src="assets/js/jquery.sparkline.js"></script>
•
• <!--common script for all pages-->
• <script src="assets/js/common-scripts.js"></script>
•
• <script type="text/javascript" src="assets/js/gritter/js/jquery.gritte
r.js"></script>
• <script type="text/javascript" src="assets/js/gritter-
conf.js"></script>
•
• <!--script for this page-->
• <script src="assets/js/sparkline-chart.js"></script>
• <script src="assets/js/zabuto_calendar.js"></script>
• </body>
• </html>
• <?php } ?>
• Getsubcat
• <?php
• include('includes/config.php');
• if(!empty($_POST["catid"]))
• {
• $id=intval($_POST['catid']);
• if(!is_numeric($id)){
•
• echo htmlentities("invalid industryid");exit;
• }
• else{
• $stmt = mysqli_query($con,"SELECT subcategory FROM subcategory WHERE cate
goryid ='$id'");
• ?><option selected="selected">Select Subcategory </option><?php
• while($row=mysqli_fetch_array($stmt))
• {
• ?>
• <option value="<?php echo htmlentities($row['subcategory']); ?>"><?php e
cho htmlentities($row['subcategory']); ?></option>
• <?php
• }
• }
•
• }
• ?>
• Index
• <?php
• session_start();
• error_reporting(0);
• include("includes/config.php");
e - B A G A M | 76
• if(isset($_POST['submit']))
• {
• $ret=mysqli_query($con,"SELECT * FROM users WHERE userEmail='".$_POST['use
rname']."' and password='".md5($_POST['password'])."'");
• $num=mysqli_fetch_array($ret);
• if($num>0)
• {
• $extra="dashboard.php";//
• $_SESSION['login']=$_POST['username'];
• $_SESSION['id']=$num['id'];
• $host=$_SERVER['HTTP_HOST'];
• $uip=$_SERVER['REMOTE_ADDR'];
• $status=1;
• $log=mysqli_query($con,"insert into userlog(uid,username,userip,status) va
lues('".$_SESSION['id']."','".$_SESSION['login']."','$uip','$status')");
• $uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
• header("location:http://$host$uri/$extra");
• exit();
• }
• else
• {
• $_SESSION['login']=$_POST['username'];
• $uip=$_SERVER['REMOTE_ADDR'];
• $status=0;
• mysqli_query($con,"insert into userlog(username,userip,status) values('".$
_SESSION['login']."','$uip','$status')");
• $errormsg="Invalid username or password";
• $extra="login.php";
•
• }
• }
•
• if(isset($_POST['change']))
• {
• $email=$_POST['email'];
• $contact=$_POST['contact'];
• $password=md5($_POST['password']);
• $query=mysqli_query($con,"SELECT * FROM users WHERE userEmail='$email' and
contactNo='$contact'");
• $num=mysqli_fetch_array($query);
• if($num>0)
• {
• mysqli_query($con,"update users set password='$password' WHERE userEmail='
$email' and contactNo='$contact' ");
• $msg="Password Changed Successfully";
•
• }
• else
• {
• $errormsg="Invalid email id or Contact no";
• }
• }
• ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
e - B A G A M | 77
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | User Login</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <!--external css-->
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
•
• <!-- Custom styles for this template -->
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
• <script type="text/javascript">
• function valid()
• {
• if(document.forgot.password.value!= document.forgot.confirmpassword.value
)
• {
• alert("Password and Confirm Password Field do not match !!");
• document.forgot.confirmpassword.focus();
• return false;
• }
• return true;
• }
• </script>
• </head>
•
• <body>
•
• <!-
- ************************************************************************
**************************************************************************
********
• MAIN CONTENT
• ********************************************************************
**************************************************************************
************* -->
•
• <div id="login-page">
• <div class="container">
• <h3 align="center" style="color:#fff"><a href="../index.html"
style="color:#fff">Grievance Managent System</a></h3>
• <hr />
• <form class="form-login" name="login" method="post">
• <h2 class="form-login-heading">sign in now</h2>
• <p style="padding-left:4%; padding-top:2%; color:red">
• <?php if($errormsg){
• echo htmlentities($errormsg);
• }?></p>
•
• <p style="padding-left:4%; padding-
top:2%; color:green">
• <?php if($msg){
• echo htmlentities($msg);
• }?></p>
• <div class="login-wrap">
• <input type="text" class="form-
control" name="username" placeholder="User ID" required autofocus>
• <br>
e - B A G A M | 78
• <input type="password" class="form-
control" name="password" required placeholder="Password">
• <label class="checkbox">
• <span class="pull-right">
• <a data-
toggle="modal" href="login.html#myModal"> Forgot Password?</a>
•
• </span>
• </label>
• <button class="btn btn-theme btn-
block" name="submit" type="submit"><i class="fa fa-
lock"></i> SIGN IN</button>
• <hr>
• </form>
• <div class="registration">
• Don't have an account yet?<br/>
• <a class="" href="registration.php">
• Create an account
• </a>
• </div>
•
• </div>
•
• <!-- Modal -->
• <form class="form-login" name="forgot" method="post">
• <div aria-hidden="true" aria-
labelledby="myModalLabel" role="dialog" tabindex="-
1" id="myModal" class="modal fade">
• <div class="modal-dialog">
• <div class="modal-content">
• <div class="modal-header">
• <button type="button" class="close" data
-dismiss="modal" aria-hidden="true">×</button>
• <h4 class="modal-
title">Forgot Password ?</h4>
• </div>
• <div class="modal-body">
• <p>Enter your details below to reset you
r password.</p>
• <input type="email" name="email" placeholder="Email" autocomplete="off" cl
ass="form-control" required><br >
• <input type="text" name="contact" placeholder="contact No" autocomplete="o
ff" class="form-control" required><br>
• <input type="password" class="form-
control" placeholder="New Password" id="password" name="password" require
d ><br />
• <input type="password" class="form-control unicase-form-control text-
input" placeholder="Confirm Password" id="confirmpassword" name="confirmpa
ssword" required >
•
•
• </div>
• <div class="modal-footer">
• <button data-
dismiss="modal" class="btn btn-default" type="button">Cancel</button>
• <button class="btn btn-
theme" type="submit" name="change" onclick="return valid();">Submit</butto
n>
• </div>
• </div>
• </div>
• </div>
e - B A G A M | 79
• <!-- modal -->
• </form>
•
•
•
• </div>
• </div>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
•
• <!--BACKSTRETCH-->
• <!-
- You can use an image of whatever size. This script will stretch to fit i
n any screen size.-->
• <script type="text/javascript" src="assets/js/jquery.backstretch.min.j
s"></script>
• <script>
• $.backstretch("assets/img/login-bg.jpg", {speed: 500});
• </script>
•
• </body>
• </html>
• Logout
• <?php
• session_start();
• include("includes/config.php");
• $_SESSION['login']=="";
• date_default_timezone_set('Asia/Manila');
• $ldate=date( 'd-m-Y h:i:s A', time () );
• mysqli_query($con,"UPDATE userlog SET logout = '$ldate' WHERE username =
'".$_SESSION['login']."' ORDER BY id DESC LIMIT 1");
• session_unset();
•
• ?>
• <script language="javascript">
• document.location="../index.html";
• </script>
• Profile
• <?php
• session_start();
• error_reporting(0);
• include('includes/config.php');
• if(strlen($_SESSION['login'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• if(isset($_POST['submit']))
• {
• $fname=$_POST['fullname'];
• $contactno=$_POST['contactno'];
• $address=$_POST['address'];
• $street=$_POST['street'];
• $country=$_POST['country'];
e - B A G A M | 80
• $pincode=$_POST['pincode'];
• $query=mysqli_query($con,"update users set fullName='$fname',contactNo='$c
ontactno',address='$address',Purok='$street',country='$country',pincode='$
pincode' where userEmail='".$_SESSION['login']."'");
• if($query)
• {
• $successmsg="Profile Successfully !!";
• }
• else
• {
• $errormsg="Profile not updated !!";
• }
• }
• ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | User Profile</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <!--external css-->
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
datepicker/css/datepicker.css" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
daterangepicker/daterangepicker.css" />
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
•
• </head>
•
• <body>
•
• <section id="container" >
• <?php include("includes/header.php");?>
• <?php include("includes/sidebar.php");?>
• <section id="main-content">
• <section class="wrapper">
• <h3><i class="fa fa-angle-right"></i> Profile info</h3>
•
• <!-- BASIC FORM ELELEMNTS -->
• <div class="row mt">
• <div class="col-lg-12">
• <div class="form-panel">
•
•
• <?php if($successmsg)
• {?>
• <div class="alert alert-success alert-dismissable">
• <button type="button" class="close" data-
dismiss="alert" aria-hidden="true">×</button>
e - B A G A M | 81
• <b>Well done!</b> <?php echo htmlentities($successms
g);?></div>
• <?php }?>
•
• <?php if($errormsg)
• {?>
• <div class="alert alert-danger alert-dismissable">
• <button type="button" class="close" data-dismiss="alert" aria-
hidden="true">×</button>
• <b>Oh snap!</b> </b> <?php echo htmlentities($errorm
sg);?></div>
• <?php }?>
• <?php $query=mysqli_query($con,"select * from users where userEmail='".$_
SESSION['login']."'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
•
• <h4 class="mb"><i class="fa fa-
user"></i> <?php echo htmlentities($row['fullName']);?>'s Profi
le</h4>
• <h5><b>Last Updated at :</b> <?php echo htmlentities($row['
updationDate']);?></h5>
• <form class="form-horizontal style-
form" method="post" name="profile" >
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Full Name</label>
• <div class="col-sm-4">
• <input type="text" name="fullname" required="required" value="<?php echo h
tmlentities($row['fullName']);?>" class="form-control" >
• </div>
• <label class="col-sm-2 col-sm-2 control-label">User Email </label>
• <div class="col-sm-4">
• <input type="email" name="useremail" required="required" value="<?php echo
htmlentities($row['userEmail']);?>" class="form-control" readonly>
• </div>
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Contact</label>
• <div class="col-sm-4">
• <input type="text" name="contactno" required="required" value="<?php echo
htmlentities($row['contactNo']);?>" class="form-control">
• </div>
• <label class="col-sm-2 col-sm-2 control-label">Address </label>
• <div class="col-sm-4">
• <textarea name="address" required="required" class="form-
control"><?php echo htmlentities($row['address']);?></textarea>
• </div>
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Purok</label>
• <div class="col-sm-4">
• <select name="street" required="required" class="form-control">
• <option value="<?php echo htmlentities($row['Purok']);?>"><?php echo htmle
ntities($st=$row['Purok']);?></option>
• <?php $sql=mysqli_query($con,"select streetName from street ");
• while ($rw=mysqli_fetch_array($sql)) {
• if($rw['streetName']==$st)
• {
e - B A G A M | 82
• continue;
• }
• else
• {
• ?>
• <option value="<?php echo htmlentities($rw['streetName']);?>"><?php echo
htmlentities($rw['streetName']);?></option>
• <?php
• }}
• ?>
•
• </select>
• </div>
• <label class="col-sm-2 col-sm-2 control-label">Country </label>
• <div class="col-sm-4">
• <input type="text" name="country" required="required" value="<?php echo ht
mlentities($row['country']);?>" class="form-control">
• </div>
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Pincode</label>
• <div class="col-sm-4">
• <input type="text" name="pincode" maxlength="6" required="required" value=
"<?php echo htmlentities($row['pincode']);?>" class="form-control">
• </div>
• <label class="col-sm-2 col-sm-2 control-label">Reg Date </label>
• <div class="col-sm-4">
• <input type="text" name="regdate" required="required" value="<?php echo ht
mlentities($row['regDate']);?>" class="form-control" readonly>
• </div>
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">User Photo</label>
• <div class="col-sm-4">
• <?php $userphoto=$row['userImage'];
• if($userphoto==""):
• ?>
• <img src="userimages/noimage.png" width="256" height="256" alt="" >
• <a href="update-image.php">Change Photo</a>
• <?php else:?>
• <img src="userimages/<?php echo htmlentities($userphoto);?>" width="256"
height="256">
• <a href="update-image.php">Change Photo</a>
• <?php endif;?>
• </div>
•
• </div>
•
• <?php } ?>
•
• <div class="form-group">
• <div class="col-sm-10" style="padding-
left:25% ">
e - B A G A M | 83
• <button type="submit" name="submit" class="btn btn-
primary">Submit</button>
• </div>
• </div>
•
• </form>
• </div>
• </div>
• </div>
•
•
•
• </section>
• </section>
• <?php include("includes/footer.php");?>
• </section>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
• <script class="include" type="text/javascript" src="assets/js/jquery.d
cjqaccordion.2.7.js"></script>
• <script src="assets/js/jquery.scrollTo.min.js"></script>
• <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></
script>
•
• <!--common script for all pages-->
• <script src="assets/js/common-scripts.js"></script>
•
• <!--script for this page-->
• <script src="assets/js/jquery-ui-1.9.2.custom.min.js"></script>
•
• <!--custom switch-->
• <script src="assets/js/bootstrap-switch.js"></script>
•
• <!--custom tagsinput-->
• <script src="assets/js/jquery.tagsinput.js"></script>
•
• <!--custom checkbox & radio-->
•
• <script type="text/javascript" src="assets/js/bootstrap-
datepicker/js/bootstrap-datepicker.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/date.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/daterangepicker.js"></script>
•
• <script type="text/javascript" src="assets/js/bootstrap-
inputmask/bootstrap-inputmask.min.js"></script>
•
•
• <script src="assets/js/form-component.js"></script>
•
•
• <script>
• //custom select box
•
• $(function(){
• $('select.styled').customSelect();
• });
•
• </script>
e - B A G A M | 84
•
• </body>
• </html>
• <?php } ?>
• Register complaint
• <?php
• session_start();
• error_reporting(0);
• include('includes/config.php');
• if(strlen($_SESSION['login'])==0)
• {
• header('location:index.php');
• }
• else{
•
• if(isset($_POST['submit']))
• {
• $uid=$_SESSION['id'];
• $category=$_POST['category'];
• $subcat=$_POST['subcategory'];
• $complaintype=$_POST['complaintype'];
• $street=$_POST['street'];
• $noc=$_POST['noc'];
• $complaintdetials=$_POST['complaindetails'];
• $compfile=$_FILES["compfile"]["name"];
•
• move_uploaded_file($_FILES["compfile"]["tmp_name"],"complaintdocs/".$_FILE
S["compfile"]["name"]);
• $query=mysqli_query($con,"insert into tblcomplaints(userId,category,subcat
egory,complaintType,street,noc,complaintDetails,complaintFile) values('$ui
d','$category','$subcat','$complaintype','$street','$noc','$complaintdetia
ls','$compfile')");
• // code for show complaint number
• $sql=mysqli_query($con,"select complaintNumber from tblcomplaints order b
y complaintNumber desc limit 1");
• while($row=mysqli_fetch_array($sql))
• {
• $cmpn=$row['complaintNumber'];
• }
• $complainno=$cmpn;
• echo '<script> alert("Your complain has been successfully filled and your
complaintno is "+"'.$complainno.'")</script>';
• }
• ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | Grievance Management</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <!--external css-->
e - B A G A M | 85
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
datepicker/css/datepicker.css" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
daterangepicker/daterangepicker.css" />
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
• <script>
• function getCat(val) {
• //alert('val');
•
• $.ajax({
• type: "POST",
• url: "getsubcat.php",
• data:'catid='+val,
• success: function(data){
• $("#subcategory").html(data);
•
• }
• });
• }
• </script>
•
• </head>
•
• <body>
•
• <section id="container" >
• <?php include("includes/header.php");?>
• <?php include("includes/sidebar.php");?>
• <section id="main-content">
• <section class="wrapper">
• <h3><i class="fa fa-angle-right"></i>File a Grievance</h3>
•
• <!-- BASIC FORM ELELEMNTS -->
• <div class="row mt">
• <div class="col-lg-12">
• <div class="form-panel">
•
•
• <?php if($successmsg)
• {?>
• <div class="alert alert-success alert-dismissable">
• <button type="button" class="close" data-
dismiss="alert" aria-hidden="true">×</button>
• <b>Well done!</b> <?php echo htmlentities($successms
g);?></div>
• <?php }?>
•
• <?php if($errormsg)
• {?>
• <div class="alert alert-danger alert-dismissable">
• <button type="button" class="close" data-dismiss="alert" aria-
hidden="true">×</button>
• <b>Oh snap!</b> </b> <?php echo htmlentities($errorm
sg);?></div>
• <?php }?>
•
• <form class="form-horizontal style-
form" method="post" name="complaint" enctype="multipart/form-data" >
•
e - B A G A M | 86
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Action Officer</label>
• <div class="col-sm-4">
• <select name="category" id="category" class="form-
control" required="required">
• <option value="">Select Action Officer</option>
• <?php $sql=mysqli_query($con,"select id,categoryName from category ");
• while ($rw=mysqli_fetch_array($sql)) {
• ?>
• <option value="<?php echo htmlentities($rw['id']);?>"><?php echo htmlent
ities($rw['categoryName']);?></option>
• <?php
• }
• ?>
• </select>
• </div>
• <label class="col-sm-2 col-sm-2 control-label">Area Team Leader </label>
• <div class="col-sm-4">
• <select name="subcategory" id="subcategory" class="form-control">
• <option value="">Select Area Team Leader</option>
• <?php $sql=mysqli_query($con,"select id,subcategory from subcategory ");
• while ($rw=mysqli_fetch_array($sql)) {
• ?>
• <option value="<?php echo htmlentities($rw['id']);?>"><?php echo htmlent
ities($rw['subcategory']);?></option>
• <?php
• }
• ?>
• </select>
• </div>
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Grievance Type</label>
• <div class="col-sm-4">
• <select name="complaintype" class="form-control" required="">
• <option value=" Grievance"> Grievance</option>
• <option value="General Query">General Query</option>
• <option value="General Information">General Information<
/option>
• </select>
• </div>
•
• <label class="col-sm-2 col-sm-2 control-label">Purok</label>
• <div class="col-sm-4">
• <select name="street" required="required" class="form-control">
• <option value="">Select Purok</option>
• <?php $sql=mysqli_query($con,"select streetName from street ");
• while ($rw=mysqli_fetch_array($sql)) {
• ?>
• <option value="<?php echo htmlentities($rw['streetName']);?>"><?php echo
htmlentities($rw['streetName']);?></option>
• <?php
• }
• ?>
•
• </select>
• </div>
• </div>
•
e - B A G A M | 87
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Short Description</label>
• <div class="col-sm-4">
• <input type="text" name="noc" required="required" value="" required="" cla
ss="form-control">
• </div>
•
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-
label">Grievance Details (max 2000 words) </label>
• <div class="col-sm-6">
• <textarea name="complaindetails" required="required" cols="10" rows="10"
class="form-control" maxlength="2000"></textarea>
• </div>
• </div>
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-
label">Grievance Related Doc(if any) </label>
• <div class="col-sm-6">
• <input type="file" name="compfile" class="form-control" value="">
• </div>
• </div>
•
• <div class="form-group">
• <div class="col-sm-10" style="padding-
left:25% ">
• <button type="submit" name="submit" class="btn btn-
primary">Submit</button>
• </div>
• </div>
•
• </form>
• </div>
• </div>
• </div>
•
•
•
• </section>
• </section>
• <?php include("includes/footer.php");?>
• </section>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
• <script class="include" type="text/javascript" src="assets/js/jquery.d
cjqaccordion.2.7.js"></script>
• <script src="assets/js/jquery.scrollTo.min.js"></script>
• <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></
script>
•
• <!--common script for all pages-->
• <script src="assets/js/common-scripts.js"></script>
•
• <!--script for this page-->
• <script src="assets/js/jquery-ui-1.9.2.custom.min.js"></script>
•
• <!--custom switch-->
e - B A G A M | 88
• <script src="assets/js/bootstrap-switch.js"></script>
•
• <!--custom tagsinput-->
• <script src="assets/js/jquery.tagsinput.js"></script>
•
• <!--custom checkbox & radio-->
•
• <script type="text/javascript" src="assets/js/bootstrap-
datepicker/js/bootstrap-datepicker.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/date.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/daterangepicker.js"></script>
•
• <script type="text/javascript" src="assets/js/bootstrap-
inputmask/bootstrap-inputmask.min.js"></script>
•
•
• <script src="assets/js/form-component.js"></script>
•
•
• <script>
• //custom select box
•
• $(function(){
• $('select.styled').customSelect();
• });
•
• </script>
•
• </body>
• </html>
• <?php } ?>
• Registration
• <?php
• include('includes/config.php');
• error_reporting(0);
• if(isset($_POST['submit']))
• {
• $fullname=$_POST['fullname'];
• $email=$_POST['email'];
• $password=md5($_POST['password']);
• $contactno=$_POST['contactno'];
• $status=1;
• $query=mysqli_query($con,"insert into users(fullName,userEmail,passwor
d,contactNo,status) values('$fullname','$email','$password','$contactno','
$status')");
• $msg="Registration successfull. Now You can login !";
• }
• ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
e - B A G A M | 89
• <title>e-BAGAM | User Registration</title>
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
• <script>
• function userAvailability() {
• $("#loaderIcon").show();
• jQuery.ajax({
• url: "check_availability.php",
• data:'email='+$("#email").val(),
• type: "POST",
• success:function(data){
• $("#user-availability-status1").html(data);
• $("#loaderIcon").hide();
• },
• error:function (){}
• });
• }
• </script>
• </head>
•
• <body>
• <div id="login-page">
• <div class="container">
• <h3 align="center" style="color:#fff"><a href="../index.html" style="c
olor:#fff">Grievance Managent System</a></h3>
• <hr />
• <form class="form-login" method="post">
• <h2 class="form-login-heading">User Registration</h2>
• <p style="padding-left: 1%; color: green">
• <?php if($msg){
• echo htmlentities($msg);
• }?>
•
• </p>
• <div class="login-wrap">
• <input type="text" class="form-
control" placeholder="Full Name" name="fullname" required="required" autof
ocus>
• <br>
• <input type="email" class="form-
control" placeholder="Email ID" id="email" onBlur="userAvailability()" nam
e="email" required="required">
• <span id="user-availability-status1" style="font-
size:12px;"></span>
• <br>
• <input type="password" class="form-
control" placeholder="Password" required="required" name="password"><br >
• <input type="text" class="form-
control" maxlength="10" name="contactno" placeholder="Contact no" required
="required" autofocus>
• <br>
•
• <button class="btn btn-theme btn-
block" type="submit" name="submit" id="submit"><i class="fa fa-
user"></i> Register</button>
• <hr>
•
• <div class="registration">
• Already Registered<br/>
e - B A G A M | 90
• <a class="" href="index.php">
• Sign in
• </a>
• </div>
•
• </div>
•
•
•
• </form>
•
• </div>
• </div>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
•
• <!--BACKSTRETCH-->
• <!-
- You can use an image of whatever size. This script will stretch to fit i
n any screen size.-->
• <script type="text/javascript" src="assets/js/jquery.backstretch.min.j
s"></script>
• <script>
• $.backstretch("assets/img/login-bg.jpg", {speed: 500});
• </script>
•
• </body>
• </html>
• Update image
• <?php
• session_start();
• error_reporting(0);
• include('includes/config.php');
• if(strlen($_SESSION['login'])==0)
• {
• header('location:index.php');
• }
• else{
• date_default_timezone_set('Asia/Manila');// change according timezone
• $currentTime = date( 'd-m-Y h:i:s A', time () );
•
• if(isset($_POST['submit']))
• {
• $imgfile=$_FILES["image"]["name"];
•
• // get the image extension
• $extension = substr($imgfile,strlen($imgfile)-4,strlen($imgfile));
• // allowed extensions
• $allowed_extensions = array(".jpg","jpeg",".png",".gif");
•
• // Validation for allowed extensions .in_array() function searches an arra
y for a specific value.
• if(!in_array($extension,$allowed_extensions))
• {
• echo "<script>alert('Invalid format. Only jpg / jpeg/ png /gif format allo
wed');</script>";
• }
• else
• {
e - B A G A M | 91
• //rename the image file
• $imgnewfile=md5($imgfile).$extension;
• // Code for move image into directory
• move_uploaded_file($_FILES["image"]["tmp_name"],"userimages/".$imgnewfile)
;
• // Query for insertion data into database
• $query=mysqli_query($con,"update users set userImage='$imgnewfile' where u
serEmail='".$_SESSION['login']."'");
• if($query)
• {
• $successmsg="Profile photo Successfully !!";
• }
• else
• {
• $errormsg="Profile photo not updated !!";
• }
• }
• }
• ?>
•
• <!DOCTYPE html>
• <html lang="en">
• <head>
• <meta charset="utf-8">
• <meta name="viewport" content="width=device-width, initial-scale=1.0">
• <meta name="description" content="e-BAGAM user profile">
• <meta name="author" content="Grievance Tickets">
• <meta name="keyword" content="Grievance Tickets, Bootstrap, Admin, Tem
plate, Theme, Responsive, Fluid, Retina">
•
• <title>e-BAGAM | User Change Password</title>
•
• <!-- Bootstrap core CSS -->
• <link href="assets/css/bootstrap.css" rel="stylesheet">
• <!--external css-->
• <link href="assets/font-awesome/css/font-
awesome.css" rel="stylesheet" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
datepicker/css/datepicker.css" />
• <link rel="stylesheet" type="text/css" href="assets/js/bootstrap-
daterangepicker/daterangepicker.css" />
• <link href="assets/css/style.css" rel="stylesheet">
• <link href="assets/css/style-responsive.css" rel="stylesheet">
•
• </head>
•
• <body>
•
• <section id="container" >
• <?php include("includes/header.php");?>
• <?php include("includes/sidebar.php");?>
• <section id="main-content">
• <section class="wrapper">
• <h3><i class="fa fa-angle-
right"></i> Update Profile Photo</h3>
•
• <!-- BASIC FORM ELELEMNTS -->
• <div class="row mt">
• <div class="col-lg-12">
• <div class="form-panel">
•
•
e - B A G A M | 92
• <?php if($successmsg)
• {?>
• <div class="alert alert-success alert-dismissable">
• <button type="button" class="close" data-
dismiss="alert" aria-hidden="true">×</button>
• <b>Well done!</b> <?php echo htmlentities($successms
g);?></div>
• <?php }?>
•
• <?php if($errormsg)
• {?>
• <div class="alert alert-danger alert-dismissable">
• <button type="button" class="close" data-dismiss="alert" aria-
hidden="true">×</button>
• <b>Oh snap!</b> </b> <?php echo htmlentities($errorm
sg);?></div>
• <?php }?>
• <?php $query=mysqli_query($con,"select * from users where userEmail='".$_
SESSION['login']."'");
• while($row=mysqli_fetch_array($query))
• {
• ?>
•
• <h4 class="mb"><i class="fa fa-
user"></i> <?php echo htmlentities($row['fullName']);?>'s Profi
le</h4>
•
• <form class="form-horizontal style-
form" enctype="multipart/form-data" method="post" name="profile" >
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">User Photo</label>
• <div class="col-sm-4">
• <?php $userphoto=$row['userImage'];
• if($userphoto==""):
• ?>
• <img src="userimages/noimage.png" width="256" height="256" alt="">
• <?php else:?>
• <img src="userimages/<?php echo htmlentities($userphoto);?>" width="256"
height="256">
•
• <?php endif;?>
• </div>
•
• </div>
•
• <div class="form-group">
• <label class="col-sm-2 col-sm-2 control-label">Upload New Photo</label>
• <div class="col-sm-4">
• <input type="file" name="image" required />
• </div>
•
• </div>
•
e - B A G A M | 93
• <?php } ?>
•
• <div class="form-group">
• <div class="col-sm-10" style="padding-
left:25% ">
• <button type="submit" name="submit" class="btn btn-
primary">Submit</button>
• </div>
• </div>
•
• </form>
• </div>
• </div>
• </div>
•
•
•
• </section>
• </section>
• <?php include("includes/footer.php");?>
• </section>
•
• <!-- js placed at the end of the document so the pages load faster -->
• <script src="assets/js/jquery.js"></script>
• <script src="assets/js/bootstrap.min.js"></script>
• <script class="include" type="text/javascript" src="assets/js/jquery.d
cjqaccordion.2.7.js"></script>
• <script src="assets/js/jquery.scrollTo.min.js"></script>
• <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></
script>
•
• <!--common script for all pages-->
• <script src="assets/js/common-scripts.js"></script>
•
• <!--script for this page-->
• <script src="assets/js/jquery-ui-1.9.2.custom.min.js"></script>
•
• <!--custom switch-->
• <script src="assets/js/bootstrap-switch.js"></script>
•
• <!--custom tagsinput-->
• <script src="assets/js/jquery.tagsinput.js"></script>
•
• <!--custom checkbox & radio-->
•
• <script type="text/javascript" src="assets/js/bootstrap-
datepicker/js/bootstrap-datepicker.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/date.js"></script>
• <script type="text/javascript" src="assets/js/bootstrap-
daterangepicker/daterangepicker.js"></script>
•
• <script type="text/javascript" src="assets/js/bootstrap-
inputmask/bootstrap-inputmask.min.js"></script>
•
•
• <script src="assets/js/form-component.js"></script>
•
•
• <script>
e - B A G A M | 94
• //custom select box
•
• $(function(){
• $('select.styled').customSelect();
• });
•
• </script>
•
• </body>
• </html>
• <?php } ?>
e - B A G A M | 95
2. Technical Reference
Hardware Requirements:
• Processor: Intel Core i3 or higher
• RAM: 4 GB or higher
• Hard Disk Drive: 500 GB or greater
• Network: Static IP
• Hard Disk Drive: 500 GB or greater
• Operating System (Window 8 or 10)
• SMS/ GSM Module
Software Requirements:
• XAMPP/ USBWEBSERVER
• MySQL
• SMS API (Generated through the system)
• PHP
• HTML, CSS, Bootstrap
• Web Browser
• JavaScript (Node, Express)
e - B A G A M | 96
3. User Manual
2. Fill-up the necessary information then click on register and will be prompted
that your user registration was successful.
e - B A G A M | 97
Login as User/ Complainant
4. Input the User ID (email address) and the password then click on sign in
e - B A G A M | 98
5. You are now logged in to the system and from dashboard you can see the
Grievance Tickets you have submitted to the Barangay
6. Under Account Management you can see a link to your profile and the
change password option. Here is the window to your account profile and from
here you can complete your details.
e - B A G A M | 99
7. On the next tab you can see the option for filing a grievance. Fill up the
necessary information and click on submit.
8. On the last tab you can see the Grievance Monitoring from which you can see
if the grievance is acted upon.
e - B A G A M | 100
Grievance Administrator/ Barangay Official
10. . Input the credentials and click on login. Which immediately brings you to the
change password page
e - B A G A M | 101
11. Under manage Grievance us the tab for Newly Received Grievance
(Incoming Grievance), Pending Grievance (on the process Grievance) and
the Closed Grievance (Resolved Grievances).
12. Incoming Grievances include the SMS sent Grievances and Grievances filed
via user login (walk-in).
e - B A G A M | 102
13. When the user sends an SMS to the number of the barangay it will
immediately go to the incoming grievances
14. Here is a sample message that I’ve sent to the system. To test the SMS
functionality of the information system which caters the Barangay constituents
that live afar from the barangay.
15. Upon opening the textline we can now view the details of the message
e - B A G A M | 103
16. By clicking on the Take Action Button, the we can now check the details of
the grievance change the status and assign it.
17. We can now see the tagged complaint under pending grievance. From which
we can update after the grievance was resolved.
e - B A G A M | 104
18. Upon closing the grievance, we can now see that the grievance reflects
under the Closed grievances
e - B A G A M | 105