if ($date->getValue('dat_room_id') > 0) { $room = new TableRooms($gDb, $date->getValue('dat_room_id')); if ($getViewMode === 'html') { $roomLink = $g_root_path . '/adm_program/system/msg_window.php?message_id=room_detail&message_title=DAT_ROOM_INFORMATIONS&message_var1=' . $date->getValue('dat_room_id') . '&inline=true'; $outputLinkRoom = '<strong><a data-toggle="modal" data-target="#admidio_modal" href="' . $roomLink . '">' . $room->getValue('room_name') . '</a></strong>'; } else { $outputLinkRoom = $room->getValue('room_name'); } } // count participants of the date if ($date->getValue('dat_rol_id') > 0) { $participants = new Participants($gDb, $date->getValue('dat_rol_id')); $outputNumberMembers = $participants->getCount(); $outputNumberLeaders = $participants->getNumLeaders(); if ($getView === 'participants') { $participantsArray = $participants->getParticipantsArray($date->getValue('dat_rol_id')); } } // Links for the participation only in html mode if ($date->getValue('dat_rol_id') > 0 && $getViewMode === 'html') { if ($row['member_date_role'] > 0) { $buttonURL = $g_root_path . '/adm_program/modules/dates/dates_function.php?mode=4&dat_id=' . $date->getValue('dat_id'); if ($getView === 'detail') { $outputButtonParticipation = ' <button class="btn btn-default" onclick="window.location.href=\'' . $buttonURL . '\'"> <img src="' . THEME_PATH . '/icons/no.png" alt="' . $gL10n->get('DAT_CANCEL') . '" />' . $gL10n->get('DAT_CANCEL') . '</button>'; } else { $outputButtonParticipation = ' <a class="admidio-icon-link" href="' . $buttonURL . '"> <img src="' . THEME_PATH . '/icons/no.png" alt="' . $gL10n->get('DAT_CANCEL') . '" title="' . $gL10n->get('DAT_CANCEL') . '" /></a>'; }
foreach ($datesResult['recordset'] as $row) { $date->readDataById($row['dat_id']); // get avaiable room information if ($date->getValue('dat_room_id') > 0) { $room = new TableRooms($gDb, $date->getValue('dat_room_id')); $datesResult['recordset'][$count]['room_name'] = $room->getValue('room_name'); } // count members and leaders of the date role and push the result to the array if ($date->getValue('dat_rol_id') !== null) { $datesResult['recordset'][$count]['dat_num_members'] = $participants->getCount($date->getValue('dat_rol_id')); $datesResult['recordset'][$count]['dat_num_leaders'] = $participants->getNumLeaders($date->getValue('dat_rol_id')); } // For print view also read the participants and push the result to the array with index 'dat_rol_id' if ($getViewMode === 'print') { if ($date->getValue('dat_rol_id') > 0) { $memberElements[$date->getValue('dat_rol_id')] = $participants->getParticipantsArray($date->getValue('dat_rol_id')); } } $count++; } } // create html page object $page = new HtmlPage($getHeadline); if ($getViewMode === 'html' || $getViewMode === 'compact') { if ($gPreferences['enable_rss'] == 1 && $gPreferences['enable_dates_module'] == 1) { $page->addRssFile($g_root_path . '/adm_program/modules/dates/rss_dates.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline)); } $page->addJavascript(' $("#admCalendar").change(function () { var calendarId = ""; if ($("#admCalendar").selectedIndex != 0) {