function olc_get_country_list($name, $selected = '', $parameters = '') { // $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); // Probleme mit register_globals=off -> erstmal nur auskommentiert. Kann u.U. gelöscht werden. $countries = olc_get_countries(); $countries_array = array(); for ($i = 0, $n = sizeof($countries); $i < $n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return olc_draw_pull_down_menu($name, $countries_array, $selected, $parameters); }
function olc_get_country_name($country_id) { $country_array = olc_get_countries($country_id); return $country_array['countries_name']; }
function olc_get_countries_with_iso_codes($countries_id) { return olc_get_countries($countries_id, true); }
<td class="main"><?php echo ENTRY_POST_CODE; ?> </td> <td class="main"><?php echo olc_draw_input_field('affiliate_postcode', $aInfo->affiliate_postcode, 'maxlength="8"', true); ?> </td> </tr> <tr> <td class="main"><?php echo ENTRY_COUNTRY; ?> </td> <td class="main"><?php echo olc_draw_pull_down_menu('affiliate_country_id', olc_get_countries(), $aInfo->affiliate_country_id, 'onchange="update_zone(this.form);"'); ?> </td> </tr> <?php if (ACCOUNT_STATE == TRUE_STRING_S) { ?> <tr> <td class="main"><?php echo ENTRY_STATE; ?> </td> <td class="main"><?php echo olc_draw_pull_down_menu('affiliate_zone_id', olc_prepare_country_zones_pull_down($aInfo->affiliate_country_id), $aInfo->affiliate_zone_id, 'onchange="resetStateText(this.form);"'); ?> </td>
$explanation_text = HTML_NBSP . HTML_NBSP . "(z.B. 'bei Müller', 'Hinterhaus')"; display_input_field('INPUT_SUBURB', false, EMPTY_STRING, ENTRY_SUBURB, EMPTY_STRING, 'entry_suburb', $cInfo->entry_suburb, MAX_LENGTH, MAX_SIZE, EMPTY_STRING, NOT_REQUIRED, $entry_suburb_error, ENTRY_SUBURB_ERROR, EMPTY_STRING); } if ($IsCreateAccountOrIsEditAccountOrIsCheckout) { $entry_country_id = CUSTOMER_COUNTRY_ID; $entry_state_has_zones = true; } else { $entry_country_id = $cInfo->entry_country_id; } if ($IsUserMode) { $countries = olc_get_countries(); for ($i = 0, $n = sizeof($countries); $i < $n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } } else { $countries_array = olc_get_countries(); } $country_default = $cInfo->entry_country_id; display_pulldown_menu('SELECT_COUNTRY', ENTRY_COUNTRY, EMPTY_STRING, 'entry_country_id', $country_default, $countries_array, $error, $entry_country_error, ENTRY_COUNTRY_ERROR, EMPTY_STRING, AJAX_PLZ_VALIDATION); if (ACCOUNT_STATE == TRUE_STRING_S) { $input_state = 'INPUT_STATE'; $entry_zone_id = $cInfo->entry_zone_id; $entry_state = olc_get_zone_name($entry_country_id, $entry_zone_id); if ($entry_state_has_zones) { $zones_array = array(); $zones_query = olc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . olc_db_input($entry_country_id) . "' order by zone_name"); while ($zones_values = olc_db_fetch_array($zones_query)) { $zone_name = $zones_values['zone_name']; $zones_array[] = array('id' => $zone_name, 'text' => $zone_name); } display_pulldown_menu($input_state, ENTRY_STATE, EMPTY_STRING, ENTRY_STATE_TEXT_LOCAL, $entry_state, $zones_array, $error, $entry_state_error, ENTRY_STATE_ERROR, EMPTY_STRING);
case 'new': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_NEW_ZONE . HTML_B_END); $contents = array('form' => olc_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&action=insert')); $contents[] = array('text' => TEXT_INFO_INSERT_INTRO); $contents[] = array('text' => HTML_BR . TEXT_INFO_ZONES_NAME . HTML_BR . olc_draw_input_field('zone_name')); $contents[] = array('text' => HTML_BR . TEXT_INFO_ZONES_CODE . HTML_BR . olc_draw_input_field('zone_code')); $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_NAME . HTML_BR . olc_draw_pull_down_menu('zone_country_id', olc_get_countries())); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . olc_href_link(FILENAME_ZONES, 'page=' . $_GET['page']) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; case 'edit': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_EDIT_ZONE . HTML_B_END); $contents = array('form' => olc_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => HTML_BR . TEXT_INFO_ZONES_NAME . HTML_BR . olc_draw_input_field('zone_name', $cInfo->zone_name)); $contents[] = array('text' => HTML_BR . TEXT_INFO_ZONES_CODE . HTML_BR . olc_draw_input_field('zone_code', $cInfo->zone_code)); $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_NAME . HTML_BR . olc_draw_pull_down_menu('zone_country_id', olc_get_countries(), $cInfo->countries_id)); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . olc_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; case 'delete': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_ZONE . HTML_B_END); $contents = array('form' => olc_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br/><b>' . $cInfo->zone_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . olc_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; default: if (is_object($cInfo)) { $heading[] = array('text' => HTML_B_START . $cInfo->zone_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END); $contents[] = array('text' => HTML_BR . TEXT_INFO_ZONES_NAME . HTML_BR . $cInfo->zone_name . LPAREN . $cInfo->zone_code . RPAREN); $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_NAME . BLANK . $cInfo->countries_name);
$contents = array(); if ($_GET['action'] == 'list') { switch ($_GET['saction']) { case 'new': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_NEW_SUB_ZONE . HTML_B_END); $contents = array('form' => olc_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $_GET['sID'] . '&saction=insert_sub')); $contents[] = array('text' => TEXT_INFO_NEW_SUB_ZONE_INTRO); $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY . HTML_BR . olc_draw_pull_down_menu('zone_country_id', olc_get_countries(TEXT_ALL_COUNTRIES), '', 'onchange="update_zone(this.form);"')); $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_ZONE . HTML_BR . olc_draw_pull_down_menu('zone_id', olc_prepare_country_zones_pull_down())); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_insert.gif', IMAGE_INSERT) . BLANK . HTML_A_START . olc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $_GET['sID']) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; case 'edit': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_EDIT_SUB_ZONE . HTML_B_END); $contents = array('form' => olc_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=save_sub')); $contents[] = array('text' => TEXT_INFO_EDIT_SUB_ZONE_INTRO); $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY . HTML_BR . olc_draw_pull_down_menu('zone_country_id', olc_get_countries(TEXT_ALL_COUNTRIES), $sInfo->zone_country_id, 'onchange="update_zone(this.form);"')); $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_ZONE . HTML_BR . olc_draw_pull_down_menu('zone_id', olc_prepare_country_zones_pull_down($sInfo->zone_country_id), $sInfo->zone_id)); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_update.gif', IMAGE_UPDATE) . BLANK . HTML_A_START . olc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; case 'delete': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_SUB_ZONE . HTML_B_END); $contents = array('form' => olc_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=deleteconfirm_sub')); $contents[] = array('text' => TEXT_INFO_DELETE_SUB_ZONE_INTRO); $contents[] = array('text' => '<br/><b>' . $sInfo->countries_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; default: if (is_object($sInfo)) { $heading[] = array('text' => HTML_B_START . $sInfo->countries_name . HTML_B_END); $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END); $contents[] = array('text' => HTML_BR . TEXT_INFO_DATE_ADDED . BLANK . olc_date_short($sInfo->date_added));
function olc_cfg_pull_down_country_list($country_id) { return olc_draw_pull_down_menu('configuration_value', olc_get_countries(), $country_id); }