-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfavorites.php
More file actions
84 lines (84 loc) · 3.32 KB
/
Copy pathfavorites.php
File metadata and controls
84 lines (84 loc) · 3.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="assets/lib/bootstrap/css/bootstrap.css">
<script type="text/javascript" src="assets/lib/js/jquery.js"></script>
<script type="text/javascript" src="assets/lib/bootstrap/js/bootstrap.js"></script>
<title>Favorites | westernNepal</title>
</head>
<?php include('include/userHeader.php'); ?>
<body style="padding-top: 50px;">
<div class="container">
<div class="row">
<div class="col-md-12">
<h3 align="center">
<span style="color: green;">
<span class="glyphicon glyphicon-minus" aria-hidden="true"></span>
Favroites of <?=ucfirst($_SESSION['userName'])?>
<span class="glyphicon glyphicon-minus" aria-hidden="true"></span>
</span>
</h3>
<table class="table table-hover table-condensed " >
<?php
//include('function.php');
//$cn=makeconnection();
$sql="SELECT * FROM places WHERE placeID IN ( SELECT placeID FROM favorites WHERE userID = '".$_SESSION['userID']."' ) ";
//$sql="SELECT * FROM places where placeid=13";
$result=$cn->query($sql);
$i=0;
if($result = mysqli_query($cn, $sql)):
if(mysqli_num_rows($result) > 0):
while($row = mysqli_fetch_array($result)):?>
<tr>
<td colspan="3" >
<h4><?php echo ++$i.". ".$row[1]?></h4>
<strong>Location:</strong> <?=$row[2]?><br>
<a href="view.php?id=<?= $row[0];?>&action=view" target="_blank">View </a>|
<a href="view.php?id=<?= $row[0];?>&action=remove">Remove from Favroites </a>
</td>
<td colspan="2">
<img src="admin/uploads/gandaki.png" class="img-responsive img-rounded" alt="" style="width:150px;height:auto;"">
</td>
</tr>
<th>Natural Heritages</th></a>
<th>Cultural Heritage</th>
<th>Other Attraction</th>
<th>Adventure</th>
<th>Best Time to travel</th>
</tr>
<tr>
<td><?=$row[3]?></td>
<td><?=$row[4]?></td>
<td><?=$row[5]?></td>
<td><?=$row[6]?></td>
<td><?=$row[7]?></td>
</tr>
<tr>
<td colspan="5" align="center">
<h3 style="color: green;">
<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span>
<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span>
<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span>
<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span>
<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span>
<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span>
</h3>
</td>
</tr>
<?php endwhile; else:?>
<div class="well" align="center">
<h1>
Sorry ! You didn't added favorites yet
</h1>
<h3>
<a href="userportal.php">add something now ? </a>
</h3>
</div>
<?php endif; endif;?>
</table>
</div>
</div>
</div>
</body>
</html>