📄 zone_edit.tpl
字号:
{* $Id: zone_edit.tpl,v 1.12 2004/06/25 13:01:34 svowl Exp $ *}
{include file="page_title.tpl" title=$lng.lbl_zone_details}
{$lng.txt_destination_zones_note}
<BR><BR>
<SCRIPT type="text/javascript" language="JavaScript 1.2">
var zones = new Array();
{counter name='js' start='-1' print=false}
{foreach from=$rest_zones key=z item=v}
zones.{$z} = {ldelim}{foreach from=$v item=c key=k}{if $k > 0},{/if}{$c}:'Y'{/foreach}{rdelim};
{/foreach}
{literal}
function moveSelect(left, right, type) {
var len;
if(type != 'R') {
var tmp;
tmp = left;
left = right;
right = tmp;
}
if(!left || !right)
return false;
while(right.selectedIndex != -1) {
left.options[left.options.length] = new Option(right.options[right.selectedIndex].text, right.options[right.selectedIndex].value);
right.options[right.selectedIndex] = null;
}
return true;
}
function saveSelects(objects) {
var sel, x;
if(!objects)
return false;
for(sel = 0; sel < objects.length; sel++) {
if(document.getElementById(objects[sel]))
if(document.getElementById(objects[sel]+"_store").value == '')
for(x = 0; x < document.getElementById(objects[sel]).options.length; x++)
document.getElementById(objects[sel]+"_store").value += document.getElementById(objects[sel]).options[x].value+";";
}
return true;
}
function checkZone(zone, name) {
var x, obj, codes;
obj = document.getElementById(name);
if(zone == 'ALL') {
for(x = 0; x < obj.options.length; x++)
obj.options[x].selected = true;
return true;
}
eval('codes = zones.'+zone);
if(codes)
for(x = 0; x < obj.options.length; x++)
eval('obj.options[x].selected = codes.'+obj.options[x].value);
}
{/literal}
</SCRIPT>
{capture name=dialog}
<DIV align="right">{include file="buttons/button.tpl" button_title=$lng.lbl_zones_list href="zones.php"}</DIV>
<BR>
<TABLE border="0" cellpadding="3" cellspacing="1" width="100%">
<FORM action="zones.php" method="POST" name="zonenameform">
<INPUT type="hidden" name="mode" value="rename">
<INPUT type="hidden" name="zoneid" value="{$zoneid}">
<TR>
<TD colspan="3">
<FONT class="FormButton">{$lng.lbl_zone_name}:</FONT>
<INPUT type="text" size="50" name="zone_name" value="{$zone.zone_name}">
<INPUT type="submit" value="{$lng.lbl_update}">
<INPUT type="button" value=" {$lng.lbl_clone} " onclick="javascript: document.zonenameform.mode.value='clone'; document.zonenameform.submit()">
<BR><BR>
</TD>
</TR>
</FORM>
{if $zone}
<FORM action="zones.php" method="POST" name="zoneform" onsubmit="javascript: saveSelects(new Array('_zone_countries','_zone_states','_zone_counties'));">
<INPUT type="hidden" name="mode" value="details">
<INPUT type="hidden" name="zoneid" value="{$zoneid}">
{* Countries *}
<TR>
<TD colspan="3"><BR><BR>{include file="main/subheader.tpl" title=$lng.lbl_countries_management}</TD>
</TR>
<TR>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_set_val}</FONT></TD>
<TD width="10%"> </TD>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_unset_val}</FONT></TD>
</TR>
<TR>
<TD>
<INPUT type="hidden" id="_zone_countries_store" name="zone_countries" value="">
<SELECT id="_zone_countries" multiple style="WIDTH:100%" size="{$countries_box_size}">
{section name=cid loop=$zone_countries}
<OPTION value="{$zone_countries[cid].code}">{$zone_countries[cid].country}</OPTION>
{/section}
</SELECT>
</TD>
<TD align="center">
<INPUT type="button" value="<<" onclick="moveSelect(document.getElementById('_zone_countries'), document.getElementById('rest_countries'), 'R');">
<BR><BR>
<INPUT type="button" value=">>" onclick="moveSelect(document.getElementById('_zone_countries'), document.getElementById('rest_countries'), 'L');">
</TD>
<TD>
<SELECT id="rest_countries" multiple style="WIDTH:100%" size="{$countries_box_size}">
{section name=rcid loop=$rest_countries}
<OPTION value="{$rest_countries[rcid].code}">{$rest_countries[rcid].country}</OPTION>
{/section}
</SELECT>
</TD>
</TR>
<TR>
<TD colspan="3" align="right">
<TABLE border="0" cellpadding="3" cellspacing="1" width="80%">
<TR>
<TD class="FormButton" nowrap>{$lng.lbl_quick_select}:</TD>
<TD align="right">
<TABLE border="0" cellpadding="3" cellspacing="1" width="100%">
{assign var="counter" value=0}
{section name=zid loop=$zones}
{if $counter eq 0}<TR>{/if}
<TD align="center" nowrap><A href="javascript: void(0);" onclick="javascript: checkZone('{$zones[zid].zone}', 'rest_countries')">{$zones[zid].title}</A></TD>
{math equation="x+1" x=$counter assign="counter"}
{if $counter gt 2}{assign var="counter" value=0}{/if}
{if $counter eq 0}</TR>{/if}
{/section}
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
{* States *}
<TR>
<TD colspan="3"><BR><BR>{include file="main/subheader.tpl" title=$lng.lbl_states_management}</TD>
</TR>
<TR>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_set_val}</FONT></TD>
<TD width="10%"> </TD>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_unset_val}</FONT></TD>
</TR>
<TR>
<TD>
<INPUT type="hidden" id="_zone_states_store" name="zone_states" value="">
<SELECT id="_zone_states" multiple style="WIDTH:100%" size="{$states_box_size}">
{section name=sid loop=$zone_states}
<OPTION value="{$zone_states[sid].country_code}_{$zone_states[sid].code}">{$zone_states[sid].country|truncate:"30":"..."}: {$zone_states[sid].state}</OPTION>
{/section}
</SELECT>
</TD>
<TD align="center">
<INPUT type="button" value="<<" onclick="moveSelect(document.getElementById('_zone_states'), document.getElementById('rest_states'), 'R');">
<BR><BR>
<INPUT type="button" value=">>" onclick="moveSelect(document.getElementById('_zone_states'), document.getElementById('rest_states'), 'L');">
</TD>
<TD>
<SELECT id="rest_states" name="rest_states" multiple style="WIDTH:100%" size="{$states_box_size}">
{section name=rsid loop=$rest_states}
<OPTION value="{$rest_states[rsid].country_code}_{$rest_states[rsid].code}">{$rest_states[rsid].country|truncate:"17":"...":true}: {$rest_states[rsid].state}</OPTION>
{/section}
</SELECT>
</TD>
</TR>
{* Counties *}
{if $config.General.use_counties eq "Y"}
<TR>
<TD colspan="3"><BR><BR>{include file="main/subheader.tpl" title=$lng.lbl_counties}</TD>
</TR>
<TR>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_set_val}</FONT></TD>
<TD width="10%"> </TD>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_unset_val}</FONT></TD>
</TR>
<TR>
<TD>
<INPUT type="hidden" id="_zone_counties_store" name="zone_counties" value="">
<SELECT id="_zone_counties" multiple style="WIDTH:100%" size="{$counties_box_size}">
{section name=ctid loop=$zone_counties}
<OPTION value="{$zone_counties[ctid].countyid}">{$zone_counties[ctid].county}</OPTION>
{/section}
</SELECT>
</TD>
<TD align="center">
<INPUT type="button" value="<<" onclick="moveSelect(document.getElementById('_zone_counties'), document.getElementById('rest_counties'), 'R');">
<BR><BR>
<INPUT type="button" value=">>" onclick="moveSelect(document.getElementById('_zone_counties'), document.getElementById('rest_counties'), 'L');">
</TD>
<TD>
<SELECT id="rest_counties" name="rest_counties" multiple style="WIDTH:100%" size="{$counties_box_size}">
{section name=rctid loop=$rest_counties}
<OPTION value="{$rest_counties[rctid].countyid}">{$rest_counties[rctid].county}</OPTION>
{/section}
</SELECT>
</TD>
</TR>
{/if}
{* City masks *}
<TR>
<TD colspan="3"><BR><BR>{include file="main/subheader.tpl" title=$lng.lbl_cities}</TD>
</TR>
<TR>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_set_val}</FONT></TD>
<TD width="10%"> </TD>
<TD width="45%"><FONT class="FormButton">{$lng.lbl_city_mask_examples}:</FONT></TD>
</TR>
<TR>
<TD>
{include file="provider/main/zone_element.tpl" name="zone_cities" field_type="T" box_size=$cities_box_size}
</TD>
<TD align="center"> </TD>
<TD>{$lng.txt_city_mask_examples}</TD>
</TR>
{* Zip code masks *}
<TR>
<TD colspan="3"><BR><BR>{include file="main/subheader.tpl" title=$lng.lbl_zip_postal_codes}</TD>
</TR>
<TR>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_set_val}</FONT></TD>
<TD width="10%"> </TD>
<TD width="45%"><FONT class="FormButton">{$lng.lbl_zipcode_mask_examples}:</FONT></TD>
</TR>
<TR>
<TD>
{include file="provider/main/zone_element.tpl" name="zone_zipcodes" field_type="Z" box_size=$zipcodes_box_size}
</TD>
<TD align="center"> </TD>
<TD>{$lng.txt_zipcode_mask_examples}</TD>
</TR>
{* Address masks *}
<TR>
<TD colspan="3"><BR><BR>{include file="main/subheader.tpl" title=$lng.lbl_addresses}</TD>
</TR>
<TR>
<TD width="45%" align="center"><FONT class="FormButton">{$lng.lbl_set_val}</FONT></TD>
<TD width="10%"> </TD>
<TD width="45%"><FONT class="FormButton">{$lng.lbl_address_mask_examples}:</FONT></TD>
</TR>
<TR>
<TD>
{include file="provider/main/zone_element.tpl" name="zone_addresses" field_type="A" box_size=$addresses_box_size}
</TD>
<TD align="center"> </TD>
<TD>{$lng.txt_address_mask_examples}</TD>
</TR>
<TR>
<TD colspan="3"><BR><BR><HR>
<INPUT type="submit" value="{$lng.lbl_save_zone_details}" onclick="javascript: saveSelects(new Array('_zone_countries','_zone_states','_zone_counties'));">
</TD>
</TR>
</FORM>
{/if}
</TABLE>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_zone_details content=$smarty.capture.dialog extra="width=100%"}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -