-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparks.php
More file actions
72 lines (59 loc) · 2.24 KB
/
Copy pathparks.php
File metadata and controls
72 lines (59 loc) · 2.24 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
<?php
define('LOADED', TRUE);
include_once('include/functions.php');
includeContents("parks");
getHeader();
$getSlugCity = $_GET["city"];
//$parkArray = array();
$parkArray = getParks($getSlugCity);
?>
<div class="content">
<div class="parkPageBox">
<?php
//print_r($parkArray); //output test
echo "<div class=\"parkPageForCity\">";
echo "<div class=\"parkPageForCityName\">".getCityTitle($getSlugCity)." Otoparkları </div>";
if(is_array($parkArray))
{
for($i = 0; $i < count($parkArray); $i++)
{
echo "<div class=\"parkPageForCityReservationOptions\">";
$parkId = $parkArray[$i][0];
echo "<p class=\"parkPageForCityReservationOptionsText\">Otopark Adı: ".$parkArray[$i][1]." - Puan: " .avgPoint($parkId). "<img class=\"star-icon\"src=\"" .isDevelopmentModeOn(). "images/star.png\"></p>";
echo "<p class=\"parkPageForCityReservationOptionsText\">İlçe: ".$parkArray[$i][2]."</p>";
$availablePark = (int)$parkArray[$i][3] - (int)$parkArray[$i][4];
if($availablePark === 0)
{
echo "Otopark <span class=\"color2\">dolu</span>";
}
else
{
echo "<p class=\"parkPageForCityReservationOptionsText\">Boş yer sayısı: <span class=\"color1\">".$availablePark."</span></p>";
echo "<button class=\"parkPageButton\"><a class=\"parkPageButtonText\" href=\"".isDevelopmentModeOn()."park/".getParkTitle($parkId)."\"><span>Rezervasyon Yap</span></a></button>";
echo "<button class=\"parkPageButton\"><a class=\"parkPageButtonText\" href=\"javascript:void(0)\" onclick=\"comments(" .$parkId. "); return false;\"><span>Yorumlar ve Puanlar</span></a></button>";
}
echo "</div>";
}
}
else //eğer otopark bulunamadıysa veya yok ise direk hata mesajını gösterecek.
{
echo $parkArray;
}
echo "<div class=\"pagination\" style=\"margin-top:13px;\">
<a href=\"javascript:void(0)\">«</a>
<a href=\"javascript:void(0)\" class=\"active\">1</a>
<a href=\"javascript:void(0)\">2</a>
<a href=\"javascript:void(0)\">3</a>
<a href=\"javascript:void(0)\">4</a>
<a href=\"javascript:void(0)\">5</a>
<a href=\"javascript:void(0)\">6</a>
<a href=\"javascript:void(0)\">»</a>
</div>";
echo "</div>";
?>
</div>
</div>
<?php
getFooter();
getHtmlEnd();
?>