Exemplo n.º 1
0
}
?>
            </td>
<?php 
$heading = array();
$contents = array();
switch ($action) {
    case 'new_discount':
    case 'edit_discount':
        $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_EDIT_SUB_ZONE . '</strong>');
        $contents = array('form' => tep_draw_form('zones', FILENAME_DISCOUNTS, 'dID=' . $HTTP_GET_VARS['dID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&sID=' . $sInfo->association_id . '&saction=save_sub'));
        $contents[] = array('text' => TEXT_INFO_EDIT_SUB_ZONE_INTRO);
        $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . '<br>' . tep_draw_hidden_field('zone_country_id', $sInfo->zone_country_id) . $sInfo->countries_name);
        $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_ZONE . '<br>' . tep_draw_hidden_field('zone_id', $sInfo->zone_id) . $sInfo->zone_name);
        $cities = array();
        $zone_cities = tep_get_zone_cities($sInfo->zone_id);
        while (list($cities_id, $cities_name) = each($zone_cities)) {
            $cities[] = array('id' => $cities_id, 'text' => $cities_name);
        }
        $contents[] = array('text' => '<br>' . TEXT_INFO_CITY_NAME . '<br>' . tep_draw_pull_down_menu('city_id[]', $cities, $sInfo->zone_localities, 'size="15" style="width: 100%;" multiple="multiple"'));
        $contents[] = array('text' => '<br>' . TEXT_INFO_FACTOR . '<br>' . tep_draw_input_field('zone_factor', $sInfo->zone_factor, 'size="4"'));
        $contents[] = array('text' => '<br>' . TEXT_INFO_DELIVERY_TIME . '<br>' . tep_draw_input_field('zone_delivery_time', $sInfo->zone_delivery_time));
        $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_DISCOUNTS, 'dID=' . $HTTP_GET_VARS['dID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&sID=' . $sInfo->association_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
        break;
    case 'delete_discount':
        $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_SUB_ZONE . '</strong>');
        $contents = array('form' => tep_draw_form('zones', FILENAME_DISCOUNTS, 'dID=' . $HTTP_GET_VARS['dID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&sID=' . $sInfo->association_id . '&saction=deleteconfirm_sub'));
        $contents[] = array('text' => TEXT_INFO_DELETE_SUB_ZONE_INTRO);
        $contents[] = array('text' => '<br><strong>' . $sInfo->zone_name . '</strong>');
        $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_DISCOUNTS, 'dID=' . $HTTP_GET_VARS['dID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&sID=' . $sInfo->association_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
        break;
Exemplo n.º 2
0
<?php 
    echo tep_js_zone_list('SelectedCountry', 'theForm', 'zone_id');
    ?>

}
//--></script>
<?php 
}
?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<?php 
if (isset($HTTP_GET_VARS['country_id']) && tep_not_null($HTTP_GET_VARS['country_id'])) {
    if (isset($HTTP_GET_VARS['zone_id'])) {
        $cities_array = tep_get_zone_cities($HTTP_GET_VARS['zone_id'], false);
        while (list($city_id, $city_name) = each($cities_array)) {
            $cities[] = array('id' => $city_id, 'text' => $city_name);
        }
        echo '<br/>' . TEXT_INFO_CITY_NAME . '<br/>' . tep_draw_pull_down_menu('city_id[]', $cities, '', 'size="15" style="width: 100%;" multiple="multiple"');
    } else {
        $zones = array();
        $zones_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int) $HTTP_GET_VARS['country_id'] . "' order by sort_order, zone_name");
        while ($zones_array = tep_db_fetch_array($zones_query)) {
            $zones[] = array('id' => $zones_array['zone_id'], 'text' => $zones_array['zone_name']);
        }
        echo '<br/>' . TEXT_INFO_COUNTRY_ZONE . '<br/>' . tep_draw_pull_down_menu('zone_id', $zones, '', 'onChange="getXMLDOM(\'' . FILENAME_GEO_ZONES . '?country_id=\' + document.zones.zone_country_id.options[document.zones.zone_country_id.selectedIndex].value + \'&amp;zone_id=\' + this.options[this.selectedIndex].value, \'city_id\');"') . '<br/><div id="city_id"></div>';
    }
    ?>
</body>
</html>