send() ); if ( is_string( $response ) ){ eval( '?'.'>' . $tpl->compile( 'error.html' ) ); exit; } $server = $response->get('Server-Data'); $eventId = implode( '/', $Params ); $msg = new ParTCP_Outgoing_Message( $serverLong, $idLong, 'event-details-request' ); $msg->set( 'Event-Id', $eventId ); $msg->set( 'Include-Admins', TRUE ); $response = pas_check_response( $msg->send() ); if ( is_string( $response ) ){ eval( '?'.'>' . $tpl->compile( 'error.html' ) ); exit; } $event = $response->get('Event-Data'); $pollingInfo = $response->get('Polling-Information'); $votingList = $response->get('Votings'); $participants = $response->get('Participants'); $admins = $response->get('Admins'); $adminCount = count( $admins ); $directAppointments = $response->get('Direct-Appointments'); $path = ''; $eventName = array_pop( $Params ); foreach ( $Params as $part ){ $path .= '/' . $part; $breadcrumb[] = [ 'name' => $part, 'path' => $path ]; } $path = ltrim( $path, '/' ); $parentLink = $BaseUrl . ( $Params ? '/group/' . implode( '/', $Params ) : '/server' ); $votingTypes = [ 'yes-no-rating' => 'Ja-Nein-Abstimmung', 'consensus-3' => 'Konsensierung (0-3)', 'consensus-5' => 'Konsensierung (0-5)', 'consensus-10' => 'Konsensierung (0-10)', 'single-choice' => 'Single-Choice', 'multiple-choice-2' => 'Multiple-Choice (2)', 'multiple-choice-3' => 'Multiple-Choice (3)', 'multiple-choice-4' => 'Multiple-Choice (4)', 'multiple-choice-all' => 'Multiple-Choice (alle)', ]; $votings = []; if ( $votingList ){ foreach ( [ 'idle', 'open', 'closed', 'finished' ] as $status ){ $tempList = array_filter( $votingList, function( $v ) use ( $status ){ return ( $v['status'] == $status ); } ); usort( $tempList, function( $a, $b ){ if ( empty( $a['period_start'] ) && empty( $b['period_start'] ) ){ return $a['created_on'] < $b['created_on'] ? 1 : -1; } return ( $a['period_start'] ?? '99' ) < ( $b['period_start'] ?? '99' ) ? 1 : -1; } ); $votings = array_merge( $votings, $tempList ); } } if ( ! empty( $event['is_live'] ) ){ require_once "{$BaseDir}/lib/pas_access_tokens.class.php"; $Tokens = new PAS_Access_Tokens( $StorageDir ); $result = $Tokens->find( $serverLong, 'event', $eventId ); $token = $result ?: $Tokens->create( $serverLong, $idLong, 'event', $eventId ); } $activeSessions = implode( "\n", $event['active_sessions'] ?? [] ); $csvLimit = $user['settings']['csv_limit'] ?? 100; $depositLimit = $user['settings']['deposit_limit'] ?? 100; eval( '?'.'>' . $tpl->compile('event.html') ); // end of file event.php