install,celebration

This commit is contained in:
Dro1d.Ru 2018-10-07 02:18:42 +05:00
parent 5601779f03
commit a4352b1819
18 changed files with 204 additions and 32 deletions

View file

@ -278,6 +278,51 @@ textarea {
margin: 10px 0px 0px;
}
.zira-celebration {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999999;
background-color: rgb(60, 0, 0);
background-color: rgba(60, 0, 0, .8);
border-top: 7px solid #d4230a;
border-bottom: 7px solid #d4230a;
animation: ziraFade 3s ease;
}
.zira-celebration .celebration-image {
display: block;
width: 600px;
height: auto;
margin: 0 auto;
max-width: 100%;
}
.zira-celebration .celebration-date,
.zira-celebration .celebration-message {
width: 100%;
min-height: 75px;
color: #fff;
font-weight: bold;
text-align: center;
font-size: 25px;
padding: 20px;
}
.zira-celebration .celebration-close {
position: absolute;
top: 10px;
right: 10px;
width: 19px;
height: 19px;
background: url(../images/close-small.png) no-repeat 0 0;
cursor: pointer;
}
@media (min-width: 992px) {
.zira-celebration {
position: fixed;
}
}
@keyframes loader {
0% {
-webkit-transform: rotate(-360deg);

View file

@ -341,6 +341,12 @@
if ($('.carousel-wrapper').length>0) {
zira_init_carousel();
}
/**
* celebration
*/
if ($('.zira-celebration').length>0) {
zira_celebrate();
}
});
zira_resize_jplayer = function() {
@ -1182,6 +1188,26 @@
});
}
};
function zira_celebrate() {
var asrc = $('.zira-celebration').data('asrc');
$('.zira-celebration').click(function(){
if ($('audio#anthem').length==0) return;
try {
if (!$('audio#anthem').get(0).paused) return;
$('audio#anthem').get(0).play();
} catch (err) {}
});
$('.zira-celebration .celebration-close').click(function(){
$('.zira-celebration').remove();
});
if (typeof asrc != "undefined" && asrc.length>0) {
$('body').append('<audio id="anthem"><source src="'+asrc+'" type="audio/mp3" /></audio>');
try {
$('audio#anthem').get(0).play();
} catch(err) {}
}
}
/**
* modal

View file

@ -57,6 +57,7 @@ class Meta extends Form
$html .= $this->select(Locale::t('Sort records'), 'records_sorting', array('id'=>Locale::t('by creation date'),'rating'=>Locale::t('by rating'),'comments'=>Locale::t('by comments count')));
$html .= $this->input(Locale::t('Carousel thumbs width'), 'carousel_thumbs_width', array('placeholder'=>Recordsettings::THUMB_MIN_SIZE.' - '.Recordsettings::THUMB_MAX_SIZE));
$html .= $this->input(Locale::t('Carousel thumbs height'), 'carousel_thumbs_height', array('placeholder'=>Recordsettings::THUMB_MIN_SIZE.' - '.Recordsettings::THUMB_MAX_SIZE));
$html .= $this->checkbox(Locale::t('Congratulate visitors'), 'congratulate', null, false);
$html .= Zira\Helper::tag_open('div', array('id'=>'dashmetaform_access_button'));
$html .= Zira\Helper::tag_open('div', array('class'=>'form-group'));

View file

@ -53,6 +53,7 @@ class Recordsettings extends Form
$html .= $this->input(Locale::t('Gallery thumbs width'), 'gallery_thumbs_width', array('placeholder'=>self::THUMB_MIN_SIZE.' - '.self::THUMB_MAX_SIZE));
$html .= $this->input(Locale::t('Gallery thumbs height'), 'gallery_thumbs_height', array('placeholder'=>self::THUMB_MIN_SIZE.' - '.self::THUMB_MAX_SIZE));
$html .= $this->input(Locale::t('Gallery limit'), 'gallery_limit');
$html .= $this->select(Locale::t('Gallery sorting'), 'gallery_sorting', array('asc'=>Locale::t('Ascending'), 'desc'=>Locale::t('Descending')));
$html .= $this->checkbox(Locale::t('Show gallery'), 'gallery_enabled', null, false);
$html .= $this->checkbox(Locale::t('Show files'), 'files_enabled', null, false);
$html .= $this->checkbox(Locale::t('Show audio'), 'audio_enabled', null, false);
@ -72,5 +73,11 @@ class Recordsettings extends Form
$validator->registerNumber('gallery_thumbs_width',self::THUMB_MIN_SIZE,self::THUMB_MAX_SIZE,true,Locale::t('Invalid value "%s"',Locale::t('Gallery thumbs width')));
$validator->registerNumber('gallery_thumbs_height',self::THUMB_MIN_SIZE,self::THUMB_MAX_SIZE,true,Locale::t('Invalid value "%s"',Locale::t('Gallery thumbs height')));
$validator->registerNumber('gallery_limit',0,1000,true,Locale::t('Invalid value "%s"',Locale::t('Gallery limit')));
$validator->registerCustom(array(get_class(), 'checkGallerySorting'), 'gallery_sorting', Locale::t('Invalid value "%s"',Locale::t('Gallery sorting')));
}
public static function checkGallerySorting($sorting) {
return in_array($sorting, array('asc', 'desc', 'ASC', 'DESC'));
}
}

View file

@ -47,7 +47,8 @@ class Meta extends Model {
'enable_breadcrumbs'=>'int',
'carousel_thumbs_width'=>'int',
'carousel_thumbs_height'=>'int',
'dev_copyright'=>'int'
'dev_copyright'=>'int',
'congratulate'=>'int'
);
$config_ids = array();

View file

@ -35,7 +35,8 @@ class Recordsettings extends Model {
'slider_mode'=>'int',
'gallery_thumbs_width'=>'int',
'gallery_thumbs_height'=>'int',
'gallery_limit'=>'int'
'gallery_limit'=>'int',
'gallery_sorting'=>'string'
);
$config_ids = array();

View file

@ -53,6 +53,7 @@ class Recordsettings extends Window {
if (!array_key_exists('gallery_thumbs_width', $configs)) $configs['gallery_thumbs_width'] = Zira\Config::get('thumbs_width');
if (!array_key_exists('gallery_thumbs_height', $configs)) $configs['gallery_thumbs_height'] = Zira\Config::get('thumbs_height');
if (!array_key_exists('gallery_limit', $configs)) $configs['gallery_limit'] = 0;
if (!array_key_exists('gallery_sorting', $configs)) $configs['gallery_sorting'] = 'asc';
$form = new \Dash\Forms\Recordsettings();
$form->setValues($configs);

View file

@ -58,39 +58,55 @@ if (!$json_supported) $supported = false;
$json = Zira\Helper::tag('span',null,array('class'=>($json_supported ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
$json .= ' JSON '.($json_supported ? Zira\Locale::t('supported') : Zira\Locale::t('not supported'));
$cache_dir_writatable = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . CACHE_DIR) && is_writable(ROOT_DIR . DIRECTORY_SEPARATOR . CACHE_DIR);
$cache_dir_exists = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . CACHE_DIR);
$cache_dir_writatable = false;
if (!$cache_dir_exists) $supported = false;
else $cache_dir_writatable = is_writable(ROOT_DIR . DIRECTORY_SEPARATOR . CACHE_DIR);
if (!$cache_dir_writatable) $supported = false;
$cache_dir = Zira\Helper::tag('span',null,array('class'=>($cache_dir_writatable ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
$cache_dir .= ' '.Zira\Locale::t('%s directory','cache').' '.($cache_dir_writatable ? Zira\Locale::t('is writable') : Zira\Locale::t('is not writable'));
$cache_dir = Zira\Helper::tag('span',null,array('class'=>($cache_dir_exists && $cache_dir_writatable ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
if (!$cache_dir_exists) $cache_dir .= ' '.Zira\Locale::t('%s directory is not exists','cache');
else $cache_dir .= ' '.($cache_dir_writatable ? Zira\Locale::t('%s directory is writable','cache') : Zira\Locale::t('%s directory is not writable','cache'));
$log_dir_writatable = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . LOG_DIR) && is_writable(ROOT_DIR . DIRECTORY_SEPARATOR . LOG_DIR);
$log_dir_exists = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . LOG_DIR);
$log_dir_writatable = false;
if (!$log_dir_exists) $supported = false;
else $log_dir_writatable = is_writable(ROOT_DIR . DIRECTORY_SEPARATOR . LOG_DIR);
if (!$log_dir_writatable) $supported = false;
$log_dir = Zira\Helper::tag('span',null,array('class'=>($log_dir_writatable ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
$log_dir .= ' '.Zira\Locale::t('%s directory','log').' '.($log_dir_writatable ? Zira\Locale::t('is writable') : Zira\Locale::t('is not writable'));
$log_dir = Zira\Helper::tag('span',null,array('class'=>($log_dir_exists && $log_dir_writatable ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
if (!$log_dir_exists) $log_dir .= ' '.Zira\Locale::t('%s directory is not exists','log');
else $log_dir .= ' '.($log_dir_writatable ? Zira\Locale::t('%s directory is writable','log') : Zira\Locale::t('%s directory is not writable','log'));
$upload_dir_writatable = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . UPLOADS_DIR) && is_writable(ROOT_DIR . DIRECTORY_SEPARATOR . UPLOADS_DIR);
$upload_dir_exists = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . UPLOADS_DIR);
$upload_dir_writatable = false;
if (!$upload_dir_exists) $supported = false;
else $upload_dir_writatable = is_writable(ROOT_DIR . DIRECTORY_SEPARATOR . UPLOADS_DIR);
if (!$upload_dir_writatable) $supported = false;
$upload_dir = Zira\Helper::tag('span',null,array('class'=>($upload_dir_writatable ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
$upload_dir .= ' '.Zira\Locale::t('%s directory','uploads').' '.($upload_dir_writatable ? Zira\Locale::t('is writable') : Zira\Locale::t('is not writable'));
$upload_dir = Zira\Helper::tag('span',null,array('class'=>($upload_dir_exists && $upload_dir_writatable ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
if (!$upload_dir_exists) $upload_dir .= ' '.Zira\Locale::t('%s directory is not exists','uploads');
else $upload_dir .= ' '.($upload_dir_writatable ? Zira\Locale::t('%s directory is writable','uploads') : Zira\Locale::t('%s directory is not writable','uploads'));
$htaccess_exists = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . '.htaccess');
if (!$htaccess_exists) $supported = false;
$htaccess = Zira\Helper::tag('span',null,array('class'=>($htaccess_exists ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
$htaccess .= ' '.Zira\Locale::t('File %s','.htaccess').' '.($htaccess_exists ? Zira\Locale::t('is exists') : Zira\Locale::t('is not exists'));
$htaccess .= ' '.($htaccess_exists ? Zira\Locale::t('File %s is exists','.htaccess') : Zira\Locale::t('File %s is not exists','.htaccess'));
$robots_exists = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . 'robots.txt');
if (!$robots_exists) $supported = false;
$robots = Zira\Helper::tag('span',null,array('class'=>($robots_exists ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
$robots .= ' '.Zira\Locale::t('File %s','robots.txt').' '.($robots_exists ? Zira\Locale::t('is exists') : Zira\Locale::t('is not exists'));
$robots .= ' '.($robots_exists ? Zira\Locale::t('File %s is exists','robots.txt') : Zira\Locale::t('File %s is not exists','robots.txt'));
$config_exists = file_exists(ROOT_DIR . DIRECTORY_SEPARATOR . 'config.php');
$config_writatable = false;
if (!$config_exists) $supported = false;
else $config_writatable = is_writable(ROOT_DIR . DIRECTORY_SEPARATOR . 'config.php');
if (!$config_writatable) $supported = false;
$config = Zira\Helper::tag('span',null,array('class'=>($config_exists && $config_writatable ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
if (!$config_exists) $config .= ' '.Zira\Locale::t('File %s','config.php').' '.($config_exists ? Zira\Locale::t('is exists') : Zira\Locale::t('is not exists'));
else $config .= ' '.Zira\Locale::t('File %s','config.php').' '.($config_writatable ? Zira\Locale::t('is writeable') : Zira\Locale::t('is not writeable'));
$config_empty = false;
if ($config_exists) $config_empty = empty(trim(file_get_contents(ROOT_DIR . DIRECTORY_SEPARATOR . 'config.php')));
if (!$config_empty) $supported = false;
$config = Zira\Helper::tag('span',null,array('class'=>($config_exists && $config_writatable && $config_empty ? 'glyphicon glyphicon-ok-sign system-ok' : 'glyphicon glyphicon-warning-sign system-warning')));
if (!$config_exists) $config .= ' '.Zira\Locale::t('File %s is not exists','config.php');
else if (!$config_empty) $config .= ' '.Zira\Locale::t('File config.php should be empty.');
else $config .= ' '.($config_writatable ? Zira\Locale::t('File %s is writable','config.php') : Zira\Locale::t('File %s is not writable','config.php'));
$response = array('content'=>Zira\Helper::tag('style', '.system-ok { color: green; } .system-warning { color: red; }').
($supported ? Zira\Helper::tag_open('h2').Zira\Helper::tag('span', null, array('class'=>'glyphicon glyphicon-ok-sign')).' '.Zira\Locale::t('System is ready to be installed').Zira\Helper::tag_close('h2') : Zira\Helper::tag('h2', Zira\Locale::t('Preparing to install'))).

View file

@ -176,7 +176,7 @@ $init_js = Zira\Helper::tag_open('script',array('type'=>'text/javascript')).
'eval(response.script);'.
'}'.
'}, \'json\').always(function(){'.
'if (zira_install_xhr.status != 200) zira_error(\''.Zira\Locale::t('An error occurred').'\'+\'. \'+\''.Zira\Locale::t('File config.php should be empty.').'\');'.
'if (zira_install_xhr.status != 200) zira_error(\''.Zira\Locale::t('An error occurred').'\');'.
'});'.
'};'.
'$(document).ready(function(){'.
@ -200,7 +200,7 @@ $layout_file = ROOT_DIR . DIRECTORY_SEPARATOR .
Zira\View::addBodyBottomScript($init_js);
Zira\View::$data = array(
Zira\View::VAR_TITLE => Zira\Locale::t('Installation'),
Zira\View::VAR_TITLE => Zira\Locale::t('%s installation','Zira CMS '.Zira::VERSION),
Zira\View::VAR_CONTENT => $init_content
);

View file

@ -443,5 +443,8 @@ return array(
'Carousel thumbs height' => 'Высота миниатюр карусели',
'Update thumbnails' => 'Обновить миниатюры',
'Show link to developer\'s website' => 'Показывать ссылку на сайт разработчика',
'WORKERS OF THE WORLD, UNITE!' => 'ПРОЛЕТАРИИ ВСЕХ СТРАН, СОЕДИНЯЙТЕСЬ!'
'Gallery sorting' => 'Сортировка галереи',
'Ascending' => 'Возрастающая',
'Descending' => 'Убывающая',
'Congratulate visitors' => 'Поздравлять посетителей'
);

View file

@ -2,6 +2,7 @@
return array(
'Installation' => 'Установка',
'%s installation' => 'Установка %s',
'Welcome to Zira CMS installer!' => 'Добро пожаловать в установщик Zira CMS!',
'Backward' => 'Назад',
'Forward' => 'Дальше',
@ -21,20 +22,20 @@ return array(
'An error occurred' => 'Возникла ошибка',
'supported' => 'поддерживается',
'not supported' => 'не поддерживается',
'%s directory' => 'Директория %s',
'is writable' => 'доступна для записи',
'is not writable' => 'недоступна для записи',
'%s directory is exists' => 'Директория %s найдена',
'%s directory is not exists' => 'Директория %s не найдена',
'%s directory is writable' => 'Директория %s доступна для записи',
'%s directory is not writable' => 'Директория %s недоступна для записи',
'Clean URLs' => 'ЧПУ',
'is being checked...' => 'проверяется...',
'Zira installer cannot continue' => 'Установка не может быть продолжена',
'Preparing to install' => 'Подготовка к установке',
'File %s' => 'Файл %s',
'is exists' => 'найден',
'is not exists' => 'не найден',
'File %s is exists' => 'Файл %s найден',
'File %s is not exists' => 'Файл %s не найден',
'File %s is writable' => 'Файл %s доступен для записи',
'File %s is not writable' => 'Файл %s недоступен для записи',
'You have to rename the following files:' => 'Вы должны переименовать следующие файлы:',
'File config.php should be empty.' => 'Файл config.php должен быть пустым.',
'is writeable' => 'доступен для записи',
'is not writeable' => 'недоступен для записи',
'Filesystem need to be prepared for installation' => 'Файловая система должна быть подготовлена к установке',
'System is ready to be installed' => 'Система готова к установке',
'Agreement' => 'Соглашение',

View file

@ -154,5 +154,15 @@ return array(
'Anti-Bot' => 'Анти-Бот',
'Read more' => 'Подробнее',
'DD.MM.YYYY' => 'ДД.ММ.ГГГГ',
'Permission denied' => 'Нет прав доступа'
'Permission denied' => 'Нет прав доступа',
'WORKERS OF THE WORLD, UNITE!' => 'ПРОЛЕТАРИИ ВСЕХ СТРАН, СОЕДИНЯЙТЕСЬ!',
'Happy New Year!' => 'С Новым Годом!',
'Day of the Soviet Army and Navy of the USSR' => 'День Советской Армии и Военно-Морского Флота СССР',
'International Women\'s Day' => 'Международный Женский День',
'Cosmonautics Day' => 'День Космонавтики',
'International Workers\' Day' => 'День Международной Солидарности Трудящихся',
'Victory Day of the Soviet People in the Great Patriotic War' => 'День Победы Советского Народа в Великой Отечественной Войне',
'USSR Constitution Day' => 'День Конституции СССР',
'Anniversary of the Great October Socialist Revolution' => 'Годовщина Великой Октябрьской Социалистической Революции',
'Glory to the CPSU! Hurray comrades!' => 'Слава КПСС! Ура, товарищи!'
);

View file

@ -64,7 +64,7 @@
} else {
$(this).addClass('locked');
if ($('audio#anthem').length==0) {
$('body').append('<audio id="anthem"><source src="<?php echo Zira\Helper::baseUrl('assets/simbols/anthem.mp3')?>" type="audio/mp3" /></audio>');
$('body').append('<audio id="anthem"><source src="<?php echo Zira\Helper::baseUrl('assets/simbols/anthem.mp3'); ?>" type="audio/mp3" /></audio>');
$('audio#anthem').bind('ended',function(){
$('#ussr-flag').removeClass('locked');
});

View file

@ -64,7 +64,7 @@
} else {
$(this).addClass('locked');
if ($('audio#anthem').length==0) {
$('body').append('<audio id="anthem"><source src="<?php echo Zira\Helper::baseUrl('assets/simbols/anthem.mp3')?>" type="audio/mp3" /></audio>');
$('body').append('<audio id="anthem"><source src="<?php echo Zira\Helper::baseUrl('assets/simbols/anthem.mp3'); ?>" type="audio/mp3" /></audio>');
$('audio#anthem').bind('ended',function(){
$('#ussr-flag').removeClass('locked');
});

View file

@ -64,7 +64,7 @@
} else {
$(this).addClass('locked');
if ($('audio#anthem').length==0) {
$('body').append('<audio id="anthem"><source src="<?php echo Zira\Helper::baseUrl('assets/simbols/anthem.mp3')?>" type="audio/mp3" /></audio>');
$('body').append('<audio id="anthem"><source src="<?php echo Zira\Helper::baseUrl('assets/simbols/anthem.mp3'); ?>" type="audio/mp3" /></audio>');
$('audio#anthem').bind('ended',function(){
$('#ussr-flag').removeClass('locked');
});

View file

@ -596,12 +596,15 @@ class Page {
}
public static function getRecordImages($record_id, $limit=0, $offset=0) {
$order = Config::get('gallery_sorting');
if (!in_array($order, array('asc','desc','ASC','DESC'))) $order = 'asc';
$q = Models\Image::getCollection()
->where('record_id', '=', $record_id);
if ($limit>0) {
$q->limit($limit, $offset);
}
return $q->order_by('id', 'asc')
return $q->order_by('id', $order)
->get();
}

View file

@ -88,6 +88,10 @@ class View {
protected static $_body_bottom_scripts = array();
protected static $_before_render_callbacks = array();
protected static $_is_celebration = false;
protected static $_celebration_date = null;
protected static $_celebration_message = null;
public static function isInitialized() {
return self::$_theme !== null;
@ -187,6 +191,18 @@ class View {
public static function isRenderStarted() {
return self::$_render_started;
}
public static function setCelebration($is_celebration) {
self::$_is_celebration = $is_celebration;
}
public static function setCelebrationDate($celebration_date) {
self::$_celebration_date = $celebration_date;
}
public static function setCelebrationMessage($celebration_msg) {
self::$_celebration_message = $celebration_msg;
}
public static function setKeywordsAdded($value) {
self::$_keywords_added = (bool)$value;
@ -423,6 +439,9 @@ class View {
public static function finishLayout() {
self::addThemeAssets();
self::addHTML(self::$head_addon, self::VAR_HEAD_BOTTOM);
if (self::$_is_celebration) {
self::addHTML(self::celebrate(self::$_celebration_date, self::$_celebration_message), self::VAR_BODY_TOP);
}
include(self::$layout);
}
@ -1334,4 +1353,14 @@ class View {
}
unset(self::$_db_widget_objects[$placeholder]);
}
public static function celebrate($date, $message) {
$html = Helper::tag_open('div',array('class'=>'zira-celebration', 'title'=>Locale::t('WORKERS OF THE WORLD, UNITE!'), 'data-asrc'=>Helper::baseUrl('assets/simbols/anthem.mp3')));
$html .= Helper::tag('div', $date, array('class'=>'celebration-date'));
$html .= Helper::tag_short('img', array('src'=>Helper::baseUrl('assets/simbols/ussr.jpg'), 'alt'=>Locale::t('WORKERS OF THE WORLD, UNITE!'), 'title'=>Locale::t('WORKERS OF THE WORLD, UNITE!'), 'class'=>'celebration-image'));
$html .= Helper::tag('div', $message, array('class'=>'celebration-message'));
$html .= Helper::tag('div', null, array('class'=>'celebration-close'));
$html .= Helper::tag_close('div');
return $html;
}
}

View file

@ -79,6 +79,8 @@ class Zira {
Session::remove(Response::SESSION_REDIRECT);
Locale::remember();
$this->whatDateToday();
if (self::isOnline()) {
$this->process();
@ -102,6 +104,32 @@ class Zira {
Permission::check(Permission::TO_ACCESS_DASHBOARD) ||
Request::isAjax());
}
protected function whatDateToday() {
if (!Config::get('congratulate') && !Permission::check(Permission::TO_ACCESS_DASHBOARD)) return;
$time = time();
$day = date('j',$time);
$month = date('n',$time);
$holidays = array(
'1.1' => 'Happy New Year!',
'23.2' => 'Day of the Soviet Army and Navy of the USSR',
'8.3' => 'International Women\'s Day',
'12.4' => 'Cosmonautics Day',
'1.5' => 'International Workers\' Day',
'9.5' => 'Victory Day of the Soviet People in the Great Patriotic War',
'7.10' => 'USSR Constitution Day',
'7.11' => 'Anniversary of the Great October Socialist Revolution'
);
if (!Cookie::get('zira_celebration') && array_key_exists($day.'.'.$month, $holidays)) {
View::setCelebration(true);
View::setCelebrationDate(date(Config::get('date_format'), $time).' - '.Locale::t($holidays[$day.'.'.$month]));
View::setCelebrationMessage(Locale::t('Glory to the CPSU! Hurray comrades!'));
Cookie::set('zira_celebration', '1', 86400);
}
}
protected function registerDbWidgets() {
if (Request::isAjax()) return;