| Server IP : 172.67.201.108 / Your IP : 216.73.216.11 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/tgnewdev/mod/ |
Upload File : |
<?php require('_mod_security.php'); ?>
<?php
$slug = parse_uri('slug', 1, 'home', true);
$preview = ($_SESSION['logged_in'] ?? false) && ($_GET['preview'] ?? '') === 'true';
$sql = "SELECT * FROM locations WHERE slug = :slug AND (status = 1 OR TRUE = :preview) ORDER BY id DESC";
$stmt = $db->prepare($sql);
$stmt->execute([
':slug' => $slug,
':preview' => $preview,
]);
if ($row = $stmt->fetch(PDO::FETCH_OBJ)) :
set_analytics_reference('location', $row->id);
echo '<div class="content_left">';
add_seo_page_header($row->name, curr_page_url(), $row->html);
echo '<h1>' . $row->name . '</h1>';
if (!empty($row->address)) :
echo $row->address . '<br>';
endif;
if (!empty($row->city) && !empty($row->state)) :
echo $row->city . ', ' . $row->state . ' ' . $row->zip . '<br>';
endif;
if (!empty($row->phone)) :
echo $row->phone . '<br>';
endif;
if (!empty($row->url)) :
echo '<a target="_blank" href="' . url_fix($row->url) . '">' . $row->url . '</a><br>';
endif;
if (!empty($row->featured_image)) :
echo '<br><img src="' . image_url_fix($row->featured_image, 'img/content/') . '" alt="' . $row->name . '">';
endif;
echo '<br><br><div class="post_content content_html">' . apply_shortcodes(format_html($row->html)) . '</div>';
echo '<br><hr>';
echo '<h2>Upcoming Events</h2>';
$sql = "SELECT * FROM events WHERE status = 1 AND start_time_local > NOW() AND location_id = :location_id ORDER by start_time_local ASC";
$stmt = $db->prepare($sql);
$stmt->execute([
':location_id' => $row->id,
]);
$rows_events = $stmt->fetchAll(PDO::FETCH_OBJ);
if (count($rows_events) > 0) :
echo '<ul>';
foreach ($rows_events as $row_event) :
echo '<li>';
echo '<a href="events/' . $row_event->slug . '/">' . $row_event->name . '</a> - ' . format_event_date_display($row_event->start_time_local, $row_event->end_time_local);
echo '</li>';
endforeach;
echo '</ul>';
else :
echo 'There are no events at this location';
endif;
echo '</div>'; // content_left
include_once('sidebar.php');
echo '<div class="cleardiv"> </div>';
else :
return(page_404());
endif;