| Server IP : 172.67.201.108 / Your IP : 216.73.216.76 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
echo '<div class="content_left">';
add_seo_page_header();
echo '<h1 class="h1_home">Discover Upcoming Talks, Readings, & Performances in NYC</h1>';
$sql = "
(SELECT
post_title,
slug,
slider_image,
featured_image,
'article' AS row_type
FROM articles
WHERE show_in_slider = 1 AND post_status = 1
ORDER by post_date DESC)
UNION
(SELECT
name AS post_title,
slug,
'' AS slider_image,
featured_image,
'event' AS row_type
FROM events
WHERE start_time_local > NOW() AND show_in_top_slider = 1 AND status = 1
ORDER by start_time_local ASC, id ASC)
LIMIT 5
";
$rows = db_cached_query($sql);
echo '<div class="article_slider">';
foreach ($rows as $row) :
$href = '';
if ($row->row_type == 'article') :
$href = $row->slug . '/';
elseif ($row->row_type == 'event') :
$href = 'events/' . $row->slug . '/';
endif;
echo '<div class="home_slider_post">';
if (!empty($row->slider_image)) :
echo '<a href="' . $href . '"><img src="' . image_cache('img/content/' . $row->slider_image, 85, 400, 250) . '" alt="' . $row->post_title . '"></a>';
elseif (!empty($row->featured_image)) :
echo '<a href="' . $href . '"><img src="' . image_cache('img/content/' . $row->featured_image, 85, 400, 250) . '" alt="' . $row->post_title . '"></a>';
else :
echo '<a href="' . $href . '"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8Xw8AAn0B9pX9hQAAAABJRU5ErkJggg==" alt="' . $row->post_title . '"></a>';
endif;
echo '<a href="' . $href . '" class="home_slider_title">' . $row->post_title . '</a>';
echo '<div class="more"><a href="' . $href . '">MORE »</a></div>';
echo '</div>';
endforeach;
echo '</div>';
echo '</div>'; // content_left
include_once('sidebar_home.php');
echo '<div class="cleardiv"> </div>';
echo '</div>'; // end the content div
echo '<div class="just_announced">'; // start just announced div
echo '<hr>';
echo '<div class="content">';
echo '<h2>Just Announced</h2>';
echo '<h3>Plan to attend these great events in New York City</h3>';
$sql = "SELECT e.*, l.name AS location_name, l.slug AS location_slug,
JSON_ARRAYAGG(
JSON_OBJECT('category_slug', c.slug, 'category_name', c.name)
) AS categories
FROM events e
LEFT JOIN locations l ON (l.id = e.location_id AND l.status = 1)
LEFT JOIN events_categories ec ON (e.id = ec.event_id)
LEFT JOIN categories c ON (c.id = ec.category_id AND c.active =1)
WHERE e.start_time_local > now() AND e.show_in_slider = 1 AND e.status = 1
GROUP BY e.id
ORDER BY e.start_time_local ASC, e.id ASC
LIMIT 4
";
$rows = db_cached_query($sql);
echo '<div class="event_slider">';
foreach ($rows as $row) :
$href = 'events/' . $row->slug . '/';
echo '<div class="home_slider_event">';
if (!empty($row->featured_image)) :
echo '<a href="' . $href . '"><img src="' . image_cache(image_url_fix($row->featured_image, 'img/content/'), 85, 320, 200) . '" alt="' . $row->name . '"></a>';
else :
echo '<a href="' . $href . '"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8Xw8AAn0B9pX9hQAAAABJRU5ErkJggg==" alt="' . $row->name . '"></a>';
endif;
$categories = json_decode($row->categories);
if (json_last_error() === JSON_ERROR_NONE) :
echo '<div class="home_slider_categories">';
$i = 0;
foreach ($categories as $category) :
if ($i > 0) :
echo ', ';
endif;
echo '<a href="events/categories/' . $category->category_slug . '/">' . strtoupper($category->category_name) . '</a>';
$i++;
endforeach;
echo '</div>';
endif;
echo '<div class="home_slider_date">' . date('F j, Y', strtotime($row->start_time_local)) . '</div>';
echo '<a href="' . $href . '" class="home_slider_title">' . $row->name . '</a>';
echo '<div class="right"><a href="' . $href . '">MORE »</a></div>';
echo '</div>';
endforeach;
echo '</div>';
echo '</div>';
echo '<hr>';
echo '</div>'; // end just announced div
echo '<div class="cleardiv"> </div>';
echo '<div class="content">'; // start another content div
include_once('page_all_categories.php');
set_analytics_reference('home_page', null); //override all-categories setting.