Example #1
1
 function selection()
 {
     global $order;
     if (MODULE_PAYMENT_GOFPAY_MODE == "Api") {
         $expires_month[] = array("id" => "", "text" => MODULE_PAYMENT_GOFPAY_TEXT_MONTH);
         $expires_year[] = array("id" => "", "text" => MODULE_PAYMENT_GOFPAY_TEXT_YEAR);
         for ($i = 1; $i < 13; $i++) {
             $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%m', mktime(0, 0, 0, $i, 1, 2000)));
         }
         $today = getdate();
         for ($i = $today['year']; $i < $today['year'] + 24; $i++) {
             $expires_year[] = array('id' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
         }
         $onFocus = ' onfocus="methodSelect(\'pmt-' . $this->code . '\')"';
         $selection = array('id' => $this->code, 'module' => str_replace('*', rtrim(MODULE_PAYMENT_GOFPAY_HANDLER, '/') . '/tools/logos?websiteid=' . MODULE_PAYMENT_GOFPAY_WEBSITE_ID . '&size=middle&transparent=true', MODULE_PAYMENT_GOFPAY_TEXT_CATALOG_LOGO), 'fields' => array(array('title' => MODULE_PAYMENT_GOFPAY_TEXT_CREDIT_CARD_NUMBER, 'field' => zen_draw_input_field('cardNo', '', 'id="' . $this->code . '-cardNo" maxlength="16"' . $onFocus), 'tag' => $this->code . '-cardNo'), array('title' => MODULE_PAYMENT_GOFPAY_TEXT_CREDIT_CARD_EXPIRES, 'field' => zen_draw_pull_down_menu('expires_month', $expires_month, '-------', 'id="' . $this->code . '-expires-month"' . $onFocus) . zen_draw_pull_down_menu('expires_year', $expires_year, '-------', 'id="' . $this->code . '-expires-year"' . $onFocus) . zen_draw_hidden_field('mypretime', '0'), 'tag' => $this->code . '-expires-month'), array('title' => MODULE_PAYMENT_GOFPAY_TEXT_CREDIT_CARD_CVV, 'field' => zen_draw_input_field('cvv', '', ' id="' . $this->code . '-cvv" size="3" maxlength="3"' . $onFocus) . MODULE_PAYMENT_GOFPAY_TEXT_CREDIT_CARD_EXPIRES_WHATISTHIS, 'tag' => $this->code . '-cvv')));
         return $selection;
     } else {
         return array('id' => $this->code, 'module' => str_replace('*', rtrim(MODULE_PAYMENT_GOFPAY_HANDLER, '/') . '/tools/logos?websiteid=' . MODULE_PAYMENT_GOFPAY_WEBSITE_ID . '&size=middle&transparent=true', MODULE_PAYMENT_GOFPAY_TEXT_CATALOG_LOGO), 'icon' => MODULE_PAYMENT_GUFPAY_TEXT_CATALOG_LOGO);
     }
 }
 function _draw_stocked_attributes()
 {
     global $languages_id;
     $z = array();
     $out = '';
     $attributes = $this->_build_attributes_array(true, false);
     if (sizeof($attributes) > 0) {
         $combinations = array();
         $selected_combination = 0;
         $this->_build_attributes_combinations($attributes, $this->show_out_of_stock == 'True', $this->mark_out_of_stock, $combinations, $selected_combination);
         $combname = '';
         foreach ($attributes as $attrib) {
             $combname .= ', ' . $attrib['oname'];
         }
         $combname = substr($combname, 2) . ':';
         $out .= "<tr>\n";
         $out .= '  <td align="right" class="main"><b>' . $combname . "</b></td>\n  <td class=\"main\">";
         $z['comb'] = false;
         $z['text'] = 'Please select from below';
         $z['id'] = '0';
         array_unshift($combinations, $z);
         for ($i = 0; $i < sizeof($combinations); $i++) {
             if (isset($_GET['products_id']) && $_SESSION['cart']->contents[$_GET['products_id']]) {
                 if ($combinations[$i]['comb'] == $_SESSION['cart']->contents[$_GET['products_id']]['attributes']) {
                     $selected_combination = $i;
                 }
             }
         }
         $out .= zen_draw_pull_down_menu('attrcomb', $combinations, $combinations[$selected_combination]['id']);
         $out .= "</td>\n";
         $out .= "</tr>\n";
     }
     $out .= $this->_draw_out_of_stock_message_js($attributes);
     return $out;
 }
    function choose_audience()
    {
        global $_GET, $db;
        $products_array = array();
        $products = $db->Execute("select pd.products_id, pd.products_name\r\n                                from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\r\n                                where pd.language_id = '" . $_SESSION['languages_id'] . "'\r\n                                and pd.products_id = p.products_id\r\n                                and p.products_status = '1'\r\n                                order by pd.products_name");
        while (!$products->EOF) {
            $products_array[] = array('id' => $products->fields['products_id'], 'text' => $products->fields['products_name']);
            $products->MoveNext();
        }
        $choose_audience_string = '<script language="javascript"><!--
function mover(move) {
  if (move == \'remove\') {
    for (x=0; x<(document.notifications.products.length); x++) {
      if (document.notifications.products.options[x].selected) {
        with(document.notifications.elements[\'chosen[]\']) {
          options[options.length] = new Option(document.notifications.products.options[x].text,document.notifications.products.options[x].value);
        }
        document.notifications.products.options[x] = null;
        x = -1;
      }
    }
  }
  if (move == \'add\') {
    for (x=0; x<(document.notifications.elements[\'chosen[]\'].length); x++) {
      if (document.notifications.elements[\'chosen[]\'].options[x].selected) {
        with(document.notifications.products) {
          options[options.length] = new Option(document.notifications.elements[\'chosen[]\'].options[x].text,document.notifications.elements[\'chosen[]\'].options[x].value);
        }
        document.notifications.elements[\'chosen[]\'].options[x] = null;
        x = -1;
      }
    }
  }
  return true;
}

function selectAll(FormName, SelectBox) {
  temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";
  Source = eval(temp);

  for (x=0; x<(Source.length); x++) {
    Source.options[x].selected = "true";
  }

  if (x<1) {
    alert(\'' . JS_PLEASE_SELECT_PRODUCTS . '\');
    return false;
  } else {
    return true;
  }
}
//--></script>';
        $global_button = '<script language="javascript"><!--' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_GLOBAL . '" style="width: 8em;" onclick="document.location=\\\'' . zen_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm&global=true') . '\\\'">\');' . "\n" . '//--></script><noscript><a href="' . zen_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm&global=true') . '">[ ' . BUTTON_GLOBAL . ' ]</a></noscript>';
        $cancel_button = '<script language="javascript"><!--' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_CANCEL . '" style="width: 8em;" onclick="document.location=\\\'' . zen_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '\\\'">\');' . "\n" . '//--></script><noscript><a href="' . zen_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">[ ' . BUTTON_CANCEL . ' ]</a></noscript>';
        $choose_audience_string .= '<form name="notifications" action="' . zen_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm') . '" method="post" onSubmit="return selectAll(\'notifications\', \'chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td align="center" class="main"><b>' . TEXT_PRODUCTS . '</b><br />' . zen_draw_pull_down_menu('products', $products_array, '', 'size="20" style="width: 20em;" multiple') . '</td>' . "\n" . '    <td align="center" class="main">&nbsp;<br />' . $global_button . '<br /><br /><br /><input type="button" value="' . BUTTON_SELECT . '" style="width: 8em;" onClick="mover(\'remove\');"><br /><br /><input type="button" value="' . BUTTON_UNSELECT . '" style="width: 8em;" onClick="mover(\'add\');"><br /><br /><br /><input type="submit" value="' . BUTTON_SUBMIT . '" style="width: 8em;"><br /><br />' . $cancel_button . '</td>' . "\n" . '    <td align="center" class="main"><b>' . TEXT_SELECTED_PRODUCTS . '</b><br />' . zen_draw_pull_down_menu('chosen[]', array(), '', 'size="20" style="width: 20em;" multiple') . '</td>' . "\n" . '  </tr>' . "\n" . '</table></form>';
        return $choose_audience_string;
    }
Example #4
0
function dbioDrawOrdersStatusDropdown($field_name)
{
    global $db;
    $status_array = array(array('id' => 0, 'text' => TEXT_ALL_ORDERS_STATUS_VALUES));
    $status_info = $db->Execute("SELECT orders_status_id as `id`, orders_status_name as `text` FROM " . TABLE_ORDERS_STATUS . " WHERE language_id = " . (int) $_SESSION['languages_id'] . " ORDER BY orders_status_id ASC");
    while (!$status_info->EOF) {
        $status_info->fields['text'] .= ' [' . $status_info->fields['id'] . ']';
        $status_array[] = $status_info->fields;
        $status_info->MoveNext();
    }
    return zen_draw_pull_down_menu($field_name, $status_array, dbioGetFieldValue($field_name));
}
 function zen_cfg_pull_down_languages_list($languages_id, $key = '')
 {
     global $db;
     $name = $key ? 'configuration[' . $key . ']' : 'configuration_value';
     $languages = $db->execute("select code, name from " . TABLE_LANGUAGES);
     $languages_array = array();
     while (!$languages->EOF) {
         $languages_array[] = array('id' => $languages->fields['name'], 'text' => $languages->fields['name']);
         $languages->MoveNext();
     }
     return zen_draw_pull_down_menu($name, $languages_array, $languages_id);
 }
 public function selection()
 {
     global $order;
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B - (%m)', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 15; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $onFocus = ' onfocus="methodSelect(\'pmt-' . $this->code . '\')"';
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_CHECKOUTAPIPAYMENT_CREDITCARD_OWNER, 'field' => zen_draw_input_field('checkoutapipayment_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'id="' . $this->code . '-cc-owner"' . $onFocus . ' autocomplete="off"'), 'tag' => $this->code . '-cc-owner'), array('title' => MODULE_PAYMENT_CHECKOUTAPIPAYMENT_CREDITCARD_NUMBER, 'field' => zen_draw_input_field('checkoutapipayment_cc_number', $ccnum, 'id="' . $this->code . '-cc-number"' . $onFocus . ' autocomplete="off"'), 'tag' => $this->code . '-cc-number'), array('title' => MODULE_PAYMENT_CHECKOUTAPIPAYMENT_CREDITCARD_EXPIRY, 'field' => zen_draw_pull_down_menu('checkoutapipayment_cc_expires_month', $expires_month, strftime('%m'), 'id="' . $this->code . '-cc-expires-month"' . $onFocus) . '&nbsp;' . zen_draw_pull_down_menu('checkoutapipayment_cc_expires_year', $expires_year, '', 'id="' . $this->code . '-cc-expires-year"' . $onFocus), 'tag' => $this->code . '-cc-expires-month'), array('title' => MODULE_PAYMENT_CHECKOUTAPIPAYMENT_CREDITCARD_CVC, 'field' => zen_draw_input_field('checkoutapipayment_cc_cvv', '', 'size="4" maxlength="4"' . ' id="' . $this->code . '-cc-cvv"' . $onFocus . ' autocomplete="off"') . ' ' . '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_CVV_HELP) . '\')">' . MODULE_PAYMENT_CHECKOUTAPIPAYMENT_TEXT_POPUP_CVV_LINK . '</a>', 'tag' => $this->code . '-cc-cvv')));
     return $selection;
 }
 function selection()
 {
     $mobile_base[] = array('id' => '@docomo.ne.jp', 'text' => '@docomo.ne.jp');
     $mobile_base[] = array('id' => '@ezweb.ne.jp', 'text' => '@ezweb.ne.jp');
     $mobile_base[] = array('id' => '@softbank.ne.jp', 'text' => '@softbank.ne.jp');
     $mobile_base[] = array('id' => '@d.vodafone.ne.jp', 'text' => '@d.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@h.vodafone.ne.jp', 'text' => '@h.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@t.vodafone.ne.jp', 'text' => '@t.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@c.vodafone.ne.jp', 'text' => '@c.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@r.vodafone.ne.jp', 'text' => '@r.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@k.vodafone.ne.jp', 'text' => '@k.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@n.vodafone.ne.jp', 'text' => '@n.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@s.vodafone.ne.jp', 'text' => '@s.vodafone.ne.jp');
     $mobile_base[] = array('id' => '@q.vodafone.ne.jp', 'text' => '@q.vodafone.ne.jp');
     return array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_DIGITALCHECK_EDY_TEXT_MOBILE_EMAIL, 'field' => zen_draw_input_field('digitalcheck_edy_mobile_email', $_SESSION[$this->code . '-mobile-email'], 'id="' . $this->code . '-mobile-email" size="10"') . zen_draw_pull_down_menu('digitalcheck_edy_mobile_base', $mobile_base, $_SESSION[$this->code . '-mobile-base'], 'id="' . $this->code . '-mobile-base"'), 'tag' => $this->code . '-mobile-email')));
 }
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     if (zen_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = ceil($query_numrows / $max_rows_per_page);
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = zen_draw_form_admin('pages', basename($_SERVER['SCRIPT_NAME']), '', 'get');
         $display_links .= '<ul class="pagination">';
         if ($current_page_number > 1) {
             $display_links .= '<li><a href="' . zen_href_link_admin(basename($_SERVER['SCRIPT_NAME']), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a></li>';
         } else {
             $display_links .= '<li><a href="#">&laquo;</a></li>';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, zen_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '<li><a href="' . zen_href_link_admin(basename($_SERVER['SCRIPT_NAME']), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a></li>';
         } else {
             $display_links .= '<li><a href="#">&raquo;</a></li>';
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= zen_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SID) {
             $display_links .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
         }
         $display_links .= '</ul>';
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
function gr_edit($id, $key = '')
{
    $name = $key ? 'configuration[' . $key . ']' : 'configuration_value';
    $gr_campaig = array(array('id' => '0', 'text' => TEXT_NONE));
    $api_key = MODULE_ORDER_TOTAL_GETRESPONSE_API_KEY;
    if (!empty($api_key)) {
        try {
            $client = new GetResponseAPI3($api_key);
            $result = $client->getCampaigns();
            foreach ($result as $k) {
                $gr_campaig[] = array('id' => $k->name, 'text' => $k->name);
            }
        } catch (Exception $e) {
            error_log($e->getMessage());
        }
    }
    return zen_draw_pull_down_menu($name, $gr_campaig, $id);
}
 function _draw_stocked_attributes()
 {
     global $languages_id;
     $out = '';
     $attributes = $this->_build_attributes_array(true, false);
     if (sizeof($attributes) > 0) {
         $combinations = array();
         $selected_combination = 0;
         $this->_build_attributes_combinations($attributes, $this->show_out_of_stock == 'True', $this->mark_out_of_stock, $combinations, $selected_combination);
         $combname = '';
         foreach ($attributes as $attrib) {
             $combname .= ', ' . $attrib['oname'];
         }
         $combname = substr($combname, 2) . ':';
         $out .= "<tr>\n";
         $out .= '  <td align="right" class="main"><b>' . $combname . "</b></td>\n  <td class=\"main\">";
         $out .= zen_draw_pull_down_menu('attrcomb', $combinations, $combinations[$selected_combination]['id']);
         $out .= "</td>\n";
         $out .= "</tr>\n";
     }
     $out .= $this->_draw_out_of_stock_message_js($attributes);
     return $out;
 }
Example #11
0
 function selection()
 {
     global $order;
     $expireMonths = array();
     for ($i = 1; $i < 13; $i++) {
         $expireMonths[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     $expireYears = array();
     for ($i = $today['year']; $i < $today['year'] + 15; $i++) {
         $expireYears[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => tra('Name On Card'), 'field' => zen_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('field' => '<div class="row"><div class="col-xs-8 col-sm-8"><label class="control-label">' . tra('Card Number') . '</label>' . zen_draw_input_field('cc_number', BitBase::getParameter($_SESSION, 'cc_number'), NULL, 'number') . '</div><div class="col-xs-4 col-sm-4"><label class="control-label"><i class="icon-credit-card"></i> ' . tra('CVV Number') . '</label>' . zen_draw_input_field('cc_cvv', BitBase::getParameter($_SESSION, 'cc_cvv'), NULL, 'number') . '</div></div>'), array('title' => tra('Expiration Date'), 'field' => '<div class="row"><div class="col-xs-7 col-sm-9">' . zen_draw_pull_down_menu('cc_expires_month', $expireMonths, BitBase::getParameter($_SESSION, 'cc_expires_month'), ' class="input-small" ') . '</div><div class="col-xs-5 col-sm-3">' . zen_draw_pull_down_menu('cc_expires_year', $expireYears, substr(BitBase::getParameter($_SESSION, 'cc_expires_year', date('Y') + 1), -2), ' class="input-small" ') . '</div></div>')));
     if (!empty($_SESSION[$this->code . '_error']['name'])) {
         $selection['fields'][0]['error'] = $_SESSION[$this->code . '_error']['name'];
     }
     if (!empty($_SESSION[$this->code . '_error']['number'])) {
         $selection['fields'][1]['error'] = $_SESSION[$this->code . '_error']['number'];
     }
     if (!empty($_SESSION[$this->code . '_error']['date'])) {
         $selection['fields'][2]['error'] = $_SESSION[$this->code . '_error']['date'];
     }
     return $selection;
 }
Example #12
0
          <tr>
            <td class="main" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="main"><?php 
echo TEXT_PRODUCTS_IMAGE;
?>
</td>
                <td class="main"><?php 
echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_file_field('products_image') . '&nbsp;' . ($pInfo->products_image != '' ? TEXT_IMAGE_CURRENT . $pInfo->products_image : TEXT_IMAGE_CURRENT . '&nbsp;' . NONE) . zen_draw_hidden_field('products_previous_image', $pInfo->products_image);
?>
</td>
                <td valign = "center" class="main"><?php 
echo TEXT_PRODUCTS_IMAGE_DIR;
?>
&nbsp;<?php 
echo zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory);
?>
</td>
						  </tr>
              <tr>
                <td class="main"><?php 
echo zen_draw_separator('pixel_trans.gif', '24', '15');
?>
</td>
                <td class="main" valign="top"><?php 
echo TEXT_IMAGES_DELETE . ' ' . zen_draw_radio_field('image_delete', '0', $off_image_delete) . '&nbsp;' . TABLE_HEADING_NO . ' ' . zen_draw_radio_field('image_delete', '1', $on_image_delete) . '&nbsp;' . TABLE_HEADING_YES;
?>
</td>
	  	    	  </tr>

              <tr>
Example #13
0
function zen_get_country_list($name, $selected = '', $parameters = '')
{
    $countriesAtTopOfList = array();
    $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    $countries = zen_get_countries();
    // Set some default entries at top of list:
    if (STORE_COUNTRY != SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY) {
        $countriesAtTopOfList[] = SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;
    }
    $countriesAtTopOfList[] = STORE_COUNTRY;
    // IF YOU WANT TO ADD MORE DEFAULTS TO THE TOP OF THIS LIST, SIMPLY ENTER THEIR NUMBERS HERE.
    // Duplicate more lines as needed
    // Example: Canada is 108, so use 108 as shown:
    //$countriesAtTopOfList[] = 108;
    //process array of top-of-list entries:
    foreach ($countriesAtTopOfList as $key => $val) {
        $countries_array[] = array('id' => $val, 'text' => zen_get_country_name($val));
    }
    // now add anything not in the defaults list:
    for ($i = 0, $n = sizeof($countries); $i < $n; $i++) {
        $alreadyInList = FALSE;
        foreach ($countriesAtTopOfList as $key => $val) {
            if ($countries[$i]['countries_id'] == $val) {
                // If you don't want to exclude entries already at the top of the list, comment out this next line:
                $alreadyInList = TRUE;
                continue;
            }
        }
        if (!$alreadyInList) {
            $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
        }
    }
    return zen_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
}
            ?>

<label class="inputLabel" for="country"><?php 
            echo ENTRY_COUNTRY;
            ?>
</label>
<?php 
            echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" onchange="update_zone(this.form);"');
            ?>
<br class="clearBoth" /> <label class="inputLabel" for="stateZone"
		id="zoneLabel"><?php 
            echo ENTRY_STATE;
            ?>
</label>
<?php 
            echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $state_zone_id, 'id="stateZone"');
            ?>
<br class="clearBoth" id="stBreak" /> <label class="inputLabel"
		for="state" id="stateLabel"><?php 
            echo $state_field_label;
            ?>
</label>
<?php 
            echo zen_draw_input_field('state', $selectedState, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"') . '&nbsp;<span class="alert" id="stText">&nbsp;</span>';
            ?>
<br class="clearBoth" />

<?php 
            if (CART_SHIPPING_METHOD_ZIP_REQUIRED == "true") {
                ?>
<label class="inputLabel"><?php 
      <a href="<?php 
                echo zen_href_link($current_page, 'cPath=' . $current_category_id . '/Free-Shipping-' . $listTypes) . postfixUrl();
                ?>
">    Free Shipping
      </a>    </span>
      <?php 
                break;
        }
        ?>
	    </li>
	    <li><strong>Sorted By: </strong><?php 
        echo zen_draw_pull_down_menu('productsort', $productsort, isset($_GET['productsort']) ? $_GET['productsort'] : '', 'onchange="changeSort(this,\'' . cleanSameArg('productsort') . '\');" class="select" rel="dropdown"');
        ?>
</li>
	    <li><strong>Show: </strong> <?php 
        echo zen_draw_pull_down_menu('pagesize', $pagesize, isset($_GET['pagesize']) ? $_GET['pagesize'] : '20', 'onchange="changePagesize(this,\'' . cleanSameArg('pagesize') . '\');" class="select1" rel="dropdown"');
        ?>
	  </ul>
	</div>
	<?php 
        switch ($listTypes) {
            //caizhouqing update pro_list
            case '2':
                require $template->get_template_dir('tpl_grid_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_grid_display.php';
                break;
            case '3':
                require $template->get_template_dir('tpl_gallery_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_gallery_display.php';
                break;
            default:
                require $template->get_template_dir('tpl_tabular_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_tabular_display.php';
                break;
Example #16
0
  			<tr><td><h2><?php 
    echo HEADING_SUB1;
    ?>
</h2></td></tr>
          <tr>
            <td class="main" colspan="2"><?php 
    echo TEXT_INSTRUCTIONS;
    ?>
</td>
          </tr>
					<tr>
						<td class="main"><strong><?php 
    echo TEXT_ACTIVITY_EXPORT_FORMAT;
    ?>
</strong><br /><?php 
    echo zen_draw_pull_down_menu('format', $available_export_formats, $format);
    ?>
</td>
					</tr>
					<tr>
						<td colspan="2"><?php 
    echo zen_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
					</tr>
					<tr>
						<td class="main"><strong><?php 
    echo TEXT_ACTIVITY_EXPORT_FILENAME;
    ?>
</strong><br /><?php 
    echo zen_draw_input_field('filename', htmlspecialchars($file, ENT_COMPAT, CHARSET, TRUE), ' size="60"');
function draw_optiontype_pulldown($name, $default = '')
{
    global $products_options_types_list;
    $values = array();
    foreach ($products_options_types_list as $id => $text) {
        $values[] = array('id' => $id, 'text' => $text);
    }
    return zen_draw_pull_down_menu($name, $values, $default);
}
    /** Echoes out a complete address form, returns nothing.
     *
     * You are required to manually put the `form-horizontal` class in the
     * surrounding `<form>` element.
     */
    public static function echo_shipping_address_form()
    {
        global $entry, $zone_name, $zone_id, $flag_show_pulldown_states, $selected_country;
        ?>
    <p class="text-danger"><strong><?php 
        echo FORM_REQUIRED_INFORMATION;
        ?>
</strong></p>
    <?php 
        if (ACCOUNT_GENDER == 'true') {
            $male = (isset($gender) ? $gender : $entry->fields['entry_gender']) == 'male';
            echo '<label class="radio-inline">' . zen_draw_radio_field('gender', 'm', $male, 'id="gender-male"') . MALE . '</label>' . '<label class="radio-inline">' . zen_draw_radio_field('gender', 'f', !$male, 'id="gender-female"') . FEMALE . '</label>' . self::required_text(ENTRY_GENDER_TEXT);
        }
        ?>

    <div class='form-group'>
    <label class="control-label col-sm-4" for="firstname"><?php 
        echo self::required_text(ENTRY_FIRST_NAME_TEXT) . ENTRY_FIRST_NAME;
        ?>
</label>
    <div class='col-sm-8'>
      <?php 
        echo zen_draw_input_field('firstname', $entry->fields['entry_firstname'], zen_set_field_length(TABLE_CUSTOMERS, 'customers_firstname', '40') . ' class="form-control" id="firstname"');
        ?>
    </div>
    </div>

    <div class='form-group'>
    <label class="control-label col-sm-4" for="lastname"><?php 
        echo self::required_text(ENTRY_LAST_NAME_TEXT) . ENTRY_LAST_NAME;
        ?>
</label>
    <div class='col-sm-8'>
    <?php 
        echo zen_draw_input_field('lastname', $entry->fields['entry_lastname'], zen_set_field_length(TABLE_CUSTOMERS, 'customers_lastname', '40') . ' class="form-control" id="lastname"');
        ?>
    </div>
    </div>

    <?php 
        if (ACCOUNT_COMPANY == 'true') {
            ?>
      <div class='form-group'>
      <label class="control-label col-sm-4" for="lastname"><?php 
            echo self::required_text(ENTRY_COMPANY_TEXT) . ENTRY_COMPANY;
            ?>
</label>
      <div class='col-sm-8'>
      <?php 
            echo zen_draw_input_field('company', $entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' class="form-control" id="company"');
            ?>
      </div>
      </div>
    <?php 
        }
        ?>

    <div class='form-group'>
    <label class="control-label col-sm-4" for="street-address"><?php 
        echo self::required_text(ENTRY_STREET_ADDRESS_TEXT) . ENTRY_STREET_ADDRESS;
        ?>
</label>
    <div class='col-sm-8'>
    <?php 
        echo zen_draw_input_field('street_address', $entry->fields['entry_street_address'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_street_address', '40') . ' class="form-control" id="street-address"');
        ?>
    </div>
    </div>

    <?php 
        if (ACCOUNT_SUBURB == 'true') {
            ?>
    <div class='form-group'>
    <label class="control-label col-sm-4" for="suburb"><?php 
            echo self::required_text(ENTRY_SUBURB_TEXT) . ENTRY_SUBURB;
            ?>
</label>
    <div class='col-sm-8'>
    <?php 
            echo zen_draw_input_field('suburb', $entry->fields['entry_suburb'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_suburb', '40') . ' class="form-control" id="suburb"');
            ?>
    </div>
    </div>
    <?php 
        }
        ?>

    <div class='form-group'>
    <label class="control-label col-sm-4" for="city"><?php 
        echo self::required_text(ENTRY_CITY_TEXT) . ENTRY_CITY;
        ?>
</label>
    <div class='col-sm-8'>
    <?php 
        echo zen_draw_input_field('city', $entry->fields['entry_city'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_city', '40') . ' class="form-control" id="city"');
        ?>
    </div></div>

    <?php 
        if (ACCOUNT_STATE == 'true') {
            if ($flag_show_pulldown_states == true) {
                ?>
          <div class='form-group'>
          <label class="control-label col-sm-4" for="stateZone" class="form-control" id="zoneLabel">
            <?php 
                echo self::required_text(ENTRY_STATE_TEXT) . ENTRY_STATE;
                ?>
          </label>
          <div class='col-sm-8'>
    <?php 
                echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'class="form-control" id="stateZone"');
                echo '</div></div>';
            }
            ?>

    <div class='form-group' id='stateLabel'>
    <label class="control-label col-sm-4" for="state"><?php 
            echo self::required_text(ENTRY_STATE_TEXT) . ENTRY_STATE;
            ?>
</label>
    <!-- Elements with ids of `stText` & `stBreak` are required by Zencart,
         leaving them out breaks the auto-populating of the State dropdown when editing
         an address. -->
    <span id='stText'></span><span id='stBreak'></span>
    <div class='col-sm-8'>
    <?php 
            echo zen_draw_input_field('state', zen_get_zone_name($entry->fields['entry_country_id'], $entry->fields['entry_zone_id'], $entry->fields['entry_state']), zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' class="form-control" id="state"');
            if ($flag_show_pulldown_states == false) {
                echo zen_draw_hidden_field('zone_id', $zone_name, ' ');
            }
            ?>
    </div></div>
    <?php 
        }
        ?>

    <div class='form-group'>
    <label class="control-label col-sm-4" for="postcode"><?php 
        echo self::required_text(ENTRY_POST_CODE_TEXT) . ENTRY_POST_CODE;
        ?>
</label>
    <div class='col-sm-8'>
    <?php 
        echo zen_draw_input_field('postcode', $entry->fields['entry_postcode'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' class="form-control" id="postcode"');
        ?>
    </div></div>

    <div class='form-group'>
    <label class="control-label col-sm-4" for="country"><?php 
        echo self::required_text(ENTRY_COUNTRY_TEXT) . ENTRY_COUNTRY;
        ?>
</label>
    <div class='col-sm-8'>
    <?php 
        echo zen_get_country_list('zone_country_id', isset($entry->fields['entry_country_id']) ? $entry->fields['entry_country_id'] : $selected_country, 'class="form-control" id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : ''));
        ?>
    </div></div><?php 
    }
<table class="border fit">
<?php 
    // show dropdown if set
    if (CONTACT_US_LIST != '') {
        ?>
<tr>
<th scope="row"><span class="required"><?php 
        echo TEXT_REQUIRED;
        ?>
</span><label><?php 
        echo SEND_TO_TEXT;
        ?>
</label></th>
<td><?php 
        echo zen_draw_pull_down_menu('send_to', $send_to_array, 'id=\\"send-to\\"');
        ?>
</td>
</tr>
<?php 
    }
    ?>

<tr>
<th scope="row"><span class="required"><?php 
    echo TEXT_REQUIRED;
    ?>
</span><label><?php 
    echo ENTRY_NAME;
    ?>
</label></th>
Example #20
0
    ?>
</td>
<?php 
}
?>
    </tr></table></td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr class="headerBar" height="20" width="100%">

    <td class="headerBarContent" align="left">
      <?php 
if (!$hide_languages) {
    echo zen_draw_form('languages', basename($PHP_SELF), '', 'get');
    echo DEFINE_LANGUAGE . '&nbsp;&nbsp;' . (sizeof($languages) > 1 ? zen_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"') : '');
    echo zen_hide_session_id();
    echo '</form>';
} else {
    echo '&nbsp;';
}
?>
    </td>
    <td class="headerBarContent" align="center"><b><?php 
echo date("r", time()) . 'GMT' . '&nbsp;[' . $_SERVER['REMOTE_ADDR'] . ' ]&nbsp;';
?>
</b></td>
    <td class="headerBarContent" align="right"><?php 
echo '<a href="' . zen_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '" class="headerLink">' . HEADER_TITLE_TOP . '</a>&nbsp;|&nbsp;<a href="' . zen_catalog_href_link() . '" class="headerLink" target="_blank">' . HEADER_TITLE_ONLINE_CATALOG . '</a>&nbsp;|&nbsp;<a href="http://www.zen-cart.com/" class="headerLink" target="_blank">' . HEADER_TITLE_SUPPORT_SITE . '</a>&nbsp;|&nbsp;<a href="' . zen_href_link(FILENAME_LOGOFF) . '" class="headerLink">' . HEADER_TITLE_LOGOFF . '</a>&nbsp;';
?>
</td>
Example #21
0
</td>
					</tr>

					<tr>
						<td colspan="2"><?php 
echo zen_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
					</tr>
					<tr bgcolor="#ebebff">
						<td class="main"><?php 
echo TEXT_PRODUCTS_TAX_CLASS;
?>
</td>
						<td class="main"><?php 
echo zen_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"');
?>
</td>
					</tr>
					<tr bgcolor="#ebebff">
						<td class="main"><?php 
echo TEXT_PRODUCTS_COGS_NET;
?>
</td>
						<td class="main"><?php 
echo zen_draw_input_field('products_cogs', $pInfo->products_cogs, 'onKeyUp="updateFromCost()"');
?>
</td>
					</tr>
					<tr bgcolor="#ebebff">
						<td class="main"><?php 
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE . ' ' . $template_dir;
?>
</td>
          </tr>
          <tr>
            <td class="main">
<?php 
echo zen_draw_form('form_add_page', FILENAME_LAYOUT_CONTROLLER_ADD_PAGE, '', 'get');
echo zen_draw_hidden_field('action', 'add');
echo zen_draw_hidden_field('template_dir', $template_dir);
// draw not setuped layout page drop down
$not_setuped_pages = zen_get_not_setuped_layout_pages($template_dir);
echo HEADING_TITLE_SELECT_ADD_LAYOUT_PAGE . ' ' . zen_draw_pull_down_menu('layout_page', $not_setuped_pages);
echo zen_image_submit('button_insert.gif');
?>
              </form>
            </td>
          </tr>
        </table></td>
      </tr>
    </td>
  </tr>
</table>
</body>
</html>
 case 'copy_to':
     $copy_attributes_delete_first = '0';
     $copy_attributes_duplicates_skipped = '0';
     $copy_attributes_duplicates_overwrite = '0';
     $copy_attributes_include_downloads = '1';
     $copy_attributes_include_filename = '1';
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
     // WebMakers.com Added: Split Page
     if (empty($pInfo->products_id)) {
         $pInfo->products_id = $pID;
     }
     $contents = array('form' => zen_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id));
     $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_PRODUCT . '<br /><b>' . $pInfo->products_name . ' ID#' . $pInfo->products_id . '</b>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . zen_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . zen_draw_pull_down_menu('categories_id', zen_get_category_tree(), $current_category_id));
     $contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . zen_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . zen_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
     // only ask about attributes if they exist
     if (zen_has_product_attributes($pInfo->products_id, 'false')) {
         $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3'));
         $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_ONLY);
         $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_yes', true) . ' ' . TEXT_COPY_ATTRIBUTES_YES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_no') . ' ' . TEXT_COPY_ATTRIBUTES_NO);
         // future          $contents[] = array('align' => 'center', 'text' => '<br />' . ATTRIBUTES_NAMES_HELPER . '<br />' . zen_draw_separator('pixel_trans.gif', '1', '10'));
         $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3'));
     }
     $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
     // attribute features
 // attribute features
 case 'attribute_features':
     $copy_attributes_delete_first = '0';
Example #24
0
    echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']);
    ?>
            <td class="main" align="left" valign="bottom"><?php 
    echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" ');
    ?>
</td>
            <td class="main" align="left" valign="middle">
              <?php 
    $za_lookup = array(array('id' => '0', 'text' => TEXT_LOOKUP_NONE), array('id' => '1', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT), array('id' => '2', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT_CATALOG), array('id' => '3', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT_ADMIN));
    echo '<strong>' . TEXT_ALL_FILES_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, '0');
    ?>
            </td>
            <td class="main" align="left" valign="middle">
              <?php 
    $za_lookup_filetype = array(array('id' => '1', 'text' => TEXT_ALL_FILES_LOOKUP_PHP), array('id' => '2', 'text' => TEXT_ALL_FILES_LOOKUP_PHPCSS), array('id' => '3', 'text' => TEXT_ALL_FILES_LOOKUP_CSS), array('id' => '4', 'text' => TEXT_ALL_FILES_LOOKUP_HTMLTXT), array('id' => '5', 'text' => TEXT_ALL_FILES_LOOKUP_JS));
    echo '<strong>' . TEXT_ALL_FILESTYPE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_filestype', $za_lookup_filetype, '0');
    echo '<strong>' . TEXT_CASE_SENSITIVE . '</strong>' . zen_draw_checkbox_field('case_sensitive', true);
    ?>
            </td>
            <td class="main" align="right" valign="bottom"><?php 
    echo zen_image_submit('button_search.gif', IMAGE_SEARCH);
    ?>
</td>
          </form></tr>
          <tr>
            <td colspan="4" class="main" align="left" valign="top"><?php 
    echo TEXT_INFO_CONFIGURATION_UPDATE;
    ?>
</td>
          </tr>
        </table></td>
Example #25
0
    $quick_copy_from_array[] = array('id' => QUICKUPDATES_COPY_PRODUCT_ID_DEFAULT, 'text' => 'id:' . QUICKUPDATES_COPY_PRODUCT_ID_DEFAULT . ' (' . TEXT_QUICK_COPY_PRODUCT_ID_DEFAULT . ')');
}
foreach ((array) $export_products as $key => $value) {
    if (!empty($value['products_model'])) {
        $text = ' (' . $value['products_model'] . ')';
    }
    $quick_copy_from_array[] = array('id' => $key, 'text' => 'id:' . $key . $text);
}
echo zen_draw_form('quickcopyfrom', FILENAME_QUICK_UPDATES);
echo zen_draw_pull_down_menu('quick_copy_from_id', $quick_copy_from_array, $_SESSION['quick_updates']['quick_copy_from_id']);
$array = array();
//$array[] = array('id' => $_SESSION['quick_updates']['quick_copy_number'],'text' => $_SESSION['quick_updates']['quick_copy_number'] . 'x');
$array[] = array('id' => 0, 'text' => '0x');
$array[] = array('id' => 1, 'text' => '1x');
$array[] = array('id' => 10, 'text' => '10x');
echo zen_draw_pull_down_menu('quick_copy_number', $array, $_SESSION['quick_updates']['quick_copy_number']);
echo zen_draw_hidden_field('quick_updates_copy', 1) . "\n";
echo zen_image_submit('button_copy.gif', BUTTON_TEXT_QUICK_COPY) . "\n";
?>
            </form>
            <!-- // eof quick copy form -->
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table><!-- eof #quickUpdatesWrapper -->

<!-- footer //-->
<?php 
require DIR_WS_INCLUDES . 'footer.php';
Example #26
0
									<td class="main"><?php 
    echo TEXT_BANNERS_URL;
    ?>
</td>
									<td class="main"><?php 
    echo zen_draw_input_field('banners_url', $bInfo->banners_url, zen_set_field_length(TABLE_BANNERS, 'banners_url'));
    ?>
</td>
								</tr>
								<tr>
									<td class="main" valign="top"><?php 
    echo TEXT_BANNERS_GROUP;
    ?>
</td>
									<td class="main"><?php 
    echo zen_draw_pull_down_menu('banners_group', $groups_array, $bInfo->banners_group) . TEXT_BANNERS_NEW_GROUP . '<br>' . zen_draw_input_field('new_banners_group', '', '', sizeof($groups_array) > 0 ? false : true);
    ?>
</td>
								</tr>
								<tr>
									<td colspan="2"><?php 
    echo zen_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
								</tr>
								<tr>
									<td class="main" valign="top"><?php 
    echo TEXT_BANNERS_IMAGE;
    ?>
</td>
									<td class="main"><?php 
Example #27
0
         $language_array[] = array('text' => $lns->fields['name'], 'id' => $lns->fields['languages_id']);
         $lns->MoveNext();
     }
     $contents[] = array('text' => '<br>' . TEXT_INFO_TEMPLATE_NAME . '<br>' . zen_draw_pull_down_menu('ln', $template_array));
     $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_NAME . '<br>' . zen_draw_pull_down_menu('lang', $language_array, $_POST['lang']));
     $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_insert.gif', IMAGE_INSERT) . '&nbsp;<a href="' . zen_href_link(FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page']) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_TEMPLATE . '</b>');
     $contents = array('form' => zen_draw_form('templateselect', FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $tInfo->template_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     reset($template_info);
     while (list($key, $value) = each($template_info)) {
         $template_array[] = array('id' => $key, 'text' => $value['name']);
     }
     $contents[] = array('text' => '<br>' . TEXT_INFO_TEMPLATE_NAME . '<br>' . zen_draw_pull_down_menu('ln', $template_array, $templates->fields['template_dir']));
     $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . zen_href_link(FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $tInfo->template_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_TEMPLATE . '</b>');
     $contents = array('form' => zen_draw_form('zones', FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&action=deleteconfirm') . zen_draw_hidden_field('tID', $tInfo->template_id));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br><b>' . $template_info[$tInfo->template_dir]['name'] . '</b>');
     $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;<a href="' . zen_href_link(FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $tInfo->template_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if (isset($tInfo) && is_object($tInfo)) {
         $heading[] = array('text' => '<b>' . $template_info[$tInfo->template_dir]['name'] . '</b>');
         if ($tInfo->template_language == 0) {
             $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $tInfo->template_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
         } else {
    echo zen_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT);
    ?>
</td>
            <td align="right"><table border="0" cellspacing="0" cellpadding="0">
              <tr><?php 
    echo zen_draw_form('orders', FILENAME_SUPER_ORDERS, '', 'get', '', true);
    ?>
                <td class="smallText" align="right"><?php 
    echo HEADING_TITLE_SEARCH . ' ' . zen_draw_input_field('oID', '', 'size="12"') . zen_draw_hidden_field('action', 'edit');
    ?>
</td>
              </form><?php 
    echo zen_draw_form('status', FILENAME_SUPER_ORDERS, '', 'get', '', true);
    ?>
                <td class="smallText" align="right">&nbsp;<?php 
    echo HEADING_TITLE_STATUS . ' ' . zen_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), $_GET['status'], 'onChange="this.form.submit();"');
    ?>
</td>
              </form></tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2" id="superOrdersTable">
              <tr class="dataTableHeadingRow">
<?php 
    // Sort Listing
    switch ($_GET['list_order']) {
 /**
  * Display Credit Card Information Submission Fields on the Checkout Payment Page
  */
 function selection()
 {
     global $order;
     $this->cc_type_check = 'var value = document.checkout_payment.paypalec_cc_type.value;' . 'if (value == "Switch" || value == "Solo") {' . '    document.checkout_payment.paypalec_cc_issue_month.disabled = false;' . '    document.checkout_payment.paypalec_cc_issue_year.disabled = false;' . '    document.checkout_payment.paypalec_cc_checkcode.disabled = true;' . '    if (document.checkout_payment.paypalec_cc_issuenumber) document.checkout_payment.paypalec_cc_issuenumber.disabled = true;' . '} else if (value == "Maestro") {' . '    document.checkout_payment.paypalec_cc_issuenumber.disabled = false;' . '    if (document.checkout_payment.paypalec_cc_issue_month) document.checkout_payment.paypalec_cc_issue_month.disabled = true;' . '    if (document.checkout_payment.paypalec_cc_issue_year) document.checkout_payment.paypalec_cc_issue_year.disabled = true;' . '    document.checkout_payment.paypalec_cc_checkcode.disabled = false;' . '} else {' . '    if (document.checkout_payment.paypalec_cc_issuenumber) document.checkout_payment.paypalec_cc_issuenumber.disabled = true;' . '    document.checkout_payment.paypalec_cc_checkcode.disabled = false;' . '}';
     if (sizeof($this->cards) == 0 || $this->enableDirectPayment == false) {
         $this->cc_type_check = '';
     }
     /**
      * if we are NOT processing via the gateway, we will only display MarkFlow payment option, and no CC fields
      */
     if ($this->enableDirectPayment == false) {
         return array('id' => $this->code, 'module' => '<img src="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . '" /><span style="font-size:11px; font-family: Arial, Verdana;"> ' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . '</span>');
     }
     /**
      * if we ARE processing via the gateway, prepare and display both the CC fields and the PP option
      */
     $expires_month = array();
     $expires_year = array();
     $issue_year = array();
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B - (%m)', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $onFocus = ' onfocus="methodSelect(\'pmt-' . $this->code . '\')"';
     $fieldsArray = array();
     $fieldsArray[] = array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_FIRSTNAME, 'field' => zen_draw_input_field('paypalec_cc_firstname', $order->billing['firstname'], 'id="' . $this->code . '-cc-ownerf"' . $onFocus) . '<script type="text/javascript">function paypalec_cc_type_check() { ' . $this->cc_type_check . ' } </script>', 'tag' => $this->code . '-cc-ownerf');
     $fieldsArray[] = array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_LASTNAME, 'field' => zen_draw_input_field('paypalec_cc_lastname', $order->billing['lastname'], 'id="' . $this->code . '-cc-ownerl"' . $onFocus), 'tag' => $this->code . '-cc-ownerl');
     if (sizeof($this->cards) > 0) {
         $fieldsArray[] = array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_TYPE, 'field' => zen_draw_pull_down_menu('paypalec_cc_type', $this->cards, '', 'onchange="paypalec_cc_type_check();" onblur="paypalec_cc_type_check();"' . 'id="' . $this->code . '-cc-type"' . $onFocus), 'tag' => $this->code . '-cc-type');
     }
     $fieldsArray[] = array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_NUMBER, 'field' => zen_draw_input_field('paypalec_cc_number', $ccnum, 'id="' . $this->code . '-cc-number"' . $onFocus), 'tag' => $this->code . '-cc-number');
     $fieldsArray[] = array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_EXPIRES, 'field' => zen_draw_pull_down_menu('paypalec_cc_expires_month', $expires_month, '', 'id="' . $this->code . '-cc-expires-month"' . $onFocus) . '&nbsp;' . zen_draw_pull_down_menu('paypalec_cc_expires_year', $expires_year, '', 'id="' . $this->code . '-cc-expires-year"' . $onFocus), 'tag' => $this->code . '-cc-expires-month');
     $fieldsArray[] = array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_CHECKNUMBER, 'field' => zen_draw_input_field('paypalec_cc_checkcode', '', 'size="4" maxlength="4"' . ' id="' . $this->code . '-cc-cvv"' . $onFocus) . '&nbsp;<small>' . MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_CHECKNUMBER_LOCATION . '</small><script type="text/javascript">paypalec_cc_type_check();</script>', 'tag' => $this->code . '-cc-cvv');
     if (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal') {
         $fieldsArray[] = array('title' => '<br /><img src="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . '" /><span style="font-size:11px; font-family: Arial, Verdana;"> ' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . '</span>');
     }
     $selection = array('id' => $this->code, 'module' => MODULE_PAYMENT_PAYPALWPP_TEXT_TITLE, 'fields' => $fieldsArray);
     if (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'Payflow-UK' && (CC_ENABLED_SOLO == '1' || CC_ENABLED_SWITCH == '1')) {
         // add extra fields for Switch/Solo cards
         for ($i = $today['year'] - 10; $i <= $today['year']; $i++) {
             $issue_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
         }
         array_splice($selection['fields'], 4, 0, array(array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_ISSUE, 'field' => zen_draw_pull_down_menu('paypalec_cc_issue_month', $expires_month, '', 'id="' . $this->code . '-cc-issue-month"' . $onFocus) . '&nbsp;' . zen_draw_pull_down_menu('paypalec_cc_issue_year', $issue_year, '', 'id="' . $this->code . '-cc-issue-year"' . $onFocus), 'tag' => $this->code . '-cc-issue-month')));
     }
     /* @TODO -- convert this to handle Issue Number
         if (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'Payflow-UK' && CC_ENABLED_MAESTRO=='1') {
           // add extra field for Maestro cards
           array_splice($selection['fields'], 4, 0,
                        array(array('title' => MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_MAESTRO_ISSUENUMBER,
                                    'field' => zen_draw_pull_down_menu('paypalec_cc_issuenumber', $expires_month, '', 'id="'.$this->code.'-cc-issue-month"' . $onFocus ),
                                    'tag' => $this->code.'-cc-issue-month')));
         }
     */
     return $selection;
 }
    }
    if (isset($_GET['lPath'])) {
        $current_categories_id = $_GET['lPath'];
        $categories = $db->Execute("select link_categories_name from " . TABLE_LINK_CATEGORIES_DESCRIPTION . " where link_categories_id ='" . (int) $current_categories_id . "' and language_id ='" . (int) $_SESSION['languages_id'] . "'");
        $default_category = $categories->fields['link_categories_name'];
    } else {
        $default_category = '';
    }
    ?>
<tr>
<td align="right"><?php 
    echo '<b>' . ENTRY_LINKS_CATEGORY . '</b>&nbsp;<span class="red">' . ENTRY_LINKS_CATEGORY_TEXT . '</span>';
    ?>
</td>
<td><?php 
    echo zen_draw_pull_down_menu('links_category', $categories_array, $default_category);
    ?>
</td>
</tr>
<tr>
<td align="right"><?php 
    echo '<b>' . ENTRY_LINKS_DESCRIPTION . '</b>&nbsp;<span class="red">' . ENTRY_LINKS_DESCRIPTION_TEXT . '</span>';
    ?>
</td>
<td><?php 
    echo zen_draw_textarea_field('links_description', '20', '5');
    ?>
</td>
</tr>
<tr>
<td align="right"><?php