| Current Path : /home/evliyala/silsileler.com/ |
| Current File : /home/evliyala/silsileler.com/hari.php |
<?php
require_once "db.php";
class harita
{
function city ($db) {
@$ulke=$_POST["ulke"];
if (isset($ulke)):
$dbid = "SELECT DISTINCT sehir FROM harita where ulke LIKE '%$ulke%'";
$iceri1m=$db->prepare($dbid);
$iceri1m->execute();
$iceri2m=$iceri1m->get_result();
echo '<form action="harita.php?secim=sehir" method="post" > <li class="nav-item dropdown " >
<a class="btn btn-dark dropdown-toggle" data-toggle="dropdown" role="button" style="font-size: large;" aria-haspopup="true" aria-expanded="false">ŞEHİR</a>
<div class="dropdown-menu btn btn-outline-warning bg-warning" style="height: 250px; overflow-x: hidden; overflow-y: scroll;">';
while($dbuyeid=$iceri2m->fetch_assoc()):
echo ' <input type="submit" class="dropdown-item" name="sehir" value="'.$dbuyeid["sehir"].'"/>';
endwhile;
echo ' </div>
</li> </form> ';
else:
$dbid = 'SELECT DISTINCT sehir FROM harita ORDER BY FIELD(ulke, "Türkiye") DESC, sehir';
$iceri1m=$db->prepare($dbid);
$iceri1m->execute();
$iceri2m=$iceri1m->get_result();
echo '<form action="harita.php?secim=sehir" method="post" > <li class="nav-item dropdown" >
<a class="btn btn-dark dropdown-toggle" data-toggle="dropdown" role="button" style="font-size: large;" aria-haspopup="true" aria-expanded="false">ŞEHİR</a>
<div class="dropdown-menu btn btn-outline-danger bg-warning " style="height: 250px; overflow-x: hidden; overflow-y: scroll;">';
while($dbuyeid=$iceri2m->fetch_assoc()):
echo ' <input type="submit" class="dropdown-item " name="sehir" value="'.$dbuyeid["sehir"].'"/>';
endwhile;
echo ' </div>
</li> </form> ';
endif;
}
function country ($db) {
$dbid2 = 'SELECT DISTINCT ulke FROM harita ORDER BY FIELD(ulke, "Türkiye") DESC';
$icerim=$db->prepare($dbid2);
$icerim->execute();
$iceri4m=$icerim->get_result();
echo '<form action="harita.php?secim=ulke" method="post" > <li class="nav-item dropdown">
<a class="btn btn-dark dropdown-toggle" data-toggle="dropdown" role="button" style="font-size: large;" aria-haspopup="true" aria-expanded="false">ÜLKE </a>
<div class="dropdown-menu btn btn-outline-warning bg-warning" style="height: 250px; overflow-x: hidden; overflow-y: scroll;">';
while($dbuyeid2=$iceri4m->fetch_assoc()):
echo ' <input type="submit" class="dropdown-item" name="ulke" value="'.$dbuyeid2["ulke"].'"/>';
endwhile;
echo ' </div>
</li> </form> ';
}
function ad ($db) {
@$sehir=$_POST["sehir"];
if (isset($sehir)):
$dbid4 = "SELECT DISTINCT ilce FROM harita where sehir LIKE '%$sehir%'";
$iceri14m=$db->prepare($dbid4);
$iceri14m->execute();
$iceri24m=$iceri14m->get_result();
echo '<form action="harita.php?secim=ilce" method="post" > <li class="nav-item dropdown " >
<a class="btn btn-dark dropdown-toggle" data-toggle="dropdown" role="button" style="font-size: large;" aria-haspopup="true" aria-expanded="false">İLÇE</a>
<div class="dropdown-menu btn btn-outline-warning bg-warning" style="height: 250px; overflow-x: hidden; overflow-y: scroll;">';
while($dbuyeid4=$iceri24m->fetch_assoc()):
if (empty($dbuyeid4["ilce"])):
else:
echo ' <input type="submit" class="dropdown-item" name="evliya" value="'.$dbuyeid4["ilce"].'"/>';
endif;
endwhile;
echo ' </div>
</li> </form> ';
else:
echo '<li class="nav-item dropdown">
<a class="btn btn-dark dropdown-toggle" data-toggle="dropdown" role="button" style="font-size: large;" aria-haspopup="true" aria-expanded="false">İLÇE</a>
<div class="dropdown-menu btn btn-outline-warning bg-warning" ">';
echo ' <input type="submit" class="dropdown-item" name="" value="İlçe seçmek için lütfen şehir seçiniz"/> ';
echo ' </div>
</li>';
endif;
}
function kategori ($db) {
echo '<form action="harita.php?secim=kategori" method="post" ><li class="nav-item dropdown">
<a class="btn btn-dark dropdown-toggle" data-toggle="dropdown" style="font-size: large;" role="button" aria-haspopup="true" aria-expanded="false">KATEGORİ</a>
<div class="dropdown-menu btn btn-outline-warning bg-warning">';
echo ' <input type="submit" class="dropdown-item" name="kategori" value="Peygamber"/> <input type="submit" class="dropdown-item" name="kategori" value="Sahabe"/><input type="submit" class="dropdown-item" name="kategori" value="Evliya"/><input type="submit" class="dropdown-item" name="kategori" value="Türbe"/>';
echo ' </div>
</li></form>';
}
function sehir ($db) {
@$sehir=$_POST["sehir"];
$query = $db->query("SELECT * FROM harita WHERE sehir LIKE '%$sehir%'");
while ($row = $query->fetch_assoc()) {
$nama = $row["ad"];
$lat = $row["enlem"];
$long = $row["boylam"];
$link = $row["link"];
echo "addMarker($lat, $long, '$nama' + '$link');\n";
}
}
function ulke ($db) {
@$ulke=$_POST["ulke"];
$query = $db->query("SELECT * FROM harita WHERE ulke LIKE '%$ulke%'");
while ($row = $query->fetch_assoc()) {
$nama = $row["ad"];
$lat = $row["enlem"];
$long = $row["boylam"];
$link = $row["link"];
echo "addMarker($lat, $long, '$nama' + '$link');\n";
}
}
function name ($db) {
@$name=$_POST["evliya"];
$query = $db->query("SELECT * FROM harita WHERE ilce LIKE '%$name%'");
while ($row = $query->fetch_assoc()) {
$nama = $row["ad"];
$lat = $row["enlem"];
$long = $row["boylam"];
$link = $row["link"];
echo "addMarker($lat, $long, '$nama' + '$link');\n";
}
}
function arama ($db) {
@$arama=$_POST["arama"];
@$buton=$_POST["buton"];
if ($buton):
$query = $db->query("SELECT * FROM harita WHERE ad LIKE '%$arama%'");
while ($row = $query->fetch_assoc()) {
$nama = $row["ad"];
$lat = $row["enlem"];
$long = $row["boylam"];
$link = $row["link"];
echo "addMarker($lat, $long, '$nama' + '$link');\n";
}
endif;
}
function meta ($db){
$ustzid2 = "SELECT * FROM harita";
$iceri32m=$db->prepare($ustzid2);
$iceri32m->execute();
$iceri52m=$iceri32m->get_result();
while ($segmen=$iceri52m->fetch_assoc()):
echo ' '.$segmen["ad"].', ';
endwhile;
echo '">';
}
function kat ($db) {
@$kat=$_POST["kategori"];
$query = $db->query("SELECT * FROM harita WHERE kategori LIKE '%$kat%'");
while ($row = $query->fetch_assoc()) {
$nama = $row["ad"];
$lat = $row["enlem"];
$long = $row["boylam"];
$link = $row["link"];
echo "addMarker($lat, $long, '$nama' + '$link');\n";
}
}
}
?>