Site Builder
Editing:
indexbk.php
writable 0666
<?php $bizFile = __DIR__ . '/new-business.json'; if (is_readable(__DIR__.'/business.json')) { $bizFile = __DIR__.'/business.json'; // paid member } $biz = is_readable($bizFile) ? json_decode(file_get_contents($bizFile), true) : []; $name = $biz['name'] ?? 'Business'; $slogan = $biz['slogan'] ?? ''; $desc = $biz['description'] ?? ''; $addr = $biz['address'] ?? ''; $city = $biz['city'] ?? ''; $state = $biz['state'] ?? ''; $zip = $biz['zip'] ?? ''; $phone = $biz['phone'] ?? ''; $website = $biz['website'] ?? ''; $tags = $biz['tags'] ?? []; $location_tags = $biz['location_tags'] ?? []; $lat = $biz['lat'] ?? ''; $lon = $biz['lon'] ?? ''; // Social media links (add more as needed) $twitter = $biz['twitter'] ?? ''; $facebook = $biz['facebook'] ?? ''; $instagram = $biz['instagram'] ?? ''; $tiktok = $biz['tiktok'] ?? ''; $linkedin = $biz['linkedin'] ?? ''; $youtube = $biz['youtube'] ?? ''; $isPaid = is_readable(__DIR__.'/business.json'); $citystate = trim($city ? "$city, $state" : $state); $title = $name . ($citystate ? " in $citystate" : "") . " | BestDealOn"; $descMeta = $desc ?: ($slogan ? "$name: $slogan" : $name) . ($citystate ? " in $citystate" : ""); $keywords = array_unique(array_merge([$name, $city, $state, $zip], $tags, $location_tags)); $metaKeywords = implode(', ', array_filter($keywords)); $url = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $country = "USA"; $cityslug = strtolower(str_replace(' ', '-', $city)); $stateslug = strtoupper($state); function h($s){ return htmlspecialchars($s, ENT_QUOTES, 'UTF-8'); } function tag_slug($str) { return strtolower(trim(preg_replace('/[^a-z0-9]+/i', '-', $str), '-')); } $socialLinks = []; if ($twitter) $socialLinks[] = ['Twitter/X', $twitter, '🐦']; if ($facebook) $socialLinks[] = ['Facebook', $facebook, '📘']; if ($instagram) $socialLinks[] = ['Instagram', $instagram, '📸']; if ($tiktok) $socialLinks[] = ['TikTok', $tiktok, '🎵']; if ($linkedin) $socialLinks[] = ['LinkedIn', $linkedin, '💼']; if ($youtube) $socialLinks[] = ['YouTube', $youtube, '▶️']; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title><?= h($title) ?></title> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="<?= h($descMeta) ?>"> <meta name="keywords" content="<?= h($metaKeywords) ?>"> <link rel="canonical" href="<?= h($url) ?>"> <meta property="og:title" content="<?= h($title) ?>"> <meta property="og:description" content="<?= h($descMeta) ?>"> <meta property="og:type" content="website"> <meta property="og:url" content="<?= h($url) ?>"> <meta property="og:site_name" content="BestDealOn"> <?php if($lat && $lon): ?> <meta name="geo.position" content="<?= h("$lat;$lon") ?>"> <meta name="ICBM" content="<?= h("$lat, $lon") ?>"> <meta property="og:latitude" content="<?= h($lat) ?>"> <meta property="og:longitude" content="<?= h($lon) ?>"> <?php endif; ?> <meta name="geo.placename" content="<?= h($citystate) ?>"> <meta name="geo.region" content="US-<?= h($stateslug) ?>"> <style> body {background:#f5f8fb;font-family:system-ui,Arial,sans-serif;margin:0;color:#1b334a;} .top-bar{display:flex;justify-content:space-between;align-items:center;background:#eee;padding:.6rem 1rem;} .logo{font-weight:900;letter-spacing:-.5px;text-decoration:none;line-height:1;} .logo .b{color:#551A8B;} .logo .d{color:#00c853;} .logo .o{color:#ff1744;} nav.breadcrumb a{color:#0366d6;text-decoration:none;} nav.breadcrumb span{margin:0 .25rem;} .biz-card {max-width: 470px; margin:2.2em auto 1.7em auto; background:#fff; border-radius:20px; box-shadow:0 2px 16px #dde3fa26; padding:2.2em 1.4em 1.3em 1.4em;} .biz-card h1 { color:#2c61d7; font-size:1.49em; margin:0 0 .37em 0;} .desc { color:#364868; font-size:1.06em; margin-bottom:.8em;} .field { margin-bottom:0.38em; color:#465e8a; font-size:1.05em;} .bold { font-weight:600; color:#23487b;} .tags { margin:.7em 0 0 0; } .tag, .tags a.tag { display:inline-block; background:#e5f0fd; color:#0d3e7e; border-radius:15px; padding:.2em .95em; margin:0 .15em .18em 0; font-size:.98em; text-decoration:none; transition:.14s;} .tags a.tag:hover { background:#0d3e7e; color:#fff; } .social-block { max-width:470px; margin:2.2em auto 0 auto; background:#fafdfe; border-radius:15px; box-shadow:0 1.5px 10px #c0d0ff15; padding:1.35em 1em .8em 1em; border:1.5px solid #e2eefd; text-align:center; } .social-block-title { font-size:1.13em; font-weight:700; color:#234c96; margin-bottom:.8em;} .social-links { display:flex; gap:1em; justify-content:center; flex-wrap:wrap;} .social-links a {display:inline-flex;align-items:center;gap:.3em;text-decoration:none;font-size:1.09em;background:#f1f4fc;color:#2967bc;padding:.43em 1.1em;border-radius:10px;font-weight:600;} .social-links a:hover {background:#c9dfff;} .paid-block, .free-block { max-width:470px; margin:2.2em auto 1.6em auto; background:#fffbe6; border:1.6px solid #f3e5b7; border-radius:13px; padding:1.55em 1.25em; text-align:center; } .paid-block { background:#e9f7eb; border-color:#b4e8b4; } .paid-block-title { font-size:1.15em; color:#23ad6a; font-weight:700; margin-bottom:.5em;} .free-block-title { font-size:1.15em; color:#b48b12; font-weight:700; margin-bottom:.5em;} @media(max-width:600px){.biz-card,.social-block,.paid-block,.free-block{padding:1.2em .15em 1em .15em; max-width:99vw;}} </style> </head> <body> <div class="top-bar"> <a class="logo" href="/geo/"><span class="b">BEST </span><span class="d">DEAL </span><span class="o">ON</span></a> <nav class="breadcrumb" aria-label="Breadcrumb"> <a href="/geo/">Index</a><span>/</span> <a href="/geo/<?= h($country) ?>/<?= h($stateslug) ?>/"><?= h($stateslug) ?></a><span>/</span> <?php if($cityslug): ?><a href="/geo/<?= h($country) ?>/<?= h($stateslug) ?>/<?= h($cityslug) ?>/"><?= h($city) ?></a><span>/</span><?php endif; ?> <span><?= h($name) ?></span> </nav> </div> <div class='biz-card'> <h1><?= h($name) ?></h1> <?php if($slogan): ?><div class='field'><?= h($slogan) ?></div><?php endif; ?> <?php if($desc): ?><div class='desc'><?= h($desc) ?></div><?php endif; ?> <div class='field'><span class='bold'>Address:</span> <?= h($addr) ?></div> <div class='field'><span class='bold'>City/State:</span> <?= h($city) ?>, <?= h($state) ?></div> <div class='field'><span class='bold'>ZIP:</span> <?= h($zip) ?></div> <div class='field'><span class='bold'>Phone:</span> <?= h($phone) ?></div> <?php if($website): ?><div class='field'><span class='bold'>Website:</span> <a href="<?= h($website) ?>"><?= h($website) ?></a></div><?php endif; ?> <div class='tags'> <?php // Service tags with paid link logic if(is_array($tags) && count($tags)) { echo "<span class='bold'>Service Tags:</span> "; foreach($tags as $t) { $slug = tag_slug($t); if ($isPaid) echo "<a class='tag' href='/geo/$country/$stateslug/$cityslug/business.php?type=" . urlencode($slug) . "' title='See all " . h($t) . " businesses in " . h($city) . ", $stateslug'>" . h($t) . "</a>"; else echo "<span class='tag'>" . h($t) . "</span>"; } } if(is_array($location_tags) && count($location_tags)) { echo "<br><span class='bold'>Location Tags:</span> "; foreach($location_tags as $t) { $slug = tag_slug($t); if ($isPaid) echo "<a class='tag' href='/geo/$country/$stateslug/$cityslug/business.php?type=" . urlencode($slug) . "' title='See all businesses in " . h($t) . ", $stateslug'>" . h($t) . "</a>"; else echo "<span class='tag'>" . h($t) . "</span>"; } } ?> </div> <div class='footer'>Business page auto-generated by BestDealOn.com</div> </div> <!-- SOCIAL LINKS BLOCK --> <?php if($socialLinks): ?> <div class="social-block"> <div class="social-block-title">Follow <?= h($name) ?> on Social Media</div> <div class="social-links"> <?php foreach($socialLinks as list($label,$url,$icon)): ?> <a href="<?= h($url) ?>" target="_blank" rel="noopener"><?= $icon ?> <?= h($label) ?></a> <?php endforeach; ?> </div> </div> <?php else: ?> <div class="social-block"> <div class="social-block-title">Follow <?= h($name) ?> on Social Media</div> <div style="color:#8e94a9;font-size:1.01em;">No social profiles added yet.</div> </div> <?php endif; ?> <!-- PAID/AI BLOCK --> <?php if($isPaid): ?> <div class="paid-block"> <div class="paid-block-title">AI Business Tools & Member Control Panel <span style="font-size:1.1em;">🤖</span></div> <div> Welcome, premium member! Soon you'll unlock advanced AI tools for reputation monitoring, B2B research, review aggregation, competitor analysis, and more—right from your business dashboard.<br><br> <b>Coming Soon:</b> Manage your business details, see AI-powered insights, connect with new customers, and control your BestDealOn profile here. </div> </div> <?php else: ?> <div class="free-block"> <div class="free-block-title">Become a Premium Member & Unlock AI Power!</div> <div> <b>Upgrade today</b> to add links, highlight your business, and unlock exclusive AI-driven features!<br><br> <ul style="text-align:left;max-width:420px;margin:1em auto 0 auto;line-height:1.6;"> <li>AI-powered review summaries and competitor tracking</li> <li>Automated lead and reputation management</li> <li>Rich business analytics & B2B research</li> <li>Priority customer support and more!</li> </ul> <a href="/advertise.php?geo=<?= h(strtolower($cityslug).'-'.$stateslug.'-advertising') ?>" style="background:#ef8f13;color:#fff;padding:.65em 2.3em;border-radius:9px;font-weight:700;text-decoration:none;display:inline-block;margin-top:.7em;font-size:1.06em;">Become a Member</a> </div> </div> <?php endif; ?> </body> </html>
Save changes
Create folder
writable 0777
Create
Cancel