Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
Ad has started or has no start time (runs immediately)
// 2. AND
// 3. (end_date IS NULL OR end_date >= NOW()) -> Ad has not ended or has no end time (runs forever)
$sql = "SELECT * FROM horizontal_ads
WHERE
(start_date IS NULL OR start_date <= NOW())
AND
(end_date IS NULL OR end_date >= NOW())
ORDER BY RAND()
LIMIT 3";
$stmt = $conn->query($sql);
if ($stmt) {
$horizontal_ads = $stmt->fetchAll(PDO::FETCH_ASSOC);
}
}
} catch (Exception $e) {
// Ideally log this to a file instead of showing user, but keeping simple for now
error_log("Error fetching horizontal ads: " . $e->getMessage());
}
$ad_count = count($horizontal_ads);
?>
0): ?>