document.documentElement.className += 'night-mode';document.documentElement.classList.add('night-mode'); $simpleDate = date('m-d');
if ($simpleDate >= '12-20' || $simpleDate <= '01-11') {
...
}class Config
{
public const LOGOS = [
['from' => '01-01', 'to' => '01-11', 'logo' => 'logo-newyear.png'],
['from' => '04-25', 'to' => '05-03', 'logo' => 'logo-firstmay.png'],
...,
['from' => '12-20', 'to' => '12-31', 'logo' => 'logo-newyear.png']
];
}
...
$simpleDate = date('m-d');
$logoName = 'logo-standard.png';
foreach (Config::LOGOS as $logoDef) {
if ($simpleDate >= $logoDef['from'] && $simpleDate <= $logoDef['to']) {
$logoName = $logoDef['logo'];
}
} SELECT *
FROM `products`
JOIN (
SELECT MAX(`discount_price`) AS `max_price`, `product_id`
FROM `options`
GROUP BY `product_id`
) AS `max` ON `max`.`product_id` = `products`.`id`
ORDER BY `max`.`max_price` ASC
LIMIT 24 Traditionally, and according to ECMAScript, all primitives and objects are loosely unequal to undefined and null
uasort($ar, static fn($a, $b) : int => $a[0] - $b[0]);On Windows the default value is 1. On macOS, the default value is 2. On Linux, a value of 2 is not supported; the server forces the value to 0 instead.
You should not set lower_case_table_names to 0 if you are running MySQL on a system where the data directory resides on a case-insensitive file system (such as on Windows or macOS).
It is prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized.