Created
January 18, 2022 07:27
-
-
Save techies23/08a6944fc4a044b8bfa62f6aa2c5fe43 to your computer and use it in GitHub Desktop.
Listing meetings by HOST ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Only show upcoming meetings | |
*/ | |
?> | |
<table id="vczapi-show-meetings-list-table" class="vczapi-user-meeting-list"> | |
<thead> | |
<tr> | |
<th><?php _e( 'Topic', 'video-conferencing-with-zoom-api' ); ?></th> | |
<th><?php _e( 'Meeting Status', 'video-conferencing-with-zoom-api' ); ?></th> | |
<th><?php _e( 'Start Time', 'video-conferencing-with-zoom-api' ); ?></th> | |
<th><?php _e( 'Timezone', 'video-conferencing-with-zoom-api' ); ?></th> | |
<th><?php _e( 'Actions', 'video-conferencing-with-zoom-api' ); ?></th> | |
</tr> | |
</thead> | |
<tbody> | |
<?php | |
if ( ! empty( $args ) ) { | |
$current_time = vczapi_dateConverter( 'now', 'UTC', false ); | |
foreach ( $args as $meeting ) { | |
$meeting->password = ! empty( $meeting->password ) ? $meeting->password : false; | |
$meeting_status = ''; | |
$start_time = vczapi_dateConverter( $meeting->start_time, 'UTC', false ); | |
if ( $start_time <= $current_time ) { | |
continue; | |
} | |
if ( ! empty( $meeting->status ) ) { | |
switch ( $meeting->status ) { | |
case 0; | |
$meeting_status = '<img src="' . ZVC_PLUGIN_IMAGES_PATH . '/2.png" style="width:14px;" title="Not Started" alt="Not Started">'; | |
break; | |
case 1; | |
$meeting_status = '<img src="' . ZVC_PLUGIN_IMAGES_PATH . '/3.png" style="width:14px;" title="Completed" alt="Completed">'; | |
break; | |
case 2; | |
$meeting_status = '<img src="' . ZVC_PLUGIN_IMAGES_PATH . '/1.png" style="width:14px;" title="Currently Live" alt="Live">'; | |
break; | |
default; | |
break; | |
} | |
} else { | |
$meeting_status = "N/A"; | |
} | |
echo '<td>' . $meeting->topic . '</td>'; | |
echo '<td>' . $meeting_status . '</td>'; | |
echo '<td>' . vczapi_dateConverter( $meeting->start_time, $meeting->timezone, 'F j, Y, g:i a' ) . '</td>'; | |
echo '<td>' . $meeting->timezone . '</td>'; | |
echo '<td><div class="view"> | |
<a href="' . $meeting->join_url . '" rel="permalink" target="_blank">' . __( 'Join via App', 'video-conferencing-with-zoom-api' ) . '</a></div><div class="view">' . vczapi_get_browser_join_shortcode( $meeting->id, $meeting->password, false, ' / ' ) . '</div></td>'; | |
echo '</tr>'; | |
} | |
} | |
?> | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment