<div class="wrap">
   <div id="smpush-icon-chanmanage" class="icon32"><br></div>
   <h2><?php echo esc_html__('Manage Events', 'smio-push-notification')?><a href="javascript:" onclick="smpush_open_service(-1,2,'',30)" class="add-new-h2"><?php echo esc_html__('New Event', 'smio-push-notification')?></a>
   <img src="<?php echo smpush_imgpath.'/wpspin_light.gif';?>" alt="" class="smpush_service_-1_loading" style="display:none" />
   </h2>
   <div id="col-container">
      <div id="col-left" style="width: 100%;margin-top: 10px;">
         <div class="col-wrap">
             <table class="wp-list-table widefat fixed tags" cellspacing="0">
                <thead>
                   <tr>
                      <th scope="col" class="manage-column" style="width:35%"><span><?php echo esc_html__('Title', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column smpush-center smpush-canhide"><span><?php echo esc_html__('Event Type', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column smpush-center smpush-canhide"><span><?php echo esc_html__('Post Type', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column smpush-center smpush-canhide"><span><?php echo esc_html__('Status', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column column-categories smpush-canhide" style="width:100px"><span></span></th>
                     <th scope="col" style="width:3px"></th>
                   </tr>
                </thead>
                <tfoot>
                   <tr>
                      <th scope="col" class="manage-column"><span><?php echo esc_html__('Title', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column smpush-center smpush-canhide"><span><?php echo esc_html__('Event Type', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column smpush-center smpush-canhide"><span><?php echo esc_html__('Post Type', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column smpush-center smpush-canhide"><span><?php echo esc_html__('Status', 'smio-push-notification')?></span></th>
                      <th scope="col" class="manage-column column-categories smpush-canhide"><span></span></th>
                      <th scope="col"></th>
                   </tr>
                </tfoot>
                <tbody id="the-list" data-wp-lists="list:tag">
                <?php if($events){$counter = 0;foreach($events AS $event){$counter++;?>
                   <tr id="smpush-service-tab-<?php echo esc_attr($event->id);?>" class="smpush-service-tab <?php if($counter%2 == 0){echo 'alternate';}?>">
                      <td class="name column-name"><strong><?php echo esc_attr($event->title);?></strong></td>
                      <td class="description column-description smpush-center smpush-canhide"><?php echo esc_attr($event->event_type);?></td>
                      <td class="description column-description smpush-center smpush-canhide"><?php echo esc_attr($event->post_type);?></td>
                      <td class="description column-description smpush-center smpush-canhide"><?php echo ($event->status == 1)? esc_html__('Active', 'smio-push-notification') : esc_html__('Inactive', 'smio-push-notification');?></td>
                      <td class="description column-categories smpush-canhide">
                      <input type="button" class="button action smpush-open-btn" value="<?php echo esc_html__('Edit', 'smio-push-notification')?>" onclick="smpush_open_service(<?php echo esc_attr($event->id);?>,'','',30)" />
                      <input type="button" class="button action smpush-open-btn" value="<?php echo esc_html__('Delete', 'smio-push-notification')?>" onclick="smpush_delete_service(<?php echo esc_attr($event->id);?>)" style="margin-top:4px" />
                      <img src="<?php echo smpush_imgpath.'/wpspin_light.gif';?>" alt="" class="smpush_service_<?php echo esc_attr($event->id);?>_loading" style="display:none" />
                      </td>
                     <td></td>
                   </tr>
                <?php }}else{?>
                <tr class="no-items"><td class="colspanchange" colspan="5"><?php echo esc_html__('No items found.', 'smio-push-notification')?></td></tr>
                <?php }?>
                </tbody>
             </table>
             <br class="clear">
             <p class="description smpush-canhide" style="color:red"><?php echo esc_html__('Notice: To use this feature first please enable the cron-job service, Look', 'smio-push-notification')?> <a href="https://smartiolabs.com/product/push-notification-system/documentation#cron-job" target="_blank"><?php echo esc_html__('here', 'smio-push-notification')?></a> <?php echo esc_html__('for further information', 'smio-push-notification')?></p>
         </div>
      </div>
      <div id="col-right" class="smpush_form_ajax" style="width: 70%;display:none"></div>
   </div>
</div>
<script type="text/javascript">
var smpush_pageurl = '<?php echo esc_url($pageurl);?>';
</script>
