Execute("INSERT INTO " . $oostable['countries'] . " (countries_name, countries_iso_code_2, countries_iso_code_3, address_format_id) VALUES ('" . oos_db_input($countries_name) . "', '" . oos_db_input($countries_iso_code_2) . "', '" . oos_db_input($countries_iso_code_3) . "', '" . oos_db_input($address_format_id) . "')"); oos_redirect_admin(oos_href_link_admin($aContents['countries'])); break; case 'save': $countries_id = oos_db_prepare_input($_GET['cID']); $dbconn->Execute("UPDATE " . $oostable['countries'] . " SET countries_name = '" . oos_db_input($countries_name) . "', countries_iso_code_2 = '" . oos_db_input($countries_iso_code_2) . "', countries_iso_code_3 = '" . oos_db_input($countries_iso_code_3) . "', address_format_id = '" . oos_db_input($address_format_id) . "' WHERE countries_id = '" . oos_db_input($countries_id) . "'"); oos_redirect_admin(oos_href_link_admin($aContents['countries'], 'page=' . $nPage . '&cID=' . $countries_id)); break; case 'deleteconfirm': $countries_id = oos_db_prepare_input($_GET['cID']); $dbconn->Execute("DELETE FROM " . $oostable['countries'] . " WHERE countries_id = '" . oos_db_input($countries_id) . "'"); oos_redirect_admin(oos_href_link_admin($aContents['countries'], 'page=' . $nPage)); break; } } require 'includes/header.php'; ?>

'' . TEXT_INFO_HEADING_NEW_COUNTRY . ''); $contents = array('form' => oos_draw_form('id', 'countries', $aContents['countries'], 'page=' . $nPage . '&action=insert', 'post', FALSE)); $contents[] = array('text' => TEXT_INFO_INSERT_INTRO); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_NAME . '
' . oos_draw_input_field('countries_name')); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_CODE_2 . '
' . oos_draw_input_field('countries_iso_code_2')); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_CODE_3 . '
' . oos_draw_input_field('countries_iso_code_3')); $contents[] = array('text' => '
' . TEXT_INFO_ADDRESS_FORMAT . '
' . oos_draw_input_field('address_format_id')); $contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(BUTTON_INSERT) . ' ' . BUTTON_CANCEL . ''); break; case 'edit': $heading[] = array('text' => '' . TEXT_INFO_HEADING_EDIT_COUNTRY . ''); $contents = array('form' => oos_draw_form('id', 'countries', $aContents['countries'], 'page=' . $nPage . '&cID=' . $cInfo->countries_id . '&action=save', 'post', FALSE)); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_NAME . '
' . oos_draw_input_field('countries_name', $cInfo->countries_name)); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_CODE_2 . '
' . oos_draw_input_field('countries_iso_code_2', $cInfo->countries_iso_code_2)); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_CODE_3 . '
' . oos_draw_input_field('countries_iso_code_3', $cInfo->countries_iso_code_3)); $contents[] = array('text' => '
' . TEXT_INFO_ADDRESS_FORMAT . '
' . oos_draw_input_field('address_format_id', $cInfo->address_format_id)); $contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(IMAGE_UPDATE) . ' ' . BUTTON_CANCEL . ''); break; case 'delete': $heading[] = array('text' => '' . TEXT_INFO_HEADING_DELETE_COUNTRY . ''); $contents = array('form' => oos_draw_form('id', 'countries', $aContents['countries'], 'page=' . $nPage . '&cID=' . $cInfo->countries_id . '&action=deleteconfirm', 'post', FALSE)); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '
' . $cInfo->countries_name . ''); $contents[] = array('align' => 'center', 'text' => '
' . oos_submit_button(IMAGE_UPDATE) . ' ' . BUTTON_CANCEL . ''); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '' . $cInfo->countries_name . ''); $contents[] = array('align' => 'center', 'text' => '' . oos_button(BUTTON_EDIT) . '' . oos_button(BUTTON_DELETE) . ''); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_NAME . '
' . $cInfo->countries_name); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_CODE_2 . ' ' . $cInfo->countries_iso_code_2); $contents[] = array('text' => '
' . TEXT_INFO_COUNTRY_CODE_3 . ' ' . $cInfo->countries_iso_code_3); $contents[] = array('text' => '
' . TEXT_INFO_ADDRESS_FORMAT . ' ' . $cInfo->address_format_id); } break; } if ( (oos_is_not_null($heading)) && (oos_is_not_null($contents)) ) { ?>
Execute($countries_result_raw); while ($countries = $countries_result->fields) { if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $countries['countries_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cInfo = new objectInfo($countries); } if (isset($cInfo) && is_object($cInfo) && ($countries['countries_id'] == $cInfo->countries_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?> MoveNext(); } ?>
 
countries_id) ) { echo ''; } else { echo ''; } ?> 
display_count($countries_result_numrows, MAX_DISPLAY_SEARCH_RESULTS, $nPage, TEXT_DISPLAY_NUMBER_OF_COUNTRIES); ?> display_links($countries_result_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $nPage); ?>
' . oos_button(IMAGE_NEW_COUNTRY) . ''; ?>
infoBox($heading, $contents); ?>