-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathuserRecommendPlaces.php
More file actions
117 lines (93 loc) · 2.6 KB
/
userRecommendPlaces.php
File metadata and controls
117 lines (93 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
include_once( "sessionRedirector.php" );
include_once( "queryFunctions.php" );
include_once( "algorithm.php" );
$userid = $_SESSION[ "userid" ];
$names;
$latLong = array();
$query1 = "SELECT DISTINCT placeid FROM usertags, placestags WHERE usertags.tagid = placestags.tagid AND userid = " . $userid;
global $connection;
$results1 = mysqli_query( $connection, $query1 );
$rows = mysqli_fetch_all( $results1 );
$recommendedPlaces = array();
foreach($rows as $temp) {
array_push($recommendedPlaces, $temp[0]);
}
?>
<?php include( "userDashboardHeader.php" ); ?>
<div class="breadcrumbs">
<div class="col-sm-4">
<div class="page-header float-left">
<div class="page-title">
<h1>
<?php
if (isset($_GET["status"])) {
//var_dump($_GET);
echo $_GET["status"];
}
//
// if (isset($_POST[ "submit" ])) {
// echo var_dump($names[0]);
// }
?>
</h1>
</div>
</div>
</div>
<div class="col-sm-8">
<div class="page-header float-right">
<div class="page-title">
<ol class="breadcrumb text-right">
<li class="active"></li>
</ol>
</div>
</div>
</div>
</div>
<div class="breadcrumbs">
<div class="col-sm-4">
<div class="page-header float-left">
<div class="page-title">
<h1>
Journey Plan
</h1>
</div>
</div>
</div>
</div>
<div class="content mt-3">
<?php
foreach ( $recommendedPlaces as $place ) {
global $connection;
$query = "SELECT * FROM places WHERE placeid = " . $place;
$results = mysqli_query( $connection, $query );
while ( $row = mysqli_fetch_assoc( $results ) ) {
?>
<div class="col-lg-6">
<div class="card">
<div class="card-header">
<strong>
<?php echo $row["placename"]; ?>
</strong>
</div>
<div class="card-body card-block">
<div class="form-group">
<label for='street' class=' form-control-label'>Coordinates</label>
<input type="text" id="vat" value='<?php echo $row["lattitude"] . "N, " . $row ["longitude"] . "E"; ?>' class="form-control col-lg-12" readonly>
</br>
<label for="vat" class=" form-control-label">Tags</label>
<input type="text" id="vat" placeholder="NA" value='<?php echo implode(", ", getCurrentPlaceTags($place)); ?>' class="form-control col-lg-12" readonly>
<br>
<label for="vat" class=" form-control-label">Modes of Transport</label>
<input type="text" id="vat" placeholder="NA" value='<?php echo implode(", ", getCurrentPlaceTransport($place)); ?>' class="form-control col-lg-12" readonly>
<br>
</div>
</div>
</div>
</div>
<?php
}
}
?>
</div>
<?php include( "userDashboardFooter.php" ); ?>