Documente Academic
Documente Profesional
Documente Cultură
ABSTRACT
EZKhoj is a web-based mapping service or a navigation tool which offers location including
specific information about sites (tourist destinations, local clinic, gas stations, etc.) as well as
important services (free health campaigns, updates on petroleum distribution, carpooling,
event updates). Google Map, being one of the most successful web mapping service is not
always going to come in handy based on every events and services going to be conducted in a
particular city or country. Though it has been able to come up with most of the facilities a web
mapping service can provide, a lack of completeness is still felt.
EZKhoj is looking forward to target the web mapping service for the services that make a lot
of difference based on a particular locality. We, being a landlocked country have come through
a lot of issues in the recent years which doesn’t seem to be over for quite some time. It not only
focuses on the basic needs but helps users to look for the higher perspective of what service
and events have been running throughout their locality and country as well. Working like an
informer, it looks forward for the intelligent flow of information with the help of mapping
service. Creating ease to the users by acting as a local based mapping service, it provides users
with the power to be updated as well as keep others updated.
I
EZKhoj
ACKNOWLEDGEMENT
The project has been benefited from the joint efforts of many individuals. It has been a
pleasure for us to acknowledge the assistance and contributions that were very important
and supportive throughout the project. We would like to extend our sincere thanks to all of
them.
We owe special thanks to a number of people who has devoted much of their time and expertise
without which it would have been very difficult for us to complete our project entitled
“EZKhoj”.
We would like to extend our special thanks to Er. Madan Kadariya, Head of Department
of IT Engineering for his valuable guidance throughout the project development period and
for providing technical support with suggestions which helped our project to grow and foster
to a certain level we didn’t think of reaching in such a short period.
We would not forget to thank our teachers and classmates who have been knowingly or
unknowingly the part of this project and lent support and views during the entire development
time.
II
EZKhoj
LIST OF ABBREVIATIONS
ER Entity Relationship
FP Function Point
PM Person-month
III
EZKhoj
LIST OF FIGURES
Figure 9.0.12: Fill out this field message (Events update) ...................................................... 40
IV
EZKhoj
Figure 12.0.3: Google Maps API, Events Newsfeed and Scraped Events Feed ..................... XI
V
EZKhoj
LIST OF TABLES
VI
EZKhoj
TABLE OF CONTENTS
Abstract ........................................................................................................................................I
Acknowledgement ...................................................................................................................... II
List Of Abbreviations ................................................................................................................ III
List Of Figures ...........................................................................................................................IV
List Of Tables ............................................................................................................................VI
1. Introduction ........................................................................................................................ 1
1.1 Problem Statement ...................................................................................................... 1
1.2 Project Overview ........................................................................................................ 1
1.3 Project Objectives ....................................................................................................... 2
1.4 Project Scope And Limitations ................................................................................... 3
1.5 Significance Of Study ................................................................................................. 3
2. Literature Review............................................................................................................... 4
2.2 Google Maps ............................................................................................................... 4
2.3 Comparision With Google Maps ................................................................................ 5
2.3.1 Features Not Provided ...................................................................................... 5
2.3.2 Solutions Offered To The Existing Deficiencies .............................................. 5
3. Proposed Results ................................................................................................................ 6
4. Team Members And Divided Roles ................................................................................... 7
5. Requirement ....................................................................................................................... 8
5.1 Requirement Analysis ................................................................................................. 8
5.2 System Requirement Specifications ........................................................................... 8
5.2.1 Functional Requirements .................................................................................. 8
5.2.2 Input Requirements ........................................................................................ 10
5.2.3 Output Requirements ...................................................................................... 14
5.2.4 Security Requirements ................................................................................... 14
5.2.5 Hardware Specifications................................................................................. 14
6. Methodology .................................................................................................................... 15
6.1 Software Development Lifecycle ............................................................................. 15
6.1.1 Analysis Phase ................................................................................................ 16
6.1.3 Coding Phase .................................................................................................. 16
6.1.4 Testing Phase .................................................................................................. 16
6.2 Technologies Used .................................................................................................... 16
VII
EZKhoj
VIII
EZKhoj
1. INTRODUCTION
Our project, EZKhoj is a web-based mapping service or a navigation tool which offers location
including specific information about sites (tourist destinations, local clinic, gas stations, etc.)
as well as important services (free health campaigns, updates on petroleum distribution,
carpooling, event updates). This document provides the scope and context of the project to be
undertaken. It also provides a schedule for the completion of the project, including a list of all
the deliverables and presentations required.
The web mapping service lacks features regarding navigation related with the important yet
unavailable searches, hence the search is not optimized. Furthermore, there is a communication
gap between service providers and users. Consequently, there is unavailability of genuine
information. We have felt that the flow of updates of services/events by the different profit and
not-profit organizations have not been effective. Hence, people are deprived of the free
availability of services. With that demanding need of efficient flow of information however
lacking in the respective areas, the services don’t create that impact which they really can. The
resources which are used, don’t get to be as effective as their potential can be.
1
EZKhoj
increase in number when there are lots of participants as it would encourage more such
activities in the future. As this project focuses on services with the help of web-mapping, it has
higher expectations regarding the increase in number of services.
This proposal provides the scope and context of the project to be undertaken. It details the
intended user group and the value that the system will have to them. It also provides a schedule
for the completion of the project, including a list of all the deliverables and presentations
required.
2
EZKhoj
Although our projects seems to answer most of the recent problems regarding the flow of
information about the service, it has certain limitations that might be quite crucial at times.
Some of the limitations of our project are:
It basically focuses on the service-mapping rather than like a overall web mapping tool.
Possibility of flow of unauthentic information.
Dependent upon Google Maps API.
May not cover all the aspects of services that are being provided.
3
EZKhoj
2. LITERATURE REVIEW
This section consists the literature study on the web based mapping service. Our project is
looking forward to define all the possible services so that there is an intelligent system of web-
mapping for the required and general services.
2.1 REVIEW
With the improving devices and technology, mapping service are becoming handy day by day
which is obviously going to add more expectations to the services provided by them in the
future. Even though some services might seem overwhelming and some might seem
insufficient, there will always be some areas for improvement. Hence our project is looking
forward to define all the possible services so that there is an intelligent system of web-mapping
for the required and general services.
Google launched the Google Maps API in June 2005[1] to allow developers to integrate Google
Maps into their websites. It is a free service, and currently does not contain ads, but Google
states in their terms of use that they reserve the right to display ads in the future.[2]. By using
the Google Maps API, it is possible to embed Google Maps site into an external website, on to
which site specific data can be overlaid.[3] Although initially only a JavaScript API, the Maps
API was expanded to include an API for Adobe Flash applications (but this has been
deprecated), a service for retrieving static map images, and web services for
performing geocoding, generating driving directions, and obtaining elevation profiles. Over
1,000,000[4] web sites use the Google Maps API, making it the most heavily used web
application development API.[5]
4
EZKhoj
The Google Maps API is free for commercial use, provided that the site on which it is being
used is publicly accessible and does not charge for access, and is not generating more than 25
000 map accesses a day.[6][7] Sites that do not meet these requirements can purchase the Google
Maps API for Business.[8]
Google Map, being one of the most successful web mapping service is not always going to
come in handy based on every events and services going to be conducted in a particular city or
country. Though it has been able to come up with most of the facilities a web mapping service
can provide, a lack of completeness is still felt.
EZKhoj is looking forward to target the web mapping service for the services that make a lot
of difference based on a particular locality. We, being a landlocked country have come through
a lot of issues in the recent years which doesn’t seem to be over for quite some time. It not only
focuses on the basic needs but helps users to look for the higher perspective of what service
and events have been running throughout their locality and country as well. Working like an
informer, it looks forward for the intelligent flow of information with the help of mapping
service. Creating ease to the users by acting as a local based mapping service, it provides users
with the power to be updated as well as keep others updated.
5
EZKhoj
3. PROPOSED RESULTS
EZKhoj will be able to provide users with the services that are essential yet not included in the
web mapping service. The end product will have the following end results:
Users will get to be updated with the events, campaigns and services that will be running
throughout their community/locality.
They will also have the power to promote the flow of information.
EZKhoj will also be able to give timely notifications with its News Feed.
Users will be able to choose services from various service providers.
Users will also be able to create their profile and can authenticate themselves as one of
the informer for EZKhoj and update information as they go.
The product will be able to give users with a proper UI/UX so that they can enjoy the
web-mapping service smoothly.
Users will be able to view and navigate through horizontal and vertical panoramic street
level views of various sites.
6
EZKhoj
Kumar
End User Documentation Participate in testing
Sardar
Expert Develop Documentation
7
EZKhoj
5. REQUIREMENT
Provides user with the information regarding events(free services, health campaigns,
awareness programs) being conducted
Provides user with the platform to share and broadcasts the events that they have
come across
Notifies user with the events they have joined to
Allows user to view events from the third-party website.
8
EZKhoj
Backup facility
User details and records related to user for user validation purpose. This is kept in the
database.
Output to user
Soft Output Requirements
a. Displays the marker on the Google Maps API at the posted events location.
b. News feed with the list of crawled events from third party website and the
added events.
Interface required
Users are provided with a web interface which includes all the information
during the events on the main page. They can choose to join the events and let
them see the notifications for the events regarding their interests. They can
also view other events from third party websites. However, users first need to
sign up so that they can be validated with their login and records of each
individual can be kept for future use by user themselves.
The user would be working with the following windows. Their functions are
also listed below:
o Login and signup Window
It will be used to let user sign up for their account if they don’t have an
account or login for the account if they already have an account
9
EZKhoj
o About us window
It contains all the information regarding the developers and designers of
the website and is beneficial for business deals or short overview of the
creators.
o Contact us window
It will be used if there is any issue regarding the web application which
users want to report to the system managers.
Data Required
The data to be input are:-
User information
Source of data
The information will be given by user themselves. And the events have to be
selected by user in order to be notified about the events.
Web scraping of event details( Fetching of event data from external websites)
The user inputs, for each, are categorized on the basis of entry by the user. They are tabulated
below along with data description, validation and data length which would be helpful in Design
Phase.
10
EZKhoj
11
EZKhoj
12
EZKhoj
13
EZKhoj
Output Objectives
The user requires following output from the system:
1. Broader details of all the events in the newsfeed and map
2. Full details on the events they have joined to.
3. Acknowledgement of events going on through third party website
Users are to sign up and then only get access to the information regarding the events so that
each user can have their separate record to the events they are interested in or joined to and
only authorized user will be able to update the events. Therefore each user have been given
their own account with username and password to login. Password are saved in database,
which are hashed using Sha-1 protocol. This will kept the information safe from intruders as
well as those who are authorized to manage database only.
As this is a Web application, higher specs of hardware is not a compulsory. However having a
proper web browser which meets the latest need of web applications can be a plus point
during the use.
i. Processing Speed: 800 MHz or Higher
ii. Memory: 128MB or Higher and 10MB free space
iii. Input: Standard Keyboard, Mouse
iv. Output: Monitor
v. Display: 256 Color SVGA display
These are the minimum requirements for running the Web Application in one’s personal
computer.
14
EZKhoj
6. METHODOLOGY
We have planned to work following these methodologies for the application of knowledge,
skills, tools and techniques to a broad range of activities in order to meet the requirements of
our project, EZkhoj.
15
EZKhoj
In this phase, analysis will be performed in order to find out the requirements of the system.
The outcome of this phase would be a SRS which is an acronym for “System Requirement
Specifications”.
In this phase the SRS would be translated into the system’s design. Context Diagram, DFD,
ER – Diagram, Use Case Diagram and Class Diagram will be developed.
In this phase, coding will be done according to the design and a working system will be
developed by the end of this process.
In this phase, the system will be tested. With each testing a list of changes to the system
developed, is suggested and the changes will be applied to the software and the software would
be delivered as a successive increment until a satisfying system is achieved.
16
EZKhoj
17
EZKhoj
18
EZKhoj
7. SYSTEM DESIGN
The data type, size and constraints for each data Entity is documented. The data types are
identified as following:-
19
EZKhoj
The context diagram represents the overall explanation of the system ‘EZKhoj’.The
system has been shown in diagrammatic process below:
-
User AGoogle Maps API
Interface (View)
Event location
User details
information
Map API
EZKhoj
User updated
event infos
Content Fetch
Event details
request
D External
sEvent Website
20
EZKhoj
The flow of data in our system is represented by the following Data Flow Diagram.
21
EZKhoj
Use case is a list of steps, typically defining interactions between a role and a system, to
achieve a goal. The following figure shows the interactions between the roles involved and
the EZKhoj.
23
EZKhoj
A Sequence diagram is an interaction diagram that shows how processes operate with one
another and in what order. A sequence diagram shows object interactions arranged in time
sequence. Sequence diagrams are typically associated with use case realizations in the Logical
View of the system under development. A sequence diagram shows, as parallel vertical lines
(lifelines), different processes or objects that live simultaneously, and, as horizontal arrows,
the messages exchanged between them, in the order in which they occur.
24
EZKhoj
25
EZKhoj
8. BUDGET
[Weight * Count]
No of User Inputs 11 4 44
No of User Outputs 6 5 30
No of Logical Files 3 10 30
No of External Interfaces 2 7 14
Function Point (FP) = Count Total * Complexity Multiplier The value of Complexity
14 Multiplier ranges from 0.65
= 126* [0.65 + 0.01 *∑ fi to 1.35. Since, our project
i=1 is average, the value of the
count and the complexity
=126 * 1.17
multiplier used is average,
i.e. we have assumed an
= 147.42
average value as 1.17
≈ 147
Average productivity = 10 FP / pm
26
EZKhoj
FP
Effort =
Average Productivity
= 147 / 10
≈ 15
Average Productivity
= 147 * 5000 / 10
= Rs. 73,500
The value of the count and the count multiplier used is average.
· Number of user inputs
Each user input that provides distinct application oriented data to the software is
counted.
· Number of user outputs
Each user output that provides application oriented information to the user is counted.
In this context "output" refers to reports, screens, error messages, etc. Individual data
items within a report are not counted separately.
· Number of user inquiries
An inquiry is defined as an on-line input that results in the generation of some
immediate software response in the form of an on-line output. Each distinct inquiry is
counted.
· Number of files
Each logical master file is
counted.
· Number of external interfaces
All machine-readable interfaces that are used to transmit information to another
system are counted.
27
EZKhoj
LOC (Lines of Code) is a simple and straight forward way of counting the productivity of
a programmer in a given time period.
Using Lines of Code metric, the project size is estimated by counting the number of
source instructions in the developed program.
Now,
= 1634 * 5000/120
≈ Rs. 68,083
28
EZKhoj
9. TESTING
We wanted to make sure that all the elements of the developed worked functioned properly.
For this, we created a test plan for our work, in which elements such as validation, reliability
and user acceptance will be tested. The system will be tested for normal condition,
primarily.
The reviews, walkthroughs, or inspections are referred to as static testing, whereas actually
executing programmed code with a given set of test cases is referred to as dynamic testing.
Static testing is often implicit, as proofreading, plus when programming tools/text editors
check source code structure or compilers (pre-compilers) check syntax and data flow as
static program analysis. Dynamic testing takes place when the program itself is run.
Dynamic testing may begin before the program is 100% complete in order to test particular
sections of code and are applied to discrete functions or modules. Typical techniques for
this are either using stubs/drivers or execution from a debugger environment.
Static testing involves verification, whereas dynamic testing involves validation. Together
they help improve software quality. Among the techniques for static analysis, mutation
testing can be used to ensure the test-cases will detect errors which are introduced by
mutating the source code. [10]
Unit testing, also known as component testing refers to tests that verify the functionality
of a specific section of code, usually at the function level. In an object-oriented
environment, this is usually at the class level, and the minimal unit tests include the
29
EZKhoj
constructors and destructors. Developers usually write these types of tests as they work on
code (white-box style), to ensure that the specific function is working as expected. One
function might have multiple tests, to catch corner cases or other branches in the code.
Unit testing alone cannot verify the functionality of a piece of software, but rather is used
to ensure that the building blocks of the software work independently from each other.
Integration testing is any type of software testing that seeks to verify the interfaces between
components against a software design. Integration testing works to expose defects in the
interfaces and interaction between integrated components (modules). Progressively larger
groups of tested software components corresponding to elements of the architectural
design are integrated and tested until the software works as a system.
The practice of component interface testing can be used to check the handling of data
passed between various units, or subsystem components, beyond full integration testing
between those units. The data being passed and the range or data types can be checked, for
data generated from one unit, and tested for validity before being passed into another unit.
One option for interface testing is to keep a separate log file of data items being passed,
often with a timestamp logged to allow analysis of thousands of cases of data passed
between units for days or weeks. Tests can include checking the handling of some extreme
data values while other interface variables are passed as normal values. Unusual data
values in an interface can help explain unexpected performance in the next unit.
Component interface testing is a variation of black-box testing, with the focus on the data
values beyond just the related actions of a subsystem component.
This refers to testing for the better support of the web application to the system specified
and performance on the different systems and hardwares. This helps to get an insight on
the hardware specifications that were specified in the requirement analysis of the project.
The different testing methods and levels assure that the quality of the product is maintained
with a better performance and best level of data security and integrity.
30
EZKhoj
31
EZKhoj
y alphabets
allowed)
10. Signup Invalid format Invalid Email Invalid Email Test 2.7
Email address Address Address
11. Signup Valid format Valid Email Valid Email Test 2.8
Email Address Address Address
12. Update Leave one of Please fill out this Please fill out this Test 3.1
Events the required field. field.
fields empty
13. Update Fill all details You have You have Test 3.2
Events correctly successfully successfully
updated the event. updated the event.
Thank you! Thank you!
14. Edit Fill all details Successfully saved Successfully saved Test 4.1
Profile correctly changes. changes
32
EZKhoj
1. Form: Login
TEST 1.1
33
EZKhoj
TEST 1.2
34
EZKhoj
TEST 1.3
2. Form: Signup
TEST 2.1
Purpose : To know what happens if either field is left blank
Input : Blank password.
Expected Output : Please fill out this field. (Password field)
TEST 2.2
Purpose: To know what happens if all the required field/s are filled correctly
by user
(username)
36
EZKhoj
TEST 2.3
Purpose : To check the validity of username. Only alphabets are
allowed.
Input : Numbers in username
Expected Output : Bad Username
TEST 2.4
Purpose : To check the validity of username. Only alphabets are
allowed.
Input : Alphabets in username
Expected Output : Good Username
TEST 2.5
Purpose : To check the JavaScript for matching password and repeat
password field
Input : Unmatched passwords
Expected Output : Password do not match
TEST 2.6
TEST 2.7
Purpose : To check the validity of email expression (valid format:
xyz@abc.com)
Input : Invalid format email
Expected Output : Invalid Email Address
TEST 2.8
Purpose : To check the validity of email expression (valid format:
xyz@abc.com)
Input : Valid format email
Expected Output : Valid Email Address
39
EZKhoj
TEST 3.1
40
EZKhoj
TEST 3.2
Purpose : To know what happens if all the required field/s are filled
correctly by user
Input : All required fields were properly filled
Expected Output : You have successfully updated the event. Thank you!
41
EZKhoj
TEST 4.1
Purpose : To know what happens if all the required field/s are filled
correctly by user
Input : All required fields were properly filled
Expected Output : Successfully saved changes.
42
EZKhoj
The project schedule has been designed as per requirements and constraints involved. This
project is scheduled to be completed in about 2 months. Requirement analysis have been given
more emphasis. Research and database management is to be done first and well documented.
Debugging and Testing is to be done prior to the completion of the project.
43
EZKhoj
EZKhoj is looking forward to target the web mapping service for the services that make a lot
of difference based on a particular locality. Working like an informer, EZKhoj has the
potential for the intelligent flow of information with the help of mapping service. Creating
ease to the users by acting as a local based mapping service, it provides users with the power
to be updated as well as keep others updated.
With some minor change to be done in the project, it will be completed in one month with
documentation and made available to the users. The future extensions for the project are:
Users can place the markers without having to enter coordinates (latitude and
longitude) in the events update form.
Smart events scraping from the multiple sites
Events Notifications through SMS
Concurrent updates from users over different networks.
More responsive application design
44
EZKhoj
[3] "PHP and MySQL: Working with Google Maps". Syntaxxx. [Online]. Available
http://syntaxxx.com/php-and-mysql-working-with-google-maps/ [Accessed: 20- Dec- 2015].
[4] "A fresh new look for the Maps API, for all one million sites". [Online]. Available
http://googlegeodevelopers.blogspot.com/2013/05/a-fresh-new-look-for-maps-api-for-
all.html [Accessed: 20- Dec- 2015].
[6] "Google Maps API FAQ". https: // developers . google. com / maps / faq? csw=1# tos_
commercial [Accessed: 20- Dec- 2015].
[10] Alia Douglas. Software testing - Wikipedia, the free encyclopedia [Online]
Available:http://en.wikipedia.org/wiki/Software_testing
APPENDIX A
IX
EZKhoj
SYSTEM SNAPSHOT
X
EZKhoj
Figure 12.0.3: Google Maps API, Events Newsfeed and Scraped Events Feed
XI
EZKhoj
XIV
EZKhoj
APPENDIX B
CODE LISTING
}
$_SESSION['username']=$username;
echo "<script type='text/javascript'>alert('You have been successfully registered to EZKhoj.
Welcome $username '); window.location.href='homepage.php';</script>";
?>
XV
EZKhoj
AUTHENTICATION CODE
<?php
session_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="user1"; // Database name
$tbl_name="user"; // Table name
?>
XVI
EZKhoj
function validateEmail(emailField){
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if (reg.test(emailField.value) == false)
{
document.getElementById("emailvalidation").innerHTML = "Invalid Email
Address";
document.getElementById("Email").focus();
}
else
{
document.getElementById("emailvalidation").innerHTML = "Valid Email
Address";
}
}
NEWSFEED
<?php
// Connect to database server
mysql_connect("localhost", "root", "") or die (mysql_error ());
// Select database
mysql_select_db("eventdb") or die(mysql_error());
// SQL query
$strSQL = "SELECT * FROM eventlist";
while($row = mysql_fetch_array($rs)) {
$title=$row['Title'];
$organizer=$row['Organizer'];
$date=$row['Date'];
$venue=$row['Venue'];
// Write the value of the column FirstName (which is now in the array $row)
echo $title ." organized by " .$organizer." on " .$date." at " .$venue . "<br /><br/>";
// Select database
mysql_select_db("eventdb") or die(mysql_error());
// SQL query
$strSQL = "SELECT * FROM eventlist";
XIX
EZKhoj
while($row = mysql_fetch_assoc($rs))
{
$titleArray[]=$row['Title'];
$latArray[] = $row['Latitude'];
$longArray[]=$row['Longitude'];
$count++;
}
<script>
jQuery(function($) {
// Asynchronously Load the map API
var script = document.createElement('script');
script.src = "http://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize";
document.body.appendChild(script);
});
function initialize() {
var counts=<?php echo $count; ?>;
XX
EZKhoj
<?php } ?>
var map;
var bounds = new google.maps.LatLngBounds();
var mapOptions = {
mapTypeId: 'roadmap'
};
XXI
EZKhoj
// Multiple Markers
}
// Display multiple markers on a map
var infoWindow = new google.maps.InfoWindow(), marker, i;
// Loop through our array of markers & place each one on the map
for( i = 0; i < markers.length; i++ ) {
var position = new google.maps.LatLng(markers[i][1], markers[i][2]);
bounds.extend(position);
marker = new google.maps.Marker({
position: position,
map: map,
animation:google.maps.Animation.BOUNCE,
title: markers[i][0]
});
infoWindow.setContent("<b>Title:"+markers[i][0]+"<br>"+"Organizer:"+markers[i][
XXII
EZKhoj
5]+"<br>"+"Date:"+markers[i][3]+"<br>"+"Venue:"+markers[i][4]+"</B>");
infoWindow.open(map, marker);
}
})(marker, i));
// Override our map zoom level once our fitBounds function runs (Make sure it only runs
once)
var boundsListener = google.maps.event.addListener((map), 'bounds_changed',
function(event) {
this.setZoom(14);
google.maps.event.removeListener(boundsListener);
});
}
</script>
XXIII
EZKhoj
for($i=0;$i<$arrlength;$i++)
{
$sql="INSERT INTO crawledevent VALUES('$output[$i]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
}
// SQL query
$strSQL = "SELECT * FROM crawledevent";
// Execute the query (the recordset $rs contains the result)
$rs = mysql_query($strSQL);
while($row = mysql_fetch_array($rs)) {
$title=$row['Title'];
echo $title. "<hr/>";
}
USER PROFILE
<div class="userprof">
<img src="assets/img/user.jpg" class="img-rounded img-responsive" />
<br />
<?php
// Connect to database server
mysql_connect("localhost", "root", "") or die (mysql_error ());
// Select database
mysql_select_db("user1") or die(mysql_error());
// SQL query
$usernames=$_SESSION['username'];
$strSQL = "SELECT * FROM user where Username= '$usernames'";
\ // Execute the query (the recordset $rs contains the result)
$rs = mysql_query($strSQL);
// Loop the recordset $rs
XXIV
EZKhoj
$username=$row['Username'];
$fullname=$row['Fullname'];
$email=$row['Email'];
}
// Close the database connection
mysql_close();
?>
<label>Registered Username</label><br/>
<?php echo $username; ?><br/>
<label>Registered Name</label><br/>
<?php echo $fullname; ?><br/>
<label>Registered Email</label><br/>
<?php echo $email; ?><br/>
</div>
EVENT UPDATE
<?PHP
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("eventdb", $con) or die('Could not select database');
if ($_POST)
{
$name=$_POST['name'];
$date=$_POST['date'];
XXV
EZKhoj
$venue= $_POST['venue'];
$Organizer=$_POST['Organizer'];
$latitude=$_POST['latitude'];
$longitude=$_POST['longitude'];
$Category=$_POST['Category'];
$eventtype=$_POST['eventtype'];
$sql="INSERT INTO eventlist VALUES
('$name','$date','$venue','$Organizer','$latitude','$longitude','$Category','$eventtype')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
mysql_close($con);
}
?>
<script type='text/javascript'>
alert('You have successfully updated the event. Thank you! ');
window.location.href='homepage.php';
</script>";
EDIT PROFILE
<?PHP
session_start();
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("user1", $con) or die('Could not select database');
if ($_POST)
XXVI
EZKhoj
{
$fullname=$_POST['Fullname'];
$username=$_POST['Username'];
$email= $_POST['Email'];
$pass=$_POST['Password'];
$sql="UPDATE user SET
Fullname='$fullname',Username='$username',Email='$email',Password='$pass'
where Username='$username'";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
mysql_close($con);
?>
XXVII