0 Пользователей и 1 Гость просматривают эту тему.
Дима, подскажи а как сделать чтобы месяц не с заглавной (Января) а с маленькой начинался (января)? В модуле, который для 3.0.
$date = null; if (preg_match('/\d{1,2}\-\d{1,2}\-\d{2,4}/', $kernel->pub_httpget_get('date'))) { list($day, $month, $year) = explode("-", $kernel->pub_httpget_get('date')); if (checkdate($month, $day, $year)) $date = $year . '-' . $month . '-' . $day; } $start = null; if (preg_match('/\d{1,2}\-\d{1,2}\-\d{2,4}/', $kernel->pub_httpget_get('start'))) { list($day, $month, $year) = explode("-", $kernel->pub_httpget_get('start')); if (checkdate($month, $day, $year)) $start = $year . '-' . $month . '-' . $day; } $stop = null; if (preg_match('/\d{1,2}\-\d{1,2}\-\d{2,4}/', $kernel->pub_httpget_get('stop'))) { list($day, $month, $year) = explode("-", $kernel->pub_httpget_get('stop')); if (checkdate($month, $day, $year)) $stop = $year . '-' . $month . '-' . $day;
function pub_news_avaiable_get($type = null, $date = null, $start = null, $stop = null,$module_ids='') { global $kernel; if (preg_match('/\d{1,2}\-\d{1,2}\-\d{2,4}/', $date)) { list($day, $month, $year) = explode("-", $date); if (checkdate($month, $day, $year)) $date = $year . '-' . $month . '-' . $day; else $date = null; } else $date = null; if (preg_match('/\d{1,2}\-\d{1,2}\-\d{2,4}/', $start)) { list($day, $month, $year) = explode("-", $start); if (checkdate($month, $day, $year)) $start = $year . '-' . $month . '-' . $day; else $start = null; } else $start = null; if (preg_match('/\d{1,2}\-\d{1,2}\-\d{2,4}/', $stop)) { list($day, $month, $year) = explode("-", $stop); if (checkdate($month, $day, $year)) $stop = $year . '-' . $month . '-' . $day; else $stop = null;
'-'
'.'
up