$contents = array('form' => tep_draw_form('countries', 'countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&action=insert'));
     $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br />' . tep_draw_input_field('countries_name'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_CODE_2 . '<br />' . tep_draw_input_field('countries_iso_code_2'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_CODE_3 . '<br />' . tep_draw_input_field('countries_iso_code_3'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_ADDRESS_FORMAT . '<br />' . tep_draw_pull_down_menu('address_format_id', tep_get_address_formats()));
     $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('countries.php', 'page=' . $HTTP_GET_VARS['page'])));
     break;
 case 'edit':
     $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_EDIT_COUNTRY . '</strong>');
     $contents = array('form' => tep_draw_form('countries', 'countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $cInfo->countries_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br />' . tep_draw_input_field('countries_name', $cInfo->countries_name));
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_CODE_2 . '<br />' . tep_draw_input_field('countries_iso_code_2', $cInfo->countries_iso_code_2));
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_CODE_3 . '<br />' . tep_draw_input_field('countries_iso_code_3', $cInfo->countries_iso_code_3));
     $contents[] = array('text' => '<br />' . TEXT_INFO_ADDRESS_FORMAT . '<br />' . tep_draw_pull_down_menu('address_format_id', tep_get_address_formats(), $cInfo->address_format_id));
     $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $cInfo->countries_id)));
     break;
 case 'delete':
     $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_COUNTRY . '</strong>');
     $contents = array('form' => tep_draw_form('countries', 'countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $cInfo->countries_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br /><strong>' . $cInfo->countries_name . '</strong>');
     $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $cInfo->countries_id)));
     break;
 default:
     if (is_object($cInfo)) {
         $heading[] = array('text' => '<strong>' . $cInfo->countries_name . '</strong>');
         $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link('countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $cInfo->countries_id . '&action=edit')) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link('countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $cInfo->countries_id . '&action=delete')));
         $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br />' . $cInfo->countries_name);
         $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_CODE_2 . ' ' . $cInfo->countries_iso_code_2);
Example #2
0
        <td class="smallText" width="40%"><?php 
    echo '<b>' . TEXT_INFO_COUNTRY_CODE_3 . '</b>';
    ?>
</td>
        <td class="smallText" width="60%"><?php 
    echo osc_draw_input_field('countries_iso_code_3', $cInfo->countries_iso_code_3, 'style="width: 100%;"');
    ?>
</td>
      </tr>
      <tr>
        <td class="smallText" width="40%"><?php 
    echo '<b>' . TEXT_INFO_ADDRESS_FORMAT . '</b>';
    ?>
</td>
        <td class="smallText" width="60%"><?php 
    echo osc_draw_pull_down_menu('address_format_id', tep_get_address_formats(), $cInfo->address_format_id);
    ?>
</td>
      </tr>
    </table>

    <p align="center"><?php 
    echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'cDefault\');" class="operationButton">';
    ?>
</p>

    </form>
  </div>
</div>

<div id="infoBox_cDelete" <?php 
Example #3
0
     $contents = array('form' => HTML::form('countries', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&action=insert')));
     $contents[] = array('text' => OSCOM::getDef('text_info_insert_intro'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::inputField('countries_name'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_2') . '<br />' . HTML::inputField('countries_iso_code_2'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_3') . '<br />' . HTML::inputField('countries_iso_code_3'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_address_format') . '<br />' . HTML::selectField('address_format_id', tep_get_address_formats()));
     $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'])));
     break;
 case 'edit':
     $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_country') . '</strong>');
     $contents = array('form' => HTML::form('countries', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=save')));
     $contents[] = array('text' => OSCOM::getDef('text_info_edit_intro'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::inputField('countries_name', $cInfo->countries_name));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_2') . '<br />' . HTML::inputField('countries_iso_code_2', $cInfo->countries_iso_code_2));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_3') . '<br />' . HTML::inputField('countries_iso_code_3', $cInfo->countries_iso_code_3));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_address_format') . '<br />' . HTML::selectField('address_format_id', tep_get_address_formats(), $cInfo->address_format_id));
     $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id)));
     break;
 case 'delete':
     $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_delete_country') . '</strong>');
     $contents = array('form' => HTML::form('countries', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=deleteconfirm')));
     $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro'));
     $contents[] = array('text' => '<br /><strong>' . $cInfo->countries_name . '</strong>');
     $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id)));
     break;
 default:
     if (is_object($cInfo)) {
         $heading[] = array('text' => '<strong>' . $cInfo->countries_name . '</strong>');
         $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=delete')));
         $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . $cInfo->countries_name);
         $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_2') . ' ' . $cInfo->countries_iso_code_2);
                tep_db_perform(TABLE_SELF_DELIVERY, $sql_data_array);
                $self_delivery_id = tep_db_insert_id();
            } elseif ($action == 'save') {
                $sql_data_array['last_modified'] = 'now()';
                tep_db_perform(TABLE_SELF_DELIVERY, $sql_data_array, 'update', "self_delivery_id = '" . (int) $self_delivery_id . "'");
            }
            tep_redirect(tep_href_link(FILENAME_SELF_DELIVERY, tep_get_all_get_params(array('action', 'dID')) . 'dID=' . $self_delivery_id));
            break;
        case 'deleteconfirm':
            $dID = tep_db_prepare_input($HTTP_GET_VARS['dID']);
            tep_db_query("delete from " . TABLE_SELF_DELIVERY . " where self_delivery_id = '" . tep_db_input($dID) . "'");
            tep_redirect(tep_href_link(FILENAME_SELF_DELIVERY, tep_get_all_get_params(array('action', 'dID'))));
            break;
    }
}
$address_formats = tep_get_address_formats();
$address_format_id = $address_formats[0]['id'];
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
echo TITLE;
?>