コード例 #1
0
 public function admin_page_display_debug()
 {
     wp_enqueue_script('datatables');
     wp_enqueue_style('datatables');
     wp_enqueue_script('cc_datatables');
     $webinar = new WebinarClient();
     $upcomming = $webinar->getUpcomming();
     if (empty($upcomming)) {
         $message = "<p class='error'>There are no upcomming webinars at the moment.</p>";
     } else {
         $message = "<p>Below is a list of the upcoming webinars, to ensure that Citrix Connect WP is connecting to GoToWebinar.</p>";
     }
     echo "<h2>Webinar Debug</h2>";
     echo $message;
     if (count($upcomming) > 0) {
         echo "<div class='upcomming-data-table'>";
         echo '<table data-order=\'[[ 3, "desc" ]]\'>';
         echo '<thead>';
         echo '<tr>';
         echo '<th>ID</th>';
         echo '<th>Title</th>';
         echo '<th>Start Time</th>';
         echo '<th>End Time</th>';
         echo '<th>URL</th>';
         echo '</tr>';
         echo '</thead>';
         echo '<tbody>';
         foreach ($upcomming as $webinar) {
             //				dd($webinar);
             $start = date('Y-m-d', strtotime($webinar->times[0]['startTime']));
             $end = date('Y-m-d', strtotime($webinar->times[0]['endTime']));
             echo '<tr>';
             echo '<td>' . $webinar->id . '</td>';
             echo '<td>' . $webinar->subject . '</td>';
             echo '<td>' . $start . '</td>';
             echo '<td>' . $end . '</td>';
             echo '<td><a href="' . $webinar->registrationUrl . '">Registration Url</a></td>';
             echo '</tr>';
         }
         echo '</tbody>';
         echo '</table>';
         echo '</div>';
     }
 }