true)); $getUserId = admFuncVariableIsValid($_GET, 'usr_id', 'int', array('defaultValue' => $gCurrentUser->getValue('usr_id'))); // Initialize local variables $disableAdditionalGuests = 4; $disableComments = 4; $disableStatusAttend = ''; $disableStatusTentative = ''; $editUserStatus = false; // Get the date object $date = new TableDate($gDb, $getDateId); // Get the fingerprint of calling user. If is not the user itself check the requesting user whether it has the permission to edit the states if ((int) $gCurrentUser->getValue('usr_id') === $getUserId) { if(!$date->allowedToParticipate()) { $gMessage->show($gL10n->get('SYS_NO_RIGHTS')); } } else { if (!$gCurrentUser->isAdministrator() || !$gCurrentUser->isLeaderOfRole($date->getValue('dat_rol_id'))) { $gMessage->show($gL10n->get('SYS_NO_RIGHTS')); } } // Read participants $participants = new Participants($gDb, $date->getValue('dat_rol_id')); $participantsArray = $participants->getParticipantsArray($date->getValue('dat_rol_id')); // If extended options for participation are allowed then show in form if ((int) $date->getValue('dat_allow_comments') === 1 || (int) $date->getValue('dat_additional_guests') === 1) { if ((int) $date->getValue('dat_allow_comments') === 1) { $disableComments = ''; } if ((int) $date->getValue('dat_additional_guests') === 1) { $disableAdditionalGuests = ''; } } $member = new TableMembers($gDb); $member->readDataByColumns(array('mem_rol_id' => $date->getValue('dat_rol_id'), 'mem_usr_id' => $getUserId)); // Write header with charset utf8 header('Content-type: text/html; charset=utf-8'); // Add javascript echo ''; // Define form $participationForm = new HtmlForm('participate_form_'. $getDateId, safeUrl(ADMIDIO_URL.FOLDER_MODULES.'/dates/dates_function.php', array('dat_id' => $getDateId, 'usr_id' => $getUserId, 'mode' => '')), null, array('type' => 'default', 'method' => 'post', 'setFocus' => false)); $participationForm->addHtml('
' .$date->getValue('dat_headline'). ': ' .$date->getValue('dat_begin') . ' - ' .$date->getValue('dat_end'). '