+fXn»2Q»);
$conecdb = pg_connect(«host=178.20.181.226 port=5432 dbname=clubis user=postgres password=kasiet2019»);
// $conecdb =pg_connect(«host=192.168.53.6 port=5432 dbname=clubis user=postgres password=E>+fXn\»2Q»);
$lastMonth = pg_query($conecdb, «select * from group_shedules WHERE club_id = 1 and datefrom = ( select MAX(datefrom) from group_shedules )»);
$title = pg_fetch_all($lastMonth)[0][‘title’];
$timeList = pg_query($conecdb, «select * from group_shedevents where group_shedule_id = «.pg_fetch_all($lastMonth)[0][‘id’] . » and time > ’00:00:00′ ORDER BY time ASC»);
$group_shedevents = pg_query($conecdb, «select * from group_shedevents where group_shedule_id = «.pg_fetch_all($lastMonth)[0][‘id’] . » and schedule_id = 1 and time > ’00:00:00′ ORDER BY time ASC»);
$dictionary_groupschedules = pg_fetch_all(pg_query($conecdb, «select title from dictionary_groupschedules where id > 0»));
$group_shedevents_child = pg_query($conecdb, «select * from group_shedevents where group_shedule_id = «.pg_fetch_all($lastMonth)[0][‘id’] . » and schedule_id = 2 and time > ’00:00:00′ ORDER BY time ASC»);
foreach (pg_fetch_all($timeList) as $key => $value) {
if (!empty($value[«schedule_id»]) && $value[«schedule_id»] == «2») {
$newListChild[] = $value[«time»];
}
}
foreach (array_unique($newListChild) as $key => $value) {
$dateOnlyNumberChild[] = explode(‘:’, $value)[0];
}
foreach (array_unique($dateOnlyNumberChild) as $key => $value) {
$newChild = array();
foreach (pg_fetch_all($group_shedevents_child) as $v) {
$DateTextChild = explode(‘:’, $v[«time»]);
if ($value == $DateTextChild[0]) {
$newChild[] = $v;
}
}
$newChildL[$key] = array_merge($newChild);
unset($newChild);
}
?>
secondary) && count($this->secondary)): ?>
escape($this->params->get(‘page_title’)); ?>
category) || ( $this->params->get(‘subCategories’) && isset($this->subCategories) && count($this->subCategories) )): ?>
params->get(‘subCategories’) && isset($this->subCategories) && count($this->subCategories)): ?>
category) && ( $this->params->get(‘catImage’) || $this->params->get(‘catTitle’) || ($this->params->get(‘catDescription’) && $this->category->description != » ) || $this->category->event->K2CategoryDisplay )): ?>
«ПН», 2 => «ВТ», 3 => «СР», 4 => «ЧТ», 5 => «ПТ», 6 => «СБ», 7 => «ВС»];
$month = array(«1″=>»Январь»,»2″=>»Февраль»,»3″=>»Март»,»4″=>»Апрель»,»5″=>»Май», «6»=>»Июнь», «7»=>»Июль»,»8″=>»Август»,»9″=>»Сентябрь»,»10″=>»Октябрь»,»11″=>»Ноябрь»,»12″=>»Декабрь»);
$date = new DateTime(date(«d-m-Y»));
$weekday_now = date(«N»);
$length_weekday = count($weekday);
foreach ( $weekday as $key => $value ) {
if ( $key == $weekday_now ) {
$new_arr_weekday[$key] = $value;
$weekday_now++;
} elseif ( !empty( $weekday[$weekday_now] ) && $weekday_now == $key && $weekday_now != $length_weekday ) {
$new_arr_weekday[$key] = $value;
$weekday_now++;
}
}
foreach ( $weekday as $key => $value ) {
foreach ( $new_arr_weekday as $key2 => $value2 ) {
if ($value == $value2 ) {
unset($weekday[$key]);
}
}
}
$new_weekday = $new_arr_weekday + $weekday;
$weekday_now = date(«N»);
?>
-
$value): ?>
- format(‘dmY’); ?>» class=»weekdays__item»> format(‘d’).» «.$month[$date->format(‘n’)]; ?> modify(‘+1 day’); ?>
$valueWeekday ):
?>
modify(‘+1 day’);
endforeach;?>
format(‘dmY’); ?>» class=»schedule__container»>
$value): ?>
$vl):
for ($i=0; $i«;
echo «
«;
endif;
endfor;
endforeach;?>
«.$dateText[0].»:».$dateText[1].»-«.$endTime.»
«; echo ««.$programs[«program»].»«; $shortname = ««.pg_fetch_all(pg_query($conecdb, «select shortname from access_users where id = «.$vl[$i][«performers_item_id»]))[0][«shortname»]; echo ««.explode(» «, $shortname)[1].» «; echo «(«.pg_fetch_all(pg_query($conecdb, «select title from zones_perform where id = «.$vl[$i][«room_id»]))[0][«title»].»)»; echo «
subCategories as $key=>$subCategory): ?>
params->get(‘subCatColumns’))==0) || count($this->subCategories)<$this->params->get(‘subCatColumns’) )
$lastContainer= ‘ subCategoryContainerLast’;
else
$lastContainer=»;
?>
leading) || isset($this->primary) || isset($this->secondary) || isset($this->links)) && (count($this->leading) || count($this->primary) || count($this->secondary) || count($this->links))): ?>
params->get(‘subCatImage’) && $subCategory->image): ?>
name); ?>» src=»image; ?>» />
params->get(‘subCatTitle’)): ?>
leading) && count($this->leading)): ?>
primary) && count($this->primary)): ?>
leading as $key=>$item): ?>
params->get(‘num_leading_columns’))==0) || count($this->leading)<$this->params->get(‘num_leading_columns’) )
$lastContainer= ‘ itemContainerLast’;
else
$lastContainer=»;
?>
params->get(‘num_leading_columns’))==0): ?>
‘;
}
$this->item=$item;
echo $this->loadTemplate(‘item’);
if($this->params->get(‘num_leading_columns’) > 1) {
echo ‘
‘;
}
?>
primary as $key=>$item): ?>
params->get(‘num_primary_columns’))==0) || count($this->primary)<$this->params->get(‘num_primary_columns’) )
$lastContainer= ‘ itemContainerLast’;
else
$lastContainer=»;
?>
params->get(‘num_primary_columns’))==0): ?>
‘;
}
$this->item=$item;
echo $this->loadTemplate(‘item’);
if($this->params->get(‘num_primary_columns’) > 1) {
echo ‘
‘;
}
?>
secondary as $key=>$item): ?>
params->get(‘num_secondary_columns’))==0) || count($this->secondary)<$this->params->get(‘num_secondary_columns’) )
$lastContainer= ‘ itemContainerLast’;
else
$lastContainer=»;
?>
params->get(‘num_secondary_columns’))==0): ?>
‘;
}
echo $this->loadTemplate(‘item’);
if($this->params->get(‘num_secondary_columns’) > 1) {
echo ‘
‘;
}
?>
links)) : ?>
-
links as $key=>$item): ?>
item=$item;
echo $this->loadTemplate(‘item_links’);
?>