Viewing file: index.php (5.72 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
// Şube verileri
$stores = [
"new-york" => [
"name" => "Liam Dumster",
"address" => "111 8th Avenue, New York, NY 10011",
"locality" => "New York",
"region" => "NY",
"postalCode" => "10011",
"country" => "US",
"latitude" => "40.7411",
"longitude" => "-74.0039"
],
"houston" => [
"name" => "Liam Dumster",
"address" => "1290 Hercules Ave, Houston, TX 77058",
"locality" => "Houston",
"region" => "TX",
"postalCode" => "77058",
"country" => "US",
"latitude" => "29.7082",
"longitude" => "-95.4691"
],
"los-angeles" => [
"name" => "Liam Dumster",
"address" => "City National Plaza, Los Angeles, CA 90071",
"locality" => "Los Angeles",
"region" => "CA",
"postalCode" => "90071",
"country" => "US",
"latitude" => "34.0516",
"longitude" => "-118.2551"
],
"chicago" => [
"name" => "Liam Dumster",
"address" => "1132 W Blackhawk St, Chicago, IL 60642",
"locality" => "Chicago",
"region" => "IL",
"postalCode" => "60642",
"country" => "US",
"latitude" => "41.9098",
"longitude" => "-87.6589"
],
"san-antonio" => [
"name" => "Liam Dumster",
"address" => "9800 Fredericksburg Road, San Antonio, TX 78240",
"locality" => "San Antonio",
"region" => "TX",
"postalCode" => "78240",
"country" => "US",
"latitude" => "29.5411",
"longitude" => "-98.5754"
],
"dallas" => [
"name" => "Liam Dumster",
"address" => "One AT&T Plaza (Whitacre Tower), Dallas, TX 75202",
"locality" => "Dallas",
"region" => "TX",
"postalCode" => "75202",
"country" => "US",
"latitude" => "32.7783",
"longitude" => "-96.7990"
],
"jacksonville" => [
"name" => "Liam Dumster",
"address" => "225 N. Pearl St., Jacksonville, FL 32202",
"locality" => "Jacksonville",
"region" => "FL",
"postalCode" => "32202",
"country" => "US",
"latitude" => "30.3341",
"longitude" => "-81.6720"
],
"philadelphia-independence" => [
"name" => "Liam Dumster",
"address" => "100 S Independence Mall West, Philadelphia, PA 19106",
"locality" => "Philadelphia",
"region" => "PA",
"postalCode" => "19106",
"country" => "US",
"latitude" => "39.9496",
"longitude" => "-75.1503"
],
"philadelphia-market" => [
"name" => "Liam Dumster",
"address" => "1234 Market St, Philadelphia, PA 19107",
"locality" => "Philadelphia",
"region" => "PA",
"postalCode" => "19107",
"country" => "US",
"latitude" => "39.9519",
"longitude" => "-75.1613"
]
];
$city = $_GET['city'] ?? null;
$store = $city && isset($stores[$city]) ? $stores[$city] : null;
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<title>Liam Dumster Şubeler</title>
<style>
body {font-family: Arial, sans-serif; background:#f9fafb; padding:30px;}
.buttons {margin-bottom:30px; display:flex; flex-wrap:wrap; gap:10px;}
.buttons a {
background:#1a73e8; color:#fff; padding:10px 18px;
border-radius:8px; text-decoration:none; font-size:14px;
transition:0.2s;
}
.buttons a:hover {background:#1558b0;}
.branch-card {
background:#fff; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,0.1);
max-width:900px; margin:auto; display:flex; overflow:hidden;
}
.branch-info {padding:20px; flex:1;}
.branch-info h1 {margin:0 0 15px; font-size:22px; color:#1a73e8;}
.branch-info p {margin:8px 0; font-size:15px;}
.branch-map iframe {width:400px; height:300px; border:0;}
</style>
</head>
<body>
<h2>📍 Liam Dumster Şubeleri</h2>
<div class="buttons">
<?php foreach ($stores as $key => $s): ?>
<a href="?city=<?php echo $key; ?>"><?php echo $s["locality"]; ?></a>
<?php endforeach; ?>
</div>
<?php if ($store): ?>
<div class="branch-card">
<div class="branch-info">
<h1><?php echo $store["name"]; ?> - <?php echo $store["locality"]; ?> Şubesi</h1>
<p><strong>Adres:</strong> <?php echo $store["address"]; ?></p>
<p><strong>Telefon:</strong> +1 (223) 215-7829</p>
<p><strong>Saatler:</strong> Her gün 09:00–22:00</p>
</div>
<div class="branch-map">
<iframe src="https://www.google.com/maps?q=<?php echo urlencode($store["address"]); ?>&hl=tr&z=15&output=embed"></iframe>
</div>
</div>
<?php else: ?>
<p>Lütfen üstten bir şube seçiniz.</p>
<?php endif; ?>
<!-- JSON-LD: Tüm Şubeler -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
<?php
$all = [];
foreach ($stores as $s) {
$all[] = '{
"@type": "Store",
"name": "'.$s["name"].'",
"address": {
"@type": "PostalAddress",
"streetAddress": "'.$s["address"].'",
"addressLocality": "'.$s["locality"].'",
"addressRegion": "'.$s["region"].'",
"postalCode": "'.$s["postalCode"].'",
"addressCountry": "'.$s["country"].'"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": "'.$s["latitude"].'",
"longitude": "'.$s["longitude"].'"
},
"telephone": "+1 (223) 215-7829",
"openingHours": "Mo-Su 09:00-22:00"
}';
}
echo implode(",", $all);
?>
]
}
</script>
</body>
</html>
|