Execute("INSERT INTO $zonestable (zone_country_id, zone_code, zone_name) VALUES ('" . oos_db_input($zone_country_id) . "', '" . oos_db_input($zone_code) . "', '" . oos_db_input($zone_name) . "')"); oos_redirect_admin(oos_href_link_admin($aContents['zones'])); break; case 'save': $zone_id = oos_db_prepare_input($_GET['cID']); $zonestable = $oostable['zones']; $dbconn->Execute("UPDATE $zonestable SET zone_country_id = '" . oos_db_input($zone_country_id) . "', zone_code = '" . oos_db_input($zone_code) . "', zone_name = '" . oos_db_input($zone_name) . "' WHERE zone_id = '" . oos_db_input($zone_id) . "'"); oos_redirect_admin(oos_href_link_admin($aContents['zones'], 'page=' . $nPage . '&cID=' . $zone_id)); break; case 'deleteconfirm': $zone_id = oos_db_prepare_input($_GET['cID']); $zonestable = $oostable['zones']; $dbconn->Execute("DELETE FROM $zonestable WHERE zone_id = '" . oos_db_input($zone_id) . "'"); oos_redirect_admin(oos_href_link_admin($aContents['zones'], 'page=' . $nPage)); break; } } require 'includes/header.php'; ?>

'' . TEXT_INFO_HEADING_NEW_ZONE . ''); $contents = array('form' => oos_draw_form('id', 'zones', $aContents['zones'], 'page=' . $nPage . '&action=insert', 'post', FALSE)); $contents[] = array('text' => TEXT_INFO_INSERT_INTRO); $contents[] = array('text' => '
' . TEXT_INFO_ZONES_NAME . '
' . oos_draw_input_field('zone_name')); $contents[] = array('text' => '
' . TEXT_INFO_ZONES_CODE . '
' . oos_draw_input_field('zone_code')); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_NAME . '
' . oos_draw_pull_down_menu('zone_country_id', oos_get_countries())); $contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(BUTTON_INSERT) . ' ' . BUTTON_CANCEL . ''); break; case 'edit': $heading[] = array('text' => '' . TEXT_INFO_HEADING_EDIT_ZONE . ''); $contents = array('form' => oos_draw_form('id', 'zones', $aContents['zones'], 'page=' . $nPage . '&cID=' . $cInfo->zone_id . '&action=save', 'post', FALSE)); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '
' . TEXT_INFO_ZONES_NAME . '
' . oos_draw_input_field('zone_name', $cInfo->zone_name)); $contents[] = array('text' => '
' . TEXT_INFO_ZONES_CODE . '
' . oos_draw_input_field('zone_code', $cInfo->zone_code)); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_NAME . '
' . oos_draw_pull_down_menu('zone_country_id', oos_get_countries(), $cInfo->countries_id)); $contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(IMAGE_UPDATE) . ' ' . BUTTON_CANCEL . ''); break; case 'delete': $heading[] = array('text' => '' . TEXT_INFO_HEADING_DELETE_ZONE . ''); $contents = array('form' => oos_draw_form('id', 'zones', $aContents['zones'], 'page=' . $nPage . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm', 'post', FALSE)); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '
' . $cInfo->zone_name . ''); $contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(BUTTON_DELETE) . ' ' . BUTTON_CANCEL . ''); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '' . $cInfo->zone_name . ''); $contents[] = array('align' => 'center', 'text' => '' . oos_button(BUTTON_EDIT) . '' . oos_button( BUTTON_DELETE) . ''); $contents[] = array('text' => '
' . TEXT_INFO_ZONES_NAME . '
' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')'); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_NAME . ' ' . $cInfo->countries_name); } break; } if ( (oos_is_not_null($heading)) && (oos_is_not_null($contents)) ) { ?>
Execute($zones_query_raw); while ($zones = $zones_result->fields) { if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $zones['zone_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cInfo = new objectInfo($zones); } if (isset($cInfo) && is_object($cInfo) && ($zones['zone_id'] == $cInfo->zone_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?> MoveNext(); } ?>
 
zone_id) ) { echo ''; } else { echo ''; } ?> 
display_count($zones_result_numrows, MAX_DISPLAY_SEARCH_RESULTS, $nPage, TEXT_DISPLAY_NUMBER_OF_ZONES); ?> display_links($zones_result_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $nPage); ?>
' . oos_button(IMAGE_NEW_ZONE) . ''; ?>
infoBox($heading, $contents); ?>