function __construct($id = '', $status = 'any', $output = 'OBJECT')
 {
     $continue = true;
     if ($status !== 'any') {
         if (get_post_status($id) == $status) {
             $continue = true;
         } else {
             $continue = false;
         }
     }
     if ($continue) {
         $this->id = $id;
         $this->output = $output;
         $this->details = get_post($this->id, $this->output);
         $tickets = new TC_Tickets();
         $fields = $tickets->get_ticket_fields();
         if (isset($this->details)) {
             if (!empty($fields)) {
                 foreach ($fields as $field) {
                     if (!isset($this->details->{$field['field_name']})) {
                         $this->details->{$field['field_name']} = get_post_meta($this->id, $field['field_name'], true);
                     }
                 }
             }
         }
     } else {
         $this->id = null;
     }
 }
            $message = __('You do not have required permissions for this action.', 'tc');
        }
    }
}
if (isset($_GET['page_num'])) {
    $page_num = (int) $_GET['page_num'];
} else {
    $page_num = 1;
}
if (isset($_GET['s'])) {
    $ticketssearch = $_GET['s'];
} else {
    $ticketssearch = '';
}
$wp_tickets_search = new TC_Tickets_Search($ticketssearch, $page_num);
$fields = $tickets->get_ticket_fields();
$columns = $tickets->get_columns();
?>
<div class="wrap tc_wrap">
    <h2><?php 
echo $tickets->form_title;
if (isset($_GET['action']) && $_GET['action'] == 'edit') {
    ?>
<a href="admin.php?page=<?php 
    echo $_GET['page'];
    ?>
" class="add-new-h2"><?php 
    _e('Add New', 'tc');
    ?>
</a><?php 
}