$b = array();
     $b['w040 tac'] = '<input type="checkbox" name="checkall" />';
     $b['w080 tac'] = 'Period';
     $b['w100 tac'] = 'Filesize';
     $btab[] = $b;
     foreach ($files as $filename => $filesize) {
         $file_split = explode('-', $filename);
         $period_year = substr($file_split[1], 0, 4);
         $period_month = substr($file_split[1], 4, 2);
         $period_fileformat = $period_year . $period_month;
         $period_displayformat = "{$period_month}.{$period_year}";
         $cbid = 'bu-' . $period_fileformat;
         $b = array();
         $b['w040 tac'] = '<input type="checkbox" id="' . $cbid . '" value="' . $period_displayformat . '"' . (in_array($period_fileformat, $payone_period) ? ' disabled="disabled"' : '') . ' />';
         $b['w080 tac'] = '<label for="' . $cbid . '">' . $period_displayformat . '</label>';
         $b['w100 tac'] = '<label for="' . $cbid . '">' . displayFileSize($filesize) . '</label>';
         $btab[] = $b;
     }
     $backup_table = '<h3>Backup Data</h3>';
     $backup_table .= tep_draw_table('tbl-backup', $btab);
     if ($_SESSION['payone-log-backup']['show-all']) {
         $showall_button = '<input type="button" id="showall" value="Show Recent" title="Click here to show only ' . $max_backup_data . ' most recent backup data" />';
     } else {
         $showall_button = '<input type="button" id="showall" value="Show All" title="By default system show only ' . $max_backup_data . ' most recent backup data, click here to show all backup data" />';
     }
     $backup_table .= '<div class="buttons-left"><input type="button" id="restore" value="Restore" title="Restore selected backup period to existing data" /> ' . $showall_button . '</div>';
 }
 $tables = '<div style="float:left;">' . $existing_table . '</div>';
 $tables .= '<div style="margin-left:280px;">' . $backup_table . '</div>';
 echo utf8_encode($tables);
 exit;
        }
        if ($total_zipfiles > 0) {
            $zip_count = 0;
            foreach ($zip_filenames as $zf) {
                $zip_file = SP_LAZADAID_TEMP_IMAGE_DIR . $zf;
                if (is_file($zip_file)) {
                    $zip_count++;
                    $count_text = $total_zipfiles > 1 ? " ({$zip_count})" : '';
                    $filesize = filesize($zip_file);
                    $link = '../print/print-file.php?type=laid-uploadimgs&amp;fn=' . $zf;
                    $result .= '<tr>';
                    $result .= '<td>';
                    $result .= '<a class="dl-icon" href="' . $link . '" target="_blank"></a>';
                    $result .= ' <a class="dl-text" href="' . $link . '" target="_blank">Download Products Images Zip' . $count_text . '</a>';
                    $result .= '</td>';
                    $result .= '<td style="padding-top:8px;text-align:right;">' . displayFileSize($filesize) . '</td>';
                    $result .= '</tr>';
                }
            }
        }
        $result .= '</table>';
        //echo '<div style="margin-top:20px;"><input id="amvd-download-all" type="button" value="Download All Files" /></div>';
        echo utf8_encode($result);
        exit;
    }
}
$content .= '<div id="download-div"></div>';
$title = 'CSV generator for Lazada ID';
$javascript = '
            var pids = top.window.$("#hid-products-id").val();
            postAction = function() {
     }
     if ($total_zipfiles > 0) {
         $zipcount = 0;
         foreach ($zip_filenames as $zf) {
             $zip_file = SP_AMAZONVD_UPLOAD_PATH . $zf;
             if (is_file($zip_file)) {
                 $zipcount++;
                 $count_text = $total_zipfiles > 1 ? " ({$zipcount})" : '';
                 $filesize = filesize($zip_file);
                 $link = 'print/print-file.php?type=amvde-uploadimgs&amp;fn=' . $zf;
                 $content .= '<tr>';
                 $content .= '<td>';
                 $content .= '<a class="dl-icon" href="' . $link . '" target="_blank"></a>';
                 $content .= ' <a class="dl-text" href="' . $link . '" target="_blank">Download Products Images Zip' . $count_text . '</a>';
                 $content .= '</td>';
                 $content .= '<td' . $fsstyle . '>' . displayFileSize($filesize) . '</td>';
                 $content .= '</tr>';
             }
         }
     }
     $content .= '</table>';
     $content .= '<div style="margin-top:20px;"><input id="amvd-download-all" type="button" value="Download All Files" /></div>';
     $javascript .= '
         $("#amvd-download-all").click(function() {
             $("a.dl-icon").each(function() { window.open($(this).attr("href")); });
         });
     ';
     //AMAZON VENDOR UPLOAD PROCESS END
 } elseif ($jng_sp_id == '1001') {
     ///////////////////////////////////////
     //  LAZADA INDONESIA UPLOAD PROCESS  //