//query_posts($arg); $page = isset($_GET['paged']) ? $_GET['paged'] : 1; $limit = 20; $offset = ($page - 1) * $limit; $data = STAdmin::get_history_bookings('st_rental', $offset, $limit); $posts = $data['rows']; $total = ceil($data['total'] / $limit); global $wp_query; $paging = array(); $paging['base'] = admin_url('edit.php?post_type=st_rental&page=st_rental_booking%_%'); $paging['format'] = '&paged=%#%'; $paging['total'] = $total; $paging['current'] = $page; echo '<div class="wrap"><div id="icon-tools" class="icon32"></div>'; echo '<h2>' . __('Rental Booking', ST_TEXTDOMAIN) . '<a href="' . admin_url('edit.php?post_type=st_rental&page=st_rental_booking§ion=add_booking') . '" class="add-new-h2">' . __('Add New', ST_TEXTDOMAIN) . '</a></h2>'; STAdmin::message(); ?> <form id="posts-filter" action="<?php echo admin_url('edit.php?post_type=st_rental&page=st_rental_booking'); ?> " method="get"> <input type="hidden" name="post_type" value="st_rental"> <input type="hidden" name="page" value="st_rental_booking"> <div class="wp-filter st-wp-filter"> <div class="filter-items"> <div class="alignleft actions"> <input type="text" class="st_datepicker" format="mm/dd/yyyy" name="st_date_start" placeholder="<?php _e('Filter by Date from', ST_TEXTDOMAIN); ?>
static function set_message($message, $type = '') { self::$message = $message; self::$message_type = $type; }