diff --git a/2019/event.php b/2019/event.php new file mode 100644 index 0000000..febfa33 --- /dev/null +++ b/2019/event.php @@ -0,0 +1,354 @@ +. + +require 'load.php'; + +$conference = FullConference::factoryFromUID( CURRENT_CONFERENCE_UID ) + ->queryRow(); + +$conference or die_with_404(); + +$event = FullEvent::factoryByConferenceAndUID( + $conference->getConferenceID(), + @ $_GET['uid'] +)->queryRow(); + +if( !$event ) { + die_with_404(); +} + +FORCE_PERMALINK and $event->forceEventPermalink(); + +$args = [ + 'title' => sprintf( + __("%s: %s"), + $event->getChapterName(), + $event->getEventTitle() + ), + 'url' => $event->getEventURL() +]; + +if( $event->hasEventImage() ) { + $args['og'] = [ + 'image' => $event->getEventImage() + ]; +} + +// Adding subscribers +$subscribed = null; +if( isset( $_POST['subscription_email'] ) && $event->areEventSubscriptionsAvailable() ) { + $email = $_POST['subscription_email']; + + if( filter_var($email, FILTER_VALIDATE_EMAIL) ) { + $event->addSubscription($email); + + $args['alert'] = __("Grazie per esserti iscritto."); + $args['alert.type'] = Messagebox::INFO; + $subscribed = true; + } else { + $args['alert'] = __("E-mail non valida."); + $args['alert.type'] = Messagebox::ERROR; + $subscribed = false; + } +} + +Header::spawn( null, $args ); +?> + isEventEditable() ): ?> +
= HTML::a( + $event->getFullEventEditURL(), + __("Modifica evento") . icon('edit', 'left') + ) ?>
+ + +| = icon('folder', 'left'); echo __("Tema") ?> | +
+ = $event->getTrackName() ?> + = $event->getTrackLabel() ?> + |
+
|---|---|
| = icon('room', 'left'); echo __("Dove") ?> | +
+ = $event->getRoomName() ?> + @ = HTML::a( + $conference->getLocationGeoOSM(), + $conference->getLocationName(), + $conference->getLocationAddress(), + null, + 'target="_blank"' + ) ?> + = $conference->getLocationAddress() ?> + |
+
| = icon('access_time', 'left'); echo __("Quando") ?> | +
+ = $event->getEventHumanStart() ?> + getEventStart('d/m/Y'), + $event->getEventStart('H:i') + ) ?> + = HTML::a( + $event->getEventCalURL(), + __( "Scarica promemoria calendario" ) + ) ?> + |
+
= __("Invita anche i tuoi amici ad iscriversi condividendo l'indirizzo di questa pagina.") ?>
+ + + ++ getSharablePath(), + icon('attachment', 'left') . $sharable->getSharableTitle(['prop' => true]), + null, + null, + 'target="_blank"' + ), + $sharable->getSharableLicense()->getLink() + ) ?> +
+ isSharableVideo() ): ?> + + + ++ getSharablePath(), + icon('share', 'left') . $sharable->getSharableTitle( ['prop' => true] ), + null, + null, + 'target="_blank"' + ), + $sharable->getSharableLicense()->getLink() + ) ?> +
+ += __("L'elenco dei relatori non รจ ancora noto.") ?>
+ ++ = HTML::a( + $previous->getEventURL( ROOT ), + $previous->getEventTitle() + ) ?> + +
+ ++ = HTML::a( + $next->getEventURL( ROOT ), + $next->getEventTitle() + ) ?> + +
+ +