Example #1
0
function vam_cfg_pull_down_country_list($country_id)
{
    return vam_draw_pull_down_menu('configuration_value', vam_get_countries(), $country_id);
}
Example #2
0
$contents = array();
if ($_GET['action'] == 'list') {
    switch ($_GET['saction']) {
        case 'new':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_SUB_ZONE . '</b>');
            $contents = array('form' => vam_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' => '<br />' . TEXT_INFO_COUNTRY . '<br />' . vam_draw_pull_down_menu('zone_country_id', vam_get_countries(TEXT_ALL_COUNTRIES), '', 'onChange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_ZONE . '<br />' . vam_draw_pull_down_menu('zone_id', vam_prepare_country_zones_pull_down()));
            $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_INSERT . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $_GET['sID']) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
            break;
        case 'edit':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_SUB_ZONE . '</b>');
            $contents = array('form' => vam_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' => '<br />' . TEXT_INFO_COUNTRY . '<br />' . vam_draw_pull_down_menu('zone_country_id', vam_get_countries(TEXT_ALL_COUNTRIES), $sInfo->zone_country_id, 'onChange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_ZONE . '<br />' . vam_draw_pull_down_menu('zone_id', vam_prepare_country_zones_pull_down($sInfo->zone_country_id), $sInfo->zone_id));
            $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_UPDATE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
            break;
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_SUB_ZONE . '</b>');
            $contents = array('form' => vam_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 . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
            break;
        default:
            if (is_object($sInfo)) {
                $heading[] = array('text' => '<b>' . $sInfo->countries_name . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
                $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . vam_date_short($sInfo->date_added));
            <td class="main"><?php 
    echo ENTRY_POST_CODE;
    ?>
</td>
            <td class="main"><?php 
    echo vam_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 vam_draw_pull_down_menu('affiliate_country_id', vam_get_countries(), $aInfo->affiliate_country_id, 'onChange="update_zone(this.form);"');
    ?>
</td>
          </tr>
<?php 
    if (ACCOUNT_STATE == 'true') {
        ?>
          <tr>
            <td class="main"><?php 
        echo ENTRY_STATE;
        ?>
</td>
            <td class="main"><?php 
        echo vam_draw_pull_down_menu('affiliate_zone_id', vam_prepare_country_zones_pull_down($aInfo->affiliate_country_id), $aInfo->affiliate_zone_id, 'onChange="resetStateText(this.form);"');
        ?>
</td>
                  </tr>
<?php 
    }
    if (ACCOUNT_COUNTRY == 'true') {
        ?>
                  <tr class="dataTableRow"> 
                    <td class="dataTableContent" valign="middle" align="right" nowrap><?php 
        echo ENTRY_COUNTRY;
        ?>
</td>
                    <td colspan="3" class="dataTableContent" valign="top">
					<?php 
        if (ORDER_EDITOR_USE_AJAX == 'true') {
            echo vam_draw_pull_down_menu('update_billing_country_id', vam_get_countries(), $order->billing['country_id'], 'style="width: 300px;" onchange="update_zone(\'update_billing_country_id\', \'update_billing_zone_id\', \'billingStateInput\', \'billingStateMenu\'); updateOrdersField(\'billing_country\', this.options[this.selectedIndex].text);"');
        } else {
            echo vam_draw_pull_down_menu('update_billing_country_id', vam_get_countries(), $order->billing['country_id'], 'style="width: 300px;" onchange="update_zone(\'update_billing_country_id\', \'update_billing_zone_id\', \'billingStateInput\', \'billingStateMenu\'); updateOrdersField(\'billing_country\', this.options[this.selectedIndex].text);"');
        }
        ?>
</td>
                  </tr>
<?php 
    }
    ?>
                </table>
                </td>
              </tr>
              <!-- billing_address_eof //-->
              
            </table></td>
          </tr>
        </table>
Example #5
0
 case 'new':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_ZONE . '</b>');
     $contents = array('form' => vam_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&action=insert'));
     $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME . '<br />' . vam_draw_input_field('zone_name'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_CODE . '<br />' . vam_draw_input_field('zone_code'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br />' . vam_draw_pull_down_menu('zone_country_id', vam_get_countries()));
     $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_INSERT . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_ZONES, 'page=' . $_GET['page']) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_ZONE . '</b>');
     $contents = array('form' => vam_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME . '<br />' . vam_draw_input_field('zone_name', $cInfo->zone_name));
     $contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_CODE . '<br />' . vam_draw_input_field('zone_code', $cInfo->zone_code));
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br />' . vam_draw_pull_down_menu('zone_country_id', vam_get_countries(), $cInfo->countries_id));
     $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_UPDATE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ZONE . '</b>');
     $contents = array('form' => vam_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 . '</b>');
     $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 default:
     if (is_object($cInfo)) {
         $heading[] = array('text' => '<b>' . $cInfo->zone_name . '</b>');
         $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
         $contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME . '<br />' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
         $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . ' ' . $cInfo->countries_name);