function current_countries_array($first_option = false)
{
    global $db;
    $countries_array = array();
    if ($first_option) {
        $countries_array[] = array('id' => '', 'text' => $first_option);
    }
    $countries_array[] = array('id' => get_store_country_name(), 'text' => get_store_country_name());
    $countries_array[] = array('id' => 'International', 'text' => 'International');
    $countries = $db->Execute("SELECT DISTINCT customers_country\n            FROM " . TABLE_ORDERS . "\n            WHERE customers_country <> '" . get_store_country_name() . "'\n            ORDER BY customers_country");
    while (!$countries->EOF) {
        $countries_array[] = array('id' => $countries->fields['customers_country'], 'text' => $countries->fields['customers_country']);
        $countries->MoveNext();
    }
    return $countries_array;
}
 /* BEGIN addition added seach by OrderID Range */
 if (isset($_GET['oid_range_first']) && zen_not_null($_GET['oid_range_first']) && isset($_GET['oid_range_last']) && zen_not_null($_GET['oid_range_last'])) {
     $orders_query_raw .= " AND o.orders_id BETWEEN " . (int) $_GET['oid_range_first'] . " AND " . (int) $_GET['oid_range_last'];
 } else {
     if (isset($_GET['oid_range_first']) && zen_not_null($_GET['oid_range_first'])) {
         $orders_query_raw .= " AND o.orders_id >= " . (int) $_GET['oid_range_first'] . " ";
     } else {
         if (isset($_GET['oid_range_last']) && zen_not_null($_GET['oid_range_last'])) {
             $orders_query_raw .= " AND o.orders_id <= " . (int) $_GET['oid_range_last'] . " ";
         }
     }
 }
 /* added seach by country */
 if (isset($_GET['countries']) && zen_not_null($_GET['countries'])) {
     if ($_GET['countries'] == 'International') {
         $orders_query_raw .= " AND o.customers_country <> '" . get_store_country_name() . "' ";
     } else {
         $orders_query_raw .= " AND o.customers_country = '" . $_GET['countries'] . "' ";
     }
 }
 /* END addition */
 $orders_query_raw .= " ORDER BY o.orders_id DESC";
 $orders = $db->Execute($orders_query_raw);
 if ($orders->RecordCount() > 0) {
     /* BEGIN modification updated form to include pdf forms */
     /* show forms based on configuration preference */
     /*  0 - standard form
             1 - pdf form 
             2 - both forms
         */
     echo zen_draw_form('batch_print', FILENAME_SUPER_BATCH_FORMS, 'action=batch_forms', 'post', 'target="_blank"');