コード例 #1
0
 public function ajax_wpla_get_import_preview_table()
 {
     $query = $_REQUEST['query'];
     $page = $_REQUEST['pagenum'];
     // analyse report content
     $report = new WPLA_AmazonReport($_REQUEST['report_id']);
     $account = new WPLA_AmazonAccount($report->account_id);
     $summary = WPLA_ImportHelper::analyzeReportForPreview($report);
     WPLA_ImportHelper::render_import_preview_table($report->get_data_rows($query), $summary, $query, $page);
     exit;
 }
コード例 #2
0
                            <input id="wpla_current_page" type="hidden" value="1" />
                            <input id="wpla_total_pages" type="hidden" value="<?php 
echo intval(count($wpl_report_summary->report_skus) / 100);
?>
" />
                            <a id="wpla_prev_page" class="button button-small" title="previous page">&laquo;</a>
                            <a id="wpla_next_page" class="button button-small" title="next page">&raquo;</a>
                            <input id="wpla_import_preview_search_box" type="text" placeholder="Filter by SKU, ASIN or name..." style="font-size: 12px; font-weight: normal; width:200px;">
                            <a href="#" id="wpla_btn_filter" class="button button-small" title="apply filter">Search</a>
                        </div>
                    </h3>
					<div class="inside">

                        <div id="wpla_import_preview_table_container">
                            <?php 
WPLA_ImportHelper::render_import_preview_table($wpl_data_rows, $wpl_report_summary);
?>
                        </div>

						<!-- <p> -->
							<!-- Note: This preview shows a maxmimum of 100 rows only. -->
						<!-- </p> -->

                        <?php 
// $max_num_pages = intval( count($wpl_report_summary->report_skus) / 100 );
// $page = 1;
// echo paginate_links( array(
//     // 'base'    => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
//     // 'format'  => '?paged=%#%',
//     'current' => max( 1, $page ),
//     'total'   => $max_num_pages