Attached Files |
country_state_refactoring_core.patch [^] (148,485 bytes) 2010-04-11 08:34
[Show Content]
Index: admin_templates/users/users_edit.tpl
===================================================================
--- admin_templates/users/users_edit.tpl (revision 13329)
+++ admin_templates/users/users_edit.tpl (working copy)
@@ -80,7 +80,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="City" title="la_fld_City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="State" title="la_fld_State"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Zip" title="la_fld_Zip"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Country" title="la_fld_Country" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="u" field="Country" title="la_fld_Country" has_empty="1"/>
<inp2:m_RenderElement name="subsection" prefix="u" fields="Status,CreatedOn" title="la_section_Properties"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="u" field="Status" title="la_fld_Status"/>
Index: install/english.lang
===================================================================
--- install/english.lang (revision 13329)
+++ install/english.lang (working copy)
@@ -1,5 +1,5 @@
-<LANGUAGES>
- <LANGUAGE PackName="English" Encoding="base64"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>utf-8</CHARSET><DOCS_URL>http://docs.in-portal.org/eng/index.php</DOCS_URL><UNITSYSTEM>2</UNITSYSTEM>
+<LANGUAGES Version="3">
+ <LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" TimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
<PHRASES>
<PHRASE Label="la_Active" Module="Core" Type="1">QWN0aXZl</PHRASE>
<PHRASE Label="la_Add" Module="Core" Type="1">QWRk</PHRASE>
@@ -159,8 +159,10 @@
<PHRASE Label="la_col_SessionEnd" Module="Core" Type="1">U2Vzc2lvbiBFbmQ=</PHRASE>
<PHRASE Label="la_col_SessionLogId" Module="Core" Type="1">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
<PHRASE Label="la_col_SessionStart" Module="Core" Type="1">U2Vzc2lvbiBTdGFydA==</PHRASE>
+ <PHRASE Label="la_col_ShortIsoCode" Module="Core" Type="1">U2hvcnQgSVNPIENvZGU=</PHRASE>
<PHRASE Label="la_col_SkinName" Module="Core" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_SortBy" Module="Core" Type="1">U29ydCBieQ==</PHRASE>
+ <PHRASE Label="la_col_StateCountry" Module="Core" Type="1">U3RhdGUgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_col_Status" Module="Core" Type="1">U3RhdHVz</PHRASE>
<PHRASE Label="la_col_StopWord" Module="Core" Type="1">U3RvcCBXb3Jk</PHRASE>
<PHRASE Label="la_col_Subject" Module="Core" Type="1">U3ViamVjdA==</PHRASE>
@@ -252,246 +254,6 @@
<PHRASE Label="la_config_YahooApplicationId" Module="Core" Type="1">WWFob28gQXBwbGljYXRpb25JZA==</PHRASE>
<PHRASE Label="la_ConfirmDeleteExportPreset" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSBzZWxlY3RlZCBFeHBvcnQgUHJlc2V0Pw==</PHRASE>
<PHRASE Label="la_confirm_maintenance" Module="Core" Type="1">VGhlIHNlY3Rpb24gdHJlZSBtdXN0IGJlIHVwZGF0ZWQgdG8gcmVmbGVjdCB0aGUgbGF0ZXN0IGNoYW5nZXM=</PHRASE>
- <PHRASE Label="la_country_ABW" Module="Core" Type="1">QXJ1YmE=</PHRASE>
- <PHRASE Label="la_country_AFG" Module="Core" Type="1">QWZnaGFuaXN0YW4=</PHRASE>
- <PHRASE Label="la_country_AGO" Module="Core" Type="1">QW5nb2xh</PHRASE>
- <PHRASE Label="la_country_AIA" Module="Core" Type="1">QW5ndWlsbGE=</PHRASE>
- <PHRASE Label="la_country_ALB" Module="Core" Type="1">QWxiYW5pYQ==</PHRASE>
- <PHRASE Label="la_country_AND" Module="Core" Type="1">QW5kb3JyYQ==</PHRASE>
- <PHRASE Label="la_country_ANT" Module="Core" Type="1">TmV0aGVybGFuZHMgQW50aWxsZXM=</PHRASE>
- <PHRASE Label="la_country_ARE" Module="Core" Type="1">VW5pdGVkIEFyYWIgRW1pcmF0ZXM=</PHRASE>
- <PHRASE Label="la_country_ARG" Module="Core" Type="1">QXJnZW50aW5h</PHRASE>
- <PHRASE Label="la_country_ARM" Module="Core" Type="1">QXJtZW5pYQ==</PHRASE>
- <PHRASE Label="la_country_ASM" Module="Core" Type="1">QW1lcmljYW4gc2Ftb2E=</PHRASE>
- <PHRASE Label="la_country_ATA" Module="Core" Type="1">QW50YXJjdGljYQ==</PHRASE>
- <PHRASE Label="la_country_ATF" Module="Core" Type="1">RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz</PHRASE>
- <PHRASE Label="la_country_ATG" Module="Core" Type="1">QW50aWd1YSBhbmQgYmFyYnVkYQ==</PHRASE>
- <PHRASE Label="la_country_AUS" Module="Core" Type="1">QXVzdHJhbGlh</PHRASE>
- <PHRASE Label="la_country_AUT" Module="Core" Type="1">QXVzdHJpYQ==</PHRASE>
- <PHRASE Label="la_country_AZE" Module="Core" Type="1">QXplcmJhaWphbg==</PHRASE>
- <PHRASE Label="la_country_BDI" Module="Core" Type="1">QnVydW5kaQ==</PHRASE>
- <PHRASE Label="la_country_BEL" Module="Core" Type="1">QmVsZ2l1bQ==</PHRASE>
- <PHRASE Label="la_country_BEN" Module="Core" Type="1">QmVuaW4=</PHRASE>
- <PHRASE Label="la_country_BFA" Module="Core" Type="1">QnVya2luYSBGYXNv</PHRASE>
- <PHRASE Label="la_country_BGD" Module="Core" Type="1">QmFuZ2xhZGVzaA==</PHRASE>
- <PHRASE Label="la_country_BGR" Module="Core" Type="1">QnVsZ2FyaWE=</PHRASE>
- <PHRASE Label="la_country_BHR" Module="Core" Type="1">QmFocmFpbg==</PHRASE>
- <PHRASE Label="la_country_BHS" Module="Core" Type="1">QmFoYW1hcw==</PHRASE>
- <PHRASE Label="la_country_BIH" Module="Core" Type="1">Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ==</PHRASE>
- <PHRASE Label="la_country_BLR" Module="Core" Type="1">QmVsYXJ1cw==</PHRASE>
- <PHRASE Label="la_country_BLZ" Module="Core" Type="1">QmVsaXpl</PHRASE>
- <PHRASE Label="la_country_BMU" Module="Core" Type="1">QmVybXVkYQ==</PHRASE>
- <PHRASE Label="la_country_BOL" Module="Core" Type="1">Qm9saXZpYQ==</PHRASE>
- <PHRASE Label="la_country_BRA" Module="Core" Type="1">QnJhemls</PHRASE>
- <PHRASE Label="la_country_BRB" Module="Core" Type="1">QmFyYmFkb3M=</PHRASE>
- <PHRASE Label="la_country_BRN" Module="Core" Type="1">QnJ1bmVpIERhcnVzc2FsYW0=</PHRASE>
- <PHRASE Label="la_country_BTN" Module="Core" Type="1">Qmh1dGFu</PHRASE>
- <PHRASE Label="la_country_BVT" Module="Core" Type="1">Qm91dmV0IElzbGFuZA==</PHRASE>
- <PHRASE Label="la_country_BWA" Module="Core" Type="1">Qm90c3dhbmE=</PHRASE>
- <PHRASE Label="la_country_CAF" Module="Core" Type="1">Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj</PHRASE>
- <PHRASE Label="la_country_CAN" Module="Core" Type="1">Q2FuYWRh</PHRASE>
- <PHRASE Label="la_country_CCK" Module="Core" Type="1">Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_CHE" Module="Core" Type="1">U3dpdHplcmxhbmQ=</PHRASE>
- <PHRASE Label="la_country_CHL" Module="Core" Type="1">Q2hpbGU=</PHRASE>
- <PHRASE Label="la_country_CHN" Module="Core" Type="1">Q2hpbmE=</PHRASE>
- <PHRASE Label="la_country_CIV" Module="Core" Type="1">Q290ZSBkJ0l2b2lyZQ==</PHRASE>
- <PHRASE Label="la_country_CMR" Module="Core" Type="1">Q2FtZXJvb24=</PHRASE>
- <PHRASE Label="la_country_COD" Module="Core" Type="1">Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk=</PHRASE>
- <PHRASE Label="la_country_COG" Module="Core" Type="1">Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m</PHRASE>
- <PHRASE Label="la_country_COK" Module="Core" Type="1">Q29vayBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_COL" Module="Core" Type="1">Q29sb21iaWE=</PHRASE>
- <PHRASE Label="la_country_COM" Module="Core" Type="1">Q29tb3Jvcw==</PHRASE>
- <PHRASE Label="la_country_CPV" Module="Core" Type="1">Q2FwZSBWZXJkZQ==</PHRASE>
- <PHRASE Label="la_country_CRI" Module="Core" Type="1">Q29zdGEgUmljYQ==</PHRASE>
- <PHRASE Label="la_country_CUB" Module="Core" Type="1">Q3ViYQ==</PHRASE>
- <PHRASE Label="la_country_CXR" Module="Core" Type="1">Q2hyaXN0bWFzIElzbGFuZA==</PHRASE>
- <PHRASE Label="la_country_CYM" Module="Core" Type="1">Q2F5bWFuIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_CYP" Module="Core" Type="1">Q3lwcnVz</PHRASE>
- <PHRASE Label="la_country_CZE" Module="Core" Type="1">Q3plY2ggUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_DEU" Module="Core" Type="1">R2VybWFueQ==</PHRASE>
- <PHRASE Label="la_country_DJI" Module="Core" Type="1">RGppYm91dGk=</PHRASE>
- <PHRASE Label="la_country_DMA" Module="Core" Type="1">RG9taW5pY2E=</PHRASE>
- <PHRASE Label="la_country_DNK" Module="Core" Type="1">RGVubWFyaw==</PHRASE>
- <PHRASE Label="la_country_DOM" Module="Core" Type="1">RG9taW5pY2FuIFJlcHVibGlj</PHRASE>
- <PHRASE Label="la_country_DZA" Module="Core" Type="1">QWxnZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_ECU" Module="Core" Type="1">RWN1YWRvcg==</PHRASE>
- <PHRASE Label="la_country_EGY" Module="Core" Type="1">RWd5cHQ=</PHRASE>
- <PHRASE Label="la_country_ERI" Module="Core" Type="1">RXJpdHJlYQ==</PHRASE>
- <PHRASE Label="la_country_ESH" Module="Core" Type="1">V2VzdGVybiBTYWhhcmE=</PHRASE>
- <PHRASE Label="la_country_ESP" Module="Core" Type="1">U3BhaW4=</PHRASE>
- <PHRASE Label="la_country_EST" Module="Core" Type="1">RXN0b25pYQ==</PHRASE>
- <PHRASE Label="la_country_ETH" Module="Core" Type="1">RXRoaW9waWE=</PHRASE>
- <PHRASE Label="la_country_FIN" Module="Core" Type="1">RmlubGFuZA==</PHRASE>
- <PHRASE Label="la_country_FJI" Module="Core" Type="1">RmlqaQ==</PHRASE>
- <PHRASE Label="la_country_FLK" Module="Core" Type="1">RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp</PHRASE>
- <PHRASE Label="la_country_FRA" Module="Core" Type="1">RnJhbmNl</PHRASE>
- <PHRASE Label="la_country_FRO" Module="Core" Type="1">RmFyb2UgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_FSM" Module="Core" Type="1">TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg==</PHRASE>
- <PHRASE Label="la_country_FXX" Module="Core" Type="1">RnJhbmNlLCBNZXRyb3BvbGl0YW4=</PHRASE>
- <PHRASE Label="la_country_GAB" Module="Core" Type="1">R2Fib24=</PHRASE>
- <PHRASE Label="la_country_GBR" Module="Core" Type="1">VW5pdGVkIEtpbmdkb20=</PHRASE>
- <PHRASE Label="la_country_GEO" Module="Core" Type="1">R2VvcmdpYQ==</PHRASE>
- <PHRASE Label="la_country_GHA" Module="Core" Type="1">R2hhbmE=</PHRASE>
- <PHRASE Label="la_country_GIB" Module="Core" Type="1">R2licmFsdGFy</PHRASE>
- <PHRASE Label="la_country_GIN" Module="Core" Type="1">R3VpbmVh</PHRASE>
- <PHRASE Label="la_country_GLP" Module="Core" Type="1">R3VhZGVsb3VwZQ==</PHRASE>
- <PHRASE Label="la_country_GMB" Module="Core" Type="1">R2FtYmlh</PHRASE>
- <PHRASE Label="la_country_GNB" Module="Core" Type="1">R3VpbmVhLUJpc3NhdQ==</PHRASE>
- <PHRASE Label="la_country_GNQ" Module="Core" Type="1">RXF1YXRvcmlhbCBHdWluZWE=</PHRASE>
- <PHRASE Label="la_country_GRC" Module="Core" Type="1">R3JlZWNl</PHRASE>
- <PHRASE Label="la_country_GRD" Module="Core" Type="1">R3JlbmFkYQ==</PHRASE>
- <PHRASE Label="la_country_GRL" Module="Core" Type="1">R3JlZW5sYW5k</PHRASE>
- <PHRASE Label="la_country_GTM" Module="Core" Type="1">R3VhdGVtYWxh</PHRASE>
- <PHRASE Label="la_country_GUF" Module="Core" Type="1">RnJlbmNoIEd1aWFuYQ==</PHRASE>
- <PHRASE Label="la_country_GUM" Module="Core" Type="1">R3VhbQ==</PHRASE>
- <PHRASE Label="la_country_GUY" Module="Core" Type="1">R3V5YW5h</PHRASE>
- <PHRASE Label="la_country_HKG" Module="Core" Type="1">SG9uZyBrb25n</PHRASE>
- <PHRASE Label="la_country_HMD" Module="Core" Type="1">SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_HND" Module="Core" Type="1">SG9uZHVyYXM=</PHRASE>
- <PHRASE Label="la_country_HRV" Module="Core" Type="1">Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep</PHRASE>
- <PHRASE Label="la_country_HTI" Module="Core" Type="1">SGFpdGk=</PHRASE>
- <PHRASE Label="la_country_HUN" Module="Core" Type="1">SHVuZ2FyeQ==</PHRASE>
- <PHRASE Label="la_country_IDN" Module="Core" Type="1">SW5kb25lc2lh</PHRASE>
- <PHRASE Label="la_country_IND" Module="Core" Type="1">SW5kaWE=</PHRASE>
- <PHRASE Label="la_country_IOT" Module="Core" Type="1">QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5</PHRASE>
- <PHRASE Label="la_country_IRL" Module="Core" Type="1">SXJlbGFuZA==</PHRASE>
- <PHRASE Label="la_country_IRN" Module="Core" Type="1">SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik=</PHRASE>
- <PHRASE Label="la_country_IRQ" Module="Core" Type="1">SXJhcQ==</PHRASE>
- <PHRASE Label="la_country_ISL" Module="Core" Type="1">SWNlbGFuZA==</PHRASE>
- <PHRASE Label="la_country_ISR" Module="Core" Type="1">SXNyYWVs</PHRASE>
- <PHRASE Label="la_country_ITA" Module="Core" Type="1">SXRhbHk=</PHRASE>
- <PHRASE Label="la_country_JAM" Module="Core" Type="1">SmFtYWljYQ==</PHRASE>
- <PHRASE Label="la_country_JOR" Module="Core" Type="1">Sm9yZGFu</PHRASE>
- <PHRASE Label="la_country_JPN" Module="Core" Type="1">SmFwYW4=</PHRASE>
- <PHRASE Label="la_country_KAZ" Module="Core" Type="1">S2F6YWtoc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_KEN" Module="Core" Type="1">S2VueWE=</PHRASE>
- <PHRASE Label="la_country_KGZ" Module="Core" Type="1">S3lyZ3l6c3Rhbg==</PHRASE>
- <PHRASE Label="la_country_KHM" Module="Core" Type="1">Q2FtYm9kaWE=</PHRASE>
- <PHRASE Label="la_country_KIR" Module="Core" Type="1">S2lyaWJhdGk=</PHRASE>
- <PHRASE Label="la_country_KNA" Module="Core" Type="1">U2FpbnQgS2l0dHMgYW5kIE5ldmlz</PHRASE>
- <PHRASE Label="la_country_KOR" Module="Core" Type="1">S29yZWEsIFJlcHVibGljIG9m</PHRASE>
- <PHRASE Label="la_country_KWT" Module="Core" Type="1">S3V3YWl0</PHRASE>
- <PHRASE Label="la_country_LAO" Module="Core" Type="1">TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_LBN" Module="Core" Type="1">TGViYW5vbg==</PHRASE>
- <PHRASE Label="la_country_LBR" Module="Core" Type="1">TGliZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_LBY" Module="Core" Type="1">TGlieWFuIEFyYWIgSmFtYWhpcml5YQ==</PHRASE>
- <PHRASE Label="la_country_LCA" Module="Core" Type="1">U2FpbnQgTHVjaWE=</PHRASE>
- <PHRASE Label="la_country_LIE" Module="Core" Type="1">TGllY2h0ZW5zdGVpbg==</PHRASE>
- <PHRASE Label="la_country_LKA" Module="Core" Type="1">U3JpIGxhbmth</PHRASE>
- <PHRASE Label="la_country_LSO" Module="Core" Type="1">TGVzb3Robw==</PHRASE>
- <PHRASE Label="la_country_LTU" Module="Core" Type="1">TGl0aHVhbmlh</PHRASE>
- <PHRASE Label="la_country_LUX" Module="Core" Type="1">THV4ZW1ib3VyZw==</PHRASE>
- <PHRASE Label="la_country_LVA" Module="Core" Type="1">TGF0dmlh</PHRASE>
- <PHRASE Label="la_country_MAC" Module="Core" Type="1">TWFjYXU=</PHRASE>
- <PHRASE Label="la_country_MAR" Module="Core" Type="1">TW9yb2Njbw==</PHRASE>
- <PHRASE Label="la_country_MCO" Module="Core" Type="1">TW9uYWNv</PHRASE>
- <PHRASE Label="la_country_MDA" Module="Core" Type="1">TW9sZG92YSwgUmVwdWJsaWMgb2Y=</PHRASE>
- <PHRASE Label="la_country_MDG" Module="Core" Type="1">TWFkYWdhc2Nhcg==</PHRASE>
- <PHRASE Label="la_country_MDV" Module="Core" Type="1">TWFsZGl2ZXM=</PHRASE>
- <PHRASE Label="la_country_MEX" Module="Core" Type="1">TWV4aWNv</PHRASE>
- <PHRASE Label="la_country_MHL" Module="Core" Type="1">TWFyc2hhbGwgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_MKD" Module="Core" Type="1">TWFjZWRvbmlh</PHRASE>
- <PHRASE Label="la_country_MLI" Module="Core" Type="1">TWFsaQ==</PHRASE>
- <PHRASE Label="la_country_MLT" Module="Core" Type="1">TWFsdGE=</PHRASE>
- <PHRASE Label="la_country_MMR" Module="Core" Type="1">TXlhbm1hcg==</PHRASE>
- <PHRASE Label="la_country_MNG" Module="Core" Type="1">TW9uZ29saWE=</PHRASE>
- <PHRASE Label="la_country_MNP" Module="Core" Type="1">Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_MOZ" Module="Core" Type="1">TW96YW1iaXF1ZQ==</PHRASE>
- <PHRASE Label="la_country_MRT" Module="Core" Type="1">TWF1cml0YW5pYQ==</PHRASE>
- <PHRASE Label="la_country_MSR" Module="Core" Type="1">TW9udHNlcnJhdA==</PHRASE>
- <PHRASE Label="la_country_MTQ" Module="Core" Type="1">TWFydGluaXF1ZQ==</PHRASE>
- <PHRASE Label="la_country_MUS" Module="Core" Type="1">TWF1cml0aXVz</PHRASE>
- <PHRASE Label="la_country_MWI" Module="Core" Type="1">TWFsYXdp</PHRASE>
- <PHRASE Label="la_country_MYS" Module="Core" Type="1">TWFsYXlzaWE=</PHRASE>
- <PHRASE Label="la_country_MYT" Module="Core" Type="1">TWF5b3R0ZQ==</PHRASE>
- <PHRASE Label="la_country_NAM" Module="Core" Type="1">TmFtaWJpYQ==</PHRASE>
- <PHRASE Label="la_country_NCL" Module="Core" Type="1">TmV3IENhbGVkb25pYQ==</PHRASE>
- <PHRASE Label="la_country_NER" Module="Core" Type="1">TmlnZXI=</PHRASE>
- <PHRASE Label="la_country_NFK" Module="Core" Type="1">Tm9yZm9sayBJc2xhbmQ=</PHRASE>
- <PHRASE Label="la_country_NGA" Module="Core" Type="1">TmlnZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_NIC" Module="Core" Type="1">TmljYXJhZ3Vh</PHRASE>
- <PHRASE Label="la_country_NIU" Module="Core" Type="1">Tml1ZQ==</PHRASE>
- <PHRASE Label="la_country_NLD" Module="Core" Type="1">TmV0aGVybGFuZHM=</PHRASE>
- <PHRASE Label="la_country_NOR" Module="Core" Type="1">Tm9yd2F5</PHRASE>
- <PHRASE Label="la_country_NPL" Module="Core" Type="1">TmVwYWw=</PHRASE>
- <PHRASE Label="la_country_NRU" Module="Core" Type="1">TmF1cnU=</PHRASE>
- <PHRASE Label="la_country_NZL" Module="Core" Type="1">TmV3IFplYWxhbmQ=</PHRASE>
- <PHRASE Label="la_country_OMN" Module="Core" Type="1">T21hbg==</PHRASE>
- <PHRASE Label="la_country_PAK" Module="Core" Type="1">UGFraXN0YW4=</PHRASE>
- <PHRASE Label="la_country_PAN" Module="Core" Type="1">UGFuYW1h</PHRASE>
- <PHRASE Label="la_country_PCN" Module="Core" Type="1">UGl0Y2Fpcm4=</PHRASE>
- <PHRASE Label="la_country_PER" Module="Core" Type="1">UGVydQ==</PHRASE>
- <PHRASE Label="la_country_PHL" Module="Core" Type="1">UGhpbGlwcGluZXM=</PHRASE>
- <PHRASE Label="la_country_PLW" Module="Core" Type="1">UGFsYXU=</PHRASE>
- <PHRASE Label="la_country_PNG" Module="Core" Type="1">UGFwdWEgTmV3IEd1aW5lYQ==</PHRASE>
- <PHRASE Label="la_country_POL" Module="Core" Type="1">UG9sYW5k</PHRASE>
- <PHRASE Label="la_country_PRI" Module="Core" Type="1">UHVlcnRvIFJpY28=</PHRASE>
- <PHRASE Label="la_country_PRK" Module="Core" Type="1">S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y=</PHRASE>
- <PHRASE Label="la_country_PRT" Module="Core" Type="1">UG9ydHVnYWw=</PHRASE>
- <PHRASE Label="la_country_PRY" Module="Core" Type="1">UGFyYWd1YXk=</PHRASE>
- <PHRASE Label="la_country_PSE" Module="Core" Type="1">UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA==</PHRASE>
- <PHRASE Label="la_country_PYF" Module="Core" Type="1">RnJlbmNoIFBvbHluZXNpYQ==</PHRASE>
- <PHRASE Label="la_country_QAT" Module="Core" Type="1">UWF0YXI=</PHRASE>
- <PHRASE Label="la_country_REU" Module="Core" Type="1">UmV1bmlvbg==</PHRASE>
- <PHRASE Label="la_country_ROU" Module="Core" Type="1">Um9tYW5pYQ==</PHRASE>
- <PHRASE Label="la_country_RUS" Module="Core" Type="1">UnVzc2lhbiBGZWRlcmF0aW9u</PHRASE>
- <PHRASE Label="la_country_RWA" Module="Core" Type="1">UndhbmRh</PHRASE>
- <PHRASE Label="la_country_SAU" Module="Core" Type="1">U2F1ZGkgQXJhYmlh</PHRASE>
- <PHRASE Label="la_country_SDN" Module="Core" Type="1">U3VkYW4=</PHRASE>
- <PHRASE Label="la_country_SEN" Module="Core" Type="1">U2VuZWdhbA==</PHRASE>
- <PHRASE Label="la_country_SGP" Module="Core" Type="1">U2luZ2Fwb3Jl</PHRASE>
- <PHRASE Label="la_country_SGS" Module="Core" Type="1">U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_SHN" Module="Core" Type="1">U3QuIGhlbGVuYQ==</PHRASE>
- <PHRASE Label="la_country_SJM" Module="Core" Type="1">U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_SLB" Module="Core" Type="1">U29sb21vbiBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_SLE" Module="Core" Type="1">U2llcnJhIExlb25l</PHRASE>
- <PHRASE Label="la_country_SLV" Module="Core" Type="1">RWwgU2FsdmFkb3I=</PHRASE>
- <PHRASE Label="la_country_SMR" Module="Core" Type="1">U2FuIE1hcmlubw==</PHRASE>
- <PHRASE Label="la_country_SOM" Module="Core" Type="1">U29tYWxpYQ==</PHRASE>
- <PHRASE Label="la_country_SPM" Module="Core" Type="1">U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24=</PHRASE>
- <PHRASE Label="la_country_STP" Module="Core" Type="1">U2FvIFRvbWUgYW5kIFByaW5jaXBl</PHRASE>
- <PHRASE Label="la_country_SUR" Module="Core" Type="1">U3VyaW5hbWU=</PHRASE>
- <PHRASE Label="la_country_SVK" Module="Core" Type="1">U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk=</PHRASE>
- <PHRASE Label="la_country_SVN" Module="Core" Type="1">U2xvdmVuaWE=</PHRASE>
- <PHRASE Label="la_country_SWE" Module="Core" Type="1">U3dlZGVu</PHRASE>
- <PHRASE Label="la_country_SWZ" Module="Core" Type="1">U3dhemlsYW5k</PHRASE>
- <PHRASE Label="la_country_SYC" Module="Core" Type="1">U2V5Y2hlbGxlcw==</PHRASE>
- <PHRASE Label="la_country_SYR" Module="Core" Type="1">U3lyaWFuIEFyYWIgUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_TCA" Module="Core" Type="1">VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_TCD" Module="Core" Type="1">Q2hhZA==</PHRASE>
- <PHRASE Label="la_country_TGO" Module="Core" Type="1">VG9nbw==</PHRASE>
- <PHRASE Label="la_country_THA" Module="Core" Type="1">VGhhaWxhbmQ=</PHRASE>
- <PHRASE Label="la_country_TJK" Module="Core" Type="1">VGFqaWtpc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_TKL" Module="Core" Type="1">VG9rZWxhdQ==</PHRASE>
- <PHRASE Label="la_country_TKM" Module="Core" Type="1">VHVya21lbmlzdGFu</PHRASE>
- <PHRASE Label="la_country_TLS" Module="Core" Type="1">RWFzdCBUaW1vcg==</PHRASE>
- <PHRASE Label="la_country_TON" Module="Core" Type="1">VG9uZ2E=</PHRASE>
- <PHRASE Label="la_country_TTO" Module="Core" Type="1">VHJpbmlkYWQgYW5kIFRvYmFnbw==</PHRASE>
- <PHRASE Label="la_country_TUN" Module="Core" Type="1">VHVuaXNpYQ==</PHRASE>
- <PHRASE Label="la_country_TUR" Module="Core" Type="1">VHVya2V5</PHRASE>
- <PHRASE Label="la_country_TUV" Module="Core" Type="1">VHV2YWx1</PHRASE>
- <PHRASE Label="la_country_TWN" Module="Core" Type="1">VGFpd2Fu</PHRASE>
- <PHRASE Label="la_country_TZA" Module="Core" Type="1">VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg==</PHRASE>
- <PHRASE Label="la_country_UGA" Module="Core" Type="1">VWdhbmRh</PHRASE>
- <PHRASE Label="la_country_UKR" Module="Core" Type="1">VWtyYWluZQ==</PHRASE>
- <PHRASE Label="la_country_UMI" Module="Core" Type="1">VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_URY" Module="Core" Type="1">VXJ1Z3VheQ==</PHRASE>
- <PHRASE Label="la_country_USA" Module="Core" Type="1">VW5pdGVkIFN0YXRlcw==</PHRASE>
- <PHRASE Label="la_country_UZB" Module="Core" Type="1">VXpiZWtpc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_VAT" Module="Core" Type="1">VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk=</PHRASE>
- <PHRASE Label="la_country_VCT" Module="Core" Type="1">U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM=</PHRASE>
- <PHRASE Label="la_country_VEN" Module="Core" Type="1">VmVuZXp1ZWxh</PHRASE>
- <PHRASE Label="la_country_VGB" Module="Core" Type="1">VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp</PHRASE>
- <PHRASE Label="la_country_VIR" Module="Core" Type="1">VmlyZ2luIElzbGFuZHMgKFUuUy4p</PHRASE>
- <PHRASE Label="la_country_VNM" Module="Core" Type="1">VmlldG5hbQ==</PHRASE>
- <PHRASE Label="la_country_VUT" Module="Core" Type="1">VmFudWF0dQ==</PHRASE>
- <PHRASE Label="la_country_WLF" Module="Core" Type="1">V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_WSM" Module="Core" Type="1">U2Ftb2E=</PHRASE>
- <PHRASE Label="la_country_YEM" Module="Core" Type="1">WWVtZW4=</PHRASE>
- <PHRASE Label="la_country_YUG" Module="Core" Type="1">WXVnb3NsYXZpYQ==</PHRASE>
- <PHRASE Label="la_country_ZAF" Module="Core" Type="1">U291dGggQWZyaWNh</PHRASE>
- <PHRASE Label="la_country_ZMB" Module="Core" Type="1">WmFtYmlh</PHRASE>
- <PHRASE Label="la_country_ZWE" Module="Core" Type="1">WmltYmFid2U=</PHRASE>
<PHRASE Label="la_DataGrid1" Module="Core" Type="1">RGF0YSBHcmlkcw==</PHRASE>
<PHRASE Label="la_DataGrid2" Module="Core" Type="1">RGF0YSBHcmlkcyAy</PHRASE>
<PHRASE Label="la_days" Module="Core" Type="1">ZGF5cw==</PHRASE>
@@ -761,11 +523,13 @@
<PHRASE Label="la_fld_SelectorId" Module="Core" Type="1">U2VsZWN0b3IgSUQ=</PHRASE>
<PHRASE Label="la_fld_SelectorName" Module="Core" Type="1">U2VsZWN0b3IgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SessionLogId" Module="Core" Type="1">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
+ <PHRASE Label="la_fld_ShortIsoCode" Module="Core" Type="1">U2hvcnQgSVNPIENvZGU=</PHRASE>
<PHRASE Label="la_fld_SimpleSearch" Module="Core" Type="1">U2ltcGxlIFNlYXJjaA==</PHRASE>
<PHRASE Label="la_fld_SkinName" Module="Core" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SkipFirstRow" Module="Core" Type="1">U2tpcCBGaXJzdCBSb3c=</PHRASE>
<PHRASE Label="la_fld_SortValues" Module="Core" Type="1">U29ydCBWYWx1ZXM=</PHRASE>
<PHRASE Label="la_fld_State" Module="Core" Type="1">U3RhdGU=</PHRASE>
+ <PHRASE Label="la_fld_StateCountry" Module="Core" Type="1">U3RhdGUgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_fld_Status" Module="Core" Type="1">U3RhdHVz</PHRASE>
<PHRASE Label="la_fld_StopWord" Module="Core" Type="1">U3RvcCBXb3Jk</PHRASE>
<PHRASE Label="la_fld_StylesheetId" Module="Core" Type="1">U3R5bGVzaGVldCBJRA==</PHRASE>
@@ -885,6 +649,7 @@
<PHRASE Label="la_opt_Colon" Module="Core" Type="1">Q29sb24=</PHRASE>
<PHRASE Label="la_opt_Comma" Module="Core" Type="1">Q29tbWE=</PHRASE>
<PHRASE Label="la_opt_CommentText" Module="Core" Type="1">Q29tbWVudCBUZXh0</PHRASE>
+ <PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
@@ -1141,71 +906,6 @@
<PHRASE Label="la_Show" Module="Core" Type="1">U2hvdw==</PHRASE>
<PHRASE Label="la_SQLAffectedRows" Module="Core" Type="1">QWZmZWN0ZWQgcm93cw==</PHRASE>
<PHRASE Label="la_SQLRuntime" Module="Core" Type="1">RXhlY3V0ZWQgaW46</PHRASE>
- <PHRASE Label="la_state_AB" Module="Core" Type="1">QWxiZXJ0YQ==</PHRASE>
- <PHRASE Label="la_state_AK" Module="Core" Type="1">QWxhc2th</PHRASE>
- <PHRASE Label="la_state_AL" Module="Core" Type="1">QWxhYmFtYQ==</PHRASE>
- <PHRASE Label="la_state_AR" Module="Core" Type="1">QXJrYW5zYXM=</PHRASE>
- <PHRASE Label="la_state_AZ" Module="Core" Type="1">QXJpem9uYQ==</PHRASE>
- <PHRASE Label="la_state_BC" Module="Core" Type="1">QnJpdGlzaCBDb2x1bWJpYQ==</PHRASE>
- <PHRASE Label="la_state_CA" Module="Core" Type="1">Q2FsaWZvcm5pYQ==</PHRASE>
- <PHRASE Label="la_state_CO" Module="Core" Type="1">Q29sb3JhZG8=</PHRASE>
- <PHRASE Label="la_state_CT" Module="Core" Type="1">Q29ubmVjdGljdXQ=</PHRASE>
- <PHRASE Label="la_state_DC" Module="Core" Type="1">RGlzdHJpY3Qgb2YgQ29sdW1iaWE=</PHRASE>
- <PHRASE Label="la_state_DE" Module="Core" Type="1">RGVsYXdhcmU=</PHRASE>
- <PHRASE Label="la_state_FL" Module="Core" Type="1">RmxvcmlkYQ==</PHRASE>
- <PHRASE Label="la_state_GA" Module="Core" Type="1">R2VvcmdpYQ==</PHRASE>
- <PHRASE Label="la_state_HI" Module="Core" Type="1">SGF3YWlp</PHRASE>
- <PHRASE Label="la_state_IA" Module="Core" Type="1">SW93YQ==</PHRASE>
- <PHRASE Label="la_state_ID" Module="Core" Type="1">SWRhaG8=</PHRASE>
- <PHRASE Label="la_state_IL" Module="Core" Type="1">SWxsaW5vaXM=</PHRASE>
- <PHRASE Label="la_state_IN" Module="Core" Type="1">SW5kaWFuYQ==</PHRASE>
- <PHRASE Label="la_state_KS" Module="Core" Type="1">S2Fuc2Fz</PHRASE>
- <PHRASE Label="la_state_KY" Module="Core" Type="1">S2VudHVja3k=</PHRASE>
- <PHRASE Label="la_state_LA" Module="Core" Type="1">TG91aXNpYW5h</PHRASE>
- <PHRASE Label="la_state_MA" Module="Core" Type="1">TWFzc2FjaHVzZXR0cw==</PHRASE>
- <PHRASE Label="la_state_MB" Module="Core" Type="1">TWFuaXRvYmE=</PHRASE>
- <PHRASE Label="la_state_MD" Module="Core" Type="1">TWFyeWxhbmQ=</PHRASE>
- <PHRASE Label="la_state_ME" Module="Core" Type="1">TWFpbmU=</PHRASE>
- <PHRASE Label="la_state_MI" Module="Core" Type="1">TWljaGlnYW4=</PHRASE>
- <PHRASE Label="la_state_MN" Module="Core" Type="1">TWlubmVzb3Rh</PHRASE>
- <PHRASE Label="la_state_MO" Module="Core" Type="1">TWlzc291cmk=</PHRASE>
- <PHRASE Label="la_state_MS" Module="Core" Type="1">TWlzc2lzc2lwcGk=</PHRASE>
- <PHRASE Label="la_state_MT" Module="Core" Type="1">TW9udGFuYQ==</PHRASE>
- <PHRASE Label="la_state_NB" Module="Core" Type="1">TmV3IEJydW5zd2ljaw==</PHRASE>
- <PHRASE Label="la_state_NC" Module="Core" Type="1">Tm9ydGggQ2Fyb2xpbmE=</PHRASE>
- <PHRASE Label="la_state_ND" Module="Core" Type="1">Tm9ydGggRGFrb3Rh</PHRASE>
- <PHRASE Label="la_state_NE" Module="Core" Type="1">TmVicmFza2E=</PHRASE>
- <PHRASE Label="la_state_NH" Module="Core" Type="1">TmV3IEhhbXBzaGlyZQ==</PHRASE>
- <PHRASE Label="la_state_NJ" Module="Core" Type="1">TmV3IEplcnNleQ==</PHRASE>
- <PHRASE Label="la_state_NL" Module="Core" Type="1">TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg==</PHRASE>
- <PHRASE Label="la_state_NM" Module="Core" Type="1">TmV3IE1leGljbw==</PHRASE>
- <PHRASE Label="la_state_NS" Module="Core" Type="1">Tm92YSBTY290aWE=</PHRASE>
- <PHRASE Label="la_state_NT" Module="Core" Type="1">Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz</PHRASE>
- <PHRASE Label="la_state_NU" Module="Core" Type="1">TnVuYXZ1dA==</PHRASE>
- <PHRASE Label="la_state_NV" Module="Core" Type="1">TmV2YWRh</PHRASE>
- <PHRASE Label="la_state_NY" Module="Core" Type="1">TmV3IFlvcms=</PHRASE>
- <PHRASE Label="la_state_OH" Module="Core" Type="1">T2hpbw==</PHRASE>
- <PHRASE Label="la_state_OK" Module="Core" Type="1">T2tsYWhvbWE=</PHRASE>
- <PHRASE Label="la_state_ON" Module="Core" Type="1">T250YXJpbw==</PHRASE>
- <PHRASE Label="la_state_OR" Module="Core" Type="1">T3JlZ29u</PHRASE>
- <PHRASE Label="la_state_PA" Module="Core" Type="1">UGVubnN5bHZhbmlh</PHRASE>
- <PHRASE Label="la_state_PE" Module="Core" Type="1">UHJpbmNlIEVkd2FyZCBJc2xhbmQ=</PHRASE>
- <PHRASE Label="la_state_PR" Module="Core" Type="1">UHVlcnRvIFJpY28=</PHRASE>
- <PHRASE Label="la_state_QC" Module="Core" Type="1">UXVlYmVj</PHRASE>
- <PHRASE Label="la_state_RI" Module="Core" Type="1">UmhvZGUgSXNsYW5k</PHRASE>
- <PHRASE Label="la_state_SC" Module="Core" Type="1">U291dGggQ2Fyb2xpbmE=</PHRASE>
- <PHRASE Label="la_state_SD" Module="Core" Type="1">U291dGggRGFrb3Rh</PHRASE>
- <PHRASE Label="la_state_SK" Module="Core" Type="1">U2Fza2F0Y2hld2Fu</PHRASE>
- <PHRASE Label="la_state_TN" Module="Core" Type="1">VGVubmVzc2Vl</PHRASE>
- <PHRASE Label="la_state_TX" Module="Core" Type="1">VGV4YXM=</PHRASE>
- <PHRASE Label="la_state_UT" Module="Core" Type="1">VXRhaA==</PHRASE>
- <PHRASE Label="la_state_VA" Module="Core" Type="1">VmlyZ2luaWE=</PHRASE>
- <PHRASE Label="la_state_VT" Module="Core" Type="1">VmVybW9udA==</PHRASE>
- <PHRASE Label="la_state_WA" Module="Core" Type="1">V2FzaGluZ3Rvbg==</PHRASE>
- <PHRASE Label="la_state_WI" Module="Core" Type="1">V2lzY29uc2lu</PHRASE>
- <PHRASE Label="la_state_WV" Module="Core" Type="1">V2VzdCBWaXJnaW5pYQ==</PHRASE>
- <PHRASE Label="la_state_WY" Module="Core" Type="1">V3lvbWluZw==</PHRASE>
- <PHRASE Label="la_state_YT" Module="Core" Type="1">WXVrb24=</PHRASE>
<PHRASE Label="la_step" Module="Core" Type="1">U3RlcA==</PHRASE>
<PHRASE Label="la_StyleDefinition" Module="Core" Type="1">RGVmaW5pdGlvbg==</PHRASE>
<PHRASE Label="la_StylePreview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
@@ -1341,6 +1041,7 @@
<PHRASE Label="la_Text_View" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_title_AddingAgent" Module="Core" Type="1">QWRkaW5nIEFnZW50</PHRASE>
<PHRASE Label="la_title_AddingBanRule" Module="Core" Type="1">QWRkaW5nIEJhbiBSdWxl</PHRASE>
+ <PHRASE Label="la_title_AddingCountryState" Module="Core" Type="1">QWRkaW5nIENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_title_addingCustom" Module="Core" Type="1">QWRkaW5nIEN1c3RvbSBGaWVsZA==</PHRASE>
<PHRASE Label="la_title_AddingFile" Module="Core" Type="1">QWRkaW5nIEZpbGU=</PHRASE>
<PHRASE Label="la_title_AddingMailingList" Module="Core" Type="1">QWRkaW5nIE1haWxpbmcgTGlzdA==</PHRASE>
@@ -1379,12 +1080,14 @@
<PHRASE Label="la_title_ColumnPicker" Module="Core" Type="1">Q29sdW1uIFBpY2tlcg==</PHRASE>
<PHRASE Label="la_title_Configuration" Module="Core" Type="1">Q29uZmlndXJhdGlvbg==</PHRASE>
<PHRASE Label="la_Title_ContactInformation" Module="Core" Type="1">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
+ <PHRASE Label="la_title_CountryStates" Module="Core" Type="1">Q291bnRyaWVzICYgU3RhdGVz</PHRASE>
<PHRASE Label="la_title_CSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydA==</PHRASE>
<PHRASE Label="la_title_Custom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_title_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
<PHRASE Label="la_title_EditingAgent" Module="Core" Type="1">RWRpdGluZyBBZ2VudA==</PHRASE>
<PHRASE Label="la_title_EditingBanRule" Module="Core" Type="1">RWRpdGluZyBCYW4gUnVsZQ==</PHRASE>
<PHRASE Label="la_title_EditingChangeLog" Module="Core" Type="1">RWRpdGluZyBDaGFuZ2VzIExvZw==</PHRASE>
+ <PHRASE Label="la_title_EditingCountryState" Module="Core" Type="1">RWRpdGluZyBDb3VudHJ5L1N0YXRl</PHRASE>
<PHRASE Label="la_title_EditingEmailEvent" Module="Core" Type="1">RWRpdGluZyBFbWFpbCBFdmVudA==</PHRASE>
<PHRASE Label="la_title_EditingFile" Module="Core" Type="1">RWRpdGluZyBGaWxl</PHRASE>
<PHRASE Label="la_title_EditingMembership" Module="Core" Type="1">RWRpdGluZyBNZW1iZXJzaGlw</PHRASE>
@@ -1509,6 +1212,7 @@
<PHRASE Label="la_ToolTip_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</PHRASE>
<PHRASE Label="la_ToolTip_NewBaseStyle" Module="Core" Type="1">TmV3IEJhc2UgU3R5bGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewBlockStyle" Module="Core" Type="1">TmV3IEJsb2NrIFN0eWxl</PHRASE>
+ <PHRASE Label="la_ToolTip_NewCountryState" Module="Core" Type="1">TmV3IENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewGroup" Module="Core" Type="1">TmV3IEdyb3Vw</PHRASE>
<PHRASE Label="la_ToolTip_newlabel" Module="Core" Type="1">TmV3IGxhYmVs</PHRASE>
<PHRASE Label="la_ToolTip_NewLanguage" Module="Core" Type="1">TmV3IExhbmd1YWdl</PHRASE>
@@ -1688,5 +1392,314 @@
<EVENT MessageType="html" Event="USER.VALIDATE" Type="0">U3ViamVjdDogVXNlciBSZWdpc3RyYXRpb24gaXMgVmFsaWRhdGVkCgpXZWxjb21lIHRvIEluLXBvcnRhbCE8YnIvPjxici8+DQoNCllvdXIgdXNlciByZWdpc3RyYXRpb24gaGFzIGJlZW4gYXBwcm92ZWQuIFlvdSBjYW4gbG9naW4gbm93IDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVybC8+Ij48aW5wMjptX0Jhc2VVcmwvPjwvYT4gdXNpbmcgdGhlIGZvbGxvd2luZyBpbmZvcm1hdGlvbjo8YnIvPjxici8+DQoNCj09PT09PT09PT09PT09PT09PTxici8+DQpVc2VybmFtZTogIjxpbnAyOnVfRmllbGQgbmFtZT0iTG9naW4iLz4iPGJyLz4NClBhc3N3b3JkOiAiPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiI8YnIvPg0KPT09PT09PT09PT09PT09PT09PGJyLz48YnIvPg0K</EVENT>
<EVENT MessageType="html" Event="USER.VALIDATE" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uIGlzIFZhbGlkYXRlZAoKVXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgaGFzIGJlZW4gdmFsaWRhdGVkLg==</EVENT>
</EVENTS>
+ <COUNTRIES>
+ <COUNTRY Iso="ABW" Translation="QXJ1YmE="/>
+ <COUNTRY Iso="AFG" Translation="QWZnaGFuaXN0YW4="/>
+ <COUNTRY Iso="AGO" Translation="QW5nb2xh"/>
+ <COUNTRY Iso="AIA" Translation="QW5ndWlsbGE="/>
+ <COUNTRY Iso="ALB" Translation="QWxiYW5pYQ=="/>
+ <COUNTRY Iso="AND" Translation="QW5kb3JyYQ=="/>
+ <COUNTRY Iso="ANT" Translation="TmV0aGVybGFuZHMgQW50aWxsZXM="/>
+ <COUNTRY Iso="ARE" Translation="VW5pdGVkIEFyYWIgRW1pcmF0ZXM="/>
+ <COUNTRY Iso="ARG" Translation="QXJnZW50aW5h"/>
+ <COUNTRY Iso="ARM" Translation="QXJtZW5pYQ=="/>
+ <COUNTRY Iso="ASM" Translation="QW1lcmljYW4gc2Ftb2E="/>
+ <COUNTRY Iso="ATA" Translation="QW50YXJjdGljYQ=="/>
+ <COUNTRY Iso="ATF" Translation="RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz"/>
+ <COUNTRY Iso="ATG" Translation="QW50aWd1YSBhbmQgYmFyYnVkYQ=="/>
+ <COUNTRY Iso="AUS" Translation="QXVzdHJhbGlh"/>
+ <COUNTRY Iso="AUT" Translation="QXVzdHJpYQ=="/>
+ <COUNTRY Iso="AZE" Translation="QXplcmJhaWphbg=="/>
+ <COUNTRY Iso="BDI" Translation="QnVydW5kaQ=="/>
+ <COUNTRY Iso="BEL" Translation="QmVsZ2l1bQ=="/>
+ <COUNTRY Iso="BEN" Translation="QmVuaW4="/>
+ <COUNTRY Iso="BFA" Translation="QnVya2luYSBGYXNv"/>
+ <COUNTRY Iso="BGD" Translation="QmFuZ2xhZGVzaA=="/>
+ <COUNTRY Iso="BGR" Translation="QnVsZ2FyaWE="/>
+ <COUNTRY Iso="BHR" Translation="QmFocmFpbg=="/>
+ <COUNTRY Iso="BHS" Translation="QmFoYW1hcw=="/>
+ <COUNTRY Iso="BIH" Translation="Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ=="/>
+ <COUNTRY Iso="BLR" Translation="QmVsYXJ1cw=="/>
+ <COUNTRY Iso="BLZ" Translation="QmVsaXpl"/>
+ <COUNTRY Iso="BMU" Translation="QmVybXVkYQ=="/>
+ <COUNTRY Iso="BOL" Translation="Qm9saXZpYQ=="/>
+ <COUNTRY Iso="BRA" Translation="QnJhemls"/>
+ <COUNTRY Iso="BRB" Translation="QmFyYmFkb3M="/>
+ <COUNTRY Iso="BRN" Translation="QnJ1bmVpIERhcnVzc2FsYW0="/>
+ <COUNTRY Iso="BTN" Translation="Qmh1dGFu"/>
+ <COUNTRY Iso="BVT" Translation="Qm91dmV0IElzbGFuZA=="/>
+ <COUNTRY Iso="BWA" Translation="Qm90c3dhbmE="/>
+ <COUNTRY Iso="CAF" Translation="Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj"/>
+ <COUNTRY Iso="CAN" Translation="Q2FuYWRh">
+ <STATE Iso="AB" Translation="QWxiZXJ0YQ=="/>
+ <STATE Iso="BC" Translation="QnJpdGlzaCBDb2x1bWJpYQ=="/>
+ <STATE Iso="MB" Translation="TWFuaXRvYmE="/>
+ <STATE Iso="NB" Translation="TmV3IEJydW5zd2ljaw=="/>
+ <STATE Iso="NL" Translation="TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg=="/>
+ <STATE Iso="NS" Translation="Tm92YSBTY290aWE="/>
+ <STATE Iso="NT" Translation="Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz"/>
+ <STATE Iso="NU" Translation="TnVuYXZ1dA=="/>
+ <STATE Iso="ON" Translation="T250YXJpbw=="/>
+ <STATE Iso="PE" Translation="UHJpbmNlIEVkd2FyZCBJc2xhbmQ="/>
+ <STATE Iso="QC" Translation="UXVlYmVj"/>
+ <STATE Iso="SK" Translation="U2Fza2F0Y2hld2Fu"/>
+ <STATE Iso="YT" Translation="WXVrb24="/>
+ </COUNTRY>
+ <COUNTRY Iso="CCK" Translation="Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM="/>
+ <COUNTRY Iso="CHE" Translation="U3dpdHplcmxhbmQ="/>
+ <COUNTRY Iso="CHL" Translation="Q2hpbGU="/>
+ <COUNTRY Iso="CHN" Translation="Q2hpbmE="/>
+ <COUNTRY Iso="CIV" Translation="Q290ZSBkJ0l2b2lyZQ=="/>
+ <COUNTRY Iso="CMR" Translation="Q2FtZXJvb24="/>
+ <COUNTRY Iso="COD" Translation="Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk="/>
+ <COUNTRY Iso="COG" Translation="Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m"/>
+ <COUNTRY Iso="COK" Translation="Q29vayBJc2xhbmRz"/>
+ <COUNTRY Iso="COL" Translation="Q29sb21iaWE="/>
+ <COUNTRY Iso="COM" Translation="Q29tb3Jvcw=="/>
+ <COUNTRY Iso="CPV" Translation="Q2FwZSBWZXJkZQ=="/>
+ <COUNTRY Iso="CRI" Translation="Q29zdGEgUmljYQ=="/>
+ <COUNTRY Iso="CUB" Translation="Q3ViYQ=="/>
+ <COUNTRY Iso="CXR" Translation="Q2hyaXN0bWFzIElzbGFuZA=="/>
+ <COUNTRY Iso="CYM" Translation="Q2F5bWFuIElzbGFuZHM="/>
+ <COUNTRY Iso="CYP" Translation="Q3lwcnVz"/>
+ <COUNTRY Iso="CZE" Translation="Q3plY2ggUmVwdWJsaWM="/>
+ <COUNTRY Iso="DEU" Translation="R2VybWFueQ=="/>
+ <COUNTRY Iso="DJI" Translation="RGppYm91dGk="/>
+ <COUNTRY Iso="DMA" Translation="RG9taW5pY2E="/>
+ <COUNTRY Iso="DNK" Translation="RGVubWFyaw=="/>
+ <COUNTRY Iso="DOM" Translation="RG9taW5pY2FuIFJlcHVibGlj"/>
+ <COUNTRY Iso="DZA" Translation="QWxnZXJpYQ=="/>
+ <COUNTRY Iso="ECU" Translation="RWN1YWRvcg=="/>
+ <COUNTRY Iso="EGY" Translation="RWd5cHQ="/>
+ <COUNTRY Iso="ERI" Translation="RXJpdHJlYQ=="/>
+ <COUNTRY Iso="ESH" Translation="V2VzdGVybiBTYWhhcmE="/>
+ <COUNTRY Iso="ESP" Translation="U3BhaW4="/>
+ <COUNTRY Iso="EST" Translation="RXN0b25pYQ=="/>
+ <COUNTRY Iso="ETH" Translation="RXRoaW9waWE="/>
+ <COUNTRY Iso="FIN" Translation="RmlubGFuZA=="/>
+ <COUNTRY Iso="FJI" Translation="RmlqaQ=="/>
+ <COUNTRY Iso="FLK" Translation="RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp"/>
+ <COUNTRY Iso="FRA" Translation="RnJhbmNl"/>
+ <COUNTRY Iso="FRO" Translation="RmFyb2UgSXNsYW5kcw=="/>
+ <COUNTRY Iso="FSM" Translation="TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg=="/>
+ <COUNTRY Iso="FXX" Translation="RnJhbmNlLCBNZXRyb3BvbGl0YW4="/>
+ <COUNTRY Iso="GAB" Translation="R2Fib24="/>
+ <COUNTRY Iso="GBR" Translation="VW5pdGVkIEtpbmdkb20="/>
+ <COUNTRY Iso="GEO" Translation="R2VvcmdpYQ=="/>
+ <COUNTRY Iso="GHA" Translation="R2hhbmE="/>
+ <COUNTRY Iso="GIB" Translation="R2licmFsdGFy"/>
+ <COUNTRY Iso="GIN" Translation="R3VpbmVh"/>
+ <COUNTRY Iso="GLP" Translation="R3VhZGVsb3VwZQ=="/>
+ <COUNTRY Iso="GMB" Translation="R2FtYmlh"/>
+ <COUNTRY Iso="GNB" Translation="R3VpbmVhLUJpc3NhdQ=="/>
+ <COUNTRY Iso="GNQ" Translation="RXF1YXRvcmlhbCBHdWluZWE="/>
+ <COUNTRY Iso="GRC" Translation="R3JlZWNl"/>
+ <COUNTRY Iso="GRD" Translation="R3JlbmFkYQ=="/>
+ <COUNTRY Iso="GRL" Translation="R3JlZW5sYW5k"/>
+ <COUNTRY Iso="GTM" Translation="R3VhdGVtYWxh"/>
+ <COUNTRY Iso="GUF" Translation="RnJlbmNoIEd1aWFuYQ=="/>
+ <COUNTRY Iso="GUM" Translation="R3VhbQ=="/>
+ <COUNTRY Iso="GUY" Translation="R3V5YW5h"/>
+ <COUNTRY Iso="HKG" Translation="SG9uZyBrb25n"/>
+ <COUNTRY Iso="HMD" Translation="SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz"/>
+ <COUNTRY Iso="HND" Translation="SG9uZHVyYXM="/>
+ <COUNTRY Iso="HRV" Translation="Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep"/>
+ <COUNTRY Iso="HTI" Translation="SGFpdGk="/>
+ <COUNTRY Iso="HUN" Translation="SHVuZ2FyeQ=="/>
+ <COUNTRY Iso="IDN" Translation="SW5kb25lc2lh"/>
+ <COUNTRY Iso="IND" Translation="SW5kaWE="/>
+ <COUNTRY Iso="IOT" Translation="QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5"/>
+ <COUNTRY Iso="IRL" Translation="SXJlbGFuZA=="/>
+ <COUNTRY Iso="IRN" Translation="SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik="/>
+ <COUNTRY Iso="IRQ" Translation="SXJhcQ=="/>
+ <COUNTRY Iso="ISL" Translation="SWNlbGFuZA=="/>
+ <COUNTRY Iso="ISR" Translation="SXNyYWVs"/>
+ <COUNTRY Iso="ITA" Translation="SXRhbHk="/>
+ <COUNTRY Iso="JAM" Translation="SmFtYWljYQ=="/>
+ <COUNTRY Iso="JOR" Translation="Sm9yZGFu"/>
+ <COUNTRY Iso="JPN" Translation="SmFwYW4="/>
+ <COUNTRY Iso="KAZ" Translation="S2F6YWtoc3Rhbg=="/>
+ <COUNTRY Iso="KEN" Translation="S2VueWE="/>
+ <COUNTRY Iso="KGZ" Translation="S3lyZ3l6c3Rhbg=="/>
+ <COUNTRY Iso="KHM" Translation="Q2FtYm9kaWE="/>
+ <COUNTRY Iso="KIR" Translation="S2lyaWJhdGk="/>
+ <COUNTRY Iso="KNA" Translation="U2FpbnQgS2l0dHMgYW5kIE5ldmlz"/>
+ <COUNTRY Iso="KOR" Translation="S29yZWEsIFJlcHVibGljIG9m"/>
+ <COUNTRY Iso="KWT" Translation="S3V3YWl0"/>
+ <COUNTRY Iso="LAO" Translation="TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM="/>
+ <COUNTRY Iso="LBN" Translation="TGViYW5vbg=="/>
+ <COUNTRY Iso="LBR" Translation="TGliZXJpYQ=="/>
+ <COUNTRY Iso="LBY" Translation="TGlieWFuIEFyYWIgSmFtYWhpcml5YQ=="/>
+ <COUNTRY Iso="LCA" Translation="U2FpbnQgTHVjaWE="/>
+ <COUNTRY Iso="LIE" Translation="TGllY2h0ZW5zdGVpbg=="/>
+ <COUNTRY Iso="LKA" Translation="U3JpIGxhbmth"/>
+ <COUNTRY Iso="LSO" Translation="TGVzb3Robw=="/>
+ <COUNTRY Iso="LTU" Translation="TGl0aHVhbmlh"/>
+ <COUNTRY Iso="LUX" Translation="THV4ZW1ib3VyZw=="/>
+ <COUNTRY Iso="LVA" Translation="TGF0dmlh"/>
+ <COUNTRY Iso="MAC" Translation="TWFjYXU="/>
+ <COUNTRY Iso="MAR" Translation="TW9yb2Njbw=="/>
+ <COUNTRY Iso="MCO" Translation="TW9uYWNv"/>
+ <COUNTRY Iso="MDA" Translation="TW9sZG92YSwgUmVwdWJsaWMgb2Y="/>
+ <COUNTRY Iso="MDG" Translation="TWFkYWdhc2Nhcg=="/>
+ <COUNTRY Iso="MDV" Translation="TWFsZGl2ZXM="/>
+ <COUNTRY Iso="MEX" Translation="TWV4aWNv"/>
+ <COUNTRY Iso="MHL" Translation="TWFyc2hhbGwgSXNsYW5kcw=="/>
+ <COUNTRY Iso="MKD" Translation="TWFjZWRvbmlh"/>
+ <COUNTRY Iso="MLI" Translation="TWFsaQ=="/>
+ <COUNTRY Iso="MLT" Translation="TWFsdGE="/>
+ <COUNTRY Iso="MMR" Translation="TXlhbm1hcg=="/>
+ <COUNTRY Iso="MNG" Translation="TW9uZ29saWE="/>
+ <COUNTRY Iso="MNP" Translation="Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz"/>
+ <COUNTRY Iso="MOZ" Translation="TW96YW1iaXF1ZQ=="/>
+ <COUNTRY Iso="MRT" Translation="TWF1cml0YW5pYQ=="/>
+ <COUNTRY Iso="MSR" Translation="TW9udHNlcnJhdA=="/>
+ <COUNTRY Iso="MTQ" Translation="TWFydGluaXF1ZQ=="/>
+ <COUNTRY Iso="MUS" Translation="TWF1cml0aXVz"/>
+ <COUNTRY Iso="MWI" Translation="TWFsYXdp"/>
+ <COUNTRY Iso="MYS" Translation="TWFsYXlzaWE="/>
+ <COUNTRY Iso="MYT" Translation="TWF5b3R0ZQ=="/>
+ <COUNTRY Iso="NAM" Translation="TmFtaWJpYQ=="/>
+ <COUNTRY Iso="NCL" Translation="TmV3IENhbGVkb25pYQ=="/>
+ <COUNTRY Iso="NER" Translation="TmlnZXI="/>
+ <COUNTRY Iso="NFK" Translation="Tm9yZm9sayBJc2xhbmQ="/>
+ <COUNTRY Iso="NGA" Translation="TmlnZXJpYQ=="/>
+ <COUNTRY Iso="NIC" Translation="TmljYXJhZ3Vh"/>
+ <COUNTRY Iso="NIU" Translation="Tml1ZQ=="/>
+ <COUNTRY Iso="NLD" Translation="TmV0aGVybGFuZHM="/>
+ <COUNTRY Iso="NOR" Translation="Tm9yd2F5"/>
+ <COUNTRY Iso="NPL" Translation="TmVwYWw="/>
+ <COUNTRY Iso="NRU" Translation="TmF1cnU="/>
+ <COUNTRY Iso="NZL" Translation="TmV3IFplYWxhbmQ="/>
+ <COUNTRY Iso="OMN" Translation="T21hbg=="/>
+ <COUNTRY Iso="PAK" Translation="UGFraXN0YW4="/>
+ <COUNTRY Iso="PAN" Translation="UGFuYW1h"/>
+ <COUNTRY Iso="PCN" Translation="UGl0Y2Fpcm4="/>
+ <COUNTRY Iso="PER" Translation="UGVydQ=="/>
+ <COUNTRY Iso="PHL" Translation="UGhpbGlwcGluZXM="/>
+ <COUNTRY Iso="PLW" Translation="UGFsYXU="/>
+ <COUNTRY Iso="PNG" Translation="UGFwdWEgTmV3IEd1aW5lYQ=="/>
+ <COUNTRY Iso="POL" Translation="UG9sYW5k"/>
+ <COUNTRY Iso="PRI" Translation="UHVlcnRvIFJpY28="/>
+ <COUNTRY Iso="PRK" Translation="S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y="/>
+ <COUNTRY Iso="PRT" Translation="UG9ydHVnYWw="/>
+ <COUNTRY Iso="PRY" Translation="UGFyYWd1YXk="/>
+ <COUNTRY Iso="PSE" Translation="UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA=="/>
+ <COUNTRY Iso="PYF" Translation="RnJlbmNoIFBvbHluZXNpYQ=="/>
+ <COUNTRY Iso="QAT" Translation="UWF0YXI="/>
+ <COUNTRY Iso="REU" Translation="UmV1bmlvbg=="/>
+ <COUNTRY Iso="ROU" Translation="Um9tYW5pYQ=="/>
+ <COUNTRY Iso="RUS" Translation="UnVzc2lhbiBGZWRlcmF0aW9u"/>
+ <COUNTRY Iso="RWA" Translation="UndhbmRh"/>
+ <COUNTRY Iso="SAU" Translation="U2F1ZGkgQXJhYmlh"/>
+ <COUNTRY Iso="SDN" Translation="U3VkYW4="/>
+ <COUNTRY Iso="SEN" Translation="U2VuZWdhbA=="/>
+ <COUNTRY Iso="SGP" Translation="U2luZ2Fwb3Jl"/>
+ <COUNTRY Iso="SGS" Translation="U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM="/>
+ <COUNTRY Iso="SHN" Translation="U3QuIGhlbGVuYQ=="/>
+ <COUNTRY Iso="SJM" Translation="U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz"/>
+ <COUNTRY Iso="SLB" Translation="U29sb21vbiBJc2xhbmRz"/>
+ <COUNTRY Iso="SLE" Translation="U2llcnJhIExlb25l"/>
+ <COUNTRY Iso="SLV" Translation="RWwgU2FsdmFkb3I="/>
+ <COUNTRY Iso="SMR" Translation="U2FuIE1hcmlubw=="/>
+ <COUNTRY Iso="SOM" Translation="U29tYWxpYQ=="/>
+ <COUNTRY Iso="SPM" Translation="U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24="/>
+ <COUNTRY Iso="STP" Translation="U2FvIFRvbWUgYW5kIFByaW5jaXBl"/>
+ <COUNTRY Iso="SUR" Translation="U3VyaW5hbWU="/>
+ <COUNTRY Iso="SVK" Translation="U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk="/>
+ <COUNTRY Iso="SVN" Translation="U2xvdmVuaWE="/>
+ <COUNTRY Iso="SWE" Translation="U3dlZGVu"/>
+ <COUNTRY Iso="SWZ" Translation="U3dhemlsYW5k"/>
+ <COUNTRY Iso="SYC" Translation="U2V5Y2hlbGxlcw=="/>
+ <COUNTRY Iso="SYR" Translation="U3lyaWFuIEFyYWIgUmVwdWJsaWM="/>
+ <COUNTRY Iso="TCA" Translation="VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz"/>
+ <COUNTRY Iso="TCD" Translation="Q2hhZA=="/>
+ <COUNTRY Iso="TGO" Translation="VG9nbw=="/>
+ <COUNTRY Iso="THA" Translation="VGhhaWxhbmQ="/>
+ <COUNTRY Iso="TJK" Translation="VGFqaWtpc3Rhbg=="/>
+ <COUNTRY Iso="TKL" Translation="VG9rZWxhdQ=="/>
+ <COUNTRY Iso="TKM" Translation="VHVya21lbmlzdGFu"/>
+ <COUNTRY Iso="TLS" Translation="RWFzdCBUaW1vcg=="/>
+ <COUNTRY Iso="TON" Translation="VG9uZ2E="/>
+ <COUNTRY Iso="TTO" Translation="VHJpbmlkYWQgYW5kIFRvYmFnbw=="/>
+ <COUNTRY Iso="TUN" Translation="VHVuaXNpYQ=="/>
+ <COUNTRY Iso="TUR" Translation="VHVya2V5"/>
+ <COUNTRY Iso="TUV" Translation="VHV2YWx1"/>
+ <COUNTRY Iso="TWN" Translation="VGFpd2Fu"/>
+ <COUNTRY Iso="TZA" Translation="VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg=="/>
+ <COUNTRY Iso="UGA" Translation="VWdhbmRh"/>
+ <COUNTRY Iso="UKR" Translation="VWtyYWluZQ=="/>
+ <COUNTRY Iso="UMI" Translation="VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz"/>
+ <COUNTRY Iso="URY" Translation="VXJ1Z3VheQ=="/>
+ <COUNTRY Iso="USA" Translation="VW5pdGVkIFN0YXRlcw==">
+ <STATE Iso="AK" Translation="QWxhc2th"/>
+ <STATE Iso="AL" Translation="QWxhYmFtYQ=="/>
+ <STATE Iso="AR" Translation="QXJrYW5zYXM="/>
+ <STATE Iso="AZ" Translation="QXJpem9uYQ=="/>
+ <STATE Iso="CA" Translation="Q2FsaWZvcm5pYQ=="/>
+ <STATE Iso="CO" Translation="Q29sb3JhZG8="/>
+ <STATE Iso="CT" Translation="Q29ubmVjdGljdXQ="/>
+ <STATE Iso="DC" Translation="RGlzdHJpY3Qgb2YgQ29sdW1iaWE="/>
+ <STATE Iso="DE" Translation="RGVsYXdhcmU="/>
+ <STATE Iso="FL" Translation="RmxvcmlkYQ=="/>
+ <STATE Iso="GA" Translation="R2VvcmdpYQ=="/>
+ <STATE Iso="HI" Translation="SGF3YWlp"/>
+ <STATE Iso="IA" Translation="SW93YQ=="/>
+ <STATE Iso="ID" Translation="SWRhaG8="/>
+ <STATE Iso="IL" Translation="SWxsaW5vaXM="/>
+ <STATE Iso="IN" Translation="SW5kaWFuYQ=="/>
+ <STATE Iso="KS" Translation="S2Fuc2Fz"/>
+ <STATE Iso="KY" Translation="S2VudHVja3k="/>
+ <STATE Iso="LA" Translation="TG91aXNpYW5h"/>
+ <STATE Iso="MA" Translation="TWFzc2FjaHVzZXR0cw=="/>
+ <STATE Iso="MD" Translation="TWFyeWxhbmQ="/>
+ <STATE Iso="ME" Translation="TWFpbmU="/>
+ <STATE Iso="MI" Translation="TWljaGlnYW4="/>
+ <STATE Iso="MN" Translation="TWlubmVzb3Rh"/>
+ <STATE Iso="MO" Translation="TWlzc291cmk="/>
+ <STATE Iso="MS" Translation="TWlzc2lzc2lwcGk="/>
+ <STATE Iso="MT" Translation="TW9udGFuYQ=="/>
+ <STATE Iso="NC" Translation="Tm9ydGggQ2Fyb2xpbmE="/>
+ <STATE Iso="ND" Translation="Tm9ydGggRGFrb3Rh"/>
+ <STATE Iso="NE" Translation="TmVicmFza2E="/>
+ <STATE Iso="NH" Translation="TmV3IEhhbXBzaGlyZQ=="/>
+ <STATE Iso="NJ" Translation="TmV3IEplcnNleQ=="/>
+ <STATE Iso="NM" Translation="TmV3IE1leGljbw=="/>
+ <STATE Iso="NV" Translation="TmV2YWRh"/>
+ <STATE Iso="NY" Translation="TmV3IFlvcms="/>
+ <STATE Iso="OH" Translation="T2hpbw=="/>
+ <STATE Iso="OK" Translation="T2tsYWhvbWE="/>
+ <STATE Iso="OR" Translation="T3JlZ29u"/>
+ <STATE Iso="PA" Translation="UGVubnN5bHZhbmlh"/>
+ <STATE Iso="PR" Translation="UHVlcnRvIFJpY28="/>
+ <STATE Iso="RI" Translation="UmhvZGUgSXNsYW5k"/>
+ <STATE Iso="SC" Translation="U291dGggQ2Fyb2xpbmE="/>
+ <STATE Iso="SD" Translation="U291dGggRGFrb3Rh"/>
+ <STATE Iso="TN" Translation="VGVubmVzc2Vl"/>
+ <STATE Iso="TX" Translation="VGV4YXM="/>
+ <STATE Iso="UT" Translation="VXRhaA=="/>
+ <STATE Iso="VA" Translation="VmlyZ2luaWE="/>
+ <STATE Iso="VT" Translation="VmVybW9udA=="/>
+ <STATE Iso="WA" Translation="V2FzaGluZ3Rvbg=="/>
+ <STATE Iso="WI" Translation="V2lzY29uc2lu"/>
+ <STATE Iso="WV" Translation="V2VzdCBWaXJnaW5pYQ=="/>
+ <STATE Iso="WY" Translation="V3lvbWluZw=="/>
+ </COUNTRY>
+ <COUNTRY Iso="UZB" Translation="VXpiZWtpc3Rhbg=="/>
+ <COUNTRY Iso="VAT" Translation="VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk="/>
+ <COUNTRY Iso="VCT" Translation="U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM="/>
+ <COUNTRY Iso="VEN" Translation="VmVuZXp1ZWxh"/>
+ <COUNTRY Iso="VGB" Translation="VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp"/>
+ <COUNTRY Iso="VIR" Translation="VmlyZ2luIElzbGFuZHMgKFUuUy4p"/>
+ <COUNTRY Iso="VNM" Translation="VmlldG5hbQ=="/>
+ <COUNTRY Iso="VUT" Translation="VmFudWF0dQ=="/>
+ <COUNTRY Iso="WLF" Translation="V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw=="/>
+ <COUNTRY Iso="WSM" Translation="U2Ftb2E="/>
+ <COUNTRY Iso="YEM" Translation="WWVtZW4="/>
+ <COUNTRY Iso="YUG" Translation="WXVnb3NsYXZpYQ=="/>
+ <COUNTRY Iso="ZAF" Translation="U291dGggQWZyaWNh"/>
+ <COUNTRY Iso="ZMB" Translation="WmFtYmlh"/>
+ <COUNTRY Iso="ZWE" Translation="WmltYmFid2U="/>
+ </COUNTRIES>
</LANGUAGE>
</LANGUAGES>
\ No newline at end of file
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 13329)
+++ install/install_data.sql (working copy)
@@ -1,8 +1,8 @@
# Section "in-portal:configure_categories":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category', '20', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage_prompt', 'text', '', '', 10.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category_Short', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage__short_prompt', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_DaysNew', '8', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_daysnew_prompt', 'text', '', '', 10.05, 0, 1);
@@ -13,7 +13,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Catalog_PreselectModuleTab', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.1, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_RecycleBinFolder', 'text', NULL, NULL, 10.11, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL, NULL, 10.12, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_,-=+-', 10.13, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_||-=+-', 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.14, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_MinKeyword_Length', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.15, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_MetaKey', '', 'In-Portal', 'in-portal:configure_categories', 'la_Text_MetaInfo', 'la_category_metakey', 'textarea', '', '', 20.01, 0, 1);
@@ -21,12 +21,12 @@
# Section "in-portal:configure_general":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Site_Name', 'In-Portal CMS', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsWebsite', 'la_config_website_name', 'text', '', '', 10.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday,1=la_monday', 20.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.02, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday||1=la_monday', 20.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_AdminMailFrom', 'portal@user.domain.name', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsMailling', 'la_prompt_AdminMailFrom', 'text', NULL, 'size="40"', 30.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionTimeout', '3600', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsSession', 'la_prompt_session_timeout', 'text', 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}', '', 40.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple,advanced=+advanced,custom=+custom', 50.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple||advanced=+advanced||custom=+custom', 50.01, 0, 1);
# Section "in-portal:configure_advanced":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0);
@@ -39,7 +39,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.07, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_CheckStopWords', 'checkbox', '', '', 10.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.09, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString,1=lu_opt_Cookies,2=lu_opt_AutoDetect', 20.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString||1=lu_opt_Cookies||2=lu_opt_AutoDetect', 20.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_cookie_name', 'text', '', '', 20.02, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'KeepSessionOnBrowserClose', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_KeepSessionOnBrowserClose', 'checkbox', '', '', 20.03, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionBrowserSignatureCheck', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionBrowserSignatureCheck', 'checkbox', NULL, NULL, 20.04, 0, 1);
@@ -56,8 +56,8 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseToolbarLabels', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseToolbarLabels', 'checkbox', NULL, NULL, 40.03, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseSmallHeader', 'checkbox', '', '', 40.04, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseColumnFreezer', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseColumnFreezer', 'checkbox', '', '', 40.05, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePopups', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UsePopups', 'select', '', '0=la_opt_SameWindow,1=la_opt_PopupWindow,2=la_opt_ModalWindow', 40.06, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseDoubleSorting', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseDoubleSorting', 'radio', '', '1=la_Yes,0=la_No', 40.07, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePopups', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UsePopups', 'select', '', '0=la_opt_SameWindow||1=la_opt_PopupWindow||2=la_opt_ModalWindow', 40.06, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseDoubleSorting', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseDoubleSorting', 'radio', '', '1=la_Yes||0=la_No', 40.07, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MenuFrameWidth', '200', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_prompt_MenuFrameWidth', 'text', NULL, NULL, 40.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ResizableFrames', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_ResizableFrames', 'checkbox', '', '', 40.09, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_AutoRefreshIntervals', 'text', '', '', 40.1, 0, 0);
@@ -73,7 +73,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_User', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_user', 'text', NULL, NULL, 50.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Pass', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_pass', 'text', NULL, NULL, 50.05, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_DefaultHeaders', 'X-Mailer: In-Portal', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtpheaders', 'textarea', NULL, 'COLS=40 ROWS=5', 50.06, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailFunctionHeaderSeparator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux,2=la_Windows', 50.07, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailFunctionHeaderSeparator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux||2=la_Windows', 50.07, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListQueuePerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListQueuePerStep', 'text', NULL, NULL, 50.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListSendPerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListSendPerStep', 'text', NULL, NULL, 50.09, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseOutputCompression', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_UseOutputCompression', 'checkbox', '', '', 60.01, 0, 1);
@@ -85,15 +85,15 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Backup_Path', '/home/alex/web/in-portal.rc/system/backupdata', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_backup_path', 'text', '', '', 60.07, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SystemTagCache', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_syscache_enable', 'checkbox', NULL, NULL, 60.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SocketBlockingMode', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_socket_blocking_mode', 'checkbox', NULL, NULL, 60.09, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportDelimiter', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_opt_Tab,1=la_opt_Comma,2=la_opt_Semicolon,3=la_opt_Space,4=la_opt_Colon', 70.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes,1=la_Quotes', 70.02, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux,1=la_Windows', 70.03, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode,1=la_Regular', 70.04, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportDelimiter', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_opt_Tab||1=la_opt_Comma||2=la_opt_Semicolon||3=la_opt_Space||4=la_opt_Colon', 70.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes||1=la_Quotes', 70.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux||1=la_Windows', 70.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode||1=la_Regular', 70.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MemcacheServers', 'localhost:11211', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_MemcacheServers', 'text', NULL, '', 80.01, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None,Memcache=+Memcached,Apc=+Alternative PHP Cache,XCache=+XCache', 80.02, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None||Memcache=+Memcached||Apc=+Alternative PHP Cache||XCache=+XCache', 80.02, 0, 0);
# Section "in-portal:configure_users":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration,2=la_opt_UserNotAllowedRegistration,3=la_opt_UserUponApprovalRegistration,4=la_opt_UserEmailActivation', 10.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration||2=la_opt_UserNotAllowedRegistration||3=la_opt_UserUponApprovalRegistration||4=la_opt_UserEmailActivation', 10.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdvancedUserManagement', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_AdvancedUserManagement', 'checkbox', NULL, NULL, 10.011, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Email_As_Login', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_use_emails_as_login', 'checkbox', NULL, NULL, 10.02, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RegistrationCaptcha', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_registration_captcha', 'checkbox', NULL, NULL, 10.025, 0, 0);
@@ -102,11 +102,11 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_allow_reset', 'text', NULL, NULL, 10.05, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Password_Auto', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_password_auto', 'checkbox', '', '', 10.06, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_MembershipExpirationReminder', '10', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_MembershipExpirationReminder', 'text', NULL, '', 10.07, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Default_Registration_Country', NULL, 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>', 10.12, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 10.12, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowSelectGroupOnFront', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_AllowSelectGroupOnFront', 'checkbox', NULL, NULL, 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DefaultSettingsUserId', '-1', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_DefaultUserId', 'text', NULL, NULL, 10.14, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Votes_Deny', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_Text_Restrictions', 'la_users_votes_deny', 'text', '', '', 20.01, 0, 1);
@@ -169,311 +169,312 @@
INSERT INTO PortalGroup VALUES (14, 'Guest', 'Guest User', '0', 1, 0, 1, 0);
INSERT INTO PortalGroup VALUES (11, 'admin', '', '1054738405', 0, 0, 1, 0);
-INSERT INTO StdDestinations VALUES (1, 1, DEFAULT, 'la_country_AFG', 'AFG', 'AF');
-INSERT INTO StdDestinations VALUES (2, 1, DEFAULT, 'la_country_ALB', 'ALB', 'AL');
-INSERT INTO StdDestinations VALUES (3, 1, DEFAULT, 'la_country_DZA', 'DZA', 'DZ');
-INSERT INTO StdDestinations VALUES (4, 1, DEFAULT, 'la_country_ASM', 'ASM', 'AS');
-INSERT INTO StdDestinations VALUES (5, 1, DEFAULT, 'la_country_AND', 'AND', 'AD');
-INSERT INTO StdDestinations VALUES (6, 1, DEFAULT, 'la_country_AGO', 'AGO', 'AO');
-INSERT INTO StdDestinations VALUES (7, 1, DEFAULT, 'la_country_AIA', 'AIA', 'AI');
-INSERT INTO StdDestinations VALUES (8, 1, DEFAULT, 'la_country_ATA', 'ATA', 'AQ');
-INSERT INTO StdDestinations VALUES (9, 1, DEFAULT, 'la_country_ATG', 'ATG', 'AG');
-INSERT INTO StdDestinations VALUES (10, 1, DEFAULT, 'la_country_ARG', 'ARG', 'AR');
-INSERT INTO StdDestinations VALUES (11, 1, DEFAULT, 'la_country_ARM', 'ARM', 'AM');
-INSERT INTO StdDestinations VALUES (12, 1, DEFAULT, 'la_country_ABW', 'ABW', 'AW');
-INSERT INTO StdDestinations VALUES (13, 1, DEFAULT, 'la_country_AUS', 'AUS', 'AU');
-INSERT INTO StdDestinations VALUES (14, 1, DEFAULT, 'la_country_AUT', 'AUT', 'AT');
-INSERT INTO StdDestinations VALUES (15, 1, DEFAULT, 'la_country_AZE', 'AZE', 'AZ');
-INSERT INTO StdDestinations VALUES (16, 1, DEFAULT, 'la_country_BHS', 'BHS', 'BS');
-INSERT INTO StdDestinations VALUES (17, 1, DEFAULT, 'la_country_BHR', 'BHR', 'BH');
-INSERT INTO StdDestinations VALUES (18, 1, DEFAULT, 'la_country_BGD', 'BGD', 'BD');
-INSERT INTO StdDestinations VALUES (19, 1, DEFAULT, 'la_country_BRB', 'BRB', 'BB');
-INSERT INTO StdDestinations VALUES (20, 1, DEFAULT, 'la_country_BLR', 'BLR', 'BY');
-INSERT INTO StdDestinations VALUES (21, 1, DEFAULT, 'la_country_BEL', 'BEL', 'BE');
-INSERT INTO StdDestinations VALUES (22, 1, DEFAULT, 'la_country_BLZ', 'BLZ', 'BZ');
-INSERT INTO StdDestinations VALUES (23, 1, DEFAULT, 'la_country_BEN', 'BEN', 'BJ');
-INSERT INTO StdDestinations VALUES (24, 1, DEFAULT, 'la_country_BMU', 'BMU', 'BM');
-INSERT INTO StdDestinations VALUES (25, 1, DEFAULT, 'la_country_BTN', 'BTN', 'BT');
-INSERT INTO StdDestinations VALUES (26, 1, DEFAULT, 'la_country_BOL', 'BOL', 'BO');
-INSERT INTO StdDestinations VALUES (27, 1, DEFAULT, 'la_country_BIH', 'BIH', 'BA');
-INSERT INTO StdDestinations VALUES (28, 1, DEFAULT, 'la_country_BWA', 'BWA', 'BW');
-INSERT INTO StdDestinations VALUES (29, 1, DEFAULT, 'la_country_BVT', 'BVT', 'BV');
-INSERT INTO StdDestinations VALUES (30, 1, DEFAULT, 'la_country_BRA', 'BRA', 'BR');
-INSERT INTO StdDestinations VALUES (31, 1, DEFAULT, 'la_country_IOT', 'IOT', 'IO');
-INSERT INTO StdDestinations VALUES (32, 1, DEFAULT, 'la_country_BRN', 'BRN', 'BN');
-INSERT INTO StdDestinations VALUES (33, 1, DEFAULT, 'la_country_BGR', 'BGR', 'BG');
-INSERT INTO StdDestinations VALUES (34, 1, DEFAULT, 'la_country_BFA', 'BFA', 'BF');
-INSERT INTO StdDestinations VALUES (35, 1, DEFAULT, 'la_country_BDI', 'BDI', 'BI');
-INSERT INTO StdDestinations VALUES (36, 1, DEFAULT, 'la_country_KHM', 'KHM', 'KH');
-INSERT INTO StdDestinations VALUES (37, 1, DEFAULT, 'la_country_CMR', 'CMR', 'CM');
-INSERT INTO StdDestinations VALUES (38, 1, DEFAULT, 'la_country_CAN', 'CAN', 'CA');
-INSERT INTO StdDestinations VALUES (39, 1, DEFAULT, 'la_country_CPV', 'CPV', 'CV');
-INSERT INTO StdDestinations VALUES (40, 1, DEFAULT, 'la_country_CYM', 'CYM', 'KY');
-INSERT INTO StdDestinations VALUES (41, 1, DEFAULT, 'la_country_CAF', 'CAF', 'CF');
-INSERT INTO StdDestinations VALUES (42, 1, DEFAULT, 'la_country_TCD', 'TCD', 'TD');
-INSERT INTO StdDestinations VALUES (43, 1, DEFAULT, 'la_country_CHL', 'CHL', 'CL');
-INSERT INTO StdDestinations VALUES (44, 1, DEFAULT, 'la_country_CHN', 'CHN', 'CN');
-INSERT INTO StdDestinations VALUES (45, 1, DEFAULT, 'la_country_CXR', 'CXR', 'CX');
-INSERT INTO StdDestinations VALUES (46, 1, DEFAULT, 'la_country_CCK', 'CCK', 'CC');
-INSERT INTO StdDestinations VALUES (47, 1, DEFAULT, 'la_country_COL', 'COL', 'CO');
-INSERT INTO StdDestinations VALUES (48, 1, DEFAULT, 'la_country_COM', 'COM', 'KM');
-INSERT INTO StdDestinations VALUES (49, 1, DEFAULT, 'la_country_COD', 'COD', 'CD');
-INSERT INTO StdDestinations VALUES (50, 1, DEFAULT, 'la_country_COG', 'COG', 'CG');
-INSERT INTO StdDestinations VALUES (51, 1, DEFAULT, 'la_country_COK', 'COK', 'CK');
-INSERT INTO StdDestinations VALUES (52, 1, DEFAULT, 'la_country_CRI', 'CRI', 'CR');
-INSERT INTO StdDestinations VALUES (53, 1, DEFAULT, 'la_country_CIV', 'CIV', 'CI');
-INSERT INTO StdDestinations VALUES (54, 1, DEFAULT, 'la_country_HRV', 'HRV', 'HR');
-INSERT INTO StdDestinations VALUES (55, 1, DEFAULT, 'la_country_CUB', 'CUB', 'CU');
-INSERT INTO StdDestinations VALUES (56, 1, DEFAULT, 'la_country_CYP', 'CYP', 'CY');
-INSERT INTO StdDestinations VALUES (57, 1, DEFAULT, 'la_country_CZE', 'CZE', 'CZ');
-INSERT INTO StdDestinations VALUES (58, 1, DEFAULT, 'la_country_DNK', 'DNK', 'DK');
-INSERT INTO StdDestinations VALUES (59, 1, DEFAULT, 'la_country_DJI', 'DJI', 'DJ');
-INSERT INTO StdDestinations VALUES (60, 1, DEFAULT, 'la_country_DMA', 'DMA', 'DM');
-INSERT INTO StdDestinations VALUES (61, 1, DEFAULT, 'la_country_DOM', 'DOM', 'DO');
-INSERT INTO StdDestinations VALUES (62, 1, DEFAULT, 'la_country_TLS', 'TLS', 'TL');
-INSERT INTO StdDestinations VALUES (63, 1, DEFAULT, 'la_country_ECU', 'ECU', 'EC');
-INSERT INTO StdDestinations VALUES (64, 1, DEFAULT, 'la_country_EGY', 'EGY', 'EG');
-INSERT INTO StdDestinations VALUES (65, 1, DEFAULT, 'la_country_SLV', 'SLV', 'SV');
-INSERT INTO StdDestinations VALUES (66, 1, DEFAULT, 'la_country_GNQ', 'GNQ', 'GQ');
-INSERT INTO StdDestinations VALUES (67, 1, DEFAULT, 'la_country_ERI', 'ERI', 'ER');
-INSERT INTO StdDestinations VALUES (68, 1, DEFAULT, 'la_country_EST', 'EST', 'EE');
-INSERT INTO StdDestinations VALUES (69, 1, DEFAULT, 'la_country_ETH', 'ETH', 'ET');
-INSERT INTO StdDestinations VALUES (70, 1, DEFAULT, 'la_country_FLK', 'FLK', 'FK');
-INSERT INTO StdDestinations VALUES (71, 1, DEFAULT, 'la_country_FRO', 'FRO', 'FO');
-INSERT INTO StdDestinations VALUES (72, 1, DEFAULT, 'la_country_FJI', 'FJI', 'FJ');
-INSERT INTO StdDestinations VALUES (73, 1, DEFAULT, 'la_country_FIN', 'FIN', 'FI');
-INSERT INTO StdDestinations VALUES (74, 1, DEFAULT, 'la_country_FRA', 'FRA', 'FR');
-INSERT INTO StdDestinations VALUES (75, 1, DEFAULT, 'la_country_FXX', 'FXX', 'FX');
-INSERT INTO StdDestinations VALUES (76, 1, DEFAULT, 'la_country_GUF', 'GUF', 'GF');
-INSERT INTO StdDestinations VALUES (77, 1, DEFAULT, 'la_country_PYF', 'PYF', 'PF');
-INSERT INTO StdDestinations VALUES (78, 1, DEFAULT, 'la_country_ATF', 'ATF', 'TF');
-INSERT INTO StdDestinations VALUES (79, 1, DEFAULT, 'la_country_GAB', 'GAB', 'GA');
-INSERT INTO StdDestinations VALUES (80, 1, DEFAULT, 'la_country_GMB', 'GMB', 'GM');
-INSERT INTO StdDestinations VALUES (81, 1, DEFAULT, 'la_country_GEO', 'GEO', 'GE');
-INSERT INTO StdDestinations VALUES (82, 1, DEFAULT, 'la_country_DEU', 'DEU', 'DE');
-INSERT INTO StdDestinations VALUES (83, 1, DEFAULT, 'la_country_GHA', 'GHA', 'GH');
-INSERT INTO StdDestinations VALUES (84, 1, DEFAULT, 'la_country_GIB', 'GIB', 'GI');
-INSERT INTO StdDestinations VALUES (85, 1, DEFAULT, 'la_country_GRC', 'GRC', 'GR');
-INSERT INTO StdDestinations VALUES (86, 1, DEFAULT, 'la_country_GRL', 'GRL', 'GL');
-INSERT INTO StdDestinations VALUES (87, 1, DEFAULT, 'la_country_GRD', 'GRD', 'GD');
-INSERT INTO StdDestinations VALUES (88, 1, DEFAULT, 'la_country_GLP', 'GLP', 'GP');
-INSERT INTO StdDestinations VALUES (89, 1, DEFAULT, 'la_country_GUM', 'GUM', 'GU');
-INSERT INTO StdDestinations VALUES (90, 1, DEFAULT, 'la_country_GTM', 'GTM', 'GT');
-INSERT INTO StdDestinations VALUES (91, 1, DEFAULT, 'la_country_GIN', 'GIN', 'GN');
-INSERT INTO StdDestinations VALUES (92, 1, DEFAULT, 'la_country_GNB', 'GNB', 'GW');
-INSERT INTO StdDestinations VALUES (93, 1, DEFAULT, 'la_country_GUY', 'GUY', 'GY');
-INSERT INTO StdDestinations VALUES (94, 1, DEFAULT, 'la_country_HTI', 'HTI', 'HT');
-INSERT INTO StdDestinations VALUES (95, 1, DEFAULT, 'la_country_HMD', 'HMD', 'HM');
-INSERT INTO StdDestinations VALUES (96, 1, DEFAULT, 'la_country_HND', 'HND', 'HN');
-INSERT INTO StdDestinations VALUES (97, 1, DEFAULT, 'la_country_HKG', 'HKG', 'HK');
-INSERT INTO StdDestinations VALUES (98, 1, DEFAULT, 'la_country_HUN', 'HUN', 'HU');
-INSERT INTO StdDestinations VALUES (99, 1, DEFAULT, 'la_country_ISL', 'ISL', 'IS');
-INSERT INTO StdDestinations VALUES (100, 1, DEFAULT, 'la_country_IND', 'IND', 'IN');
-INSERT INTO StdDestinations VALUES (101, 1, DEFAULT, 'la_country_IDN', 'IDN', 'ID');
-INSERT INTO StdDestinations VALUES (102, 1, DEFAULT, 'la_country_IRN', 'IRN', 'IR');
-INSERT INTO StdDestinations VALUES (103, 1, DEFAULT, 'la_country_IRQ', 'IRQ', 'IQ');
-INSERT INTO StdDestinations VALUES (104, 1, DEFAULT, 'la_country_IRL', 'IRL', 'IE');
-INSERT INTO StdDestinations VALUES (105, 1, DEFAULT, 'la_country_ISR', 'ISR', 'IL');
-INSERT INTO StdDestinations VALUES (106, 1, DEFAULT, 'la_country_ITA', 'ITA', 'IT');
-INSERT INTO StdDestinations VALUES (107, 1, DEFAULT, 'la_country_JAM', 'JAM', 'JM');
-INSERT INTO StdDestinations VALUES (108, 1, DEFAULT, 'la_country_JPN', 'JPN', 'JP');
-INSERT INTO StdDestinations VALUES (109, 1, DEFAULT, 'la_country_JOR', 'JOR', 'JO');
-INSERT INTO StdDestinations VALUES (110, 1, DEFAULT, 'la_country_KAZ', 'KAZ', 'KZ');
-INSERT INTO StdDestinations VALUES (111, 1, DEFAULT, 'la_country_KEN', 'KEN', 'KE');
-INSERT INTO StdDestinations VALUES (112, 1, DEFAULT, 'la_country_KIR', 'KIR', 'KI');
-INSERT INTO StdDestinations VALUES (113, 1, DEFAULT, 'la_country_PRK', 'PRK', 'KP');
-INSERT INTO StdDestinations VALUES (114, 1, DEFAULT, 'la_country_KOR', 'KOR', 'KR');
-INSERT INTO StdDestinations VALUES (115, 1, DEFAULT, 'la_country_KWT', 'KWT', 'KW');
-INSERT INTO StdDestinations VALUES (116, 1, DEFAULT, 'la_country_KGZ', 'KGZ', 'KG');
-INSERT INTO StdDestinations VALUES (117, 1, DEFAULT, 'la_country_LAO', 'LAO', 'LA');
-INSERT INTO StdDestinations VALUES (118, 1, DEFAULT, 'la_country_LVA', 'LVA', 'LV');
-INSERT INTO StdDestinations VALUES (119, 1, DEFAULT, 'la_country_LBN', 'LBN', 'LB');
-INSERT INTO StdDestinations VALUES (120, 1, DEFAULT, 'la_country_LSO', 'LSO', 'LS');
-INSERT INTO StdDestinations VALUES (121, 1, DEFAULT, 'la_country_LBR', 'LBR', 'LR');
-INSERT INTO StdDestinations VALUES (122, 1, DEFAULT, 'la_country_LBY', 'LBY', 'LY');
-INSERT INTO StdDestinations VALUES (123, 1, DEFAULT, 'la_country_LIE', 'LIE', 'LI');
-INSERT INTO StdDestinations VALUES (124, 1, DEFAULT, 'la_country_LTU', 'LTU', 'LT');
-INSERT INTO StdDestinations VALUES (125, 1, DEFAULT, 'la_country_LUX', 'LUX', 'LU');
-INSERT INTO StdDestinations VALUES (126, 1, DEFAULT, 'la_country_MAC', 'MAC', 'MO');
-INSERT INTO StdDestinations VALUES (127, 1, DEFAULT, 'la_country_MKD', 'MKD', 'MK');
-INSERT INTO StdDestinations VALUES (128, 1, DEFAULT, 'la_country_MDG', 'MDG', 'MG');
-INSERT INTO StdDestinations VALUES (129, 1, DEFAULT, 'la_country_MWI', 'MWI', 'MW');
-INSERT INTO StdDestinations VALUES (130, 1, DEFAULT, 'la_country_MYS', 'MYS', 'MY');
-INSERT INTO StdDestinations VALUES (131, 1, DEFAULT, 'la_country_MDV', 'MDV', 'MV');
-INSERT INTO StdDestinations VALUES (132, 1, DEFAULT, 'la_country_MLI', 'MLI', 'ML');
-INSERT INTO StdDestinations VALUES (133, 1, DEFAULT, 'la_country_MLT', 'MLT', 'MT');
-INSERT INTO StdDestinations VALUES (134, 1, DEFAULT, 'la_country_MHL', 'MHL', 'MH');
-INSERT INTO StdDestinations VALUES (135, 1, DEFAULT, 'la_country_MTQ', 'MTQ', 'MQ');
-INSERT INTO StdDestinations VALUES (136, 1, DEFAULT, 'la_country_MRT', 'MRT', 'MR');
-INSERT INTO StdDestinations VALUES (137, 1, DEFAULT, 'la_country_MUS', 'MUS', 'MU');
-INSERT INTO StdDestinations VALUES (138, 1, DEFAULT, 'la_country_MYT', 'MYT', 'YT');
-INSERT INTO StdDestinations VALUES (139, 1, DEFAULT, 'la_country_MEX', 'MEX', 'MX');
-INSERT INTO StdDestinations VALUES (140, 1, DEFAULT, 'la_country_FSM', 'FSM', 'FM');
-INSERT INTO StdDestinations VALUES (141, 1, DEFAULT, 'la_country_MDA', 'MDA', 'MD');
-INSERT INTO StdDestinations VALUES (142, 1, DEFAULT, 'la_country_MCO', 'MCO', 'MC');
-INSERT INTO StdDestinations VALUES (143, 1, DEFAULT, 'la_country_MNG', 'MNG', 'MN');
-INSERT INTO StdDestinations VALUES (144, 1, DEFAULT, 'la_country_MSR', 'MSR', 'MS');
-INSERT INTO StdDestinations VALUES (145, 1, DEFAULT, 'la_country_MAR', 'MAR', 'MA');
-INSERT INTO StdDestinations VALUES (146, 1, DEFAULT, 'la_country_MOZ', 'MOZ', 'MZ');
-INSERT INTO StdDestinations VALUES (147, 1, DEFAULT, 'la_country_MMR', 'MMR', 'MM');
-INSERT INTO StdDestinations VALUES (148, 1, DEFAULT, 'la_country_NAM', 'NAM', 'NA');
-INSERT INTO StdDestinations VALUES (149, 1, DEFAULT, 'la_country_NRU', 'NRU', 'NR');
-INSERT INTO StdDestinations VALUES (150, 1, DEFAULT, 'la_country_NPL', 'NPL', 'NP');
-INSERT INTO StdDestinations VALUES (151, 1, DEFAULT, 'la_country_NLD', 'NLD', 'NL');
-INSERT INTO StdDestinations VALUES (152, 1, DEFAULT, 'la_country_ANT', 'ANT', 'AN');
-INSERT INTO StdDestinations VALUES (153, 1, DEFAULT, 'la_country_NCL', 'NCL', 'NC');
-INSERT INTO StdDestinations VALUES (154, 1, DEFAULT, 'la_country_NZL', 'NZL', 'NZ');
-INSERT INTO StdDestinations VALUES (155, 1, DEFAULT, 'la_country_NIC', 'NIC', 'NI');
-INSERT INTO StdDestinations VALUES (156, 1, DEFAULT, 'la_country_NER', 'NER', 'NE');
-INSERT INTO StdDestinations VALUES (157, 1, DEFAULT, 'la_country_NGA', 'NGA', 'NG');
-INSERT INTO StdDestinations VALUES (158, 1, DEFAULT, 'la_country_NIU', 'NIU', 'NU');
-INSERT INTO StdDestinations VALUES (159, 1, DEFAULT, 'la_country_NFK', 'NFK', 'NF');
-INSERT INTO StdDestinations VALUES (160, 1, DEFAULT, 'la_country_MNP', 'MNP', 'MP');
-INSERT INTO StdDestinations VALUES (161, 1, DEFAULT, 'la_country_NOR', 'NOR', 'NO');
-INSERT INTO StdDestinations VALUES (162, 1, DEFAULT, 'la_country_OMN', 'OMN', 'OM');
-INSERT INTO StdDestinations VALUES (163, 1, DEFAULT, 'la_country_PAK', 'PAK', 'PK');
-INSERT INTO StdDestinations VALUES (164, 1, DEFAULT, 'la_country_PLW', 'PLW', 'PW');
-INSERT INTO StdDestinations VALUES (165, 1, DEFAULT, 'la_country_PSE', 'PSE', 'PS');
-INSERT INTO StdDestinations VALUES (166, 1, DEFAULT, 'la_country_PAN', 'PAN', 'PA');
-INSERT INTO StdDestinations VALUES (167, 1, DEFAULT, 'la_country_PNG', 'PNG', 'PG');
-INSERT INTO StdDestinations VALUES (168, 1, DEFAULT, 'la_country_PRY', 'PRY', 'PY');
-INSERT INTO StdDestinations VALUES (169, 1, DEFAULT, 'la_country_PER', 'PER', 'PE');
-INSERT INTO StdDestinations VALUES (170, 1, DEFAULT, 'la_country_PHL', 'PHL', 'PH');
-INSERT INTO StdDestinations VALUES (171, 1, DEFAULT, 'la_country_PCN', 'PCN', 'PN');
-INSERT INTO StdDestinations VALUES (172, 1, DEFAULT, 'la_country_POL', 'POL', 'PL');
-INSERT INTO StdDestinations VALUES (173, 1, DEFAULT, 'la_country_PRT', 'PRT', 'PT');
-INSERT INTO StdDestinations VALUES (174, 1, DEFAULT, 'la_country_PRI', 'PRI', 'PR');
-INSERT INTO StdDestinations VALUES (175, 1, DEFAULT, 'la_country_QAT', 'QAT', 'QA');
-INSERT INTO StdDestinations VALUES (176, 1, DEFAULT, 'la_country_REU', 'REU', 'RE');
-INSERT INTO StdDestinations VALUES (177, 1, DEFAULT, 'la_country_ROU', 'ROU', 'RO');
-INSERT INTO StdDestinations VALUES (178, 1, DEFAULT, 'la_country_RUS', 'RUS', 'RU');
-INSERT INTO StdDestinations VALUES (179, 1, DEFAULT, 'la_country_RWA', 'RWA', 'RW');
-INSERT INTO StdDestinations VALUES (180, 1, DEFAULT, 'la_country_KNA', 'KNA', 'KN');
-INSERT INTO StdDestinations VALUES (181, 1, DEFAULT, 'la_country_LCA', 'LCA', 'LC');
-INSERT INTO StdDestinations VALUES (182, 1, DEFAULT, 'la_country_VCT', 'VCT', 'VC');
-INSERT INTO StdDestinations VALUES (183, 1, DEFAULT, 'la_country_WSM', 'WSM', 'WS');
-INSERT INTO StdDestinations VALUES (184, 1, DEFAULT, 'la_country_SMR', 'SMR', 'SM');
-INSERT INTO StdDestinations VALUES (185, 1, DEFAULT, 'la_country_STP', 'STP', 'ST');
-INSERT INTO StdDestinations VALUES (186, 1, DEFAULT, 'la_country_SAU', 'SAU', 'SA');
-INSERT INTO StdDestinations VALUES (187, 1, DEFAULT, 'la_country_SEN', 'SEN', 'SN');
-INSERT INTO StdDestinations VALUES (188, 1, DEFAULT, 'la_country_SYC', 'SYC', 'SC');
-INSERT INTO StdDestinations VALUES (189, 1, DEFAULT, 'la_country_SLE', 'SLE', 'SL');
-INSERT INTO StdDestinations VALUES (190, 1, DEFAULT, 'la_country_SGP', 'SGP', 'SG');
-INSERT INTO StdDestinations VALUES (191, 1, DEFAULT, 'la_country_SVK', 'SVK', 'SK');
-INSERT INTO StdDestinations VALUES (192, 1, DEFAULT, 'la_country_SVN', 'SVN', 'SI');
-INSERT INTO StdDestinations VALUES (193, 1, DEFAULT, 'la_country_SLB', 'SLB', 'SB');
-INSERT INTO StdDestinations VALUES (194, 1, DEFAULT, 'la_country_SOM', 'SOM', 'SO');
-INSERT INTO StdDestinations VALUES (195, 1, DEFAULT, 'la_country_ZAF', 'ZAF', 'ZA');
-INSERT INTO StdDestinations VALUES (196, 1, DEFAULT, 'la_country_SGS', 'SGS', 'GS');
-INSERT INTO StdDestinations VALUES (197, 1, DEFAULT, 'la_country_ESP', 'ESP', 'ES');
-INSERT INTO StdDestinations VALUES (198, 1, DEFAULT, 'la_country_LKA', 'LKA', 'LK');
-INSERT INTO StdDestinations VALUES (199, 1, DEFAULT, 'la_country_SHN', 'SHN', 'SH');
-INSERT INTO StdDestinations VALUES (200, 1, DEFAULT, 'la_country_SPM', 'SPM', 'PM');
-INSERT INTO StdDestinations VALUES (201, 1, DEFAULT, 'la_country_SDN', 'SDN', 'SD');
-INSERT INTO StdDestinations VALUES (202, 1, DEFAULT, 'la_country_SUR', 'SUR', 'SR');
-INSERT INTO StdDestinations VALUES (203, 1, DEFAULT, 'la_country_SJM', 'SJM', 'SJ');
-INSERT INTO StdDestinations VALUES (204, 1, DEFAULT, 'la_country_SWZ', 'SWZ', 'SZ');
-INSERT INTO StdDestinations VALUES (205, 1, DEFAULT, 'la_country_SWE', 'SWE', 'SE');
-INSERT INTO StdDestinations VALUES (206, 1, DEFAULT, 'la_country_CHE', 'CHE', 'CH');
-INSERT INTO StdDestinations VALUES (207, 1, DEFAULT, 'la_country_SYR', 'SYR', 'SY');
-INSERT INTO StdDestinations VALUES (208, 1, DEFAULT, 'la_country_TWN', 'TWN', 'TW');
-INSERT INTO StdDestinations VALUES (209, 1, DEFAULT, 'la_country_TJK', 'TJK', 'TJ');
-INSERT INTO StdDestinations VALUES (210, 1, DEFAULT, 'la_country_TZA', 'TZA', 'TZ');
-INSERT INTO StdDestinations VALUES (211, 1, DEFAULT, 'la_country_THA', 'THA', 'TH');
-INSERT INTO StdDestinations VALUES (212, 1, DEFAULT, 'la_country_TGO', 'TGO', 'TG');
-INSERT INTO StdDestinations VALUES (213, 1, DEFAULT, 'la_country_TKL', 'TKL', 'TK');
-INSERT INTO StdDestinations VALUES (214, 1, DEFAULT, 'la_country_TON', 'TON', 'TO');
-INSERT INTO StdDestinations VALUES (215, 1, DEFAULT, 'la_country_TTO', 'TTO', 'TT');
-INSERT INTO StdDestinations VALUES (216, 1, DEFAULT, 'la_country_TUN', 'TUN', 'TN');
-INSERT INTO StdDestinations VALUES (217, 1, DEFAULT, 'la_country_TUR', 'TUR', 'TR');
-INSERT INTO StdDestinations VALUES (218, 1, DEFAULT, 'la_country_TKM', 'TKM', 'TM');
-INSERT INTO StdDestinations VALUES (219, 1, DEFAULT, 'la_country_TCA', 'TCA', 'TC');
-INSERT INTO StdDestinations VALUES (220, 1, DEFAULT, 'la_country_TUV', 'TUV', 'TV');
-INSERT INTO StdDestinations VALUES (221, 1, DEFAULT, 'la_country_UGA', 'UGA', 'UG');
-INSERT INTO StdDestinations VALUES (222, 1, DEFAULT, 'la_country_UKR', 'UKR', 'UA');
-INSERT INTO StdDestinations VALUES (223, 1, DEFAULT, 'la_country_ARE', 'ARE', 'AE');
-INSERT INTO StdDestinations VALUES (224, 1, DEFAULT, 'la_country_GBR', 'GBR', 'GB');
-INSERT INTO StdDestinations VALUES (225, 1, DEFAULT, 'la_country_USA', 'USA', 'US');
-INSERT INTO StdDestinations VALUES (226, 1, DEFAULT, 'la_country_UMI', 'UMI', 'UM');
-INSERT INTO StdDestinations VALUES (227, 1, DEFAULT, 'la_country_URY', 'URY', 'UY');
-INSERT INTO StdDestinations VALUES (228, 1, DEFAULT, 'la_country_UZB', 'UZB', 'UZ');
-INSERT INTO StdDestinations VALUES (229, 1, DEFAULT, 'la_country_VUT', 'VUT', 'VU');
-INSERT INTO StdDestinations VALUES (230, 1, DEFAULT, 'la_country_VAT', 'VAT', 'VA');
-INSERT INTO StdDestinations VALUES (231, 1, DEFAULT, 'la_country_VEN', 'VEN', 'VE');
-INSERT INTO StdDestinations VALUES (232, 1, DEFAULT, 'la_country_VNM', 'VNM', 'VN');
-INSERT INTO StdDestinations VALUES (233, 1, DEFAULT, 'la_country_VGB', 'VGB', 'VG');
-INSERT INTO StdDestinations VALUES (234, 1, DEFAULT, 'la_country_VIR', 'VIR', 'VI');
-INSERT INTO StdDestinations VALUES (235, 1, DEFAULT, 'la_country_WLF', 'WLF', 'WF');
-INSERT INTO StdDestinations VALUES (236, 1, DEFAULT, 'la_country_ESH', 'ESH', 'EH');
-INSERT INTO StdDestinations VALUES (237, 1, DEFAULT, 'la_country_YEM', 'YEM', 'YE');
-INSERT INTO StdDestinations VALUES (238, 1, DEFAULT, 'la_country_YUG', 'YUG', 'YU');
-INSERT INTO StdDestinations VALUES (239, 1, DEFAULT, 'la_country_ZMB', 'ZMB', 'ZM');
-INSERT INTO StdDestinations VALUES (240, 1, DEFAULT, 'la_country_ZWE', 'ZWE', 'ZW');
-INSERT INTO StdDestinations VALUES (370, 2, 38, 'la_state_YT', 'YT', DEFAULT);
-INSERT INTO StdDestinations VALUES (369, 2, 38, 'la_state_SK', 'SK', DEFAULT);
-INSERT INTO StdDestinations VALUES (368, 2, 38, 'la_state_QC', 'QC', DEFAULT);
-INSERT INTO StdDestinations VALUES (367, 2, 38, 'la_state_PE', 'PE', DEFAULT);
-INSERT INTO StdDestinations VALUES (366, 2, 38, 'la_state_ON', 'ON', DEFAULT);
-INSERT INTO StdDestinations VALUES (365, 2, 38, 'la_state_NU', 'NU', DEFAULT);
-INSERT INTO StdDestinations VALUES (364, 2, 38, 'la_state_NS', 'NS', DEFAULT);
-INSERT INTO StdDestinations VALUES (363, 2, 38, 'la_state_NT', 'NT', DEFAULT);
-INSERT INTO StdDestinations VALUES (362, 2, 38, 'la_state_NL', 'NL', DEFAULT);
-INSERT INTO StdDestinations VALUES (361, 2, 38, 'la_state_NB', 'NB', DEFAULT);
-INSERT INTO StdDestinations VALUES (360, 2, 38, 'la_state_MB', 'MB', DEFAULT);
-INSERT INTO StdDestinations VALUES (359, 2, 38, 'la_state_BC', 'BC', DEFAULT);
-INSERT INTO StdDestinations VALUES (358, 2, 38, 'la_state_AB', 'AB', DEFAULT);
-INSERT INTO StdDestinations VALUES (357, 2, 225, 'la_state_DC', 'DC', DEFAULT);
-INSERT INTO StdDestinations VALUES (356, 2, 225, 'la_state_WY', 'WY', DEFAULT);
-INSERT INTO StdDestinations VALUES (355, 2, 225, 'la_state_WI', 'WI', DEFAULT);
-INSERT INTO StdDestinations VALUES (354, 2, 225, 'la_state_WV', 'WV', DEFAULT);
-INSERT INTO StdDestinations VALUES (353, 2, 225, 'la_state_WA', 'WA', DEFAULT);
-INSERT INTO StdDestinations VALUES (352, 2, 225, 'la_state_VA', 'VA', DEFAULT);
-INSERT INTO StdDestinations VALUES (351, 2, 225, 'la_state_VT', 'VT', DEFAULT);
-INSERT INTO StdDestinations VALUES (350, 2, 225, 'la_state_UT', 'UT', DEFAULT);
-INSERT INTO StdDestinations VALUES (349, 2, 225, 'la_state_TX', 'TX', DEFAULT);
-INSERT INTO StdDestinations VALUES (348, 2, 225, 'la_state_TN', 'TN', DEFAULT);
-INSERT INTO StdDestinations VALUES (347, 2, 225, 'la_state_SD', 'SD', DEFAULT);
-INSERT INTO StdDestinations VALUES (346, 2, 225, 'la_state_SC', 'SC', DEFAULT);
-INSERT INTO StdDestinations VALUES (345, 2, 225, 'la_state_RI', 'RI', DEFAULT);
-INSERT INTO StdDestinations VALUES (344, 2, 225, 'la_state_PR', 'PR', DEFAULT);
-INSERT INTO StdDestinations VALUES (343, 2, 225, 'la_state_PA', 'PA', DEFAULT);
-INSERT INTO StdDestinations VALUES (342, 2, 225, 'la_state_OR', 'OR', DEFAULT);
-INSERT INTO StdDestinations VALUES (341, 2, 225, 'la_state_OK', 'OK', DEFAULT);
-INSERT INTO StdDestinations VALUES (340, 2, 225, 'la_state_OH', 'OH', DEFAULT);
-INSERT INTO StdDestinations VALUES (339, 2, 225, 'la_state_ND', 'ND', DEFAULT);
-INSERT INTO StdDestinations VALUES (338, 2, 225, 'la_state_NC', 'NC', DEFAULT);
-INSERT INTO StdDestinations VALUES (337, 2, 225, 'la_state_NY', 'NY', DEFAULT);
-INSERT INTO StdDestinations VALUES (336, 2, 225, 'la_state_NM', 'NM', DEFAULT);
-INSERT INTO StdDestinations VALUES (335, 2, 225, 'la_state_NJ', 'NJ', DEFAULT);
-INSERT INTO StdDestinations VALUES (334, 2, 225, 'la_state_NH', 'NH', DEFAULT);
-INSERT INTO StdDestinations VALUES (333, 2, 225, 'la_state_NV', 'NV', DEFAULT);
-INSERT INTO StdDestinations VALUES (332, 2, 225, 'la_state_NE', 'NE', DEFAULT);
-INSERT INTO StdDestinations VALUES (331, 2, 225, 'la_state_MT', 'MT', DEFAULT);
-INSERT INTO StdDestinations VALUES (330, 2, 225, 'la_state_MO', 'MO', DEFAULT);
-INSERT INTO StdDestinations VALUES (329, 2, 225, 'la_state_MS', 'MS', DEFAULT);
-INSERT INTO StdDestinations VALUES (328, 2, 225, 'la_state_MN', 'MN', DEFAULT);
-INSERT INTO StdDestinations VALUES (327, 2, 225, 'la_state_MI', 'MI', DEFAULT);
-INSERT INTO StdDestinations VALUES (326, 2, 225, 'la_state_MA', 'MA', DEFAULT);
-INSERT INTO StdDestinations VALUES (325, 2, 225, 'la_state_MD', 'MD', DEFAULT);
-INSERT INTO StdDestinations VALUES (324, 2, 225, 'la_state_ME', 'ME', DEFAULT);
-INSERT INTO StdDestinations VALUES (323, 2, 225, 'la_state_LA', 'LA', DEFAULT);
-INSERT INTO StdDestinations VALUES (322, 2, 225, 'la_state_KY', 'KY', DEFAULT);
-INSERT INTO StdDestinations VALUES (321, 2, 225, 'la_state_KS', 'KS', DEFAULT);
-INSERT INTO StdDestinations VALUES (320, 2, 225, 'la_state_IA', 'IA', DEFAULT);
-INSERT INTO StdDestinations VALUES (319, 2, 225, 'la_state_IN', 'IN', DEFAULT);
-INSERT INTO StdDestinations VALUES (318, 2, 225, 'la_state_IL', 'IL', DEFAULT);
-INSERT INTO StdDestinations VALUES (317, 2, 225, 'la_state_ID', 'ID', DEFAULT);
-INSERT INTO StdDestinations VALUES (316, 2, 225, 'la_state_HI', 'HI', DEFAULT);
-INSERT INTO StdDestinations VALUES (315, 2, 225, 'la_state_GA', 'GA', DEFAULT);
-INSERT INTO StdDestinations VALUES (314, 2, 225, 'la_state_FL', 'FL', DEFAULT);
-INSERT INTO StdDestinations VALUES (313, 2, 225, 'la_state_DE', 'DE', DEFAULT);
-INSERT INTO StdDestinations VALUES (312, 2, 225, 'la_state_CT', 'CT', DEFAULT);
-INSERT INTO StdDestinations VALUES (311, 2, 225, 'la_state_CO', 'CO', DEFAULT);
-INSERT INTO StdDestinations VALUES (310, 2, 225, 'la_state_CA', 'CA', DEFAULT);
-INSERT INTO StdDestinations VALUES (309, 2, 225, 'la_state_AR', 'AR', DEFAULT);
-INSERT INTO StdDestinations VALUES (308, 2, 225, 'la_state_AZ', 'AZ', DEFAULT);
-INSERT INTO StdDestinations VALUES (307, 2, 225, 'la_state_AK', 'AK', DEFAULT);
-INSERT INTO StdDestinations VALUES (306, 2, 225, 'la_state_AL', 'AL', DEFAULT);
+INSERT INTO CountryStates (CountryStateId, Type, StateCountryId, IsoCode, ShortIsoCode) VALUES
+(1, 1, NULL, 'AFG', 'AF'),
+(2, 1, NULL, 'ALB', 'AL'),
+(3, 1, NULL, 'DZA', 'DZ'),
+(4, 1, NULL, 'ASM', 'AS'),
+(5, 1, NULL, 'AND', 'AD'),
+(6, 1, NULL, 'AGO', 'AO'),
+(7, 1, NULL, 'AIA', 'AI'),
+(8, 1, NULL, 'ATA', 'AQ'),
+(9, 1, NULL, 'ATG', 'AG'),
+(10, 1, NULL, 'ARG', 'AR'),
+(11, 1, NULL, 'ARM', 'AM'),
+(12, 1, NULL, 'ABW', 'AW'),
+(13, 1, NULL, 'AUS', 'AU'),
+(14, 1, NULL, 'AUT', 'AT'),
+(15, 1, NULL, 'AZE', 'AZ'),
+(16, 1, NULL, 'BHS', 'BS'),
+(17, 1, NULL, 'BHR', 'BH'),
+(18, 1, NULL, 'BGD', 'BD'),
+(19, 1, NULL, 'BRB', 'BB'),
+(20, 1, NULL, 'BLR', 'BY'),
+(21, 1, NULL, 'BEL', 'BE'),
+(22, 1, NULL, 'BLZ', 'BZ'),
+(23, 1, NULL, 'BEN', 'BJ'),
+(24, 1, NULL, 'BMU', 'BM'),
+(25, 1, NULL, 'BTN', 'BT'),
+(26, 1, NULL, 'BOL', 'BO'),
+(27, 1, NULL, 'BIH', 'BA'),
+(28, 1, NULL, 'BWA', 'BW'),
+(29, 1, NULL, 'BVT', 'BV'),
+(30, 1, NULL, 'BRA', 'BR'),
+(31, 1, NULL, 'IOT', 'IO'),
+(32, 1, NULL, 'BRN', 'BN'),
+(33, 1, NULL, 'BGR', 'BG'),
+(34, 1, NULL, 'BFA', 'BF'),
+(35, 1, NULL, 'BDI', 'BI'),
+(36, 1, NULL, 'KHM', 'KH'),
+(37, 1, NULL, 'CMR', 'CM'),
+(38, 1, NULL, 'CAN', 'CA'),
+(39, 1, NULL, 'CPV', 'CV'),
+(40, 1, NULL, 'CYM', 'KY'),
+(41, 1, NULL, 'CAF', 'CF'),
+(42, 1, NULL, 'TCD', 'TD'),
+(43, 1, NULL, 'CHL', 'CL'),
+(44, 1, NULL, 'CHN', 'CN'),
+(45, 1, NULL, 'CXR', 'CX'),
+(46, 1, NULL, 'CCK', 'CC'),
+(47, 1, NULL, 'COL', 'CO'),
+(48, 1, NULL, 'COM', 'KM'),
+(49, 1, NULL, 'COD', 'CD'),
+(50, 1, NULL, 'COG', 'CG'),
+(51, 1, NULL, 'COK', 'CK'),
+(52, 1, NULL, 'CRI', 'CR'),
+(53, 1, NULL, 'CIV', 'CI'),
+(54, 1, NULL, 'HRV', 'HR'),
+(55, 1, NULL, 'CUB', 'CU'),
+(56, 1, NULL, 'CYP', 'CY'),
+(57, 1, NULL, 'CZE', 'CZ'),
+(58, 1, NULL, 'DNK', 'DK'),
+(59, 1, NULL, 'DJI', 'DJ'),
+(60, 1, NULL, 'DMA', 'DM'),
+(61, 1, NULL, 'DOM', 'DO'),
+(62, 1, NULL, 'TLS', 'TL'),
+(63, 1, NULL, 'ECU', 'EC'),
+(64, 1, NULL, 'EGY', 'EG'),
+(65, 1, NULL, 'SLV', 'SV'),
+(66, 1, NULL, 'GNQ', 'GQ'),
+(67, 1, NULL, 'ERI', 'ER'),
+(68, 1, NULL, 'EST', 'EE'),
+(69, 1, NULL, 'ETH', 'ET'),
+(70, 1, NULL, 'FLK', 'FK'),
+(71, 1, NULL, 'FRO', 'FO'),
+(72, 1, NULL, 'FJI', 'FJ'),
+(73, 1, NULL, 'FIN', 'FI'),
+(74, 1, NULL, 'FRA', 'FR'),
+(75, 1, NULL, 'FXX', 'FX'),
+(76, 1, NULL, 'GUF', 'GF'),
+(77, 1, NULL, 'PYF', 'PF'),
+(78, 1, NULL, 'ATF', 'TF'),
+(79, 1, NULL, 'GAB', 'GA'),
+(80, 1, NULL, 'GMB', 'GM'),
+(81, 1, NULL, 'GEO', 'GE'),
+(82, 1, NULL, 'DEU', 'DE'),
+(83, 1, NULL, 'GHA', 'GH'),
+(84, 1, NULL, 'GIB', 'GI'),
+(85, 1, NULL, 'GRC', 'GR'),
+(86, 1, NULL, 'GRL', 'GL'),
+(87, 1, NULL, 'GRD', 'GD'),
+(88, 1, NULL, 'GLP', 'GP'),
+(89, 1, NULL, 'GUM', 'GU'),
+(90, 1, NULL, 'GTM', 'GT'),
+(91, 1, NULL, 'GIN', 'GN'),
+(92, 1, NULL, 'GNB', 'GW'),
+(93, 1, NULL, 'GUY', 'GY'),
+(94, 1, NULL, 'HTI', 'HT'),
+(95, 1, NULL, 'HMD', 'HM'),
+(96, 1, NULL, 'HND', 'HN'),
+(97, 1, NULL, 'HKG', 'HK'),
+(98, 1, NULL, 'HUN', 'HU'),
+(99, 1, NULL, 'ISL', 'IS'),
+(100, 1, NULL, 'IND', 'IN'),
+(101, 1, NULL, 'IDN', 'ID'),
+(102, 1, NULL, 'IRN', 'IR'),
+(103, 1, NULL, 'IRQ', 'IQ'),
+(104, 1, NULL, 'IRL', 'IE'),
+(105, 1, NULL, 'ISR', 'IL'),
+(106, 1, NULL, 'ITA', 'IT'),
+(107, 1, NULL, 'JAM', 'JM'),
+(108, 1, NULL, 'JPN', 'JP'),
+(109, 1, NULL, 'JOR', 'JO'),
+(110, 1, NULL, 'KAZ', 'KZ'),
+(111, 1, NULL, 'KEN', 'KE'),
+(112, 1, NULL, 'KIR', 'KI'),
+(113, 1, NULL, 'PRK', 'KP'),
+(114, 1, NULL, 'KOR', 'KR'),
+(115, 1, NULL, 'KWT', 'KW'),
+(116, 1, NULL, 'KGZ', 'KG'),
+(117, 1, NULL, 'LAO', 'LA'),
+(118, 1, NULL, 'LVA', 'LV'),
+(119, 1, NULL, 'LBN', 'LB'),
+(120, 1, NULL, 'LSO', 'LS'),
+(121, 1, NULL, 'LBR', 'LR'),
+(122, 1, NULL, 'LBY', 'LY'),
+(123, 1, NULL, 'LIE', 'LI'),
+(124, 1, NULL, 'LTU', 'LT'),
+(125, 1, NULL, 'LUX', 'LU'),
+(126, 1, NULL, 'MAC', 'MO'),
+(127, 1, NULL, 'MKD', 'MK'),
+(128, 1, NULL, 'MDG', 'MG'),
+(129, 1, NULL, 'MWI', 'MW'),
+(130, 1, NULL, 'MYS', 'MY'),
+(131, 1, NULL, 'MDV', 'MV'),
+(132, 1, NULL, 'MLI', 'ML'),
+(133, 1, NULL, 'MLT', 'MT'),
+(134, 1, NULL, 'MHL', 'MH'),
+(135, 1, NULL, 'MTQ', 'MQ'),
+(136, 1, NULL, 'MRT', 'MR'),
+(137, 1, NULL, 'MUS', 'MU'),
+(138, 1, NULL, 'MYT', 'YT'),
+(139, 1, NULL, 'MEX', 'MX'),
+(140, 1, NULL, 'FSM', 'FM'),
+(141, 1, NULL, 'MDA', 'MD'),
+(142, 1, NULL, 'MCO', 'MC'),
+(143, 1, NULL, 'MNG', 'MN'),
+(144, 1, NULL, 'MSR', 'MS'),
+(145, 1, NULL, 'MAR', 'MA'),
+(146, 1, NULL, 'MOZ', 'MZ'),
+(147, 1, NULL, 'MMR', 'MM'),
+(148, 1, NULL, 'NAM', 'NA'),
+(149, 1, NULL, 'NRU', 'NR'),
+(150, 1, NULL, 'NPL', 'NP'),
+(151, 1, NULL, 'NLD', 'NL'),
+(152, 1, NULL, 'ANT', 'AN'),
+(153, 1, NULL, 'NCL', 'NC'),
+(154, 1, NULL, 'NZL', 'NZ'),
+(155, 1, NULL, 'NIC', 'NI'),
+(156, 1, NULL, 'NER', 'NE'),
+(157, 1, NULL, 'NGA', 'NG'),
+(158, 1, NULL, 'NIU', 'NU'),
+(159, 1, NULL, 'NFK', 'NF'),
+(160, 1, NULL, 'MNP', 'MP'),
+(161, 1, NULL, 'NOR', 'NO'),
+(162, 1, NULL, 'OMN', 'OM'),
+(163, 1, NULL, 'PAK', 'PK'),
+(164, 1, NULL, 'PLW', 'PW'),
+(165, 1, NULL, 'PSE', 'PS'),
+(166, 1, NULL, 'PAN', 'PA'),
+(167, 1, NULL, 'PNG', 'PG'),
+(168, 1, NULL, 'PRY', 'PY'),
+(169, 1, NULL, 'PER', 'PE'),
+(170, 1, NULL, 'PHL', 'PH'),
+(171, 1, NULL, 'PCN', 'PN'),
+(172, 1, NULL, 'POL', 'PL'),
+(173, 1, NULL, 'PRT', 'PT'),
+(174, 1, NULL, 'PRI', 'PR'),
+(175, 1, NULL, 'QAT', 'QA'),
+(176, 1, NULL, 'REU', 'RE'),
+(177, 1, NULL, 'ROU', 'RO'),
+(178, 1, NULL, 'RUS', 'RU'),
+(179, 1, NULL, 'RWA', 'RW'),
+(180, 1, NULL, 'KNA', 'KN'),
+(181, 1, NULL, 'LCA', 'LC'),
+(182, 1, NULL, 'VCT', 'VC'),
+(183, 1, NULL, 'WSM', 'WS'),
+(184, 1, NULL, 'SMR', 'SM'),
+(185, 1, NULL, 'STP', 'ST'),
+(186, 1, NULL, 'SAU', 'SA'),
+(187, 1, NULL, 'SEN', 'SN'),
+(188, 1, NULL, 'SYC', 'SC'),
+(189, 1, NULL, 'SLE', 'SL'),
+(190, 1, NULL, 'SGP', 'SG'),
+(191, 1, NULL, 'SVK', 'SK'),
+(192, 1, NULL, 'SVN', 'SI'),
+(193, 1, NULL, 'SLB', 'SB'),
+(194, 1, NULL, 'SOM', 'SO'),
+(195, 1, NULL, 'ZAF', 'ZA'),
+(196, 1, NULL, 'SGS', 'GS'),
+(197, 1, NULL, 'ESP', 'ES'),
+(198, 1, NULL, 'LKA', 'LK'),
+(199, 1, NULL, 'SHN', 'SH'),
+(200, 1, NULL, 'SPM', 'PM'),
+(201, 1, NULL, 'SDN', 'SD'),
+(202, 1, NULL, 'SUR', 'SR'),
+(203, 1, NULL, 'SJM', 'SJ'),
+(204, 1, NULL, 'SWZ', 'SZ'),
+(205, 1, NULL, 'SWE', 'SE'),
+(206, 1, NULL, 'CHE', 'CH'),
+(207, 1, NULL, 'SYR', 'SY'),
+(208, 1, NULL, 'TWN', 'TW'),
+(209, 1, NULL, 'TJK', 'TJ'),
+(210, 1, NULL, 'TZA', 'TZ'),
+(211, 1, NULL, 'THA', 'TH'),
+(212, 1, NULL, 'TGO', 'TG'),
+(213, 1, NULL, 'TKL', 'TK'),
+(214, 1, NULL, 'TON', 'TO'),
+(215, 1, NULL, 'TTO', 'TT'),
+(216, 1, NULL, 'TUN', 'TN'),
+(217, 1, NULL, 'TUR', 'TR'),
+(218, 1, NULL, 'TKM', 'TM'),
+(219, 1, NULL, 'TCA', 'TC'),
+(220, 1, NULL, 'TUV', 'TV'),
+(221, 1, NULL, 'UGA', 'UG'),
+(222, 1, NULL, 'UKR', 'UA'),
+(223, 1, NULL, 'ARE', 'AE'),
+(224, 1, NULL, 'GBR', 'GB'),
+(225, 1, NULL, 'USA', 'US'),
+(226, 1, NULL, 'UMI', 'UM'),
+(227, 1, NULL, 'URY', 'UY'),
+(228, 1, NULL, 'UZB', 'UZ'),
+(229, 1, NULL, 'VUT', 'VU'),
+(230, 1, NULL, 'VAT', 'VA'),
+(231, 1, NULL, 'VEN', 'VE'),
+(232, 1, NULL, 'VNM', 'VN'),
+(233, 1, NULL, 'VGB', 'VG'),
+(234, 1, NULL, 'VIR', 'VI'),
+(235, 1, NULL, 'WLF', 'WF'),
+(236, 1, NULL, 'ESH', 'EH'),
+(237, 1, NULL, 'YEM', 'YE'),
+(238, 1, NULL, 'YUG', 'YU'),
+(239, 1, NULL, 'ZMB', 'ZM'),
+(240, 1, NULL, 'ZWE', 'ZW'),
+(370, 2, 38, 'YT', NULL),
+(369, 2, 38, 'SK', NULL),
+(368, 2, 38, 'QC', NULL),
+(367, 2, 38, 'PE', NULL),
+(366, 2, 38, 'ON', NULL),
+(365, 2, 38, 'NU', NULL),
+(364, 2, 38, 'NS', NULL),
+(363, 2, 38, 'NT', NULL),
+(362, 2, 38, 'NL', NULL),
+(361, 2, 38, 'NB', NULL),
+(360, 2, 38, 'MB', NULL),
+(359, 2, 38, 'BC', NULL),
+(358, 2, 38, 'AB', NULL),
+(357, 2, 225, 'DC', NULL),
+(356, 2, 225, 'WY', NULL),
+(355, 2, 225, 'WI', NULL),
+(354, 2, 225, 'WV', NULL),
+(353, 2, 225, 'WA', NULL),
+(352, 2, 225, 'VA', NULL),
+(351, 2, 225, 'VT', NULL),
+(350, 2, 225, 'UT', NULL),
+(349, 2, 225, 'TX', NULL),
+(348, 2, 225, 'TN', NULL),
+(347, 2, 225, 'SD', NULL),
+(346, 2, 225, 'SC', NULL),
+(345, 2, 225, 'RI', NULL),
+(344, 2, 225, 'PR', NULL),
+(343, 2, 225, 'PA', NULL),
+(342, 2, 225, 'OR', NULL),
+(341, 2, 225, 'OK', NULL),
+(340, 2, 225, 'OH', NULL),
+(339, 2, 225, 'ND', NULL),
+(338, 2, 225, 'NC', NULL),
+(337, 2, 225, 'NY', NULL),
+(336, 2, 225, 'NM', NULL),
+(335, 2, 225, 'NJ', NULL),
+(334, 2, 225, 'NH', NULL),
+(333, 2, 225, 'NV', NULL),
+(332, 2, 225, 'NE', NULL),
+(331, 2, 225, 'MT', NULL),
+(330, 2, 225, 'MO', NULL),
+(329, 2, 225, 'MS', NULL),
+(328, 2, 225, 'MN', NULL),
+(327, 2, 225, 'MI', NULL),
+(326, 2, 225, 'MA', NULL),
+(325, 2, 225, 'MD', NULL),
+(324, 2, 225, 'ME', NULL),
+(323, 2, 225, 'LA', NULL),
+(322, 2, 225, 'KY', NULL),
+(321, 2, 225, 'KS', NULL),
+(320, 2, 225, 'IA', NULL),
+(319, 2, 225, 'IN', NULL),
+(318, 2, 225, 'IL', NULL),
+(317, 2, 225, 'ID', NULL),
+(316, 2, 225, 'HI', NULL),
+(315, 2, 225, 'GA', NULL),
+(314, 2, 225, 'FL', NULL),
+(313, 2, 225, 'DE', NULL),
+(312, 2, 225, 'CT', NULL),
+(311, 2, 225, 'CO', NULL),
+(310, 2, 225, 'CA', NULL),
+(309, 2, 225, 'AR', NULL),
+(308, 2, 225, 'AZ', NULL),
+(307, 2, 225, 'AK', NULL),
+(306, 2, 225, 'AL', NULL);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.VIEW', 'lu_PermName_Category.View_desc', 'lu_PermName_Category.View_error', 'In-Portal');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal');
Index: install/install_schema.sql
===================================================================
--- install/install_schema.sql (revision 13329)
+++ install/install_schema.sql (working copy)
@@ -364,16 +364,21 @@
KEY Cached (Cached)
);
-CREATE TABLE StdDestinations (
- DestId int(11) NOT NULL auto_increment,
- DestType int(11) NOT NULL default '0',
- DestParentId int(11) default NULL,
- DestName varchar(255) NOT NULL default '',
- DestAbbr char(3) NOT NULL default '',
- DestAbbr2 char(2) default NULL,
- PRIMARY KEY (DestId),
- KEY DestType (DestType),
- KEY DestParentId (DestParentId)
+CREATE TABLE CountryStates (
+ CountryStateId int(11) NOT NULL AUTO_INCREMENT,
+ `Type` int(11) NOT NULL DEFAULT '1',
+ StateCountryId int(11) DEFAULT NULL,
+ l1_Name varchar(255) NOT NULL,
+ l2_Name varchar(255) NOT NULL,
+ l3_Name varchar(255) NOT NULL,
+ l4_Name varchar(255) NOT NULL,
+ l5_Name varchar(255) NOT NULL,
+ IsoCode char(3) NOT NULL DEFAULT '',
+ ShortIsoCode char(2) DEFAULT NULL,
+ PRIMARY KEY (CountryStateId),
+ KEY `Type` (`Type`),
+ KEY StateCountryId (StateCountryId),
+ KEY l1_Name (l1_Name(5))
);
CREATE TABLE Category (
Index: install/remove_schema.sql
===================================================================
--- install/remove_schema.sql (revision 13329)
+++ install/remove_schema.sql (working copy)
@@ -21,7 +21,7 @@
DROP TABLE UserSession;
DROP TABLE EmailLog;
DROP TABLE Cache;
-DROP TABLE StdDestinations;
+DROP TABLE CountryStates;
DROP TABLE Category;
DROP TABLE CategoryCustomData;
DROP TABLE CategoryItems;
Index: install/upgrades.php
===================================================================
--- install/upgrades.php (revision 13329)
+++ install/upgrades.php (working copy)
@@ -1329,6 +1329,8 @@
if ($mode == 'before') {
// create multilingual fields for phrases and email events
$ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
+ /* @var $ml_helper kMultiLanguageHelper */
+
$ml_helper->createFields('phrases');
$ml_helper->createFields('emailevents');
@@ -1427,6 +1429,76 @@
$this->Conn->Query('DROP TABLE IF EXISTS ' . TABLE_PREFIX . 'Phrase');
$this->Conn->Query('RENAME TABLE ' . $temp_table . ' TO ' . TABLE_PREFIX . 'Phrase');
+
+ // refactor StdDestinations table
+ $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
+ $this->Conn->Query($sql);
+
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
+ CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
+ CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
+ CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
+ CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
+ DROP INDEX DestType,
+ DROP INDEX DestParentId,
+ ADD INDEX (`Type`),
+ ADD INDEX (StateCountryId)';
+ $this->Conn->Query($sql);
+
+ // move country/state translations from Phrase to CountryStates table
+ $ml_helper->createFields('country-state');
+
+ for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
+ if (!$ml_helper->LanguageFound($language_id)) {
+ continue;
+ }
+
+ $sub_select = ' SELECT l' . $language_id . '_Translation
+ FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase = DestName';
+
+ $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
+ SET l' . $language_id . '_Name = (' . $sub_select . ')';
+ $this->Conn->Query($sql);
+ }
+
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ DROP DestName';
+ $this->Conn->Query($sql);
+
+ $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $this->Conn->Query($sql);
+
+ // makes configuration values dropdowns use "||" as separator
+ $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
+ /* @var $custom_field_helper InpCustomFieldsHelper */
+
+ $sql = 'SELECT ValueList, VariableName
+ FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
+ WHERE ValueList LIKE "%,%"';
+ $variables = $this->Conn->GetCol($sql, 'VariableName');
+
+ foreach ($variables as $variable_name => $value_list) {
+ $ret = Array ();
+ $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+
+ foreach ($options as $option_key => $option_title) {
+ if (substr($option_key, 0, 3) == 'SQL') {
+ $ret[] = $option_title;
+ }
+ else {
+ $ret[] = $option_key . '=' . $option_title;
+ }
+ }
+
+ $fields_hash = Array (
+ 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ );
+
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ }
}
}
}
\ No newline at end of file
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 13368)
+++ install/upgrades.sql (working copy)
@@ -1710,4 +1710,8 @@
cv.GroupDisplayOrder = (SELECT ca7.GroupDisplayOrder FROM <%TABLE_PREFIX%>ConfigurationAdmin ca7 WHERE ca7.VariableName = cv.VariableName),
cv.`Install` = (SELECT ca8.`Install` FROM <%TABLE_PREFIX%>ConfigurationAdmin ca8 WHERE ca8.VariableName = cv.VariableName);
-DROP TABLE ConfigurationAdmin;
\ No newline at end of file
+DROP TABLE ConfigurationAdmin;
+
+UPDATE ConfigurationValues
+SET ValueList = '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
+WHERE ValueList = '=+||<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>';
Index: kernel/constants.php
===================================================================
--- kernel/constants.php (revision 13329)
+++ kernel/constants.php (working copy)
@@ -129,3 +129,6 @@
define('SESSION_LOG_ACTIVE', 0);
define('SESSION_LOG_LOGGED_OUT', 1);
define('SESSION_LOG_EXPIRED', 2);
+
+ define('DESTINATION_TYPE_COUNTRY', 1);
+ define('DESTINATION_TYPE_STATE', 2);
\ No newline at end of file
Index: kernel/db/db_tag_processor.php
===================================================================
--- kernel/db/db_tag_processor.php (revision 13329)
+++ kernel/db/db_tag_processor.php (working copy)
@@ -1830,7 +1830,7 @@
}
else {
// used for configuration
- $field_options['options'] = $helper->GetValuesHash($object->GetDBField($params['value_list_field']), ',');
+ $field_options['options'] = $helper->GetValuesHash( $object->GetDBField($params['value_list_field']) );
}
$object->SetFieldOptions($field, $field_options);
Index: units/configuration/configuration_event_handler.php
===================================================================
--- units/configuration/configuration_event_handler.php (revision 13329)
+++ units/configuration/configuration_event_handler.php (working copy)
@@ -115,7 +115,10 @@
}
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $state_iso = $cs_helper->CheckState($check_state, $check_country);
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $state_iso = $cs_helper->getStateIso($check_state, $check_country);
+
if ($state_iso !== false) {
$object->SetDBField('VariableValue', $state_iso);
}
Index: units/custom_data/custom_data_event_handler.php
===================================================================
--- units/custom_data/custom_data_event_handler.php (revision 13329)
+++ units/custom_data/custom_data_event_handler.php (working copy)
@@ -150,6 +150,8 @@
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
+ $is_install = defined('IS_INSTALL') && IS_INSTALL;
+
foreach ($custom_fields as $custom_id => $custom_params) {
$custom_name = $custom_params['FieldName'];
$field_options = Array('type' => 'string', 'not_null' => 1, 'default' => $custom_params['DefaultValue']);
@@ -170,7 +172,8 @@
case 'multiselect':
case 'radio':
if ($custom_params['ValueList']) {
- $field_options['options'] = $cf_helper->GetValuesHash($custom_params['ValueList']);
+ // $is_install check prevents 335 bad phrase sql errors on upgrade to 5.1.0
+ $field_options['options'] = $is_install ? Array () : $cf_helper->GetValuesHash($custom_params['ValueList']);
$field_options['formatter'] = 'kOptionsFormatter';
$field_options['multiple'] = $custom_params['ElementType'] == 'multiselect';
}
Index: units/helpers/country_states_helper.php
===================================================================
--- units/helpers/country_states_helper.php (revision 13329)
+++ units/helpers/country_states_helper.php (working copy)
@@ -16,11 +16,37 @@
class kCountryStatesHelper extends kHelper
{
- var $CountriesWithStates = Array('USA', 'CAN');
+ /**
+ * Returns countries, that have states
+ *
+ * @return Array
+ */
+ function getCountriesWithStates()
+ {
+ static $cache = null;
+ if (!isset($cache)) {
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+
+ $sql = 'SELECT DISTINCT cname.IsoCode, cid.StateCountryId
+ FROM ' . $table_name . ' cid
+ JOIN ' . $table_name . ' cname ON cname.CountryStateId = cid.StateCountryId
+ WHERE cid.StateCountryId IS NOT NULL';
+ $cache = $this->Conn->GetCol($sql, 'StateCountryId');
+ }
+
+ return $cache;
+ }
+
+ /**
+ * Checks, that country with given 3symbol ISO code has states
+ *
+ * @param string $country_code
+ * @return bool
+ */
function CountryHasStates($country_code)
{
- return !$country_code ? false : in_array($country_code,$this->CountriesWithStates);
+ return $country_code ? in_array($country_code, $this->getCountriesWithStates()) : false;
}
/**
@@ -32,93 +58,131 @@
*/
function PopulateStates(&$event, $state_field, $country_field)
{
- static $country_states = Array ();
+ static $cache = Array ();
$object =& $event->getObject();
- $country_abbr = $object->GetDBField($country_field);
+ /* @var $object kDBItem */
- if (!$country_abbr) {
+ $country_iso = $object->GetDBField($country_field);
+
+ if (!$country_iso) {
return ;
}
- if (!array_key_exists($country_abbr, $country_states)) {
- $sql = 'SELECT DestId
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestType = 1 AND DestAbbr = '.$this->Conn->qstr($country_abbr);
- $country_id = $this->Conn->GetOne($sql);
+ if (!array_key_exists($country_iso, $cache)) {
+ $country_id = $this->getCountryStateId($country_iso, DESTINATION_TYPE_COUNTRY);
+
if (!$country_id) {
return ;
}
- $language_id = $this->Application->GetVar('m_lang');
-
- $sql = 'SELECT p.l' . $language_id . '_Translation as DestName, sd.DestAbbr
- FROM ' . TABLE_PREFIX . 'StdDestinations AS sd
- LEFT JOIN ' . TABLE_PREFIX . 'Phrase AS p ON p.Phrase = sd.DestName
- WHERE DestType = 2 AND DestParentId = ' . $country_id . '
- ORDER BY l' . $language_id . '_Translation';
- $country_states[$country_abbr] = $this->Conn->GetCol($sql, 'DestAbbr');
+ $sql = 'SELECT l' . $this->Application->GetVar('m_lang') . '_Name AS Name, IsoCode
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE (Type = ' . DESTINATION_TYPE_STATE . ') AND (StateCountryId = ' . $country_id . ')
+ ORDER BY Name ASC';
+ $cache[$country_iso] = $this->Conn->GetCol($sql, 'IsoCode');
}
- $object->Fields[$state_field]['options'] = $country_states[$country_abbr];
- $object->Fields[$state_field]['options'][''] = '';
+ $field_options = $object->GetFieldOptions($state_field);
+
+ $field_options['options'] = $cache[$country_iso];
+ $field_options['options'][''] = '';
+
+ $object->SetFieldOptions($state_field, $field_options);
}
/**
- * Returns valid state code for state name and country code passed
+ * Returns valid state ISO code for state name and country code passed
*
* @param string $state_name
- * @param string $country_code
+ * @param string $country_iso
* @return string
*/
- function CheckState($state_name, $country_code)
+ function getStateIso($state_name, $country_iso)
{
- if (!$this->CountryHasStates($country_code)) {
+ if (!$this->CountryHasStates($country_iso)) {
return $state_name;
}
- $sql = 'SELECT sdStates.DestAbbr
- FROM '.TABLE_PREFIX.'StdDestinations AS sdStates
- LEFT JOIN '.TABLE_PREFIX.'Phrase AS p ON p.Phrase = sdStates.DestName
- LEFT JOIN '.TABLE_PREFIX.'StdDestinations AS sdCountries ON sdStates.DestParentId = sdCountries.DestId
- WHERE (sdStates.DestType = 2) AND
- (sdStates.DestParentId = sdCountries.DestId) AND
- (sdCountries.DestAbbr = %2$s) AND
- (
- (LOWER(sdStates.DestAbbr) = %3$s) OR (LOWER(sdStates.DestAbbr2) = %3$s) OR (LOWER(sdStates.DestName) = %3$s) OR (LOWER(p.l%1$s_Translation) = %3$s)
- )';
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+ $country_id = $this->getCountryStateId($country_iso, DESTINATION_TYPE_COUNTRY);
- $state_name = trim( mb_strtolower($state_name) );
+ $sql = 'SELECT IsoCode
+ FROM ' . $table_name . '
+ WHERE (Type = ' . DESTINATION_TYPE_STATE . ') AND (StateCountryId = %2$s) AND
+ (
+ (IsoCode = %3$s) OR (UPPER(l%1$s_Name) = %3$s)
+ )';
- $sql = sprintf($sql, (int)$this->Application->GetVar('m_lang'), $this->Conn->qstr($country_code), $this->Conn->qstr($state_name) );
+ $state_name = trim( mb_strtoupper($state_name) );
+ $sql = sprintf($sql, (int)$this->Application->GetVar('m_lang'), $country_id, $this->Conn->qstr($state_name));
return $this->Conn->GetOne($sql);
}
- function CheckStateField(&$event, $state_field, $country_field)
+ function CheckStateField(&$event, $state_field, $country_field, $auto_required = true)
{
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- if($items_info)
- {
- list($id, $field_values) = each($items_info);
- if( isset($field_values[$state_field]) && isset($field_values[$country_field]) )
- {
- $user_state = getArrayValue($field_values,$state_field);
- $valid_state = $this->CheckState($user_state, getArrayValue($field_values,$country_field) );
- if($valid_state !== false)
- {
- $field_values[$state_field] = $valid_state;
- $items_info[$id] = $field_values;
- $this->Application->SetVar( $event->getPrefixSpecial(true), $items_info);
- }
- else
- {
- $object =& $event->getObject();
- $object->Fields[$state_field]['options'][$user_state] = $user_state;
- $object->SetError($state_field, 'invalid_state', 'la_invalid_state');
- }
+ $country_iso = $object->GetDBField($country_field);
+
+ if ($auto_required) {
+ $object->setRequired($state_field, $this->CountryHasStates($country_iso));
+ }
+
+ $state = $object->GetDBField($state_field);
+
+ if ($country_iso && $state) {
+ $state_iso = $this->getStateIso($state, $country_iso);
+
+ if ($state_iso !== false) {
+ // replace state name with it's ISO code
+ $object->SetDBField($state_field, $state_iso);
}
+ else {
+ // state not found by name -> report error
+ $object->SetError($state_field, 'invalid_state', 'la_invalid_state');
+ }
}
}
+
+ /**
+ * Returns country/state id based on given iso code and it's type
+ *
+ * @param string $iso_code
+ * @param int $type
+ * @return int
+ */
+ function getCountryStateId($iso_code, $type)
+ {
+ $sql = 'SELECT ' . $this->Application->getUnitOption('country-state', 'IDField') . '
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE (Type = ' . $type . ') AND (IsoCode = ' . $this->Conn->qstr($iso_code) . ')';
+
+ return (int)$this->Conn->GetOne($sql);
+ }
+
+ /**
+ * Returns 3 symbols ISO code from 2 symbols ISO code or otherwise, when $from_short parameter is used
+ *
+ * @param string $iso_code
+ * @param bool $from_short
+ * @return string
+ */
+ function getCountryIso($iso_code, $from_short = false)
+ {
+ if ($from_short) {
+ $sql = 'SELECT IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE ShortIsoCode = ' . $this->Conn->qstr($iso_code) . ' AND `Type` = ' . DESTINATION_TYPE_COUNTRY;
+ }
+ else {
+ $sql = 'SELECT ShortIsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE IsoCode = ' . $this->Conn->qstr($iso_code) . ' AND `Type` = ' . DESTINATION_TYPE_COUNTRY;
+ }
+
+ return $this->Conn->GetOne($sql);
+ }
}
\ No newline at end of file
Index: units/helpers/language_import_helper.php
===================================================================
--- units/helpers/language_import_helper.php (revision 13329)
+++ units/helpers/language_import_helper.php (working copy)
@@ -101,7 +101,7 @@
*
* @var int
*/
- var $_latestVersion = 2;
+ var $_latestVersion = 3;
/**
* Prefix-based serial numbers, that should be changed after import is finished
@@ -170,6 +170,7 @@
foreach ($this->_languages as $language_id) {
$this->_performUpgrade($language_id, 'phrases', 'PhraseKey', Array ('l%s_Translation'));
$this->_performUpgrade($language_id, 'emailevents', 'EventId', Array ('l%s_Subject', 'Headers', 'MessageType', 'l%s_Body'));
+ $this->_performUpgrade($language_id, 'country-state', 'CountryStateId', Array ('l%s_Name'));
}
$this->_initImportTables(true);
@@ -204,9 +205,7 @@
$phrase_types = explode('|', substr($phrase_types, 1, -1) );
$module_ids = explode('|', substr($module_ids, 1, -1) );
- $phrase_tpl = "\t\t\t".'<PHRASE Label="%s" Module="%s" Type="%s">%s</PHRASE>'."\n";
- $event_tpl = "\t\t\t".'<EVENT MessageType="%s" Event="%s" Type="%s">%s</EVENT>'."\n";
- $ret = '<LANGUAGES Version="' . $this->_latestVersion . '">'."\n";
+ $ret = '<LANGUAGES Version="' . $this->_latestVersion . '">' . "\n";
$export_fields = $this->_getExportFields();
@@ -235,11 +234,35 @@
$module_sql = preg_replace('/(.*),/U', 'INSTR(Module,\'\\1\') OR ', implode(',', $module_ids) . ',');
$sql = 'SELECT *
- FROM ' . $this->Application->getUnitOption('emailevents','TableName') . '
+ FROM ' . $this->Application->getUnitOption('emailevents', 'TableName') . '
WHERE ' . substr($module_sql, 0, -4) . '
ORDER BY `Event`, `Type`';
$events = $this->Conn->Query($sql, 'EventId');
+ // countries
+ $sql = 'SELECT *
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY `IsoCode`';
+ $countries = $this->Conn->Query($sql, 'CountryStateId');
+
+ // states
+ $sql = 'SELECT *
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE Type = ' . DESTINATION_TYPE_STATE . '
+ ORDER BY `IsoCode`';
+ $states = $this->Conn->Query($sql, 'CountryStateId');
+
+ foreach ($states as $state_id => $state_data) {
+ $country_id = $state_data['StateCountryId'];
+
+ if (!array_key_exists('States', $countries[$country_id])) {
+ $countries[$country_id]['States'] = Array ();
+ }
+
+ $countries[$country_id]['States'][] = $state_id;
+ }
+
foreach ($languages as $language_id => $language_info) {
// language
$ret .= "\t" . '<LANGUAGE Encoding="' . $this->_exportEncoding . '"';
@@ -251,11 +274,14 @@
$ret .= '>' . "\n";
// filename replacements
- $ret .= "\t\t" . '<REPLACEMENTS>';
$replacements = $language_info['FilenameReplacements'];
- $ret .= $this->_exportEncoding == 'base64' ? base64_encode($replacements) : '<![CDATA[' . $replacements . ']]>';
- $ret .= '</REPLACEMENTS>' . "\n";
+ if ($replacements) {
+ $ret .= "\t\t" . '<REPLACEMENTS>';
+ $ret .= $this->_exportEncoding == 'base64' ? base64_encode($replacements) : '<![CDATA[' . $replacements . ']]>';
+ $ret .= '</REPLACEMENTS>' . "\n";
+ }
+
// phrases
if ($phrases) {
$ret .= "\t\t" . '<PHRASES>' . "\n";
@@ -268,32 +294,74 @@
}
$data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : '<![CDATA[' . $translation . ']]>';
- $ret .= sprintf($phrase_tpl, $phrase['Phrase'], $phrase['Module'], $phrase['PhraseType'], $data);
+ $ret .= "\t\t\t" . '<PHRASE Label="' . $phrase['Phrase'] . '" Module="' . $phrase['Module'] . '" Type="' . $phrase['PhraseType'] . '">' . $data . '</PHRASE>' . "\n";
}
+
$ret .= "\t\t" . '</PHRASES>' . "\n";
}
// email events
- $ret .= "\t\t" . '<EVENTS>' . "\n";
+ if ($events) {
+ $ret .= "\t\t" . '<EVENTS>' . "\n";
- foreach ($events as $event_id => $event) {
- $fields_hash = Array (
- 'Headers' => $event['Headers'],
- 'Subject' => $event['l' . $language_id . '_Subject'],
- 'Body' => $event['l' . $language_id . '_Body'],
- );
+ foreach ($events as $event_id => $event) {
+ $fields_hash = Array (
+ 'Headers' => $event['Headers'],
+ 'Subject' => $event['l' . $language_id . '_Subject'],
+ 'Body' => $event['l' . $language_id . '_Body'],
+ );
- $template = $email_message_helper->buildTemplate($fields_hash);
+ $template = $email_message_helper->buildTemplate($fields_hash);
- if (!$template) {
- // email event is not translated on given language
- continue;
+ if (!$template) {
+ // email event is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($template) : '<![CDATA[' . $template . ']]>';
+ $ret .= "\t\t\t".'<EVENT MessageType="' . $event['MessageType'] . '" Event="' . $event['Event'] . '" Type="' . $event['Type'] . '">' . $data . '</EVENT>'."\n";
}
- $data = $this->_exportEncoding == 'base64' ? base64_encode($template) : '<![CDATA[' . $template . ']]>';
- $ret .= sprintf($event_tpl, $event['MessageType'], $event['Event'], $event['Type'], $data);
+ $ret .= "\t\t" . '</EVENTS>' . "\n";
}
- $ret .= "\t\t" . '</EVENTS>' . "\n";
+
+ if ($countries) {
+ $ret .= "\t\t" . '<COUNTRIES>' . "\n";
+ foreach ($countries as $country_id => $country_data) {
+ $translation = $country_data['l' . $language_id . '_Name'];
+
+ if (!$translation) {
+ // country is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
+
+ if (array_key_exists('States', $country_data)) {
+ $ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '">' . "\n";
+
+ foreach ($country_data['States'] as $state_id) {
+ $translation = $states[$state_id]['l' . $language_id . '_Name'];
+
+ if (!$translation) {
+ // state is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
+ $ret .= "\t\t\t\t" . '<STATE Iso="' . $states[$state_id]['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
+ }
+
+ $ret .= "\t\t\t" . '</COUNTRY>' . "\n";
+ }
+ else {
+ $ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
+ }
+ }
+
+ $ret .= "\t\t" . '</COUNTRIES>' . "\n";
+ }
+
$ret .= "\t" . '</LANGUAGE>' . "\n";
}
@@ -460,6 +528,7 @@
{
$this->_tables['phrases'] = $this->_prepareTempTable('phrases', $drop_only);
$this->_tables['emailevents'] = $this->_prepareTempTable('emailevents', $drop_only);
+ $this->_tables['country-state'] = $this->_prepareTempTable('country-state', $drop_only);
}
/**
@@ -483,7 +552,24 @@
$sql = 'ALTER TABLE %1$s CHANGE %2$s %2$s INT(11) NOT NULL DEFAULT "0"';
$this->Conn->Query( sprintf($sql, $temp_table, $idfield) );
- $unique_field = $prefix == 'phrases' ? 'PhraseKey' : 'EventId';
+ switch ($prefix) {
+ case 'phrases':
+ $unique_field = 'PhraseKey';
+ break;
+
+ case 'emailevents':
+ $unique_field = 'EventId';
+ break;
+
+ case 'country-state':
+ $unique_field = 'CountryStateId';
+ break;
+
+ default:
+ trigger_error('Unknown prefix "<strong>' . $prefix . '</strong>" during language pack import', E_USER_ERROR);
+ break;
+ }
+
$sql = 'ALTER TABLE ' . $temp_table . ' ADD UNIQUE (' . $unique_field . ')';
$this->Conn->Query($sql);
}
@@ -606,6 +692,16 @@
}
break;
+ case 'COUNTRIES':
+ if ($sub_node->Children) {
+ if (!$language_id) {
+ $language_id = $this->_processLanguage($fields_hash);
+ }
+
+ $this->_processCountries($sub_node->firstChild, $language_id, $fields_hash['Encoding']);
+ }
+ break;
+
case 'REPLACEMENTS':
// added since v2
$replacements = $sub_node->Data;
@@ -750,6 +846,58 @@
}
/**
+ * Performs country_state translation import
+ *
+ * @param kXMLNode $country_state_node
+ * @param int $language_id
+ * @param string $language_encoding
+ */
+ function _processCountries(&$country_state_node, $language_id, $language_encoding, $process_states = false)
+ {
+ static $other_translations = Array ();
+
+ do {
+ if ($process_states) {
+ $country_state_id = $this->_getStateId($country_state_node->Parent->Attributes['ISO'], $country_state_node->Attributes['ISO']);
+ }
+ else {
+ $country_state_id = $this->_getCountryId($country_state_node->Attributes['ISO']);
+ }
+
+ if ($country_state_id) {
+ if ($language_encoding == 'plain') {
+ $translation = rtrim($country_state_node->Attributes['TRANSLATION']);
+ }
+ else {
+ $translation = base64_decode($country_state_node->Attributes['TRANSLATION']);
+ }
+
+ $fields_hash = Array (
+ 'CountryStateId' => $country_state_id,
+ );
+
+ if (array_key_exists($country_state_id, $other_translations)) {
+ $other_translations[$country_state_id]['l' . $language_id . '_Name'] = $translation;
+ }
+ else {
+ $other_translations[$country_state_id] = Array (
+ 'l' . $language_id . '_Name' => $translation,
+ );
+ }
+
+ $fields_hash = array_merge($fields_hash, $other_translations[$country_state_id]);
+ $this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE', false);
+
+ if (!$process_states && $country_state_node->Children) {
+ $this->_processCountries($country_state_node->firstChild, $language_id, $language_encoding, true);
+ }
+ }
+ } while (($country_state_node =& $country_state_node->NextSibling()));
+
+ $this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE');
+ }
+
+ /**
* Creates/updates language based on given fields and returns it's id
*
* @param Array $fields_hash
@@ -809,4 +957,47 @@
return array_key_exists($cache_key, $this->events_hash) ? $this->events_hash[$cache_key] : 0;
}
+
+ /**
+ * Returns country id based on it's 3letter ISO code
+ *
+ * @param string $iso
+ * @return int
+ */
+ function _getCountryId($iso)
+ {
+ static $cache = null;
+
+ if (!isset($cache)) {
+ $sql = 'SELECT CountryStateId, IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY;
+ $cache = $this->Conn->GetCol($sql, 'IsoCode');
+ }
+
+ return array_key_exists($iso, $cache) ? $cache[$iso] : false;
+ }
+
+ /**
+ * Returns state id based on 3letter country ISO code and 2letter state ISO code
+ *
+ * @param string $country_iso
+ * @param string $state_iso
+ * @return int
+ */
+ function _getStateId($country_iso, $state_iso)
+ {
+ static $cache = null;
+
+ if (!isset($cache)) {
+ $sql = 'SELECT CountryStateId, CONCAT(StateCountryId, "-", IsoCode) AS IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_STATE;
+ $cache = $this->Conn->GetCol($sql, 'IsoCode');
+ }
+
+ $country_id = $this->_getCountryId($country_iso);
+
+ return array_key_exists($country_id . '-' . $state_iso, $cache) ? $cache[$country_id . '-' . $state_iso] : false;
+ }
}
\ No newline at end of file
Index: units/users/users_config.php
===================================================================
--- units/users/users_config.php (revision 13329)
+++ units/users/users_config.php (working copy)
@@ -28,17 +28,6 @@
'ConfigPriority' => 0,
'Hooks' => Array (
Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'u',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnPrepareStates',
- ),
-
- Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'affil',
@@ -374,11 +363,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'default' => ''
),
'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
Index: units/users/users_event_handler.php
===================================================================
--- units/users/users_event_handler.php (revision 13329)
+++ units/users/users_event_handler.php (working copy)
@@ -537,23 +537,6 @@
}
/**
- * Prefill states dropdown with correct values
- *
- * @param kEvent $event
- * @access public
- */
- function OnPrepareStates(&$event)
- {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->PopulateStates($event, 'State', 'Country');
-
- $object =& $event->getObject();
-
- if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
- $object->setLogin();
- }
-
- /**
* Redirects user after succesfull registration to confirmation template (on Front only)
*
* @param kEvent $event
@@ -671,26 +654,32 @@
* Enter description here...
*
* @param kEvent $event
+ * @param bool $dry_run
* @return bool
*/
- function isSubscriberOnly(&$event)
+ function isSubscriberOnly(&$event, $dry_run = false)
{
$event->CallSubEvent('OnSubstituteSubscriber');
- $is_subscriber = false;
- if( $event->getEventParam('is_subscriber_only') )
- {
- $is_subscriber = true;
+ $is_subscriber = $event->getEventParam('is_subscriber_only');
+
+ if ($dry_run) {
+ return $is_subscriber;
+ }
+
+ if ($is_subscriber) {
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->OnUpdate($event);
- if($event->status == erSUCCESS)
- {
+
+ if ($event->status == erSUCCESS) {
$this->OnAfterItemCreate($event);
$object->SendEmailEvents();
- if (!$this->Application->isAdmin && ($event->status == erSUCCESS) && $event->redirect) {
+
+ if (!$this->Application->isAdmin && $event->redirect) {
$this->autoLoginUser($event);
}
}
}
+
return $is_subscriber;
}
@@ -706,9 +695,6 @@
}
if (!$this->isSubscriberOnly($event)) {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->CheckStateField($event, 'State', 'Country');
-
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
if ($this->Application->ConfigValue('User_Password_Auto')) {
@@ -772,18 +758,33 @@
*/
function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if (!$this->isSubscriberOnly($event, true)) {
+ $cs_helper->CheckStateField($event, 'State', 'Country');
+ }
+
$this->_makePasswordRequired($event);
+ $cs_helper->PopulateStates($event, 'State', 'Country');
- $email_as_login = $this->Application->ConfigValue('Email_As_Login');
$object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ( $this->Application->ConfigValue('Email_As_Login') ) {
+ $field_options = $object->GetFieldOptions('Email');
+ $field_options['error_msgs']['unique'] = $this->Application->Phrase('lu_user_and_email_already_exist');
+ $object->SetFieldOptions('Email', $field_options);
+ }
+
+ $object->setLogin();
+
if (!$this->checkBanRules($object)) {
$event->status = erFAIL;
- return false;
+ return ;
}
- if ($email_as_login) {
- $object->Fields['Email']['error_msgs']['unique'] = $this->Application->Phrase('lu_user_and_email_already_exist');
- }
-
}
/**
@@ -871,15 +872,23 @@
$object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- if($items_info)
- {
- list($id,$field_values) = each($items_info);
- if($id > 0) $object->Load($id);
+
+ if ($items_info) {
+ list ($id, $field_values) = each($items_info);
+ if ($id > 0) {
+ $object->Load($id);
+ }
+
$object->SetFieldsFromHash($field_values);
$object->setID($id);
$object->Validate();
}
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'State', 'Country');
+
$event->redirect = false;
}
@@ -1176,12 +1185,30 @@
function OnUpdate(&$event)
{
+ parent::OnUpdate($event);
+
+ $this->setNextTemplate($event);
+ }
+
+ /**
+ * Checks state against country
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->CheckStateField($event, 'State', 'Country');
+ $cs_helper->PopulateStates($event, 'State', 'Country');
- parent::OnUpdate($event);
+ $object =& $event->getObject();
+ /* @var $object UsersItem */
- $this->setNextTemplate($event);
+ $object->setLogin();
}
/**
@@ -1585,7 +1612,7 @@
if ($first_country) {
// update user country dropdown sql
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
- $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (DestId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']);
+ $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (CountryStateId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']);
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
}
@@ -1771,6 +1798,11 @@
/* @var $object kDBItem */
$image_helper->LoadItemImages($object);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'State', 'Country');
}
/**
country_state_refactoring_core_addon1.patch [^] (14,980 bytes) 2010-04-11 08:35
[Show Content]
Property changes on: admin_templates\country_states
___________________________________________________________________
Added: bugtraq:url
+ http://tracker.in-portal.org/view.php?id=%BUGID%
Added: bugtraq:logregex
+ (?:[Bb]ugs?|[Ii]ssues?|[Rr]eports?|[Ff]ixe?s?|[Rr]esolves?)+\s+(?:#?(?:\d+)[,\.\s]*)+
(\d+)
Index: admin_templates/country_states/country_state_edit.tpl
===================================================================
--- admin_templates/country_states/country_state_edit.tpl (revision 0)
+++ admin_templates/country_states/country_state_edit.tpl (revision 0)
@@ -0,0 +1,77 @@
+<inp2:adm_SetPopupSize width="550" height="400"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:country_states" prefix="country-state" title_preset="country_state_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('country-state', '<inp2:country-state_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ cancel_edit('country-state', 'OnCancelEdit','<inp2:country-state_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+ reset_form('country-state', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('country-state', '<inp2:country-state_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('country-state', '<inp2:country-state_NextId/>');
+ }
+ ) );
+
+
+
+ a_toolbar.Render();
+
+ <inp2:m_if check="country-state_IsSingle" >
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <inp2:m_else/>
+ <inp2:m_if check="country-state_IsLast" >
+ a_toolbar.DisableButton('next');
+ </inp2:m_if>
+ <inp2:m_if check="country-state_IsFirst" >
+ a_toolbar.DisableButton('prev');
+ </inp2:m_if>
+ </inp2:m_if>
+ </script>
+ </td>
+
+ <inp2:m_RenderElement name="ml_selector" prefix="country-state"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:country-state_SaveWarning name="grid_save_warning"/>
+<inp2:country-state_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="inp_id_label" prefix="country-state" field="CountryStateId" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="country-state" field="Type" title="la_fld_Type"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="country-state" field="StateCountryId" title="la_fld_StateCountry" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box_ml" prefix="country-state" field="Name" title="la_fld_Name"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="country-state" field="IsoCode" title="la_fld_IsoCode"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="country-state" field="ShortIsoCode" title="la_fld_ShortIsoCode"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: admin_templates/country_states/country_state_list.tpl
===================================================================
--- admin_templates/country_states/country_state_list.tpl (revision 0)
+++ admin_templates/country_states/country_state_list.tpl (revision 0)
@@ -0,0 +1,48 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:country_states" prefix="country-state" title_preset="country_state_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ //do not rename - this function is used in default grid for double click!
+ function edit()
+ {
+ std_edit_item('country-state', 'country_states/country_state_edit');
+ }
+
+ var a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewCountryState" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('country-state', 'country_states/country_state_edit');
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('country-state')
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="country-state" grid="Default"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="country-state" IdField="CountryStateId" grid="Default"/>
+<script type="text/javascript">
+ Grids['country-state'].SetDependantToolbarButtons( new Array('edit','delete') );
+</script>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: kernel/utility/http_query.php
===================================================================
--- kernel/utility/http_query.php (revision 13329)
+++ kernel/utility/http_query.php (working copy)
@@ -234,11 +234,9 @@
function AfterInit()
{
-// $vars = $this->processQueryString($this->Get(ENV_VAR_NAME));
-// $this->AddParams($vars);
-// $this->convertPostEvents();
- // if ($this->Application->RewriteURLs()) {
if ($this->Application->RewriteURLs() || $this->Get('_mod_rw_url_')) {
+ // maybe call onafterconfigread here
+
if (defined('DEBUG_MODE') && $this->Application->isDebugMode()) {
$this->Application->Debugger->profileStart('url_parsing');
$this->processRewriteURL();
@@ -375,7 +373,9 @@
$module_params['editing_mode'] = '';
}
- $env = $this->Application->BuildEnv( $this->Get('t'), $module_params, $passed, false, false );
+ $module_params['__URLENCODE__'] = 1;
+
+ $env = $this->Application->BuildEnv( $this->Get('t'), $module_params, $passed, false, false);
$this->Set(ENV_VAR_NAME, $env);
$_REQUEST['env'] = $_GET['env'] = $env; // for capability with old in-portal code
}
Property changes on: units\country_states
___________________________________________________________________
Added: bugtraq:url
+ http://tracker.in-portal.org/view.php?id=%BUGID%
Added: bugtraq:logregex
+ (?:[Bb]ugs?|[Ii]ssues?|[Rr]eports?|[Ff]ixe?s?|[Rr]esolves?)+\s+(?:#?(?:\d+)[,\.\s]*)+
(\d+)
Index: units/country_states/country_state_eh.php
===================================================================
--- units/country_states/country_state_eh.php (revision 0)
+++ units/country_states/country_state_eh.php (revision 0)
@@ -0,0 +1,85 @@
+<?php
+
+ class CountryStateEventHandler extends kDBEventHandler {
+
+ /**
+ * Applies edit picker filters
+ *
+ * @param kEvent $event
+ */
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ if (($event->Special == 'selected') || ($event->Special == 'available')) {
+ $edit_picker_helper =& $this->Application->recallObject('EditPickerHelper');
+ /* @var $edit_picker_helper EditPickerHelper */
+
+ $edit_picker_helper->applyFilter($event, 'Countries');
+
+ // only countries
+ $object->addFilter('type_filter', '%1$s.Type = ' . DESTINATION_TYPE_COUNTRY);
+ }
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->_setRequired($event);
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+ $this->_setRequired($event);
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function _setRequired(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $object->setRequired('StateCountryId', $object->GetDBField('Type') == DESTINATION_TYPE_STATE);
+ }
+
+ /**
+ * Don't allow to delete countries, that have states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemDelete(&$event)
+ {
+ parent::OnBeforeItemDelete($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if ($cs_helper->CountryHasStates( $object->GetDBField('IsoCode') )) {
+ $event->status = erFAIL;
+ return ;
+ }
+ }
+ }
\ No newline at end of file
Index: units/country_states/country_states_config.php
===================================================================
--- units/country_states/country_states_config.php (revision 0)
+++ units/country_states/country_states_config.php (revision 0)
@@ -0,0 +1,116 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ $config = Array (
+ 'Prefix' => 'country-state',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CountryStateEventHandler', 'file' => 'country_state_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+
+ 'IDField' => 'CountryStateId',
+
+ 'TableName' => TABLE_PREFIX . 'CountryStates',
+
+ 'TitleField' => 'Translation',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('country-state' => '!la_title_AddingCountryState!'),
+ 'edit_status_labels' => Array ('country-state' => '!la_title_EditingCountryState!'),
+ ),
+
+ 'country_state_list' => Array (
+ 'prefixes' => Array ('country-state_List'), 'format' => "!la_title_CountryStates!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'country_state_edit' => Array (
+ 'prefixes' => Array ('country-state'), 'format' => "#country-state_status# '#country-state_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array('main' => 'in-portal:country_states'),
+
+ 'Sections' => Array (
+ 'in-portal:country_states' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_country_states',
+ 'label' => 'la_title_CountryStates',
+ 'url' => Array('t' => 'country_states/country_state_list', 'pass' => 'm'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 10,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Type' => 'asc', 'Translation' => 'asc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'Translation' => 'l%2$s_Name',
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Country', 2 => 'la_opt_State'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 1
+ ),
+
+ 'StateCountryId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'CountryStates WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' ORDER BY l%2$s_Name', 'option_key_field' => 'CountryStateId', 'option_title_field' => 'l%2$s_Name',
+ 'default' => NULL
+ ),
+
+ 'Name' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+
+ 'IsoCode' => Array ('type' => 'string', 'max_len' => 3, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'ShortIsoCode' => Array ('type' => 'string', 'max_len' => 2, 'default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Translation' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('title' => 'la_col_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Name' => Array ('title' => 'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'IsoCode' => Array ('title' => 'la_col_IsoCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Type' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'StateCountryId' => Array ('title' => 'la_col_StateCountry', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
+ 'ShortIsoCode' => Array ('title' => 'la_col_ShortIsoCode', 'filter_block' => 'grid_like_filter', 'width' => 125, ),
+ ),
+ ),
+ ),
+ );
\ No newline at end of file
Index: units/helpers/mod_rewrite_helper.php
===================================================================
--- units/helpers/mod_rewrite_helper.php (revision 13329)
+++ units/helpers/mod_rewrite_helper.php (working copy)
@@ -1009,7 +1009,8 @@
{
static $init_done = false;
- if ($init_done) {
+ if ($init_done || count($this->Application->RewriteListeners) == 0) {
+ // not inited OR mod-rewrite url with missing config cache
return ;
}
country_state_refactoring_modules.patch [^] (144,694 bytes) 2010-04-11 08:35
[Show Content]
Index: in-auction/install/install_data.sql
===================================================================
--- in-auction/install/install_data.sql (revision 13329)
+++ in-auction/install/install_data.sql (working copy)
@@ -1,6 +1,6 @@
# Section "ebay:configuration_feedbacks":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_EnableFeedback', '0', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_title_eBay_EnableAutomaticFeedback', 'checkbox', '', '', 1, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackEvent', '3', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackEvent', 'select', '', '1=la_PaymentReceived,2=la_ItemShipped,3=la_PaymentReceivedOrItemShipped,4=la_WhenBuyerLeavesFeedback', 2, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackEvent', '3', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackEvent', 'select', '', '1=la_PaymentReceived||2=la_ItemShipped||3=la_PaymentReceivedOrItemShipped||4=la_WhenBuyerLeavesFeedback', 2, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_EnableFeedbackRotation', '1', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_EnableFeedbackRotation', 'checkbox', '', '', 3, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackMessage1', '', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackMessage1', 'textarea', '', 'COLS=40 ROWS=5', 4, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackMessage2', '', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackMessage2', 'textarea', '', 'COLS=40 ROWS=5', 5, 0, 0);
@@ -14,7 +14,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackNotificationCCtoSeller', '1', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_Notifications', 'la_config_eBay_FeedbackNotificationCCtoSeller', 'checkbox', '', '', 13, 0, 0);
# Section "eBay:configuration_general":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ConnectionMode', '2', 'In-Auction', 'eBay:configuration_general', 'la_title_General', 'la_config_eBay_ConnectionMode', 'radio', '', '1=la_opt_Production,2=la_opt_Sandbox', 10.01, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ConnectionMode', '2', 'In-Auction', 'eBay:configuration_general', 'la_title_General', 'la_config_eBay_ConnectionMode', 'radio', '', '1=la_opt_Production||2=la_opt_Sandbox', 10.01, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_CompatibilityLevel', '549', 'In-Auction', 'eBay:configuration_general', 'la_title_General', 'la_config_eBay_CompatibilityLevel', 'text', '', '', 10.02, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_Production_NewAuthToken', NULL, 'In-Auction', 'eBay:configuration_general', 'la_title_ProductionSettings', 'la_config_eBay_NewAuthToken', 'textarea', '', 'COLS=40 ROWS=5', 20.01, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_Production_SOAPGateway', 'https://api.ebay.com/wsapi', 'In-Auction', 'eBay:configuration_general', 'la_title_ProductionSettings', 'la_config_eBay_SOAPGateway', 'text', '', 'size="40"', 20.05, 0, 0);
@@ -52,7 +52,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ReturnRequestDays', '32031', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_ReturnRequestDays', 'select', '', '<SQL+>SELECT FieldOptionKey AS OptionValue , FieldOptionTitle AS OptionName FROM <PREFIX>eBayFieldOptions WHERE FieldName="ReturnRequestDays"</SQL>', 30.243, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ReturnPolicyDetails', 'No Excuses', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_ReturnPolicyDetails', 'textarea', '', 'COLS=40 ROWS=5', 30.25, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_PaymentInstructions', 'Payment Instructions', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_PaymentInstructions', 'textarea', '', 'COLS=40 ROWS=5', 30.27, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_InsuranceType', '1', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_InsuranceType', 'select', '', '1=+Percent,2=+Flat', 55, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_InsuranceType', '1', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_InsuranceType', 'select', '', '1=+Percent||2=+Flat', 55, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_InsuranceAmount', '5', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_InsuranceAmount', 'text', '', 'size="5"', 56, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_UseInsurance', 'IncludedInShippingHandling', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_UseInsurance', 'select', '', '<SQL+>SELECT FieldOptionKey AS OptionValue , FieldOptionTitle AS OptionName FROM <PREFIX>eBayFieldOptions WHERE FieldName="InsuranceOption"</SQL>', 57, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_GetItFast', '0', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_GetItFast', 'checkbox', '', '', 60, 0, 0);
Index: in-auction/units/listing/listing_eh.php
===================================================================
--- in-auction/units/listing/listing_eh.php (revision 13329)
+++ in-auction/units/listing/listing_eh.php (working copy)
@@ -507,12 +507,12 @@
$location = trim($location, ',');
$country = $this->Application->ConfigValue('Comm_Shipping_Country'); // as USA
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
// Convert to 2-symbol - as US
- $sql = 'SELECT DestAbbr2
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr = '.$this->Conn->qstr($country).'
- ';
- $country = $this->Conn->GetOne($sql);
+ $country = $cs_helper->getCountryIso($country);
$a_item = Array(
'Currency'=> 'USD',
Index: in-auction/units/sections/ebay_eh.php
===================================================================
--- in-auction/units/sections/ebay_eh.php (revision 13329)
+++ in-auction/units/sections/ebay_eh.php (working copy)
@@ -1942,13 +1942,12 @@
$ShippingAddress =& $Transaction->Buyer->BuyerInfo->ShippingAddress;
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
// Country transform to 3-symbol code
- $sql = 'SELECT DestAbbr
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr2 = '.$this->Conn->qstr($ShippingAddress->Country);
- $country = $this->Conn->GetOne($sql);
+ $country = $cs_helper->getCountryIso($ShippingAddress->Country, true);
-
$Order->SetDBField('BillingTo', $ShippingAddress->Name);
$Order->SetDBField('BillingPhone', $ShippingAddress->Phone);
$Order->SetDBField('BillingEmail', $User->GetDBField('Email'));
Index: in-bulletin/install/install_data.sql
===================================================================
--- in-bulletin/install/install_data.sql (revision 13329)
+++ in-bulletin/install/install_data.sql (working copy)
@@ -1,10 +1,10 @@
# Section "in-bulletin:configuration_output":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_Highlight_OpenTag', '<span class="match">', 'In-Bulletin', 'in-bulletin:configuration_output', '', '', '', NULL, NULL, 0, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_Highlight_CloseTag', '</span>', 'In-Bulletin', 'in-bulletin:configuration_output', '', '', '', NULL, NULL, 0, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField', 'LastPostDate', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'TopicText=la_opt_TopicText,Posts=la_opt_NumberOfPosts,CreatedOn=la_opt_CreatedOn,LastPostDate=la_opt_LastUpdated,Views=la_opt_TopicViews,CachedRating=la_opt_Rating,LastPoser=la_opt_LastPoster,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder2', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.02, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField2', 'Posts', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'TopicText=la_opt_TopicText,Posts=la_opt_NumberOfPosts,CreatedOn=la_opt_CreatedOn,LastPostDate=la_opt_LastUpdated,Views=la_opt_TopicViews,CachedRating=la_opt_Rating,LastPoser=la_opt_LastPoster,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField', 'LastPostDate', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'TopicText=la_opt_TopicText||Posts=la_opt_NumberOfPosts||CreatedOn=la_opt_CreatedOn||LastPostDate=la_opt_LastUpdated||Views=la_opt_TopicViews||CachedRating=la_opt_Rating||LastPoser=la_opt_LastPoster||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder2', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField2', 'Posts', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'TopicText=la_opt_TopicText||Posts=la_opt_NumberOfPosts||CreatedOn=la_opt_CreatedOn||LastPostDate=la_opt_LastUpdated||Views=la_opt_TopicViews||CachedRating=la_opt_Rating||LastPoser=la_opt_LastPoster||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Topics', '5', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_perpage_prompt', 'text', '', '', 10.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Topics_Short', '3', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_perpage_short_prompt', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_NewDays', '6', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_newdays_prompt', 'text', '', '', 10.05, 0, 1);
@@ -12,9 +12,9 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_MinPopVotes', '8', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_fld_Topic_MinPopVotes', 'text', '', '', 10.07, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_MaxHotNumber', '3', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_fld_Topic_MaxHotNumber', 'text', '', '', 10.08, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_EditorPicksAbove', '1', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_editorpicksabove_prompt', 'checkbox', '', '', 10.09, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_ReviewDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.1, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_ReviewDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.1, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_ReviewDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.1, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_RatingDelay_Interval', '3600', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.11, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_RatingDelay_Interval', '3600', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.11, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_RatingDelay_Value', '1', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.11, 1, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AutoTopicLockPosts', '0', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_PostsToLock', 'text', NULL, NULL, 10.12, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Postings', '25', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_posts_subheading', 'la_posts_perpage_prompt', 'text', '', '', 20.01, 0, 1);
@@ -28,7 +28,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'bb_FullImageWidth', '450', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 50.04, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'bb_FullImageHeight', '450', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 50.05, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'poll_CommentDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'text', '', 'style="width: 50px;"', 60.1, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'poll_CommentDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 60.2, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'poll_CommentDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 60.2, 2, 1);
# Section "in-bulletin:configuration_search":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Increase_topics', '30', 'In-Bulletin', 'in-bulletin:configuration_search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1);
Index: in-commerce/admin_templates/discounts/gift_certificate_edit.tpl
===================================================================
--- in-commerce/admin_templates/discounts/gift_certificate_edit.tpl (revision 13329)
+++ in-commerce/admin_templates/discounts/gift_certificate_edit.tpl (working copy)
@@ -140,7 +140,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientCity" title="la_fld_City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientState" title="la_fld_State"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="gc" field="RecipientCountry" title="la_fld_Country" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
</inp2:m_if>
Index: in-commerce/admin_templates/shipping/zone_edit.tpl
===================================================================
--- in-commerce/admin_templates/shipping/zone_edit.tpl (revision 13329)
+++ in-commerce/admin_templates/shipping/zone_edit.tpl (working copy)
@@ -56,7 +56,7 @@
</tbody>
</table>
-<inp2:m_DefineElement name="destination_block">
+<inp2:m_DefineElement name="destination_block" selected="">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
</inp2:m_DefineElement>
@@ -160,6 +160,9 @@
<inp2:z_SaveWarning name="grid_save_warning"/>
<inp2:z_ErrorWarning name="form_error_warning"/>
+<!--## used for OnCountryChange event ##-->
+<input type="hidden" name="z_id" value="<inp2:z_Field name='ZoneID'/>"/>
+
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_ShippingZone!"/>
@@ -171,17 +174,15 @@
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="z" field="CODallowed" title="!la_fld_CODallowed!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="z" field="Type" title="!la_fld_Zone_Type!"/>
- <!-- <inp2:z_ShowDestinations block="destination_block" /> -->
-
- <inp2:m_if check="z_fieldequals" field="Type" value="1" >
+ <inp2:m_if check="z_Field" field="Type" equals_to="1" db="db">
<inp2:m_RenderElement name="countries_multiple" prefix="z" />
</inp2:m_if>
- <inp2:m_if check="z_fieldequals" field="Type" value="2" >
+ <inp2:m_if check="z_Field" field="Type" equals_to="2" db="db">
<inp2:m_RenderElement name="states_multiple" prefix="z" />
</inp2:m_if>
- <inp2:m_if check="z_fieldequals" field="Type" value="3" >
+ <inp2:m_if check="z_Field" field="Type" equals_to="3" db="db">
<inp2:m_RenderElement name="zips_multiple" prefix="z" />
</inp2:m_if>
@@ -193,8 +194,7 @@
<input type="hidden" value="" name="selected_destinations" id="selected_destinations">
<input type="hidden" name="z_OriginalSaveEvent" id="z_OriginalSaveEvent" value="<inp2:z_SaveEvent/>">
-<input type="hidden" name="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" id="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" value="<inp2:z_field field="ShippingTypeID"/>">
-<input type="hidden" name="z_id" id="z_id" value="<inp2:z_Field field="ZoneID"/>">
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="z" field="ShippingTypeID"/>
<script>
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_1').onchange = change_type;
Index: in-commerce/admin_templates/taxes/taxes_edit.tpl
===================================================================
--- in-commerce/admin_templates/taxes/taxes_edit.tpl (revision 13329)
+++ in-commerce/admin_templates/taxes/taxes_edit.tpl (working copy)
@@ -54,7 +54,7 @@
</tbody>
</table>
-<inp2:m_DefineElement name="destination_block">
+<inp2:m_DefineElement name="destination_block" selected="">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
</inp2:m_DefineElement>
@@ -173,17 +173,15 @@
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="tax" field="ApplyToProcessing" title="!la_fld_TaxApplyToProcessing!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="tax" field="Type" title="!la_fld_ZoneType!"/>
- <!-- <inp2:tax_ShowDestinations block="destination_block" /> -->
-
- <inp2:m_if check="tax_fieldequals" field="Type" value="1" >
+ <inp2:m_if check="tax_Field" field="Type" equals_to="1" db="db">
<inp2:m_RenderElement name="countries_multiple" prefix="tax" />
</inp2:m_if>
- <inp2:m_if check="tax_fieldequals" field="Type" value="2" >
+ <inp2:m_if check="tax_Field" field="Type" equals_to="2" db="db">
<inp2:m_RenderElement name="states_multiple" prefix="tax" />
</inp2:m_if>
- <inp2:m_if check="tax_fieldequals" field="Type" value="3" >
+ <inp2:m_if check="tax_Field" field="Type" equals_to="3" db="db">
<inp2:m_RenderElement name="zips_multiple" prefix="tax" />
</inp2:m_if>
Index: in-commerce/install/install_data.sql
===================================================================
--- in-commerce/install/install_data.sql (revision 13329)
+++ in-commerce/install/install_data.sql (working copy)
@@ -10,13 +10,13 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_AddressLine2', 'text', NULL, NULL, 20.02, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_City', 'text', NULL, NULL, 20.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_ZIP', 'text', NULL, NULL, 20.04, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 20.05, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 20.05, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_State', 'text', NULL, '', 20.06, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine1', 'text', NULL, NULL, 30.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine2', 'text', NULL, NULL, 30.02, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_City', 'text', NULL, NULL, 30.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_ZIP', 'text', NULL, NULL, 30.04, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 30.05, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 30.05, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_State', 'text', NULL, NULL, 30.06, 0, 1);
# Section "in-commerce:general":
@@ -32,18 +32,18 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxAddresses', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaxAddresses', 'text', NULL, NULL, 10.1, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_MaskProcessedCreditCards', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaskProcessedCreditCards', 'checkbox', NULL, NULL, 10.11, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AllowOrderingInNonPrimaryCurrency', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_AllowOrderingInNonPrimaryCurrency', 'checkbox', NULL, NULL, 20.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank,3=la_EuropeanCentralBank,1=la_BankOfLatvia', 20.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank||3=la_EuropeanCentralBank||1=la_BankOfLatvia', 20.02, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_DefaultCouponDuration', '14', 'In-Commerce', 'in-commerce:general', 'la_Text_Coupons', 'la_conf_DefaultCouponDuration', 'text', NULL, NULL, 30.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RegisterAsAffiliate', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_register_as_affiliate', 'checkbox', NULL, '', 40.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session,2=la_opt_PermanentCookie', 40.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session||2=la_opt_PermanentCookie', 40.02, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateCookieDuration', '30', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_cookie_duration', 'text', NULL, '', 40.03, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal', 50, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary||2=la_opt_PriceCalculationByOptimal', 50, 0, 1);
# Section "in-commerce:output":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName CONCAT("cust_" FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName CONCAT("cust_" FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products', 'text', NULL, NULL, 10.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products_Shortlist', 'text', NULL, NULL, 10.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_NewDays', '7', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_DaysToBeNew', 'text', NULL, NULL, 10.05, 0, 1);
@@ -52,11 +52,11 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MaxHotNumber', '5', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MaxHotNumber', 'text', NULL, NULL, 10.08, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'products_EditorPicksAboveRegular', '1', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_EditorPicksAboveRegular', 'checkbox', NULL, NULL, 10.09, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.1, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.1, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.1, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ShowProductImagesInOrders', '0', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_config_ShowProductImagesInOrders', 'checkbox', NULL, NULL, 10.11, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Reviews', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_config_PerpageReviews', 'text', NULL, NULL, 20.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 20.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 20.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 20.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers', 'text', NULL, NULL, 30.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers_Short', 'text', NULL, NULL, 30.02, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_CategoryTemplate', '/in-commerce/designs/section', 'In-Commerce', 'in-commerce:output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0);
Index: in-commerce/install/upgrades.sql
===================================================================
--- in-commerce/install/upgrades.sql (revision 13329)
+++ in-commerce/install/upgrades.sql (working copy)
@@ -122,4 +122,8 @@
# ===== v 5.0.2 =====
# ===== v 5.1.0-B1 =====
-UPDATE Modules SET Path = 'modules/in-commerce/' WHERE `Name` = 'In-Commerce';
\ No newline at end of file
+UPDATE Modules SET Path = 'modules/in-commerce/' WHERE `Name` = 'In-Commerce';
+
+UPDATE ConfigurationValues
+SET ValueList = '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
+WHERE ValueList = '0=lu_none||<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>';
\ No newline at end of file
Index: in-commerce/units/addresses/addresses_config.php
===================================================================
--- in-commerce/units/addresses/addresses_config.php (revision 13329)
+++ in-commerce/units/addresses/addresses_config.php (working copy)
@@ -22,17 +22,6 @@
'AutoLoad' => true,
'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnPrepareStates',
- ),
-
// create/update profile addres (in addresses table)
Array(
'Mode' => hAFTER,
@@ -108,11 +97,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => '1', 'required' => 1, 'default' => ''
),
Index: in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- in-commerce/units/addresses/addresses_event_handler.php (revision 13329)
+++ in-commerce/units/addresses/addresses_event_handler.php (working copy)
@@ -88,17 +88,18 @@
return ;
}
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->CheckStateField($event, 'State', 'Country');
+ $cs_helper->PopulateStates($event, 'State', 'Country');
+
$this->processLastUsed($object, 'Shipping');
$this->processLastUsed($object, 'Billing');
}
function OnUpdate(&$event)
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- /* @var $cs_helper kCountryStatesHelper */
-
- $cs_helper->CheckStateField($event, 'State', 'Country');
-
parent::OnUpdate($event);
$this->setNextTemplate($event);
@@ -111,11 +112,6 @@
*/
function OnCreate(&$event)
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- /* @var $cs_helper kCountryStatesHelper */
-
- $cs_helper->CheckStateField($event, 'State', 'Country');
-
parent::OnCreate($event);
$this->setNextTemplate($event);
@@ -140,22 +136,20 @@
}
/**
- * [HOOK] Prefill states dropdown with correct values
+ * Fills states for object country
*
* @param kEvent $event
- * @access public
*/
- function OnPrepareStates(&$event)
+ function OnAfterItemLoad(&$event)
{
+ parent::OnAfterItemLoad($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'State', 'Country');
-
- $object =& $event->MasterEvent->getObject();
-
- if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
}
-
/**
* [HOOK] Update PortalUser table when address marked as ProfileAddress is changed via addr prefix object
*
@@ -303,6 +297,12 @@
$object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->CheckStateField($event, 'State', 'Country');
+ $cs_helper->PopulateStates($event, 'State', 'Country');
+
$this->processLastUsed($object, 'Shipping');
$this->processLastUsed($object, 'Billing');
}
Index: in-commerce/units/gateways/gw_classes/authorizenet.php
===================================================================
--- in-commerce/units/gateways/gw_classes/authorizenet.php (revision 13329)
+++ in-commerce/units/gateways/gw_classes/authorizenet.php (working copy)
@@ -53,9 +53,11 @@
}
$post_fields['x_email'] = $billing_email;
$post_fields['x_phone'] = $item_data['BillingPhone'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $post_fields['x_country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $post_fields['x_country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$post_fields['x_cust_id'] = $item_data['PortalUserId'];
$post_fields['x_invoice_num'] = $item_data['OrderNumber'];
$post_fields['x_description'] = 'Invoice #'.$item_data['OrderNumber'];
Index: in-commerce/units/gateways/gw_classes/google_checkout.php
===================================================================
--- in-commerce/units/gateways/gw_classes/google_checkout.php (revision 13329)
+++ in-commerce/units/gateways/gw_classes/google_checkout.php (working copy)
@@ -363,8 +363,11 @@
'ShippingZip' => $address_info['POSTAL-CODE'],
);
- $shipping_address['ShippingCountry'] = $this->getCountryISO($address_info['COUNTRY-CODE']);
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+ $shipping_address['ShippingCountry'] = $cs_helper->getCountryIso($address_info['COUNTRY-CODE'], true);
+
$order->SetDBFieldsFromHash($shipping_address);
$order->Update();
@@ -514,6 +517,10 @@
'REGION' => 'State',
'POSTAL-CODE' => 'Zip',
);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
foreach ($user_address as $field_prefix => $address_details) {
foreach ($address_mapping as $src_field => $dst_field) {
$order->SetDBField($field_prefix.$dst_field, $address_details[$src_field]);
@@ -523,7 +530,7 @@
$order->SetDBField($field_prefix.'Phone', '-'); // required field
}
- $order->SetDBField($field_prefix.'Country', $this->getCountryISO($address_details['COUNTRY-CODE']));
+ $order->SetDBField( $field_prefix.'Country', $cs_helper->getCountryIso($address_details['COUNTRY-CODE'], true) );
}
$order->SetDBField('OnHold', 1);
@@ -808,20 +815,6 @@
}
/**
- * Returns 3 symbols ISO code from 2 symbols ISO code
- *
- * @param string $country_code
- * @return string
- */
- function getCountryISO($country_code)
- {
- $sql = 'SELECT DestAbbr
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr2 = '.$this->Conn->qstr($country_code);
- return $this->Conn->GetOne($sql);
- }
-
- /**
* Retrieves shipping types available for given order
*
* @param OrdersItem $order
Index: in-commerce/units/gateways/gw_classes/multicards.php
===================================================================
--- in-commerce/units/gateways/gw_classes/multicards.php (revision 13329)
+++ in-commerce/units/gateways/gw_classes/multicards.php (working copy)
@@ -91,8 +91,6 @@
$ret['cust_city'] = $item_data['BillingCity'];
$ret['cust_state'] = $item_data['BillingState'];
$ret['cust_zip'] = $item_data['BillingZip'] ? $item_data['BillingZip'] : '99999';
-// $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
-// $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
$ret['cust_country'] = $item_data['BillingCountry'];
$ret['user1'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
Index: in-commerce/units/gateways/gw_classes/paymentech.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paymentech.php (revision 13329)
+++ in-commerce/units/gateways/gw_classes/paymentech.php (working copy)
@@ -72,9 +72,11 @@
'ShippingRef' => '',
);
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $data['AVScountryCode'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+ $data['AVScountryCode'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
+
if ($data['AVScountryCode'] != 'US') {
$data['AVSstate'] = '';
}
Index: in-commerce/units/gateways/gw_classes/paypal.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paypal.php (revision 13329)
+++ in-commerce/units/gateways/gw_classes/paypal.php (working copy)
@@ -80,9 +80,11 @@
$ret['city'] = $item_data['BillingCity'];
$ret['state'] = $item_data['BillingState'];
$ret['zip'] = $item_data['BillingZip'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'];
$ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button
return $ret;
@@ -142,9 +144,11 @@
$ret['city'] = $item_data['BillingCity'];
$ret['state'] = $item_data['BillingState'];
$ret['zip'] = $item_data['BillingZip'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'].'&payment_type_id='.$tag_params['payment_type_id'];
$ret['cmd'] = '_xclick-subscriptions'; // act as "Buy Now" PayPal button
Index: in-commerce/units/gateways/gw_classes/paypal_direct.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paypal_direct.php (revision 13329)
+++ in-commerce/units/gateways/gw_classes/paypal_direct.php (working copy)
@@ -76,8 +76,11 @@
$post_fields['STREET2'] = $item_data['BillingAddress2'];
$post_fields['CITY'] = $item_data['BillingCity'];
$post_fields['STATE'] = $item_data['BillingState'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $post_fields['COUNTRYCODE'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $post_fields['COUNTRYCODE'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$post_fields['ZIP'] = $item_data['BillingZip'];
$post_fields['INVNUM'] = $item_data['OrderNumber'];
$post_fields['CUSTOM'] = $item_data['PortalUserId'];
@@ -115,8 +118,7 @@
}
$post_fields['x_email'] = $billing_email;
$post_fields['x_phone'] = $item_data['BillingPhone'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $post_fields['x_country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $post_fields['x_country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$post_fields['x_cust_id'] = $item_data['PortalUserId'];
$post_fields['x_invoice_num'] = $item_data['OrderNumber'];
Index: in-commerce/units/gateways/gw_classes/worldpay.php
===================================================================
--- in-commerce/units/gateways/gw_classes/worldpay.php (revision 13329)
+++ in-commerce/units/gateways/gw_classes/worldpay.php (working copy)
@@ -74,8 +74,10 @@
}
$ret['postcode'] = $item_data['BillingZip'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$ret['tel'] = $item_data['BillingPhone'];
$ret['fax'] = $item_data['BillingFax'];
$ret['email'] = $item_data['BillingEmail'];
Index: in-commerce/units/gift_certificates/gift_certificates_config.php
===================================================================
--- in-commerce/units/gift_certificates/gift_certificates_config.php (revision 13329)
+++ in-commerce/units/gift_certificates/gift_certificates_config.php (working copy)
@@ -112,11 +112,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'required' => 1, 'default' => 'USA'
),
Index: in-commerce/units/manufacturers/manufacturers_config.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_config.php (revision 13329)
+++ in-commerce/units/manufacturers/manufacturers_config.php (working copy)
@@ -20,18 +20,7 @@
'EventHandlerClass' => Array('class'=>'ManufacturersEventHandler','file'=>'manufacturers_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ManufacturersTagProcessor','file'=>'manufacturers_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'manuf',
- 'HookToSpecial' => '',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnPrepareStates',
- ),
- ),
+
'QueryString' => Array(
1 => 'id',
2 => 'Page',
@@ -116,11 +105,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', 'default' => null
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name', 'default' => null
),
),
Index: in-commerce/units/manufacturers/manufacturers_event_handler.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_event_handler.php (revision 13329)
+++ in-commerce/units/manufacturers/manufacturers_event_handler.php (working copy)
@@ -79,38 +79,45 @@
* @param kEvent $event
* @access public
*/
- function OnPrepareStates(&$event)
+ function OnAfterItemLoad(&$event)
{
+ parent::OnAfterItemLoad($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'State', 'Country');
-
- $object =& $event->getObject();
-
- if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
}
- function OnUpdate(&$event)
+ /**
+ * Processes states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->CheckStateField($event, 'State', 'Country');
-
- parent::OnUpdate($event);
+ $cs_helper->PopulateStates($event, 'State', 'Country');
}
- function OnCreate(&$event)
+ /**
+ * Processes states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->CheckStateField($event, 'State', 'Country');
+ /* @var $cs_helper kCountryStatesHelper */
- parent::OnCreate($event);
- }
-
- function OnPreSave(&$event)
- {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$cs_helper->CheckStateField($event, 'State', 'Country');
-
- parent::OnPreSave($event);
+ $cs_helper->PopulateStates($event, 'State', 'Country');
}
-
}
\ No newline at end of file
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 13329)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -334,11 +334,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'default' => 'USA'
),
'VAT' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.2f'),
@@ -366,11 +365,10 @@
'ShippingCountry' => Array(
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'default' => 'USA'
),
'ShippingType' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ShippingType WHERE Status = 1','option_key_field'=>'ShippingID','option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
Index: in-commerce/units/orders/orders_event_handler.php
===================================================================
--- in-commerce/units/orders/orders_event_handler.php (revision 13329)
+++ in-commerce/units/orders/orders_event_handler.php (working copy)
@@ -171,6 +171,8 @@
if ($shipping_address_id || $billing_address_id) {
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$address =& $this->Application->recallObject('addr.-item','addr', Array('skip_autoload' => true));
$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$addr_list->Query();
@@ -592,16 +594,6 @@
{
$this->setBillingAddress($event);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
-
- $object =& $event->getObject();
- if( $object->HasTangibleItems() )
- {
- $cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
- }
-
- $cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
-
parent::OnUpdate($event);
if ($this->Application->isAdminUser) {
@@ -616,6 +608,9 @@
}
else {
// strange: recalculate total amount on error
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
$object->SetDBField('TotalAmount', $object->getTotalAmount());
}
}
@@ -664,28 +659,6 @@
}
}
- /**
- * Enter description here...
- *
- * @param kEvent $event
- */
- function OnPreSave(&$event)
- {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
-
- $object =& $event->getObject();
- if ( $object->GetID() !== false)
- {
- if( $object->HasTangibleItems() )
- {
- $cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
- }
- $cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
- }
-
- parent::OnPreSave($event);
- }
-
function OnUpdateCart(&$event)
{
$this->Application->HandleEvent($items_event, 'orditems:OnUpdate');
@@ -1199,9 +1172,8 @@
foreach ($req_fields as $field) {
$order->Fields[$field]['required'] = $has_tangibles;
}
- if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'ShippingCountry') )) {
- $order->Fields['ShippingState']['required'] = true; // $has_tangibles
- }
+
+ $order->setRequired('ShippingState', $cs_helper->CountryHasStates( $field_values['ShippingCountry'] ));
}
// billing address required fields
@@ -1210,9 +1182,8 @@
foreach ($req_fields as $field) {
$order->Fields[$field]['required'] = true;
}
- if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'BillingCountry') )) {
- $order->Fields['BillingState']['required'] = true;
- }
+
+ $order->setRequired('BillingState', $cs_helper->CountryHasStates( $field_values['BillingCountry'] ));
}
$check_cc = $this->Application->GetVar('check_credit_card');
@@ -1965,6 +1936,8 @@
$object->SetDBField('PaymentCVV2', $this->Application->RecallVar('CVV2Code') );
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
@@ -1975,19 +1948,49 @@
}
/**
+ * Processes states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
+ $cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
+ }
+
+ /**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
+ $object =& $event->getObject();
+ /* @var $object OrdersItem */
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
- $object = &$event->getObject();
- if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return;
+ if ($object->HasTangibleItems()) {
+ $cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry', false);
+ }
+ $cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry', false);
+
+ if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) {
+ return ;
+ }
+
$this->CheckUser($event);
if(!$object->GetDBField('OrderIP'))
{
Index: in-commerce/units/orders/orders_item.php
===================================================================
--- in-commerce/units/orders/orders_item.php (revision 13329)
+++ in-commerce/units/orders/orders_item.php (working copy)
@@ -172,14 +172,15 @@
*/
function getTaxPercent()
{
- $sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType = %s AND DestAbbr = %s';
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
- $shipping_country_id = (int) $this->Conn->GetOne( sprintf($sql, 1, $this->Conn->qstr($this->GetDBField('ShippingCountry') ) ) );
- $shipping_state_id = (int) $this->Conn->GetOne( sprintf($sql, 2, $this->Conn->qstr($this->GetDBField('ShippingState') ) ) );
+ $shipping_country_id = $cs_helper->getCountryStateId($this->GetDBField('ShippingCountry'), DESTINATION_TYPE_COUNTRY);
+ $shipping_state_id = $cs_helper->getCountryStateId($this->GetDBField('ShippingState'), DESTINATION_TYPE_STATE);
$shipping_zip = (string) $this->GetDBField('ShippingZip');
- $billing_country_id = (int) $this->Conn->GetOne( sprintf($sql, 1, $this->Conn->qstr($this->GetDBField('BillingCountry') ) ) );
- $billing_state_id = (int) $this->Conn->GetOne( sprintf($sql, 2, $this->Conn->qstr($this->GetDBField('BillingState') ) ) );
+ $billing_country_id = $cs_helper->getCountryStateId($this->GetDBField('BillingCountry'), DESTINATION_TYPE_COUNTRY);
+ $billing_state_id = $cs_helper->getCountryStateId($this->GetDBField('BillingState'), DESTINATION_TYPE_STATE);
$billing_zip = (string) $this->GetDBField('BillingZip');
/*
Index: in-commerce/units/orders/orders_tag_processor.php
===================================================================
--- in-commerce/units/orders/orders_tag_processor.php (revision 13329)
+++ in-commerce/units/orders/orders_tag_processor.php (working copy)
@@ -51,10 +51,10 @@
foreach ($fields as $field) {
$value = $this->Application->ConfigValue('Comm_'.$field);
if ($field == 'Country') {
- $sql = 'SELECT DestName
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr = '.$this->Conn->qstr($value);
- $value = $this->Application->Phrase( $this->Conn->GetOne($sql) );
+ $sql = 'SELECT l' . $this->Application->GetVar('m_lang') . '_Name
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE IsoCode = ' . $this->Conn->qstr($value);
+ $value = $this->Conn->GetOne($sql);
}
if ($field == 'Country' && $value) {
@@ -814,7 +814,7 @@
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
- $cs_helper->PopulateStates(new kEvent('u:OnBuild') , 'State', 'Country');
+ $cs_helper->PopulateStates(new kEvent('u:OnBuild'), 'State', 'Country');
}
function UserLink($params)
Index: in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php
===================================================================
--- in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php (revision 13329)
+++ in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php (working copy)
@@ -38,12 +38,16 @@
return $shipping_types;
}
- function QueryShippingCost($user_country_abbr, $user_state_abbr, $user_zip, $weight, $items, $amount, $shipping_type=null, $promo_params)
+ function QueryShippingCost($user_country, $user_state, $user_zip, $weight, $items, $amount, $shipping_type=null, $promo_params)
{
$db =& $this->Application->GetADODBConnection();
- $user_country_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1 AND DestAbbr = '.$db->qstr($user_country_abbr));
- $user_state_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestAbbr = '.$db->qstr($user_state_abbr));
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $user_country_id = $cs_helper->getCountryStateId($user_country, DESTINATION_TYPE_COUNTRY);
+ $user_state_id = $cs_helper->getCountryStateId($user_state, DESTINATION_TYPE_STATE);
+
$user_zip = (string) $user_zip;
$weight = (float) $weight;
$items = (int) $items;
Index: in-commerce/units/shipping_quote_engines/intershipper.php
===================================================================
--- in-commerce/units/shipping_quote_engines/intershipper.php (revision 13329)
+++ in-commerce/units/shipping_quote_engines/intershipper.php (working copy)
@@ -153,8 +153,7 @@
}
}
- if(isset($custom_params['orig_addr1']))
- {
+ if (isset($custom_params['orig_addr1'])) {
$params['orig_name'] = $custom_params['orig_name'];
$params['orig_addr1'] = $custom_params['orig_addr1'];
$params['orig_addr2'] = $custom_params['orig_addr2'];
@@ -163,8 +162,7 @@
$params['orig_postal'] = $custom_params['orig_postal'];
$params['orig_country'] = $custom_params['orig_country'];
}
- else
- {
+ else {
$params['orig_name'] = $this->Application->ConfigValue('Comm_StoreName');
$params['orig_addr1'] = $this->Application->ConfigValue('Comm_Shipping_AddressLine1');
$params['orig_addr2'] = $this->Application->ConfigValue('Comm_Shipping_AddressLine2');
@@ -173,21 +171,23 @@
$params['orig_postal'] = $this->Application->ConfigValue('Comm_Shipping_ZIP');
$params['orig_country'] = $this->Application->ConfigValue('Comm_Shipping_Country');
}
- if( mb_strlen($params['orig_country']) == 3)
- {
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$params['orig_country'].'"';
- $params['orig_country'] = $db->GetOne($sql);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if (strlen($params['orig_country']) == 3) {
+ // got 3symbol ISO code -> resolve to 2symbol ISO code
+ $params['orig_country'] = $cs_helper->getCountryIso( $params['orig_country'] );
}
- if( mb_strlen($params['orig_state']) != 2)
- {
- $sql = ' SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestName = "'.$params['orig_state'].'"';
- $params['orig_state'] = $db->GetOne($sql);
+
+ if (strlen($params['orig_state']) != 2) {
+ // got state name instead of ISO code -> resolve it to ISO code
+ $country_iso = $cs_helper->getCountryIso($params['orig_country'], true);
+ $params['orig_state'] = $cs_helper->getStateIso($params['orig_state'], $country_iso);
}
- if(isset($custom_params['ShipMethod']))
- {
- $params['ShipMethod'] = $custom_params['ShipMethod'];
+ if (isset($custom_params['ShipMethod'])) {
+ $params['ShipMethod'] = $custom_params['ShipMethod'];
}
$params['packages'] = $custom_params['packages'];
@@ -199,10 +199,10 @@
$params['dest_state'] = $custom_params['dest_state'];
$params['dest_postal'] = $custom_params['dest_postal'];
$params['dest_country'] = $custom_params['dest_country'];
- if( mb_strlen($params['dest_country']) == 3)
- {
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$params['dest_country'].'"';
- $params['dest_country'] = $db->GetOne($sql);
+
+ if (strlen($params['dest_country']) == 3) {
+ // got 3symbol ISO code -> resolve to 2symbol ISO code
+ $params['dest_country'] = $cs_helper->getCountryIso( $params['dest_country'] );
}
if(!$params['dest_city'] || !$params['dest_country'] ||
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (revision 13329)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (working copy)
@@ -57,11 +57,14 @@
$object->SetDBField('Properties', $properties);
$from_country = $this->Application->ConfigValue('Comm_Shipping_Country');
- if( mb_strlen($from_country) == 3)
- {
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$from_country.'"';
- $from_country = $this->Conn->GetOne($sql);
+ if (strlen($from_country) == 3) {
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ // get 2symbol ISO code from 3symbol ISO code
+ $from_country = $cs_helper->getCountryIso($from_country);
}
+
if( !function_exists('curl_init') )
{
$object->FieldErrors['Status']['pseudo'] = 'curl_not_present';
Index: in-commerce/units/shipping_quote_engines/usps.php
===================================================================
--- in-commerce/units/shipping_quote_engines/usps.php (revision 13329)
+++ in-commerce/units/shipping_quote_engines/usps.php (working copy)
@@ -84,16 +84,9 @@
$country = $this->Application->ConfigValue('Comm_Shipping_Country');
if ($country != '') {
- $db =& $this->Application->GetADODBConnection();
- $this->shipping_origin_country = $db->GetOne(
- 'SELECT DestAbbr2
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE
- DestAbbr = '.$db->qstr($country).'
- AND destType = 1
- '
- );
+ $this->shipping_origin_country = $this->GetUSPSCountry($country, '');
}
+
$contact_name = trim($this->_prepare_xml_param($this->Application->ConfigValue('Comm_Contacts_Name')));
$split_pos = strpos($contact_name, ' ');
if ($split_pos === false) {
@@ -1003,11 +996,14 @@
return array('TrackingNumber' => $TrackingNumber, 'PostnetBarCode' => $PostnetBarCode, 'Postage' => $Postage);
}
- function GetUSPSCountry($country)
+ function GetUSPSCountry($country, $default = 'US')
{
- $country = $this->Application->Conn->GetOne('SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = '.$this->Application->Conn->qstr($country));
- if ( $country == '' ) $country = 'US';
- return $country;
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $country = $cs_helper->getCountryIso($country);
+
+ return $country == '' ? $default : $country;
}
function GetShippingQuotes($params = null)
Index: in-commerce/units/taxes/taxes_tag_processor.php
===================================================================
--- in-commerce/units/taxes/taxes_tag_processor.php (revision 13329)
+++ in-commerce/units/taxes/taxes_tag_processor.php (working copy)
@@ -15,457 +15,259 @@
class TaxesTagProcessor extends kDBTagProcessor
{
- /*
- function ShowDestinations($param)
+
+ function ShowCountries($params)
{
- $zone =& $this->Application->recallObject('tax');
- $zone->SetDBField('TaxZoneId', $zone->ID);
- $destination =& $this->Application->recallObject('taxdst');
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- if(!$this->Application->GetVar('loaded'))
- {
- if ($zone->GetID() == 0)
- {
- $this->Application->DeleteVar('taxdst');
- }
- else
- {
- $sql = 'SELECT * FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
- $res = $this->Conn->Query($sql);
- if (is_array($res)) foreach ($res as $dest_record)
- {
- $temp[$dest_record['TaxZoneDestId']]['TaxZoneDestId'] = $dest_record['TaxZoneDestId'];
- $temp[$dest_record['TaxZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
- $temp[$dest_record['TaxZoneDestId']]['DestValue'] = $dest_record['DestValue'];
- }
- $this->Application->SetVar('taxdst', $temp);
- }
- }
- $destination =& $this->Application->recallObject('taxdst');
+ $destination_table = $this->getDestinationsTable($params);
+ $selected_country_id = (int)$this->Application->GetVar('CountrySelector');
- $hidden_clause = '<input type="hidden" name="loaded" value="1"><input type="hidden" name="zone_id" value="'.$zone->GetDBField('TaxZoneId').'">';
+ $name_field = 'l' . $this->Application->GetVar('m_lang') . '_Name';
+ $id_field = $this->Application->getUnitOption('country-state', 'IDField');
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
- switch ( $zone->GetDBField('Type') )
- {
- case 1:
+ switch ($params['show']) {
+ case 'current':
+ // selected countries in current zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE cs.Type = ' . DESTINATION_TYPE_COUNTRY . ' AND zd.TaxZoneId = ' . $object->GetID() . '
+ ORDER BY cs.' . $name_field;
+ break;
- $sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- $res = $this->Conn->Query($sql, 'DestId');
-
- $dropdown = '<select name="country">'."\n";
- foreach ($res as $record)
- {
- $dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $dropdown .= '</select>'."\n";
-
- $form_params = Array();
- $form_params['dropdown'] = $dropdown;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $res;
- $ret = $this->ShowDestionationForm($form_params);
+ case 'available':
+ // available countries in current zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE cs.Type = ' . DESTINATION_TYPE_COUNTRY . ' AND zd.TaxZoneId IS NULL
+ ORDER BY cs.' . $name_field;
break;
- case 2:
- $country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1,
- '.TABLE_PREFIX.'StdDestinations d2
- WHERE d1.DestType=1 AND d1.DestId=d2.DestParentId
- GROUP BY d1.DestId';
- if( !($current_country = $this->Application->GetVar('StatesCountry')) )
- {
- $current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
- if($zone->GetDBField('TaxZoneId'))
- {
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
+ case 'all':
+ // always preselect 1st country, when user haven't selected any
+ if (!$selected_country_id) {
+ $sql = 'SELECT StdDestId
+ FROM ' . $destination_table . '
+ WHERE TaxZoneId = ' . $object->GetID();
+ $selected_country_id = $this->Conn->GetOne($sql);
- if(!$current_country)
- {
- $current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- $current_country = $this->Conn->GetOne($current_country_sql);
+ if ($selected_country_id) {
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
}
- $states_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestParentId='.$current_country;
- $countries = $this->Conn->Query($country_sql, 'DestId');
- $states = $this->Conn->Query($states_sql, 'DestId');
- if($countries)
- {
- $countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
- foreach ($countries as $record)
- {
- $countries_dropdown .= '<option value="'.$record['DestId'].'" ';
- if($record['DestId'] == $current_country)
- {
- $countries_dropdown .= 'selected';
- }
- $countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $countries_dropdown .= '</select>'."\n";
- }
-
- if($states)
- {
- $states_dropdown = '<select name="state">'."\n";
- foreach ($states as $id => $record)
- {
- $states_dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $states_dropdown .= '</select>'."\n";
- }
-
- $form_params = Array();
- $table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
- $table .= '<tr><td>'.$this->Application->Phrase('la_State').': </td><td>'.$states_dropdown.'</td></tr></table>';
- $form_params['dropdown'] = $table;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $states;
- $ret = $this->ShowDestionationForm($form_params);
-
+ // all countries
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY ' . $name_field;
break;
- case 3:
- if( !($current_country = $this->Application->GetVar('StatesCountry')) )
- {
- $current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
- if($zone->GetDBField('TaxZoneId'))
- {
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
+ case 'has_states':
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
- if(!$current_country)
- {
- $current_country_sql = 'SELECT StdDestId FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
+ $has_states = $cs_helper->getCountriesWithStates();
- if(!$current_country)
- {
- $current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
-
-
+ if ($selected_country_id && !array_key_exists($selected_country_id, $has_states)) {
+ list ($selected_country_id, ) = each($has_states);
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1
- WHERE d1.DestType=1
- GROUP BY d1.DestId';
- $countries = $this->Conn->Query($country_sql, 'DestId');
+ // preselect country from 1st found state
+ if (!$selected_country_id) {
+ $sql = 'SELECT cs.StateCountryId
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE (cs.Type = ' . DESTINATION_TYPE_STATE . ') AND (zd.TaxZoneId = ' . $object->GetID() . ')';
+ $selected_country_id = $this->Conn->GetOne($sql);
- if($countries)
- {
- $countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
- foreach ($countries as $record)
- {
- print "<br>";
- $countries_dropdown .= '<option value="'.$record['DestId'].'" ';
- if($record['DestId'] == $current_country)
- {
- $countries_dropdown .= 'selected';
- }
- $countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+ if ($selected_country_id) {
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $countries_dropdown .= '</select>'."\n";
- }
-
- $sql = 'SELECT DestValue FROM '.$this->Application->getUnitOption('taxdst', 'TableName').' WHERE NOT(DestValue IS NULL) AND DestValue<>"" AND StdDestId='.$current_country;
- $res = array_unique( $this->Conn->GetCol($sql) );
- $dropdown = '<input type="text" name="zip_input" id="zip_input" size="15">';
- if($res)
- {
- $dropdown .= ' or <select name="zip_dropdown">'."\n";
- $dropdown .= '<option value=""></option>';
- foreach ($res as $record)
- {
- $dropdown .= '<option value="'.$record.'">'.$record.'</option>'."\n";
+ else {
+ list ($selected_country_id, ) = each($has_states);
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $dropdown .= '</select>'."\n";
}
- $table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
- $table .= '<tr><td>'.$this->Application->Phrase('la_fld_ZIP').': </td><td>'.$dropdown.'</td></tr></table>';
-
- $form_params = Array();
- $form_params['dropdown'] = $table;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $res;
- $ret = $this->ShowDestionationForm($form_params);
-
+ // gets only countries with states
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' AND ' . $id_field . ' IN (' . implode(',', array_keys($has_states)) . ')
+ ORDER BY ' . $name_field;
break;
+
default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
+ break;
}
- $ret .= $hidden_clause;
- return $ret;
- }
- */
- /*
- function ShowDestionationForm($param)
- {
- $add_button = '<input type="button" class="button" value="'.$this->Application->Phrase('la_btn_AddLocation').'" onclick="submit_event(\'tax\', \'OnAddLocation\')">';
+ $ret = '';
+ $countries = $this->Conn->GetCol($sql, $id_field);
- $main_processor =& $this->Application->RecallObject('m_TagProcessor');
- $oddevenparam['odd'] = 'table-color1';
- $oddevenparam['even'] = 'table-color2';
- $ret = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td>'.$param['dropdown'].'</td><td>'.$add_button.'</td></tr>';
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- $dest_list = $this->Application->GetVar('taxdst');
- if (is_array($dest_list))
- {
+ foreach ($countries as $country_id => $country_name) {
+ $block_params['id'] = $country_id;
+ $block_params['destination_title'] = $country_name;
+ $block_params['selected'] = $selected_country_id == $country_id ? ' selected="selected"' : '';
-
- if (sizeof($dest_list)>0){
- $ret .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td> </td><td>';
- $ret .= '<select multiple name="location_list" onchange="SelectToString(this)">';
- $hidden = '';
-
- foreach ($dest_list as $id => $destination)
- {
- $params = $destination;
- $params['id'] = $id;
- $hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" value="'.$destination['TaxZoneDestId'].'">';
- if($destination['StdDestId'] && !$destination['DestValue'])
- {
- $params['destination_title'] = $param['res'][$destination['StdDestId']]['DestName'];
- $hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
- }
- else
- {
- $params['destination_title'] = $destination['DestValue'];
- $hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" name="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" value="'.$destination['DestValue'].'">';
- }
-
- $params['name'] = $param['block'];
- $ret .= $main_processor->ParseBlock($params);
- }
- $ret .= '</select>';
-
- $ret .= '</td><td><input type="button" class="button" value="'.$this->Application->Phrase('la_btn_RemoveLocations').'" onclick="remove_location('.$destination['TaxZoneDestId'].')">';
- $ret .= $hidden;
- $ret .= " </td></tr>";
- }else{
-
- }
+ $ret .= $this->Application->ParseBlock($block_params);
}
-// <input type="hidden" id="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" name="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" value="<inp:m_param name="id"/>">
return $ret;
}
- */
- function ShowCountries($param){
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ function ShowStates($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $destination = &$this->Application->recallObject('taxdst');
- $zone = &$this->Application->recallObject('tax');
+ $destination_table = $this->getDestinationsTable($params);
- switch ($param['show']){
+ $name_field = 'l' . $this->Application->GetVar('m_lang') . '_Name';
+ $id_field = $this->Application->getUnitOption('country-state', 'IDField');
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+
+ $country_id = $this->Application->GetVar('CountrySelector');
+
+ switch ($params['show']) {
case 'current':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND zd.TaxZoneId = '.$zone->GetDBField('TaxZoneId').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // selected states for current country and zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE
+ cs.Type = ' . DESTINATION_TYPE_STATE . ' AND
+ cs.StateCountryId = ' . $country_id . ' AND
+ zd.TaxZoneId = ' . $object->GetID() . '
+ ORDER BY cs.' . $name_field;
break;
case 'available':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND zd.TaxZoneId IS NULL
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // available states for current country and zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE
+ cs.Type = ' . DESTINATION_TYPE_STATE . '
+ AND zd.TaxZoneId IS NULL
+ AND cs.StateCountryId = ' . $country_id . '
+ ORDER BY cs.' . $name_field;
break;
case 'all':
- $selected_country = $this->Application->GetVar('CountrySelector');
- if (!$selected_country){
- // get 1st available country ID
- $selected_country = $this->Conn->GetOne('SELECT StdDestId FROM '.$destination->TableName.'
- WHERE TaxZoneId='.$zone->GetDBField('TaxZoneId'));
- if ($selected_country){
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- }
-
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // all possible states for selected country
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_STATE . ' AND StateCountryId = ' . $country_id . '
+ ORDER BY ' . $name_field;
break;
- case 'has_states':
- $has_states = $this->Conn->GetCol('SELECT DISTINCT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- WHERE sd.DestType=2');
- $selected_country = $this->Application->GetVar('CountrySelector');
-
- if ($selected_country && !in_array($selected_country, $has_states)){
- $selected_country = $has_states[0];
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
-
- if (!$selected_country){
- // get 1st available country ID
- $selected_country = $this->Conn->GetOne('SELECT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2
- AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId'));
- if ($selected_country){
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- else {
- $selected_country = $has_states[0];
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- }
-
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND DestId IN ('.implode(',', $has_states).')
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
break;
}
- $countries = $this->Conn->Query($sql);
- $o = '';
+ $ret = '';
+ $states = $this->Conn->GetCol($sql, $id_field);
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- foreach($countries as $key => $country) {
- $param['id'] = $country['DestId'];
- $param['destination_title'] = $this->Application->Phrase($country['DestName']);
- if (isset($selected_country) && $selected_country == $param['id']){
- $param['selected'] = ' selected="selected"';
- }
- else {
- $param['selected']='';
- }
- $o .= $this->Application->ParseBlock($param);
+ foreach($states as $state_id => $state_name) {
+ $block_params['id'] = $state_id;
+ $block_params['destination_title'] = $state_name;
+
+ $ret .= $this->Application->ParseBlock($block_params);
}
- return $o;
+ return $ret;
}
- function ShowStates($param)
+ function ShowZips($params)
{
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $destination = &$this->Application->recallObject('taxdst');
- $zone = &$this->Application->recallObject('tax');
+ $destination_table = $this->getDestinationsTable($params);
- switch ($param['show']){
- case 'current':
- $sql = 'SELECT *
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ $country_id = (int)$this->Application->GetVar('CountrySelector');
+
+ $current_sql = 'SELECT DestValue
+ FROM ' . $destination_table . '
WHERE
- sd.DestType=2
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ COALESCE(DestValue, "") <> "" AND
+ TaxZoneId = ' . $object->GetID() . '
+ ORDER BY DestValue';
+
+ switch ($params['show']) {
+ case 'current':
+ $sql = $current_sql;
break;
case 'available':
- $sql = 'SELECT *
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ $selected_zips = $this->Conn->GetCol($current_sql);
+ $selected_zips = array_map(Array (&$this->Conn, 'qstr'), $selected_zips);
+
+ $sql = 'SELECT DISTINCT DestValue
+ FROM ' . $this->Application->getUnitOption('taxdst', 'TableName') . '
WHERE
- sd.DestType=2
- AND zd.TaxZoneId IS NULL
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ COALESCE(DestValue, "") <> "" AND
+ TaxZoneId <> ' . $object->GetID() . ' AND
+ ' . ($selected_zips ? 'DestValue NOT IN (' . implode(',', $selected_zips) . ') AND' : '') . '
+ StdDestId = ' . $country_id . '
+ ORDER BY DestValue';
break;
- case 'all':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 2 AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
break;
}
- $states = $this->Conn->Query($sql);
- $o = '';
- foreach($states as $key => $state) {
- $param['id'] = $state['DestId'];
- $param['destination_title'] = $this->Application->Phrase($state['DestName']);
- $o .= $this->Application->ParseBlock($param);
- }
- return $o;
+ $zips = $this->Conn->GetCol($sql);
- }
+ $ret = '';
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- function ShowZips($param){
+ foreach($zips as $zip) {
+ $block_params['id'] = '0|' . $zip;
+ $block_params['destination_title'] = $zip;
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ $ret .= $this->Application->ParseBlock($block_params);
+ }
- $destination = &$this->Application->recallObject('taxdst');
- $zone = &$this->Application->recallObject('tax');
+ return $ret;
+ }
- $country_selector = $this->Application->GetVar('CountrySelector');
- if (!$country_selector){
- $country_selector=0;
- }
+ /**
+ * Returns table for shipping zone destinations
+ *
+ * @param Array $params
+ * @return string
+ */
+ function getDestinationsTable($params)
+ {
+ static $table_name = '';
- switch ($param['show']){
- case 'current':
- $sql = 'SELECT * FROM '.$destination->TableName.'
- WHERE NOT(DestValue IS NULL)
- AND DestValue<>""
- AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
- ORDER BY DestValue
- ';
- break;
- case 'available':
- $selected_zips = $this->Conn->GetCol('SELECT DestValue FROM '.$destination->TableName.'
- WHERE NOT(DestValue IS NULL)
- AND DestValue<>""
- AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
- ORDER BY DestValue
- ');
+ if (!$table_name) {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $sql = 'SELECT DISTINCT(DestValue) FROM '.$this->Application->getUnitOption('taxdst', 'TableName').'
- WHERE NOT(DestValue IS NULL)
- AND TaxZoneID!='.$zone->GetDBField('TaxZoneId').'
- AND DestValue NOT IN ("'.implode('", "', $selected_zips).'")
- AND DestValue<>"" AND StdDestId='.$country_selector.'
- ORDER BY DestValue
- ';
+ $table_name = $this->Application->getUnitOption('taxdst', 'TableName');
- break;
- case 'all':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- WHERE sd.DestType=3 AND sd.DestParentId='.$country_selector.'
- ORDER BY DestValue
- ';
- break;
+ if ($object->IsTempTable()) {
+ $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+ }
}
- $zips = $this->Conn->Query($sql);
- $o = '';
- foreach($zips as $key => $zip) {
- $param['id'] = $zip['DestId'].'|'.$zip['DestValue'];
- $param['destination_title'] = $zip['DestValue'];
- $o .= $this->Application->ParseBlock($param);
- }
- return $o;
-
+ return $table_name;
}
-
}
\ No newline at end of file
Index: in-commerce/units/zones/zones_tag_processor.php
===================================================================
--- in-commerce/units/zones/zones_tag_processor.php (revision 13329)
+++ in-commerce/units/zones/zones_tag_processor.php (working copy)
@@ -15,446 +15,258 @@
class ZonesTagProcessor extends kDBTagProcessor
{
- /*
- function ShowDestinations($param)
+ function ShowCountries($params)
{
- $zone =& $this->Application->recallObject('z');
- $zone->SetDBField('ZoneID', $zone->ID);
- $destination =& $this->Application->recallObject('dst');
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- if(!$this->Application->GetVar('loaded'))
- {
- if ($zone->GetID() == 0)
- {
- $this->Application->DeleteVar('dst');
- }
- else
- {
- $sql = 'SELECT * FROM '.$destination->TableName.' WHERE ShippingZoneId='.$zone->GetID();
- $res = $this->Conn->Query($sql);
- if (is_array($res)) foreach ($res as $dest_record)
- {
- $temp[$dest_record['ZoneDestId']]['ZoneDestId'] = $dest_record['ZoneDestId'];
- $temp[$dest_record['ZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
- $temp[$dest_record['ZoneDestId']]['DestValue'] = $dest_record['DestValue'];
- }
- $this->Application->SetVar('dst', $temp);
- }
- }
+ $destination_table = $this->getDestinationsTable($params);
+ $selected_country_id = (int)$this->Application->GetVar('CountrySelector');
- $hidden_clause = '<input type="hidden" name="loaded" value="1"><input type="hidden" name="zone_id" value="'.$zone->GetDBField('ZoneID').'">';
+ $name_field = 'l' . $this->Application->GetVar('m_lang') . '_Name';
+ $id_field = $this->Application->getUnitOption('country-state', 'IDField');
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
- switch ( $zone->GetDBField('Type') )
- {
- case 1:
+ switch ($params['show']) {
+ case 'current':
+ // selected countries in current zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE cs.Type = ' . DESTINATION_TYPE_COUNTRY . ' AND zd.ShippingZoneId = ' . $object->GetID() . '
+ ORDER BY cs.' . $name_field;
+ break;
- $sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- $res = $this->Conn->Query($sql, 'DestId');
- $dropdown = '<select name="country">'."\n";
- foreach ($res as $record)
- {
- $dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $dropdown .= '</select>'."\n";
-
- $form_params = Array();
- $form_params['dropdown'] = $dropdown;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $res;
- $ret = $this->ShowDestionationForm($form_params);
-
+ case 'available':
+ // available countries in current zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE cs.Type = ' . DESTINATION_TYPE_COUNTRY . ' AND zd.ShippingZoneId IS NULL
+ ORDER BY cs.' . $name_field;
break;
- case 2:
- $country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1,
- '.TABLE_PREFIX.'StdDestinations d2
- WHERE d1.DestType=1 AND d1.DestId=d2.DestParentId
- GROUP BY d1.DestId';
- if( !($current_country = $this->Application->GetVar('StatesCountry')) )
- {
- $current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2 AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID');
- if($zone->GetDBField('ZoneID'))
- {
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
+ case 'all':
+ // always preselect 1st country, when user haven't selected any
+ if (!$selected_country_id) {
+ $sql = 'SELECT StdDestId
+ FROM ' . $destination_table . '
+ WHERE ShippingZoneId = ' . $object->GetID();
+ $selected_country_id = $this->Conn->GetOne($sql);
- if(!$current_country)
- {
- $current_country_sql = ' SELECT d1.DestId FROM '.TABLE_PREFIX.'StdDestinations d1
- LEFT JOIN '.TABLE_PREFIX.'StdDestinations d2
- ON d1.DestId = d2.DestParentId
- WHERE d1.DestType=1
- AND d2.DestId IS NOT NULL';
- $current_country = $this->Conn->GetOne($current_country_sql);
+ if ($selected_country_id) {
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
}
- $states_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestParentId='.$current_country;
- $countries = $this->Conn->Query($country_sql, 'DestId');
- $states = $this->Conn->Query($states_sql, 'DestId');
- if($countries)
- {
- $countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'z\', \'OnCountryChange\')">'."\n";
- foreach ($countries as $record)
- {
- $countries_dropdown .= '<option value="'.$record['DestId'].'" ';
- if($record['DestId'] == $current_country)
- {
- $countries_dropdown .= 'selected';
- }
- $countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $countries_dropdown .= '</select>'."\n";
- }
+ // all countries
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY ' . $name_field;
+ break;
- if($states)
- {
- $states_dropdown = '<select name="state">'."\n";
- foreach ($states as $id => $record)
- {
- $states_dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $states_dropdown .= '</select>'."\n";
- }
+ case 'has_states':
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
- $form_params = Array();
- $table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_fld_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
- $table .= '<tr><td>'.$this->Application->Phrase('la_fld_State').': </td><td>'.$states_dropdown.'</td></tr></table>';
- $form_params['dropdown'] = $table;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $states;
- $ret = $this->ShowDestionationForm($form_params);
+ $has_states = $cs_helper->getCountriesWithStates();
- break;
- case 3:
-
- $country_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- if( !($current_country = $this->Application->GetVar('ZIPCountry')) )
- {
- $current_country_sql = 'SELECT StdDestId FROM '.$destination->TableName.'
- WHERE ShippingZoneId='.$zone->GetDBField('ZoneID');
- $cur_country = (int)$this->Conn->GetOne($current_country_sql);
- if($zone->GetDBField('ZoneID') && $cur_country)
- {
- $current_country = $cur_country;
- }
- else
- {
- $current_country_sql = 'SELECT MIN(DestId) FROM '.TABLE_PREFIX.'StdDestinations';
- $current_country = (int)$this->Conn->GetOne($current_country_sql);
- }
+ if ($selected_country_id && !array_key_exists($selected_country_id, $has_states)) {
+ list ($selected_country_id, ) = each($has_states);
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $countries = $this->Conn->Query($country_sql, 'DestId');
- if($countries)
- {
- $countries_dropdown = '<select name="ZIPCountry" onchange="submit_event(\'z\', \'OnCountryChange\')">'."\n";
- foreach ($countries as $record)
- {
- $countries_dropdown .= '<option value="'.$record['DestId'].'" ';
- if($record['DestId'] == $current_country)
- {
- $countries_dropdown .= 'selected';
- }
- $countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $countries_dropdown .= '</select>'."\n";
- }
+ // preselect country from 1st found state
+ if (!$selected_country_id) {
+ $sql = 'SELECT cs.StateCountryId
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE (cs.Type = ' . DESTINATION_TYPE_STATE . ') AND (zd.ShippingZoneId = ' . $object->GetID() . ')';
+ $selected_country_id = $this->Conn->GetOne($sql);
-
- $sql = 'SELECT DestValue FROM '.TABLE_PREFIX.'ShippingZonesDestinations WHERE NOT(DestValue IS NULL) AND DestValue<>"" AND StdDestId='.$current_country;
- $res = array_unique( $this->Conn->GetCol($sql) );
- $dropdown = '<input type="text" name="zip_input" id="zip_input" size="15">';
- if($res)
- {
- $dropdown .= ' or <select name="zip_dropdown">'."\n";
- $dropdown .= '<option value=""></option>';
- foreach ($res as $record)
- {
- $dropdown .= '<option value="'.$record.'">'.$record.'</option>'."\n";
+ if ($selected_country_id) {
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $dropdown .= '</select>'."\n";
+ else {
+ list ($selected_country_id, ) = each($has_states);
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
+ }
}
- $table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_fld_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
- $table .= '<tr><td>'.$this->Application->Phrase('la_fld_ZIP').': </td><td>'.$dropdown.'</td></tr></table>';
-
- $form_params = Array();
- $form_params['dropdown'] = $table;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $res;
- $ret = $this->ShowDestionationForm($form_params);
-
+ // gets only countries with states
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' AND ' . $id_field . ' IN (' . implode(',', array_keys($has_states)) . ')
+ ORDER BY ' . $name_field;
break;
+
default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
+ break;
}
- $ret .= $hidden_clause;
- return $ret;
- }
+ $ret = '';
+ $countries = $this->Conn->GetCol($sql, $id_field);
- function ShowDestionationForm($param)
- {
- $add_button = '<input type="button" class="button" value="'.$this->Application->Phrase('la_btn_AddLocation').'" onclick="submit_event(\'z\', \'OnAddLocation\')">';
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- $main_processor =& $this->Application->RecallObject('m_TagProcessor');
- $oddevenparam['odd'] = 'table-color1';
- $oddevenparam['even'] = 'table-color2';
- $ret = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td>'.$param['dropdown'].'</td><td>'.$add_button.'</td></tr>';
+ foreach ($countries as $country_id => $country_name) {
+ $block_params['id'] = $country_id;
+ $block_params['destination_title'] = $country_name;
+ $block_params['selected'] = $selected_country_id == $country_id ? ' selected="selected"' : '';
- $dest_list = $this->Application->GetVar('dst');
- if (is_array($dest_list) && count($dest_list))
- {
- $ret .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td><select multiple name="location_list" onchange="SelectToString(this)">';
- $hidden = '';
-
- foreach ($dest_list as $id => $destination)
- {
- $params = $destination;
- $params['id'] = $id;
- $hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][ZoneDestId]" name="dst['.$destination['ZoneDestId'].'][ZoneDestId]" value="'.$destination['ZoneDestId'].'">';
-
- $zones_object =& $this->Application->recallObject('z');
-
- switch($zones_object->GetDBField('Type'))
- {
- case 1:
- $params['destination_title'] = $this->Application->Phrase( $param['res'][$destination['StdDestId']]['DestName'] );
- $hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][StdDestId]" name="dst['.$destination['ZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
- break;
- case 2:
- $params['destination_title'] = $this->Application->Phrase( $param['res'][$destination['StdDestId']]['DestName'] );
- $hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][StdDestId]" name="dst['.$destination['ZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
- break;
- case 3:
- $params['destination_title'] = $destination['DestValue'];
- $hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][DestValue]" name="dst['.$destination['ZoneDestId'].'][DestValue]" value="'.$destination['DestValue'].'">';
-
- }
-
- $params['name'] = $param['block'];
- $ret .= $main_processor->ParseBlock($params);
- }
- $ret .= '</select></td><td><input type="button" class="button" value="'.$this->Application->Phrase('la_btn_RemoveLocations').'" onclick="remove_location('.$destination['ZoneDestId'].')"></td><tr>';
- $ret .= $hidden;
+ $ret .= $this->Application->ParseBlock($block_params);
}
return $ret;
}
- */
+ function ShowStates($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- function ShowCountries($param){
+ $destination_table = $this->getDestinationsTable($params);
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ $name_field = 'l' . $this->Application->GetVar('m_lang') . '_Name';
+ $id_field = $this->Application->getUnitOption('country-state', 'IDField');
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
- $destination = &$this->Application->recallObject('dst');
- $zone = &$this->Application->recallObject('z');
+ $country_id = $this->Application->GetVar('CountrySelector');
- $selected_country = Array(); // this prevents 241 warnings to me raised :D
- switch ($param['show']){
+ switch ($params['show']) {
case 'current':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // selected states for current country and zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE
+ cs.Type = ' . DESTINATION_TYPE_STATE . ' AND
+ cs.StateCountryId = ' . $country_id . ' AND
+ zd.ShippingZoneId = ' . $object->GetID() . '
+ ORDER BY cs.' . $name_field;
break;
case 'available':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND zd.ShippingZoneId IS NULL
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // available states for current country and zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE
+ cs.Type = ' . DESTINATION_TYPE_STATE . '
+ AND zd.ShippingZoneId IS NULL
+ AND cs.StateCountryId = ' . $country_id . '
+ ORDER BY cs.' . $name_field;
break;
case 'all':
- $selected_country = $this->Application->GetVar('CountrySelector');
- if (!$selected_country){
- // get 1st available country ID
- $selected_country = $this->Conn->GetOne('SELECT StdDestId FROM '.$destination->TableName.'
- WHERE ShippingZoneId='.$zone->GetDBField('ZoneID'));
- if ($selected_country){
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- }
-
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // all possible states for selected country
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_STATE . ' AND StateCountryId = ' . $country_id . '
+ ORDER BY ' . $name_field;
break;
- case 'has_states':
- $has_states = $this->Conn->GetCol('SELECT DISTINCT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- WHERE sd.DestType=2');
- $selected_country = $this->Application->GetVar('CountrySelector');
-
- if ($selected_country && !in_array($selected_country, $has_states)){
- $selected_country = $has_states[0];
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
-
- if (!$selected_country){
- // get 1st available country ID
- $selected_country = $this->Conn->GetOne('SELECT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2
- AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID'));
- if ($selected_country){
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- else {
- $selected_country = $has_states[0];
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- }
-
-
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND DestId IN ('.implode(',', $has_states).')
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
break;
}
- $countries = $this->Conn->Query($sql);
- $o = '';
+ $ret = '';
+ $states = $this->Conn->GetCol($sql, $id_field);
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- foreach($countries as $key => $country) {
- $param['id'] = $country['DestId'];
- $param['destination_title'] = $this->Application->Phrase($country['DestName']);
- if ($selected_country && $selected_country == $param['id']){
- $param['selected'] = ' selected="selected"';
- }
- else {
- $param['selected']='';
- }
- $o .= $this->Application->ParseBlock($param);
+ foreach($states as $state_id => $state_name) {
+ $block_params['id'] = $state_id;
+ $block_params['destination_title'] = $state_name;
+
+ $ret .= $this->Application->ParseBlock($block_params);
}
- return $o;
+ return $ret;
}
- function ShowStates($param){
+ function ShowZips($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ $destination_table = $this->getDestinationsTable($params);
- $destination = &$this->Application->recallObject('dst');
- $zone = &$this->Application->recallObject('z');
+ $country_id = (int)$this->Application->GetVar('CountrySelector');
- switch ($param['show']){
- case 'current':
- $sql = 'SELECT *
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ $current_sql = 'SELECT DestValue
+ FROM ' . $destination_table . '
WHERE
- sd.DestType=2
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ COALESCE(DestValue, "") <> "" AND
+ ShippingZoneID = ' . $object->GetID() . '
+ ORDER BY DestValue';
+
+ switch ($params['show']) {
+ case 'current':
+ $sql = $current_sql;
break;
case 'available':
- $sql = 'SELECT *
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ $selected_zips = $this->Conn->GetCol($current_sql);
+ $selected_zips = array_map(Array (&$this->Conn, 'qstr'), $selected_zips);
+
+ $sql = 'SELECT DISTINCT DestValue
+ FROM ' . $this->Application->getUnitOption('dst', 'TableName') . '
WHERE
- sd.DestType=2
- AND zd.ShippingZoneId IS NULL
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ COALESCE(DestValue, "") <> "" AND
+ ShippingZoneID <> ' . $object->GetID() . ' AND
+ ' . ($selected_zips ? 'DestValue NOT IN (' . implode(',', $selected_zips) . ') AND' : '') . '
+ StdDestId = ' . $country_id . '
+ ORDER BY DestValue';
break;
- case 'all':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 2 AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
break;
}
- $states = $this->Conn->Query($sql);
- $o = '';
- foreach($states as $key => $state) {
- $param['id'] = $state['DestId'];
- $param['destination_title'] = $this->Application->Phrase($state['DestName']);
- $o .= $this->Application->ParseBlock($param);
- }
- return $o;
+ $zips = $this->Conn->GetCol($sql);
- }
+ $ret = '';
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- function ShowZips($param){
+ foreach($zips as $zip) {
+ $block_params['id'] = '0|' . $zip;
+ $block_params['destination_title'] = $zip;
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ $ret .= $this->Application->ParseBlock($block_params);
+ }
- $destination = &$this->Application->recallObject('dst');
- $zone = &$this->Application->recallObject('z');
+ return $ret;
+ }
- $country_selector = $this->Application->GetVar('CountrySelector');
- if (!$country_selector){
- $country_selector=0;
- }
+ /**
+ * Returns table for shipping zone destinations
+ *
+ * @param Array $params
+ * @return string
+ */
+ function getDestinationsTable($params)
+ {
+ static $table_name = '';
- switch ($param['show']){
- case 'current':
- $sql = 'SELECT * FROM '.$destination->TableName.'
- WHERE NOT(DestValue IS NULL)
- AND DestValue<>""
- AND ShippingZoneID='.$zone->GetDBField('ZoneID').'
- ORDER BY DestValue
- ';
- break;
- case 'available':
- $selected_zips = $this->Conn->GetCol('SELECT DestValue FROM '.$destination->TableName.'
- WHERE NOT(DestValue IS NULL)
- AND DestValue<>""
- AND ShippingZoneID='.$zone->GetDBField('ZoneID').'
- ORDER BY DestValue
- ');
+ if (!$table_name) {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $sql = 'SELECT DISTINCT(DestValue) FROM '.$this->Application->getUnitOption('dst', 'TableName').'
- WHERE NOT(DestValue IS NULL)
- AND ShippingZoneID!='.$zone->GetDBField('ZoneID').'
- AND DestValue NOT IN ("'.implode('", "', $selected_zips).'")
- AND DestValue<>"" AND StdDestId='.$country_selector.'
- ORDER BY DestValue
- ';
+ $table_name = $this->Application->getUnitOption('dst', 'TableName');
- break;
- case 'all':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- WHERE sd.DestType=3 AND sd.DestParentId='.$country_selector.'
- ORDER BY DestValue
- ';
- break;
+ if ($object->IsTempTable()) {
+ $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+ }
}
- $zips = $this->Conn->Query($sql);
- $o = '';
- foreach($zips as $key => $zip) {
- $param['id'] = $zip['DestId'].'|'.$zip['DestValue'];
- $param['destination_title'] = $zip['DestValue'];
- $o .= $this->Application->ParseBlock($param);
- }
- return $o;
-
+ return $table_name;
}
}
\ No newline at end of file
Index: in-link/install/install_data.sql
===================================================================
--- in-link/install/install_data.sql (revision 13329)
+++ in-link/install/install_data.sql (working copy)
@@ -2,10 +2,10 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_Highlight_OpenTag', '<span class="match">', 'In-Link', 'in-link:configuration_output', '', '', '', NULL, NULL, 0, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_Highlight_CloseTag', '</span>', 'In-Link', 'in-link:configuration_output', '', '', '', NULL, NULL, 0, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_RatingToPop', '5', 'In-Link', 'in-link:configuration_output', '', '', '', NULL, NULL, 0, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField', 'Name', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'Name=la_Link_Name,Description=la_Link_Description,Url=la_Link_URL,CreatedOn=la_opt_CreatedOn,Hits=la_Link_Hits,CachedRating=la_opt_Rating,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 4) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField2', 'Description', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'Name=la_Link_Name,Description=la_Link_Description,Url=la_Link_URL,CreatedOn=la_opt_CreatedOn,Hits=la_Link_Hits,CachedRating=la_opt_Rating,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 4) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder2', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField', 'Name', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'Name=la_Link_Name||Description=la_Link_Description||Url=la_Link_URL||CreatedOn=la_opt_CreatedOn||Hits=la_Link_Hits||CachedRating=la_opt_Rating||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 4) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField2', 'Description', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'Name=la_Link_Name||Description=la_Link_Description||Url=la_Link_URL||CreatedOn=la_opt_CreatedOn||Hits=la_Link_Hits||CachedRating=la_opt_Rating||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 4) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder2', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Links', '10', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_perpage_prompt', 'text', '', '', 10.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Links_Short', '3', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_perpage_short_prompt', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_NewDays', '100', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_newdays_prompt', 'text', '', '', 10.05, 0, 1);
@@ -17,18 +17,18 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ShowPick', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_editorspick_prompt', 'checkbox', '', '', 10.11, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_UrlStatus', '', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_urlstatus_prompt', 'checkbox', '', '', 10.12, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_ReviewDelay_Value', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.13, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_ReviewDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.13, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_ReviewDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.13, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_RatingDelay_Value', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.14, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_RatingDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.14, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_RatingDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.14, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_MaxCategories', '3', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_fld_MaxCategories', 'text', NULL, NULL, 10.15, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_EnableGoogleMaps', '0', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_fld_LinkEnableGoogleMaps', 'checkbox', NULL, NULL, 10.16, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_GoogleMapsAPIKey', '', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_fld_LinkGoogleMapsAPIKey', 'text', NULL, NULL, 10.17, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_EnableLinkContactForm', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_config_EnableLinkContactForm', 'checkbox', NULL, NULL, 10.18, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ReciprocalLinkChecking', '0', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_config_ReciprocalLinkChecking', 'checkbox', NULL, NULL, 10.19, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort', 'CreatedOn', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort2', 'ReviewText', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder2', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort', 'CreatedOn', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort2', 'ReviewText', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder2', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_LinkReviews', '10', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_LinkReviews_Short', '3', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_CategoryTemplate', '/in-link/designs/section', 'In-Link', 'in-link:configuration_output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0);
@@ -107,8 +107,8 @@
INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkAddress', 'lu_fld_LinkAddress', 0, 'la_section_BusinessLocation', 'la_fld_LinkAddress', 'text', 'size="40"', '', 1, 1, 0, 0);
INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkCity', 'lu_fld_LinkCity', 0, 'la_section_BusinessLocation', 'la_fld_LinkCity', 'text', 'size="40"', '', 2, 1, 0, 0);
INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkZipCode', 'lu_fld_LinkZipCode', 0, 'la_section_BusinessLocation', 'la_fld_LinkZipCode', 'text', NULL, '', 4, 1, 0, 0);
-INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkState', 'lu_fld_LinkState', 0, 'la_section_BusinessLocation', 'la_fld_LinkState', 'select', '=+||<SQL>SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM <PREFIX>StdDestinations WHERE DestType = 2 AND (DestParentId = 225 OR DestParentId = 38) ORDER BY DestParentId DESC, DestAbbr ASC</SQL>', '', 3, 1, 0, 0);
-INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkCountry', 'lu_fld_LinkCountry', 0, 'la_section_BusinessLocation', 'la_fld_LinkCountry', 'select', '=+||<SQL>SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM <PREFIX>StdDestinations WHERE DestType = 1 ORDER BY DestAbbr ASC</SQL>', '', 5, 1, 0, 0);
+INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkState', 'lu_fld_LinkState', 0, 'la_section_BusinessLocation', 'la_fld_LinkState', 'select', '=+||<SQL+>SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM <PREFIX>CountryStates WHERE Type = 2 ORDER BY StateCountryId DESC, IsoCode ASC</SQL>', '', 3, 1, 0, 0);
+INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkCountry', 'lu_fld_LinkCountry', 0, 'la_section_BusinessLocation', 'la_fld_LinkCountry', 'select', '=+||<SQL+>SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY IsoCode ASC</SQL>', '', 5, 1, 0, 0);
INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkPhone', 'lu_fld_LinkPhone', 0, 'la_section_BusinessLocation', 'la_fld_LinkPhone', 'text', NULL, '', 6, 1, 0, 0);
INSERT INTO ItemTypes VALUES (4, 'In-Link', 'l', 'Link', 'Name', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_Links', 1, 'in-link/admin/addlink.php', 'clsLink', 'Link');
Index: in-link/install/upgrades.sql
===================================================================
--- in-link/install/upgrades.sql (revision 13329)
+++ in-link/install/upgrades.sql (working copy)
@@ -66,3 +66,11 @@
# ===== v 5.1.0-B1 =====
UPDATE Modules SET Path = 'modules/in-link/' WHERE `Name` = 'In-Link';
DELETE FROM ConfigurationValues WHERE VariableName IN ('StartValidationTime', 'LastExpirationTime', 'Link_Root');
+
+UPDATE CustomField
+SET ValueList = '=+||<SQL+>SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM <PREFIX>CountryStates WHERE Type = 2 ORDER BY StateCountryId DESC, IsoCode ASC</SQL>'
+WHERE ValueList = '=+||<SQL>SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM <PREFIX>StdDestinations WHERE DestType = 2 AND (DestParentId = 225 OR DestParentId = 38) ORDER BY DestParentId DESC, DestAbbr ASC</SQL>';
+
+UPDATE CustomField
+SET ValueList = '=+||<SQL+>SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY IsoCode ASC</SQL>'
+WHERE ValueList = '=+||<SQL>SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM <PREFIX>StdDestinations WHERE DestType = 1 ORDER BY DestAbbr ASC</SQL>';
\ No newline at end of file
Index: in-news/install/install_data.sql
===================================================================
--- in-news/install/install_data.sql (revision 13329)
+++ in-news/install/install_data.sql (working copy)
@@ -1,10 +1,10 @@
# Section "in-news:configuration_output":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_Highlight_OpenTag', '<span class="match">', 'In-News', 'in-news:configuration_output', '', '', '', NULL, NULL, 0, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_Highlight_CloseTag', '</span>', 'In-News', 'in-news:configuration_output', '', '', '', NULL, NULL, 0, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title,Excerpt=la_Article_Excerpt,Author=la_Article_Author,CreatedOn=la_Article_Date,Hits=la_Article_Hits,CachedRating=la_Article_Rating,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortField', 'CreatedOn', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'Title=la_Article_Title||Excerpt=la_Article_Excerpt||Author=la_Article_Author||CreatedOn=la_Article_Date||Hits=la_Article_Hits||CachedRating=la_Article_Rating||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortOrder', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield_pompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortField2', 'Title', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'Title=la_Article_Title||Excerpt=la_Article_Excerpt||Author=la_Article_Author||CreatedOn=la_Article_Date||Hits=la_Article_Hits||CachedRating=la_Article_Rating||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 2) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortOrder2', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_sortfield2_pompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_News', '8', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_perpage_prompt', 'text', '', '', 10.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_News_Short', '3', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_perpage_short_prompt', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_CatNewDays', '5', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_newdays_prompt', 'text', '', '', 10.05, 0, 1);
@@ -13,15 +13,15 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_MaxHotNumber', '5', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_fld_News_MaxHotNumber', 'text', '', '', 10.08, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_Archive', '0', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_daysarchive_prompt', 'text', '', '', 10.09, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_ShowPick', '1', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_news_editorpicksabove_prompt', 'checkbox', '', '', 10.1, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.11, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_ReviewDelay_Interval', '3600', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.11, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_ReviewDelay_Value', '12', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.11, 1, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_RatingDelay_Value', '1', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.12, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.12, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_RatingDelay_Interval', '86400', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.12, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'n_MaxCategories', '3', 'In-News', 'in-news:configuration_output', 'la_Text_Articles', 'la_fld_MaxCategories', 'text', NULL, NULL, 10.13, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviews', 'ReviewText', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviewsOrder', 'desc', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviews2', 'ReviewText', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'News_SortReviewsOrder2', 'asc', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_news_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_NewsReviews_Short', '3', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_NewsReviews', '10', 'In-News', 'in-news:configuration_output', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'n_CategoryTemplate', '/in-news/designs/section', 'In-News', 'in-news:configuration_output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0);
country_state_refactoring_themes.patch [^] (20,008 bytes) 2010-04-11 08:35
[Show Content]
Index: advanced/in-commerce/elements/content_boxes/checkout/billing_address.elm.tpl
===================================================================
--- advanced/in-commerce/elements/content_boxes/checkout/billing_address.elm.tpl (revision 13329)
+++ advanced/in-commerce/elements/content_boxes/checkout/billing_address.elm.tpl (working copy)
@@ -51,7 +51,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCity" title="lu_fld_City" style="width: 200px;" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingState" title="lu_fld_State" style="width: 200px;" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingZip" title="lu_fld_Zip" style="width: 100px;" />
- <inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="lu_fld_Country" style="width: 300px;" />
+ <inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="lu_fld_Country" style="width: 300px;" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingPhone" title="lu_fld_Phone" style="width: 150px;" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingEmail" title="lu_fld_Email" style="width: 150px;" is_last="1"/>
</inp2:m_if>
Index: advanced/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl
===================================================================
--- advanced/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl (revision 13329)
+++ advanced/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl (working copy)
@@ -40,7 +40,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCity" title="lu_fld_City" style="width: 200px;" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingState" title="lu_fld_State" style="width: 200px;" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingZip" title="lu_fld_Zip" style="width: 100px;" />
- <inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="ShippingCountry" title="lu_fld_Country" style="width: 300px;" />
+ <inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="ShippingCountry" title="lu_fld_Country" style="width: 300px;" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingPhone" title="lu_fld_Phone" style="width: 150px;" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingEmail" title="lu_fld_Email" style="width: 150px;" is_last="1"/>
</inp2:m_if>
Index: advanced/in-commerce/my_account/edit_address.tpl
===================================================================
--- advanced/in-commerce/my_account/edit_address.tpl (revision 13329)
+++ advanced/in-commerce/my_account/edit_address.tpl (working copy)
@@ -69,7 +69,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="City" title="lu_fld_City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="State" title="lu_fld_State"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Zip" title="lu_fld_ZipCode"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="addr" field="Country" title="lu_fld_Country"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="addr" field="Country" title="lu_fld_Country" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Phone" title="lu_fld_Phone"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Fax" title="lu_fld_Fax"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Email" title="lu_fld_Email"/>
Index: advanced/in-commerce/my_account/new_address.tpl
===================================================================
--- advanced/in-commerce/my_account/new_address.tpl (revision 13329)
+++ advanced/in-commerce/my_account/new_address.tpl (working copy)
@@ -68,7 +68,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="City" title="lu_fld_City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="State" title="lu_fld_State"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Zip" title="lu_fld_ZipCode"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="addr" field="Country" title="lu_fld_Country"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="addr" field="Country" title="lu_fld_Country" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Phone" title="lu_fld_Phone"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Fax" title="lu_fld_Fax"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Email" title="lu_fld_Email"/>
Index: onlinestore/in-commerce/blocks/checkout/billing_address.tpl
===================================================================
--- onlinestore/in-commerce/blocks/checkout/billing_address.tpl (revision 13329)
+++ onlinestore/in-commerce/blocks/checkout/billing_address.tpl (working copy)
@@ -128,8 +128,7 @@
<strong><inp2:m_Phrase label="lu_Country"/> *:</strong></td>
<td>
<select name="<inp2:ord_InputName field="BillingCountry"/>" style="width: 300px;">
- <option value="0"></option>
- <inp2:ord_PredefinedOptions field="BillingCountry" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+ <inp2:ord_PredefinedOptions field="BillingCountry" render_as="destination" has_empty="1" selected_param="selected" selected="selected=\"selected\""/>
</select>
</td>
<td class="error"><inp2:ord_Error field="BillingCountry" /></td>
Index: onlinestore/in-commerce/blocks/checkout/form_register.tpl
===================================================================
--- onlinestore/in-commerce/blocks/checkout/form_register.tpl (revision 13329)
+++ onlinestore/in-commerce/blocks/checkout/form_register.tpl (working copy)
@@ -4,7 +4,7 @@
<inp2:m_if check="u_SuggestRegister">
<form method="post" action="<inp2:m_FormAction />">
-
+
<table class="block-no-border">
<tr>
<td class="block-header">
@@ -68,11 +68,11 @@
</td>
<td class="error"><inp2:u_Error field="VerifyPassword"/></td>
</tr>
-
- <tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_phrase label="lu_birth_date"/>*:</strong><br>
- </td>
+ </td>
<td class="block-data">
<script src="inc/calendar.js"></script>
<input type="text" name="<inp2:u_InputName field="dob_date"/>" id="<inp2:u_InputName field="dob_date"/>" value="<inp2:u_Field name="dob_date" format="_regional_InputDateFormat"/>" style="width: 100px;" datepickerIcon="img/calendar.gif"/>
@@ -82,8 +82,8 @@
(<inp2:u_Format field="dob_date" input_format="1" human="true"/>, ex. <inp2:u_Format field="dob_date" sample="true"/>)
</td>
<td class="error"><inp2:u_Error field="dob_date"/></td>
- </tr>
-
+ </tr>
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_first_name"/>:</strong>
@@ -93,7 +93,7 @@
</td>
<td class="error"><inp2:u_Error field="FirstName"/></td>
</tr>
-
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_last_name"/>:</strong>
@@ -103,7 +103,7 @@
</td>
<td class="error"><inp2:u_Error field="LastName"/></td>
</tr>
-
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_company"/>:</strong>
@@ -113,7 +113,7 @@
</td>
<td class="error"><inp2:u_Error field="Company"/></td>
</tr>
-
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_address_line"/> 1:</strong>
@@ -123,7 +123,7 @@
</td>
<td class="error"><inp2:u_Error field="Street"/></td>
</tr>
-
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_address_line"/> 2:</strong>
@@ -133,7 +133,7 @@
</td>
<td class="error"><inp2:u_Error field="Street2"/></td>
</tr>
-
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_city"/>:</strong>
@@ -151,7 +151,7 @@
<input type="text" name="<inp2:u_InputName field="State"/>" value="<inp2:u_Field name="State"/>" style="width: 200px;" />
</td>
<td class="error"><inp2:u_Error field="State"/></td>
- </tr>
+ </tr>
<tr>
<td>
<strong><inp2:m_phrase label="lu_ZipCode"/>:</strong>
@@ -167,13 +167,12 @@
</td>
<td>
<select name="<inp2:u_InputName field="Country"/>" style="width: 300px;">
- <option value=""></option>
- <inp2:u_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+ <inp2:u_PredefinedOptions field="Country" render_as="destination" has_empty="1" selected_param="selected" selected="selected=\"selected\""/>
</select>
</td>
<td class="error"><inp2:u_Error field="Country"/></td>
</tr>
-
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_phone"/>:</strong>
@@ -183,7 +182,7 @@
</td>
<td class="error"><inp2:u_Error field="Phone"/></td>
</tr>
-
+
<tr>
<td>
<strong><inp2:m_phrase label="lu_fax"/>:</strong>
@@ -193,15 +192,15 @@
</td>
<td class="error"><inp2:u_Error field="Fax"/></td>
</tr>
-
+
<tr>
<td colspan="3" valign="bottom" height="35">
<input type="hidden" name="next_template" value="<inp2:m_get var="next_template"/>">
<input type="hidden" name="registration_confirm_template" value="platform/login/register_confirm">
<input type="hidden" name="registration_confirm_pending_template" value="platform/login/register_confirm_pending">
-
+
<input type="hidden" name="fields_prefilled" value="1" />
-
+
<input class="button" type="submit" id="events[u][OnCreate]" name="events[u][OnCreate]" value="<inp2:m_Phrase label="lu_Register" no_editing="1"/>"/>
</td>
</tr>
@@ -209,6 +208,6 @@
</td>
</tr>
</table>
-
+
</form>
</inp2:m_if>
\ No newline at end of file
Index: onlinestore/in-commerce/blocks/checkout/shipping_address.tpl
===================================================================
--- onlinestore/in-commerce/blocks/checkout/shipping_address.tpl (revision 13329)
+++ onlinestore/in-commerce/blocks/checkout/shipping_address.tpl (working copy)
@@ -114,8 +114,7 @@
<strong><inp2:m_Phrase label="lu_Country"/> *:</strong></td>
<td>
<select name="<inp2:ord_InputName field="ShippingCountry"/>" style="width: 300px;">
- <option value=""></option>
- <inp2:ord_PredefinedOptions field="ShippingCountry" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+ <inp2:ord_PredefinedOptions field="ShippingCountry" render_as="destination" has_empty="1" selected_param="selected" selected="selected=\"selected\""/>
</select>
</td>
<td class="error"><inp2:ord_Error field="ShippingCountry"/></td>
Index: onlinestore/in-commerce/blocks/my_account/address_edit.tpl
===================================================================
--- onlinestore/in-commerce/blocks/my_account/address_edit.tpl (revision 13329)
+++ onlinestore/in-commerce/blocks/my_account/address_edit.tpl (working copy)
@@ -107,8 +107,7 @@
<strong><inp2:m_phrase label="lu_country"/> *:</strong></td>
<td>
<select name="<inp2:addr_InputName field="Country"/>" style="width: 300px;">
- <option value=""></option>
- <inp2:addr_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+ <inp2:addr_PredefinedOptions field="Country" render_as="destination" has_empty="1" selected_param="selected" selected="selected=\"selected\""/>
</select>
</td>
<td class="error"><inp2:addr_Error field="Country"/></td>
Index: onlinestore/in-commerce/blocks/my_account/my_profile.tpl
===================================================================
--- onlinestore/in-commerce/blocks/my_account/my_profile.tpl (revision 13329)
+++ onlinestore/in-commerce/blocks/my_account/my_profile.tpl (working copy)
@@ -4,13 +4,13 @@
<form method="post" action="<inp2:m_FormAction />">
-<table class="block-no-border">
- <tr>
+<table class="block-no-border">
+ <tr>
<td class="block-header" colspan="2">
<inp2:m_Phrase label="lu_comm_PersonalInfo"/>
-
- </td>
- </tr>
+
+ </td>
+ </tr>
<tr>
<td class="block-data">
<inp2:m_if check="u_HasError" field="any">
@@ -20,28 +20,28 @@
<img src="img/message.gif" alt="" width="19" height="19" />
<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
<inp2:m_Phrase label="lu_AProblemWithForm"/>
-
+
</td>
</tr>
</table>
</inp2:m_if>
<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> <br /><br />
-
+
<table class="form-data">
- <tr>
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_Password"/>:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="password" name="<inp2:u_InputName field="Password"/>" value="" style="width: 100px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="Password"/></td>
</tr>
-
- <tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_VerifyPassword"/>:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="password" name="<inp2:u_InputName field="VerifyPassword"/>" value="" style="width: 100px;" />
</td>
@@ -57,7 +57,7 @@
</td>
<td width="170" class="error"><inp2:u_Error field="FirstName"/></td>
</tr>
-
+
<tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_comm_LastName"/>:</strong>
@@ -67,7 +67,7 @@
</td>
<td width="170" class="error"><inp2:u_Error field="LastName"/></td>
</tr>
-
+
<tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_company"/>:</strong>
@@ -77,31 +77,31 @@
</td>
<td width="170" class="error"><inp2:u_Error field="Company"/></td>
</tr>
-
- <tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_Phone"/>:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="text" name="<inp2:u_InputName field="Phone"/>" value="<inp2:u_Field name="Phone"/>" style="width: 150px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="Phone"/></td>
</tr>
-
- <tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_Fax"/>:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="text" name="<inp2:u_InputName field="Fax"/>" value="<inp2:u_Field name="Fax"/>" style="width: 150px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="Fax"/></td>
</tr>
- <tr>
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_comm_BirthDate"/> *:</strong><br>
- </td>
+ </td>
<td class="block-data">
<script src="inc/calendar.js"></script>
<input type="text" name="<inp2:u_InputName field="dob_date"/>" id="<inp2:u_InputName field="dob_date"/>" value="<inp2:u_Field name="dob_date" format="_regional_InputDateFormat"/>" style="width: 100px;" datepickerIcon="img/calendar.gif"/>
@@ -112,46 +112,46 @@
</td>
<td width="170" class="error"><inp2:u_Error field="dob_date"/></td>
</tr>
-
- <tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_Email"/> *:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="text" name="<inp2:u_InputName field="Email"/>" value="<inp2:u_Field field="Email"/>" style="width: 200px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="Email"/></td>
- </tr>
-
- <tr>
+ </tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 1:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="text" name="<inp2:u_InputName field="Street"/>" value="<inp2:u_Field name="Street"/>" style="width: 300px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="Street"/></td>
</tr>
-
- <tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 2:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="text" name="<inp2:u_InputName field="Street2"/>" value="<inp2:u_Field name="Street2"/>" style="width: 300px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="Street2"/></td>
</tr>
-
- <tr>
+
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_City"/>:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="text" name="<inp2:u_InputName field="City"/>" value="<inp2:u_Field name="City"/>" style="width: 100px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="City"/></td>
- </tr>
+ </tr>
<tr>
<td>
<strong><inp2:m_phrase label="lu_state"/>:</strong></td>
@@ -160,22 +160,21 @@
</td>
<td class="error"><inp2:u_Error field="State"/></td>
</tr>
- <tr>
+ <tr>
<td class="block-data">
<strong><inp2:m_Phrase label="lu_comm_ZipCode"/>:</strong>
- </td>
+ </td>
<td class="block-data">
<input type="text" name="<inp2:u_InputName field="Zip"/>" value="<inp2:u_Field name="Zip"/>" style="width: 60px;" />
</td>
<td width="170" class="error"><inp2:u_Error field="Zip"/></td>
- </tr>
+ </tr>
<tr>
<td>
<strong><inp2:m_phrase label="lu_country"/>:</strong></td>
<td>
<select name="<inp2:u_InputName field="Country"/>" style="width: 300px;">
- <option value=""></option>
- <inp2:u_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+ <inp2:u_PredefinedOptions field="Country" render_as="destination" has_empty="1" selected_param="selected" selected="selected=\"selected\""/>
</select>
</td>
<td class="error"><inp2:u_Error field="Country"/></td>
@@ -185,10 +184,10 @@
<input class="button" type="submit" id="events[u][OnUpdate]" name="events[u][OnUpdate]" value="<inp2:m_Phrase label="lu_comm_Update" no_editing="1"/>"/>
<input type="hidden" name="next_template" value="in-commerce/my_account/account"/>
</td>
- </tr>
+ </tr>
</table>
</td>
</tr>
-
+
</table>
</form>
\ No newline at end of file
Index: onlinestore/platform/blocks/login/form_register.tpl
===================================================================
--- onlinestore/platform/blocks/login/form_register.tpl (revision 13329)
+++ onlinestore/platform/blocks/login/form_register.tpl (working copy)
@@ -171,8 +171,7 @@
</td>
<td>
<select name="<inp2:u_InputName field="Country"/>" style="width: 300px;">
- <option value=""></option>
- <inp2:u_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+ <inp2:u_PredefinedOptions field="Country" render_as="destination" has_empty="1" selected_param="selected" selected="selected=\"selected\""/>
</select>
</td>
<td class="error"><inp2:u_Error field="Country"/></td>
country_state_refactoring_core_v2_(including_addon1).patch [^] (163,836 bytes) 2010-04-27 07:26
[Show Content]
Index: admin_templates/country_states/country_state_edit.tpl
===================================================================
--- admin_templates/country_states/country_state_edit.tpl (revision 0)
+++ admin_templates/country_states/country_state_edit.tpl (revision 0)
@@ -0,0 +1,77 @@
+<inp2:adm_SetPopupSize width="550" height="400"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:country_states" prefix="country-state" title_preset="country_state_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('country-state', '<inp2:country-state_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ cancel_edit('country-state', 'OnCancelEdit','<inp2:country-state_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+ reset_form('country-state', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('country-state', '<inp2:country-state_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('country-state', '<inp2:country-state_NextId/>');
+ }
+ ) );
+
+
+
+ a_toolbar.Render();
+
+ <inp2:m_if check="country-state_IsSingle" >
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <inp2:m_else/>
+ <inp2:m_if check="country-state_IsLast" >
+ a_toolbar.DisableButton('next');
+ </inp2:m_if>
+ <inp2:m_if check="country-state_IsFirst" >
+ a_toolbar.DisableButton('prev');
+ </inp2:m_if>
+ </inp2:m_if>
+ </script>
+ </td>
+
+ <inp2:m_RenderElement name="ml_selector" prefix="country-state"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:country-state_SaveWarning name="grid_save_warning"/>
+<inp2:country-state_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="inp_id_label" prefix="country-state" field="CountryStateId" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="country-state" field="Type" title="la_fld_Type"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="country-state" field="StateCountryId" title="la_fld_StateCountry" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box_ml" prefix="country-state" field="Name" title="la_fld_Name"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="country-state" field="IsoCode" title="la_fld_IsoCode"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="country-state" field="ShortIsoCode" title="la_fld_ShortIsoCode"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
Index: admin_templates/country_states/country_state_list.tpl
===================================================================
--- admin_templates/country_states/country_state_list.tpl (revision 0)
+++ admin_templates/country_states/country_state_list.tpl (revision 0)
@@ -0,0 +1,48 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:country_states" prefix="country-state" title_preset="country_state_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ //do not rename - this function is used in default grid for double click!
+ function edit()
+ {
+ std_edit_item('country-state', 'country_states/country_state_edit');
+ }
+
+ var a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewCountryState" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('country-state', 'country_states/country_state_edit');
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('country-state')
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="country-state" grid="Default"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="country-state" IdField="CountryStateId" grid="Default"/>
+<script type="text/javascript">
+ Grids['country-state'].SetDependantToolbarButtons( new Array('edit','delete') );
+</script>
+<inp2:m_include t="incs/footer"/>
Index: admin_templates/users/users_edit.tpl
===================================================================
--- admin_templates/users/users_edit.tpl (revision 13400)
+++ admin_templates/users/users_edit.tpl (working copy)
@@ -80,7 +80,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="City" title="la_fld_City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="State" title="la_fld_State"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Zip" title="la_fld_Zip"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Country" title="la_fld_Country" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="u" field="Country" title="la_fld_Country" has_empty="1"/>
<inp2:m_RenderElement name="subsection" prefix="u" fields="Status,CreatedOn" title="la_section_Properties"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="u" field="Status" title="la_fld_Status"/>
Index: install/english.lang
===================================================================
--- install/english.lang (revision 13400)
+++ install/english.lang (working copy)
@@ -1,5 +1,5 @@
-<LANGUAGES>
- <LANGUAGE PackName="English" Encoding="base64"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>utf-8</CHARSET><DOCS_URL>http://docs.in-portal.org/eng/index.php</DOCS_URL><UNITSYSTEM>2</UNITSYSTEM>
+<LANGUAGES Version="3">
+ <LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" TimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
<PHRASES>
<PHRASE Label="la_Active" Module="Core" Type="1">QWN0aXZl</PHRASE>
<PHRASE Label="la_Add" Module="Core" Type="1">QWRk</PHRASE>
@@ -172,8 +172,10 @@
<PHRASE Label="la_col_SessionEnd" Module="Core" Type="1">U2Vzc2lvbiBFbmQ=</PHRASE>
<PHRASE Label="la_col_SessionLogId" Module="Core" Type="1">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
<PHRASE Label="la_col_SessionStart" Module="Core" Type="1">U2Vzc2lvbiBTdGFydA==</PHRASE>
+ <PHRASE Label="la_col_ShortIsoCode" Module="Core" Type="1">U2hvcnQgSVNPIENvZGU=</PHRASE>
<PHRASE Label="la_col_SkinName" Module="Core" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_SortBy" Module="Core" Type="1">U29ydCBieQ==</PHRASE>
+ <PHRASE Label="la_col_StateCountry" Module="Core" Type="1">U3RhdGUgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_col_Status" Module="Core" Type="1">U3RhdHVz</PHRASE>
<PHRASE Label="la_col_StopWord" Module="Core" Type="1">U3RvcCBXb3Jk</PHRASE>
<PHRASE Label="la_col_Subject" Module="Core" Type="1">U3ViamVjdA==</PHRASE>
@@ -268,246 +270,6 @@
<PHRASE Label="la_config_YahooApplicationId" Module="Core" Type="1">WWFob28gQXBwbGljYXRpb25JZA==</PHRASE>
<PHRASE Label="la_ConfirmDeleteExportPreset" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSBzZWxlY3RlZCBFeHBvcnQgUHJlc2V0Pw==</PHRASE>
<PHRASE Label="la_confirm_maintenance" Module="Core" Type="1">VGhlIHNlY3Rpb24gdHJlZSBtdXN0IGJlIHVwZGF0ZWQgdG8gcmVmbGVjdCB0aGUgbGF0ZXN0IGNoYW5nZXM=</PHRASE>
- <PHRASE Label="la_country_ABW" Module="Core" Type="1">QXJ1YmE=</PHRASE>
- <PHRASE Label="la_country_AFG" Module="Core" Type="1">QWZnaGFuaXN0YW4=</PHRASE>
- <PHRASE Label="la_country_AGO" Module="Core" Type="1">QW5nb2xh</PHRASE>
- <PHRASE Label="la_country_AIA" Module="Core" Type="1">QW5ndWlsbGE=</PHRASE>
- <PHRASE Label="la_country_ALB" Module="Core" Type="1">QWxiYW5pYQ==</PHRASE>
- <PHRASE Label="la_country_AND" Module="Core" Type="1">QW5kb3JyYQ==</PHRASE>
- <PHRASE Label="la_country_ANT" Module="Core" Type="1">TmV0aGVybGFuZHMgQW50aWxsZXM=</PHRASE>
- <PHRASE Label="la_country_ARE" Module="Core" Type="1">VW5pdGVkIEFyYWIgRW1pcmF0ZXM=</PHRASE>
- <PHRASE Label="la_country_ARG" Module="Core" Type="1">QXJnZW50aW5h</PHRASE>
- <PHRASE Label="la_country_ARM" Module="Core" Type="1">QXJtZW5pYQ==</PHRASE>
- <PHRASE Label="la_country_ASM" Module="Core" Type="1">QW1lcmljYW4gc2Ftb2E=</PHRASE>
- <PHRASE Label="la_country_ATA" Module="Core" Type="1">QW50YXJjdGljYQ==</PHRASE>
- <PHRASE Label="la_country_ATF" Module="Core" Type="1">RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz</PHRASE>
- <PHRASE Label="la_country_ATG" Module="Core" Type="1">QW50aWd1YSBhbmQgYmFyYnVkYQ==</PHRASE>
- <PHRASE Label="la_country_AUS" Module="Core" Type="1">QXVzdHJhbGlh</PHRASE>
- <PHRASE Label="la_country_AUT" Module="Core" Type="1">QXVzdHJpYQ==</PHRASE>
- <PHRASE Label="la_country_AZE" Module="Core" Type="1">QXplcmJhaWphbg==</PHRASE>
- <PHRASE Label="la_country_BDI" Module="Core" Type="1">QnVydW5kaQ==</PHRASE>
- <PHRASE Label="la_country_BEL" Module="Core" Type="1">QmVsZ2l1bQ==</PHRASE>
- <PHRASE Label="la_country_BEN" Module="Core" Type="1">QmVuaW4=</PHRASE>
- <PHRASE Label="la_country_BFA" Module="Core" Type="1">QnVya2luYSBGYXNv</PHRASE>
- <PHRASE Label="la_country_BGD" Module="Core" Type="1">QmFuZ2xhZGVzaA==</PHRASE>
- <PHRASE Label="la_country_BGR" Module="Core" Type="1">QnVsZ2FyaWE=</PHRASE>
- <PHRASE Label="la_country_BHR" Module="Core" Type="1">QmFocmFpbg==</PHRASE>
- <PHRASE Label="la_country_BHS" Module="Core" Type="1">QmFoYW1hcw==</PHRASE>
- <PHRASE Label="la_country_BIH" Module="Core" Type="1">Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ==</PHRASE>
- <PHRASE Label="la_country_BLR" Module="Core" Type="1">QmVsYXJ1cw==</PHRASE>
- <PHRASE Label="la_country_BLZ" Module="Core" Type="1">QmVsaXpl</PHRASE>
- <PHRASE Label="la_country_BMU" Module="Core" Type="1">QmVybXVkYQ==</PHRASE>
- <PHRASE Label="la_country_BOL" Module="Core" Type="1">Qm9saXZpYQ==</PHRASE>
- <PHRASE Label="la_country_BRA" Module="Core" Type="1">QnJhemls</PHRASE>
- <PHRASE Label="la_country_BRB" Module="Core" Type="1">QmFyYmFkb3M=</PHRASE>
- <PHRASE Label="la_country_BRN" Module="Core" Type="1">QnJ1bmVpIERhcnVzc2FsYW0=</PHRASE>
- <PHRASE Label="la_country_BTN" Module="Core" Type="1">Qmh1dGFu</PHRASE>
- <PHRASE Label="la_country_BVT" Module="Core" Type="1">Qm91dmV0IElzbGFuZA==</PHRASE>
- <PHRASE Label="la_country_BWA" Module="Core" Type="1">Qm90c3dhbmE=</PHRASE>
- <PHRASE Label="la_country_CAF" Module="Core" Type="1">Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj</PHRASE>
- <PHRASE Label="la_country_CAN" Module="Core" Type="1">Q2FuYWRh</PHRASE>
- <PHRASE Label="la_country_CCK" Module="Core" Type="1">Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_CHE" Module="Core" Type="1">U3dpdHplcmxhbmQ=</PHRASE>
- <PHRASE Label="la_country_CHL" Module="Core" Type="1">Q2hpbGU=</PHRASE>
- <PHRASE Label="la_country_CHN" Module="Core" Type="1">Q2hpbmE=</PHRASE>
- <PHRASE Label="la_country_CIV" Module="Core" Type="1">Q290ZSBkJ0l2b2lyZQ==</PHRASE>
- <PHRASE Label="la_country_CMR" Module="Core" Type="1">Q2FtZXJvb24=</PHRASE>
- <PHRASE Label="la_country_COD" Module="Core" Type="1">Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk=</PHRASE>
- <PHRASE Label="la_country_COG" Module="Core" Type="1">Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m</PHRASE>
- <PHRASE Label="la_country_COK" Module="Core" Type="1">Q29vayBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_COL" Module="Core" Type="1">Q29sb21iaWE=</PHRASE>
- <PHRASE Label="la_country_COM" Module="Core" Type="1">Q29tb3Jvcw==</PHRASE>
- <PHRASE Label="la_country_CPV" Module="Core" Type="1">Q2FwZSBWZXJkZQ==</PHRASE>
- <PHRASE Label="la_country_CRI" Module="Core" Type="1">Q29zdGEgUmljYQ==</PHRASE>
- <PHRASE Label="la_country_CUB" Module="Core" Type="1">Q3ViYQ==</PHRASE>
- <PHRASE Label="la_country_CXR" Module="Core" Type="1">Q2hyaXN0bWFzIElzbGFuZA==</PHRASE>
- <PHRASE Label="la_country_CYM" Module="Core" Type="1">Q2F5bWFuIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_CYP" Module="Core" Type="1">Q3lwcnVz</PHRASE>
- <PHRASE Label="la_country_CZE" Module="Core" Type="1">Q3plY2ggUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_DEU" Module="Core" Type="1">R2VybWFueQ==</PHRASE>
- <PHRASE Label="la_country_DJI" Module="Core" Type="1">RGppYm91dGk=</PHRASE>
- <PHRASE Label="la_country_DMA" Module="Core" Type="1">RG9taW5pY2E=</PHRASE>
- <PHRASE Label="la_country_DNK" Module="Core" Type="1">RGVubWFyaw==</PHRASE>
- <PHRASE Label="la_country_DOM" Module="Core" Type="1">RG9taW5pY2FuIFJlcHVibGlj</PHRASE>
- <PHRASE Label="la_country_DZA" Module="Core" Type="1">QWxnZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_ECU" Module="Core" Type="1">RWN1YWRvcg==</PHRASE>
- <PHRASE Label="la_country_EGY" Module="Core" Type="1">RWd5cHQ=</PHRASE>
- <PHRASE Label="la_country_ERI" Module="Core" Type="1">RXJpdHJlYQ==</PHRASE>
- <PHRASE Label="la_country_ESH" Module="Core" Type="1">V2VzdGVybiBTYWhhcmE=</PHRASE>
- <PHRASE Label="la_country_ESP" Module="Core" Type="1">U3BhaW4=</PHRASE>
- <PHRASE Label="la_country_EST" Module="Core" Type="1">RXN0b25pYQ==</PHRASE>
- <PHRASE Label="la_country_ETH" Module="Core" Type="1">RXRoaW9waWE=</PHRASE>
- <PHRASE Label="la_country_FIN" Module="Core" Type="1">RmlubGFuZA==</PHRASE>
- <PHRASE Label="la_country_FJI" Module="Core" Type="1">RmlqaQ==</PHRASE>
- <PHRASE Label="la_country_FLK" Module="Core" Type="1">RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp</PHRASE>
- <PHRASE Label="la_country_FRA" Module="Core" Type="1">RnJhbmNl</PHRASE>
- <PHRASE Label="la_country_FRO" Module="Core" Type="1">RmFyb2UgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_FSM" Module="Core" Type="1">TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg==</PHRASE>
- <PHRASE Label="la_country_FXX" Module="Core" Type="1">RnJhbmNlLCBNZXRyb3BvbGl0YW4=</PHRASE>
- <PHRASE Label="la_country_GAB" Module="Core" Type="1">R2Fib24=</PHRASE>
- <PHRASE Label="la_country_GBR" Module="Core" Type="1">VW5pdGVkIEtpbmdkb20=</PHRASE>
- <PHRASE Label="la_country_GEO" Module="Core" Type="1">R2VvcmdpYQ==</PHRASE>
- <PHRASE Label="la_country_GHA" Module="Core" Type="1">R2hhbmE=</PHRASE>
- <PHRASE Label="la_country_GIB" Module="Core" Type="1">R2licmFsdGFy</PHRASE>
- <PHRASE Label="la_country_GIN" Module="Core" Type="1">R3VpbmVh</PHRASE>
- <PHRASE Label="la_country_GLP" Module="Core" Type="1">R3VhZGVsb3VwZQ==</PHRASE>
- <PHRASE Label="la_country_GMB" Module="Core" Type="1">R2FtYmlh</PHRASE>
- <PHRASE Label="la_country_GNB" Module="Core" Type="1">R3VpbmVhLUJpc3NhdQ==</PHRASE>
- <PHRASE Label="la_country_GNQ" Module="Core" Type="1">RXF1YXRvcmlhbCBHdWluZWE=</PHRASE>
- <PHRASE Label="la_country_GRC" Module="Core" Type="1">R3JlZWNl</PHRASE>
- <PHRASE Label="la_country_GRD" Module="Core" Type="1">R3JlbmFkYQ==</PHRASE>
- <PHRASE Label="la_country_GRL" Module="Core" Type="1">R3JlZW5sYW5k</PHRASE>
- <PHRASE Label="la_country_GTM" Module="Core" Type="1">R3VhdGVtYWxh</PHRASE>
- <PHRASE Label="la_country_GUF" Module="Core" Type="1">RnJlbmNoIEd1aWFuYQ==</PHRASE>
- <PHRASE Label="la_country_GUM" Module="Core" Type="1">R3VhbQ==</PHRASE>
- <PHRASE Label="la_country_GUY" Module="Core" Type="1">R3V5YW5h</PHRASE>
- <PHRASE Label="la_country_HKG" Module="Core" Type="1">SG9uZyBrb25n</PHRASE>
- <PHRASE Label="la_country_HMD" Module="Core" Type="1">SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_HND" Module="Core" Type="1">SG9uZHVyYXM=</PHRASE>
- <PHRASE Label="la_country_HRV" Module="Core" Type="1">Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep</PHRASE>
- <PHRASE Label="la_country_HTI" Module="Core" Type="1">SGFpdGk=</PHRASE>
- <PHRASE Label="la_country_HUN" Module="Core" Type="1">SHVuZ2FyeQ==</PHRASE>
- <PHRASE Label="la_country_IDN" Module="Core" Type="1">SW5kb25lc2lh</PHRASE>
- <PHRASE Label="la_country_IND" Module="Core" Type="1">SW5kaWE=</PHRASE>
- <PHRASE Label="la_country_IOT" Module="Core" Type="1">QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5</PHRASE>
- <PHRASE Label="la_country_IRL" Module="Core" Type="1">SXJlbGFuZA==</PHRASE>
- <PHRASE Label="la_country_IRN" Module="Core" Type="1">SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik=</PHRASE>
- <PHRASE Label="la_country_IRQ" Module="Core" Type="1">SXJhcQ==</PHRASE>
- <PHRASE Label="la_country_ISL" Module="Core" Type="1">SWNlbGFuZA==</PHRASE>
- <PHRASE Label="la_country_ISR" Module="Core" Type="1">SXNyYWVs</PHRASE>
- <PHRASE Label="la_country_ITA" Module="Core" Type="1">SXRhbHk=</PHRASE>
- <PHRASE Label="la_country_JAM" Module="Core" Type="1">SmFtYWljYQ==</PHRASE>
- <PHRASE Label="la_country_JOR" Module="Core" Type="1">Sm9yZGFu</PHRASE>
- <PHRASE Label="la_country_JPN" Module="Core" Type="1">SmFwYW4=</PHRASE>
- <PHRASE Label="la_country_KAZ" Module="Core" Type="1">S2F6YWtoc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_KEN" Module="Core" Type="1">S2VueWE=</PHRASE>
- <PHRASE Label="la_country_KGZ" Module="Core" Type="1">S3lyZ3l6c3Rhbg==</PHRASE>
- <PHRASE Label="la_country_KHM" Module="Core" Type="1">Q2FtYm9kaWE=</PHRASE>
- <PHRASE Label="la_country_KIR" Module="Core" Type="1">S2lyaWJhdGk=</PHRASE>
- <PHRASE Label="la_country_KNA" Module="Core" Type="1">U2FpbnQgS2l0dHMgYW5kIE5ldmlz</PHRASE>
- <PHRASE Label="la_country_KOR" Module="Core" Type="1">S29yZWEsIFJlcHVibGljIG9m</PHRASE>
- <PHRASE Label="la_country_KWT" Module="Core" Type="1">S3V3YWl0</PHRASE>
- <PHRASE Label="la_country_LAO" Module="Core" Type="1">TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_LBN" Module="Core" Type="1">TGViYW5vbg==</PHRASE>
- <PHRASE Label="la_country_LBR" Module="Core" Type="1">TGliZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_LBY" Module="Core" Type="1">TGlieWFuIEFyYWIgSmFtYWhpcml5YQ==</PHRASE>
- <PHRASE Label="la_country_LCA" Module="Core" Type="1">U2FpbnQgTHVjaWE=</PHRASE>
- <PHRASE Label="la_country_LIE" Module="Core" Type="1">TGllY2h0ZW5zdGVpbg==</PHRASE>
- <PHRASE Label="la_country_LKA" Module="Core" Type="1">U3JpIGxhbmth</PHRASE>
- <PHRASE Label="la_country_LSO" Module="Core" Type="1">TGVzb3Robw==</PHRASE>
- <PHRASE Label="la_country_LTU" Module="Core" Type="1">TGl0aHVhbmlh</PHRASE>
- <PHRASE Label="la_country_LUX" Module="Core" Type="1">THV4ZW1ib3VyZw==</PHRASE>
- <PHRASE Label="la_country_LVA" Module="Core" Type="1">TGF0dmlh</PHRASE>
- <PHRASE Label="la_country_MAC" Module="Core" Type="1">TWFjYXU=</PHRASE>
- <PHRASE Label="la_country_MAR" Module="Core" Type="1">TW9yb2Njbw==</PHRASE>
- <PHRASE Label="la_country_MCO" Module="Core" Type="1">TW9uYWNv</PHRASE>
- <PHRASE Label="la_country_MDA" Module="Core" Type="1">TW9sZG92YSwgUmVwdWJsaWMgb2Y=</PHRASE>
- <PHRASE Label="la_country_MDG" Module="Core" Type="1">TWFkYWdhc2Nhcg==</PHRASE>
- <PHRASE Label="la_country_MDV" Module="Core" Type="1">TWFsZGl2ZXM=</PHRASE>
- <PHRASE Label="la_country_MEX" Module="Core" Type="1">TWV4aWNv</PHRASE>
- <PHRASE Label="la_country_MHL" Module="Core" Type="1">TWFyc2hhbGwgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_MKD" Module="Core" Type="1">TWFjZWRvbmlh</PHRASE>
- <PHRASE Label="la_country_MLI" Module="Core" Type="1">TWFsaQ==</PHRASE>
- <PHRASE Label="la_country_MLT" Module="Core" Type="1">TWFsdGE=</PHRASE>
- <PHRASE Label="la_country_MMR" Module="Core" Type="1">TXlhbm1hcg==</PHRASE>
- <PHRASE Label="la_country_MNG" Module="Core" Type="1">TW9uZ29saWE=</PHRASE>
- <PHRASE Label="la_country_MNP" Module="Core" Type="1">Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_MOZ" Module="Core" Type="1">TW96YW1iaXF1ZQ==</PHRASE>
- <PHRASE Label="la_country_MRT" Module="Core" Type="1">TWF1cml0YW5pYQ==</PHRASE>
- <PHRASE Label="la_country_MSR" Module="Core" Type="1">TW9udHNlcnJhdA==</PHRASE>
- <PHRASE Label="la_country_MTQ" Module="Core" Type="1">TWFydGluaXF1ZQ==</PHRASE>
- <PHRASE Label="la_country_MUS" Module="Core" Type="1">TWF1cml0aXVz</PHRASE>
- <PHRASE Label="la_country_MWI" Module="Core" Type="1">TWFsYXdp</PHRASE>
- <PHRASE Label="la_country_MYS" Module="Core" Type="1">TWFsYXlzaWE=</PHRASE>
- <PHRASE Label="la_country_MYT" Module="Core" Type="1">TWF5b3R0ZQ==</PHRASE>
- <PHRASE Label="la_country_NAM" Module="Core" Type="1">TmFtaWJpYQ==</PHRASE>
- <PHRASE Label="la_country_NCL" Module="Core" Type="1">TmV3IENhbGVkb25pYQ==</PHRASE>
- <PHRASE Label="la_country_NER" Module="Core" Type="1">TmlnZXI=</PHRASE>
- <PHRASE Label="la_country_NFK" Module="Core" Type="1">Tm9yZm9sayBJc2xhbmQ=</PHRASE>
- <PHRASE Label="la_country_NGA" Module="Core" Type="1">TmlnZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_NIC" Module="Core" Type="1">TmljYXJhZ3Vh</PHRASE>
- <PHRASE Label="la_country_NIU" Module="Core" Type="1">Tml1ZQ==</PHRASE>
- <PHRASE Label="la_country_NLD" Module="Core" Type="1">TmV0aGVybGFuZHM=</PHRASE>
- <PHRASE Label="la_country_NOR" Module="Core" Type="1">Tm9yd2F5</PHRASE>
- <PHRASE Label="la_country_NPL" Module="Core" Type="1">TmVwYWw=</PHRASE>
- <PHRASE Label="la_country_NRU" Module="Core" Type="1">TmF1cnU=</PHRASE>
- <PHRASE Label="la_country_NZL" Module="Core" Type="1">TmV3IFplYWxhbmQ=</PHRASE>
- <PHRASE Label="la_country_OMN" Module="Core" Type="1">T21hbg==</PHRASE>
- <PHRASE Label="la_country_PAK" Module="Core" Type="1">UGFraXN0YW4=</PHRASE>
- <PHRASE Label="la_country_PAN" Module="Core" Type="1">UGFuYW1h</PHRASE>
- <PHRASE Label="la_country_PCN" Module="Core" Type="1">UGl0Y2Fpcm4=</PHRASE>
- <PHRASE Label="la_country_PER" Module="Core" Type="1">UGVydQ==</PHRASE>
- <PHRASE Label="la_country_PHL" Module="Core" Type="1">UGhpbGlwcGluZXM=</PHRASE>
- <PHRASE Label="la_country_PLW" Module="Core" Type="1">UGFsYXU=</PHRASE>
- <PHRASE Label="la_country_PNG" Module="Core" Type="1">UGFwdWEgTmV3IEd1aW5lYQ==</PHRASE>
- <PHRASE Label="la_country_POL" Module="Core" Type="1">UG9sYW5k</PHRASE>
- <PHRASE Label="la_country_PRI" Module="Core" Type="1">UHVlcnRvIFJpY28=</PHRASE>
- <PHRASE Label="la_country_PRK" Module="Core" Type="1">S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y=</PHRASE>
- <PHRASE Label="la_country_PRT" Module="Core" Type="1">UG9ydHVnYWw=</PHRASE>
- <PHRASE Label="la_country_PRY" Module="Core" Type="1">UGFyYWd1YXk=</PHRASE>
- <PHRASE Label="la_country_PSE" Module="Core" Type="1">UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA==</PHRASE>
- <PHRASE Label="la_country_PYF" Module="Core" Type="1">RnJlbmNoIFBvbHluZXNpYQ==</PHRASE>
- <PHRASE Label="la_country_QAT" Module="Core" Type="1">UWF0YXI=</PHRASE>
- <PHRASE Label="la_country_REU" Module="Core" Type="1">UmV1bmlvbg==</PHRASE>
- <PHRASE Label="la_country_ROU" Module="Core" Type="1">Um9tYW5pYQ==</PHRASE>
- <PHRASE Label="la_country_RUS" Module="Core" Type="1">UnVzc2lhbiBGZWRlcmF0aW9u</PHRASE>
- <PHRASE Label="la_country_RWA" Module="Core" Type="1">UndhbmRh</PHRASE>
- <PHRASE Label="la_country_SAU" Module="Core" Type="1">U2F1ZGkgQXJhYmlh</PHRASE>
- <PHRASE Label="la_country_SDN" Module="Core" Type="1">U3VkYW4=</PHRASE>
- <PHRASE Label="la_country_SEN" Module="Core" Type="1">U2VuZWdhbA==</PHRASE>
- <PHRASE Label="la_country_SGP" Module="Core" Type="1">U2luZ2Fwb3Jl</PHRASE>
- <PHRASE Label="la_country_SGS" Module="Core" Type="1">U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_SHN" Module="Core" Type="1">U3QuIGhlbGVuYQ==</PHRASE>
- <PHRASE Label="la_country_SJM" Module="Core" Type="1">U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_SLB" Module="Core" Type="1">U29sb21vbiBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_SLE" Module="Core" Type="1">U2llcnJhIExlb25l</PHRASE>
- <PHRASE Label="la_country_SLV" Module="Core" Type="1">RWwgU2FsdmFkb3I=</PHRASE>
- <PHRASE Label="la_country_SMR" Module="Core" Type="1">U2FuIE1hcmlubw==</PHRASE>
- <PHRASE Label="la_country_SOM" Module="Core" Type="1">U29tYWxpYQ==</PHRASE>
- <PHRASE Label="la_country_SPM" Module="Core" Type="1">U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24=</PHRASE>
- <PHRASE Label="la_country_STP" Module="Core" Type="1">U2FvIFRvbWUgYW5kIFByaW5jaXBl</PHRASE>
- <PHRASE Label="la_country_SUR" Module="Core" Type="1">U3VyaW5hbWU=</PHRASE>
- <PHRASE Label="la_country_SVK" Module="Core" Type="1">U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk=</PHRASE>
- <PHRASE Label="la_country_SVN" Module="Core" Type="1">U2xvdmVuaWE=</PHRASE>
- <PHRASE Label="la_country_SWE" Module="Core" Type="1">U3dlZGVu</PHRASE>
- <PHRASE Label="la_country_SWZ" Module="Core" Type="1">U3dhemlsYW5k</PHRASE>
- <PHRASE Label="la_country_SYC" Module="Core" Type="1">U2V5Y2hlbGxlcw==</PHRASE>
- <PHRASE Label="la_country_SYR" Module="Core" Type="1">U3lyaWFuIEFyYWIgUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_TCA" Module="Core" Type="1">VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_TCD" Module="Core" Type="1">Q2hhZA==</PHRASE>
- <PHRASE Label="la_country_TGO" Module="Core" Type="1">VG9nbw==</PHRASE>
- <PHRASE Label="la_country_THA" Module="Core" Type="1">VGhhaWxhbmQ=</PHRASE>
- <PHRASE Label="la_country_TJK" Module="Core" Type="1">VGFqaWtpc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_TKL" Module="Core" Type="1">VG9rZWxhdQ==</PHRASE>
- <PHRASE Label="la_country_TKM" Module="Core" Type="1">VHVya21lbmlzdGFu</PHRASE>
- <PHRASE Label="la_country_TLS" Module="Core" Type="1">RWFzdCBUaW1vcg==</PHRASE>
- <PHRASE Label="la_country_TON" Module="Core" Type="1">VG9uZ2E=</PHRASE>
- <PHRASE Label="la_country_TTO" Module="Core" Type="1">VHJpbmlkYWQgYW5kIFRvYmFnbw==</PHRASE>
- <PHRASE Label="la_country_TUN" Module="Core" Type="1">VHVuaXNpYQ==</PHRASE>
- <PHRASE Label="la_country_TUR" Module="Core" Type="1">VHVya2V5</PHRASE>
- <PHRASE Label="la_country_TUV" Module="Core" Type="1">VHV2YWx1</PHRASE>
- <PHRASE Label="la_country_TWN" Module="Core" Type="1">VGFpd2Fu</PHRASE>
- <PHRASE Label="la_country_TZA" Module="Core" Type="1">VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg==</PHRASE>
- <PHRASE Label="la_country_UGA" Module="Core" Type="1">VWdhbmRh</PHRASE>
- <PHRASE Label="la_country_UKR" Module="Core" Type="1">VWtyYWluZQ==</PHRASE>
- <PHRASE Label="la_country_UMI" Module="Core" Type="1">VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_URY" Module="Core" Type="1">VXJ1Z3VheQ==</PHRASE>
- <PHRASE Label="la_country_USA" Module="Core" Type="1">VW5pdGVkIFN0YXRlcw==</PHRASE>
- <PHRASE Label="la_country_UZB" Module="Core" Type="1">VXpiZWtpc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_VAT" Module="Core" Type="1">VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk=</PHRASE>
- <PHRASE Label="la_country_VCT" Module="Core" Type="1">U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM=</PHRASE>
- <PHRASE Label="la_country_VEN" Module="Core" Type="1">VmVuZXp1ZWxh</PHRASE>
- <PHRASE Label="la_country_VGB" Module="Core" Type="1">VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp</PHRASE>
- <PHRASE Label="la_country_VIR" Module="Core" Type="1">VmlyZ2luIElzbGFuZHMgKFUuUy4p</PHRASE>
- <PHRASE Label="la_country_VNM" Module="Core" Type="1">VmlldG5hbQ==</PHRASE>
- <PHRASE Label="la_country_VUT" Module="Core" Type="1">VmFudWF0dQ==</PHRASE>
- <PHRASE Label="la_country_WLF" Module="Core" Type="1">V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_WSM" Module="Core" Type="1">U2Ftb2E=</PHRASE>
- <PHRASE Label="la_country_YEM" Module="Core" Type="1">WWVtZW4=</PHRASE>
- <PHRASE Label="la_country_YUG" Module="Core" Type="1">WXVnb3NsYXZpYQ==</PHRASE>
- <PHRASE Label="la_country_ZAF" Module="Core" Type="1">U291dGggQWZyaWNh</PHRASE>
- <PHRASE Label="la_country_ZMB" Module="Core" Type="1">WmFtYmlh</PHRASE>
- <PHRASE Label="la_country_ZWE" Module="Core" Type="1">WmltYmFid2U=</PHRASE>
<PHRASE Label="la_DataGrid1" Module="Core" Type="1">RGF0YSBHcmlkcw==</PHRASE>
<PHRASE Label="la_DataGrid2" Module="Core" Type="1">RGF0YSBHcmlkcyAy</PHRASE>
<PHRASE Label="la_days" Module="Core" Type="1">ZGF5cw==</PHRASE>
@@ -804,11 +566,13 @@
<PHRASE Label="la_fld_SentStatus" Module="Core" Type="1">U2VudA==</PHRASE>
<PHRASE Label="la_fld_Server" Module="Core" Type="1">U2VydmVy</PHRASE>
<PHRASE Label="la_fld_SessionLogId" Module="Core" Type="1">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
+ <PHRASE Label="la_fld_ShortIsoCode" Module="Core" Type="1">U2hvcnQgSVNPIENvZGU=</PHRASE>
<PHRASE Label="la_fld_SimpleSearch" Module="Core" Type="1">U2ltcGxlIFNlYXJjaA==</PHRASE>
<PHRASE Label="la_fld_SkinName" Module="Core" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SkipFirstRow" Module="Core" Type="1">U2tpcCBGaXJzdCBSb3c=</PHRASE>
<PHRASE Label="la_fld_SortValues" Module="Core" Type="1">U29ydCBWYWx1ZXM=</PHRASE>
<PHRASE Label="la_fld_State" Module="Core" Type="1">U3RhdGU=</PHRASE>
+ <PHRASE Label="la_fld_StateCountry" Module="Core" Type="1">U3RhdGUgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_fld_Status" Module="Core" Type="1">U3RhdHVz</PHRASE>
<PHRASE Label="la_fld_StopWord" Module="Core" Type="1">U3RvcCBXb3Jk</PHRASE>
<PHRASE Label="la_fld_StylesheetId" Module="Core" Type="1">U3R5bGVzaGVldCBJRA==</PHRASE>
@@ -933,6 +697,7 @@
<PHRASE Label="la_opt_Colon" Module="Core" Type="1">Q29sb24=</PHRASE>
<PHRASE Label="la_opt_Comma" Module="Core" Type="1">Q29tbWE=</PHRASE>
<PHRASE Label="la_opt_CommentText" Module="Core" Type="1">Q29tbWVudCBUZXh0</PHRASE>
+ <PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
@@ -1199,71 +964,6 @@
<PHRASE Label="la_Show" Module="Core" Type="1">U2hvdw==</PHRASE>
<PHRASE Label="la_SQLAffectedRows" Module="Core" Type="1">QWZmZWN0ZWQgcm93cw==</PHRASE>
<PHRASE Label="la_SQLRuntime" Module="Core" Type="1">RXhlY3V0ZWQgaW46</PHRASE>
- <PHRASE Label="la_state_AB" Module="Core" Type="1">QWxiZXJ0YQ==</PHRASE>
- <PHRASE Label="la_state_AK" Module="Core" Type="1">QWxhc2th</PHRASE>
- <PHRASE Label="la_state_AL" Module="Core" Type="1">QWxhYmFtYQ==</PHRASE>
- <PHRASE Label="la_state_AR" Module="Core" Type="1">QXJrYW5zYXM=</PHRASE>
- <PHRASE Label="la_state_AZ" Module="Core" Type="1">QXJpem9uYQ==</PHRASE>
- <PHRASE Label="la_state_BC" Module="Core" Type="1">QnJpdGlzaCBDb2x1bWJpYQ==</PHRASE>
- <PHRASE Label="la_state_CA" Module="Core" Type="1">Q2FsaWZvcm5pYQ==</PHRASE>
- <PHRASE Label="la_state_CO" Module="Core" Type="1">Q29sb3JhZG8=</PHRASE>
- <PHRASE Label="la_state_CT" Module="Core" Type="1">Q29ubmVjdGljdXQ=</PHRASE>
- <PHRASE Label="la_state_DC" Module="Core" Type="1">RGlzdHJpY3Qgb2YgQ29sdW1iaWE=</PHRASE>
- <PHRASE Label="la_state_DE" Module="Core" Type="1">RGVsYXdhcmU=</PHRASE>
- <PHRASE Label="la_state_FL" Module="Core" Type="1">RmxvcmlkYQ==</PHRASE>
- <PHRASE Label="la_state_GA" Module="Core" Type="1">R2VvcmdpYQ==</PHRASE>
- <PHRASE Label="la_state_HI" Module="Core" Type="1">SGF3YWlp</PHRASE>
- <PHRASE Label="la_state_IA" Module="Core" Type="1">SW93YQ==</PHRASE>
- <PHRASE Label="la_state_ID" Module="Core" Type="1">SWRhaG8=</PHRASE>
- <PHRASE Label="la_state_IL" Module="Core" Type="1">SWxsaW5vaXM=</PHRASE>
- <PHRASE Label="la_state_IN" Module="Core" Type="1">SW5kaWFuYQ==</PHRASE>
- <PHRASE Label="la_state_KS" Module="Core" Type="1">S2Fuc2Fz</PHRASE>
- <PHRASE Label="la_state_KY" Module="Core" Type="1">S2VudHVja3k=</PHRASE>
- <PHRASE Label="la_state_LA" Module="Core" Type="1">TG91aXNpYW5h</PHRASE>
- <PHRASE Label="la_state_MA" Module="Core" Type="1">TWFzc2FjaHVzZXR0cw==</PHRASE>
- <PHRASE Label="la_state_MB" Module="Core" Type="1">TWFuaXRvYmE=</PHRASE>
- <PHRASE Label="la_state_MD" Module="Core" Type="1">TWFyeWxhbmQ=</PHRASE>
- <PHRASE Label="la_state_ME" Module="Core" Type="1">TWFpbmU=</PHRASE>
- <PHRASE Label="la_state_MI" Module="Core" Type="1">TWljaGlnYW4=</PHRASE>
- <PHRASE Label="la_state_MN" Module="Core" Type="1">TWlubmVzb3Rh</PHRASE>
- <PHRASE Label="la_state_MO" Module="Core" Type="1">TWlzc291cmk=</PHRASE>
- <PHRASE Label="la_state_MS" Module="Core" Type="1">TWlzc2lzc2lwcGk=</PHRASE>
- <PHRASE Label="la_state_MT" Module="Core" Type="1">TW9udGFuYQ==</PHRASE>
- <PHRASE Label="la_state_NB" Module="Core" Type="1">TmV3IEJydW5zd2ljaw==</PHRASE>
- <PHRASE Label="la_state_NC" Module="Core" Type="1">Tm9ydGggQ2Fyb2xpbmE=</PHRASE>
- <PHRASE Label="la_state_ND" Module="Core" Type="1">Tm9ydGggRGFrb3Rh</PHRASE>
- <PHRASE Label="la_state_NE" Module="Core" Type="1">TmVicmFza2E=</PHRASE>
- <PHRASE Label="la_state_NH" Module="Core" Type="1">TmV3IEhhbXBzaGlyZQ==</PHRASE>
- <PHRASE Label="la_state_NJ" Module="Core" Type="1">TmV3IEplcnNleQ==</PHRASE>
- <PHRASE Label="la_state_NL" Module="Core" Type="1">TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg==</PHRASE>
- <PHRASE Label="la_state_NM" Module="Core" Type="1">TmV3IE1leGljbw==</PHRASE>
- <PHRASE Label="la_state_NS" Module="Core" Type="1">Tm92YSBTY290aWE=</PHRASE>
- <PHRASE Label="la_state_NT" Module="Core" Type="1">Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz</PHRASE>
- <PHRASE Label="la_state_NU" Module="Core" Type="1">TnVuYXZ1dA==</PHRASE>
- <PHRASE Label="la_state_NV" Module="Core" Type="1">TmV2YWRh</PHRASE>
- <PHRASE Label="la_state_NY" Module="Core" Type="1">TmV3IFlvcms=</PHRASE>
- <PHRASE Label="la_state_OH" Module="Core" Type="1">T2hpbw==</PHRASE>
- <PHRASE Label="la_state_OK" Module="Core" Type="1">T2tsYWhvbWE=</PHRASE>
- <PHRASE Label="la_state_ON" Module="Core" Type="1">T250YXJpbw==</PHRASE>
- <PHRASE Label="la_state_OR" Module="Core" Type="1">T3JlZ29u</PHRASE>
- <PHRASE Label="la_state_PA" Module="Core" Type="1">UGVubnN5bHZhbmlh</PHRASE>
- <PHRASE Label="la_state_PE" Module="Core" Type="1">UHJpbmNlIEVkd2FyZCBJc2xhbmQ=</PHRASE>
- <PHRASE Label="la_state_PR" Module="Core" Type="1">UHVlcnRvIFJpY28=</PHRASE>
- <PHRASE Label="la_state_QC" Module="Core" Type="1">UXVlYmVj</PHRASE>
- <PHRASE Label="la_state_RI" Module="Core" Type="1">UmhvZGUgSXNsYW5k</PHRASE>
- <PHRASE Label="la_state_SC" Module="Core" Type="1">U291dGggQ2Fyb2xpbmE=</PHRASE>
- <PHRASE Label="la_state_SD" Module="Core" Type="1">U291dGggRGFrb3Rh</PHRASE>
- <PHRASE Label="la_state_SK" Module="Core" Type="1">U2Fza2F0Y2hld2Fu</PHRASE>
- <PHRASE Label="la_state_TN" Module="Core" Type="1">VGVubmVzc2Vl</PHRASE>
- <PHRASE Label="la_state_TX" Module="Core" Type="1">VGV4YXM=</PHRASE>
- <PHRASE Label="la_state_UT" Module="Core" Type="1">VXRhaA==</PHRASE>
- <PHRASE Label="la_state_VA" Module="Core" Type="1">VmlyZ2luaWE=</PHRASE>
- <PHRASE Label="la_state_VT" Module="Core" Type="1">VmVybW9udA==</PHRASE>
- <PHRASE Label="la_state_WA" Module="Core" Type="1">V2FzaGluZ3Rvbg==</PHRASE>
- <PHRASE Label="la_state_WI" Module="Core" Type="1">V2lzY29uc2lu</PHRASE>
- <PHRASE Label="la_state_WV" Module="Core" Type="1">V2VzdCBWaXJnaW5pYQ==</PHRASE>
- <PHRASE Label="la_state_WY" Module="Core" Type="1">V3lvbWluZw==</PHRASE>
- <PHRASE Label="la_state_YT" Module="Core" Type="1">WXVrb24=</PHRASE>
<PHRASE Label="la_step" Module="Core" Type="1">U3RlcA==</PHRASE>
<PHRASE Label="la_StyleDefinition" Module="Core" Type="1">RGVmaW5pdGlvbg==</PHRASE>
<PHRASE Label="la_StylePreview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
@@ -1401,6 +1101,7 @@
<PHRASE Label="la_Text_View" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_title_AddingAgent" Module="Core" Type="1">QWRkaW5nIEFnZW50</PHRASE>
<PHRASE Label="la_title_AddingBanRule" Module="Core" Type="1">QWRkaW5nIEJhbiBSdWxl</PHRASE>
+ <PHRASE Label="la_title_AddingCountryState" Module="Core" Type="1">QWRkaW5nIENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_title_addingCustom" Module="Core" Type="1">QWRkaW5nIEN1c3RvbSBGaWVsZA==</PHRASE>
<PHRASE Label="la_title_AddingFile" Module="Core" Type="1">QWRkaW5nIEZpbGU=</PHRASE>
<PHRASE Label="la_title_AddingMailingList" Module="Core" Type="1">QWRkaW5nIE1haWxpbmcgTGlzdA==</PHRASE>
@@ -1440,12 +1141,14 @@
<PHRASE Label="la_title_ColumnPicker" Module="Core" Type="1">Q29sdW1uIFBpY2tlcg==</PHRASE>
<PHRASE Label="la_title_Configuration" Module="Core" Type="1">Q29uZmlndXJhdGlvbg==</PHRASE>
<PHRASE Label="la_Title_ContactInformation" Module="Core" Type="1">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
+ <PHRASE Label="la_title_CountryStates" Module="Core" Type="1">Q291bnRyaWVzICYgU3RhdGVz</PHRASE>
<PHRASE Label="la_title_CSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydA==</PHRASE>
<PHRASE Label="la_title_Custom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_title_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
<PHRASE Label="la_title_EditingAgent" Module="Core" Type="1">RWRpdGluZyBBZ2VudA==</PHRASE>
<PHRASE Label="la_title_EditingBanRule" Module="Core" Type="1">RWRpdGluZyBCYW4gUnVsZQ==</PHRASE>
<PHRASE Label="la_title_EditingChangeLog" Module="Core" Type="1">RWRpdGluZyBDaGFuZ2VzIExvZw==</PHRASE>
+ <PHRASE Label="la_title_EditingCountryState" Module="Core" Type="1">RWRpdGluZyBDb3VudHJ5L1N0YXRl</PHRASE>
<PHRASE Label="la_title_EditingEmailEvent" Module="Core" Type="1">RWRpdGluZyBFbWFpbCBFdmVudA==</PHRASE>
<PHRASE Label="la_title_EditingFile" Module="Core" Type="1">RWRpdGluZyBGaWxl</PHRASE>
<PHRASE Label="la_title_EditingMembership" Module="Core" Type="1">RWRpdGluZyBNZW1iZXJzaGlw</PHRASE>
@@ -1575,6 +1278,7 @@
<PHRASE Label="la_ToolTip_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</PHRASE>
<PHRASE Label="la_ToolTip_NewBaseStyle" Module="Core" Type="1">TmV3IEJhc2UgU3R5bGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewBlockStyle" Module="Core" Type="1">TmV3IEJsb2NrIFN0eWxl</PHRASE>
+ <PHRASE Label="la_ToolTip_NewCountryState" Module="Core" Type="1">TmV3IENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewGroup" Module="Core" Type="1">TmV3IEdyb3Vw</PHRASE>
<PHRASE Label="la_ToolTip_newlabel" Module="Core" Type="1">TmV3IGxhYmVs</PHRASE>
<PHRASE Label="la_ToolTip_NewLanguage" Module="Core" Type="1">TmV3IExhbmd1YWdl</PHRASE>
@@ -1760,5 +1464,314 @@
<EVENT MessageType="html" Event="USER.VALIDATE" Type="0">U3ViamVjdDogVXNlciBSZWdpc3RyYXRpb24gaXMgVmFsaWRhdGVkCgpXZWxjb21lIHRvIEluLXBvcnRhbCE8YnIvPjxici8+DQoNCllvdXIgdXNlciByZWdpc3RyYXRpb24gaGFzIGJlZW4gYXBwcm92ZWQuIFlvdSBjYW4gbG9naW4gbm93IDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVybC8+Ij48aW5wMjptX0Jhc2VVcmwvPjwvYT4gdXNpbmcgdGhlIGZvbGxvd2luZyBpbmZvcm1hdGlvbjo8YnIvPjxici8+DQoNCj09PT09PT09PT09PT09PT09PTxici8+DQpVc2VybmFtZTogIjxpbnAyOnVfRmllbGQgbmFtZT0iTG9naW4iLz4iPGJyLz4NClBhc3N3b3JkOiAiPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiI8YnIvPg0KPT09PT09PT09PT09PT09PT09PGJyLz48YnIvPg0K</EVENT>
<EVENT MessageType="html" Event="USER.VALIDATE" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uIGlzIFZhbGlkYXRlZAoKVXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgaGFzIGJlZW4gdmFsaWRhdGVkLg==</EVENT>
</EVENTS>
+ <COUNTRIES>
+ <COUNTRY Iso="ABW" Translation="QXJ1YmE="/>
+ <COUNTRY Iso="AFG" Translation="QWZnaGFuaXN0YW4="/>
+ <COUNTRY Iso="AGO" Translation="QW5nb2xh"/>
+ <COUNTRY Iso="AIA" Translation="QW5ndWlsbGE="/>
+ <COUNTRY Iso="ALB" Translation="QWxiYW5pYQ=="/>
+ <COUNTRY Iso="AND" Translation="QW5kb3JyYQ=="/>
+ <COUNTRY Iso="ANT" Translation="TmV0aGVybGFuZHMgQW50aWxsZXM="/>
+ <COUNTRY Iso="ARE" Translation="VW5pdGVkIEFyYWIgRW1pcmF0ZXM="/>
+ <COUNTRY Iso="ARG" Translation="QXJnZW50aW5h"/>
+ <COUNTRY Iso="ARM" Translation="QXJtZW5pYQ=="/>
+ <COUNTRY Iso="ASM" Translation="QW1lcmljYW4gc2Ftb2E="/>
+ <COUNTRY Iso="ATA" Translation="QW50YXJjdGljYQ=="/>
+ <COUNTRY Iso="ATF" Translation="RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz"/>
+ <COUNTRY Iso="ATG" Translation="QW50aWd1YSBhbmQgYmFyYnVkYQ=="/>
+ <COUNTRY Iso="AUS" Translation="QXVzdHJhbGlh"/>
+ <COUNTRY Iso="AUT" Translation="QXVzdHJpYQ=="/>
+ <COUNTRY Iso="AZE" Translation="QXplcmJhaWphbg=="/>
+ <COUNTRY Iso="BDI" Translation="QnVydW5kaQ=="/>
+ <COUNTRY Iso="BEL" Translation="QmVsZ2l1bQ=="/>
+ <COUNTRY Iso="BEN" Translation="QmVuaW4="/>
+ <COUNTRY Iso="BFA" Translation="QnVya2luYSBGYXNv"/>
+ <COUNTRY Iso="BGD" Translation="QmFuZ2xhZGVzaA=="/>
+ <COUNTRY Iso="BGR" Translation="QnVsZ2FyaWE="/>
+ <COUNTRY Iso="BHR" Translation="QmFocmFpbg=="/>
+ <COUNTRY Iso="BHS" Translation="QmFoYW1hcw=="/>
+ <COUNTRY Iso="BIH" Translation="Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ=="/>
+ <COUNTRY Iso="BLR" Translation="QmVsYXJ1cw=="/>
+ <COUNTRY Iso="BLZ" Translation="QmVsaXpl"/>
+ <COUNTRY Iso="BMU" Translation="QmVybXVkYQ=="/>
+ <COUNTRY Iso="BOL" Translation="Qm9saXZpYQ=="/>
+ <COUNTRY Iso="BRA" Translation="QnJhemls"/>
+ <COUNTRY Iso="BRB" Translation="QmFyYmFkb3M="/>
+ <COUNTRY Iso="BRN" Translation="QnJ1bmVpIERhcnVzc2FsYW0="/>
+ <COUNTRY Iso="BTN" Translation="Qmh1dGFu"/>
+ <COUNTRY Iso="BVT" Translation="Qm91dmV0IElzbGFuZA=="/>
+ <COUNTRY Iso="BWA" Translation="Qm90c3dhbmE="/>
+ <COUNTRY Iso="CAF" Translation="Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj"/>
+ <COUNTRY Iso="CAN" Translation="Q2FuYWRh">
+ <STATE Iso="AB" Translation="QWxiZXJ0YQ=="/>
+ <STATE Iso="BC" Translation="QnJpdGlzaCBDb2x1bWJpYQ=="/>
+ <STATE Iso="MB" Translation="TWFuaXRvYmE="/>
+ <STATE Iso="NB" Translation="TmV3IEJydW5zd2ljaw=="/>
+ <STATE Iso="NL" Translation="TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg=="/>
+ <STATE Iso="NS" Translation="Tm92YSBTY290aWE="/>
+ <STATE Iso="NT" Translation="Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz"/>
+ <STATE Iso="NU" Translation="TnVuYXZ1dA=="/>
+ <STATE Iso="ON" Translation="T250YXJpbw=="/>
+ <STATE Iso="PE" Translation="UHJpbmNlIEVkd2FyZCBJc2xhbmQ="/>
+ <STATE Iso="QC" Translation="UXVlYmVj"/>
+ <STATE Iso="SK" Translation="U2Fza2F0Y2hld2Fu"/>
+ <STATE Iso="YT" Translation="WXVrb24="/>
+ </COUNTRY>
+ <COUNTRY Iso="CCK" Translation="Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM="/>
+ <COUNTRY Iso="CHE" Translation="U3dpdHplcmxhbmQ="/>
+ <COUNTRY Iso="CHL" Translation="Q2hpbGU="/>
+ <COUNTRY Iso="CHN" Translation="Q2hpbmE="/>
+ <COUNTRY Iso="CIV" Translation="Q290ZSBkJ0l2b2lyZQ=="/>
+ <COUNTRY Iso="CMR" Translation="Q2FtZXJvb24="/>
+ <COUNTRY Iso="COD" Translation="Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk="/>
+ <COUNTRY Iso="COG" Translation="Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m"/>
+ <COUNTRY Iso="COK" Translation="Q29vayBJc2xhbmRz"/>
+ <COUNTRY Iso="COL" Translation="Q29sb21iaWE="/>
+ <COUNTRY Iso="COM" Translation="Q29tb3Jvcw=="/>
+ <COUNTRY Iso="CPV" Translation="Q2FwZSBWZXJkZQ=="/>
+ <COUNTRY Iso="CRI" Translation="Q29zdGEgUmljYQ=="/>
+ <COUNTRY Iso="CUB" Translation="Q3ViYQ=="/>
+ <COUNTRY Iso="CXR" Translation="Q2hyaXN0bWFzIElzbGFuZA=="/>
+ <COUNTRY Iso="CYM" Translation="Q2F5bWFuIElzbGFuZHM="/>
+ <COUNTRY Iso="CYP" Translation="Q3lwcnVz"/>
+ <COUNTRY Iso="CZE" Translation="Q3plY2ggUmVwdWJsaWM="/>
+ <COUNTRY Iso="DEU" Translation="R2VybWFueQ=="/>
+ <COUNTRY Iso="DJI" Translation="RGppYm91dGk="/>
+ <COUNTRY Iso="DMA" Translation="RG9taW5pY2E="/>
+ <COUNTRY Iso="DNK" Translation="RGVubWFyaw=="/>
+ <COUNTRY Iso="DOM" Translation="RG9taW5pY2FuIFJlcHVibGlj"/>
+ <COUNTRY Iso="DZA" Translation="QWxnZXJpYQ=="/>
+ <COUNTRY Iso="ECU" Translation="RWN1YWRvcg=="/>
+ <COUNTRY Iso="EGY" Translation="RWd5cHQ="/>
+ <COUNTRY Iso="ERI" Translation="RXJpdHJlYQ=="/>
+ <COUNTRY Iso="ESH" Translation="V2VzdGVybiBTYWhhcmE="/>
+ <COUNTRY Iso="ESP" Translation="U3BhaW4="/>
+ <COUNTRY Iso="EST" Translation="RXN0b25pYQ=="/>
+ <COUNTRY Iso="ETH" Translation="RXRoaW9waWE="/>
+ <COUNTRY Iso="FIN" Translation="RmlubGFuZA=="/>
+ <COUNTRY Iso="FJI" Translation="RmlqaQ=="/>
+ <COUNTRY Iso="FLK" Translation="RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp"/>
+ <COUNTRY Iso="FRA" Translation="RnJhbmNl"/>
+ <COUNTRY Iso="FRO" Translation="RmFyb2UgSXNsYW5kcw=="/>
+ <COUNTRY Iso="FSM" Translation="TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg=="/>
+ <COUNTRY Iso="FXX" Translation="RnJhbmNlLCBNZXRyb3BvbGl0YW4="/>
+ <COUNTRY Iso="GAB" Translation="R2Fib24="/>
+ <COUNTRY Iso="GBR" Translation="VW5pdGVkIEtpbmdkb20="/>
+ <COUNTRY Iso="GEO" Translation="R2VvcmdpYQ=="/>
+ <COUNTRY Iso="GHA" Translation="R2hhbmE="/>
+ <COUNTRY Iso="GIB" Translation="R2licmFsdGFy"/>
+ <COUNTRY Iso="GIN" Translation="R3VpbmVh"/>
+ <COUNTRY Iso="GLP" Translation="R3VhZGVsb3VwZQ=="/>
+ <COUNTRY Iso="GMB" Translation="R2FtYmlh"/>
+ <COUNTRY Iso="GNB" Translation="R3VpbmVhLUJpc3NhdQ=="/>
+ <COUNTRY Iso="GNQ" Translation="RXF1YXRvcmlhbCBHdWluZWE="/>
+ <COUNTRY Iso="GRC" Translation="R3JlZWNl"/>
+ <COUNTRY Iso="GRD" Translation="R3JlbmFkYQ=="/>
+ <COUNTRY Iso="GRL" Translation="R3JlZW5sYW5k"/>
+ <COUNTRY Iso="GTM" Translation="R3VhdGVtYWxh"/>
+ <COUNTRY Iso="GUF" Translation="RnJlbmNoIEd1aWFuYQ=="/>
+ <COUNTRY Iso="GUM" Translation="R3VhbQ=="/>
+ <COUNTRY Iso="GUY" Translation="R3V5YW5h"/>
+ <COUNTRY Iso="HKG" Translation="SG9uZyBrb25n"/>
+ <COUNTRY Iso="HMD" Translation="SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz"/>
+ <COUNTRY Iso="HND" Translation="SG9uZHVyYXM="/>
+ <COUNTRY Iso="HRV" Translation="Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep"/>
+ <COUNTRY Iso="HTI" Translation="SGFpdGk="/>
+ <COUNTRY Iso="HUN" Translation="SHVuZ2FyeQ=="/>
+ <COUNTRY Iso="IDN" Translation="SW5kb25lc2lh"/>
+ <COUNTRY Iso="IND" Translation="SW5kaWE="/>
+ <COUNTRY Iso="IOT" Translation="QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5"/>
+ <COUNTRY Iso="IRL" Translation="SXJlbGFuZA=="/>
+ <COUNTRY Iso="IRN" Translation="SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik="/>
+ <COUNTRY Iso="IRQ" Translation="SXJhcQ=="/>
+ <COUNTRY Iso="ISL" Translation="SWNlbGFuZA=="/>
+ <COUNTRY Iso="ISR" Translation="SXNyYWVs"/>
+ <COUNTRY Iso="ITA" Translation="SXRhbHk="/>
+ <COUNTRY Iso="JAM" Translation="SmFtYWljYQ=="/>
+ <COUNTRY Iso="JOR" Translation="Sm9yZGFu"/>
+ <COUNTRY Iso="JPN" Translation="SmFwYW4="/>
+ <COUNTRY Iso="KAZ" Translation="S2F6YWtoc3Rhbg=="/>
+ <COUNTRY Iso="KEN" Translation="S2VueWE="/>
+ <COUNTRY Iso="KGZ" Translation="S3lyZ3l6c3Rhbg=="/>
+ <COUNTRY Iso="KHM" Translation="Q2FtYm9kaWE="/>
+ <COUNTRY Iso="KIR" Translation="S2lyaWJhdGk="/>
+ <COUNTRY Iso="KNA" Translation="U2FpbnQgS2l0dHMgYW5kIE5ldmlz"/>
+ <COUNTRY Iso="KOR" Translation="S29yZWEsIFJlcHVibGljIG9m"/>
+ <COUNTRY Iso="KWT" Translation="S3V3YWl0"/>
+ <COUNTRY Iso="LAO" Translation="TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM="/>
+ <COUNTRY Iso="LBN" Translation="TGViYW5vbg=="/>
+ <COUNTRY Iso="LBR" Translation="TGliZXJpYQ=="/>
+ <COUNTRY Iso="LBY" Translation="TGlieWFuIEFyYWIgSmFtYWhpcml5YQ=="/>
+ <COUNTRY Iso="LCA" Translation="U2FpbnQgTHVjaWE="/>
+ <COUNTRY Iso="LIE" Translation="TGllY2h0ZW5zdGVpbg=="/>
+ <COUNTRY Iso="LKA" Translation="U3JpIGxhbmth"/>
+ <COUNTRY Iso="LSO" Translation="TGVzb3Robw=="/>
+ <COUNTRY Iso="LTU" Translation="TGl0aHVhbmlh"/>
+ <COUNTRY Iso="LUX" Translation="THV4ZW1ib3VyZw=="/>
+ <COUNTRY Iso="LVA" Translation="TGF0dmlh"/>
+ <COUNTRY Iso="MAC" Translation="TWFjYXU="/>
+ <COUNTRY Iso="MAR" Translation="TW9yb2Njbw=="/>
+ <COUNTRY Iso="MCO" Translation="TW9uYWNv"/>
+ <COUNTRY Iso="MDA" Translation="TW9sZG92YSwgUmVwdWJsaWMgb2Y="/>
+ <COUNTRY Iso="MDG" Translation="TWFkYWdhc2Nhcg=="/>
+ <COUNTRY Iso="MDV" Translation="TWFsZGl2ZXM="/>
+ <COUNTRY Iso="MEX" Translation="TWV4aWNv"/>
+ <COUNTRY Iso="MHL" Translation="TWFyc2hhbGwgSXNsYW5kcw=="/>
+ <COUNTRY Iso="MKD" Translation="TWFjZWRvbmlh"/>
+ <COUNTRY Iso="MLI" Translation="TWFsaQ=="/>
+ <COUNTRY Iso="MLT" Translation="TWFsdGE="/>
+ <COUNTRY Iso="MMR" Translation="TXlhbm1hcg=="/>
+ <COUNTRY Iso="MNG" Translation="TW9uZ29saWE="/>
+ <COUNTRY Iso="MNP" Translation="Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz"/>
+ <COUNTRY Iso="MOZ" Translation="TW96YW1iaXF1ZQ=="/>
+ <COUNTRY Iso="MRT" Translation="TWF1cml0YW5pYQ=="/>
+ <COUNTRY Iso="MSR" Translation="TW9udHNlcnJhdA=="/>
+ <COUNTRY Iso="MTQ" Translation="TWFydGluaXF1ZQ=="/>
+ <COUNTRY Iso="MUS" Translation="TWF1cml0aXVz"/>
+ <COUNTRY Iso="MWI" Translation="TWFsYXdp"/>
+ <COUNTRY Iso="MYS" Translation="TWFsYXlzaWE="/>
+ <COUNTRY Iso="MYT" Translation="TWF5b3R0ZQ=="/>
+ <COUNTRY Iso="NAM" Translation="TmFtaWJpYQ=="/>
+ <COUNTRY Iso="NCL" Translation="TmV3IENhbGVkb25pYQ=="/>
+ <COUNTRY Iso="NER" Translation="TmlnZXI="/>
+ <COUNTRY Iso="NFK" Translation="Tm9yZm9sayBJc2xhbmQ="/>
+ <COUNTRY Iso="NGA" Translation="TmlnZXJpYQ=="/>
+ <COUNTRY Iso="NIC" Translation="TmljYXJhZ3Vh"/>
+ <COUNTRY Iso="NIU" Translation="Tml1ZQ=="/>
+ <COUNTRY Iso="NLD" Translation="TmV0aGVybGFuZHM="/>
+ <COUNTRY Iso="NOR" Translation="Tm9yd2F5"/>
+ <COUNTRY Iso="NPL" Translation="TmVwYWw="/>
+ <COUNTRY Iso="NRU" Translation="TmF1cnU="/>
+ <COUNTRY Iso="NZL" Translation="TmV3IFplYWxhbmQ="/>
+ <COUNTRY Iso="OMN" Translation="T21hbg=="/>
+ <COUNTRY Iso="PAK" Translation="UGFraXN0YW4="/>
+ <COUNTRY Iso="PAN" Translation="UGFuYW1h"/>
+ <COUNTRY Iso="PCN" Translation="UGl0Y2Fpcm4="/>
+ <COUNTRY Iso="PER" Translation="UGVydQ=="/>
+ <COUNTRY Iso="PHL" Translation="UGhpbGlwcGluZXM="/>
+ <COUNTRY Iso="PLW" Translation="UGFsYXU="/>
+ <COUNTRY Iso="PNG" Translation="UGFwdWEgTmV3IEd1aW5lYQ=="/>
+ <COUNTRY Iso="POL" Translation="UG9sYW5k"/>
+ <COUNTRY Iso="PRI" Translation="UHVlcnRvIFJpY28="/>
+ <COUNTRY Iso="PRK" Translation="S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y="/>
+ <COUNTRY Iso="PRT" Translation="UG9ydHVnYWw="/>
+ <COUNTRY Iso="PRY" Translation="UGFyYWd1YXk="/>
+ <COUNTRY Iso="PSE" Translation="UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA=="/>
+ <COUNTRY Iso="PYF" Translation="RnJlbmNoIFBvbHluZXNpYQ=="/>
+ <COUNTRY Iso="QAT" Translation="UWF0YXI="/>
+ <COUNTRY Iso="REU" Translation="UmV1bmlvbg=="/>
+ <COUNTRY Iso="ROU" Translation="Um9tYW5pYQ=="/>
+ <COUNTRY Iso="RUS" Translation="UnVzc2lhbiBGZWRlcmF0aW9u"/>
+ <COUNTRY Iso="RWA" Translation="UndhbmRh"/>
+ <COUNTRY Iso="SAU" Translation="U2F1ZGkgQXJhYmlh"/>
+ <COUNTRY Iso="SDN" Translation="U3VkYW4="/>
+ <COUNTRY Iso="SEN" Translation="U2VuZWdhbA=="/>
+ <COUNTRY Iso="SGP" Translation="U2luZ2Fwb3Jl"/>
+ <COUNTRY Iso="SGS" Translation="U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM="/>
+ <COUNTRY Iso="SHN" Translation="U3QuIGhlbGVuYQ=="/>
+ <COUNTRY Iso="SJM" Translation="U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz"/>
+ <COUNTRY Iso="SLB" Translation="U29sb21vbiBJc2xhbmRz"/>
+ <COUNTRY Iso="SLE" Translation="U2llcnJhIExlb25l"/>
+ <COUNTRY Iso="SLV" Translation="RWwgU2FsdmFkb3I="/>
+ <COUNTRY Iso="SMR" Translation="U2FuIE1hcmlubw=="/>
+ <COUNTRY Iso="SOM" Translation="U29tYWxpYQ=="/>
+ <COUNTRY Iso="SPM" Translation="U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24="/>
+ <COUNTRY Iso="STP" Translation="U2FvIFRvbWUgYW5kIFByaW5jaXBl"/>
+ <COUNTRY Iso="SUR" Translation="U3VyaW5hbWU="/>
+ <COUNTRY Iso="SVK" Translation="U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk="/>
+ <COUNTRY Iso="SVN" Translation="U2xvdmVuaWE="/>
+ <COUNTRY Iso="SWE" Translation="U3dlZGVu"/>
+ <COUNTRY Iso="SWZ" Translation="U3dhemlsYW5k"/>
+ <COUNTRY Iso="SYC" Translation="U2V5Y2hlbGxlcw=="/>
+ <COUNTRY Iso="SYR" Translation="U3lyaWFuIEFyYWIgUmVwdWJsaWM="/>
+ <COUNTRY Iso="TCA" Translation="VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz"/>
+ <COUNTRY Iso="TCD" Translation="Q2hhZA=="/>
+ <COUNTRY Iso="TGO" Translation="VG9nbw=="/>
+ <COUNTRY Iso="THA" Translation="VGhhaWxhbmQ="/>
+ <COUNTRY Iso="TJK" Translation="VGFqaWtpc3Rhbg=="/>
+ <COUNTRY Iso="TKL" Translation="VG9rZWxhdQ=="/>
+ <COUNTRY Iso="TKM" Translation="VHVya21lbmlzdGFu"/>
+ <COUNTRY Iso="TLS" Translation="RWFzdCBUaW1vcg=="/>
+ <COUNTRY Iso="TON" Translation="VG9uZ2E="/>
+ <COUNTRY Iso="TTO" Translation="VHJpbmlkYWQgYW5kIFRvYmFnbw=="/>
+ <COUNTRY Iso="TUN" Translation="VHVuaXNpYQ=="/>
+ <COUNTRY Iso="TUR" Translation="VHVya2V5"/>
+ <COUNTRY Iso="TUV" Translation="VHV2YWx1"/>
+ <COUNTRY Iso="TWN" Translation="VGFpd2Fu"/>
+ <COUNTRY Iso="TZA" Translation="VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg=="/>
+ <COUNTRY Iso="UGA" Translation="VWdhbmRh"/>
+ <COUNTRY Iso="UKR" Translation="VWtyYWluZQ=="/>
+ <COUNTRY Iso="UMI" Translation="VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz"/>
+ <COUNTRY Iso="URY" Translation="VXJ1Z3VheQ=="/>
+ <COUNTRY Iso="USA" Translation="VW5pdGVkIFN0YXRlcw==">
+ <STATE Iso="AK" Translation="QWxhc2th"/>
+ <STATE Iso="AL" Translation="QWxhYmFtYQ=="/>
+ <STATE Iso="AR" Translation="QXJrYW5zYXM="/>
+ <STATE Iso="AZ" Translation="QXJpem9uYQ=="/>
+ <STATE Iso="CA" Translation="Q2FsaWZvcm5pYQ=="/>
+ <STATE Iso="CO" Translation="Q29sb3JhZG8="/>
+ <STATE Iso="CT" Translation="Q29ubmVjdGljdXQ="/>
+ <STATE Iso="DC" Translation="RGlzdHJpY3Qgb2YgQ29sdW1iaWE="/>
+ <STATE Iso="DE" Translation="RGVsYXdhcmU="/>
+ <STATE Iso="FL" Translation="RmxvcmlkYQ=="/>
+ <STATE Iso="GA" Translation="R2VvcmdpYQ=="/>
+ <STATE Iso="HI" Translation="SGF3YWlp"/>
+ <STATE Iso="IA" Translation="SW93YQ=="/>
+ <STATE Iso="ID" Translation="SWRhaG8="/>
+ <STATE Iso="IL" Translation="SWxsaW5vaXM="/>
+ <STATE Iso="IN" Translation="SW5kaWFuYQ=="/>
+ <STATE Iso="KS" Translation="S2Fuc2Fz"/>
+ <STATE Iso="KY" Translation="S2VudHVja3k="/>
+ <STATE Iso="LA" Translation="TG91aXNpYW5h"/>
+ <STATE Iso="MA" Translation="TWFzc2FjaHVzZXR0cw=="/>
+ <STATE Iso="MD" Translation="TWFyeWxhbmQ="/>
+ <STATE Iso="ME" Translation="TWFpbmU="/>
+ <STATE Iso="MI" Translation="TWljaGlnYW4="/>
+ <STATE Iso="MN" Translation="TWlubmVzb3Rh"/>
+ <STATE Iso="MO" Translation="TWlzc291cmk="/>
+ <STATE Iso="MS" Translation="TWlzc2lzc2lwcGk="/>
+ <STATE Iso="MT" Translation="TW9udGFuYQ=="/>
+ <STATE Iso="NC" Translation="Tm9ydGggQ2Fyb2xpbmE="/>
+ <STATE Iso="ND" Translation="Tm9ydGggRGFrb3Rh"/>
+ <STATE Iso="NE" Translation="TmVicmFza2E="/>
+ <STATE Iso="NH" Translation="TmV3IEhhbXBzaGlyZQ=="/>
+ <STATE Iso="NJ" Translation="TmV3IEplcnNleQ=="/>
+ <STATE Iso="NM" Translation="TmV3IE1leGljbw=="/>
+ <STATE Iso="NV" Translation="TmV2YWRh"/>
+ <STATE Iso="NY" Translation="TmV3IFlvcms="/>
+ <STATE Iso="OH" Translation="T2hpbw=="/>
+ <STATE Iso="OK" Translation="T2tsYWhvbWE="/>
+ <STATE Iso="OR" Translation="T3JlZ29u"/>
+ <STATE Iso="PA" Translation="UGVubnN5bHZhbmlh"/>
+ <STATE Iso="PR" Translation="UHVlcnRvIFJpY28="/>
+ <STATE Iso="RI" Translation="UmhvZGUgSXNsYW5k"/>
+ <STATE Iso="SC" Translation="U291dGggQ2Fyb2xpbmE="/>
+ <STATE Iso="SD" Translation="U291dGggRGFrb3Rh"/>
+ <STATE Iso="TN" Translation="VGVubmVzc2Vl"/>
+ <STATE Iso="TX" Translation="VGV4YXM="/>
+ <STATE Iso="UT" Translation="VXRhaA=="/>
+ <STATE Iso="VA" Translation="VmlyZ2luaWE="/>
+ <STATE Iso="VT" Translation="VmVybW9udA=="/>
+ <STATE Iso="WA" Translation="V2FzaGluZ3Rvbg=="/>
+ <STATE Iso="WI" Translation="V2lzY29uc2lu"/>
+ <STATE Iso="WV" Translation="V2VzdCBWaXJnaW5pYQ=="/>
+ <STATE Iso="WY" Translation="V3lvbWluZw=="/>
+ </COUNTRY>
+ <COUNTRY Iso="UZB" Translation="VXpiZWtpc3Rhbg=="/>
+ <COUNTRY Iso="VAT" Translation="VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk="/>
+ <COUNTRY Iso="VCT" Translation="U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM="/>
+ <COUNTRY Iso="VEN" Translation="VmVuZXp1ZWxh"/>
+ <COUNTRY Iso="VGB" Translation="VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp"/>
+ <COUNTRY Iso="VIR" Translation="VmlyZ2luIElzbGFuZHMgKFUuUy4p"/>
+ <COUNTRY Iso="VNM" Translation="VmlldG5hbQ=="/>
+ <COUNTRY Iso="VUT" Translation="VmFudWF0dQ=="/>
+ <COUNTRY Iso="WLF" Translation="V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw=="/>
+ <COUNTRY Iso="WSM" Translation="U2Ftb2E="/>
+ <COUNTRY Iso="YEM" Translation="WWVtZW4="/>
+ <COUNTRY Iso="YUG" Translation="WXVnb3NsYXZpYQ=="/>
+ <COUNTRY Iso="ZAF" Translation="U291dGggQWZyaWNh"/>
+ <COUNTRY Iso="ZMB" Translation="WmFtYmlh"/>
+ <COUNTRY Iso="ZWE" Translation="WmltYmFid2U="/>
+ </COUNTRIES>
</LANGUAGE>
</LANGUAGES>
\ No newline at end of file
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 13401)
+++ install/install_data.sql (working copy)
@@ -1,8 +1,8 @@
# Section "in-portal:configure_categories":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.01, 2, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.02, 2, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category', '20', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage_prompt', 'text', '', '', 10.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category_Short', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage__short_prompt', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_DaysNew', '8', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_daysnew_prompt', 'text', '', '', 10.05, 0, 1);
@@ -13,7 +13,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Catalog_PreselectModuleTab', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.1, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_RecycleBinFolder', 'text', NULL, NULL, 10.11, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL, NULL, 10.12, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_,-=+-', 10.13, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_||-=+-', 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.14, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_MinKeyword_Length', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.15, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_MetaKey', '', 'In-Portal', 'in-portal:configure_categories', 'la_Text_MetaInfo', 'la_category_metakey', 'textarea', '', '', 20.01, 0, 1);
@@ -21,12 +21,12 @@
# Section "in-portal:configure_general":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Site_Name', 'In-Portal CMS', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsWebsite', 'la_config_website_name', 'text', '', '', 10.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday,1=la_monday', 20.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.02, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday||1=la_monday', 20.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.03, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_AdminMailFrom', 'portal@user.domain.name', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsMailling', 'la_prompt_AdminMailFrom', 'text', NULL, 'size="40"', 30.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionTimeout', '3600', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsSession', 'la_prompt_session_timeout', 'text', 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}', '', 40.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple,advanced=+advanced,custom=+custom', 50.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple||advanced=+advanced||custom=+custom', 50.01, 0, 1);
# Section "in-portal:configure_advanced":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0);
@@ -39,7 +39,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.07, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_CheckStopWords', 'checkbox', '', '', 10.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.09, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString,1=lu_opt_Cookies,2=lu_opt_AutoDetect', 20.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString||1=lu_opt_Cookies||2=lu_opt_AutoDetect', 20.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_cookie_name', 'text', '', '', 20.02, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'KeepSessionOnBrowserClose', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_KeepSessionOnBrowserClose', 'checkbox', '', '', 20.03, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionBrowserSignatureCheck', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionBrowserSignatureCheck', 'checkbox', NULL, NULL, 20.04, 0, 1);
@@ -56,8 +56,8 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseToolbarLabels', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseToolbarLabels', 'checkbox', NULL, NULL, 40.03, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseSmallHeader', 'checkbox', '', '', 40.04, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseColumnFreezer', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseColumnFreezer', 'checkbox', '', '', 40.05, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePopups', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UsePopups', 'select', '', '0=la_opt_SameWindow,1=la_opt_PopupWindow,2=la_opt_ModalWindow', 40.06, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseDoubleSorting', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseDoubleSorting', 'radio', '', '1=la_Yes,0=la_No', 40.07, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePopups', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UsePopups', 'select', '', '0=la_opt_SameWindow||1=la_opt_PopupWindow||2=la_opt_ModalWindow', 40.06, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseDoubleSorting', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseDoubleSorting', 'radio', '', '1=la_Yes||0=la_No', 40.07, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MenuFrameWidth', '200', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_prompt_MenuFrameWidth', 'text', NULL, NULL, 40.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ResizableFrames', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_ResizableFrames', 'checkbox', '', '', 40.09, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_AutoRefreshIntervals', 'text', '', '', 40.1, 0, 0);
@@ -73,7 +73,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_User', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_user', 'text', NULL, NULL, 50.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Pass', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_pass', 'text', NULL, NULL, 50.05, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_DefaultHeaders', 'X-Mailer: In-Portal', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtpheaders', 'textarea', NULL, 'COLS=40 ROWS=5', 50.06, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailFunctionHeaderSeparator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux,2=la_Windows', 50.07, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailFunctionHeaderSeparator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux||2=la_Windows', 50.07, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListQueuePerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListQueuePerStep', 'text', NULL, NULL, 50.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListSendPerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListSendPerStep', 'text', NULL, NULL, 50.09, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseOutputCompression', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_UseOutputCompression', 'checkbox', '', '', 60.01, 0, 1);
@@ -85,15 +85,15 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Backup_Path', '/home/alex/web/in-portal.rc/system/backupdata', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_backup_path', 'text', '', '', 60.07, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SystemTagCache', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_syscache_enable', 'checkbox', NULL, NULL, 60.08, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SocketBlockingMode', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_socket_blocking_mode', 'checkbox', NULL, NULL, 60.09, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportDelimiter', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_opt_Tab,1=la_opt_Comma,2=la_opt_Semicolon,3=la_opt_Space,4=la_opt_Colon', 70.01, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes,1=la_Quotes', 70.02, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux,1=la_Windows', 70.03, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode,1=la_Regular', 70.04, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportDelimiter', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_opt_Tab||1=la_opt_Comma||2=la_opt_Semicolon||3=la_opt_Space||4=la_opt_Colon', 70.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes||1=la_Quotes', 70.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux||1=la_Windows', 70.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode||1=la_Regular', 70.04, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MemcacheServers', 'localhost:11211', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_MemcacheServers', 'text', NULL, '', 80.01, 0, 0);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None,Memcache=+Memcached,Apc=+Alternative PHP Cache,XCache=+XCache', 80.02, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None||Memcache=+Memcached||Apc=+Alternative PHP Cache||XCache=+XCache', 80.02, 0, 0);
# Section "in-portal:configure_users":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration,2=la_opt_UserNotAllowedRegistration,3=la_opt_UserUponApprovalRegistration,4=la_opt_UserEmailActivation', 10.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration||2=la_opt_UserNotAllowedRegistration||3=la_opt_UserUponApprovalRegistration||4=la_opt_UserEmailActivation', 10.01, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdvancedUserManagement', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_AdvancedUserManagement', 'checkbox', NULL, NULL, 10.011, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Email_As_Login', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_use_emails_as_login', 'checkbox', NULL, NULL, 10.02, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RegistrationCaptcha', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_registration_captcha', 'checkbox', NULL, NULL, 10.025, 0, 0);
@@ -102,11 +102,11 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_allow_reset', 'text', NULL, NULL, 10.05, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Password_Auto', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_password_auto', 'checkbox', '', '', 10.06, 0, 1);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_MembershipExpirationReminder', '10', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_MembershipExpirationReminder', 'text', NULL, '', 10.07, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Default_Registration_Country', NULL, 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>', 10.12, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 10.12, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowSelectGroupOnFront', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_AllowSelectGroupOnFront', 'checkbox', NULL, NULL, 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DefaultSettingsUserId', '-1', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_DefaultUserId', 'text', NULL, NULL, 10.14, 0, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Votes_Deny', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_Text_Restrictions', 'la_users_votes_deny', 'text', '', '', 20.01, 0, 1);
@@ -172,311 +172,312 @@
INSERT INTO PortalGroup VALUES (14, 'Guest', 'Guest User', '0', 1, 0, 1, 0);
INSERT INTO PortalGroup VALUES (11, 'admin', '', '1054738405', 0, 0, 1, 0);
-INSERT INTO StdDestinations VALUES (1, 1, DEFAULT, 'la_country_AFG', 'AFG', 'AF');
-INSERT INTO StdDestinations VALUES (2, 1, DEFAULT, 'la_country_ALB', 'ALB', 'AL');
-INSERT INTO StdDestinations VALUES (3, 1, DEFAULT, 'la_country_DZA', 'DZA', 'DZ');
-INSERT INTO StdDestinations VALUES (4, 1, DEFAULT, 'la_country_ASM', 'ASM', 'AS');
-INSERT INTO StdDestinations VALUES (5, 1, DEFAULT, 'la_country_AND', 'AND', 'AD');
-INSERT INTO StdDestinations VALUES (6, 1, DEFAULT, 'la_country_AGO', 'AGO', 'AO');
-INSERT INTO StdDestinations VALUES (7, 1, DEFAULT, 'la_country_AIA', 'AIA', 'AI');
-INSERT INTO StdDestinations VALUES (8, 1, DEFAULT, 'la_country_ATA', 'ATA', 'AQ');
-INSERT INTO StdDestinations VALUES (9, 1, DEFAULT, 'la_country_ATG', 'ATG', 'AG');
-INSERT INTO StdDestinations VALUES (10, 1, DEFAULT, 'la_country_ARG', 'ARG', 'AR');
-INSERT INTO StdDestinations VALUES (11, 1, DEFAULT, 'la_country_ARM', 'ARM', 'AM');
-INSERT INTO StdDestinations VALUES (12, 1, DEFAULT, 'la_country_ABW', 'ABW', 'AW');
-INSERT INTO StdDestinations VALUES (13, 1, DEFAULT, 'la_country_AUS', 'AUS', 'AU');
-INSERT INTO StdDestinations VALUES (14, 1, DEFAULT, 'la_country_AUT', 'AUT', 'AT');
-INSERT INTO StdDestinations VALUES (15, 1, DEFAULT, 'la_country_AZE', 'AZE', 'AZ');
-INSERT INTO StdDestinations VALUES (16, 1, DEFAULT, 'la_country_BHS', 'BHS', 'BS');
-INSERT INTO StdDestinations VALUES (17, 1, DEFAULT, 'la_country_BHR', 'BHR', 'BH');
-INSERT INTO StdDestinations VALUES (18, 1, DEFAULT, 'la_country_BGD', 'BGD', 'BD');
-INSERT INTO StdDestinations VALUES (19, 1, DEFAULT, 'la_country_BRB', 'BRB', 'BB');
-INSERT INTO StdDestinations VALUES (20, 1, DEFAULT, 'la_country_BLR', 'BLR', 'BY');
-INSERT INTO StdDestinations VALUES (21, 1, DEFAULT, 'la_country_BEL', 'BEL', 'BE');
-INSERT INTO StdDestinations VALUES (22, 1, DEFAULT, 'la_country_BLZ', 'BLZ', 'BZ');
-INSERT INTO StdDestinations VALUES (23, 1, DEFAULT, 'la_country_BEN', 'BEN', 'BJ');
-INSERT INTO StdDestinations VALUES (24, 1, DEFAULT, 'la_country_BMU', 'BMU', 'BM');
-INSERT INTO StdDestinations VALUES (25, 1, DEFAULT, 'la_country_BTN', 'BTN', 'BT');
-INSERT INTO StdDestinations VALUES (26, 1, DEFAULT, 'la_country_BOL', 'BOL', 'BO');
-INSERT INTO StdDestinations VALUES (27, 1, DEFAULT, 'la_country_BIH', 'BIH', 'BA');
-INSERT INTO StdDestinations VALUES (28, 1, DEFAULT, 'la_country_BWA', 'BWA', 'BW');
-INSERT INTO StdDestinations VALUES (29, 1, DEFAULT, 'la_country_BVT', 'BVT', 'BV');
-INSERT INTO StdDestinations VALUES (30, 1, DEFAULT, 'la_country_BRA', 'BRA', 'BR');
-INSERT INTO StdDestinations VALUES (31, 1, DEFAULT, 'la_country_IOT', 'IOT', 'IO');
-INSERT INTO StdDestinations VALUES (32, 1, DEFAULT, 'la_country_BRN', 'BRN', 'BN');
-INSERT INTO StdDestinations VALUES (33, 1, DEFAULT, 'la_country_BGR', 'BGR', 'BG');
-INSERT INTO StdDestinations VALUES (34, 1, DEFAULT, 'la_country_BFA', 'BFA', 'BF');
-INSERT INTO StdDestinations VALUES (35, 1, DEFAULT, 'la_country_BDI', 'BDI', 'BI');
-INSERT INTO StdDestinations VALUES (36, 1, DEFAULT, 'la_country_KHM', 'KHM', 'KH');
-INSERT INTO StdDestinations VALUES (37, 1, DEFAULT, 'la_country_CMR', 'CMR', 'CM');
-INSERT INTO StdDestinations VALUES (38, 1, DEFAULT, 'la_country_CAN', 'CAN', 'CA');
-INSERT INTO StdDestinations VALUES (39, 1, DEFAULT, 'la_country_CPV', 'CPV', 'CV');
-INSERT INTO StdDestinations VALUES (40, 1, DEFAULT, 'la_country_CYM', 'CYM', 'KY');
-INSERT INTO StdDestinations VALUES (41, 1, DEFAULT, 'la_country_CAF', 'CAF', 'CF');
-INSERT INTO StdDestinations VALUES (42, 1, DEFAULT, 'la_country_TCD', 'TCD', 'TD');
-INSERT INTO StdDestinations VALUES (43, 1, DEFAULT, 'la_country_CHL', 'CHL', 'CL');
-INSERT INTO StdDestinations VALUES (44, 1, DEFAULT, 'la_country_CHN', 'CHN', 'CN');
-INSERT INTO StdDestinations VALUES (45, 1, DEFAULT, 'la_country_CXR', 'CXR', 'CX');
-INSERT INTO StdDestinations VALUES (46, 1, DEFAULT, 'la_country_CCK', 'CCK', 'CC');
-INSERT INTO StdDestinations VALUES (47, 1, DEFAULT, 'la_country_COL', 'COL', 'CO');
-INSERT INTO StdDestinations VALUES (48, 1, DEFAULT, 'la_country_COM', 'COM', 'KM');
-INSERT INTO StdDestinations VALUES (49, 1, DEFAULT, 'la_country_COD', 'COD', 'CD');
-INSERT INTO StdDestinations VALUES (50, 1, DEFAULT, 'la_country_COG', 'COG', 'CG');
-INSERT INTO StdDestinations VALUES (51, 1, DEFAULT, 'la_country_COK', 'COK', 'CK');
-INSERT INTO StdDestinations VALUES (52, 1, DEFAULT, 'la_country_CRI', 'CRI', 'CR');
-INSERT INTO StdDestinations VALUES (53, 1, DEFAULT, 'la_country_CIV', 'CIV', 'CI');
-INSERT INTO StdDestinations VALUES (54, 1, DEFAULT, 'la_country_HRV', 'HRV', 'HR');
-INSERT INTO StdDestinations VALUES (55, 1, DEFAULT, 'la_country_CUB', 'CUB', 'CU');
-INSERT INTO StdDestinations VALUES (56, 1, DEFAULT, 'la_country_CYP', 'CYP', 'CY');
-INSERT INTO StdDestinations VALUES (57, 1, DEFAULT, 'la_country_CZE', 'CZE', 'CZ');
-INSERT INTO StdDestinations VALUES (58, 1, DEFAULT, 'la_country_DNK', 'DNK', 'DK');
-INSERT INTO StdDestinations VALUES (59, 1, DEFAULT, 'la_country_DJI', 'DJI', 'DJ');
-INSERT INTO StdDestinations VALUES (60, 1, DEFAULT, 'la_country_DMA', 'DMA', 'DM');
-INSERT INTO StdDestinations VALUES (61, 1, DEFAULT, 'la_country_DOM', 'DOM', 'DO');
-INSERT INTO StdDestinations VALUES (62, 1, DEFAULT, 'la_country_TLS', 'TLS', 'TL');
-INSERT INTO StdDestinations VALUES (63, 1, DEFAULT, 'la_country_ECU', 'ECU', 'EC');
-INSERT INTO StdDestinations VALUES (64, 1, DEFAULT, 'la_country_EGY', 'EGY', 'EG');
-INSERT INTO StdDestinations VALUES (65, 1, DEFAULT, 'la_country_SLV', 'SLV', 'SV');
-INSERT INTO StdDestinations VALUES (66, 1, DEFAULT, 'la_country_GNQ', 'GNQ', 'GQ');
-INSERT INTO StdDestinations VALUES (67, 1, DEFAULT, 'la_country_ERI', 'ERI', 'ER');
-INSERT INTO StdDestinations VALUES (68, 1, DEFAULT, 'la_country_EST', 'EST', 'EE');
-INSERT INTO StdDestinations VALUES (69, 1, DEFAULT, 'la_country_ETH', 'ETH', 'ET');
-INSERT INTO StdDestinations VALUES (70, 1, DEFAULT, 'la_country_FLK', 'FLK', 'FK');
-INSERT INTO StdDestinations VALUES (71, 1, DEFAULT, 'la_country_FRO', 'FRO', 'FO');
-INSERT INTO StdDestinations VALUES (72, 1, DEFAULT, 'la_country_FJI', 'FJI', 'FJ');
-INSERT INTO StdDestinations VALUES (73, 1, DEFAULT, 'la_country_FIN', 'FIN', 'FI');
-INSERT INTO StdDestinations VALUES (74, 1, DEFAULT, 'la_country_FRA', 'FRA', 'FR');
-INSERT INTO StdDestinations VALUES (75, 1, DEFAULT, 'la_country_FXX', 'FXX', 'FX');
-INSERT INTO StdDestinations VALUES (76, 1, DEFAULT, 'la_country_GUF', 'GUF', 'GF');
-INSERT INTO StdDestinations VALUES (77, 1, DEFAULT, 'la_country_PYF', 'PYF', 'PF');
-INSERT INTO StdDestinations VALUES (78, 1, DEFAULT, 'la_country_ATF', 'ATF', 'TF');
-INSERT INTO StdDestinations VALUES (79, 1, DEFAULT, 'la_country_GAB', 'GAB', 'GA');
-INSERT INTO StdDestinations VALUES (80, 1, DEFAULT, 'la_country_GMB', 'GMB', 'GM');
-INSERT INTO StdDestinations VALUES (81, 1, DEFAULT, 'la_country_GEO', 'GEO', 'GE');
-INSERT INTO StdDestinations VALUES (82, 1, DEFAULT, 'la_country_DEU', 'DEU', 'DE');
-INSERT INTO StdDestinations VALUES (83, 1, DEFAULT, 'la_country_GHA', 'GHA', 'GH');
-INSERT INTO StdDestinations VALUES (84, 1, DEFAULT, 'la_country_GIB', 'GIB', 'GI');
-INSERT INTO StdDestinations VALUES (85, 1, DEFAULT, 'la_country_GRC', 'GRC', 'GR');
-INSERT INTO StdDestinations VALUES (86, 1, DEFAULT, 'la_country_GRL', 'GRL', 'GL');
-INSERT INTO StdDestinations VALUES (87, 1, DEFAULT, 'la_country_GRD', 'GRD', 'GD');
-INSERT INTO StdDestinations VALUES (88, 1, DEFAULT, 'la_country_GLP', 'GLP', 'GP');
-INSERT INTO StdDestinations VALUES (89, 1, DEFAULT, 'la_country_GUM', 'GUM', 'GU');
-INSERT INTO StdDestinations VALUES (90, 1, DEFAULT, 'la_country_GTM', 'GTM', 'GT');
-INSERT INTO StdDestinations VALUES (91, 1, DEFAULT, 'la_country_GIN', 'GIN', 'GN');
-INSERT INTO StdDestinations VALUES (92, 1, DEFAULT, 'la_country_GNB', 'GNB', 'GW');
-INSERT INTO StdDestinations VALUES (93, 1, DEFAULT, 'la_country_GUY', 'GUY', 'GY');
-INSERT INTO StdDestinations VALUES (94, 1, DEFAULT, 'la_country_HTI', 'HTI', 'HT');
-INSERT INTO StdDestinations VALUES (95, 1, DEFAULT, 'la_country_HMD', 'HMD', 'HM');
-INSERT INTO StdDestinations VALUES (96, 1, DEFAULT, 'la_country_HND', 'HND', 'HN');
-INSERT INTO StdDestinations VALUES (97, 1, DEFAULT, 'la_country_HKG', 'HKG', 'HK');
-INSERT INTO StdDestinations VALUES (98, 1, DEFAULT, 'la_country_HUN', 'HUN', 'HU');
-INSERT INTO StdDestinations VALUES (99, 1, DEFAULT, 'la_country_ISL', 'ISL', 'IS');
-INSERT INTO StdDestinations VALUES (100, 1, DEFAULT, 'la_country_IND', 'IND', 'IN');
-INSERT INTO StdDestinations VALUES (101, 1, DEFAULT, 'la_country_IDN', 'IDN', 'ID');
-INSERT INTO StdDestinations VALUES (102, 1, DEFAULT, 'la_country_IRN', 'IRN', 'IR');
-INSERT INTO StdDestinations VALUES (103, 1, DEFAULT, 'la_country_IRQ', 'IRQ', 'IQ');
-INSERT INTO StdDestinations VALUES (104, 1, DEFAULT, 'la_country_IRL', 'IRL', 'IE');
-INSERT INTO StdDestinations VALUES (105, 1, DEFAULT, 'la_country_ISR', 'ISR', 'IL');
-INSERT INTO StdDestinations VALUES (106, 1, DEFAULT, 'la_country_ITA', 'ITA', 'IT');
-INSERT INTO StdDestinations VALUES (107, 1, DEFAULT, 'la_country_JAM', 'JAM', 'JM');
-INSERT INTO StdDestinations VALUES (108, 1, DEFAULT, 'la_country_JPN', 'JPN', 'JP');
-INSERT INTO StdDestinations VALUES (109, 1, DEFAULT, 'la_country_JOR', 'JOR', 'JO');
-INSERT INTO StdDestinations VALUES (110, 1, DEFAULT, 'la_country_KAZ', 'KAZ', 'KZ');
-INSERT INTO StdDestinations VALUES (111, 1, DEFAULT, 'la_country_KEN', 'KEN', 'KE');
-INSERT INTO StdDestinations VALUES (112, 1, DEFAULT, 'la_country_KIR', 'KIR', 'KI');
-INSERT INTO StdDestinations VALUES (113, 1, DEFAULT, 'la_country_PRK', 'PRK', 'KP');
-INSERT INTO StdDestinations VALUES (114, 1, DEFAULT, 'la_country_KOR', 'KOR', 'KR');
-INSERT INTO StdDestinations VALUES (115, 1, DEFAULT, 'la_country_KWT', 'KWT', 'KW');
-INSERT INTO StdDestinations VALUES (116, 1, DEFAULT, 'la_country_KGZ', 'KGZ', 'KG');
-INSERT INTO StdDestinations VALUES (117, 1, DEFAULT, 'la_country_LAO', 'LAO', 'LA');
-INSERT INTO StdDestinations VALUES (118, 1, DEFAULT, 'la_country_LVA', 'LVA', 'LV');
-INSERT INTO StdDestinations VALUES (119, 1, DEFAULT, 'la_country_LBN', 'LBN', 'LB');
-INSERT INTO StdDestinations VALUES (120, 1, DEFAULT, 'la_country_LSO', 'LSO', 'LS');
-INSERT INTO StdDestinations VALUES (121, 1, DEFAULT, 'la_country_LBR', 'LBR', 'LR');
-INSERT INTO StdDestinations VALUES (122, 1, DEFAULT, 'la_country_LBY', 'LBY', 'LY');
-INSERT INTO StdDestinations VALUES (123, 1, DEFAULT, 'la_country_LIE', 'LIE', 'LI');
-INSERT INTO StdDestinations VALUES (124, 1, DEFAULT, 'la_country_LTU', 'LTU', 'LT');
-INSERT INTO StdDestinations VALUES (125, 1, DEFAULT, 'la_country_LUX', 'LUX', 'LU');
-INSERT INTO StdDestinations VALUES (126, 1, DEFAULT, 'la_country_MAC', 'MAC', 'MO');
-INSERT INTO StdDestinations VALUES (127, 1, DEFAULT, 'la_country_MKD', 'MKD', 'MK');
-INSERT INTO StdDestinations VALUES (128, 1, DEFAULT, 'la_country_MDG', 'MDG', 'MG');
-INSERT INTO StdDestinations VALUES (129, 1, DEFAULT, 'la_country_MWI', 'MWI', 'MW');
-INSERT INTO StdDestinations VALUES (130, 1, DEFAULT, 'la_country_MYS', 'MYS', 'MY');
-INSERT INTO StdDestinations VALUES (131, 1, DEFAULT, 'la_country_MDV', 'MDV', 'MV');
-INSERT INTO StdDestinations VALUES (132, 1, DEFAULT, 'la_country_MLI', 'MLI', 'ML');
-INSERT INTO StdDestinations VALUES (133, 1, DEFAULT, 'la_country_MLT', 'MLT', 'MT');
-INSERT INTO StdDestinations VALUES (134, 1, DEFAULT, 'la_country_MHL', 'MHL', 'MH');
-INSERT INTO StdDestinations VALUES (135, 1, DEFAULT, 'la_country_MTQ', 'MTQ', 'MQ');
-INSERT INTO StdDestinations VALUES (136, 1, DEFAULT, 'la_country_MRT', 'MRT', 'MR');
-INSERT INTO StdDestinations VALUES (137, 1, DEFAULT, 'la_country_MUS', 'MUS', 'MU');
-INSERT INTO StdDestinations VALUES (138, 1, DEFAULT, 'la_country_MYT', 'MYT', 'YT');
-INSERT INTO StdDestinations VALUES (139, 1, DEFAULT, 'la_country_MEX', 'MEX', 'MX');
-INSERT INTO StdDestinations VALUES (140, 1, DEFAULT, 'la_country_FSM', 'FSM', 'FM');
-INSERT INTO StdDestinations VALUES (141, 1, DEFAULT, 'la_country_MDA', 'MDA', 'MD');
-INSERT INTO StdDestinations VALUES (142, 1, DEFAULT, 'la_country_MCO', 'MCO', 'MC');
-INSERT INTO StdDestinations VALUES (143, 1, DEFAULT, 'la_country_MNG', 'MNG', 'MN');
-INSERT INTO StdDestinations VALUES (144, 1, DEFAULT, 'la_country_MSR', 'MSR', 'MS');
-INSERT INTO StdDestinations VALUES (145, 1, DEFAULT, 'la_country_MAR', 'MAR', 'MA');
-INSERT INTO StdDestinations VALUES (146, 1, DEFAULT, 'la_country_MOZ', 'MOZ', 'MZ');
-INSERT INTO StdDestinations VALUES (147, 1, DEFAULT, 'la_country_MMR', 'MMR', 'MM');
-INSERT INTO StdDestinations VALUES (148, 1, DEFAULT, 'la_country_NAM', 'NAM', 'NA');
-INSERT INTO StdDestinations VALUES (149, 1, DEFAULT, 'la_country_NRU', 'NRU', 'NR');
-INSERT INTO StdDestinations VALUES (150, 1, DEFAULT, 'la_country_NPL', 'NPL', 'NP');
-INSERT INTO StdDestinations VALUES (151, 1, DEFAULT, 'la_country_NLD', 'NLD', 'NL');
-INSERT INTO StdDestinations VALUES (152, 1, DEFAULT, 'la_country_ANT', 'ANT', 'AN');
-INSERT INTO StdDestinations VALUES (153, 1, DEFAULT, 'la_country_NCL', 'NCL', 'NC');
-INSERT INTO StdDestinations VALUES (154, 1, DEFAULT, 'la_country_NZL', 'NZL', 'NZ');
-INSERT INTO StdDestinations VALUES (155, 1, DEFAULT, 'la_country_NIC', 'NIC', 'NI');
-INSERT INTO StdDestinations VALUES (156, 1, DEFAULT, 'la_country_NER', 'NER', 'NE');
-INSERT INTO StdDestinations VALUES (157, 1, DEFAULT, 'la_country_NGA', 'NGA', 'NG');
-INSERT INTO StdDestinations VALUES (158, 1, DEFAULT, 'la_country_NIU', 'NIU', 'NU');
-INSERT INTO StdDestinations VALUES (159, 1, DEFAULT, 'la_country_NFK', 'NFK', 'NF');
-INSERT INTO StdDestinations VALUES (160, 1, DEFAULT, 'la_country_MNP', 'MNP', 'MP');
-INSERT INTO StdDestinations VALUES (161, 1, DEFAULT, 'la_country_NOR', 'NOR', 'NO');
-INSERT INTO StdDestinations VALUES (162, 1, DEFAULT, 'la_country_OMN', 'OMN', 'OM');
-INSERT INTO StdDestinations VALUES (163, 1, DEFAULT, 'la_country_PAK', 'PAK', 'PK');
-INSERT INTO StdDestinations VALUES (164, 1, DEFAULT, 'la_country_PLW', 'PLW', 'PW');
-INSERT INTO StdDestinations VALUES (165, 1, DEFAULT, 'la_country_PSE', 'PSE', 'PS');
-INSERT INTO StdDestinations VALUES (166, 1, DEFAULT, 'la_country_PAN', 'PAN', 'PA');
-INSERT INTO StdDestinations VALUES (167, 1, DEFAULT, 'la_country_PNG', 'PNG', 'PG');
-INSERT INTO StdDestinations VALUES (168, 1, DEFAULT, 'la_country_PRY', 'PRY', 'PY');
-INSERT INTO StdDestinations VALUES (169, 1, DEFAULT, 'la_country_PER', 'PER', 'PE');
-INSERT INTO StdDestinations VALUES (170, 1, DEFAULT, 'la_country_PHL', 'PHL', 'PH');
-INSERT INTO StdDestinations VALUES (171, 1, DEFAULT, 'la_country_PCN', 'PCN', 'PN');
-INSERT INTO StdDestinations VALUES (172, 1, DEFAULT, 'la_country_POL', 'POL', 'PL');
-INSERT INTO StdDestinations VALUES (173, 1, DEFAULT, 'la_country_PRT', 'PRT', 'PT');
-INSERT INTO StdDestinations VALUES (174, 1, DEFAULT, 'la_country_PRI', 'PRI', 'PR');
-INSERT INTO StdDestinations VALUES (175, 1, DEFAULT, 'la_country_QAT', 'QAT', 'QA');
-INSERT INTO StdDestinations VALUES (176, 1, DEFAULT, 'la_country_REU', 'REU', 'RE');
-INSERT INTO StdDestinations VALUES (177, 1, DEFAULT, 'la_country_ROU', 'ROU', 'RO');
-INSERT INTO StdDestinations VALUES (178, 1, DEFAULT, 'la_country_RUS', 'RUS', 'RU');
-INSERT INTO StdDestinations VALUES (179, 1, DEFAULT, 'la_country_RWA', 'RWA', 'RW');
-INSERT INTO StdDestinations VALUES (180, 1, DEFAULT, 'la_country_KNA', 'KNA', 'KN');
-INSERT INTO StdDestinations VALUES (181, 1, DEFAULT, 'la_country_LCA', 'LCA', 'LC');
-INSERT INTO StdDestinations VALUES (182, 1, DEFAULT, 'la_country_VCT', 'VCT', 'VC');
-INSERT INTO StdDestinations VALUES (183, 1, DEFAULT, 'la_country_WSM', 'WSM', 'WS');
-INSERT INTO StdDestinations VALUES (184, 1, DEFAULT, 'la_country_SMR', 'SMR', 'SM');
-INSERT INTO StdDestinations VALUES (185, 1, DEFAULT, 'la_country_STP', 'STP', 'ST');
-INSERT INTO StdDestinations VALUES (186, 1, DEFAULT, 'la_country_SAU', 'SAU', 'SA');
-INSERT INTO StdDestinations VALUES (187, 1, DEFAULT, 'la_country_SEN', 'SEN', 'SN');
-INSERT INTO StdDestinations VALUES (188, 1, DEFAULT, 'la_country_SYC', 'SYC', 'SC');
-INSERT INTO StdDestinations VALUES (189, 1, DEFAULT, 'la_country_SLE', 'SLE', 'SL');
-INSERT INTO StdDestinations VALUES (190, 1, DEFAULT, 'la_country_SGP', 'SGP', 'SG');
-INSERT INTO StdDestinations VALUES (191, 1, DEFAULT, 'la_country_SVK', 'SVK', 'SK');
-INSERT INTO StdDestinations VALUES (192, 1, DEFAULT, 'la_country_SVN', 'SVN', 'SI');
-INSERT INTO StdDestinations VALUES (193, 1, DEFAULT, 'la_country_SLB', 'SLB', 'SB');
-INSERT INTO StdDestinations VALUES (194, 1, DEFAULT, 'la_country_SOM', 'SOM', 'SO');
-INSERT INTO StdDestinations VALUES (195, 1, DEFAULT, 'la_country_ZAF', 'ZAF', 'ZA');
-INSERT INTO StdDestinations VALUES (196, 1, DEFAULT, 'la_country_SGS', 'SGS', 'GS');
-INSERT INTO StdDestinations VALUES (197, 1, DEFAULT, 'la_country_ESP', 'ESP', 'ES');
-INSERT INTO StdDestinations VALUES (198, 1, DEFAULT, 'la_country_LKA', 'LKA', 'LK');
-INSERT INTO StdDestinations VALUES (199, 1, DEFAULT, 'la_country_SHN', 'SHN', 'SH');
-INSERT INTO StdDestinations VALUES (200, 1, DEFAULT, 'la_country_SPM', 'SPM', 'PM');
-INSERT INTO StdDestinations VALUES (201, 1, DEFAULT, 'la_country_SDN', 'SDN', 'SD');
-INSERT INTO StdDestinations VALUES (202, 1, DEFAULT, 'la_country_SUR', 'SUR', 'SR');
-INSERT INTO StdDestinations VALUES (203, 1, DEFAULT, 'la_country_SJM', 'SJM', 'SJ');
-INSERT INTO StdDestinations VALUES (204, 1, DEFAULT, 'la_country_SWZ', 'SWZ', 'SZ');
-INSERT INTO StdDestinations VALUES (205, 1, DEFAULT, 'la_country_SWE', 'SWE', 'SE');
-INSERT INTO StdDestinations VALUES (206, 1, DEFAULT, 'la_country_CHE', 'CHE', 'CH');
-INSERT INTO StdDestinations VALUES (207, 1, DEFAULT, 'la_country_SYR', 'SYR', 'SY');
-INSERT INTO StdDestinations VALUES (208, 1, DEFAULT, 'la_country_TWN', 'TWN', 'TW');
-INSERT INTO StdDestinations VALUES (209, 1, DEFAULT, 'la_country_TJK', 'TJK', 'TJ');
-INSERT INTO StdDestinations VALUES (210, 1, DEFAULT, 'la_country_TZA', 'TZA', 'TZ');
-INSERT INTO StdDestinations VALUES (211, 1, DEFAULT, 'la_country_THA', 'THA', 'TH');
-INSERT INTO StdDestinations VALUES (212, 1, DEFAULT, 'la_country_TGO', 'TGO', 'TG');
-INSERT INTO StdDestinations VALUES (213, 1, DEFAULT, 'la_country_TKL', 'TKL', 'TK');
-INSERT INTO StdDestinations VALUES (214, 1, DEFAULT, 'la_country_TON', 'TON', 'TO');
-INSERT INTO StdDestinations VALUES (215, 1, DEFAULT, 'la_country_TTO', 'TTO', 'TT');
-INSERT INTO StdDestinations VALUES (216, 1, DEFAULT, 'la_country_TUN', 'TUN', 'TN');
-INSERT INTO StdDestinations VALUES (217, 1, DEFAULT, 'la_country_TUR', 'TUR', 'TR');
-INSERT INTO StdDestinations VALUES (218, 1, DEFAULT, 'la_country_TKM', 'TKM', 'TM');
-INSERT INTO StdDestinations VALUES (219, 1, DEFAULT, 'la_country_TCA', 'TCA', 'TC');
-INSERT INTO StdDestinations VALUES (220, 1, DEFAULT, 'la_country_TUV', 'TUV', 'TV');
-INSERT INTO StdDestinations VALUES (221, 1, DEFAULT, 'la_country_UGA', 'UGA', 'UG');
-INSERT INTO StdDestinations VALUES (222, 1, DEFAULT, 'la_country_UKR', 'UKR', 'UA');
-INSERT INTO StdDestinations VALUES (223, 1, DEFAULT, 'la_country_ARE', 'ARE', 'AE');
-INSERT INTO StdDestinations VALUES (224, 1, DEFAULT, 'la_country_GBR', 'GBR', 'GB');
-INSERT INTO StdDestinations VALUES (225, 1, DEFAULT, 'la_country_USA', 'USA', 'US');
-INSERT INTO StdDestinations VALUES (226, 1, DEFAULT, 'la_country_UMI', 'UMI', 'UM');
-INSERT INTO StdDestinations VALUES (227, 1, DEFAULT, 'la_country_URY', 'URY', 'UY');
-INSERT INTO StdDestinations VALUES (228, 1, DEFAULT, 'la_country_UZB', 'UZB', 'UZ');
-INSERT INTO StdDestinations VALUES (229, 1, DEFAULT, 'la_country_VUT', 'VUT', 'VU');
-INSERT INTO StdDestinations VALUES (230, 1, DEFAULT, 'la_country_VAT', 'VAT', 'VA');
-INSERT INTO StdDestinations VALUES (231, 1, DEFAULT, 'la_country_VEN', 'VEN', 'VE');
-INSERT INTO StdDestinations VALUES (232, 1, DEFAULT, 'la_country_VNM', 'VNM', 'VN');
-INSERT INTO StdDestinations VALUES (233, 1, DEFAULT, 'la_country_VGB', 'VGB', 'VG');
-INSERT INTO StdDestinations VALUES (234, 1, DEFAULT, 'la_country_VIR', 'VIR', 'VI');
-INSERT INTO StdDestinations VALUES (235, 1, DEFAULT, 'la_country_WLF', 'WLF', 'WF');
-INSERT INTO StdDestinations VALUES (236, 1, DEFAULT, 'la_country_ESH', 'ESH', 'EH');
-INSERT INTO StdDestinations VALUES (237, 1, DEFAULT, 'la_country_YEM', 'YEM', 'YE');
-INSERT INTO StdDestinations VALUES (238, 1, DEFAULT, 'la_country_YUG', 'YUG', 'YU');
-INSERT INTO StdDestinations VALUES (239, 1, DEFAULT, 'la_country_ZMB', 'ZMB', 'ZM');
-INSERT INTO StdDestinations VALUES (240, 1, DEFAULT, 'la_country_ZWE', 'ZWE', 'ZW');
-INSERT INTO StdDestinations VALUES (370, 2, 38, 'la_state_YT', 'YT', DEFAULT);
-INSERT INTO StdDestinations VALUES (369, 2, 38, 'la_state_SK', 'SK', DEFAULT);
-INSERT INTO StdDestinations VALUES (368, 2, 38, 'la_state_QC', 'QC', DEFAULT);
-INSERT INTO StdDestinations VALUES (367, 2, 38, 'la_state_PE', 'PE', DEFAULT);
-INSERT INTO StdDestinations VALUES (366, 2, 38, 'la_state_ON', 'ON', DEFAULT);
-INSERT INTO StdDestinations VALUES (365, 2, 38, 'la_state_NU', 'NU', DEFAULT);
-INSERT INTO StdDestinations VALUES (364, 2, 38, 'la_state_NS', 'NS', DEFAULT);
-INSERT INTO StdDestinations VALUES (363, 2, 38, 'la_state_NT', 'NT', DEFAULT);
-INSERT INTO StdDestinations VALUES (362, 2, 38, 'la_state_NL', 'NL', DEFAULT);
-INSERT INTO StdDestinations VALUES (361, 2, 38, 'la_state_NB', 'NB', DEFAULT);
-INSERT INTO StdDestinations VALUES (360, 2, 38, 'la_state_MB', 'MB', DEFAULT);
-INSERT INTO StdDestinations VALUES (359, 2, 38, 'la_state_BC', 'BC', DEFAULT);
-INSERT INTO StdDestinations VALUES (358, 2, 38, 'la_state_AB', 'AB', DEFAULT);
-INSERT INTO StdDestinations VALUES (357, 2, 225, 'la_state_DC', 'DC', DEFAULT);
-INSERT INTO StdDestinations VALUES (356, 2, 225, 'la_state_WY', 'WY', DEFAULT);
-INSERT INTO StdDestinations VALUES (355, 2, 225, 'la_state_WI', 'WI', DEFAULT);
-INSERT INTO StdDestinations VALUES (354, 2, 225, 'la_state_WV', 'WV', DEFAULT);
-INSERT INTO StdDestinations VALUES (353, 2, 225, 'la_state_WA', 'WA', DEFAULT);
-INSERT INTO StdDestinations VALUES (352, 2, 225, 'la_state_VA', 'VA', DEFAULT);
-INSERT INTO StdDestinations VALUES (351, 2, 225, 'la_state_VT', 'VT', DEFAULT);
-INSERT INTO StdDestinations VALUES (350, 2, 225, 'la_state_UT', 'UT', DEFAULT);
-INSERT INTO StdDestinations VALUES (349, 2, 225, 'la_state_TX', 'TX', DEFAULT);
-INSERT INTO StdDestinations VALUES (348, 2, 225, 'la_state_TN', 'TN', DEFAULT);
-INSERT INTO StdDestinations VALUES (347, 2, 225, 'la_state_SD', 'SD', DEFAULT);
-INSERT INTO StdDestinations VALUES (346, 2, 225, 'la_state_SC', 'SC', DEFAULT);
-INSERT INTO StdDestinations VALUES (345, 2, 225, 'la_state_RI', 'RI', DEFAULT);
-INSERT INTO StdDestinations VALUES (344, 2, 225, 'la_state_PR', 'PR', DEFAULT);
-INSERT INTO StdDestinations VALUES (343, 2, 225, 'la_state_PA', 'PA', DEFAULT);
-INSERT INTO StdDestinations VALUES (342, 2, 225, 'la_state_OR', 'OR', DEFAULT);
-INSERT INTO StdDestinations VALUES (341, 2, 225, 'la_state_OK', 'OK', DEFAULT);
-INSERT INTO StdDestinations VALUES (340, 2, 225, 'la_state_OH', 'OH', DEFAULT);
-INSERT INTO StdDestinations VALUES (339, 2, 225, 'la_state_ND', 'ND', DEFAULT);
-INSERT INTO StdDestinations VALUES (338, 2, 225, 'la_state_NC', 'NC', DEFAULT);
-INSERT INTO StdDestinations VALUES (337, 2, 225, 'la_state_NY', 'NY', DEFAULT);
-INSERT INTO StdDestinations VALUES (336, 2, 225, 'la_state_NM', 'NM', DEFAULT);
-INSERT INTO StdDestinations VALUES (335, 2, 225, 'la_state_NJ', 'NJ', DEFAULT);
-INSERT INTO StdDestinations VALUES (334, 2, 225, 'la_state_NH', 'NH', DEFAULT);
-INSERT INTO StdDestinations VALUES (333, 2, 225, 'la_state_NV', 'NV', DEFAULT);
-INSERT INTO StdDestinations VALUES (332, 2, 225, 'la_state_NE', 'NE', DEFAULT);
-INSERT INTO StdDestinations VALUES (331, 2, 225, 'la_state_MT', 'MT', DEFAULT);
-INSERT INTO StdDestinations VALUES (330, 2, 225, 'la_state_MO', 'MO', DEFAULT);
-INSERT INTO StdDestinations VALUES (329, 2, 225, 'la_state_MS', 'MS', DEFAULT);
-INSERT INTO StdDestinations VALUES (328, 2, 225, 'la_state_MN', 'MN', DEFAULT);
-INSERT INTO StdDestinations VALUES (327, 2, 225, 'la_state_MI', 'MI', DEFAULT);
-INSERT INTO StdDestinations VALUES (326, 2, 225, 'la_state_MA', 'MA', DEFAULT);
-INSERT INTO StdDestinations VALUES (325, 2, 225, 'la_state_MD', 'MD', DEFAULT);
-INSERT INTO StdDestinations VALUES (324, 2, 225, 'la_state_ME', 'ME', DEFAULT);
-INSERT INTO StdDestinations VALUES (323, 2, 225, 'la_state_LA', 'LA', DEFAULT);
-INSERT INTO StdDestinations VALUES (322, 2, 225, 'la_state_KY', 'KY', DEFAULT);
-INSERT INTO StdDestinations VALUES (321, 2, 225, 'la_state_KS', 'KS', DEFAULT);
-INSERT INTO StdDestinations VALUES (320, 2, 225, 'la_state_IA', 'IA', DEFAULT);
-INSERT INTO StdDestinations VALUES (319, 2, 225, 'la_state_IN', 'IN', DEFAULT);
-INSERT INTO StdDestinations VALUES (318, 2, 225, 'la_state_IL', 'IL', DEFAULT);
-INSERT INTO StdDestinations VALUES (317, 2, 225, 'la_state_ID', 'ID', DEFAULT);
-INSERT INTO StdDestinations VALUES (316, 2, 225, 'la_state_HI', 'HI', DEFAULT);
-INSERT INTO StdDestinations VALUES (315, 2, 225, 'la_state_GA', 'GA', DEFAULT);
-INSERT INTO StdDestinations VALUES (314, 2, 225, 'la_state_FL', 'FL', DEFAULT);
-INSERT INTO StdDestinations VALUES (313, 2, 225, 'la_state_DE', 'DE', DEFAULT);
-INSERT INTO StdDestinations VALUES (312, 2, 225, 'la_state_CT', 'CT', DEFAULT);
-INSERT INTO StdDestinations VALUES (311, 2, 225, 'la_state_CO', 'CO', DEFAULT);
-INSERT INTO StdDestinations VALUES (310, 2, 225, 'la_state_CA', 'CA', DEFAULT);
-INSERT INTO StdDestinations VALUES (309, 2, 225, 'la_state_AR', 'AR', DEFAULT);
-INSERT INTO StdDestinations VALUES (308, 2, 225, 'la_state_AZ', 'AZ', DEFAULT);
-INSERT INTO StdDestinations VALUES (307, 2, 225, 'la_state_AK', 'AK', DEFAULT);
-INSERT INTO StdDestinations VALUES (306, 2, 225, 'la_state_AL', 'AL', DEFAULT);
+INSERT INTO CountryStates (CountryStateId, Type, StateCountryId, IsoCode, ShortIsoCode) VALUES
+(1, 1, NULL, 'AFG', 'AF'),
+(2, 1, NULL, 'ALB', 'AL'),
+(3, 1, NULL, 'DZA', 'DZ'),
+(4, 1, NULL, 'ASM', 'AS'),
+(5, 1, NULL, 'AND', 'AD'),
+(6, 1, NULL, 'AGO', 'AO'),
+(7, 1, NULL, 'AIA', 'AI'),
+(8, 1, NULL, 'ATA', 'AQ'),
+(9, 1, NULL, 'ATG', 'AG'),
+(10, 1, NULL, 'ARG', 'AR'),
+(11, 1, NULL, 'ARM', 'AM'),
+(12, 1, NULL, 'ABW', 'AW'),
+(13, 1, NULL, 'AUS', 'AU'),
+(14, 1, NULL, 'AUT', 'AT'),
+(15, 1, NULL, 'AZE', 'AZ'),
+(16, 1, NULL, 'BHS', 'BS'),
+(17, 1, NULL, 'BHR', 'BH'),
+(18, 1, NULL, 'BGD', 'BD'),
+(19, 1, NULL, 'BRB', 'BB'),
+(20, 1, NULL, 'BLR', 'BY'),
+(21, 1, NULL, 'BEL', 'BE'),
+(22, 1, NULL, 'BLZ', 'BZ'),
+(23, 1, NULL, 'BEN', 'BJ'),
+(24, 1, NULL, 'BMU', 'BM'),
+(25, 1, NULL, 'BTN', 'BT'),
+(26, 1, NULL, 'BOL', 'BO'),
+(27, 1, NULL, 'BIH', 'BA'),
+(28, 1, NULL, 'BWA', 'BW'),
+(29, 1, NULL, 'BVT', 'BV'),
+(30, 1, NULL, 'BRA', 'BR'),
+(31, 1, NULL, 'IOT', 'IO'),
+(32, 1, NULL, 'BRN', 'BN'),
+(33, 1, NULL, 'BGR', 'BG'),
+(34, 1, NULL, 'BFA', 'BF'),
+(35, 1, NULL, 'BDI', 'BI'),
+(36, 1, NULL, 'KHM', 'KH'),
+(37, 1, NULL, 'CMR', 'CM'),
+(38, 1, NULL, 'CAN', 'CA'),
+(39, 1, NULL, 'CPV', 'CV'),
+(40, 1, NULL, 'CYM', 'KY'),
+(41, 1, NULL, 'CAF', 'CF'),
+(42, 1, NULL, 'TCD', 'TD'),
+(43, 1, NULL, 'CHL', 'CL'),
+(44, 1, NULL, 'CHN', 'CN'),
+(45, 1, NULL, 'CXR', 'CX'),
+(46, 1, NULL, 'CCK', 'CC'),
+(47, 1, NULL, 'COL', 'CO'),
+(48, 1, NULL, 'COM', 'KM'),
+(49, 1, NULL, 'COD', 'CD'),
+(50, 1, NULL, 'COG', 'CG'),
+(51, 1, NULL, 'COK', 'CK'),
+(52, 1, NULL, 'CRI', 'CR'),
+(53, 1, NULL, 'CIV', 'CI'),
+(54, 1, NULL, 'HRV', 'HR'),
+(55, 1, NULL, 'CUB', 'CU'),
+(56, 1, NULL, 'CYP', 'CY'),
+(57, 1, NULL, 'CZE', 'CZ'),
+(58, 1, NULL, 'DNK', 'DK'),
+(59, 1, NULL, 'DJI', 'DJ'),
+(60, 1, NULL, 'DMA', 'DM'),
+(61, 1, NULL, 'DOM', 'DO'),
+(62, 1, NULL, 'TLS', 'TL'),
+(63, 1, NULL, 'ECU', 'EC'),
+(64, 1, NULL, 'EGY', 'EG'),
+(65, 1, NULL, 'SLV', 'SV'),
+(66, 1, NULL, 'GNQ', 'GQ'),
+(67, 1, NULL, 'ERI', 'ER'),
+(68, 1, NULL, 'EST', 'EE'),
+(69, 1, NULL, 'ETH', 'ET'),
+(70, 1, NULL, 'FLK', 'FK'),
+(71, 1, NULL, 'FRO', 'FO'),
+(72, 1, NULL, 'FJI', 'FJ'),
+(73, 1, NULL, 'FIN', 'FI'),
+(74, 1, NULL, 'FRA', 'FR'),
+(75, 1, NULL, 'FXX', 'FX'),
+(76, 1, NULL, 'GUF', 'GF'),
+(77, 1, NULL, 'PYF', 'PF'),
+(78, 1, NULL, 'ATF', 'TF'),
+(79, 1, NULL, 'GAB', 'GA'),
+(80, 1, NULL, 'GMB', 'GM'),
+(81, 1, NULL, 'GEO', 'GE'),
+(82, 1, NULL, 'DEU', 'DE'),
+(83, 1, NULL, 'GHA', 'GH'),
+(84, 1, NULL, 'GIB', 'GI'),
+(85, 1, NULL, 'GRC', 'GR'),
+(86, 1, NULL, 'GRL', 'GL'),
+(87, 1, NULL, 'GRD', 'GD'),
+(88, 1, NULL, 'GLP', 'GP'),
+(89, 1, NULL, 'GUM', 'GU'),
+(90, 1, NULL, 'GTM', 'GT'),
+(91, 1, NULL, 'GIN', 'GN'),
+(92, 1, NULL, 'GNB', 'GW'),
+(93, 1, NULL, 'GUY', 'GY'),
+(94, 1, NULL, 'HTI', 'HT'),
+(95, 1, NULL, 'HMD', 'HM'),
+(96, 1, NULL, 'HND', 'HN'),
+(97, 1, NULL, 'HKG', 'HK'),
+(98, 1, NULL, 'HUN', 'HU'),
+(99, 1, NULL, 'ISL', 'IS'),
+(100, 1, NULL, 'IND', 'IN'),
+(101, 1, NULL, 'IDN', 'ID'),
+(102, 1, NULL, 'IRN', 'IR'),
+(103, 1, NULL, 'IRQ', 'IQ'),
+(104, 1, NULL, 'IRL', 'IE'),
+(105, 1, NULL, 'ISR', 'IL'),
+(106, 1, NULL, 'ITA', 'IT'),
+(107, 1, NULL, 'JAM', 'JM'),
+(108, 1, NULL, 'JPN', 'JP'),
+(109, 1, NULL, 'JOR', 'JO'),
+(110, 1, NULL, 'KAZ', 'KZ'),
+(111, 1, NULL, 'KEN', 'KE'),
+(112, 1, NULL, 'KIR', 'KI'),
+(113, 1, NULL, 'PRK', 'KP'),
+(114, 1, NULL, 'KOR', 'KR'),
+(115, 1, NULL, 'KWT', 'KW'),
+(116, 1, NULL, 'KGZ', 'KG'),
+(117, 1, NULL, 'LAO', 'LA'),
+(118, 1, NULL, 'LVA', 'LV'),
+(119, 1, NULL, 'LBN', 'LB'),
+(120, 1, NULL, 'LSO', 'LS'),
+(121, 1, NULL, 'LBR', 'LR'),
+(122, 1, NULL, 'LBY', 'LY'),
+(123, 1, NULL, 'LIE', 'LI'),
+(124, 1, NULL, 'LTU', 'LT'),
+(125, 1, NULL, 'LUX', 'LU'),
+(126, 1, NULL, 'MAC', 'MO'),
+(127, 1, NULL, 'MKD', 'MK'),
+(128, 1, NULL, 'MDG', 'MG'),
+(129, 1, NULL, 'MWI', 'MW'),
+(130, 1, NULL, 'MYS', 'MY'),
+(131, 1, NULL, 'MDV', 'MV'),
+(132, 1, NULL, 'MLI', 'ML'),
+(133, 1, NULL, 'MLT', 'MT'),
+(134, 1, NULL, 'MHL', 'MH'),
+(135, 1, NULL, 'MTQ', 'MQ'),
+(136, 1, NULL, 'MRT', 'MR'),
+(137, 1, NULL, 'MUS', 'MU'),
+(138, 1, NULL, 'MYT', 'YT'),
+(139, 1, NULL, 'MEX', 'MX'),
+(140, 1, NULL, 'FSM', 'FM'),
+(141, 1, NULL, 'MDA', 'MD'),
+(142, 1, NULL, 'MCO', 'MC'),
+(143, 1, NULL, 'MNG', 'MN'),
+(144, 1, NULL, 'MSR', 'MS'),
+(145, 1, NULL, 'MAR', 'MA'),
+(146, 1, NULL, 'MOZ', 'MZ'),
+(147, 1, NULL, 'MMR', 'MM'),
+(148, 1, NULL, 'NAM', 'NA'),
+(149, 1, NULL, 'NRU', 'NR'),
+(150, 1, NULL, 'NPL', 'NP'),
+(151, 1, NULL, 'NLD', 'NL'),
+(152, 1, NULL, 'ANT', 'AN'),
+(153, 1, NULL, 'NCL', 'NC'),
+(154, 1, NULL, 'NZL', 'NZ'),
+(155, 1, NULL, 'NIC', 'NI'),
+(156, 1, NULL, 'NER', 'NE'),
+(157, 1, NULL, 'NGA', 'NG'),
+(158, 1, NULL, 'NIU', 'NU'),
+(159, 1, NULL, 'NFK', 'NF'),
+(160, 1, NULL, 'MNP', 'MP'),
+(161, 1, NULL, 'NOR', 'NO'),
+(162, 1, NULL, 'OMN', 'OM'),
+(163, 1, NULL, 'PAK', 'PK'),
+(164, 1, NULL, 'PLW', 'PW'),
+(165, 1, NULL, 'PSE', 'PS'),
+(166, 1, NULL, 'PAN', 'PA'),
+(167, 1, NULL, 'PNG', 'PG'),
+(168, 1, NULL, 'PRY', 'PY'),
+(169, 1, NULL, 'PER', 'PE'),
+(170, 1, NULL, 'PHL', 'PH'),
+(171, 1, NULL, 'PCN', 'PN'),
+(172, 1, NULL, 'POL', 'PL'),
+(173, 1, NULL, 'PRT', 'PT'),
+(174, 1, NULL, 'PRI', 'PR'),
+(175, 1, NULL, 'QAT', 'QA'),
+(176, 1, NULL, 'REU', 'RE'),
+(177, 1, NULL, 'ROU', 'RO'),
+(178, 1, NULL, 'RUS', 'RU'),
+(179, 1, NULL, 'RWA', 'RW'),
+(180, 1, NULL, 'KNA', 'KN'),
+(181, 1, NULL, 'LCA', 'LC'),
+(182, 1, NULL, 'VCT', 'VC'),
+(183, 1, NULL, 'WSM', 'WS'),
+(184, 1, NULL, 'SMR', 'SM'),
+(185, 1, NULL, 'STP', 'ST'),
+(186, 1, NULL, 'SAU', 'SA'),
+(187, 1, NULL, 'SEN', 'SN'),
+(188, 1, NULL, 'SYC', 'SC'),
+(189, 1, NULL, 'SLE', 'SL'),
+(190, 1, NULL, 'SGP', 'SG'),
+(191, 1, NULL, 'SVK', 'SK'),
+(192, 1, NULL, 'SVN', 'SI'),
+(193, 1, NULL, 'SLB', 'SB'),
+(194, 1, NULL, 'SOM', 'SO'),
+(195, 1, NULL, 'ZAF', 'ZA'),
+(196, 1, NULL, 'SGS', 'GS'),
+(197, 1, NULL, 'ESP', 'ES'),
+(198, 1, NULL, 'LKA', 'LK'),
+(199, 1, NULL, 'SHN', 'SH'),
+(200, 1, NULL, 'SPM', 'PM'),
+(201, 1, NULL, 'SDN', 'SD'),
+(202, 1, NULL, 'SUR', 'SR'),
+(203, 1, NULL, 'SJM', 'SJ'),
+(204, 1, NULL, 'SWZ', 'SZ'),
+(205, 1, NULL, 'SWE', 'SE'),
+(206, 1, NULL, 'CHE', 'CH'),
+(207, 1, NULL, 'SYR', 'SY'),
+(208, 1, NULL, 'TWN', 'TW'),
+(209, 1, NULL, 'TJK', 'TJ'),
+(210, 1, NULL, 'TZA', 'TZ'),
+(211, 1, NULL, 'THA', 'TH'),
+(212, 1, NULL, 'TGO', 'TG'),
+(213, 1, NULL, 'TKL', 'TK'),
+(214, 1, NULL, 'TON', 'TO'),
+(215, 1, NULL, 'TTO', 'TT'),
+(216, 1, NULL, 'TUN', 'TN'),
+(217, 1, NULL, 'TUR', 'TR'),
+(218, 1, NULL, 'TKM', 'TM'),
+(219, 1, NULL, 'TCA', 'TC'),
+(220, 1, NULL, 'TUV', 'TV'),
+(221, 1, NULL, 'UGA', 'UG'),
+(222, 1, NULL, 'UKR', 'UA'),
+(223, 1, NULL, 'ARE', 'AE'),
+(224, 1, NULL, 'GBR', 'GB'),
+(225, 1, NULL, 'USA', 'US'),
+(226, 1, NULL, 'UMI', 'UM'),
+(227, 1, NULL, 'URY', 'UY'),
+(228, 1, NULL, 'UZB', 'UZ'),
+(229, 1, NULL, 'VUT', 'VU'),
+(230, 1, NULL, 'VAT', 'VA'),
+(231, 1, NULL, 'VEN', 'VE'),
+(232, 1, NULL, 'VNM', 'VN'),
+(233, 1, NULL, 'VGB', 'VG'),
+(234, 1, NULL, 'VIR', 'VI'),
+(235, 1, NULL, 'WLF', 'WF'),
+(236, 1, NULL, 'ESH', 'EH'),
+(237, 1, NULL, 'YEM', 'YE'),
+(238, 1, NULL, 'YUG', 'YU'),
+(239, 1, NULL, 'ZMB', 'ZM'),
+(240, 1, NULL, 'ZWE', 'ZW'),
+(370, 2, 38, 'YT', NULL),
+(369, 2, 38, 'SK', NULL),
+(368, 2, 38, 'QC', NULL),
+(367, 2, 38, 'PE', NULL),
+(366, 2, 38, 'ON', NULL),
+(365, 2, 38, 'NU', NULL),
+(364, 2, 38, 'NS', NULL),
+(363, 2, 38, 'NT', NULL),
+(362, 2, 38, 'NL', NULL),
+(361, 2, 38, 'NB', NULL),
+(360, 2, 38, 'MB', NULL),
+(359, 2, 38, 'BC', NULL),
+(358, 2, 38, 'AB', NULL),
+(357, 2, 225, 'DC', NULL),
+(356, 2, 225, 'WY', NULL),
+(355, 2, 225, 'WI', NULL),
+(354, 2, 225, 'WV', NULL),
+(353, 2, 225, 'WA', NULL),
+(352, 2, 225, 'VA', NULL),
+(351, 2, 225, 'VT', NULL),
+(350, 2, 225, 'UT', NULL),
+(349, 2, 225, 'TX', NULL),
+(348, 2, 225, 'TN', NULL),
+(347, 2, 225, 'SD', NULL),
+(346, 2, 225, 'SC', NULL),
+(345, 2, 225, 'RI', NULL),
+(344, 2, 225, 'PR', NULL),
+(343, 2, 225, 'PA', NULL),
+(342, 2, 225, 'OR', NULL),
+(341, 2, 225, 'OK', NULL),
+(340, 2, 225, 'OH', NULL),
+(339, 2, 225, 'ND', NULL),
+(338, 2, 225, 'NC', NULL),
+(337, 2, 225, 'NY', NULL),
+(336, 2, 225, 'NM', NULL),
+(335, 2, 225, 'NJ', NULL),
+(334, 2, 225, 'NH', NULL),
+(333, 2, 225, 'NV', NULL),
+(332, 2, 225, 'NE', NULL),
+(331, 2, 225, 'MT', NULL),
+(330, 2, 225, 'MO', NULL),
+(329, 2, 225, 'MS', NULL),
+(328, 2, 225, 'MN', NULL),
+(327, 2, 225, 'MI', NULL),
+(326, 2, 225, 'MA', NULL),
+(325, 2, 225, 'MD', NULL),
+(324, 2, 225, 'ME', NULL),
+(323, 2, 225, 'LA', NULL),
+(322, 2, 225, 'KY', NULL),
+(321, 2, 225, 'KS', NULL),
+(320, 2, 225, 'IA', NULL),
+(319, 2, 225, 'IN', NULL),
+(318, 2, 225, 'IL', NULL),
+(317, 2, 225, 'ID', NULL),
+(316, 2, 225, 'HI', NULL),
+(315, 2, 225, 'GA', NULL),
+(314, 2, 225, 'FL', NULL),
+(313, 2, 225, 'DE', NULL),
+(312, 2, 225, 'CT', NULL),
+(311, 2, 225, 'CO', NULL),
+(310, 2, 225, 'CA', NULL),
+(309, 2, 225, 'AR', NULL),
+(308, 2, 225, 'AZ', NULL),
+(307, 2, 225, 'AK', NULL),
+(306, 2, 225, 'AL', NULL);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.VIEW', 'lu_PermName_Category.View_desc', 'lu_PermName_Category.View_error', 'In-Portal');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal');
Index: install/install_schema.sql
===================================================================
--- install/install_schema.sql (revision 13400)
+++ install/install_schema.sql (working copy)
@@ -364,16 +364,21 @@
KEY Cached (Cached)
);
-CREATE TABLE StdDestinations (
- DestId int(11) NOT NULL auto_increment,
- DestType int(11) NOT NULL default '0',
- DestParentId int(11) default NULL,
- DestName varchar(255) NOT NULL default '',
- DestAbbr char(3) NOT NULL default '',
- DestAbbr2 char(2) default NULL,
- PRIMARY KEY (DestId),
- KEY DestType (DestType),
- KEY DestParentId (DestParentId)
+CREATE TABLE CountryStates (
+ CountryStateId int(11) NOT NULL AUTO_INCREMENT,
+ `Type` int(11) NOT NULL DEFAULT '1',
+ StateCountryId int(11) DEFAULT NULL,
+ l1_Name varchar(255) NOT NULL,
+ l2_Name varchar(255) NOT NULL,
+ l3_Name varchar(255) NOT NULL,
+ l4_Name varchar(255) NOT NULL,
+ l5_Name varchar(255) NOT NULL,
+ IsoCode char(3) NOT NULL DEFAULT '',
+ ShortIsoCode char(2) DEFAULT NULL,
+ PRIMARY KEY (CountryStateId),
+ KEY `Type` (`Type`),
+ KEY StateCountryId (StateCountryId),
+ KEY l1_Name (l1_Name(5))
);
CREATE TABLE Category (
Index: install/remove_schema.sql
===================================================================
--- install/remove_schema.sql (revision 13400)
+++ install/remove_schema.sql (working copy)
@@ -21,7 +21,7 @@
DROP TABLE UserSession;
DROP TABLE EmailLog;
DROP TABLE Cache;
-DROP TABLE StdDestinations;
+DROP TABLE CountryStates;
DROP TABLE Category;
DROP TABLE CategoryCustomData;
DROP TABLE CategoryItems;
Index: install/upgrades.php
===================================================================
--- install/upgrades.php (revision 13400)
+++ install/upgrades.php (working copy)
@@ -1329,6 +1329,8 @@
if ($mode == 'before') {
// create multilingual fields for phrases and email events
$ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
+ /* @var $ml_helper kMultiLanguageHelper */
+
$ml_helper->createFields('phrases');
$ml_helper->createFields('emailevents');
@@ -1428,6 +1430,76 @@
$this->Conn->Query('DROP TABLE IF EXISTS ' . TABLE_PREFIX . 'Phrase');
$this->Conn->Query('RENAME TABLE ' . $temp_table . ' TO ' . TABLE_PREFIX . 'Phrase');
+ // refactor StdDestinations table
+ $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
+ $this->Conn->Query($sql);
+
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
+ CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
+ CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
+ CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
+ CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
+ DROP INDEX DestType,
+ DROP INDEX DestParentId,
+ ADD INDEX (`Type`),
+ ADD INDEX (StateCountryId)';
+ $this->Conn->Query($sql);
+
+ // move country/state translations from Phrase to CountryStates table
+ $ml_helper->createFields('country-state');
+
+ for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
+ if (!$ml_helper->LanguageFound($language_id)) {
+ continue;
+ }
+
+ $sub_select = ' SELECT l' . $language_id . '_Translation
+ FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase = DestName';
+
+ $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
+ SET l' . $language_id . '_Name = (' . $sub_select . ')';
+ $this->Conn->Query($sql);
+ }
+
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ DROP DestName';
+ $this->Conn->Query($sql);
+
+ $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $this->Conn->Query($sql);
+
+ // makes configuration values dropdowns use "||" as separator
+ $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
+ /* @var $custom_field_helper InpCustomFieldsHelper */
+
+ $sql = 'SELECT ValueList, VariableName
+ FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
+ WHERE ValueList LIKE "%,%"';
+ $variables = $this->Conn->GetCol($sql, 'VariableName');
+
+ foreach ($variables as $variable_name => $value_list) {
+ $ret = Array ();
+ $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+
+ foreach ($options as $option_key => $option_title) {
+ if (substr($option_key, 0, 3) == 'SQL') {
+ $ret[] = $option_title;
+ }
+ else {
+ $ret[] = $option_key . '=' . $option_title;
+ }
+ }
+
+ $fields_hash = Array (
+ 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ );
+
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ }
+
// save "config.php" in php format, not ini format as before
$this->_toolkit->SaveConfig();
}
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 13400)
+++ install/upgrades.sql (working copy)
@@ -1712,6 +1712,10 @@
DROP TABLE ConfigurationAdmin;
+UPDATE ConfigurationValues
+SET ValueList = '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
+WHERE ValueList = '=+||<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>';
+
ALTER TABLE Forms
ADD RequireLogin TINYINT NOT NULL DEFAULT '0',
ADD INDEX (RequireLogin),
Index: kernel/constants.php
===================================================================
--- kernel/constants.php (revision 13400)
+++ kernel/constants.php (working copy)
@@ -130,6 +130,9 @@
define('SESSION_LOG_LOGGED_OUT', 1);
define('SESSION_LOG_EXPIRED', 2);
+ define('DESTINATION_TYPE_COUNTRY', 1);
+ define('DESTINATION_TYPE_STATE', 2);
+
// form field visibility
define('FORM_FIELD_EVERYONE', 1);
define('FORM_FIELD_UNREGISTERED', 2);
Index: kernel/db/db_tag_processor.php
===================================================================
--- kernel/db/db_tag_processor.php (revision 13400)
+++ kernel/db/db_tag_processor.php (working copy)
@@ -652,6 +652,13 @@
}
}
+ /**
+ * Depricated
+ *
+ * @param array $params
+ * @return int
+ * @deprecated Parameter "not_last" of "PrintList" tag does that
+ */
function NotLastItem($params)
{
$object =& $this->getList($params); // maybe we should use $this->GetList($params) instead
@@ -738,6 +745,13 @@
return $this->Application->HREF($t, '', $params);
}
+ /**
+ * Depricated
+ *
+ * @param array $params
+ * @return int
+ * @deprecated Parameter "column_width" of "PrintList" tag does that
+ */
function ColumnWidth($params)
{
$columns = $this->Application->Parser->GetParam('columns');
@@ -909,6 +923,13 @@
$object->SetDBField($dst_field, $src_object->GetDBField($src_field));
}
+ /**
+ * Depricated
+ *
+ * @param Array $params
+ * @return string
+ * @deprecated parameter "as_label" of "Field" tag does the same
+ */
function PhraseField($params)
{
$field_label = $this->Field($params);
@@ -1830,7 +1851,7 @@
}
else {
// used for configuration
- $field_options['options'] = $helper->GetValuesHash($object->GetDBField($params['value_list_field']), ',');
+ $field_options['options'] = $helper->GetValuesHash( $object->GetDBField($params['value_list_field']) );
}
$object->SetFieldOptions($field, $field_options);
Index: kernel/utility/http_query.php
===================================================================
--- kernel/utility/http_query.php (revision 13400)
+++ kernel/utility/http_query.php (working copy)
@@ -234,11 +234,9 @@
function AfterInit()
{
-// $vars = $this->processQueryString($this->Get(ENV_VAR_NAME));
-// $this->AddParams($vars);
-// $this->convertPostEvents();
- // if ($this->Application->RewriteURLs()) {
if ($this->Application->RewriteURLs() || $this->Get('_mod_rw_url_')) {
+ // maybe call onafterconfigread here
+
if (defined('DEBUG_MODE') && $this->Application->isDebugMode()) {
$this->Application->Debugger->profileStart('url_parsing');
$this->processRewriteURL();
@@ -375,7 +373,9 @@
$module_params['editing_mode'] = '';
}
- $env = $this->Application->BuildEnv( $this->Get('t'), $module_params, $passed, false, false );
+ $module_params['__URLENCODE__'] = 1;
+
+ $env = $this->Application->BuildEnv( $this->Get('t'), $module_params, $passed, false, false);
$this->Set(ENV_VAR_NAME, $env);
$_REQUEST['env'] = $_GET['env'] = $env; // for capability with old in-portal code
}
Index: units/configuration/configuration_event_handler.php
===================================================================
--- units/configuration/configuration_event_handler.php (revision 13400)
+++ units/configuration/configuration_event_handler.php (working copy)
@@ -115,7 +115,10 @@
}
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $state_iso = $cs_helper->CheckState($check_state, $check_country);
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $state_iso = $cs_helper->getStateIso($check_state, $check_country);
+
if ($state_iso !== false) {
$object->SetDBField('VariableValue', $state_iso);
}
Index: units/country_states/country_state_eh.php
===================================================================
--- units/country_states/country_state_eh.php (revision 0)
+++ units/country_states/country_state_eh.php (revision 0)
@@ -0,0 +1,85 @@
+<?php
+
+ class CountryStateEventHandler extends kDBEventHandler {
+
+ /**
+ * Applies edit picker filters
+ *
+ * @param kEvent $event
+ */
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ if (($event->Special == 'selected') || ($event->Special == 'available')) {
+ $edit_picker_helper =& $this->Application->recallObject('EditPickerHelper');
+ /* @var $edit_picker_helper EditPickerHelper */
+
+ $edit_picker_helper->applyFilter($event, 'Countries');
+
+ // only countries
+ $object->addFilter('type_filter', '%1$s.Type = ' . DESTINATION_TYPE_COUNTRY);
+ }
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->_setRequired($event);
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+ $this->_setRequired($event);
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function _setRequired(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $object->setRequired('StateCountryId', $object->GetDBField('Type') == DESTINATION_TYPE_STATE);
+ }
+
+ /**
+ * Don't allow to delete countries, that have states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemDelete(&$event)
+ {
+ parent::OnBeforeItemDelete($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if ($cs_helper->CountryHasStates( $object->GetDBField('IsoCode') )) {
+ $event->status = erFAIL;
+ return ;
+ }
+ }
+ }
Index: units/country_states/country_states_config.php
===================================================================
--- units/country_states/country_states_config.php (revision 0)
+++ units/country_states/country_states_config.php (revision 0)
@@ -0,0 +1,116 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ $config = Array (
+ 'Prefix' => 'country-state',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CountryStateEventHandler', 'file' => 'country_state_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+
+ 'IDField' => 'CountryStateId',
+
+ 'TableName' => TABLE_PREFIX . 'CountryStates',
+
+ 'TitleField' => 'Translation',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('country-state' => '!la_title_AddingCountryState!'),
+ 'edit_status_labels' => Array ('country-state' => '!la_title_EditingCountryState!'),
+ ),
+
+ 'country_state_list' => Array (
+ 'prefixes' => Array ('country-state_List'), 'format' => "!la_title_CountryStates!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'country_state_edit' => Array (
+ 'prefixes' => Array ('country-state'), 'format' => "#country-state_status# '#country-state_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array('main' => 'in-portal:country_states'),
+
+ 'Sections' => Array (
+ 'in-portal:country_states' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_country_states',
+ 'label' => 'la_title_CountryStates',
+ 'url' => Array('t' => 'country_states/country_state_list', 'pass' => 'm'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 10,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Type' => 'asc', 'Translation' => 'asc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'Translation' => 'l%2$s_Name',
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Country', 2 => 'la_opt_State'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 1
+ ),
+
+ 'StateCountryId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'CountryStates WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' ORDER BY l%2$s_Name', 'option_key_field' => 'CountryStateId', 'option_title_field' => 'l%2$s_Name',
+ 'default' => NULL
+ ),
+
+ 'Name' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+
+ 'IsoCode' => Array ('type' => 'string', 'max_len' => 3, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'ShortIsoCode' => Array ('type' => 'string', 'max_len' => 2, 'default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Translation' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('title' => 'la_col_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Name' => Array ('title' => 'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'IsoCode' => Array ('title' => 'la_col_IsoCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Type' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'StateCountryId' => Array ('title' => 'la_col_StateCountry', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
+ 'ShortIsoCode' => Array ('title' => 'la_col_ShortIsoCode', 'filter_block' => 'grid_like_filter', 'width' => 125, ),
+ ),
+ ),
+ ),
+ );
Index: units/custom_data/custom_data_event_handler.php
===================================================================
--- units/custom_data/custom_data_event_handler.php (revision 13400)
+++ units/custom_data/custom_data_event_handler.php (working copy)
@@ -150,6 +150,8 @@
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
+ $is_install = defined('IS_INSTALL') && IS_INSTALL;
+
foreach ($custom_fields as $custom_id => $custom_params) {
$custom_name = $custom_params['FieldName'];
$field_options = Array('type' => 'string', 'not_null' => 1, 'default' => $custom_params['DefaultValue']);
@@ -170,7 +172,8 @@
case 'multiselect':
case 'radio':
if ($custom_params['ValueList']) {
- $field_options['options'] = $cf_helper->GetValuesHash($custom_params['ValueList']);
+ // $is_install check prevents 335 bad phrase sql errors on upgrade to 5.1.0
+ $field_options['options'] = $is_install ? Array () : $cf_helper->GetValuesHash($custom_params['ValueList']);
$field_options['formatter'] = 'kOptionsFormatter';
$field_options['multiple'] = $custom_params['ElementType'] == 'multiselect';
}
Index: units/helpers/country_states_helper.php
===================================================================
--- units/helpers/country_states_helper.php (revision 13400)
+++ units/helpers/country_states_helper.php (working copy)
@@ -16,11 +16,37 @@
class kCountryStatesHelper extends kHelper
{
- var $CountriesWithStates = Array('USA', 'CAN');
+ /**
+ * Returns countries, that have states
+ *
+ * @return Array
+ */
+ function getCountriesWithStates()
+ {
+ static $cache = null;
+ if (!isset($cache)) {
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+
+ $sql = 'SELECT DISTINCT cname.IsoCode, cid.StateCountryId
+ FROM ' . $table_name . ' cid
+ JOIN ' . $table_name . ' cname ON cname.CountryStateId = cid.StateCountryId
+ WHERE cid.StateCountryId IS NOT NULL';
+ $cache = $this->Conn->GetCol($sql, 'StateCountryId');
+ }
+
+ return $cache;
+ }
+
+ /**
+ * Checks, that country with given 3symbol ISO code has states
+ *
+ * @param string $country_code
+ * @return bool
+ */
function CountryHasStates($country_code)
{
- return !$country_code ? false : in_array($country_code,$this->CountriesWithStates);
+ return $country_code ? in_array($country_code, $this->getCountriesWithStates()) : false;
}
/**
@@ -32,93 +58,131 @@
*/
function PopulateStates(&$event, $state_field, $country_field)
{
- static $country_states = Array ();
+ static $cache = Array ();
$object =& $event->getObject();
- $country_abbr = $object->GetDBField($country_field);
+ /* @var $object kDBItem */
- if (!$country_abbr) {
+ $country_iso = $object->GetDBField($country_field);
+
+ if (!$country_iso) {
return ;
}
- if (!array_key_exists($country_abbr, $country_states)) {
- $sql = 'SELECT DestId
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestType = 1 AND DestAbbr = '.$this->Conn->qstr($country_abbr);
- $country_id = $this->Conn->GetOne($sql);
+ if (!array_key_exists($country_iso, $cache)) {
+ $country_id = $this->getCountryStateId($country_iso, DESTINATION_TYPE_COUNTRY);
+
if (!$country_id) {
return ;
}
- $language_id = $this->Application->GetVar('m_lang');
-
- $sql = 'SELECT p.l' . $language_id . '_Translation as DestName, sd.DestAbbr
- FROM ' . TABLE_PREFIX . 'StdDestinations AS sd
- LEFT JOIN ' . TABLE_PREFIX . 'Phrase AS p ON p.Phrase = sd.DestName
- WHERE DestType = 2 AND DestParentId = ' . $country_id . '
- ORDER BY l' . $language_id . '_Translation';
- $country_states[$country_abbr] = $this->Conn->GetCol($sql, 'DestAbbr');
+ $sql = 'SELECT l' . $this->Application->GetVar('m_lang') . '_Name AS Name, IsoCode
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE (Type = ' . DESTINATION_TYPE_STATE . ') AND (StateCountryId = ' . $country_id . ')
+ ORDER BY Name ASC';
+ $cache[$country_iso] = $this->Conn->GetCol($sql, 'IsoCode');
}
- $object->Fields[$state_field]['options'] = $country_states[$country_abbr];
- $object->Fields[$state_field]['options'][''] = '';
+ $field_options = $object->GetFieldOptions($state_field);
+
+ $field_options['options'] = $cache[$country_iso];
+ $field_options['options'][''] = '';
+
+ $object->SetFieldOptions($state_field, $field_options);
}
/**
- * Returns valid state code for state name and country code passed
+ * Returns valid state ISO code for state name and country code passed
*
* @param string $state_name
- * @param string $country_code
+ * @param string $country_iso
* @return string
*/
- function CheckState($state_name, $country_code)
+ function getStateIso($state_name, $country_iso)
{
- if (!$this->CountryHasStates($country_code)) {
+ if (!$this->CountryHasStates($country_iso)) {
return $state_name;
}
- $sql = 'SELECT sdStates.DestAbbr
- FROM '.TABLE_PREFIX.'StdDestinations AS sdStates
- LEFT JOIN '.TABLE_PREFIX.'Phrase AS p ON p.Phrase = sdStates.DestName
- LEFT JOIN '.TABLE_PREFIX.'StdDestinations AS sdCountries ON sdStates.DestParentId = sdCountries.DestId
- WHERE (sdStates.DestType = 2) AND
- (sdStates.DestParentId = sdCountries.DestId) AND
- (sdCountries.DestAbbr = %2$s) AND
- (
- (LOWER(sdStates.DestAbbr) = %3$s) OR (LOWER(sdStates.DestAbbr2) = %3$s) OR (LOWER(sdStates.DestName) = %3$s) OR (LOWER(p.l%1$s_Translation) = %3$s)
- )';
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+ $country_id = $this->getCountryStateId($country_iso, DESTINATION_TYPE_COUNTRY);
- $state_name = trim( mb_strtolower($state_name) );
+ $sql = 'SELECT IsoCode
+ FROM ' . $table_name . '
+ WHERE (Type = ' . DESTINATION_TYPE_STATE . ') AND (StateCountryId = %2$s) AND
+ (
+ (IsoCode = %3$s) OR (UPPER(l%1$s_Name) = %3$s)
+ )';
- $sql = sprintf($sql, (int)$this->Application->GetVar('m_lang'), $this->Conn->qstr($country_code), $this->Conn->qstr($state_name) );
+ $state_name = trim( mb_strtoupper($state_name) );
+ $sql = sprintf($sql, (int)$this->Application->GetVar('m_lang'), $country_id, $this->Conn->qstr($state_name));
return $this->Conn->GetOne($sql);
}
- function CheckStateField(&$event, $state_field, $country_field)
+ function CheckStateField(&$event, $state_field, $country_field, $auto_required = true)
{
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- if($items_info)
- {
- list($id, $field_values) = each($items_info);
- if( isset($field_values[$state_field]) && isset($field_values[$country_field]) )
- {
- $user_state = getArrayValue($field_values,$state_field);
- $valid_state = $this->CheckState($user_state, getArrayValue($field_values,$country_field) );
- if($valid_state !== false)
- {
- $field_values[$state_field] = $valid_state;
- $items_info[$id] = $field_values;
- $this->Application->SetVar( $event->getPrefixSpecial(true), $items_info);
- }
- else
- {
- $object =& $event->getObject();
- $object->Fields[$state_field]['options'][$user_state] = $user_state;
- $object->SetError($state_field, 'invalid_state', 'la_invalid_state');
- }
+ $country_iso = $object->GetDBField($country_field);
+
+ if ($auto_required) {
+ $object->setRequired($state_field, $this->CountryHasStates($country_iso));
+ }
+
+ $state = $object->GetDBField($state_field);
+
+ if ($country_iso && $state) {
+ $state_iso = $this->getStateIso($state, $country_iso);
+
+ if ($state_iso !== false) {
+ // replace state name with it's ISO code
+ $object->SetDBField($state_field, $state_iso);
}
+ else {
+ // state not found by name -> report error
+ $object->SetError($state_field, 'invalid_state', 'la_invalid_state');
+ }
}
}
+
+ /**
+ * Returns country/state id based on given iso code and it's type
+ *
+ * @param string $iso_code
+ * @param int $type
+ * @return int
+ */
+ function getCountryStateId($iso_code, $type)
+ {
+ $sql = 'SELECT ' . $this->Application->getUnitOption('country-state', 'IDField') . '
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE (Type = ' . $type . ') AND (IsoCode = ' . $this->Conn->qstr($iso_code) . ')';
+
+ return (int)$this->Conn->GetOne($sql);
+ }
+
+ /**
+ * Returns 3 symbols ISO code from 2 symbols ISO code or otherwise, when $from_short parameter is used
+ *
+ * @param string $iso_code
+ * @param bool $from_short
+ * @return string
+ */
+ function getCountryIso($iso_code, $from_short = false)
+ {
+ if ($from_short) {
+ $sql = 'SELECT IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE ShortIsoCode = ' . $this->Conn->qstr($iso_code) . ' AND `Type` = ' . DESTINATION_TYPE_COUNTRY;
+ }
+ else {
+ $sql = 'SELECT ShortIsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE IsoCode = ' . $this->Conn->qstr($iso_code) . ' AND `Type` = ' . DESTINATION_TYPE_COUNTRY;
+ }
+
+ return $this->Conn->GetOne($sql);
+ }
}
\ No newline at end of file
Index: units/helpers/language_import_helper.php
===================================================================
--- units/helpers/language_import_helper.php (revision 13400)
+++ units/helpers/language_import_helper.php (working copy)
@@ -101,7 +101,7 @@
*
* @var int
*/
- var $_latestVersion = 2;
+ var $_latestVersion = 3;
/**
* Prefix-based serial numbers, that should be changed after import is finished
@@ -170,6 +170,7 @@
foreach ($this->_languages as $language_id) {
$this->_performUpgrade($language_id, 'phrases', 'PhraseKey', Array ('l%s_Translation'));
$this->_performUpgrade($language_id, 'emailevents', 'EventId', Array ('l%s_Subject', 'Headers', 'MessageType', 'l%s_Body'));
+ $this->_performUpgrade($language_id, 'country-state', 'CountryStateId', Array ('l%s_Name'));
}
$this->_initImportTables(true);
@@ -204,9 +205,7 @@
$phrase_types = explode('|', substr($phrase_types, 1, -1) );
$module_ids = explode('|', substr($module_ids, 1, -1) );
- $phrase_tpl = "\t\t\t".'<PHRASE Label="%s" Module="%s" Type="%s">%s</PHRASE>'."\n";
- $event_tpl = "\t\t\t".'<EVENT MessageType="%s" Event="%s" Type="%s">%s</EVENT>'."\n";
- $ret = '<LANGUAGES Version="' . $this->_latestVersion . '">'."\n";
+ $ret = '<LANGUAGES Version="' . $this->_latestVersion . '">' . "\n";
$export_fields = $this->_getExportFields();
@@ -235,11 +234,35 @@
$module_sql = preg_replace('/(.*),/U', 'INSTR(Module,\'\\1\') OR ', implode(',', $module_ids) . ',');
$sql = 'SELECT *
- FROM ' . $this->Application->getUnitOption('emailevents','TableName') . '
+ FROM ' . $this->Application->getUnitOption('emailevents', 'TableName') . '
WHERE ' . substr($module_sql, 0, -4) . '
ORDER BY `Event`, `Type`';
$events = $this->Conn->Query($sql, 'EventId');
+ // countries
+ $sql = 'SELECT *
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY `IsoCode`';
+ $countries = $this->Conn->Query($sql, 'CountryStateId');
+
+ // states
+ $sql = 'SELECT *
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE Type = ' . DESTINATION_TYPE_STATE . '
+ ORDER BY `IsoCode`';
+ $states = $this->Conn->Query($sql, 'CountryStateId');
+
+ foreach ($states as $state_id => $state_data) {
+ $country_id = $state_data['StateCountryId'];
+
+ if (!array_key_exists('States', $countries[$country_id])) {
+ $countries[$country_id]['States'] = Array ();
+ }
+
+ $countries[$country_id]['States'][] = $state_id;
+ }
+
foreach ($languages as $language_id => $language_info) {
// language
$ret .= "\t" . '<LANGUAGE Encoding="' . $this->_exportEncoding . '"';
@@ -251,11 +274,14 @@
$ret .= '>' . "\n";
// filename replacements
- $ret .= "\t\t" . '<REPLACEMENTS>';
$replacements = $language_info['FilenameReplacements'];
- $ret .= $this->_exportEncoding == 'base64' ? base64_encode($replacements) : '<![CDATA[' . $replacements . ']]>';
- $ret .= '</REPLACEMENTS>' . "\n";
+ if ($replacements) {
+ $ret .= "\t\t" . '<REPLACEMENTS>';
+ $ret .= $this->_exportEncoding == 'base64' ? base64_encode($replacements) : '<![CDATA[' . $replacements . ']]>';
+ $ret .= '</REPLACEMENTS>' . "\n";
+ }
+
// phrases
if ($phrases) {
$ret .= "\t\t" . '<PHRASES>' . "\n";
@@ -268,32 +294,74 @@
}
$data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : '<![CDATA[' . $translation . ']]>';
- $ret .= sprintf($phrase_tpl, $phrase['Phrase'], $phrase['Module'], $phrase['PhraseType'], $data);
+ $ret .= "\t\t\t" . '<PHRASE Label="' . $phrase['Phrase'] . '" Module="' . $phrase['Module'] . '" Type="' . $phrase['PhraseType'] . '">' . $data . '</PHRASE>' . "\n";
}
+
$ret .= "\t\t" . '</PHRASES>' . "\n";
}
// email events
- $ret .= "\t\t" . '<EVENTS>' . "\n";
+ if ($events) {
+ $ret .= "\t\t" . '<EVENTS>' . "\n";
- foreach ($events as $event_id => $event) {
- $fields_hash = Array (
- 'Headers' => $event['Headers'],
- 'Subject' => $event['l' . $language_id . '_Subject'],
- 'Body' => $event['l' . $language_id . '_Body'],
- );
+ foreach ($events as $event_id => $event) {
+ $fields_hash = Array (
+ 'Headers' => $event['Headers'],
+ 'Subject' => $event['l' . $language_id . '_Subject'],
+ 'Body' => $event['l' . $language_id . '_Body'],
+ );
- $template = $email_message_helper->buildTemplate($fields_hash);
+ $template = $email_message_helper->buildTemplate($fields_hash);
- if (!$template) {
- // email event is not translated on given language
- continue;
+ if (!$template) {
+ // email event is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($template) : '<![CDATA[' . $template . ']]>';
+ $ret .= "\t\t\t".'<EVENT MessageType="' . $event['MessageType'] . '" Event="' . $event['Event'] . '" Type="' . $event['Type'] . '">' . $data . '</EVENT>'."\n";
}
- $data = $this->_exportEncoding == 'base64' ? base64_encode($template) : '<![CDATA[' . $template . ']]>';
- $ret .= sprintf($event_tpl, $event['MessageType'], $event['Event'], $event['Type'], $data);
+ $ret .= "\t\t" . '</EVENTS>' . "\n";
}
- $ret .= "\t\t" . '</EVENTS>' . "\n";
+
+ if ($countries) {
+ $ret .= "\t\t" . '<COUNTRIES>' . "\n";
+ foreach ($countries as $country_id => $country_data) {
+ $translation = $country_data['l' . $language_id . '_Name'];
+
+ if (!$translation) {
+ // country is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
+
+ if (array_key_exists('States', $country_data)) {
+ $ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '">' . "\n";
+
+ foreach ($country_data['States'] as $state_id) {
+ $translation = $states[$state_id]['l' . $language_id . '_Name'];
+
+ if (!$translation) {
+ // state is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
+ $ret .= "\t\t\t\t" . '<STATE Iso="' . $states[$state_id]['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
+ }
+
+ $ret .= "\t\t\t" . '</COUNTRY>' . "\n";
+ }
+ else {
+ $ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
+ }
+ }
+
+ $ret .= "\t\t" . '</COUNTRIES>' . "\n";
+ }
+
$ret .= "\t" . '</LANGUAGE>' . "\n";
}
@@ -460,6 +528,7 @@
{
$this->_tables['phrases'] = $this->_prepareTempTable('phrases', $drop_only);
$this->_tables['emailevents'] = $this->_prepareTempTable('emailevents', $drop_only);
+ $this->_tables['country-state'] = $this->_prepareTempTable('country-state', $drop_only);
}
/**
@@ -483,7 +552,24 @@
$sql = 'ALTER TABLE %1$s CHANGE %2$s %2$s INT(11) NOT NULL DEFAULT "0"';
$this->Conn->Query( sprintf($sql, $temp_table, $idfield) );
- $unique_field = $prefix == 'phrases' ? 'PhraseKey' : 'EventId';
+ switch ($prefix) {
+ case 'phrases':
+ $unique_field = 'PhraseKey';
+ break;
+
+ case 'emailevents':
+ $unique_field = 'EventId';
+ break;
+
+ case 'country-state':
+ $unique_field = 'CountryStateId';
+ break;
+
+ default:
+ trigger_error('Unknown prefix "<strong>' . $prefix . '</strong>" during language pack import', E_USER_ERROR);
+ break;
+ }
+
$sql = 'ALTER TABLE ' . $temp_table . ' ADD UNIQUE (' . $unique_field . ')';
$this->Conn->Query($sql);
}
@@ -606,6 +692,16 @@
}
break;
+ case 'COUNTRIES':
+ if ($sub_node->Children) {
+ if (!$language_id) {
+ $language_id = $this->_processLanguage($fields_hash);
+ }
+
+ $this->_processCountries($sub_node->firstChild, $language_id, $fields_hash['Encoding']);
+ }
+ break;
+
case 'REPLACEMENTS':
// added since v2
$replacements = $sub_node->Data;
@@ -750,6 +846,58 @@
}
/**
+ * Performs country_state translation import
+ *
+ * @param kXMLNode $country_state_node
+ * @param int $language_id
+ * @param string $language_encoding
+ */
+ function _processCountries(&$country_state_node, $language_id, $language_encoding, $process_states = false)
+ {
+ static $other_translations = Array ();
+
+ do {
+ if ($process_states) {
+ $country_state_id = $this->_getStateId($country_state_node->Parent->Attributes['ISO'], $country_state_node->Attributes['ISO']);
+ }
+ else {
+ $country_state_id = $this->_getCountryId($country_state_node->Attributes['ISO']);
+ }
+
+ if ($country_state_id) {
+ if ($language_encoding == 'plain') {
+ $translation = rtrim($country_state_node->Attributes['TRANSLATION']);
+ }
+ else {
+ $translation = base64_decode($country_state_node->Attributes['TRANSLATION']);
+ }
+
+ $fields_hash = Array (
+ 'CountryStateId' => $country_state_id,
+ );
+
+ if (array_key_exists($country_state_id, $other_translations)) {
+ $other_translations[$country_state_id]['l' . $language_id . '_Name'] = $translation;
+ }
+ else {
+ $other_translations[$country_state_id] = Array (
+ 'l' . $language_id . '_Name' => $translation,
+ );
+ }
+
+ $fields_hash = array_merge($fields_hash, $other_translations[$country_state_id]);
+ $this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE', false);
+
+ if (!$process_states && $country_state_node->Children) {
+ $this->_processCountries($country_state_node->firstChild, $language_id, $language_encoding, true);
+ }
+ }
+ } while (($country_state_node =& $country_state_node->NextSibling()));
+
+ $this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE');
+ }
+
+ /**
* Creates/updates language based on given fields and returns it's id
*
* @param Array $fields_hash
@@ -809,4 +957,47 @@
return array_key_exists($cache_key, $this->events_hash) ? $this->events_hash[$cache_key] : 0;
}
+
+ /**
+ * Returns country id based on it's 3letter ISO code
+ *
+ * @param string $iso
+ * @return int
+ */
+ function _getCountryId($iso)
+ {
+ static $cache = null;
+
+ if (!isset($cache)) {
+ $sql = 'SELECT CountryStateId, IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY;
+ $cache = $this->Conn->GetCol($sql, 'IsoCode');
+ }
+
+ return array_key_exists($iso, $cache) ? $cache[$iso] : false;
+ }
+
+ /**
+ * Returns state id based on 3letter country ISO code and 2letter state ISO code
+ *
+ * @param string $country_iso
+ * @param string $state_iso
+ * @return int
+ */
+ function _getStateId($country_iso, $state_iso)
+ {
+ static $cache = null;
+
+ if (!isset($cache)) {
+ $sql = 'SELECT CountryStateId, CONCAT(StateCountryId, "-", IsoCode) AS IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_STATE;
+ $cache = $this->Conn->GetCol($sql, 'IsoCode');
+ }
+
+ $country_id = $this->_getCountryId($country_iso);
+
+ return array_key_exists($country_id . '-' . $state_iso, $cache) ? $cache[$country_id . '-' . $state_iso] : false;
+ }
}
\ No newline at end of file
Index: units/helpers/mod_rewrite_helper.php
===================================================================
--- units/helpers/mod_rewrite_helper.php (revision 13400)
+++ units/helpers/mod_rewrite_helper.php (working copy)
@@ -1009,7 +1009,8 @@
{
static $init_done = false;
- if ($init_done) {
+ if ($init_done || count($this->Application->RewriteListeners) == 0) {
+ // not inited OR mod-rewrite url with missing config cache
return ;
}
Index: units/users/users_config.php
===================================================================
--- units/users/users_config.php (revision 13432)
+++ units/users/users_config.php (working copy)
@@ -28,17 +28,6 @@
'ConfigPriority' => 0,
'Hooks' => Array (
Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'u',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnPrepareStates',
- ),
-
- Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'affil',
@@ -375,11 +364,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'default' => ''
),
'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
Index: units/users/users_event_handler.php
===================================================================
--- units/users/users_event_handler.php (revision 13432)
+++ units/users/users_event_handler.php (working copy)
@@ -551,23 +551,6 @@
}
/**
- * Prefill states dropdown with correct values
- *
- * @param kEvent $event
- * @access public
- */
- function OnPrepareStates(&$event)
- {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->PopulateStates($event, 'State', 'Country');
-
- $object =& $event->getObject();
-
- if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
- $object->setLogin();
- }
-
- /**
* Redirects user after succesfull registration to confirmation template (on Front only)
*
* @param kEvent $event
@@ -685,26 +668,32 @@
* Enter description here...
*
* @param kEvent $event
+ * @param bool $dry_run
* @return bool
*/
- function isSubscriberOnly(&$event)
+ function isSubscriberOnly(&$event, $dry_run = false)
{
$event->CallSubEvent('OnSubstituteSubscriber');
- $is_subscriber = false;
- if( $event->getEventParam('is_subscriber_only') )
- {
- $is_subscriber = true;
+ $is_subscriber = $event->getEventParam('is_subscriber_only');
+
+ if ($dry_run) {
+ return $is_subscriber;
+ }
+
+ if ($is_subscriber) {
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->OnUpdate($event);
- if($event->status == erSUCCESS)
- {
+
+ if ($event->status == erSUCCESS) {
$this->OnAfterItemCreate($event);
$object->SendEmailEvents();
- if (!$this->Application->isAdmin && ($event->status == erSUCCESS) && $event->redirect) {
+
+ if (!$this->Application->isAdmin && $event->redirect) {
$this->autoLoginUser($event);
}
}
}
+
return $is_subscriber;
}
@@ -720,9 +709,6 @@
}
if (!$this->isSubscriberOnly($event)) {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->CheckStateField($event, 'State', 'Country');
-
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
if ($this->Application->ConfigValue('User_Password_Auto')) {
@@ -786,18 +772,33 @@
*/
function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if (!$this->isSubscriberOnly($event, true)) {
+ $cs_helper->CheckStateField($event, 'State', 'Country');
+ }
+
$this->_makePasswordRequired($event);
+ $cs_helper->PopulateStates($event, 'State', 'Country');
- $email_as_login = $this->Application->ConfigValue('Email_As_Login');
$object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ( $this->Application->ConfigValue('Email_As_Login') ) {
+ $field_options = $object->GetFieldOptions('Email');
+ $field_options['error_msgs']['unique'] = $this->Application->Phrase('lu_user_and_email_already_exist');
+ $object->SetFieldOptions('Email', $field_options);
+ }
+
+ $object->setLogin();
+
if (!$this->checkBanRules($object)) {
$event->status = erFAIL;
- return false;
+ return ;
}
- if ($email_as_login) {
- $object->Fields['Email']['error_msgs']['unique'] = $this->Application->Phrase('lu_user_and_email_already_exist');
- }
-
}
/**
@@ -885,15 +886,23 @@
$object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- if($items_info)
- {
- list($id,$field_values) = each($items_info);
- if($id > 0) $object->Load($id);
+
+ if ($items_info) {
+ list ($id, $field_values) = each($items_info);
+ if ($id > 0) {
+ $object->Load($id);
+ }
+
$object->SetFieldsFromHash($field_values);
$object->setID($id);
$object->Validate();
}
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'State', 'Country');
+
$event->redirect = false;
}
@@ -1190,12 +1199,30 @@
function OnUpdate(&$event)
{
+ parent::OnUpdate($event);
+
+ $this->setNextTemplate($event);
+ }
+
+ /**
+ * Checks state against country
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->CheckStateField($event, 'State', 'Country');
+ $cs_helper->PopulateStates($event, 'State', 'Country');
- parent::OnUpdate($event);
+ $object =& $event->getObject();
+ /* @var $object UsersItem */
- $this->setNextTemplate($event);
+ $object->setLogin();
}
/**
@@ -1599,7 +1626,7 @@
if ($first_country) {
// update user country dropdown sql
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
- $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (DestId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']);
+ $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (CountryStateId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']);
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
}
@@ -1785,6 +1812,11 @@
/* @var $object kDBItem */
$image_helper->LoadItemImages($object);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'State', 'Country');
}
/**
country_state_refactoring_core_v3.patch [^] (164,567 bytes) 2010-04-27 14:24
[Show Content]
Index: admin_templates/country_states/country_state_edit.tpl
===================================================================
--- admin_templates/country_states/country_state_edit.tpl (revision 0)
+++ admin_templates/country_states/country_state_edit.tpl (revision 0)
@@ -0,0 +1,87 @@
+<inp2:adm_SetPopupSize width="550" height="400"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:country_states" prefix="country-state" title_preset="country_state_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('country-state', '<inp2:country-state_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ cancel_edit('country-state', 'OnCancelEdit','<inp2:country-state_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+ reset_form('country-state', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('country-state', '<inp2:country-state_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('country-state', '<inp2:country-state_NextId/>');
+ }
+ ) );
+
+
+
+ a_toolbar.Render();
+
+ <inp2:m_if check="country-state_IsSingle" >
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <inp2:m_else/>
+ <inp2:m_if check="country-state_IsLast" >
+ a_toolbar.DisableButton('next');
+ </inp2:m_if>
+ <inp2:m_if check="country-state_IsFirst" >
+ a_toolbar.DisableButton('prev');
+ </inp2:m_if>
+ </inp2:m_if>
+ </script>
+ </td>
+
+ <inp2:m_RenderElement name="ml_selector" prefix="country-state"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:country-state_SaveWarning name="grid_save_warning"/>
+<inp2:country-state_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="inp_id_label" prefix="country-state" field="CountryStateId" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="country-state" field="Type" title="la_fld_Type" onclick="reflectStateCountry();"/>
+ <inp2:m_RenderElement name="inp_edit_box_ml" prefix="country-state" field="Name" title="la_fld_Name"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="country-state" field="StateCountryId" title="la_fld_StateCountry" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="country-state" field="IsoCode" title="la_fld_IsoCode"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="country-state" field="ShortIsoCode" title="la_fld_ShortIsoCode"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<script type="text/javascript">
+ var $field_mask = '<inp2:country-state_InputName field="#FIELD_NAME#" js_escape="1"/>';
+
+ function reflectStateCountry() {
+ get_control($field_mask, 'StateCountryId').disabled = !get_control($field_mask, 'Type', '2').checked;
+ }
+
+ reflectStateCountry();
+</script>
+
+<inp2:m_include t="incs/footer"/>
Index: admin_templates/country_states/country_state_list.tpl
===================================================================
--- admin_templates/country_states/country_state_list.tpl (revision 0)
+++ admin_templates/country_states/country_state_list.tpl (revision 0)
@@ -0,0 +1,48 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:country_states" prefix="country-state" title_preset="country_state_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ //do not rename - this function is used in default grid for double click!
+ function edit()
+ {
+ std_edit_item('country-state', 'country_states/country_state_edit');
+ }
+
+ var a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewCountryState" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('country-state', 'country_states/country_state_edit');
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('country-state')
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="country-state" grid="Default"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="country-state" IdField="CountryStateId" grid="Default"/>
+<script type="text/javascript">
+ Grids['country-state'].SetDependantToolbarButtons( new Array('edit','delete') );
+</script>
+<inp2:m_include t="incs/footer"/>
Index: admin_templates/users/users_edit.tpl
===================================================================
--- admin_templates/users/users_edit.tpl (revision 13400)
+++ admin_templates/users/users_edit.tpl (working copy)
@@ -80,7 +80,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="City" title="la_fld_City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="State" title="la_fld_State"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Zip" title="la_fld_Zip"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Country" title="la_fld_Country" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="u" field="Country" title="la_fld_Country" has_empty="1"/>
<inp2:m_RenderElement name="subsection" prefix="u" fields="Status,CreatedOn" title="la_section_Properties"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="u" field="Status" title="la_fld_Status"/>
Index: install/english.lang
===================================================================
--- install/english.lang (revision 13400)
+++ install/english.lang (working copy)
@@ -1,5 +1,5 @@
-<LANGUAGES>
- <LANGUAGE PackName="English" Encoding="base64"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>utf-8</CHARSET><DOCS_URL>http://docs.in-portal.org/eng/index.php</DOCS_URL><UNITSYSTEM>2</UNITSYSTEM>
+<LANGUAGES Version="3">
+ <LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" TimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
<PHRASES>
<PHRASE Label="la_Active" Module="Core" Type="1">QWN0aXZl</PHRASE>
<PHRASE Label="la_Add" Module="Core" Type="1">QWRk</PHRASE>
@@ -172,8 +172,10 @@
<PHRASE Label="la_col_SessionEnd" Module="Core" Type="1">U2Vzc2lvbiBFbmQ=</PHRASE>
<PHRASE Label="la_col_SessionLogId" Module="Core" Type="1">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
<PHRASE Label="la_col_SessionStart" Module="Core" Type="1">U2Vzc2lvbiBTdGFydA==</PHRASE>
+ <PHRASE Label="la_col_ShortIsoCode" Module="Core" Type="1">U2hvcnQgSVNPIENvZGU=</PHRASE>
<PHRASE Label="la_col_SkinName" Module="Core" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_SortBy" Module="Core" Type="1">U29ydCBieQ==</PHRASE>
+ <PHRASE Label="la_col_StateCountry" Module="Core" Type="1">U3RhdGUgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_col_Status" Module="Core" Type="1">U3RhdHVz</PHRASE>
<PHRASE Label="la_col_StopWord" Module="Core" Type="1">U3RvcCBXb3Jk</PHRASE>
<PHRASE Label="la_col_Subject" Module="Core" Type="1">U3ViamVjdA==</PHRASE>
@@ -268,246 +270,6 @@
<PHRASE Label="la_config_YahooApplicationId" Module="Core" Type="1">WWFob28gQXBwbGljYXRpb25JZA==</PHRASE>
<PHRASE Label="la_ConfirmDeleteExportPreset" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSBzZWxlY3RlZCBFeHBvcnQgUHJlc2V0Pw==</PHRASE>
<PHRASE Label="la_confirm_maintenance" Module="Core" Type="1">VGhlIHNlY3Rpb24gdHJlZSBtdXN0IGJlIHVwZGF0ZWQgdG8gcmVmbGVjdCB0aGUgbGF0ZXN0IGNoYW5nZXM=</PHRASE>
- <PHRASE Label="la_country_ABW" Module="Core" Type="1">QXJ1YmE=</PHRASE>
- <PHRASE Label="la_country_AFG" Module="Core" Type="1">QWZnaGFuaXN0YW4=</PHRASE>
- <PHRASE Label="la_country_AGO" Module="Core" Type="1">QW5nb2xh</PHRASE>
- <PHRASE Label="la_country_AIA" Module="Core" Type="1">QW5ndWlsbGE=</PHRASE>
- <PHRASE Label="la_country_ALB" Module="Core" Type="1">QWxiYW5pYQ==</PHRASE>
- <PHRASE Label="la_country_AND" Module="Core" Type="1">QW5kb3JyYQ==</PHRASE>
- <PHRASE Label="la_country_ANT" Module="Core" Type="1">TmV0aGVybGFuZHMgQW50aWxsZXM=</PHRASE>
- <PHRASE Label="la_country_ARE" Module="Core" Type="1">VW5pdGVkIEFyYWIgRW1pcmF0ZXM=</PHRASE>
- <PHRASE Label="la_country_ARG" Module="Core" Type="1">QXJnZW50aW5h</PHRASE>
- <PHRASE Label="la_country_ARM" Module="Core" Type="1">QXJtZW5pYQ==</PHRASE>
- <PHRASE Label="la_country_ASM" Module="Core" Type="1">QW1lcmljYW4gc2Ftb2E=</PHRASE>
- <PHRASE Label="la_country_ATA" Module="Core" Type="1">QW50YXJjdGljYQ==</PHRASE>
- <PHRASE Label="la_country_ATF" Module="Core" Type="1">RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz</PHRASE>
- <PHRASE Label="la_country_ATG" Module="Core" Type="1">QW50aWd1YSBhbmQgYmFyYnVkYQ==</PHRASE>
- <PHRASE Label="la_country_AUS" Module="Core" Type="1">QXVzdHJhbGlh</PHRASE>
- <PHRASE Label="la_country_AUT" Module="Core" Type="1">QXVzdHJpYQ==</PHRASE>
- <PHRASE Label="la_country_AZE" Module="Core" Type="1">QXplcmJhaWphbg==</PHRASE>
- <PHRASE Label="la_country_BDI" Module="Core" Type="1">QnVydW5kaQ==</PHRASE>
- <PHRASE Label="la_country_BEL" Module="Core" Type="1">QmVsZ2l1bQ==</PHRASE>
- <PHRASE Label="la_country_BEN" Module="Core" Type="1">QmVuaW4=</PHRASE>
- <PHRASE Label="la_country_BFA" Module="Core" Type="1">QnVya2luYSBGYXNv</PHRASE>
- <PHRASE Label="la_country_BGD" Module="Core" Type="1">QmFuZ2xhZGVzaA==</PHRASE>
- <PHRASE Label="la_country_BGR" Module="Core" Type="1">QnVsZ2FyaWE=</PHRASE>
- <PHRASE Label="la_country_BHR" Module="Core" Type="1">QmFocmFpbg==</PHRASE>
- <PHRASE Label="la_country_BHS" Module="Core" Type="1">QmFoYW1hcw==</PHRASE>
- <PHRASE Label="la_country_BIH" Module="Core" Type="1">Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ==</PHRASE>
- <PHRASE Label="la_country_BLR" Module="Core" Type="1">QmVsYXJ1cw==</PHRASE>
- <PHRASE Label="la_country_BLZ" Module="Core" Type="1">QmVsaXpl</PHRASE>
- <PHRASE Label="la_country_BMU" Module="Core" Type="1">QmVybXVkYQ==</PHRASE>
- <PHRASE Label="la_country_BOL" Module="Core" Type="1">Qm9saXZpYQ==</PHRASE>
- <PHRASE Label="la_country_BRA" Module="Core" Type="1">QnJhemls</PHRASE>
- <PHRASE Label="la_country_BRB" Module="Core" Type="1">QmFyYmFkb3M=</PHRASE>
- <PHRASE Label="la_country_BRN" Module="Core" Type="1">QnJ1bmVpIERhcnVzc2FsYW0=</PHRASE>
- <PHRASE Label="la_country_BTN" Module="Core" Type="1">Qmh1dGFu</PHRASE>
- <PHRASE Label="la_country_BVT" Module="Core" Type="1">Qm91dmV0IElzbGFuZA==</PHRASE>
- <PHRASE Label="la_country_BWA" Module="Core" Type="1">Qm90c3dhbmE=</PHRASE>
- <PHRASE Label="la_country_CAF" Module="Core" Type="1">Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj</PHRASE>
- <PHRASE Label="la_country_CAN" Module="Core" Type="1">Q2FuYWRh</PHRASE>
- <PHRASE Label="la_country_CCK" Module="Core" Type="1">Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_CHE" Module="Core" Type="1">U3dpdHplcmxhbmQ=</PHRASE>
- <PHRASE Label="la_country_CHL" Module="Core" Type="1">Q2hpbGU=</PHRASE>
- <PHRASE Label="la_country_CHN" Module="Core" Type="1">Q2hpbmE=</PHRASE>
- <PHRASE Label="la_country_CIV" Module="Core" Type="1">Q290ZSBkJ0l2b2lyZQ==</PHRASE>
- <PHRASE Label="la_country_CMR" Module="Core" Type="1">Q2FtZXJvb24=</PHRASE>
- <PHRASE Label="la_country_COD" Module="Core" Type="1">Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk=</PHRASE>
- <PHRASE Label="la_country_COG" Module="Core" Type="1">Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m</PHRASE>
- <PHRASE Label="la_country_COK" Module="Core" Type="1">Q29vayBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_COL" Module="Core" Type="1">Q29sb21iaWE=</PHRASE>
- <PHRASE Label="la_country_COM" Module="Core" Type="1">Q29tb3Jvcw==</PHRASE>
- <PHRASE Label="la_country_CPV" Module="Core" Type="1">Q2FwZSBWZXJkZQ==</PHRASE>
- <PHRASE Label="la_country_CRI" Module="Core" Type="1">Q29zdGEgUmljYQ==</PHRASE>
- <PHRASE Label="la_country_CUB" Module="Core" Type="1">Q3ViYQ==</PHRASE>
- <PHRASE Label="la_country_CXR" Module="Core" Type="1">Q2hyaXN0bWFzIElzbGFuZA==</PHRASE>
- <PHRASE Label="la_country_CYM" Module="Core" Type="1">Q2F5bWFuIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_CYP" Module="Core" Type="1">Q3lwcnVz</PHRASE>
- <PHRASE Label="la_country_CZE" Module="Core" Type="1">Q3plY2ggUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_DEU" Module="Core" Type="1">R2VybWFueQ==</PHRASE>
- <PHRASE Label="la_country_DJI" Module="Core" Type="1">RGppYm91dGk=</PHRASE>
- <PHRASE Label="la_country_DMA" Module="Core" Type="1">RG9taW5pY2E=</PHRASE>
- <PHRASE Label="la_country_DNK" Module="Core" Type="1">RGVubWFyaw==</PHRASE>
- <PHRASE Label="la_country_DOM" Module="Core" Type="1">RG9taW5pY2FuIFJlcHVibGlj</PHRASE>
- <PHRASE Label="la_country_DZA" Module="Core" Type="1">QWxnZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_ECU" Module="Core" Type="1">RWN1YWRvcg==</PHRASE>
- <PHRASE Label="la_country_EGY" Module="Core" Type="1">RWd5cHQ=</PHRASE>
- <PHRASE Label="la_country_ERI" Module="Core" Type="1">RXJpdHJlYQ==</PHRASE>
- <PHRASE Label="la_country_ESH" Module="Core" Type="1">V2VzdGVybiBTYWhhcmE=</PHRASE>
- <PHRASE Label="la_country_ESP" Module="Core" Type="1">U3BhaW4=</PHRASE>
- <PHRASE Label="la_country_EST" Module="Core" Type="1">RXN0b25pYQ==</PHRASE>
- <PHRASE Label="la_country_ETH" Module="Core" Type="1">RXRoaW9waWE=</PHRASE>
- <PHRASE Label="la_country_FIN" Module="Core" Type="1">RmlubGFuZA==</PHRASE>
- <PHRASE Label="la_country_FJI" Module="Core" Type="1">RmlqaQ==</PHRASE>
- <PHRASE Label="la_country_FLK" Module="Core" Type="1">RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp</PHRASE>
- <PHRASE Label="la_country_FRA" Module="Core" Type="1">RnJhbmNl</PHRASE>
- <PHRASE Label="la_country_FRO" Module="Core" Type="1">RmFyb2UgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_FSM" Module="Core" Type="1">TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg==</PHRASE>
- <PHRASE Label="la_country_FXX" Module="Core" Type="1">RnJhbmNlLCBNZXRyb3BvbGl0YW4=</PHRASE>
- <PHRASE Label="la_country_GAB" Module="Core" Type="1">R2Fib24=</PHRASE>
- <PHRASE Label="la_country_GBR" Module="Core" Type="1">VW5pdGVkIEtpbmdkb20=</PHRASE>
- <PHRASE Label="la_country_GEO" Module="Core" Type="1">R2VvcmdpYQ==</PHRASE>
- <PHRASE Label="la_country_GHA" Module="Core" Type="1">R2hhbmE=</PHRASE>
- <PHRASE Label="la_country_GIB" Module="Core" Type="1">R2licmFsdGFy</PHRASE>
- <PHRASE Label="la_country_GIN" Module="Core" Type="1">R3VpbmVh</PHRASE>
- <PHRASE Label="la_country_GLP" Module="Core" Type="1">R3VhZGVsb3VwZQ==</PHRASE>
- <PHRASE Label="la_country_GMB" Module="Core" Type="1">R2FtYmlh</PHRASE>
- <PHRASE Label="la_country_GNB" Module="Core" Type="1">R3VpbmVhLUJpc3NhdQ==</PHRASE>
- <PHRASE Label="la_country_GNQ" Module="Core" Type="1">RXF1YXRvcmlhbCBHdWluZWE=</PHRASE>
- <PHRASE Label="la_country_GRC" Module="Core" Type="1">R3JlZWNl</PHRASE>
- <PHRASE Label="la_country_GRD" Module="Core" Type="1">R3JlbmFkYQ==</PHRASE>
- <PHRASE Label="la_country_GRL" Module="Core" Type="1">R3JlZW5sYW5k</PHRASE>
- <PHRASE Label="la_country_GTM" Module="Core" Type="1">R3VhdGVtYWxh</PHRASE>
- <PHRASE Label="la_country_GUF" Module="Core" Type="1">RnJlbmNoIEd1aWFuYQ==</PHRASE>
- <PHRASE Label="la_country_GUM" Module="Core" Type="1">R3VhbQ==</PHRASE>
- <PHRASE Label="la_country_GUY" Module="Core" Type="1">R3V5YW5h</PHRASE>
- <PHRASE Label="la_country_HKG" Module="Core" Type="1">SG9uZyBrb25n</PHRASE>
- <PHRASE Label="la_country_HMD" Module="Core" Type="1">SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_HND" Module="Core" Type="1">SG9uZHVyYXM=</PHRASE>
- <PHRASE Label="la_country_HRV" Module="Core" Type="1">Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep</PHRASE>
- <PHRASE Label="la_country_HTI" Module="Core" Type="1">SGFpdGk=</PHRASE>
- <PHRASE Label="la_country_HUN" Module="Core" Type="1">SHVuZ2FyeQ==</PHRASE>
- <PHRASE Label="la_country_IDN" Module="Core" Type="1">SW5kb25lc2lh</PHRASE>
- <PHRASE Label="la_country_IND" Module="Core" Type="1">SW5kaWE=</PHRASE>
- <PHRASE Label="la_country_IOT" Module="Core" Type="1">QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5</PHRASE>
- <PHRASE Label="la_country_IRL" Module="Core" Type="1">SXJlbGFuZA==</PHRASE>
- <PHRASE Label="la_country_IRN" Module="Core" Type="1">SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik=</PHRASE>
- <PHRASE Label="la_country_IRQ" Module="Core" Type="1">SXJhcQ==</PHRASE>
- <PHRASE Label="la_country_ISL" Module="Core" Type="1">SWNlbGFuZA==</PHRASE>
- <PHRASE Label="la_country_ISR" Module="Core" Type="1">SXNyYWVs</PHRASE>
- <PHRASE Label="la_country_ITA" Module="Core" Type="1">SXRhbHk=</PHRASE>
- <PHRASE Label="la_country_JAM" Module="Core" Type="1">SmFtYWljYQ==</PHRASE>
- <PHRASE Label="la_country_JOR" Module="Core" Type="1">Sm9yZGFu</PHRASE>
- <PHRASE Label="la_country_JPN" Module="Core" Type="1">SmFwYW4=</PHRASE>
- <PHRASE Label="la_country_KAZ" Module="Core" Type="1">S2F6YWtoc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_KEN" Module="Core" Type="1">S2VueWE=</PHRASE>
- <PHRASE Label="la_country_KGZ" Module="Core" Type="1">S3lyZ3l6c3Rhbg==</PHRASE>
- <PHRASE Label="la_country_KHM" Module="Core" Type="1">Q2FtYm9kaWE=</PHRASE>
- <PHRASE Label="la_country_KIR" Module="Core" Type="1">S2lyaWJhdGk=</PHRASE>
- <PHRASE Label="la_country_KNA" Module="Core" Type="1">U2FpbnQgS2l0dHMgYW5kIE5ldmlz</PHRASE>
- <PHRASE Label="la_country_KOR" Module="Core" Type="1">S29yZWEsIFJlcHVibGljIG9m</PHRASE>
- <PHRASE Label="la_country_KWT" Module="Core" Type="1">S3V3YWl0</PHRASE>
- <PHRASE Label="la_country_LAO" Module="Core" Type="1">TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_LBN" Module="Core" Type="1">TGViYW5vbg==</PHRASE>
- <PHRASE Label="la_country_LBR" Module="Core" Type="1">TGliZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_LBY" Module="Core" Type="1">TGlieWFuIEFyYWIgSmFtYWhpcml5YQ==</PHRASE>
- <PHRASE Label="la_country_LCA" Module="Core" Type="1">U2FpbnQgTHVjaWE=</PHRASE>
- <PHRASE Label="la_country_LIE" Module="Core" Type="1">TGllY2h0ZW5zdGVpbg==</PHRASE>
- <PHRASE Label="la_country_LKA" Module="Core" Type="1">U3JpIGxhbmth</PHRASE>
- <PHRASE Label="la_country_LSO" Module="Core" Type="1">TGVzb3Robw==</PHRASE>
- <PHRASE Label="la_country_LTU" Module="Core" Type="1">TGl0aHVhbmlh</PHRASE>
- <PHRASE Label="la_country_LUX" Module="Core" Type="1">THV4ZW1ib3VyZw==</PHRASE>
- <PHRASE Label="la_country_LVA" Module="Core" Type="1">TGF0dmlh</PHRASE>
- <PHRASE Label="la_country_MAC" Module="Core" Type="1">TWFjYXU=</PHRASE>
- <PHRASE Label="la_country_MAR" Module="Core" Type="1">TW9yb2Njbw==</PHRASE>
- <PHRASE Label="la_country_MCO" Module="Core" Type="1">TW9uYWNv</PHRASE>
- <PHRASE Label="la_country_MDA" Module="Core" Type="1">TW9sZG92YSwgUmVwdWJsaWMgb2Y=</PHRASE>
- <PHRASE Label="la_country_MDG" Module="Core" Type="1">TWFkYWdhc2Nhcg==</PHRASE>
- <PHRASE Label="la_country_MDV" Module="Core" Type="1">TWFsZGl2ZXM=</PHRASE>
- <PHRASE Label="la_country_MEX" Module="Core" Type="1">TWV4aWNv</PHRASE>
- <PHRASE Label="la_country_MHL" Module="Core" Type="1">TWFyc2hhbGwgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_MKD" Module="Core" Type="1">TWFjZWRvbmlh</PHRASE>
- <PHRASE Label="la_country_MLI" Module="Core" Type="1">TWFsaQ==</PHRASE>
- <PHRASE Label="la_country_MLT" Module="Core" Type="1">TWFsdGE=</PHRASE>
- <PHRASE Label="la_country_MMR" Module="Core" Type="1">TXlhbm1hcg==</PHRASE>
- <PHRASE Label="la_country_MNG" Module="Core" Type="1">TW9uZ29saWE=</PHRASE>
- <PHRASE Label="la_country_MNP" Module="Core" Type="1">Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_MOZ" Module="Core" Type="1">TW96YW1iaXF1ZQ==</PHRASE>
- <PHRASE Label="la_country_MRT" Module="Core" Type="1">TWF1cml0YW5pYQ==</PHRASE>
- <PHRASE Label="la_country_MSR" Module="Core" Type="1">TW9udHNlcnJhdA==</PHRASE>
- <PHRASE Label="la_country_MTQ" Module="Core" Type="1">TWFydGluaXF1ZQ==</PHRASE>
- <PHRASE Label="la_country_MUS" Module="Core" Type="1">TWF1cml0aXVz</PHRASE>
- <PHRASE Label="la_country_MWI" Module="Core" Type="1">TWFsYXdp</PHRASE>
- <PHRASE Label="la_country_MYS" Module="Core" Type="1">TWFsYXlzaWE=</PHRASE>
- <PHRASE Label="la_country_MYT" Module="Core" Type="1">TWF5b3R0ZQ==</PHRASE>
- <PHRASE Label="la_country_NAM" Module="Core" Type="1">TmFtaWJpYQ==</PHRASE>
- <PHRASE Label="la_country_NCL" Module="Core" Type="1">TmV3IENhbGVkb25pYQ==</PHRASE>
- <PHRASE Label="la_country_NER" Module="Core" Type="1">TmlnZXI=</PHRASE>
- <PHRASE Label="la_country_NFK" Module="Core" Type="1">Tm9yZm9sayBJc2xhbmQ=</PHRASE>
- <PHRASE Label="la_country_NGA" Module="Core" Type="1">TmlnZXJpYQ==</PHRASE>
- <PHRASE Label="la_country_NIC" Module="Core" Type="1">TmljYXJhZ3Vh</PHRASE>
- <PHRASE Label="la_country_NIU" Module="Core" Type="1">Tml1ZQ==</PHRASE>
- <PHRASE Label="la_country_NLD" Module="Core" Type="1">TmV0aGVybGFuZHM=</PHRASE>
- <PHRASE Label="la_country_NOR" Module="Core" Type="1">Tm9yd2F5</PHRASE>
- <PHRASE Label="la_country_NPL" Module="Core" Type="1">TmVwYWw=</PHRASE>
- <PHRASE Label="la_country_NRU" Module="Core" Type="1">TmF1cnU=</PHRASE>
- <PHRASE Label="la_country_NZL" Module="Core" Type="1">TmV3IFplYWxhbmQ=</PHRASE>
- <PHRASE Label="la_country_OMN" Module="Core" Type="1">T21hbg==</PHRASE>
- <PHRASE Label="la_country_PAK" Module="Core" Type="1">UGFraXN0YW4=</PHRASE>
- <PHRASE Label="la_country_PAN" Module="Core" Type="1">UGFuYW1h</PHRASE>
- <PHRASE Label="la_country_PCN" Module="Core" Type="1">UGl0Y2Fpcm4=</PHRASE>
- <PHRASE Label="la_country_PER" Module="Core" Type="1">UGVydQ==</PHRASE>
- <PHRASE Label="la_country_PHL" Module="Core" Type="1">UGhpbGlwcGluZXM=</PHRASE>
- <PHRASE Label="la_country_PLW" Module="Core" Type="1">UGFsYXU=</PHRASE>
- <PHRASE Label="la_country_PNG" Module="Core" Type="1">UGFwdWEgTmV3IEd1aW5lYQ==</PHRASE>
- <PHRASE Label="la_country_POL" Module="Core" Type="1">UG9sYW5k</PHRASE>
- <PHRASE Label="la_country_PRI" Module="Core" Type="1">UHVlcnRvIFJpY28=</PHRASE>
- <PHRASE Label="la_country_PRK" Module="Core" Type="1">S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y=</PHRASE>
- <PHRASE Label="la_country_PRT" Module="Core" Type="1">UG9ydHVnYWw=</PHRASE>
- <PHRASE Label="la_country_PRY" Module="Core" Type="1">UGFyYWd1YXk=</PHRASE>
- <PHRASE Label="la_country_PSE" Module="Core" Type="1">UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA==</PHRASE>
- <PHRASE Label="la_country_PYF" Module="Core" Type="1">RnJlbmNoIFBvbHluZXNpYQ==</PHRASE>
- <PHRASE Label="la_country_QAT" Module="Core" Type="1">UWF0YXI=</PHRASE>
- <PHRASE Label="la_country_REU" Module="Core" Type="1">UmV1bmlvbg==</PHRASE>
- <PHRASE Label="la_country_ROU" Module="Core" Type="1">Um9tYW5pYQ==</PHRASE>
- <PHRASE Label="la_country_RUS" Module="Core" Type="1">UnVzc2lhbiBGZWRlcmF0aW9u</PHRASE>
- <PHRASE Label="la_country_RWA" Module="Core" Type="1">UndhbmRh</PHRASE>
- <PHRASE Label="la_country_SAU" Module="Core" Type="1">U2F1ZGkgQXJhYmlh</PHRASE>
- <PHRASE Label="la_country_SDN" Module="Core" Type="1">U3VkYW4=</PHRASE>
- <PHRASE Label="la_country_SEN" Module="Core" Type="1">U2VuZWdhbA==</PHRASE>
- <PHRASE Label="la_country_SGP" Module="Core" Type="1">U2luZ2Fwb3Jl</PHRASE>
- <PHRASE Label="la_country_SGS" Module="Core" Type="1">U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM=</PHRASE>
- <PHRASE Label="la_country_SHN" Module="Core" Type="1">U3QuIGhlbGVuYQ==</PHRASE>
- <PHRASE Label="la_country_SJM" Module="Core" Type="1">U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_SLB" Module="Core" Type="1">U29sb21vbiBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_SLE" Module="Core" Type="1">U2llcnJhIExlb25l</PHRASE>
- <PHRASE Label="la_country_SLV" Module="Core" Type="1">RWwgU2FsdmFkb3I=</PHRASE>
- <PHRASE Label="la_country_SMR" Module="Core" Type="1">U2FuIE1hcmlubw==</PHRASE>
- <PHRASE Label="la_country_SOM" Module="Core" Type="1">U29tYWxpYQ==</PHRASE>
- <PHRASE Label="la_country_SPM" Module="Core" Type="1">U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24=</PHRASE>
- <PHRASE Label="la_country_STP" Module="Core" Type="1">U2FvIFRvbWUgYW5kIFByaW5jaXBl</PHRASE>
- <PHRASE Label="la_country_SUR" Module="Core" Type="1">U3VyaW5hbWU=</PHRASE>
- <PHRASE Label="la_country_SVK" Module="Core" Type="1">U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk=</PHRASE>
- <PHRASE Label="la_country_SVN" Module="Core" Type="1">U2xvdmVuaWE=</PHRASE>
- <PHRASE Label="la_country_SWE" Module="Core" Type="1">U3dlZGVu</PHRASE>
- <PHRASE Label="la_country_SWZ" Module="Core" Type="1">U3dhemlsYW5k</PHRASE>
- <PHRASE Label="la_country_SYC" Module="Core" Type="1">U2V5Y2hlbGxlcw==</PHRASE>
- <PHRASE Label="la_country_SYR" Module="Core" Type="1">U3lyaWFuIEFyYWIgUmVwdWJsaWM=</PHRASE>
- <PHRASE Label="la_country_TCA" Module="Core" Type="1">VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_TCD" Module="Core" Type="1">Q2hhZA==</PHRASE>
- <PHRASE Label="la_country_TGO" Module="Core" Type="1">VG9nbw==</PHRASE>
- <PHRASE Label="la_country_THA" Module="Core" Type="1">VGhhaWxhbmQ=</PHRASE>
- <PHRASE Label="la_country_TJK" Module="Core" Type="1">VGFqaWtpc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_TKL" Module="Core" Type="1">VG9rZWxhdQ==</PHRASE>
- <PHRASE Label="la_country_TKM" Module="Core" Type="1">VHVya21lbmlzdGFu</PHRASE>
- <PHRASE Label="la_country_TLS" Module="Core" Type="1">RWFzdCBUaW1vcg==</PHRASE>
- <PHRASE Label="la_country_TON" Module="Core" Type="1">VG9uZ2E=</PHRASE>
- <PHRASE Label="la_country_TTO" Module="Core" Type="1">VHJpbmlkYWQgYW5kIFRvYmFnbw==</PHRASE>
- <PHRASE Label="la_country_TUN" Module="Core" Type="1">VHVuaXNpYQ==</PHRASE>
- <PHRASE Label="la_country_TUR" Module="Core" Type="1">VHVya2V5</PHRASE>
- <PHRASE Label="la_country_TUV" Module="Core" Type="1">VHV2YWx1</PHRASE>
- <PHRASE Label="la_country_TWN" Module="Core" Type="1">VGFpd2Fu</PHRASE>
- <PHRASE Label="la_country_TZA" Module="Core" Type="1">VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg==</PHRASE>
- <PHRASE Label="la_country_UGA" Module="Core" Type="1">VWdhbmRh</PHRASE>
- <PHRASE Label="la_country_UKR" Module="Core" Type="1">VWtyYWluZQ==</PHRASE>
- <PHRASE Label="la_country_UMI" Module="Core" Type="1">VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz</PHRASE>
- <PHRASE Label="la_country_URY" Module="Core" Type="1">VXJ1Z3VheQ==</PHRASE>
- <PHRASE Label="la_country_USA" Module="Core" Type="1">VW5pdGVkIFN0YXRlcw==</PHRASE>
- <PHRASE Label="la_country_UZB" Module="Core" Type="1">VXpiZWtpc3Rhbg==</PHRASE>
- <PHRASE Label="la_country_VAT" Module="Core" Type="1">VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk=</PHRASE>
- <PHRASE Label="la_country_VCT" Module="Core" Type="1">U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM=</PHRASE>
- <PHRASE Label="la_country_VEN" Module="Core" Type="1">VmVuZXp1ZWxh</PHRASE>
- <PHRASE Label="la_country_VGB" Module="Core" Type="1">VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp</PHRASE>
- <PHRASE Label="la_country_VIR" Module="Core" Type="1">VmlyZ2luIElzbGFuZHMgKFUuUy4p</PHRASE>
- <PHRASE Label="la_country_VNM" Module="Core" Type="1">VmlldG5hbQ==</PHRASE>
- <PHRASE Label="la_country_VUT" Module="Core" Type="1">VmFudWF0dQ==</PHRASE>
- <PHRASE Label="la_country_WLF" Module="Core" Type="1">V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw==</PHRASE>
- <PHRASE Label="la_country_WSM" Module="Core" Type="1">U2Ftb2E=</PHRASE>
- <PHRASE Label="la_country_YEM" Module="Core" Type="1">WWVtZW4=</PHRASE>
- <PHRASE Label="la_country_YUG" Module="Core" Type="1">WXVnb3NsYXZpYQ==</PHRASE>
- <PHRASE Label="la_country_ZAF" Module="Core" Type="1">U291dGggQWZyaWNh</PHRASE>
- <PHRASE Label="la_country_ZMB" Module="Core" Type="1">WmFtYmlh</PHRASE>
- <PHRASE Label="la_country_ZWE" Module="Core" Type="1">WmltYmFid2U=</PHRASE>
<PHRASE Label="la_DataGrid1" Module="Core" Type="1">RGF0YSBHcmlkcw==</PHRASE>
<PHRASE Label="la_DataGrid2" Module="Core" Type="1">RGF0YSBHcmlkcyAy</PHRASE>
<PHRASE Label="la_days" Module="Core" Type="1">ZGF5cw==</PHRASE>
@@ -804,11 +566,13 @@
<PHRASE Label="la_fld_SentStatus" Module="Core" Type="1">U2VudA==</PHRASE>
<PHRASE Label="la_fld_Server" Module="Core" Type="1">U2VydmVy</PHRASE>
<PHRASE Label="la_fld_SessionLogId" Module="Core" Type="1">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
+ <PHRASE Label="la_fld_ShortIsoCode" Module="Core" Type="1">U2hvcnQgSVNPIENvZGU=</PHRASE>
<PHRASE Label="la_fld_SimpleSearch" Module="Core" Type="1">U2ltcGxlIFNlYXJjaA==</PHRASE>
<PHRASE Label="la_fld_SkinName" Module="Core" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SkipFirstRow" Module="Core" Type="1">U2tpcCBGaXJzdCBSb3c=</PHRASE>
<PHRASE Label="la_fld_SortValues" Module="Core" Type="1">U29ydCBWYWx1ZXM=</PHRASE>
<PHRASE Label="la_fld_State" Module="Core" Type="1">U3RhdGU=</PHRASE>
+ <PHRASE Label="la_fld_StateCountry" Module="Core" Type="1">U3RhdGUgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_fld_Status" Module="Core" Type="1">U3RhdHVz</PHRASE>
<PHRASE Label="la_fld_StopWord" Module="Core" Type="1">U3RvcCBXb3Jk</PHRASE>
<PHRASE Label="la_fld_StylesheetId" Module="Core" Type="1">U3R5bGVzaGVldCBJRA==</PHRASE>
@@ -933,6 +697,7 @@
<PHRASE Label="la_opt_Colon" Module="Core" Type="1">Q29sb24=</PHRASE>
<PHRASE Label="la_opt_Comma" Module="Core" Type="1">Q29tbWE=</PHRASE>
<PHRASE Label="la_opt_CommentText" Module="Core" Type="1">Q29tbWVudCBUZXh0</PHRASE>
+ <PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
@@ -1199,71 +964,6 @@
<PHRASE Label="la_Show" Module="Core" Type="1">U2hvdw==</PHRASE>
<PHRASE Label="la_SQLAffectedRows" Module="Core" Type="1">QWZmZWN0ZWQgcm93cw==</PHRASE>
<PHRASE Label="la_SQLRuntime" Module="Core" Type="1">RXhlY3V0ZWQgaW46</PHRASE>
- <PHRASE Label="la_state_AB" Module="Core" Type="1">QWxiZXJ0YQ==</PHRASE>
- <PHRASE Label="la_state_AK" Module="Core" Type="1">QWxhc2th</PHRASE>
- <PHRASE Label="la_state_AL" Module="Core" Type="1">QWxhYmFtYQ==</PHRASE>
- <PHRASE Label="la_state_AR" Module="Core" Type="1">QXJrYW5zYXM=</PHRASE>
- <PHRASE Label="la_state_AZ" Module="Core" Type="1">QXJpem9uYQ==</PHRASE>
- <PHRASE Label="la_state_BC" Module="Core" Type="1">QnJpdGlzaCBDb2x1bWJpYQ==</PHRASE>
- <PHRASE Label="la_state_CA" Module="Core" Type="1">Q2FsaWZvcm5pYQ==</PHRASE>
- <PHRASE Label="la_state_CO" Module="Core" Type="1">Q29sb3JhZG8=</PHRASE>
- <PHRASE Label="la_state_CT" Module="Core" Type="1">Q29ubmVjdGljdXQ=</PHRASE>
- <PHRASE Label="la_state_DC" Module="Core" Type="1">RGlzdHJpY3Qgb2YgQ29sdW1iaWE=</PHRASE>
- <PHRASE Label="la_state_DE" Module="Core" Type="1">RGVsYXdhcmU=</PHRASE>
- <PHRASE Label="la_state_FL" Module="Core" Type="1">RmxvcmlkYQ==</PHRASE>
- <PHRASE Label="la_state_GA" Module="Core" Type="1">R2VvcmdpYQ==</PHRASE>
- <PHRASE Label="la_state_HI" Module="Core" Type="1">SGF3YWlp</PHRASE>
- <PHRASE Label="la_state_IA" Module="Core" Type="1">SW93YQ==</PHRASE>
- <PHRASE Label="la_state_ID" Module="Core" Type="1">SWRhaG8=</PHRASE>
- <PHRASE Label="la_state_IL" Module="Core" Type="1">SWxsaW5vaXM=</PHRASE>
- <PHRASE Label="la_state_IN" Module="Core" Type="1">SW5kaWFuYQ==</PHRASE>
- <PHRASE Label="la_state_KS" Module="Core" Type="1">S2Fuc2Fz</PHRASE>
- <PHRASE Label="la_state_KY" Module="Core" Type="1">S2VudHVja3k=</PHRASE>
- <PHRASE Label="la_state_LA" Module="Core" Type="1">TG91aXNpYW5h</PHRASE>
- <PHRASE Label="la_state_MA" Module="Core" Type="1">TWFzc2FjaHVzZXR0cw==</PHRASE>
- <PHRASE Label="la_state_MB" Module="Core" Type="1">TWFuaXRvYmE=</PHRASE>
- <PHRASE Label="la_state_MD" Module="Core" Type="1">TWFyeWxhbmQ=</PHRASE>
- <PHRASE Label="la_state_ME" Module="Core" Type="1">TWFpbmU=</PHRASE>
- <PHRASE Label="la_state_MI" Module="Core" Type="1">TWljaGlnYW4=</PHRASE>
- <PHRASE Label="la_state_MN" Module="Core" Type="1">TWlubmVzb3Rh</PHRASE>
- <PHRASE Label="la_state_MO" Module="Core" Type="1">TWlzc291cmk=</PHRASE>
- <PHRASE Label="la_state_MS" Module="Core" Type="1">TWlzc2lzc2lwcGk=</PHRASE>
- <PHRASE Label="la_state_MT" Module="Core" Type="1">TW9udGFuYQ==</PHRASE>
- <PHRASE Label="la_state_NB" Module="Core" Type="1">TmV3IEJydW5zd2ljaw==</PHRASE>
- <PHRASE Label="la_state_NC" Module="Core" Type="1">Tm9ydGggQ2Fyb2xpbmE=</PHRASE>
- <PHRASE Label="la_state_ND" Module="Core" Type="1">Tm9ydGggRGFrb3Rh</PHRASE>
- <PHRASE Label="la_state_NE" Module="Core" Type="1">TmVicmFza2E=</PHRASE>
- <PHRASE Label="la_state_NH" Module="Core" Type="1">TmV3IEhhbXBzaGlyZQ==</PHRASE>
- <PHRASE Label="la_state_NJ" Module="Core" Type="1">TmV3IEplcnNleQ==</PHRASE>
- <PHRASE Label="la_state_NL" Module="Core" Type="1">TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg==</PHRASE>
- <PHRASE Label="la_state_NM" Module="Core" Type="1">TmV3IE1leGljbw==</PHRASE>
- <PHRASE Label="la_state_NS" Module="Core" Type="1">Tm92YSBTY290aWE=</PHRASE>
- <PHRASE Label="la_state_NT" Module="Core" Type="1">Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz</PHRASE>
- <PHRASE Label="la_state_NU" Module="Core" Type="1">TnVuYXZ1dA==</PHRASE>
- <PHRASE Label="la_state_NV" Module="Core" Type="1">TmV2YWRh</PHRASE>
- <PHRASE Label="la_state_NY" Module="Core" Type="1">TmV3IFlvcms=</PHRASE>
- <PHRASE Label="la_state_OH" Module="Core" Type="1">T2hpbw==</PHRASE>
- <PHRASE Label="la_state_OK" Module="Core" Type="1">T2tsYWhvbWE=</PHRASE>
- <PHRASE Label="la_state_ON" Module="Core" Type="1">T250YXJpbw==</PHRASE>
- <PHRASE Label="la_state_OR" Module="Core" Type="1">T3JlZ29u</PHRASE>
- <PHRASE Label="la_state_PA" Module="Core" Type="1">UGVubnN5bHZhbmlh</PHRASE>
- <PHRASE Label="la_state_PE" Module="Core" Type="1">UHJpbmNlIEVkd2FyZCBJc2xhbmQ=</PHRASE>
- <PHRASE Label="la_state_PR" Module="Core" Type="1">UHVlcnRvIFJpY28=</PHRASE>
- <PHRASE Label="la_state_QC" Module="Core" Type="1">UXVlYmVj</PHRASE>
- <PHRASE Label="la_state_RI" Module="Core" Type="1">UmhvZGUgSXNsYW5k</PHRASE>
- <PHRASE Label="la_state_SC" Module="Core" Type="1">U291dGggQ2Fyb2xpbmE=</PHRASE>
- <PHRASE Label="la_state_SD" Module="Core" Type="1">U291dGggRGFrb3Rh</PHRASE>
- <PHRASE Label="la_state_SK" Module="Core" Type="1">U2Fza2F0Y2hld2Fu</PHRASE>
- <PHRASE Label="la_state_TN" Module="Core" Type="1">VGVubmVzc2Vl</PHRASE>
- <PHRASE Label="la_state_TX" Module="Core" Type="1">VGV4YXM=</PHRASE>
- <PHRASE Label="la_state_UT" Module="Core" Type="1">VXRhaA==</PHRASE>
- <PHRASE Label="la_state_VA" Module="Core" Type="1">VmlyZ2luaWE=</PHRASE>
- <PHRASE Label="la_state_VT" Module="Core" Type="1">VmVybW9udA==</PHRASE>
- <PHRASE Label="la_state_WA" Module="Core" Type="1">V2FzaGluZ3Rvbg==</PHRASE>
- <PHRASE Label="la_state_WI" Module="Core" Type="1">V2lzY29uc2lu</PHRASE>
- <PHRASE Label="la_state_WV" Module="Core" Type="1">V2VzdCBWaXJnaW5pYQ==</PHRASE>
- <PHRASE Label="la_state_WY" Module="Core" Type="1">V3lvbWluZw==</PHRASE>
- <PHRASE Label="la_state_YT" Module="Core" Type="1">WXVrb24=</PHRASE>
<PHRASE Label="la_step" Module="Core" Type="1">U3RlcA==</PHRASE>
<PHRASE Label="la_StyleDefinition" Module="Core" Type="1">RGVmaW5pdGlvbg==</PHRASE>
<PHRASE Label="la_StylePreview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
@@ -1401,6 +1101,7 @@
<PHRASE Label="la_Text_View" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_title_AddingAgent" Module="Core" Type="1">QWRkaW5nIEFnZW50</PHRASE>
<PHRASE Label="la_title_AddingBanRule" Module="Core" Type="1">QWRkaW5nIEJhbiBSdWxl</PHRASE>
+ <PHRASE Label="la_title_AddingCountryState" Module="Core" Type="1">QWRkaW5nIENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_title_addingCustom" Module="Core" Type="1">QWRkaW5nIEN1c3RvbSBGaWVsZA==</PHRASE>
<PHRASE Label="la_title_AddingFile" Module="Core" Type="1">QWRkaW5nIEZpbGU=</PHRASE>
<PHRASE Label="la_title_AddingMailingList" Module="Core" Type="1">QWRkaW5nIE1haWxpbmcgTGlzdA==</PHRASE>
@@ -1440,12 +1141,14 @@
<PHRASE Label="la_title_ColumnPicker" Module="Core" Type="1">Q29sdW1uIFBpY2tlcg==</PHRASE>
<PHRASE Label="la_title_Configuration" Module="Core" Type="1">Q29uZmlndXJhdGlvbg==</PHRASE>
<PHRASE Label="la_Title_ContactInformation" Module="Core" Type="1">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
+ <PHRASE Label="la_title_CountryStates" Module="Core" Type="1">Q291bnRyaWVzICYgU3RhdGVz</PHRASE>
<PHRASE Label="la_title_CSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydA==</PHRASE>
<PHRASE Label="la_title_Custom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_title_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
<PHRASE Label="la_title_EditingAgent" Module="Core" Type="1">RWRpdGluZyBBZ2VudA==</PHRASE>
<PHRASE Label="la_title_EditingBanRule" Module="Core" Type="1">RWRpdGluZyBCYW4gUnVsZQ==</PHRASE>
<PHRASE Label="la_title_EditingChangeLog" Module="Core" Type="1">RWRpdGluZyBDaGFuZ2VzIExvZw==</PHRASE>
+ <PHRASE Label="la_title_EditingCountryState" Module="Core" Type="1">RWRpdGluZyBDb3VudHJ5L1N0YXRl</PHRASE>
<PHRASE Label="la_title_EditingEmailEvent" Module="Core" Type="1">RWRpdGluZyBFbWFpbCBFdmVudA==</PHRASE>
<PHRASE Label="la_title_EditingFile" Module="Core" Type="1">RWRpdGluZyBGaWxl</PHRASE>
<PHRASE Label="la_title_EditingMembership" Module="Core" Type="1">RWRpdGluZyBNZW1iZXJzaGlw</PHRASE>
@@ -1575,6 +1278,7 @@
<PHRASE Label="la_ToolTip_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</PHRASE>
<PHRASE Label="la_ToolTip_NewBaseStyle" Module="Core" Type="1">TmV3IEJhc2UgU3R5bGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewBlockStyle" Module="Core" Type="1">TmV3IEJsb2NrIFN0eWxl</PHRASE>
+ <PHRASE Label="la_ToolTip_NewCountryState" Module="Core" Type="1">TmV3IENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewGroup" Module="Core" Type="1">TmV3IEdyb3Vw</PHRASE>
<PHRASE Label="la_ToolTip_newlabel" Module="Core" Type="1">TmV3IGxhYmVs</PHRASE>
<PHRASE Label="la_ToolTip_NewLanguage" Module="Core" Type="1">TmV3IExhbmd1YWdl</PHRASE>
@@ -1760,5 +1464,314 @@
<EVENT MessageType="html" Event="USER.VALIDATE" Type="0">U3ViamVjdDogVXNlciBSZWdpc3RyYXRpb24gaXMgVmFsaWRhdGVkCgpXZWxjb21lIHRvIEluLXBvcnRhbCE8YnIvPjxici8+DQoNCllvdXIgdXNlciByZWdpc3RyYXRpb24gaGFzIGJlZW4gYXBwcm92ZWQuIFlvdSBjYW4gbG9naW4gbm93IDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVybC8+Ij48aW5wMjptX0Jhc2VVcmwvPjwvYT4gdXNpbmcgdGhlIGZvbGxvd2luZyBpbmZvcm1hdGlvbjo8YnIvPjxici8+DQoNCj09PT09PT09PT09PT09PT09PTxici8+DQpVc2VybmFtZTogIjxpbnAyOnVfRmllbGQgbmFtZT0iTG9naW4iLz4iPGJyLz4NClBhc3N3b3JkOiAiPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiI8YnIvPg0KPT09PT09PT09PT09PT09PT09PGJyLz48YnIvPg0K</EVENT>
<EVENT MessageType="html" Event="USER.VALIDATE" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uIGlzIFZhbGlkYXRlZAoKVXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgaGFzIGJlZW4gdmFsaWRhdGVkLg==</EVENT>
</EVENTS>
+ <COUNTRIES>
+ <COUNTRY Iso="ABW" Translation="QXJ1YmE="/>
+ <COUNTRY Iso="AFG" Translation="QWZnaGFuaXN0YW4="/>
+ <COUNTRY Iso="AGO" Translation="QW5nb2xh"/>
+ <COUNTRY Iso="AIA" Translation="QW5ndWlsbGE="/>
+ <COUNTRY Iso="ALB" Translation="QWxiYW5pYQ=="/>
+ <COUNTRY Iso="AND" Translation="QW5kb3JyYQ=="/>
+ <COUNTRY Iso="ANT" Translation="TmV0aGVybGFuZHMgQW50aWxsZXM="/>
+ <COUNTRY Iso="ARE" Translation="VW5pdGVkIEFyYWIgRW1pcmF0ZXM="/>
+ <COUNTRY Iso="ARG" Translation="QXJnZW50aW5h"/>
+ <COUNTRY Iso="ARM" Translation="QXJtZW5pYQ=="/>
+ <COUNTRY Iso="ASM" Translation="QW1lcmljYW4gc2Ftb2E="/>
+ <COUNTRY Iso="ATA" Translation="QW50YXJjdGljYQ=="/>
+ <COUNTRY Iso="ATF" Translation="RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz"/>
+ <COUNTRY Iso="ATG" Translation="QW50aWd1YSBhbmQgYmFyYnVkYQ=="/>
+ <COUNTRY Iso="AUS" Translation="QXVzdHJhbGlh"/>
+ <COUNTRY Iso="AUT" Translation="QXVzdHJpYQ=="/>
+ <COUNTRY Iso="AZE" Translation="QXplcmJhaWphbg=="/>
+ <COUNTRY Iso="BDI" Translation="QnVydW5kaQ=="/>
+ <COUNTRY Iso="BEL" Translation="QmVsZ2l1bQ=="/>
+ <COUNTRY Iso="BEN" Translation="QmVuaW4="/>
+ <COUNTRY Iso="BFA" Translation="QnVya2luYSBGYXNv"/>
+ <COUNTRY Iso="BGD" Translation="QmFuZ2xhZGVzaA=="/>
+ <COUNTRY Iso="BGR" Translation="QnVsZ2FyaWE="/>
+ <COUNTRY Iso="BHR" Translation="QmFocmFpbg=="/>
+ <COUNTRY Iso="BHS" Translation="QmFoYW1hcw=="/>
+ <COUNTRY Iso="BIH" Translation="Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ=="/>
+ <COUNTRY Iso="BLR" Translation="QmVsYXJ1cw=="/>
+ <COUNTRY Iso="BLZ" Translation="QmVsaXpl"/>
+ <COUNTRY Iso="BMU" Translation="QmVybXVkYQ=="/>
+ <COUNTRY Iso="BOL" Translation="Qm9saXZpYQ=="/>
+ <COUNTRY Iso="BRA" Translation="QnJhemls"/>
+ <COUNTRY Iso="BRB" Translation="QmFyYmFkb3M="/>
+ <COUNTRY Iso="BRN" Translation="QnJ1bmVpIERhcnVzc2FsYW0="/>
+ <COUNTRY Iso="BTN" Translation="Qmh1dGFu"/>
+ <COUNTRY Iso="BVT" Translation="Qm91dmV0IElzbGFuZA=="/>
+ <COUNTRY Iso="BWA" Translation="Qm90c3dhbmE="/>
+ <COUNTRY Iso="CAF" Translation="Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj"/>
+ <COUNTRY Iso="CAN" Translation="Q2FuYWRh">
+ <STATE Iso="AB" Translation="QWxiZXJ0YQ=="/>
+ <STATE Iso="BC" Translation="QnJpdGlzaCBDb2x1bWJpYQ=="/>
+ <STATE Iso="MB" Translation="TWFuaXRvYmE="/>
+ <STATE Iso="NB" Translation="TmV3IEJydW5zd2ljaw=="/>
+ <STATE Iso="NL" Translation="TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg=="/>
+ <STATE Iso="NS" Translation="Tm92YSBTY290aWE="/>
+ <STATE Iso="NT" Translation="Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz"/>
+ <STATE Iso="NU" Translation="TnVuYXZ1dA=="/>
+ <STATE Iso="ON" Translation="T250YXJpbw=="/>
+ <STATE Iso="PE" Translation="UHJpbmNlIEVkd2FyZCBJc2xhbmQ="/>
+ <STATE Iso="QC" Translation="UXVlYmVj"/>
+ <STATE Iso="SK" Translation="U2Fza2F0Y2hld2Fu"/>
+ <STATE Iso="YT" Translation="WXVrb24="/>
+ </COUNTRY>
+ <COUNTRY Iso="CCK" Translation="Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM="/>
+ <COUNTRY Iso="CHE" Translation="U3dpdHplcmxhbmQ="/>
+ <COUNTRY Iso="CHL" Translation="Q2hpbGU="/>
+ <COUNTRY Iso="CHN" Translation="Q2hpbmE="/>
+ <COUNTRY Iso="CIV" Translation="Q290ZSBkJ0l2b2lyZQ=="/>
+ <COUNTRY Iso="CMR" Translation="Q2FtZXJvb24="/>
+ <COUNTRY Iso="COD" Translation="Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk="/>
+ <COUNTRY Iso="COG" Translation="Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m"/>
+ <COUNTRY Iso="COK" Translation="Q29vayBJc2xhbmRz"/>
+ <COUNTRY Iso="COL" Translation="Q29sb21iaWE="/>
+ <COUNTRY Iso="COM" Translation="Q29tb3Jvcw=="/>
+ <COUNTRY Iso="CPV" Translation="Q2FwZSBWZXJkZQ=="/>
+ <COUNTRY Iso="CRI" Translation="Q29zdGEgUmljYQ=="/>
+ <COUNTRY Iso="CUB" Translation="Q3ViYQ=="/>
+ <COUNTRY Iso="CXR" Translation="Q2hyaXN0bWFzIElzbGFuZA=="/>
+ <COUNTRY Iso="CYM" Translation="Q2F5bWFuIElzbGFuZHM="/>
+ <COUNTRY Iso="CYP" Translation="Q3lwcnVz"/>
+ <COUNTRY Iso="CZE" Translation="Q3plY2ggUmVwdWJsaWM="/>
+ <COUNTRY Iso="DEU" Translation="R2VybWFueQ=="/>
+ <COUNTRY Iso="DJI" Translation="RGppYm91dGk="/>
+ <COUNTRY Iso="DMA" Translation="RG9taW5pY2E="/>
+ <COUNTRY Iso="DNK" Translation="RGVubWFyaw=="/>
+ <COUNTRY Iso="DOM" Translation="RG9taW5pY2FuIFJlcHVibGlj"/>
+ <COUNTRY Iso="DZA" Translation="QWxnZXJpYQ=="/>
+ <COUNTRY Iso="ECU" Translation="RWN1YWRvcg=="/>
+ <COUNTRY Iso="EGY" Translation="RWd5cHQ="/>
+ <COUNTRY Iso="ERI" Translation="RXJpdHJlYQ=="/>
+ <COUNTRY Iso="ESH" Translation="V2VzdGVybiBTYWhhcmE="/>
+ <COUNTRY Iso="ESP" Translation="U3BhaW4="/>
+ <COUNTRY Iso="EST" Translation="RXN0b25pYQ=="/>
+ <COUNTRY Iso="ETH" Translation="RXRoaW9waWE="/>
+ <COUNTRY Iso="FIN" Translation="RmlubGFuZA=="/>
+ <COUNTRY Iso="FJI" Translation="RmlqaQ=="/>
+ <COUNTRY Iso="FLK" Translation="RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp"/>
+ <COUNTRY Iso="FRA" Translation="RnJhbmNl"/>
+ <COUNTRY Iso="FRO" Translation="RmFyb2UgSXNsYW5kcw=="/>
+ <COUNTRY Iso="FSM" Translation="TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg=="/>
+ <COUNTRY Iso="FXX" Translation="RnJhbmNlLCBNZXRyb3BvbGl0YW4="/>
+ <COUNTRY Iso="GAB" Translation="R2Fib24="/>
+ <COUNTRY Iso="GBR" Translation="VW5pdGVkIEtpbmdkb20="/>
+ <COUNTRY Iso="GEO" Translation="R2VvcmdpYQ=="/>
+ <COUNTRY Iso="GHA" Translation="R2hhbmE="/>
+ <COUNTRY Iso="GIB" Translation="R2licmFsdGFy"/>
+ <COUNTRY Iso="GIN" Translation="R3VpbmVh"/>
+ <COUNTRY Iso="GLP" Translation="R3VhZGVsb3VwZQ=="/>
+ <COUNTRY Iso="GMB" Translation="R2FtYmlh"/>
+ <COUNTRY Iso="GNB" Translation="R3VpbmVhLUJpc3NhdQ=="/>
+ <COUNTRY Iso="GNQ" Translation="RXF1YXRvcmlhbCBHdWluZWE="/>
+ <COUNTRY Iso="GRC" Translation="R3JlZWNl"/>
+ <COUNTRY Iso="GRD" Translation="R3JlbmFkYQ=="/>
+ <COUNTRY Iso="GRL" Translation="R3JlZW5sYW5k"/>
+ <COUNTRY Iso="GTM" Translation="R3VhdGVtYWxh"/>
+ <COUNTRY Iso="GUF" Translation="RnJlbmNoIEd1aWFuYQ=="/>
+ <COUNTRY Iso="GUM" Translation="R3VhbQ=="/>
+ <COUNTRY Iso="GUY" Translation="R3V5YW5h"/>
+ <COUNTRY Iso="HKG" Translation="SG9uZyBrb25n"/>
+ <COUNTRY Iso="HMD" Translation="SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz"/>
+ <COUNTRY Iso="HND" Translation="SG9uZHVyYXM="/>
+ <COUNTRY Iso="HRV" Translation="Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep"/>
+ <COUNTRY Iso="HTI" Translation="SGFpdGk="/>
+ <COUNTRY Iso="HUN" Translation="SHVuZ2FyeQ=="/>
+ <COUNTRY Iso="IDN" Translation="SW5kb25lc2lh"/>
+ <COUNTRY Iso="IND" Translation="SW5kaWE="/>
+ <COUNTRY Iso="IOT" Translation="QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5"/>
+ <COUNTRY Iso="IRL" Translation="SXJlbGFuZA=="/>
+ <COUNTRY Iso="IRN" Translation="SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik="/>
+ <COUNTRY Iso="IRQ" Translation="SXJhcQ=="/>
+ <COUNTRY Iso="ISL" Translation="SWNlbGFuZA=="/>
+ <COUNTRY Iso="ISR" Translation="SXNyYWVs"/>
+ <COUNTRY Iso="ITA" Translation="SXRhbHk="/>
+ <COUNTRY Iso="JAM" Translation="SmFtYWljYQ=="/>
+ <COUNTRY Iso="JOR" Translation="Sm9yZGFu"/>
+ <COUNTRY Iso="JPN" Translation="SmFwYW4="/>
+ <COUNTRY Iso="KAZ" Translation="S2F6YWtoc3Rhbg=="/>
+ <COUNTRY Iso="KEN" Translation="S2VueWE="/>
+ <COUNTRY Iso="KGZ" Translation="S3lyZ3l6c3Rhbg=="/>
+ <COUNTRY Iso="KHM" Translation="Q2FtYm9kaWE="/>
+ <COUNTRY Iso="KIR" Translation="S2lyaWJhdGk="/>
+ <COUNTRY Iso="KNA" Translation="U2FpbnQgS2l0dHMgYW5kIE5ldmlz"/>
+ <COUNTRY Iso="KOR" Translation="S29yZWEsIFJlcHVibGljIG9m"/>
+ <COUNTRY Iso="KWT" Translation="S3V3YWl0"/>
+ <COUNTRY Iso="LAO" Translation="TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM="/>
+ <COUNTRY Iso="LBN" Translation="TGViYW5vbg=="/>
+ <COUNTRY Iso="LBR" Translation="TGliZXJpYQ=="/>
+ <COUNTRY Iso="LBY" Translation="TGlieWFuIEFyYWIgSmFtYWhpcml5YQ=="/>
+ <COUNTRY Iso="LCA" Translation="U2FpbnQgTHVjaWE="/>
+ <COUNTRY Iso="LIE" Translation="TGllY2h0ZW5zdGVpbg=="/>
+ <COUNTRY Iso="LKA" Translation="U3JpIGxhbmth"/>
+ <COUNTRY Iso="LSO" Translation="TGVzb3Robw=="/>
+ <COUNTRY Iso="LTU" Translation="TGl0aHVhbmlh"/>
+ <COUNTRY Iso="LUX" Translation="THV4ZW1ib3VyZw=="/>
+ <COUNTRY Iso="LVA" Translation="TGF0dmlh"/>
+ <COUNTRY Iso="MAC" Translation="TWFjYXU="/>
+ <COUNTRY Iso="MAR" Translation="TW9yb2Njbw=="/>
+ <COUNTRY Iso="MCO" Translation="TW9uYWNv"/>
+ <COUNTRY Iso="MDA" Translation="TW9sZG92YSwgUmVwdWJsaWMgb2Y="/>
+ <COUNTRY Iso="MDG" Translation="TWFkYWdhc2Nhcg=="/>
+ <COUNTRY Iso="MDV" Translation="TWFsZGl2ZXM="/>
+ <COUNTRY Iso="MEX" Translation="TWV4aWNv"/>
+ <COUNTRY Iso="MHL" Translation="TWFyc2hhbGwgSXNsYW5kcw=="/>
+ <COUNTRY Iso="MKD" Translation="TWFjZWRvbmlh"/>
+ <COUNTRY Iso="MLI" Translation="TWFsaQ=="/>
+ <COUNTRY Iso="MLT" Translation="TWFsdGE="/>
+ <COUNTRY Iso="MMR" Translation="TXlhbm1hcg=="/>
+ <COUNTRY Iso="MNG" Translation="TW9uZ29saWE="/>
+ <COUNTRY Iso="MNP" Translation="Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz"/>
+ <COUNTRY Iso="MOZ" Translation="TW96YW1iaXF1ZQ=="/>
+ <COUNTRY Iso="MRT" Translation="TWF1cml0YW5pYQ=="/>
+ <COUNTRY Iso="MSR" Translation="TW9udHNlcnJhdA=="/>
+ <COUNTRY Iso="MTQ" Translation="TWFydGluaXF1ZQ=="/>
+ <COUNTRY Iso="MUS" Translation="TWF1cml0aXVz"/>
+ <COUNTRY Iso="MWI" Translation="TWFsYXdp"/>
+ <COUNTRY Iso="MYS" Translation="TWFsYXlzaWE="/>
+ <COUNTRY Iso="MYT" Translation="TWF5b3R0ZQ=="/>
+ <COUNTRY Iso="NAM" Translation="TmFtaWJpYQ=="/>
+ <COUNTRY Iso="NCL" Translation="TmV3IENhbGVkb25pYQ=="/>
+ <COUNTRY Iso="NER" Translation="TmlnZXI="/>
+ <COUNTRY Iso="NFK" Translation="Tm9yZm9sayBJc2xhbmQ="/>
+ <COUNTRY Iso="NGA" Translation="TmlnZXJpYQ=="/>
+ <COUNTRY Iso="NIC" Translation="TmljYXJhZ3Vh"/>
+ <COUNTRY Iso="NIU" Translation="Tml1ZQ=="/>
+ <COUNTRY Iso="NLD" Translation="TmV0aGVybGFuZHM="/>
+ <COUNTRY Iso="NOR" Translation="Tm9yd2F5"/>
+ <COUNTRY Iso="NPL" Translation="TmVwYWw="/>
+ <COUNTRY Iso="NRU" Translation="TmF1cnU="/>
+ <COUNTRY Iso="NZL" Translation="TmV3IFplYWxhbmQ="/>
+ <COUNTRY Iso="OMN" Translation="T21hbg=="/>
+ <COUNTRY Iso="PAK" Translation="UGFraXN0YW4="/>
+ <COUNTRY Iso="PAN" Translation="UGFuYW1h"/>
+ <COUNTRY Iso="PCN" Translation="UGl0Y2Fpcm4="/>
+ <COUNTRY Iso="PER" Translation="UGVydQ=="/>
+ <COUNTRY Iso="PHL" Translation="UGhpbGlwcGluZXM="/>
+ <COUNTRY Iso="PLW" Translation="UGFsYXU="/>
+ <COUNTRY Iso="PNG" Translation="UGFwdWEgTmV3IEd1aW5lYQ=="/>
+ <COUNTRY Iso="POL" Translation="UG9sYW5k"/>
+ <COUNTRY Iso="PRI" Translation="UHVlcnRvIFJpY28="/>
+ <COUNTRY Iso="PRK" Translation="S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y="/>
+ <COUNTRY Iso="PRT" Translation="UG9ydHVnYWw="/>
+ <COUNTRY Iso="PRY" Translation="UGFyYWd1YXk="/>
+ <COUNTRY Iso="PSE" Translation="UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA=="/>
+ <COUNTRY Iso="PYF" Translation="RnJlbmNoIFBvbHluZXNpYQ=="/>
+ <COUNTRY Iso="QAT" Translation="UWF0YXI="/>
+ <COUNTRY Iso="REU" Translation="UmV1bmlvbg=="/>
+ <COUNTRY Iso="ROU" Translation="Um9tYW5pYQ=="/>
+ <COUNTRY Iso="RUS" Translation="UnVzc2lhbiBGZWRlcmF0aW9u"/>
+ <COUNTRY Iso="RWA" Translation="UndhbmRh"/>
+ <COUNTRY Iso="SAU" Translation="U2F1ZGkgQXJhYmlh"/>
+ <COUNTRY Iso="SDN" Translation="U3VkYW4="/>
+ <COUNTRY Iso="SEN" Translation="U2VuZWdhbA=="/>
+ <COUNTRY Iso="SGP" Translation="U2luZ2Fwb3Jl"/>
+ <COUNTRY Iso="SGS" Translation="U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM="/>
+ <COUNTRY Iso="SHN" Translation="U3QuIGhlbGVuYQ=="/>
+ <COUNTRY Iso="SJM" Translation="U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz"/>
+ <COUNTRY Iso="SLB" Translation="U29sb21vbiBJc2xhbmRz"/>
+ <COUNTRY Iso="SLE" Translation="U2llcnJhIExlb25l"/>
+ <COUNTRY Iso="SLV" Translation="RWwgU2FsdmFkb3I="/>
+ <COUNTRY Iso="SMR" Translation="U2FuIE1hcmlubw=="/>
+ <COUNTRY Iso="SOM" Translation="U29tYWxpYQ=="/>
+ <COUNTRY Iso="SPM" Translation="U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24="/>
+ <COUNTRY Iso="STP" Translation="U2FvIFRvbWUgYW5kIFByaW5jaXBl"/>
+ <COUNTRY Iso="SUR" Translation="U3VyaW5hbWU="/>
+ <COUNTRY Iso="SVK" Translation="U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk="/>
+ <COUNTRY Iso="SVN" Translation="U2xvdmVuaWE="/>
+ <COUNTRY Iso="SWE" Translation="U3dlZGVu"/>
+ <COUNTRY Iso="SWZ" Translation="U3dhemlsYW5k"/>
+ <COUNTRY Iso="SYC" Translation="U2V5Y2hlbGxlcw=="/>
+ <COUNTRY Iso="SYR" Translation="U3lyaWFuIEFyYWIgUmVwdWJsaWM="/>
+ <COUNTRY Iso="TCA" Translation="VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz"/>
+ <COUNTRY Iso="TCD" Translation="Q2hhZA=="/>
+ <COUNTRY Iso="TGO" Translation="VG9nbw=="/>
+ <COUNTRY Iso="THA" Translation="VGhhaWxhbmQ="/>
+ <COUNTRY Iso="TJK" Translation="VGFqaWtpc3Rhbg=="/>
+ <COUNTRY Iso="TKL" Translation="VG9rZWxhdQ=="/>
+ <COUNTRY Iso="TKM" Translation="VHVya21lbmlzdGFu"/>
+ <COUNTRY Iso="TLS" Translation="RWFzdCBUaW1vcg=="/>
+ <COUNTRY Iso="TON" Translation="VG9uZ2E="/>
+ <COUNTRY Iso="TTO" Translation="VHJpbmlkYWQgYW5kIFRvYmFnbw=="/>
+ <COUNTRY Iso="TUN" Translation="VHVuaXNpYQ=="/>
+ <COUNTRY Iso="TUR" Translation="VHVya2V5"/>
+ <COUNTRY Iso="TUV" Translation="VHV2YWx1"/>
+ <COUNTRY Iso="TWN" Translation="VGFpd2Fu"/>
+ <COUNTRY Iso="TZA" Translation="VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg=="/>
+ <COUNTRY Iso="UGA" Translation="VWdhbmRh"/>
+ <COUNTRY Iso="UKR" Translation="VWtyYWluZQ=="/>
+ <COUNTRY Iso="UMI" Translation="VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz"/>
+ <COUNTRY Iso="URY" Translation="VXJ1Z3VheQ=="/>
+ <COUNTRY Iso="USA" Translation="VW5pdGVkIFN0YXRlcw==">
+ <STATE Iso="AK" Translation="QWxhc2th"/>
+ <STATE Iso="AL" Translation="QWxhYmFtYQ=="/>
+ <STATE Iso="AR" Translation="QXJrYW5zYXM="/>
+ <STATE Iso="AZ" Translation="QXJpem9uYQ=="/>
+ <STATE Iso="CA" Translation="Q2FsaWZvcm5pYQ=="/>
+ <STATE Iso="CO" Translation="Q29sb3JhZG8="/>
+ <STATE Iso="CT" Translation="Q29ubmVjdGljdXQ="/>
+ <STATE Iso="DC" Translation="RGlzdHJpY3Qgb2YgQ29sdW1iaWE="/>
+ <STATE Iso="DE" Translation="RGVsYXdhcmU="/>
+ <STATE Iso="FL" Translation="RmxvcmlkYQ=="/>
+ <STATE Iso="GA" Translation="R2VvcmdpYQ=="/>
+ <STATE Iso="HI" Translation="SGF3YWlp"/>
+ <STATE Iso="IA" Translation="SW93YQ=="/>
+ <STATE Iso="ID" Translation="SWRhaG8="/>
+ <STATE Iso="IL" Translation="SWxsaW5vaXM="/>
+ <STATE Iso="IN" Translation="SW5kaWFuYQ=="/>
+ <STATE Iso="KS" Translation="S2Fuc2Fz"/>
+ <STATE Iso="KY" Translation="S2VudHVja3k="/>
+ <STATE Iso="LA" Translation="TG91aXNpYW5h"/>
+ <STATE Iso="MA" Translation="TWFzc2FjaHVzZXR0cw=="/>
+ <STATE Iso="MD" Translation="TWFyeWxhbmQ="/>
+ <STATE Iso="ME" Translation="TWFpbmU="/>
+ <STATE Iso="MI" Translation="TWljaGlnYW4="/>
+ <STATE Iso="MN" Translation="TWlubmVzb3Rh"/>
+ <STATE Iso="MO" Translation="TWlzc291cmk="/>
+ <STATE Iso="MS" Translation="TWlzc2lzc2lwcGk="/>
+ <STATE Iso="MT" Translation="TW9udGFuYQ=="/>
+ <STATE Iso="NC" Translation="Tm9ydGggQ2Fyb2xpbmE="/>
+ <STATE Iso="ND" Translation="Tm9ydGggRGFrb3Rh"/>
+ <STATE Iso="NE" Translation="TmVicmFza2E="/>
+ <STATE Iso="NH" Translation="TmV3IEhhbXBzaGlyZQ=="/>
+ <STATE Iso="NJ" Translation="TmV3IEplcnNleQ=="/>
+ <STATE Iso="NM" Translation="TmV3IE1leGljbw=="/>
+ <STATE Iso="NV" Translation="TmV2YWRh"/>
+ <STATE Iso="NY" Translation="TmV3IFlvcms="/>
+ <STATE Iso="OH" Translation="T2hpbw=="/>
+ <STATE Iso="OK" Translation="T2tsYWhvbWE="/>
+ <STATE Iso="OR" Translation="T3JlZ29u"/>
+ <STATE Iso="PA" Translation="UGVubnN5bHZhbmlh"/>
+ <STATE Iso="PR" Translation="UHVlcnRvIFJpY28="/>
+ <STATE Iso="RI" Translation="UmhvZGUgSXNsYW5k"/>
+ <STATE Iso="SC" Translation="U291dGggQ2Fyb2xpbmE="/>
+ <STATE Iso="SD" Translation="U291dGggRGFrb3Rh"/>
+ <STATE Iso="TN" Translation="VGVubmVzc2Vl"/>
+ <STATE Iso="TX" Translation="VGV4YXM="/>
+ <STATE Iso="UT" Translation="VXRhaA=="/>
+ <STATE Iso="VA" Translation="VmlyZ2luaWE="/>
+ <STATE Iso="VT" Translation="VmVybW9udA=="/>
+ <STATE Iso="WA" Translation="V2FzaGluZ3Rvbg=="/>
+ <STATE Iso="WI" Translation="V2lzY29uc2lu"/>
+ <STATE Iso="WV" Translation="V2VzdCBWaXJnaW5pYQ=="/>
+ <STATE Iso="WY" Translation="V3lvbWluZw=="/>
+ </COUNTRY>
+ <COUNTRY Iso="UZB" Translation="VXpiZWtpc3Rhbg=="/>
+ <COUNTRY Iso="VAT" Translation="VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk="/>
+ <COUNTRY Iso="VCT" Translation="U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM="/>
+ <COUNTRY Iso="VEN" Translation="VmVuZXp1ZWxh"/>
+ <COUNTRY Iso="VGB" Translation="VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp"/>
+ <COUNTRY Iso="VIR" Translation="VmlyZ2luIElzbGFuZHMgKFUuUy4p"/>
+ <COUNTRY Iso="VNM" Translation="VmlldG5hbQ=="/>
+ <COUNTRY Iso="VUT" Translation="VmFudWF0dQ=="/>
+ <COUNTRY Iso="WLF" Translation="V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw=="/>
+ <COUNTRY Iso="WSM" Translation="U2Ftb2E="/>
+ <COUNTRY Iso="YEM" Translation="WWVtZW4="/>
+ <COUNTRY Iso="YUG" Translation="WXVnb3NsYXZpYQ=="/>
+ <COUNTRY Iso="ZAF" Translation="U291dGggQWZyaWNh"/>
+ <COUNTRY Iso="ZMB" Translation="WmFtYmlh"/>
+ <COUNTRY Iso="ZWE" Translation="WmltYmFid2U="/>
+ </COUNTRIES>
</LANGUAGE>
</LANGUAGES>
\ No newline at end of file
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 13444)
+++ install/install_data.sql (working copy)
@@ -1,8 +1,8 @@
# Section "in-portal:configure_categories":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.01, 2, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.02, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.01, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.02, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category', '20', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage_prompt', 'text', '', '', 10.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category_Short', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage__short_prompt', 'text', '', '', 10.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_DaysNew', '8', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_daysnew_prompt', 'text', '', '', 10.05, 0, 1, NULL);
@@ -13,7 +13,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Catalog_PreselectModuleTab', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.1, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_RecycleBinFolder', 'text', NULL, NULL, 10.11, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL, NULL, 10.12, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_,-=+-', 10.13, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_||-=+-', 10.13, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.14, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_MinKeyword_Length', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.15, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_MetaKey', '', 'In-Portal', 'in-portal:configure_categories', 'la_Text_MetaInfo', 'la_category_metakey', 'textarea', '', '', 20.01, 0, 1, NULL);
@@ -21,12 +21,12 @@
# Section "in-portal:configure_general":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Site_Name', 'In-Portal CMS', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsWebsite', 'la_config_website_name', 'text', '', '', 10.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday,1=la_monday', 20.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.02, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.03, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday||1=la_monday', 20.01, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.02, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_AdminMailFrom', 'portal@user.domain.name', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsMailling', 'la_prompt_AdminMailFrom', 'text', NULL, 'size="40"', 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionTimeout', '3600', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsSession', 'la_prompt_session_timeout', 'text', 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}', '', 40.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple,advanced=+advanced,custom=+custom', 50.01, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple||advanced=+advanced||custom=+custom', 50.01, 0, 1, NULL);
# Section "in-portal:configure_advanced":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0, NULL);
@@ -39,7 +39,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.07, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_CheckStopWords', 'checkbox', '', '', 10.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.09, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString,1=lu_opt_Cookies,2=lu_opt_AutoDetect', 20.01, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString||1=lu_opt_Cookies||2=lu_opt_AutoDetect', 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_cookie_name', 'text', '', '', 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'KeepSessionOnBrowserClose', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_KeepSessionOnBrowserClose', 'checkbox', '', '', 20.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionBrowserSignatureCheck', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionBrowserSignatureCheck', 'checkbox', NULL, NULL, 20.04, 0, 1, NULL);
@@ -56,8 +56,8 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseToolbarLabels', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseToolbarLabels', 'checkbox', NULL, NULL, 40.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseSmallHeader', 'checkbox', '', '', 40.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseColumnFreezer', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseColumnFreezer', 'checkbox', '', '', 40.05, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePopups', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UsePopups', 'select', '', '0=la_opt_SameWindow,1=la_opt_PopupWindow,2=la_opt_ModalWindow', 40.06, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseDoubleSorting', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseDoubleSorting', 'radio', '', '1=la_Yes,0=la_No', 40.07, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePopups', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UsePopups', 'select', '', '0=la_opt_SameWindow||1=la_opt_PopupWindow||2=la_opt_ModalWindow', 40.06, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseDoubleSorting', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseDoubleSorting', 'radio', '', '1=la_Yes||0=la_No', 40.07, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MenuFrameWidth', '200', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_prompt_MenuFrameWidth', 'text', NULL, NULL, 40.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ResizableFrames', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_ResizableFrames', 'checkbox', '', '', 40.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_AutoRefreshIntervals', 'text', '', '', 40.1, 0, 0, NULL);
@@ -73,7 +73,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_User', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_user', 'text', NULL, NULL, 50.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Pass', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_pass', 'text', NULL, NULL, 50.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_DefaultHeaders', 'X-Mailer: In-Portal', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtpheaders', 'textarea', NULL, 'COLS=40 ROWS=5', 50.06, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailFunctionHeaderSeparator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux,2=la_Windows', 50.07, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailFunctionHeaderSeparator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux||2=la_Windows', 50.07, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListQueuePerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListQueuePerStep', 'text', NULL, NULL, 50.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListSendPerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListSendPerStep', 'text', NULL, NULL, 50.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseOutputCompression', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_UseOutputCompression', 'checkbox', '', '', 60.01, 0, 1, NULL);
@@ -85,15 +85,15 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Backup_Path', '/home/alex/web/in-portal.rc/system/backupdata', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_backup_path', 'text', '', '', 60.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SystemTagCache', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_syscache_enable', 'checkbox', NULL, NULL, 60.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SocketBlockingMode', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_socket_blocking_mode', 'checkbox', NULL, NULL, 60.09, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportDelimiter', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_opt_Tab,1=la_opt_Comma,2=la_opt_Semicolon,3=la_opt_Space,4=la_opt_Colon', 70.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes,1=la_Quotes', 70.02, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux,1=la_Windows', 70.03, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode,1=la_Regular', 70.04, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportDelimiter', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_opt_Tab||1=la_opt_Comma||2=la_opt_Semicolon||3=la_opt_Space||4=la_opt_Colon', 70.01, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes||1=la_Quotes', 70.02, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux||1=la_Windows', 70.03, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode||1=la_Regular', 70.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MemcacheServers', 'localhost:11211', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_MemcacheServers', 'text', NULL, '', 80.01, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None,Memcache=+Memcached,Apc=+Alternative PHP Cache,XCache=+XCache', 80.02, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None||Memcache=+Memcached||Apc=+Alternative PHP Cache||XCache=+XCache', 80.02, 0, 0, NULL);
# Section "in-portal:configure_users":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration,2=la_opt_UserNotAllowedRegistration,3=la_opt_UserUponApprovalRegistration,4=la_opt_UserEmailActivation', 10.01, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration||2=la_opt_UserNotAllowedRegistration||3=la_opt_UserUponApprovalRegistration||4=la_opt_UserEmailActivation', 10.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdvancedUserManagement', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_AdvancedUserManagement', 'checkbox', NULL, NULL, 10.011, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Email_As_Login', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_use_emails_as_login', 'checkbox', NULL, NULL, 10.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RegistrationCaptcha', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_registration_captcha', 'checkbox', NULL, NULL, 10.025, 0, 0, NULL);
@@ -102,11 +102,11 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_allow_reset', 'text', NULL, NULL, 10.05, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Password_Auto', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_password_auto', 'checkbox', '', '', 10.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_MembershipExpirationReminder', '10', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_MembershipExpirationReminder', 'text', NULL, '', 10.07, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none,<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Default_Registration_Country', NULL, 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>', 10.12, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 10.12, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowSelectGroupOnFront', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_AllowSelectGroupOnFront', 'checkbox', NULL, NULL, 10.13, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DefaultSettingsUserId', '-1', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_DefaultUserId', 'text', NULL, NULL, 10.14, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Votes_Deny', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_Text_Restrictions', 'la_users_votes_deny', 'text', '', '', 20.01, 0, 1, NULL);
@@ -172,311 +172,312 @@
INSERT INTO PortalGroup VALUES (14, 'Guest', 'Guest User', '0', 1, 0, 1, 0);
INSERT INTO PortalGroup VALUES (11, 'admin', '', '1054738405', 0, 0, 1, 0);
-INSERT INTO StdDestinations VALUES (1, 1, DEFAULT, 'la_country_AFG', 'AFG', 'AF');
-INSERT INTO StdDestinations VALUES (2, 1, DEFAULT, 'la_country_ALB', 'ALB', 'AL');
-INSERT INTO StdDestinations VALUES (3, 1, DEFAULT, 'la_country_DZA', 'DZA', 'DZ');
-INSERT INTO StdDestinations VALUES (4, 1, DEFAULT, 'la_country_ASM', 'ASM', 'AS');
-INSERT INTO StdDestinations VALUES (5, 1, DEFAULT, 'la_country_AND', 'AND', 'AD');
-INSERT INTO StdDestinations VALUES (6, 1, DEFAULT, 'la_country_AGO', 'AGO', 'AO');
-INSERT INTO StdDestinations VALUES (7, 1, DEFAULT, 'la_country_AIA', 'AIA', 'AI');
-INSERT INTO StdDestinations VALUES (8, 1, DEFAULT, 'la_country_ATA', 'ATA', 'AQ');
-INSERT INTO StdDestinations VALUES (9, 1, DEFAULT, 'la_country_ATG', 'ATG', 'AG');
-INSERT INTO StdDestinations VALUES (10, 1, DEFAULT, 'la_country_ARG', 'ARG', 'AR');
-INSERT INTO StdDestinations VALUES (11, 1, DEFAULT, 'la_country_ARM', 'ARM', 'AM');
-INSERT INTO StdDestinations VALUES (12, 1, DEFAULT, 'la_country_ABW', 'ABW', 'AW');
-INSERT INTO StdDestinations VALUES (13, 1, DEFAULT, 'la_country_AUS', 'AUS', 'AU');
-INSERT INTO StdDestinations VALUES (14, 1, DEFAULT, 'la_country_AUT', 'AUT', 'AT');
-INSERT INTO StdDestinations VALUES (15, 1, DEFAULT, 'la_country_AZE', 'AZE', 'AZ');
-INSERT INTO StdDestinations VALUES (16, 1, DEFAULT, 'la_country_BHS', 'BHS', 'BS');
-INSERT INTO StdDestinations VALUES (17, 1, DEFAULT, 'la_country_BHR', 'BHR', 'BH');
-INSERT INTO StdDestinations VALUES (18, 1, DEFAULT, 'la_country_BGD', 'BGD', 'BD');
-INSERT INTO StdDestinations VALUES (19, 1, DEFAULT, 'la_country_BRB', 'BRB', 'BB');
-INSERT INTO StdDestinations VALUES (20, 1, DEFAULT, 'la_country_BLR', 'BLR', 'BY');
-INSERT INTO StdDestinations VALUES (21, 1, DEFAULT, 'la_country_BEL', 'BEL', 'BE');
-INSERT INTO StdDestinations VALUES (22, 1, DEFAULT, 'la_country_BLZ', 'BLZ', 'BZ');
-INSERT INTO StdDestinations VALUES (23, 1, DEFAULT, 'la_country_BEN', 'BEN', 'BJ');
-INSERT INTO StdDestinations VALUES (24, 1, DEFAULT, 'la_country_BMU', 'BMU', 'BM');
-INSERT INTO StdDestinations VALUES (25, 1, DEFAULT, 'la_country_BTN', 'BTN', 'BT');
-INSERT INTO StdDestinations VALUES (26, 1, DEFAULT, 'la_country_BOL', 'BOL', 'BO');
-INSERT INTO StdDestinations VALUES (27, 1, DEFAULT, 'la_country_BIH', 'BIH', 'BA');
-INSERT INTO StdDestinations VALUES (28, 1, DEFAULT, 'la_country_BWA', 'BWA', 'BW');
-INSERT INTO StdDestinations VALUES (29, 1, DEFAULT, 'la_country_BVT', 'BVT', 'BV');
-INSERT INTO StdDestinations VALUES (30, 1, DEFAULT, 'la_country_BRA', 'BRA', 'BR');
-INSERT INTO StdDestinations VALUES (31, 1, DEFAULT, 'la_country_IOT', 'IOT', 'IO');
-INSERT INTO StdDestinations VALUES (32, 1, DEFAULT, 'la_country_BRN', 'BRN', 'BN');
-INSERT INTO StdDestinations VALUES (33, 1, DEFAULT, 'la_country_BGR', 'BGR', 'BG');
-INSERT INTO StdDestinations VALUES (34, 1, DEFAULT, 'la_country_BFA', 'BFA', 'BF');
-INSERT INTO StdDestinations VALUES (35, 1, DEFAULT, 'la_country_BDI', 'BDI', 'BI');
-INSERT INTO StdDestinations VALUES (36, 1, DEFAULT, 'la_country_KHM', 'KHM', 'KH');
-INSERT INTO StdDestinations VALUES (37, 1, DEFAULT, 'la_country_CMR', 'CMR', 'CM');
-INSERT INTO StdDestinations VALUES (38, 1, DEFAULT, 'la_country_CAN', 'CAN', 'CA');
-INSERT INTO StdDestinations VALUES (39, 1, DEFAULT, 'la_country_CPV', 'CPV', 'CV');
-INSERT INTO StdDestinations VALUES (40, 1, DEFAULT, 'la_country_CYM', 'CYM', 'KY');
-INSERT INTO StdDestinations VALUES (41, 1, DEFAULT, 'la_country_CAF', 'CAF', 'CF');
-INSERT INTO StdDestinations VALUES (42, 1, DEFAULT, 'la_country_TCD', 'TCD', 'TD');
-INSERT INTO StdDestinations VALUES (43, 1, DEFAULT, 'la_country_CHL', 'CHL', 'CL');
-INSERT INTO StdDestinations VALUES (44, 1, DEFAULT, 'la_country_CHN', 'CHN', 'CN');
-INSERT INTO StdDestinations VALUES (45, 1, DEFAULT, 'la_country_CXR', 'CXR', 'CX');
-INSERT INTO StdDestinations VALUES (46, 1, DEFAULT, 'la_country_CCK', 'CCK', 'CC');
-INSERT INTO StdDestinations VALUES (47, 1, DEFAULT, 'la_country_COL', 'COL', 'CO');
-INSERT INTO StdDestinations VALUES (48, 1, DEFAULT, 'la_country_COM', 'COM', 'KM');
-INSERT INTO StdDestinations VALUES (49, 1, DEFAULT, 'la_country_COD', 'COD', 'CD');
-INSERT INTO StdDestinations VALUES (50, 1, DEFAULT, 'la_country_COG', 'COG', 'CG');
-INSERT INTO StdDestinations VALUES (51, 1, DEFAULT, 'la_country_COK', 'COK', 'CK');
-INSERT INTO StdDestinations VALUES (52, 1, DEFAULT, 'la_country_CRI', 'CRI', 'CR');
-INSERT INTO StdDestinations VALUES (53, 1, DEFAULT, 'la_country_CIV', 'CIV', 'CI');
-INSERT INTO StdDestinations VALUES (54, 1, DEFAULT, 'la_country_HRV', 'HRV', 'HR');
-INSERT INTO StdDestinations VALUES (55, 1, DEFAULT, 'la_country_CUB', 'CUB', 'CU');
-INSERT INTO StdDestinations VALUES (56, 1, DEFAULT, 'la_country_CYP', 'CYP', 'CY');
-INSERT INTO StdDestinations VALUES (57, 1, DEFAULT, 'la_country_CZE', 'CZE', 'CZ');
-INSERT INTO StdDestinations VALUES (58, 1, DEFAULT, 'la_country_DNK', 'DNK', 'DK');
-INSERT INTO StdDestinations VALUES (59, 1, DEFAULT, 'la_country_DJI', 'DJI', 'DJ');
-INSERT INTO StdDestinations VALUES (60, 1, DEFAULT, 'la_country_DMA', 'DMA', 'DM');
-INSERT INTO StdDestinations VALUES (61, 1, DEFAULT, 'la_country_DOM', 'DOM', 'DO');
-INSERT INTO StdDestinations VALUES (62, 1, DEFAULT, 'la_country_TLS', 'TLS', 'TL');
-INSERT INTO StdDestinations VALUES (63, 1, DEFAULT, 'la_country_ECU', 'ECU', 'EC');
-INSERT INTO StdDestinations VALUES (64, 1, DEFAULT, 'la_country_EGY', 'EGY', 'EG');
-INSERT INTO StdDestinations VALUES (65, 1, DEFAULT, 'la_country_SLV', 'SLV', 'SV');
-INSERT INTO StdDestinations VALUES (66, 1, DEFAULT, 'la_country_GNQ', 'GNQ', 'GQ');
-INSERT INTO StdDestinations VALUES (67, 1, DEFAULT, 'la_country_ERI', 'ERI', 'ER');
-INSERT INTO StdDestinations VALUES (68, 1, DEFAULT, 'la_country_EST', 'EST', 'EE');
-INSERT INTO StdDestinations VALUES (69, 1, DEFAULT, 'la_country_ETH', 'ETH', 'ET');
-INSERT INTO StdDestinations VALUES (70, 1, DEFAULT, 'la_country_FLK', 'FLK', 'FK');
-INSERT INTO StdDestinations VALUES (71, 1, DEFAULT, 'la_country_FRO', 'FRO', 'FO');
-INSERT INTO StdDestinations VALUES (72, 1, DEFAULT, 'la_country_FJI', 'FJI', 'FJ');
-INSERT INTO StdDestinations VALUES (73, 1, DEFAULT, 'la_country_FIN', 'FIN', 'FI');
-INSERT INTO StdDestinations VALUES (74, 1, DEFAULT, 'la_country_FRA', 'FRA', 'FR');
-INSERT INTO StdDestinations VALUES (75, 1, DEFAULT, 'la_country_FXX', 'FXX', 'FX');
-INSERT INTO StdDestinations VALUES (76, 1, DEFAULT, 'la_country_GUF', 'GUF', 'GF');
-INSERT INTO StdDestinations VALUES (77, 1, DEFAULT, 'la_country_PYF', 'PYF', 'PF');
-INSERT INTO StdDestinations VALUES (78, 1, DEFAULT, 'la_country_ATF', 'ATF', 'TF');
-INSERT INTO StdDestinations VALUES (79, 1, DEFAULT, 'la_country_GAB', 'GAB', 'GA');
-INSERT INTO StdDestinations VALUES (80, 1, DEFAULT, 'la_country_GMB', 'GMB', 'GM');
-INSERT INTO StdDestinations VALUES (81, 1, DEFAULT, 'la_country_GEO', 'GEO', 'GE');
-INSERT INTO StdDestinations VALUES (82, 1, DEFAULT, 'la_country_DEU', 'DEU', 'DE');
-INSERT INTO StdDestinations VALUES (83, 1, DEFAULT, 'la_country_GHA', 'GHA', 'GH');
-INSERT INTO StdDestinations VALUES (84, 1, DEFAULT, 'la_country_GIB', 'GIB', 'GI');
-INSERT INTO StdDestinations VALUES (85, 1, DEFAULT, 'la_country_GRC', 'GRC', 'GR');
-INSERT INTO StdDestinations VALUES (86, 1, DEFAULT, 'la_country_GRL', 'GRL', 'GL');
-INSERT INTO StdDestinations VALUES (87, 1, DEFAULT, 'la_country_GRD', 'GRD', 'GD');
-INSERT INTO StdDestinations VALUES (88, 1, DEFAULT, 'la_country_GLP', 'GLP', 'GP');
-INSERT INTO StdDestinations VALUES (89, 1, DEFAULT, 'la_country_GUM', 'GUM', 'GU');
-INSERT INTO StdDestinations VALUES (90, 1, DEFAULT, 'la_country_GTM', 'GTM', 'GT');
-INSERT INTO StdDestinations VALUES (91, 1, DEFAULT, 'la_country_GIN', 'GIN', 'GN');
-INSERT INTO StdDestinations VALUES (92, 1, DEFAULT, 'la_country_GNB', 'GNB', 'GW');
-INSERT INTO StdDestinations VALUES (93, 1, DEFAULT, 'la_country_GUY', 'GUY', 'GY');
-INSERT INTO StdDestinations VALUES (94, 1, DEFAULT, 'la_country_HTI', 'HTI', 'HT');
-INSERT INTO StdDestinations VALUES (95, 1, DEFAULT, 'la_country_HMD', 'HMD', 'HM');
-INSERT INTO StdDestinations VALUES (96, 1, DEFAULT, 'la_country_HND', 'HND', 'HN');
-INSERT INTO StdDestinations VALUES (97, 1, DEFAULT, 'la_country_HKG', 'HKG', 'HK');
-INSERT INTO StdDestinations VALUES (98, 1, DEFAULT, 'la_country_HUN', 'HUN', 'HU');
-INSERT INTO StdDestinations VALUES (99, 1, DEFAULT, 'la_country_ISL', 'ISL', 'IS');
-INSERT INTO StdDestinations VALUES (100, 1, DEFAULT, 'la_country_IND', 'IND', 'IN');
-INSERT INTO StdDestinations VALUES (101, 1, DEFAULT, 'la_country_IDN', 'IDN', 'ID');
-INSERT INTO StdDestinations VALUES (102, 1, DEFAULT, 'la_country_IRN', 'IRN', 'IR');
-INSERT INTO StdDestinations VALUES (103, 1, DEFAULT, 'la_country_IRQ', 'IRQ', 'IQ');
-INSERT INTO StdDestinations VALUES (104, 1, DEFAULT, 'la_country_IRL', 'IRL', 'IE');
-INSERT INTO StdDestinations VALUES (105, 1, DEFAULT, 'la_country_ISR', 'ISR', 'IL');
-INSERT INTO StdDestinations VALUES (106, 1, DEFAULT, 'la_country_ITA', 'ITA', 'IT');
-INSERT INTO StdDestinations VALUES (107, 1, DEFAULT, 'la_country_JAM', 'JAM', 'JM');
-INSERT INTO StdDestinations VALUES (108, 1, DEFAULT, 'la_country_JPN', 'JPN', 'JP');
-INSERT INTO StdDestinations VALUES (109, 1, DEFAULT, 'la_country_JOR', 'JOR', 'JO');
-INSERT INTO StdDestinations VALUES (110, 1, DEFAULT, 'la_country_KAZ', 'KAZ', 'KZ');
-INSERT INTO StdDestinations VALUES (111, 1, DEFAULT, 'la_country_KEN', 'KEN', 'KE');
-INSERT INTO StdDestinations VALUES (112, 1, DEFAULT, 'la_country_KIR', 'KIR', 'KI');
-INSERT INTO StdDestinations VALUES (113, 1, DEFAULT, 'la_country_PRK', 'PRK', 'KP');
-INSERT INTO StdDestinations VALUES (114, 1, DEFAULT, 'la_country_KOR', 'KOR', 'KR');
-INSERT INTO StdDestinations VALUES (115, 1, DEFAULT, 'la_country_KWT', 'KWT', 'KW');
-INSERT INTO StdDestinations VALUES (116, 1, DEFAULT, 'la_country_KGZ', 'KGZ', 'KG');
-INSERT INTO StdDestinations VALUES (117, 1, DEFAULT, 'la_country_LAO', 'LAO', 'LA');
-INSERT INTO StdDestinations VALUES (118, 1, DEFAULT, 'la_country_LVA', 'LVA', 'LV');
-INSERT INTO StdDestinations VALUES (119, 1, DEFAULT, 'la_country_LBN', 'LBN', 'LB');
-INSERT INTO StdDestinations VALUES (120, 1, DEFAULT, 'la_country_LSO', 'LSO', 'LS');
-INSERT INTO StdDestinations VALUES (121, 1, DEFAULT, 'la_country_LBR', 'LBR', 'LR');
-INSERT INTO StdDestinations VALUES (122, 1, DEFAULT, 'la_country_LBY', 'LBY', 'LY');
-INSERT INTO StdDestinations VALUES (123, 1, DEFAULT, 'la_country_LIE', 'LIE', 'LI');
-INSERT INTO StdDestinations VALUES (124, 1, DEFAULT, 'la_country_LTU', 'LTU', 'LT');
-INSERT INTO StdDestinations VALUES (125, 1, DEFAULT, 'la_country_LUX', 'LUX', 'LU');
-INSERT INTO StdDestinations VALUES (126, 1, DEFAULT, 'la_country_MAC', 'MAC', 'MO');
-INSERT INTO StdDestinations VALUES (127, 1, DEFAULT, 'la_country_MKD', 'MKD', 'MK');
-INSERT INTO StdDestinations VALUES (128, 1, DEFAULT, 'la_country_MDG', 'MDG', 'MG');
-INSERT INTO StdDestinations VALUES (129, 1, DEFAULT, 'la_country_MWI', 'MWI', 'MW');
-INSERT INTO StdDestinations VALUES (130, 1, DEFAULT, 'la_country_MYS', 'MYS', 'MY');
-INSERT INTO StdDestinations VALUES (131, 1, DEFAULT, 'la_country_MDV', 'MDV', 'MV');
-INSERT INTO StdDestinations VALUES (132, 1, DEFAULT, 'la_country_MLI', 'MLI', 'ML');
-INSERT INTO StdDestinations VALUES (133, 1, DEFAULT, 'la_country_MLT', 'MLT', 'MT');
-INSERT INTO StdDestinations VALUES (134, 1, DEFAULT, 'la_country_MHL', 'MHL', 'MH');
-INSERT INTO StdDestinations VALUES (135, 1, DEFAULT, 'la_country_MTQ', 'MTQ', 'MQ');
-INSERT INTO StdDestinations VALUES (136, 1, DEFAULT, 'la_country_MRT', 'MRT', 'MR');
-INSERT INTO StdDestinations VALUES (137, 1, DEFAULT, 'la_country_MUS', 'MUS', 'MU');
-INSERT INTO StdDestinations VALUES (138, 1, DEFAULT, 'la_country_MYT', 'MYT', 'YT');
-INSERT INTO StdDestinations VALUES (139, 1, DEFAULT, 'la_country_MEX', 'MEX', 'MX');
-INSERT INTO StdDestinations VALUES (140, 1, DEFAULT, 'la_country_FSM', 'FSM', 'FM');
-INSERT INTO StdDestinations VALUES (141, 1, DEFAULT, 'la_country_MDA', 'MDA', 'MD');
-INSERT INTO StdDestinations VALUES (142, 1, DEFAULT, 'la_country_MCO', 'MCO', 'MC');
-INSERT INTO StdDestinations VALUES (143, 1, DEFAULT, 'la_country_MNG', 'MNG', 'MN');
-INSERT INTO StdDestinations VALUES (144, 1, DEFAULT, 'la_country_MSR', 'MSR', 'MS');
-INSERT INTO StdDestinations VALUES (145, 1, DEFAULT, 'la_country_MAR', 'MAR', 'MA');
-INSERT INTO StdDestinations VALUES (146, 1, DEFAULT, 'la_country_MOZ', 'MOZ', 'MZ');
-INSERT INTO StdDestinations VALUES (147, 1, DEFAULT, 'la_country_MMR', 'MMR', 'MM');
-INSERT INTO StdDestinations VALUES (148, 1, DEFAULT, 'la_country_NAM', 'NAM', 'NA');
-INSERT INTO StdDestinations VALUES (149, 1, DEFAULT, 'la_country_NRU', 'NRU', 'NR');
-INSERT INTO StdDestinations VALUES (150, 1, DEFAULT, 'la_country_NPL', 'NPL', 'NP');
-INSERT INTO StdDestinations VALUES (151, 1, DEFAULT, 'la_country_NLD', 'NLD', 'NL');
-INSERT INTO StdDestinations VALUES (152, 1, DEFAULT, 'la_country_ANT', 'ANT', 'AN');
-INSERT INTO StdDestinations VALUES (153, 1, DEFAULT, 'la_country_NCL', 'NCL', 'NC');
-INSERT INTO StdDestinations VALUES (154, 1, DEFAULT, 'la_country_NZL', 'NZL', 'NZ');
-INSERT INTO StdDestinations VALUES (155, 1, DEFAULT, 'la_country_NIC', 'NIC', 'NI');
-INSERT INTO StdDestinations VALUES (156, 1, DEFAULT, 'la_country_NER', 'NER', 'NE');
-INSERT INTO StdDestinations VALUES (157, 1, DEFAULT, 'la_country_NGA', 'NGA', 'NG');
-INSERT INTO StdDestinations VALUES (158, 1, DEFAULT, 'la_country_NIU', 'NIU', 'NU');
-INSERT INTO StdDestinations VALUES (159, 1, DEFAULT, 'la_country_NFK', 'NFK', 'NF');
-INSERT INTO StdDestinations VALUES (160, 1, DEFAULT, 'la_country_MNP', 'MNP', 'MP');
-INSERT INTO StdDestinations VALUES (161, 1, DEFAULT, 'la_country_NOR', 'NOR', 'NO');
-INSERT INTO StdDestinations VALUES (162, 1, DEFAULT, 'la_country_OMN', 'OMN', 'OM');
-INSERT INTO StdDestinations VALUES (163, 1, DEFAULT, 'la_country_PAK', 'PAK', 'PK');
-INSERT INTO StdDestinations VALUES (164, 1, DEFAULT, 'la_country_PLW', 'PLW', 'PW');
-INSERT INTO StdDestinations VALUES (165, 1, DEFAULT, 'la_country_PSE', 'PSE', 'PS');
-INSERT INTO StdDestinations VALUES (166, 1, DEFAULT, 'la_country_PAN', 'PAN', 'PA');
-INSERT INTO StdDestinations VALUES (167, 1, DEFAULT, 'la_country_PNG', 'PNG', 'PG');
-INSERT INTO StdDestinations VALUES (168, 1, DEFAULT, 'la_country_PRY', 'PRY', 'PY');
-INSERT INTO StdDestinations VALUES (169, 1, DEFAULT, 'la_country_PER', 'PER', 'PE');
-INSERT INTO StdDestinations VALUES (170, 1, DEFAULT, 'la_country_PHL', 'PHL', 'PH');
-INSERT INTO StdDestinations VALUES (171, 1, DEFAULT, 'la_country_PCN', 'PCN', 'PN');
-INSERT INTO StdDestinations VALUES (172, 1, DEFAULT, 'la_country_POL', 'POL', 'PL');
-INSERT INTO StdDestinations VALUES (173, 1, DEFAULT, 'la_country_PRT', 'PRT', 'PT');
-INSERT INTO StdDestinations VALUES (174, 1, DEFAULT, 'la_country_PRI', 'PRI', 'PR');
-INSERT INTO StdDestinations VALUES (175, 1, DEFAULT, 'la_country_QAT', 'QAT', 'QA');
-INSERT INTO StdDestinations VALUES (176, 1, DEFAULT, 'la_country_REU', 'REU', 'RE');
-INSERT INTO StdDestinations VALUES (177, 1, DEFAULT, 'la_country_ROU', 'ROU', 'RO');
-INSERT INTO StdDestinations VALUES (178, 1, DEFAULT, 'la_country_RUS', 'RUS', 'RU');
-INSERT INTO StdDestinations VALUES (179, 1, DEFAULT, 'la_country_RWA', 'RWA', 'RW');
-INSERT INTO StdDestinations VALUES (180, 1, DEFAULT, 'la_country_KNA', 'KNA', 'KN');
-INSERT INTO StdDestinations VALUES (181, 1, DEFAULT, 'la_country_LCA', 'LCA', 'LC');
-INSERT INTO StdDestinations VALUES (182, 1, DEFAULT, 'la_country_VCT', 'VCT', 'VC');
-INSERT INTO StdDestinations VALUES (183, 1, DEFAULT, 'la_country_WSM', 'WSM', 'WS');
-INSERT INTO StdDestinations VALUES (184, 1, DEFAULT, 'la_country_SMR', 'SMR', 'SM');
-INSERT INTO StdDestinations VALUES (185, 1, DEFAULT, 'la_country_STP', 'STP', 'ST');
-INSERT INTO StdDestinations VALUES (186, 1, DEFAULT, 'la_country_SAU', 'SAU', 'SA');
-INSERT INTO StdDestinations VALUES (187, 1, DEFAULT, 'la_country_SEN', 'SEN', 'SN');
-INSERT INTO StdDestinations VALUES (188, 1, DEFAULT, 'la_country_SYC', 'SYC', 'SC');
-INSERT INTO StdDestinations VALUES (189, 1, DEFAULT, 'la_country_SLE', 'SLE', 'SL');
-INSERT INTO StdDestinations VALUES (190, 1, DEFAULT, 'la_country_SGP', 'SGP', 'SG');
-INSERT INTO StdDestinations VALUES (191, 1, DEFAULT, 'la_country_SVK', 'SVK', 'SK');
-INSERT INTO StdDestinations VALUES (192, 1, DEFAULT, 'la_country_SVN', 'SVN', 'SI');
-INSERT INTO StdDestinations VALUES (193, 1, DEFAULT, 'la_country_SLB', 'SLB', 'SB');
-INSERT INTO StdDestinations VALUES (194, 1, DEFAULT, 'la_country_SOM', 'SOM', 'SO');
-INSERT INTO StdDestinations VALUES (195, 1, DEFAULT, 'la_country_ZAF', 'ZAF', 'ZA');
-INSERT INTO StdDestinations VALUES (196, 1, DEFAULT, 'la_country_SGS', 'SGS', 'GS');
-INSERT INTO StdDestinations VALUES (197, 1, DEFAULT, 'la_country_ESP', 'ESP', 'ES');
-INSERT INTO StdDestinations VALUES (198, 1, DEFAULT, 'la_country_LKA', 'LKA', 'LK');
-INSERT INTO StdDestinations VALUES (199, 1, DEFAULT, 'la_country_SHN', 'SHN', 'SH');
-INSERT INTO StdDestinations VALUES (200, 1, DEFAULT, 'la_country_SPM', 'SPM', 'PM');
-INSERT INTO StdDestinations VALUES (201, 1, DEFAULT, 'la_country_SDN', 'SDN', 'SD');
-INSERT INTO StdDestinations VALUES (202, 1, DEFAULT, 'la_country_SUR', 'SUR', 'SR');
-INSERT INTO StdDestinations VALUES (203, 1, DEFAULT, 'la_country_SJM', 'SJM', 'SJ');
-INSERT INTO StdDestinations VALUES (204, 1, DEFAULT, 'la_country_SWZ', 'SWZ', 'SZ');
-INSERT INTO StdDestinations VALUES (205, 1, DEFAULT, 'la_country_SWE', 'SWE', 'SE');
-INSERT INTO StdDestinations VALUES (206, 1, DEFAULT, 'la_country_CHE', 'CHE', 'CH');
-INSERT INTO StdDestinations VALUES (207, 1, DEFAULT, 'la_country_SYR', 'SYR', 'SY');
-INSERT INTO StdDestinations VALUES (208, 1, DEFAULT, 'la_country_TWN', 'TWN', 'TW');
-INSERT INTO StdDestinations VALUES (209, 1, DEFAULT, 'la_country_TJK', 'TJK', 'TJ');
-INSERT INTO StdDestinations VALUES (210, 1, DEFAULT, 'la_country_TZA', 'TZA', 'TZ');
-INSERT INTO StdDestinations VALUES (211, 1, DEFAULT, 'la_country_THA', 'THA', 'TH');
-INSERT INTO StdDestinations VALUES (212, 1, DEFAULT, 'la_country_TGO', 'TGO', 'TG');
-INSERT INTO StdDestinations VALUES (213, 1, DEFAULT, 'la_country_TKL', 'TKL', 'TK');
-INSERT INTO StdDestinations VALUES (214, 1, DEFAULT, 'la_country_TON', 'TON', 'TO');
-INSERT INTO StdDestinations VALUES (215, 1, DEFAULT, 'la_country_TTO', 'TTO', 'TT');
-INSERT INTO StdDestinations VALUES (216, 1, DEFAULT, 'la_country_TUN', 'TUN', 'TN');
-INSERT INTO StdDestinations VALUES (217, 1, DEFAULT, 'la_country_TUR', 'TUR', 'TR');
-INSERT INTO StdDestinations VALUES (218, 1, DEFAULT, 'la_country_TKM', 'TKM', 'TM');
-INSERT INTO StdDestinations VALUES (219, 1, DEFAULT, 'la_country_TCA', 'TCA', 'TC');
-INSERT INTO StdDestinations VALUES (220, 1, DEFAULT, 'la_country_TUV', 'TUV', 'TV');
-INSERT INTO StdDestinations VALUES (221, 1, DEFAULT, 'la_country_UGA', 'UGA', 'UG');
-INSERT INTO StdDestinations VALUES (222, 1, DEFAULT, 'la_country_UKR', 'UKR', 'UA');
-INSERT INTO StdDestinations VALUES (223, 1, DEFAULT, 'la_country_ARE', 'ARE', 'AE');
-INSERT INTO StdDestinations VALUES (224, 1, DEFAULT, 'la_country_GBR', 'GBR', 'GB');
-INSERT INTO StdDestinations VALUES (225, 1, DEFAULT, 'la_country_USA', 'USA', 'US');
-INSERT INTO StdDestinations VALUES (226, 1, DEFAULT, 'la_country_UMI', 'UMI', 'UM');
-INSERT INTO StdDestinations VALUES (227, 1, DEFAULT, 'la_country_URY', 'URY', 'UY');
-INSERT INTO StdDestinations VALUES (228, 1, DEFAULT, 'la_country_UZB', 'UZB', 'UZ');
-INSERT INTO StdDestinations VALUES (229, 1, DEFAULT, 'la_country_VUT', 'VUT', 'VU');
-INSERT INTO StdDestinations VALUES (230, 1, DEFAULT, 'la_country_VAT', 'VAT', 'VA');
-INSERT INTO StdDestinations VALUES (231, 1, DEFAULT, 'la_country_VEN', 'VEN', 'VE');
-INSERT INTO StdDestinations VALUES (232, 1, DEFAULT, 'la_country_VNM', 'VNM', 'VN');
-INSERT INTO StdDestinations VALUES (233, 1, DEFAULT, 'la_country_VGB', 'VGB', 'VG');
-INSERT INTO StdDestinations VALUES (234, 1, DEFAULT, 'la_country_VIR', 'VIR', 'VI');
-INSERT INTO StdDestinations VALUES (235, 1, DEFAULT, 'la_country_WLF', 'WLF', 'WF');
-INSERT INTO StdDestinations VALUES (236, 1, DEFAULT, 'la_country_ESH', 'ESH', 'EH');
-INSERT INTO StdDestinations VALUES (237, 1, DEFAULT, 'la_country_YEM', 'YEM', 'YE');
-INSERT INTO StdDestinations VALUES (238, 1, DEFAULT, 'la_country_YUG', 'YUG', 'YU');
-INSERT INTO StdDestinations VALUES (239, 1, DEFAULT, 'la_country_ZMB', 'ZMB', 'ZM');
-INSERT INTO StdDestinations VALUES (240, 1, DEFAULT, 'la_country_ZWE', 'ZWE', 'ZW');
-INSERT INTO StdDestinations VALUES (370, 2, 38, 'la_state_YT', 'YT', DEFAULT);
-INSERT INTO StdDestinations VALUES (369, 2, 38, 'la_state_SK', 'SK', DEFAULT);
-INSERT INTO StdDestinations VALUES (368, 2, 38, 'la_state_QC', 'QC', DEFAULT);
-INSERT INTO StdDestinations VALUES (367, 2, 38, 'la_state_PE', 'PE', DEFAULT);
-INSERT INTO StdDestinations VALUES (366, 2, 38, 'la_state_ON', 'ON', DEFAULT);
-INSERT INTO StdDestinations VALUES (365, 2, 38, 'la_state_NU', 'NU', DEFAULT);
-INSERT INTO StdDestinations VALUES (364, 2, 38, 'la_state_NS', 'NS', DEFAULT);
-INSERT INTO StdDestinations VALUES (363, 2, 38, 'la_state_NT', 'NT', DEFAULT);
-INSERT INTO StdDestinations VALUES (362, 2, 38, 'la_state_NL', 'NL', DEFAULT);
-INSERT INTO StdDestinations VALUES (361, 2, 38, 'la_state_NB', 'NB', DEFAULT);
-INSERT INTO StdDestinations VALUES (360, 2, 38, 'la_state_MB', 'MB', DEFAULT);
-INSERT INTO StdDestinations VALUES (359, 2, 38, 'la_state_BC', 'BC', DEFAULT);
-INSERT INTO StdDestinations VALUES (358, 2, 38, 'la_state_AB', 'AB', DEFAULT);
-INSERT INTO StdDestinations VALUES (357, 2, 225, 'la_state_DC', 'DC', DEFAULT);
-INSERT INTO StdDestinations VALUES (356, 2, 225, 'la_state_WY', 'WY', DEFAULT);
-INSERT INTO StdDestinations VALUES (355, 2, 225, 'la_state_WI', 'WI', DEFAULT);
-INSERT INTO StdDestinations VALUES (354, 2, 225, 'la_state_WV', 'WV', DEFAULT);
-INSERT INTO StdDestinations VALUES (353, 2, 225, 'la_state_WA', 'WA', DEFAULT);
-INSERT INTO StdDestinations VALUES (352, 2, 225, 'la_state_VA', 'VA', DEFAULT);
-INSERT INTO StdDestinations VALUES (351, 2, 225, 'la_state_VT', 'VT', DEFAULT);
-INSERT INTO StdDestinations VALUES (350, 2, 225, 'la_state_UT', 'UT', DEFAULT);
-INSERT INTO StdDestinations VALUES (349, 2, 225, 'la_state_TX', 'TX', DEFAULT);
-INSERT INTO StdDestinations VALUES (348, 2, 225, 'la_state_TN', 'TN', DEFAULT);
-INSERT INTO StdDestinations VALUES (347, 2, 225, 'la_state_SD', 'SD', DEFAULT);
-INSERT INTO StdDestinations VALUES (346, 2, 225, 'la_state_SC', 'SC', DEFAULT);
-INSERT INTO StdDestinations VALUES (345, 2, 225, 'la_state_RI', 'RI', DEFAULT);
-INSERT INTO StdDestinations VALUES (344, 2, 225, 'la_state_PR', 'PR', DEFAULT);
-INSERT INTO StdDestinations VALUES (343, 2, 225, 'la_state_PA', 'PA', DEFAULT);
-INSERT INTO StdDestinations VALUES (342, 2, 225, 'la_state_OR', 'OR', DEFAULT);
-INSERT INTO StdDestinations VALUES (341, 2, 225, 'la_state_OK', 'OK', DEFAULT);
-INSERT INTO StdDestinations VALUES (340, 2, 225, 'la_state_OH', 'OH', DEFAULT);
-INSERT INTO StdDestinations VALUES (339, 2, 225, 'la_state_ND', 'ND', DEFAULT);
-INSERT INTO StdDestinations VALUES (338, 2, 225, 'la_state_NC', 'NC', DEFAULT);
-INSERT INTO StdDestinations VALUES (337, 2, 225, 'la_state_NY', 'NY', DEFAULT);
-INSERT INTO StdDestinations VALUES (336, 2, 225, 'la_state_NM', 'NM', DEFAULT);
-INSERT INTO StdDestinations VALUES (335, 2, 225, 'la_state_NJ', 'NJ', DEFAULT);
-INSERT INTO StdDestinations VALUES (334, 2, 225, 'la_state_NH', 'NH', DEFAULT);
-INSERT INTO StdDestinations VALUES (333, 2, 225, 'la_state_NV', 'NV', DEFAULT);
-INSERT INTO StdDestinations VALUES (332, 2, 225, 'la_state_NE', 'NE', DEFAULT);
-INSERT INTO StdDestinations VALUES (331, 2, 225, 'la_state_MT', 'MT', DEFAULT);
-INSERT INTO StdDestinations VALUES (330, 2, 225, 'la_state_MO', 'MO', DEFAULT);
-INSERT INTO StdDestinations VALUES (329, 2, 225, 'la_state_MS', 'MS', DEFAULT);
-INSERT INTO StdDestinations VALUES (328, 2, 225, 'la_state_MN', 'MN', DEFAULT);
-INSERT INTO StdDestinations VALUES (327, 2, 225, 'la_state_MI', 'MI', DEFAULT);
-INSERT INTO StdDestinations VALUES (326, 2, 225, 'la_state_MA', 'MA', DEFAULT);
-INSERT INTO StdDestinations VALUES (325, 2, 225, 'la_state_MD', 'MD', DEFAULT);
-INSERT INTO StdDestinations VALUES (324, 2, 225, 'la_state_ME', 'ME', DEFAULT);
-INSERT INTO StdDestinations VALUES (323, 2, 225, 'la_state_LA', 'LA', DEFAULT);
-INSERT INTO StdDestinations VALUES (322, 2, 225, 'la_state_KY', 'KY', DEFAULT);
-INSERT INTO StdDestinations VALUES (321, 2, 225, 'la_state_KS', 'KS', DEFAULT);
-INSERT INTO StdDestinations VALUES (320, 2, 225, 'la_state_IA', 'IA', DEFAULT);
-INSERT INTO StdDestinations VALUES (319, 2, 225, 'la_state_IN', 'IN', DEFAULT);
-INSERT INTO StdDestinations VALUES (318, 2, 225, 'la_state_IL', 'IL', DEFAULT);
-INSERT INTO StdDestinations VALUES (317, 2, 225, 'la_state_ID', 'ID', DEFAULT);
-INSERT INTO StdDestinations VALUES (316, 2, 225, 'la_state_HI', 'HI', DEFAULT);
-INSERT INTO StdDestinations VALUES (315, 2, 225, 'la_state_GA', 'GA', DEFAULT);
-INSERT INTO StdDestinations VALUES (314, 2, 225, 'la_state_FL', 'FL', DEFAULT);
-INSERT INTO StdDestinations VALUES (313, 2, 225, 'la_state_DE', 'DE', DEFAULT);
-INSERT INTO StdDestinations VALUES (312, 2, 225, 'la_state_CT', 'CT', DEFAULT);
-INSERT INTO StdDestinations VALUES (311, 2, 225, 'la_state_CO', 'CO', DEFAULT);
-INSERT INTO StdDestinations VALUES (310, 2, 225, 'la_state_CA', 'CA', DEFAULT);
-INSERT INTO StdDestinations VALUES (309, 2, 225, 'la_state_AR', 'AR', DEFAULT);
-INSERT INTO StdDestinations VALUES (308, 2, 225, 'la_state_AZ', 'AZ', DEFAULT);
-INSERT INTO StdDestinations VALUES (307, 2, 225, 'la_state_AK', 'AK', DEFAULT);
-INSERT INTO StdDestinations VALUES (306, 2, 225, 'la_state_AL', 'AL', DEFAULT);
+INSERT INTO CountryStates (CountryStateId, Type, StateCountryId, IsoCode, ShortIsoCode) VALUES
+(1, 1, NULL, 'AFG', 'AF'),
+(2, 1, NULL, 'ALB', 'AL'),
+(3, 1, NULL, 'DZA', 'DZ'),
+(4, 1, NULL, 'ASM', 'AS'),
+(5, 1, NULL, 'AND', 'AD'),
+(6, 1, NULL, 'AGO', 'AO'),
+(7, 1, NULL, 'AIA', 'AI'),
+(8, 1, NULL, 'ATA', 'AQ'),
+(9, 1, NULL, 'ATG', 'AG'),
+(10, 1, NULL, 'ARG', 'AR'),
+(11, 1, NULL, 'ARM', 'AM'),
+(12, 1, NULL, 'ABW', 'AW'),
+(13, 1, NULL, 'AUS', 'AU'),
+(14, 1, NULL, 'AUT', 'AT'),
+(15, 1, NULL, 'AZE', 'AZ'),
+(16, 1, NULL, 'BHS', 'BS'),
+(17, 1, NULL, 'BHR', 'BH'),
+(18, 1, NULL, 'BGD', 'BD'),
+(19, 1, NULL, 'BRB', 'BB'),
+(20, 1, NULL, 'BLR', 'BY'),
+(21, 1, NULL, 'BEL', 'BE'),
+(22, 1, NULL, 'BLZ', 'BZ'),
+(23, 1, NULL, 'BEN', 'BJ'),
+(24, 1, NULL, 'BMU', 'BM'),
+(25, 1, NULL, 'BTN', 'BT'),
+(26, 1, NULL, 'BOL', 'BO'),
+(27, 1, NULL, 'BIH', 'BA'),
+(28, 1, NULL, 'BWA', 'BW'),
+(29, 1, NULL, 'BVT', 'BV'),
+(30, 1, NULL, 'BRA', 'BR'),
+(31, 1, NULL, 'IOT', 'IO'),
+(32, 1, NULL, 'BRN', 'BN'),
+(33, 1, NULL, 'BGR', 'BG'),
+(34, 1, NULL, 'BFA', 'BF'),
+(35, 1, NULL, 'BDI', 'BI'),
+(36, 1, NULL, 'KHM', 'KH'),
+(37, 1, NULL, 'CMR', 'CM'),
+(38, 1, NULL, 'CAN', 'CA'),
+(39, 1, NULL, 'CPV', 'CV'),
+(40, 1, NULL, 'CYM', 'KY'),
+(41, 1, NULL, 'CAF', 'CF'),
+(42, 1, NULL, 'TCD', 'TD'),
+(43, 1, NULL, 'CHL', 'CL'),
+(44, 1, NULL, 'CHN', 'CN'),
+(45, 1, NULL, 'CXR', 'CX'),
+(46, 1, NULL, 'CCK', 'CC'),
+(47, 1, NULL, 'COL', 'CO'),
+(48, 1, NULL, 'COM', 'KM'),
+(49, 1, NULL, 'COD', 'CD'),
+(50, 1, NULL, 'COG', 'CG'),
+(51, 1, NULL, 'COK', 'CK'),
+(52, 1, NULL, 'CRI', 'CR'),
+(53, 1, NULL, 'CIV', 'CI'),
+(54, 1, NULL, 'HRV', 'HR'),
+(55, 1, NULL, 'CUB', 'CU'),
+(56, 1, NULL, 'CYP', 'CY'),
+(57, 1, NULL, 'CZE', 'CZ'),
+(58, 1, NULL, 'DNK', 'DK'),
+(59, 1, NULL, 'DJI', 'DJ'),
+(60, 1, NULL, 'DMA', 'DM'),
+(61, 1, NULL, 'DOM', 'DO'),
+(62, 1, NULL, 'TLS', 'TL'),
+(63, 1, NULL, 'ECU', 'EC'),
+(64, 1, NULL, 'EGY', 'EG'),
+(65, 1, NULL, 'SLV', 'SV'),
+(66, 1, NULL, 'GNQ', 'GQ'),
+(67, 1, NULL, 'ERI', 'ER'),
+(68, 1, NULL, 'EST', 'EE'),
+(69, 1, NULL, 'ETH', 'ET'),
+(70, 1, NULL, 'FLK', 'FK'),
+(71, 1, NULL, 'FRO', 'FO'),
+(72, 1, NULL, 'FJI', 'FJ'),
+(73, 1, NULL, 'FIN', 'FI'),
+(74, 1, NULL, 'FRA', 'FR'),
+(75, 1, NULL, 'FXX', 'FX'),
+(76, 1, NULL, 'GUF', 'GF'),
+(77, 1, NULL, 'PYF', 'PF'),
+(78, 1, NULL, 'ATF', 'TF'),
+(79, 1, NULL, 'GAB', 'GA'),
+(80, 1, NULL, 'GMB', 'GM'),
+(81, 1, NULL, 'GEO', 'GE'),
+(82, 1, NULL, 'DEU', 'DE'),
+(83, 1, NULL, 'GHA', 'GH'),
+(84, 1, NULL, 'GIB', 'GI'),
+(85, 1, NULL, 'GRC', 'GR'),
+(86, 1, NULL, 'GRL', 'GL'),
+(87, 1, NULL, 'GRD', 'GD'),
+(88, 1, NULL, 'GLP', 'GP'),
+(89, 1, NULL, 'GUM', 'GU'),
+(90, 1, NULL, 'GTM', 'GT'),
+(91, 1, NULL, 'GIN', 'GN'),
+(92, 1, NULL, 'GNB', 'GW'),
+(93, 1, NULL, 'GUY', 'GY'),
+(94, 1, NULL, 'HTI', 'HT'),
+(95, 1, NULL, 'HMD', 'HM'),
+(96, 1, NULL, 'HND', 'HN'),
+(97, 1, NULL, 'HKG', 'HK'),
+(98, 1, NULL, 'HUN', 'HU'),
+(99, 1, NULL, 'ISL', 'IS'),
+(100, 1, NULL, 'IND', 'IN'),
+(101, 1, NULL, 'IDN', 'ID'),
+(102, 1, NULL, 'IRN', 'IR'),
+(103, 1, NULL, 'IRQ', 'IQ'),
+(104, 1, NULL, 'IRL', 'IE'),
+(105, 1, NULL, 'ISR', 'IL'),
+(106, 1, NULL, 'ITA', 'IT'),
+(107, 1, NULL, 'JAM', 'JM'),
+(108, 1, NULL, 'JPN', 'JP'),
+(109, 1, NULL, 'JOR', 'JO'),
+(110, 1, NULL, 'KAZ', 'KZ'),
+(111, 1, NULL, 'KEN', 'KE'),
+(112, 1, NULL, 'KIR', 'KI'),
+(113, 1, NULL, 'PRK', 'KP'),
+(114, 1, NULL, 'KOR', 'KR'),
+(115, 1, NULL, 'KWT', 'KW'),
+(116, 1, NULL, 'KGZ', 'KG'),
+(117, 1, NULL, 'LAO', 'LA'),
+(118, 1, NULL, 'LVA', 'LV'),
+(119, 1, NULL, 'LBN', 'LB'),
+(120, 1, NULL, 'LSO', 'LS'),
+(121, 1, NULL, 'LBR', 'LR'),
+(122, 1, NULL, 'LBY', 'LY'),
+(123, 1, NULL, 'LIE', 'LI'),
+(124, 1, NULL, 'LTU', 'LT'),
+(125, 1, NULL, 'LUX', 'LU'),
+(126, 1, NULL, 'MAC', 'MO'),
+(127, 1, NULL, 'MKD', 'MK'),
+(128, 1, NULL, 'MDG', 'MG'),
+(129, 1, NULL, 'MWI', 'MW'),
+(130, 1, NULL, 'MYS', 'MY'),
+(131, 1, NULL, 'MDV', 'MV'),
+(132, 1, NULL, 'MLI', 'ML'),
+(133, 1, NULL, 'MLT', 'MT'),
+(134, 1, NULL, 'MHL', 'MH'),
+(135, 1, NULL, 'MTQ', 'MQ'),
+(136, 1, NULL, 'MRT', 'MR'),
+(137, 1, NULL, 'MUS', 'MU'),
+(138, 1, NULL, 'MYT', 'YT'),
+(139, 1, NULL, 'MEX', 'MX'),
+(140, 1, NULL, 'FSM', 'FM'),
+(141, 1, NULL, 'MDA', 'MD'),
+(142, 1, NULL, 'MCO', 'MC'),
+(143, 1, NULL, 'MNG', 'MN'),
+(144, 1, NULL, 'MSR', 'MS'),
+(145, 1, NULL, 'MAR', 'MA'),
+(146, 1, NULL, 'MOZ', 'MZ'),
+(147, 1, NULL, 'MMR', 'MM'),
+(148, 1, NULL, 'NAM', 'NA'),
+(149, 1, NULL, 'NRU', 'NR'),
+(150, 1, NULL, 'NPL', 'NP'),
+(151, 1, NULL, 'NLD', 'NL'),
+(152, 1, NULL, 'ANT', 'AN'),
+(153, 1, NULL, 'NCL', 'NC'),
+(154, 1, NULL, 'NZL', 'NZ'),
+(155, 1, NULL, 'NIC', 'NI'),
+(156, 1, NULL, 'NER', 'NE'),
+(157, 1, NULL, 'NGA', 'NG'),
+(158, 1, NULL, 'NIU', 'NU'),
+(159, 1, NULL, 'NFK', 'NF'),
+(160, 1, NULL, 'MNP', 'MP'),
+(161, 1, NULL, 'NOR', 'NO'),
+(162, 1, NULL, 'OMN', 'OM'),
+(163, 1, NULL, 'PAK', 'PK'),
+(164, 1, NULL, 'PLW', 'PW'),
+(165, 1, NULL, 'PSE', 'PS'),
+(166, 1, NULL, 'PAN', 'PA'),
+(167, 1, NULL, 'PNG', 'PG'),
+(168, 1, NULL, 'PRY', 'PY'),
+(169, 1, NULL, 'PER', 'PE'),
+(170, 1, NULL, 'PHL', 'PH'),
+(171, 1, NULL, 'PCN', 'PN'),
+(172, 1, NULL, 'POL', 'PL'),
+(173, 1, NULL, 'PRT', 'PT'),
+(174, 1, NULL, 'PRI', 'PR'),
+(175, 1, NULL, 'QAT', 'QA'),
+(176, 1, NULL, 'REU', 'RE'),
+(177, 1, NULL, 'ROU', 'RO'),
+(178, 1, NULL, 'RUS', 'RU'),
+(179, 1, NULL, 'RWA', 'RW'),
+(180, 1, NULL, 'KNA', 'KN'),
+(181, 1, NULL, 'LCA', 'LC'),
+(182, 1, NULL, 'VCT', 'VC'),
+(183, 1, NULL, 'WSM', 'WS'),
+(184, 1, NULL, 'SMR', 'SM'),
+(185, 1, NULL, 'STP', 'ST'),
+(186, 1, NULL, 'SAU', 'SA'),
+(187, 1, NULL, 'SEN', 'SN'),
+(188, 1, NULL, 'SYC', 'SC'),
+(189, 1, NULL, 'SLE', 'SL'),
+(190, 1, NULL, 'SGP', 'SG'),
+(191, 1, NULL, 'SVK', 'SK'),
+(192, 1, NULL, 'SVN', 'SI'),
+(193, 1, NULL, 'SLB', 'SB'),
+(194, 1, NULL, 'SOM', 'SO'),
+(195, 1, NULL, 'ZAF', 'ZA'),
+(196, 1, NULL, 'SGS', 'GS'),
+(197, 1, NULL, 'ESP', 'ES'),
+(198, 1, NULL, 'LKA', 'LK'),
+(199, 1, NULL, 'SHN', 'SH'),
+(200, 1, NULL, 'SPM', 'PM'),
+(201, 1, NULL, 'SDN', 'SD'),
+(202, 1, NULL, 'SUR', 'SR'),
+(203, 1, NULL, 'SJM', 'SJ'),
+(204, 1, NULL, 'SWZ', 'SZ'),
+(205, 1, NULL, 'SWE', 'SE'),
+(206, 1, NULL, 'CHE', 'CH'),
+(207, 1, NULL, 'SYR', 'SY'),
+(208, 1, NULL, 'TWN', 'TW'),
+(209, 1, NULL, 'TJK', 'TJ'),
+(210, 1, NULL, 'TZA', 'TZ'),
+(211, 1, NULL, 'THA', 'TH'),
+(212, 1, NULL, 'TGO', 'TG'),
+(213, 1, NULL, 'TKL', 'TK'),
+(214, 1, NULL, 'TON', 'TO'),
+(215, 1, NULL, 'TTO', 'TT'),
+(216, 1, NULL, 'TUN', 'TN'),
+(217, 1, NULL, 'TUR', 'TR'),
+(218, 1, NULL, 'TKM', 'TM'),
+(219, 1, NULL, 'TCA', 'TC'),
+(220, 1, NULL, 'TUV', 'TV'),
+(221, 1, NULL, 'UGA', 'UG'),
+(222, 1, NULL, 'UKR', 'UA'),
+(223, 1, NULL, 'ARE', 'AE'),
+(224, 1, NULL, 'GBR', 'GB'),
+(225, 1, NULL, 'USA', 'US'),
+(226, 1, NULL, 'UMI', 'UM'),
+(227, 1, NULL, 'URY', 'UY'),
+(228, 1, NULL, 'UZB', 'UZ'),
+(229, 1, NULL, 'VUT', 'VU'),
+(230, 1, NULL, 'VAT', 'VA'),
+(231, 1, NULL, 'VEN', 'VE'),
+(232, 1, NULL, 'VNM', 'VN'),
+(233, 1, NULL, 'VGB', 'VG'),
+(234, 1, NULL, 'VIR', 'VI'),
+(235, 1, NULL, 'WLF', 'WF'),
+(236, 1, NULL, 'ESH', 'EH'),
+(237, 1, NULL, 'YEM', 'YE'),
+(238, 1, NULL, 'YUG', 'YU'),
+(239, 1, NULL, 'ZMB', 'ZM'),
+(240, 1, NULL, 'ZWE', 'ZW'),
+(370, 2, 38, 'YT', NULL),
+(369, 2, 38, 'SK', NULL),
+(368, 2, 38, 'QC', NULL),
+(367, 2, 38, 'PE', NULL),
+(366, 2, 38, 'ON', NULL),
+(365, 2, 38, 'NU', NULL),
+(364, 2, 38, 'NS', NULL),
+(363, 2, 38, 'NT', NULL),
+(362, 2, 38, 'NL', NULL),
+(361, 2, 38, 'NB', NULL),
+(360, 2, 38, 'MB', NULL),
+(359, 2, 38, 'BC', NULL),
+(358, 2, 38, 'AB', NULL),
+(357, 2, 225, 'DC', NULL),
+(356, 2, 225, 'WY', NULL),
+(355, 2, 225, 'WI', NULL),
+(354, 2, 225, 'WV', NULL),
+(353, 2, 225, 'WA', NULL),
+(352, 2, 225, 'VA', NULL),
+(351, 2, 225, 'VT', NULL),
+(350, 2, 225, 'UT', NULL),
+(349, 2, 225, 'TX', NULL),
+(348, 2, 225, 'TN', NULL),
+(347, 2, 225, 'SD', NULL),
+(346, 2, 225, 'SC', NULL),
+(345, 2, 225, 'RI', NULL),
+(344, 2, 225, 'PR', NULL),
+(343, 2, 225, 'PA', NULL),
+(342, 2, 225, 'OR', NULL),
+(341, 2, 225, 'OK', NULL),
+(340, 2, 225, 'OH', NULL),
+(339, 2, 225, 'ND', NULL),
+(338, 2, 225, 'NC', NULL),
+(337, 2, 225, 'NY', NULL),
+(336, 2, 225, 'NM', NULL),
+(335, 2, 225, 'NJ', NULL),
+(334, 2, 225, 'NH', NULL),
+(333, 2, 225, 'NV', NULL),
+(332, 2, 225, 'NE', NULL),
+(331, 2, 225, 'MT', NULL),
+(330, 2, 225, 'MO', NULL),
+(329, 2, 225, 'MS', NULL),
+(328, 2, 225, 'MN', NULL),
+(327, 2, 225, 'MI', NULL),
+(326, 2, 225, 'MA', NULL),
+(325, 2, 225, 'MD', NULL),
+(324, 2, 225, 'ME', NULL),
+(323, 2, 225, 'LA', NULL),
+(322, 2, 225, 'KY', NULL),
+(321, 2, 225, 'KS', NULL),
+(320, 2, 225, 'IA', NULL),
+(319, 2, 225, 'IN', NULL),
+(318, 2, 225, 'IL', NULL),
+(317, 2, 225, 'ID', NULL),
+(316, 2, 225, 'HI', NULL),
+(315, 2, 225, 'GA', NULL),
+(314, 2, 225, 'FL', NULL),
+(313, 2, 225, 'DE', NULL),
+(312, 2, 225, 'CT', NULL),
+(311, 2, 225, 'CO', NULL),
+(310, 2, 225, 'CA', NULL),
+(309, 2, 225, 'AR', NULL),
+(308, 2, 225, 'AZ', NULL),
+(307, 2, 225, 'AK', NULL),
+(306, 2, 225, 'AL', NULL);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.VIEW', 'lu_PermName_Category.View_desc', 'lu_PermName_Category.View_error', 'In-Portal');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal');
Index: install/install_schema.sql
===================================================================
--- install/install_schema.sql (revision 13444)
+++ install/install_schema.sql (working copy)
@@ -366,16 +366,21 @@
KEY Cached (Cached)
);
-CREATE TABLE StdDestinations (
- DestId int(11) NOT NULL auto_increment,
- DestType int(11) NOT NULL default '0',
- DestParentId int(11) default NULL,
- DestName varchar(255) NOT NULL default '',
- DestAbbr char(3) NOT NULL default '',
- DestAbbr2 char(2) default NULL,
- PRIMARY KEY (DestId),
- KEY DestType (DestType),
- KEY DestParentId (DestParentId)
+CREATE TABLE CountryStates (
+ CountryStateId int(11) NOT NULL AUTO_INCREMENT,
+ `Type` int(11) NOT NULL DEFAULT '1',
+ StateCountryId int(11) DEFAULT NULL,
+ l1_Name varchar(255) NOT NULL,
+ l2_Name varchar(255) NOT NULL,
+ l3_Name varchar(255) NOT NULL,
+ l4_Name varchar(255) NOT NULL,
+ l5_Name varchar(255) NOT NULL,
+ IsoCode char(3) NOT NULL DEFAULT '',
+ ShortIsoCode char(2) DEFAULT NULL,
+ PRIMARY KEY (CountryStateId),
+ KEY `Type` (`Type`),
+ KEY StateCountryId (StateCountryId),
+ KEY l1_Name (l1_Name(5))
);
CREATE TABLE Category (
Index: install/remove_schema.sql
===================================================================
--- install/remove_schema.sql (revision 13400)
+++ install/remove_schema.sql (working copy)
@@ -21,7 +21,7 @@
DROP TABLE UserSession;
DROP TABLE EmailLog;
DROP TABLE Cache;
-DROP TABLE StdDestinations;
+DROP TABLE CountryStates;
DROP TABLE Category;
DROP TABLE CategoryCustomData;
DROP TABLE CategoryItems;
Index: install/upgrades.php
===================================================================
--- install/upgrades.php (revision 13400)
+++ install/upgrades.php (working copy)
@@ -1329,6 +1329,8 @@
if ($mode == 'before') {
// create multilingual fields for phrases and email events
$ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
+ /* @var $ml_helper kMultiLanguageHelper */
+
$ml_helper->createFields('phrases');
$ml_helper->createFields('emailevents');
@@ -1428,6 +1430,76 @@
$this->Conn->Query('DROP TABLE IF EXISTS ' . TABLE_PREFIX . 'Phrase');
$this->Conn->Query('RENAME TABLE ' . $temp_table . ' TO ' . TABLE_PREFIX . 'Phrase');
+ // refactor StdDestinations table
+ $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
+ $this->Conn->Query($sql);
+
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
+ CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
+ CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
+ CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
+ CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
+ DROP INDEX DestType,
+ DROP INDEX DestParentId,
+ ADD INDEX (`Type`),
+ ADD INDEX (StateCountryId)';
+ $this->Conn->Query($sql);
+
+ // move country/state translations from Phrase to CountryStates table
+ $ml_helper->createFields('country-state');
+
+ for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
+ if (!$ml_helper->LanguageFound($language_id)) {
+ continue;
+ }
+
+ $sub_select = ' SELECT l' . $language_id . '_Translation
+ FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase = DestName';
+
+ $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
+ SET l' . $language_id . '_Name = (' . $sub_select . ')';
+ $this->Conn->Query($sql);
+ }
+
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ DROP DestName';
+ $this->Conn->Query($sql);
+
+ $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $this->Conn->Query($sql);
+
+ // makes configuration values dropdowns use "||" as separator
+ $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
+ /* @var $custom_field_helper InpCustomFieldsHelper */
+
+ $sql = 'SELECT ValueList, VariableName
+ FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
+ WHERE ValueList LIKE "%,%"';
+ $variables = $this->Conn->GetCol($sql, 'VariableName');
+
+ foreach ($variables as $variable_name => $value_list) {
+ $ret = Array ();
+ $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+
+ foreach ($options as $option_key => $option_title) {
+ if (substr($option_key, 0, 3) == 'SQL') {
+ $ret[] = $option_title;
+ }
+ else {
+ $ret[] = $option_key . '=' . $option_title;
+ }
+ }
+
+ $fields_hash = Array (
+ 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ );
+
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ }
+
// save "config.php" in php format, not ini format as before
$this->_toolkit->SaveConfig();
}
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 13444)
+++ install/upgrades.sql (working copy)
@@ -1712,6 +1712,10 @@
DROP TABLE ConfigurationAdmin;
+UPDATE ConfigurationValues
+SET ValueList = '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
+WHERE ValueList = '=+||<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>';
+
ALTER TABLE Forms
ADD RequireLogin TINYINT NOT NULL DEFAULT '0',
ADD INDEX (RequireLogin),
Index: kernel/constants.php
===================================================================
--- kernel/constants.php (revision 13400)
+++ kernel/constants.php (working copy)
@@ -130,6 +130,9 @@
define('SESSION_LOG_LOGGED_OUT', 1);
define('SESSION_LOG_EXPIRED', 2);
+ define('DESTINATION_TYPE_COUNTRY', 1);
+ define('DESTINATION_TYPE_STATE', 2);
+
// form field visibility
define('FORM_FIELD_EVERYONE', 1);
define('FORM_FIELD_UNREGISTERED', 2);
Index: kernel/db/db_tag_processor.php
===================================================================
--- kernel/db/db_tag_processor.php (revision 13400)
+++ kernel/db/db_tag_processor.php (working copy)
@@ -652,6 +652,13 @@
}
}
+ /**
+ * Depricated
+ *
+ * @param array $params
+ * @return int
+ * @deprecated Parameter "not_last" of "PrintList" tag does that
+ */
function NotLastItem($params)
{
$object =& $this->getList($params); // maybe we should use $this->GetList($params) instead
@@ -738,6 +745,13 @@
return $this->Application->HREF($t, '', $params);
}
+ /**
+ * Depricated
+ *
+ * @param array $params
+ * @return int
+ * @deprecated Parameter "column_width" of "PrintList" tag does that
+ */
function ColumnWidth($params)
{
$columns = $this->Application->Parser->GetParam('columns');
@@ -909,6 +923,13 @@
$object->SetDBField($dst_field, $src_object->GetDBField($src_field));
}
+ /**
+ * Depricated
+ *
+ * @param Array $params
+ * @return string
+ * @deprecated parameter "as_label" of "Field" tag does the same
+ */
function PhraseField($params)
{
$field_label = $this->Field($params);
@@ -1830,7 +1851,7 @@
}
else {
// used for configuration
- $field_options['options'] = $helper->GetValuesHash($object->GetDBField($params['value_list_field']), ',');
+ $field_options['options'] = $helper->GetValuesHash( $object->GetDBField($params['value_list_field']) );
}
$object->SetFieldOptions($field, $field_options);
Index: kernel/utility/http_query.php
===================================================================
--- kernel/utility/http_query.php (revision 13446)
+++ kernel/utility/http_query.php (working copy)
@@ -237,6 +237,8 @@
$rewrite_url = $this->Get('_mod_rw_url_');
if ($this->Application->RewriteURLs() || $rewrite_url) {
+ // maybe call onafterconfigread here
+
if (defined('DEBUG_MODE') && $this->Application->isDebugMode()) {
$this->Application->Debugger->profileStart('url_parsing');
$this->processRewriteURL();
@@ -386,7 +388,9 @@
$module_params['editing_mode'] = '';
}
- $env = $this->Application->BuildEnv( $this->Get('t'), $module_params, $passed, false, false );
+ $module_params['__URLENCODE__'] = 1;
+
+ $env = $this->Application->BuildEnv( $this->Get('t'), $module_params, $passed, false, false);
$this->Set(ENV_VAR_NAME, $env);
$_REQUEST['env'] = $_GET['env'] = $env; // for capability with old in-portal code
}
Index: units/configuration/configuration_event_handler.php
===================================================================
--- units/configuration/configuration_event_handler.php (revision 13400)
+++ units/configuration/configuration_event_handler.php (working copy)
@@ -115,7 +115,10 @@
}
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $state_iso = $cs_helper->CheckState($check_state, $check_country);
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $state_iso = $cs_helper->getStateIso($check_state, $check_country);
+
if ($state_iso !== false) {
$object->SetDBField('VariableValue', $state_iso);
}
Index: units/country_states/country_state_eh.php
===================================================================
--- units/country_states/country_state_eh.php (revision 0)
+++ units/country_states/country_state_eh.php (revision 0)
@@ -0,0 +1,85 @@
+<?php
+
+ class CountryStateEventHandler extends kDBEventHandler {
+
+ /**
+ * Applies edit picker filters
+ *
+ * @param kEvent $event
+ */
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ if (($event->Special == 'selected') || ($event->Special == 'available')) {
+ $edit_picker_helper =& $this->Application->recallObject('EditPickerHelper');
+ /* @var $edit_picker_helper EditPickerHelper */
+
+ $edit_picker_helper->applyFilter($event, 'Countries');
+
+ // only countries
+ $object->addFilter('type_filter', '%1$s.Type = ' . DESTINATION_TYPE_COUNTRY);
+ }
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->_setRequired($event);
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+ $this->_setRequired($event);
+ }
+
+ /**
+ * Makes sure, that state country is always specified
+ *
+ * @param kEvent $event
+ */
+ function _setRequired(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $object->setRequired('StateCountryId', $object->GetDBField('Type') == DESTINATION_TYPE_STATE);
+ }
+
+ /**
+ * Don't allow to delete countries, that have states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemDelete(&$event)
+ {
+ parent::OnBeforeItemDelete($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if ($cs_helper->CountryHasStates( $object->GetDBField('IsoCode') )) {
+ $event->status = erFAIL;
+ return ;
+ }
+ }
+ }
Index: units/country_states/country_states_config.php
===================================================================
--- units/country_states/country_states_config.php (revision 0)
+++ units/country_states/country_states_config.php (revision 0)
@@ -0,0 +1,116 @@
+<?php
+
+ defined('FULL_PATH') or die('restricted access!');
+
+ $config = Array (
+ 'Prefix' => 'country-state',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'CountryStateEventHandler', 'file' => 'country_state_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+
+ 'IDField' => 'CountryStateId',
+
+ 'TableName' => TABLE_PREFIX . 'CountryStates',
+
+ 'TitleField' => 'Translation',
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('country-state' => '!la_title_AddingCountryState!'),
+ 'edit_status_labels' => Array ('country-state' => '!la_title_EditingCountryState!'),
+ ),
+
+ 'country_state_list' => Array (
+ 'prefixes' => Array ('country-state_List'), 'format' => "!la_title_CountryStates!",
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'),
+ ),
+
+ 'country_state_edit' => Array (
+ 'prefixes' => Array ('country-state'), 'format' => "#country-state_status# '#country-state_titlefield#'",
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
+ ),
+
+ 'PermSection' => Array('main' => 'in-portal:country_states'),
+
+ 'Sections' => Array (
+ 'in-portal:country_states' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_country_states',
+ 'label' => 'la_title_CountryStates',
+ 'url' => Array('t' => 'country_states/country_state_list', 'pass' => 'm'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 10,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Type' => 'asc', 'Translation' => 'asc'),
+ )
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'Translation' => 'l%2$s_Name',
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Country', 2 => 'la_opt_State'), 'use_phrases' => 1,
+ 'not_null' => 1, 'required' => 1, 'default' => 1
+ ),
+
+ 'StateCountryId' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'CountryStates WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' ORDER BY l%2$s_Name', 'option_key_field' => 'CountryStateId', 'option_title_field' => 'l%2$s_Name',
+ 'default' => NULL
+ ),
+
+ 'Name' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+
+ 'IsoCode' => Array ('type' => 'string', 'max_len' => 3, 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'ShortIsoCode' => Array ('type' => 'string', 'max_len' => 2, 'default' => NULL),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Translation' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png'),
+ 'Fields' => Array (
+ 'CountryStateId' => Array ('title' => 'la_col_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Name' => Array ('title' => 'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'IsoCode' => Array ('title' => 'la_col_IsoCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Type' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'StateCountryId' => Array ('title' => 'la_col_StateCountry', 'filter_block' => 'grid_options_filter', 'width' => 200, ),
+ 'ShortIsoCode' => Array ('title' => 'la_col_ShortIsoCode', 'filter_block' => 'grid_like_filter', 'width' => 125, ),
+ ),
+ ),
+ ),
+ );
Index: units/custom_data/custom_data_event_handler.php
===================================================================
--- units/custom_data/custom_data_event_handler.php (revision 13400)
+++ units/custom_data/custom_data_event_handler.php (working copy)
@@ -150,6 +150,8 @@
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
+ $is_install = defined('IS_INSTALL') && IS_INSTALL;
+
foreach ($custom_fields as $custom_id => $custom_params) {
$custom_name = $custom_params['FieldName'];
$field_options = Array('type' => 'string', 'not_null' => 1, 'default' => $custom_params['DefaultValue']);
@@ -170,7 +172,8 @@
case 'multiselect':
case 'radio':
if ($custom_params['ValueList']) {
- $field_options['options'] = $cf_helper->GetValuesHash($custom_params['ValueList']);
+ // $is_install check prevents 335 bad phrase sql errors on upgrade to 5.1.0
+ $field_options['options'] = $is_install ? Array () : $cf_helper->GetValuesHash($custom_params['ValueList']);
$field_options['formatter'] = 'kOptionsFormatter';
$field_options['multiple'] = $custom_params['ElementType'] == 'multiselect';
}
Index: units/helpers/country_states_helper.php
===================================================================
--- units/helpers/country_states_helper.php (revision 13400)
+++ units/helpers/country_states_helper.php (working copy)
@@ -16,11 +16,37 @@
class kCountryStatesHelper extends kHelper
{
- var $CountriesWithStates = Array('USA', 'CAN');
+ /**
+ * Returns countries, that have states
+ *
+ * @return Array
+ */
+ function getCountriesWithStates()
+ {
+ static $cache = null;
+ if (!isset($cache)) {
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+
+ $sql = 'SELECT DISTINCT cname.IsoCode, cid.StateCountryId
+ FROM ' . $table_name . ' cid
+ JOIN ' . $table_name . ' cname ON cname.CountryStateId = cid.StateCountryId
+ WHERE cid.StateCountryId IS NOT NULL';
+ $cache = $this->Conn->GetCol($sql, 'StateCountryId');
+ }
+
+ return $cache;
+ }
+
+ /**
+ * Checks, that country with given 3symbol ISO code has states
+ *
+ * @param string $country_code
+ * @return bool
+ */
function CountryHasStates($country_code)
{
- return !$country_code ? false : in_array($country_code,$this->CountriesWithStates);
+ return $country_code ? in_array($country_code, $this->getCountriesWithStates()) : false;
}
/**
@@ -32,93 +58,131 @@
*/
function PopulateStates(&$event, $state_field, $country_field)
{
- static $country_states = Array ();
+ static $cache = Array ();
$object =& $event->getObject();
- $country_abbr = $object->GetDBField($country_field);
+ /* @var $object kDBItem */
- if (!$country_abbr) {
+ $country_iso = $object->GetDBField($country_field);
+
+ if (!$country_iso) {
return ;
}
- if (!array_key_exists($country_abbr, $country_states)) {
- $sql = 'SELECT DestId
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestType = 1 AND DestAbbr = '.$this->Conn->qstr($country_abbr);
- $country_id = $this->Conn->GetOne($sql);
+ if (!array_key_exists($country_iso, $cache)) {
+ $country_id = $this->getCountryStateId($country_iso, DESTINATION_TYPE_COUNTRY);
+
if (!$country_id) {
return ;
}
- $language_id = $this->Application->GetVar('m_lang');
-
- $sql = 'SELECT p.l' . $language_id . '_Translation as DestName, sd.DestAbbr
- FROM ' . TABLE_PREFIX . 'StdDestinations AS sd
- LEFT JOIN ' . TABLE_PREFIX . 'Phrase AS p ON p.Phrase = sd.DestName
- WHERE DestType = 2 AND DestParentId = ' . $country_id . '
- ORDER BY l' . $language_id . '_Translation';
- $country_states[$country_abbr] = $this->Conn->GetCol($sql, 'DestAbbr');
+ $sql = 'SELECT l' . $this->Application->GetVar('m_lang') . '_Name AS Name, IsoCode
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE (Type = ' . DESTINATION_TYPE_STATE . ') AND (StateCountryId = ' . $country_id . ')
+ ORDER BY Name ASC';
+ $cache[$country_iso] = $this->Conn->GetCol($sql, 'IsoCode');
}
- $object->Fields[$state_field]['options'] = $country_states[$country_abbr];
- $object->Fields[$state_field]['options'][''] = '';
+ $field_options = $object->GetFieldOptions($state_field);
+
+ $field_options['options'] = $cache[$country_iso];
+ $field_options['options'][''] = '';
+
+ $object->SetFieldOptions($state_field, $field_options);
}
/**
- * Returns valid state code for state name and country code passed
+ * Returns valid state ISO code for state name and country code passed
*
* @param string $state_name
- * @param string $country_code
+ * @param string $country_iso
* @return string
*/
- function CheckState($state_name, $country_code)
+ function getStateIso($state_name, $country_iso)
{
- if (!$this->CountryHasStates($country_code)) {
+ if (!$this->CountryHasStates($country_iso)) {
return $state_name;
}
- $sql = 'SELECT sdStates.DestAbbr
- FROM '.TABLE_PREFIX.'StdDestinations AS sdStates
- LEFT JOIN '.TABLE_PREFIX.'Phrase AS p ON p.Phrase = sdStates.DestName
- LEFT JOIN '.TABLE_PREFIX.'StdDestinations AS sdCountries ON sdStates.DestParentId = sdCountries.DestId
- WHERE (sdStates.DestType = 2) AND
- (sdStates.DestParentId = sdCountries.DestId) AND
- (sdCountries.DestAbbr = %2$s) AND
- (
- (LOWER(sdStates.DestAbbr) = %3$s) OR (LOWER(sdStates.DestAbbr2) = %3$s) OR (LOWER(sdStates.DestName) = %3$s) OR (LOWER(p.l%1$s_Translation) = %3$s)
- )';
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+ $country_id = $this->getCountryStateId($country_iso, DESTINATION_TYPE_COUNTRY);
- $state_name = trim( mb_strtolower($state_name) );
+ $sql = 'SELECT IsoCode
+ FROM ' . $table_name . '
+ WHERE (Type = ' . DESTINATION_TYPE_STATE . ') AND (StateCountryId = %2$s) AND
+ (
+ (IsoCode = %3$s) OR (UPPER(l%1$s_Name) = %3$s)
+ )';
- $sql = sprintf($sql, (int)$this->Application->GetVar('m_lang'), $this->Conn->qstr($country_code), $this->Conn->qstr($state_name) );
+ $state_name = trim( mb_strtoupper($state_name) );
+ $sql = sprintf($sql, (int)$this->Application->GetVar('m_lang'), $country_id, $this->Conn->qstr($state_name));
return $this->Conn->GetOne($sql);
}
- function CheckStateField(&$event, $state_field, $country_field)
+ function CheckStateField(&$event, $state_field, $country_field, $auto_required = true)
{
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- if($items_info)
- {
- list($id, $field_values) = each($items_info);
- if( isset($field_values[$state_field]) && isset($field_values[$country_field]) )
- {
- $user_state = getArrayValue($field_values,$state_field);
- $valid_state = $this->CheckState($user_state, getArrayValue($field_values,$country_field) );
- if($valid_state !== false)
- {
- $field_values[$state_field] = $valid_state;
- $items_info[$id] = $field_values;
- $this->Application->SetVar( $event->getPrefixSpecial(true), $items_info);
- }
- else
- {
- $object =& $event->getObject();
- $object->Fields[$state_field]['options'][$user_state] = $user_state;
- $object->SetError($state_field, 'invalid_state', 'la_invalid_state');
- }
+ $country_iso = $object->GetDBField($country_field);
+
+ if ($auto_required) {
+ $object->setRequired($state_field, $this->CountryHasStates($country_iso));
+ }
+
+ $state = $object->GetDBField($state_field);
+
+ if ($country_iso && $state) {
+ $state_iso = $this->getStateIso($state, $country_iso);
+
+ if ($state_iso !== false) {
+ // replace state name with it's ISO code
+ $object->SetDBField($state_field, $state_iso);
}
+ else {
+ // state not found by name -> report error
+ $object->SetError($state_field, 'invalid_state', 'la_invalid_state');
+ }
}
}
+
+ /**
+ * Returns country/state id based on given iso code and it's type
+ *
+ * @param string $iso_code
+ * @param int $type
+ * @return int
+ */
+ function getCountryStateId($iso_code, $type)
+ {
+ $sql = 'SELECT ' . $this->Application->getUnitOption('country-state', 'IDField') . '
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE (Type = ' . $type . ') AND (IsoCode = ' . $this->Conn->qstr($iso_code) . ')';
+
+ return (int)$this->Conn->GetOne($sql);
+ }
+
+ /**
+ * Returns 3 symbols ISO code from 2 symbols ISO code or otherwise, when $from_short parameter is used
+ *
+ * @param string $iso_code
+ * @param bool $from_short
+ * @return string
+ */
+ function getCountryIso($iso_code, $from_short = false)
+ {
+ if ($from_short) {
+ $sql = 'SELECT IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE ShortIsoCode = ' . $this->Conn->qstr($iso_code) . ' AND `Type` = ' . DESTINATION_TYPE_COUNTRY;
+ }
+ else {
+ $sql = 'SELECT ShortIsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE IsoCode = ' . $this->Conn->qstr($iso_code) . ' AND `Type` = ' . DESTINATION_TYPE_COUNTRY;
+ }
+
+ return $this->Conn->GetOne($sql);
+ }
}
\ No newline at end of file
Index: units/helpers/language_import_helper.php
===================================================================
--- units/helpers/language_import_helper.php (revision 13400)
+++ units/helpers/language_import_helper.php (working copy)
@@ -101,7 +101,7 @@
*
* @var int
*/
- var $_latestVersion = 2;
+ var $_latestVersion = 3;
/**
* Prefix-based serial numbers, that should be changed after import is finished
@@ -170,6 +170,7 @@
foreach ($this->_languages as $language_id) {
$this->_performUpgrade($language_id, 'phrases', 'PhraseKey', Array ('l%s_Translation'));
$this->_performUpgrade($language_id, 'emailevents', 'EventId', Array ('l%s_Subject', 'Headers', 'MessageType', 'l%s_Body'));
+ $this->_performUpgrade($language_id, 'country-state', 'CountryStateId', Array ('l%s_Name'));
}
$this->_initImportTables(true);
@@ -204,9 +205,7 @@
$phrase_types = explode('|', substr($phrase_types, 1, -1) );
$module_ids = explode('|', substr($module_ids, 1, -1) );
- $phrase_tpl = "\t\t\t".'<PHRASE Label="%s" Module="%s" Type="%s">%s</PHRASE>'."\n";
- $event_tpl = "\t\t\t".'<EVENT MessageType="%s" Event="%s" Type="%s">%s</EVENT>'."\n";
- $ret = '<LANGUAGES Version="' . $this->_latestVersion . '">'."\n";
+ $ret = '<LANGUAGES Version="' . $this->_latestVersion . '">' . "\n";
$export_fields = $this->_getExportFields();
@@ -235,11 +234,35 @@
$module_sql = preg_replace('/(.*),/U', 'INSTR(Module,\'\\1\') OR ', implode(',', $module_ids) . ',');
$sql = 'SELECT *
- FROM ' . $this->Application->getUnitOption('emailevents','TableName') . '
+ FROM ' . $this->Application->getUnitOption('emailevents', 'TableName') . '
WHERE ' . substr($module_sql, 0, -4) . '
ORDER BY `Event`, `Type`';
$events = $this->Conn->Query($sql, 'EventId');
+ // countries
+ $sql = 'SELECT *
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY `IsoCode`';
+ $countries = $this->Conn->Query($sql, 'CountryStateId');
+
+ // states
+ $sql = 'SELECT *
+ FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . '
+ WHERE Type = ' . DESTINATION_TYPE_STATE . '
+ ORDER BY `IsoCode`';
+ $states = $this->Conn->Query($sql, 'CountryStateId');
+
+ foreach ($states as $state_id => $state_data) {
+ $country_id = $state_data['StateCountryId'];
+
+ if (!array_key_exists('States', $countries[$country_id])) {
+ $countries[$country_id]['States'] = Array ();
+ }
+
+ $countries[$country_id]['States'][] = $state_id;
+ }
+
foreach ($languages as $language_id => $language_info) {
// language
$ret .= "\t" . '<LANGUAGE Encoding="' . $this->_exportEncoding . '"';
@@ -251,11 +274,14 @@
$ret .= '>' . "\n";
// filename replacements
- $ret .= "\t\t" . '<REPLACEMENTS>';
$replacements = $language_info['FilenameReplacements'];
- $ret .= $this->_exportEncoding == 'base64' ? base64_encode($replacements) : '<![CDATA[' . $replacements . ']]>';
- $ret .= '</REPLACEMENTS>' . "\n";
+ if ($replacements) {
+ $ret .= "\t\t" . '<REPLACEMENTS>';
+ $ret .= $this->_exportEncoding == 'base64' ? base64_encode($replacements) : '<![CDATA[' . $replacements . ']]>';
+ $ret .= '</REPLACEMENTS>' . "\n";
+ }
+
// phrases
if ($phrases) {
$ret .= "\t\t" . '<PHRASES>' . "\n";
@@ -268,32 +294,74 @@
}
$data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : '<![CDATA[' . $translation . ']]>';
- $ret .= sprintf($phrase_tpl, $phrase['Phrase'], $phrase['Module'], $phrase['PhraseType'], $data);
+ $ret .= "\t\t\t" . '<PHRASE Label="' . $phrase['Phrase'] . '" Module="' . $phrase['Module'] . '" Type="' . $phrase['PhraseType'] . '">' . $data . '</PHRASE>' . "\n";
}
+
$ret .= "\t\t" . '</PHRASES>' . "\n";
}
// email events
- $ret .= "\t\t" . '<EVENTS>' . "\n";
+ if ($events) {
+ $ret .= "\t\t" . '<EVENTS>' . "\n";
- foreach ($events as $event_id => $event) {
- $fields_hash = Array (
- 'Headers' => $event['Headers'],
- 'Subject' => $event['l' . $language_id . '_Subject'],
- 'Body' => $event['l' . $language_id . '_Body'],
- );
+ foreach ($events as $event_id => $event) {
+ $fields_hash = Array (
+ 'Headers' => $event['Headers'],
+ 'Subject' => $event['l' . $language_id . '_Subject'],
+ 'Body' => $event['l' . $language_id . '_Body'],
+ );
- $template = $email_message_helper->buildTemplate($fields_hash);
+ $template = $email_message_helper->buildTemplate($fields_hash);
- if (!$template) {
- // email event is not translated on given language
- continue;
+ if (!$template) {
+ // email event is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($template) : '<![CDATA[' . $template . ']]>';
+ $ret .= "\t\t\t".'<EVENT MessageType="' . $event['MessageType'] . '" Event="' . $event['Event'] . '" Type="' . $event['Type'] . '">' . $data . '</EVENT>'."\n";
}
- $data = $this->_exportEncoding == 'base64' ? base64_encode($template) : '<![CDATA[' . $template . ']]>';
- $ret .= sprintf($event_tpl, $event['MessageType'], $event['Event'], $event['Type'], $data);
+ $ret .= "\t\t" . '</EVENTS>' . "\n";
}
- $ret .= "\t\t" . '</EVENTS>' . "\n";
+
+ if ($countries) {
+ $ret .= "\t\t" . '<COUNTRIES>' . "\n";
+ foreach ($countries as $country_id => $country_data) {
+ $translation = $country_data['l' . $language_id . '_Name'];
+
+ if (!$translation) {
+ // country is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
+
+ if (array_key_exists('States', $country_data)) {
+ $ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '">' . "\n";
+
+ foreach ($country_data['States'] as $state_id) {
+ $translation = $states[$state_id]['l' . $language_id . '_Name'];
+
+ if (!$translation) {
+ // state is not translated on given language
+ continue;
+ }
+
+ $data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
+ $ret .= "\t\t\t\t" . '<STATE Iso="' . $states[$state_id]['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
+ }
+
+ $ret .= "\t\t\t" . '</COUNTRY>' . "\n";
+ }
+ else {
+ $ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
+ }
+ }
+
+ $ret .= "\t\t" . '</COUNTRIES>' . "\n";
+ }
+
$ret .= "\t" . '</LANGUAGE>' . "\n";
}
@@ -460,6 +528,7 @@
{
$this->_tables['phrases'] = $this->_prepareTempTable('phrases', $drop_only);
$this->_tables['emailevents'] = $this->_prepareTempTable('emailevents', $drop_only);
+ $this->_tables['country-state'] = $this->_prepareTempTable('country-state', $drop_only);
}
/**
@@ -483,7 +552,24 @@
$sql = 'ALTER TABLE %1$s CHANGE %2$s %2$s INT(11) NOT NULL DEFAULT "0"';
$this->Conn->Query( sprintf($sql, $temp_table, $idfield) );
- $unique_field = $prefix == 'phrases' ? 'PhraseKey' : 'EventId';
+ switch ($prefix) {
+ case 'phrases':
+ $unique_field = 'PhraseKey';
+ break;
+
+ case 'emailevents':
+ $unique_field = 'EventId';
+ break;
+
+ case 'country-state':
+ $unique_field = 'CountryStateId';
+ break;
+
+ default:
+ trigger_error('Unknown prefix "<strong>' . $prefix . '</strong>" during language pack import', E_USER_ERROR);
+ break;
+ }
+
$sql = 'ALTER TABLE ' . $temp_table . ' ADD UNIQUE (' . $unique_field . ')';
$this->Conn->Query($sql);
}
@@ -606,6 +692,16 @@
}
break;
+ case 'COUNTRIES':
+ if ($sub_node->Children) {
+ if (!$language_id) {
+ $language_id = $this->_processLanguage($fields_hash);
+ }
+
+ $this->_processCountries($sub_node->firstChild, $language_id, $fields_hash['Encoding']);
+ }
+ break;
+
case 'REPLACEMENTS':
// added since v2
$replacements = $sub_node->Data;
@@ -750,6 +846,58 @@
}
/**
+ * Performs country_state translation import
+ *
+ * @param kXMLNode $country_state_node
+ * @param int $language_id
+ * @param string $language_encoding
+ */
+ function _processCountries(&$country_state_node, $language_id, $language_encoding, $process_states = false)
+ {
+ static $other_translations = Array ();
+
+ do {
+ if ($process_states) {
+ $country_state_id = $this->_getStateId($country_state_node->Parent->Attributes['ISO'], $country_state_node->Attributes['ISO']);
+ }
+ else {
+ $country_state_id = $this->_getCountryId($country_state_node->Attributes['ISO']);
+ }
+
+ if ($country_state_id) {
+ if ($language_encoding == 'plain') {
+ $translation = rtrim($country_state_node->Attributes['TRANSLATION']);
+ }
+ else {
+ $translation = base64_decode($country_state_node->Attributes['TRANSLATION']);
+ }
+
+ $fields_hash = Array (
+ 'CountryStateId' => $country_state_id,
+ );
+
+ if (array_key_exists($country_state_id, $other_translations)) {
+ $other_translations[$country_state_id]['l' . $language_id . '_Name'] = $translation;
+ }
+ else {
+ $other_translations[$country_state_id] = Array (
+ 'l' . $language_id . '_Name' => $translation,
+ );
+ }
+
+ $fields_hash = array_merge($fields_hash, $other_translations[$country_state_id]);
+ $this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE', false);
+
+ if (!$process_states && $country_state_node->Children) {
+ $this->_processCountries($country_state_node->firstChild, $language_id, $language_encoding, true);
+ }
+ }
+ } while (($country_state_node =& $country_state_node->NextSibling()));
+
+ $this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE');
+ }
+
+ /**
* Creates/updates language based on given fields and returns it's id
*
* @param Array $fields_hash
@@ -809,4 +957,47 @@
return array_key_exists($cache_key, $this->events_hash) ? $this->events_hash[$cache_key] : 0;
}
+
+ /**
+ * Returns country id based on it's 3letter ISO code
+ *
+ * @param string $iso
+ * @return int
+ */
+ function _getCountryId($iso)
+ {
+ static $cache = null;
+
+ if (!isset($cache)) {
+ $sql = 'SELECT CountryStateId, IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY;
+ $cache = $this->Conn->GetCol($sql, 'IsoCode');
+ }
+
+ return array_key_exists($iso, $cache) ? $cache[$iso] : false;
+ }
+
+ /**
+ * Returns state id based on 3letter country ISO code and 2letter state ISO code
+ *
+ * @param string $country_iso
+ * @param string $state_iso
+ * @return int
+ */
+ function _getStateId($country_iso, $state_iso)
+ {
+ static $cache = null;
+
+ if (!isset($cache)) {
+ $sql = 'SELECT CountryStateId, CONCAT(StateCountryId, "-", IsoCode) AS IsoCode
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_STATE;
+ $cache = $this->Conn->GetCol($sql, 'IsoCode');
+ }
+
+ $country_id = $this->_getCountryId($country_iso);
+
+ return array_key_exists($country_id . '-' . $state_iso, $cache) ? $cache[$country_id . '-' . $state_iso] : false;
+ }
}
\ No newline at end of file
Index: units/helpers/mod_rewrite_helper.php
===================================================================
--- units/helpers/mod_rewrite_helper.php (revision 13400)
+++ units/helpers/mod_rewrite_helper.php (working copy)
@@ -1009,7 +1009,8 @@
{
static $init_done = false;
- if ($init_done) {
+ if ($init_done || count($this->Application->RewriteListeners) == 0) {
+ // not inited OR mod-rewrite url with missing config cache
return ;
}
Index: units/users/users_config.php
===================================================================
--- units/users/users_config.php (revision 13432)
+++ units/users/users_config.php (working copy)
@@ -28,17 +28,6 @@
'ConfigPriority' => 0,
'Hooks' => Array (
Array (
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'u',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnPrepareStates',
- ),
-
- Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'affil',
@@ -375,11 +364,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'default' => ''
),
'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
Index: units/users/users_event_handler.php
===================================================================
--- units/users/users_event_handler.php (revision 13432)
+++ units/users/users_event_handler.php (working copy)
@@ -551,23 +551,6 @@
}
/**
- * Prefill states dropdown with correct values
- *
- * @param kEvent $event
- * @access public
- */
- function OnPrepareStates(&$event)
- {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->PopulateStates($event, 'State', 'Country');
-
- $object =& $event->getObject();
-
- if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
- $object->setLogin();
- }
-
- /**
* Redirects user after succesfull registration to confirmation template (on Front only)
*
* @param kEvent $event
@@ -685,26 +668,32 @@
* Enter description here...
*
* @param kEvent $event
+ * @param bool $dry_run
* @return bool
*/
- function isSubscriberOnly(&$event)
+ function isSubscriberOnly(&$event, $dry_run = false)
{
$event->CallSubEvent('OnSubstituteSubscriber');
- $is_subscriber = false;
- if( $event->getEventParam('is_subscriber_only') )
- {
- $is_subscriber = true;
+ $is_subscriber = $event->getEventParam('is_subscriber_only');
+
+ if ($dry_run) {
+ return $is_subscriber;
+ }
+
+ if ($is_subscriber) {
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->OnUpdate($event);
- if($event->status == erSUCCESS)
- {
+
+ if ($event->status == erSUCCESS) {
$this->OnAfterItemCreate($event);
$object->SendEmailEvents();
- if (!$this->Application->isAdmin && ($event->status == erSUCCESS) && $event->redirect) {
+
+ if (!$this->Application->isAdmin && $event->redirect) {
$this->autoLoginUser($event);
}
}
}
+
return $is_subscriber;
}
@@ -720,9 +709,6 @@
}
if (!$this->isSubscriberOnly($event)) {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->CheckStateField($event, 'State', 'Country');
-
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
if ($this->Application->ConfigValue('User_Password_Auto')) {
@@ -786,18 +772,33 @@
*/
function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if (!$this->isSubscriberOnly($event, true)) {
+ $cs_helper->CheckStateField($event, 'State', 'Country');
+ }
+
$this->_makePasswordRequired($event);
+ $cs_helper->PopulateStates($event, 'State', 'Country');
- $email_as_login = $this->Application->ConfigValue('Email_As_Login');
$object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ( $this->Application->ConfigValue('Email_As_Login') ) {
+ $field_options = $object->GetFieldOptions('Email');
+ $field_options['error_msgs']['unique'] = $this->Application->Phrase('lu_user_and_email_already_exist');
+ $object->SetFieldOptions('Email', $field_options);
+ }
+
+ $object->setLogin();
+
if (!$this->checkBanRules($object)) {
$event->status = erFAIL;
- return false;
+ return ;
}
- if ($email_as_login) {
- $object->Fields['Email']['error_msgs']['unique'] = $this->Application->Phrase('lu_user_and_email_already_exist');
- }
-
}
/**
@@ -885,15 +886,23 @@
$object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- if($items_info)
- {
- list($id,$field_values) = each($items_info);
- if($id > 0) $object->Load($id);
+
+ if ($items_info) {
+ list ($id, $field_values) = each($items_info);
+ if ($id > 0) {
+ $object->Load($id);
+ }
+
$object->SetFieldsFromHash($field_values);
$object->setID($id);
$object->Validate();
}
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'State', 'Country');
+
$event->redirect = false;
}
@@ -1190,12 +1199,30 @@
function OnUpdate(&$event)
{
+ parent::OnUpdate($event);
+
+ $this->setNextTemplate($event);
+ }
+
+ /**
+ * Checks state against country
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->CheckStateField($event, 'State', 'Country');
+ $cs_helper->PopulateStates($event, 'State', 'Country');
- parent::OnUpdate($event);
+ $object =& $event->getObject();
+ /* @var $object UsersItem */
- $this->setNextTemplate($event);
+ $object->setLogin();
}
/**
@@ -1599,7 +1626,7 @@
if ($first_country) {
// update user country dropdown sql
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
- $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (DestId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']);
+ $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (CountryStateId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']);
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
}
@@ -1785,6 +1812,11 @@
/* @var $object kDBItem */
$image_helper->LoadItemImages($object);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'State', 'Country');
}
/**
country_state_refactoring_modules_v2.patch [^] (145,690 bytes) 2010-04-27 14:24
[Show Content]
Index: in-auction/install/install_data.sql
===================================================================
--- in-auction/install/install_data.sql (revision 13439)
+++ in-auction/install/install_data.sql (working copy)
@@ -1,6 +1,6 @@
# Section "ebay:configuration_feedbacks":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_EnableFeedback', '0', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_title_eBay_EnableAutomaticFeedback', 'checkbox', '', '', 1, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackEvent', '3', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackEvent', 'select', '', '1=la_PaymentReceived,2=la_ItemShipped,3=la_PaymentReceivedOrItemShipped,4=la_WhenBuyerLeavesFeedback', 2, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackEvent', '3', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackEvent', 'select', '', '1=la_PaymentReceived||2=la_ItemShipped||3=la_PaymentReceivedOrItemShipped||4=la_WhenBuyerLeavesFeedback', 2, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_EnableFeedbackRotation', '1', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_EnableFeedbackRotation', 'checkbox', '', '', 3, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackMessage1', '', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackMessage1', 'textarea', '', 'COLS=40 ROWS=5', 4, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackMessage2', '', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_General', 'la_config_eBay_FeedbackMessage2', 'textarea', '', 'COLS=40 ROWS=5', 5, 0, 0, NULL);
@@ -14,7 +14,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_FeedbackNotificationCCtoSeller', '1', 'In-Auction', 'ebay:configuration_feedbacks', 'la_title_Notifications', 'la_config_eBay_FeedbackNotificationCCtoSeller', 'checkbox', '', '', 13, 0, 0, NULL);
# Section "eBay:configuration_general":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ConnectionMode', '2', 'In-Auction', 'eBay:configuration_general', 'la_title_General', 'la_config_eBay_ConnectionMode', 'radio', '', '1=la_opt_Production,2=la_opt_Sandbox', 10.01, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ConnectionMode', '2', 'In-Auction', 'eBay:configuration_general', 'la_title_General', 'la_config_eBay_ConnectionMode', 'radio', '', '1=la_opt_Production||2=la_opt_Sandbox', 10.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_CompatibilityLevel', '549', 'In-Auction', 'eBay:configuration_general', 'la_title_General', 'la_config_eBay_CompatibilityLevel', 'text', '', '', 10.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_Production_NewAuthToken', NULL, 'In-Auction', 'eBay:configuration_general', 'la_title_ProductionSettings', 'la_config_eBay_NewAuthToken', 'textarea', '', 'COLS=40 ROWS=5', 20.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_Production_SOAPGateway', 'https://api.ebay.com/wsapi', 'In-Auction', 'eBay:configuration_general', 'la_title_ProductionSettings', 'la_config_eBay_SOAPGateway', 'text', '', 'size="40"', 20.05, 0, 0, NULL);
@@ -52,7 +52,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ReturnRequestDays', '32031', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_ReturnRequestDays', 'select', '', '<SQL+>SELECT FieldOptionKey AS OptionValue , FieldOptionTitle AS OptionName FROM <PREFIX>eBayFieldOptions WHERE FieldName="ReturnRequestDays"</SQL>', 30.243, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_ReturnPolicyDetails', 'No Excuses', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_ReturnPolicyDetails', 'textarea', '', 'COLS=40 ROWS=5', 30.25, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_PaymentInstructions', 'Payment Instructions', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_PaymentInstructions', 'textarea', '', 'COLS=40 ROWS=5', 30.27, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_InsuranceType', '1', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_InsuranceType', 'select', '', '1=+Percent,2=+Flat', 55, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_InsuranceType', '1', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_InsuranceType', 'select', '', '1=+Percent||2=+Flat', 55, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_InsuranceAmount', '5', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_InsuranceAmount', 'text', '', 'size="5"', 56, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_UseInsurance', 'IncludedInShippingHandling', 'In-Auction', 'eBay:listings_defaults', 'la_title_Insurance', 'la_title_UseInsurance', 'select', '', '<SQL+>SELECT FieldOptionKey AS OptionValue , FieldOptionTitle AS OptionName FROM <PREFIX>eBayFieldOptions WHERE FieldName="InsuranceOption"</SQL>', 57, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'eBay_GetItFast', '0', 'In-Auction', 'eBay:listings_defaults', 'la_title_General', 'la_title_GetItFast', 'checkbox', '', '', 60, 0, 0, NULL);
Index: in-auction/units/listing/listing_eh.php
===================================================================
--- in-auction/units/listing/listing_eh.php (revision 13400)
+++ in-auction/units/listing/listing_eh.php (working copy)
@@ -507,12 +507,12 @@
$location = trim($location, ',');
$country = $this->Application->ConfigValue('Comm_Shipping_Country'); // as USA
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
// Convert to 2-symbol - as US
- $sql = 'SELECT DestAbbr2
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr = '.$this->Conn->qstr($country).'
- ';
- $country = $this->Conn->GetOne($sql);
+ $country = $cs_helper->getCountryIso($country);
$a_item = Array(
'Currency'=> 'USD',
Index: in-auction/units/sections/ebay_eh.php
===================================================================
--- in-auction/units/sections/ebay_eh.php (revision 13400)
+++ in-auction/units/sections/ebay_eh.php (working copy)
@@ -1942,13 +1942,12 @@
$ShippingAddress =& $Transaction->Buyer->BuyerInfo->ShippingAddress;
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
// Country transform to 3-symbol code
- $sql = 'SELECT DestAbbr
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr2 = '.$this->Conn->qstr($ShippingAddress->Country);
- $country = $this->Conn->GetOne($sql);
+ $country = $cs_helper->getCountryIso($ShippingAddress->Country, true);
-
$Order->SetDBField('BillingTo', $ShippingAddress->Name);
$Order->SetDBField('BillingPhone', $ShippingAddress->Phone);
$Order->SetDBField('BillingEmail', $User->GetDBField('Email'));
Index: in-bulletin/install/install_data.sql
===================================================================
--- in-bulletin/install/install_data.sql (revision 13440)
+++ in-bulletin/install/install_data.sql (working copy)
@@ -1,10 +1,10 @@
# Section "in-bulletin:configuration_output":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_Highlight_OpenTag', '<span class="match">', 'In-Bulletin', 'in-bulletin:configuration_output', '', '', '', NULL, NULL, 0, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_Highlight_CloseTag', '</span>', 'In-Bulletin', 'in-bulletin:configuration_output', '', '', '', NULL, NULL, 0, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.01, 2, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField', 'LastPostDate', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'TopicText=la_opt_TopicText,Posts=la_opt_NumberOfPosts,CreatedOn=la_opt_CreatedOn,LastPostDate=la_opt_LastUpdated,Views=la_opt_TopicViews,CachedRating=la_opt_Rating,LastPoser=la_opt_LastPoster,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder2', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 10.02, 2, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField2', 'Posts', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'TopicText=la_opt_TopicText,Posts=la_opt_NumberOfPosts,CreatedOn=la_opt_CreatedOn,LastPostDate=la_opt_LastUpdated,Views=la_opt_TopicViews,CachedRating=la_opt_Rating,LastPoser=la_opt_LastPoster,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.01, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField', 'LastPostDate', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'TopicText=la_opt_TopicText||Posts=la_opt_NumberOfPosts||CreatedOn=la_opt_CreatedOn||LastPostDate=la_opt_LastUpdated||Views=la_opt_TopicViews||CachedRating=la_opt_Rating||LastPoser=la_opt_LastPoster||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortOrder2', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.02, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_SortField2', 'Posts', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'TopicText=la_opt_TopicText||Posts=la_opt_NumberOfPosts||CreatedOn=la_opt_CreatedOn||LastPostDate=la_opt_LastUpdated||Views=la_opt_TopicViews||CachedRating=la_opt_Rating||LastPoser=la_opt_LastPoster||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Topics', '5', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_perpage_prompt', 'text', '', '', 10.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Topics_Short', '3', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_perpage_short_prompt', 'text', '', '', 10.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_NewDays', '6', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_newdays_prompt', 'text', '', '', 10.05, 0, 1, NULL);
@@ -12,9 +12,9 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_MinPopVotes', '8', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_fld_Topic_MinPopVotes', 'text', '', '', 10.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_MaxHotNumber', '3', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_fld_Topic_MaxHotNumber', 'text', '', '', 10.08, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Topic_EditorPicksAbove', '1', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_editorpicksabove_prompt', 'checkbox', '', '', 10.09, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_ReviewDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.1, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_ReviewDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.1, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_ReviewDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.1, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_RatingDelay_Interval', '3600', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.11, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_RatingDelay_Interval', '3600', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.11, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'topic_RatingDelay_Value', '1', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.11, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AutoTopicLockPosts', '0', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_PostsToLock', 'text', NULL, NULL, 10.12, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Postings', '25', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_posts_subheading', 'la_posts_perpage_prompt', 'text', '', '', 20.01, 0, 1, NULL);
@@ -28,7 +28,7 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'bb_FullImageWidth', '450', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 50.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'bb_FullImageHeight', '450', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 50.05, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'poll_CommentDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'text', '', 'style="width: 50px;"', 60.1, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'poll_CommentDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 60.2, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'poll_CommentDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 60.2, 2, 1, NULL);
# Section "in-bulletin:configuration_search":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Increase_topics', '30', 'In-Bulletin', 'in-bulletin:configuration_search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1, NULL);
Index: in-commerce/admin_templates/discounts/gift_certificate_edit.tpl
===================================================================
--- in-commerce/admin_templates/discounts/gift_certificate_edit.tpl (revision 13400)
+++ in-commerce/admin_templates/discounts/gift_certificate_edit.tpl (working copy)
@@ -140,7 +140,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientCity" title="la_fld_City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientState" title="la_fld_State"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="gc" field="RecipientCountry" title="la_fld_Country" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
</inp2:m_if>
Index: in-commerce/admin_templates/shipping/zone_edit.tpl
===================================================================
--- in-commerce/admin_templates/shipping/zone_edit.tpl (revision 13400)
+++ in-commerce/admin_templates/shipping/zone_edit.tpl (working copy)
@@ -56,7 +56,7 @@
</tbody>
</table>
-<inp2:m_DefineElement name="destination_block">
+<inp2:m_DefineElement name="destination_block" selected="">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
</inp2:m_DefineElement>
@@ -160,6 +160,9 @@
<inp2:z_SaveWarning name="grid_save_warning"/>
<inp2:z_ErrorWarning name="form_error_warning"/>
+<!--## used for OnCountryChange event ##-->
+<input type="hidden" name="z_id" value="<inp2:z_Field name='ZoneID'/>"/>
+
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_ShippingZone!"/>
@@ -171,17 +174,15 @@
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="z" field="CODallowed" title="!la_fld_CODallowed!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="z" field="Type" title="!la_fld_Zone_Type!"/>
- <!-- <inp2:z_ShowDestinations block="destination_block" /> -->
-
- <inp2:m_if check="z_fieldequals" field="Type" value="1" >
+ <inp2:m_if check="z_Field" field="Type" equals_to="1" db="db">
<inp2:m_RenderElement name="countries_multiple" prefix="z" />
</inp2:m_if>
- <inp2:m_if check="z_fieldequals" field="Type" value="2" >
+ <inp2:m_if check="z_Field" field="Type" equals_to="2" db="db">
<inp2:m_RenderElement name="states_multiple" prefix="z" />
</inp2:m_if>
- <inp2:m_if check="z_fieldequals" field="Type" value="3" >
+ <inp2:m_if check="z_Field" field="Type" equals_to="3" db="db">
<inp2:m_RenderElement name="zips_multiple" prefix="z" />
</inp2:m_if>
@@ -193,8 +194,7 @@
<input type="hidden" value="" name="selected_destinations" id="selected_destinations">
<input type="hidden" name="z_OriginalSaveEvent" id="z_OriginalSaveEvent" value="<inp2:z_SaveEvent/>">
-<input type="hidden" name="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" id="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" value="<inp2:z_field field="ShippingTypeID"/>">
-<input type="hidden" name="z_id" id="z_id" value="<inp2:z_Field field="ZoneID"/>">
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="z" field="ShippingTypeID"/>
<script>
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_1').onchange = change_type;
Index: in-commerce/admin_templates/taxes/taxes_edit.tpl
===================================================================
--- in-commerce/admin_templates/taxes/taxes_edit.tpl (revision 13400)
+++ in-commerce/admin_templates/taxes/taxes_edit.tpl (working copy)
@@ -54,7 +54,7 @@
</tbody>
</table>
-<inp2:m_DefineElement name="destination_block">
+<inp2:m_DefineElement name="destination_block" selected="">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
</inp2:m_DefineElement>
@@ -173,17 +173,15 @@
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="tax" field="ApplyToProcessing" title="!la_fld_TaxApplyToProcessing!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="tax" field="Type" title="!la_fld_ZoneType!"/>
- <!-- <inp2:tax_ShowDestinations block="destination_block" /> -->
-
- <inp2:m_if check="tax_fieldequals" field="Type" value="1" >
+ <inp2:m_if check="tax_Field" field="Type" equals_to="1" db="db">
<inp2:m_RenderElement name="countries_multiple" prefix="tax" />
</inp2:m_if>
- <inp2:m_if check="tax_fieldequals" field="Type" value="2" >
+ <inp2:m_if check="tax_Field" field="Type" equals_to="2" db="db">
<inp2:m_RenderElement name="states_multiple" prefix="tax" />
</inp2:m_if>
- <inp2:m_if check="tax_fieldequals" field="Type" value="3" >
+ <inp2:m_if check="tax_Field" field="Type" equals_to="3" db="db">
<inp2:m_RenderElement name="zips_multiple" prefix="tax" />
</inp2:m_if>
Index: in-commerce/install/install_data.sql
===================================================================
--- in-commerce/install/install_data.sql (revision 13441)
+++ in-commerce/install/install_data.sql (working copy)
@@ -10,13 +10,13 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_AddressLine2', 'text', NULL, NULL, 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_City', 'text', NULL, NULL, 20.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_ZIP', 'text', NULL, NULL, 20.04, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 20.05, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 20.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_State', 'text', NULL, '', 20.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine1', 'text', NULL, NULL, 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine2', 'text', NULL, NULL, 30.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_City', 'text', NULL, NULL, 30.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_ZIP', 'text', NULL, NULL, 30.04, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 30.05, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 30.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_State', 'text', NULL, NULL, 30.06, 0, 1, NULL);
# Section "in-commerce:general":
@@ -32,18 +32,18 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxAddresses', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaxAddresses', 'text', NULL, NULL, 10.1, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_MaskProcessedCreditCards', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaskProcessedCreditCards', 'checkbox', NULL, NULL, 10.11, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AllowOrderingInNonPrimaryCurrency', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_AllowOrderingInNonPrimaryCurrency', 'checkbox', NULL, NULL, 20.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank,3=la_EuropeanCentralBank,1=la_BankOfLatvia', 20.02, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank||3=la_EuropeanCentralBank||1=la_BankOfLatvia', 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_DefaultCouponDuration', '14', 'In-Commerce', 'in-commerce:general', 'la_Text_Coupons', 'la_conf_DefaultCouponDuration', 'text', NULL, NULL, 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RegisterAsAffiliate', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_register_as_affiliate', 'checkbox', NULL, '', 40.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session,2=la_opt_PermanentCookie', 40.02, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session||2=la_opt_PermanentCookie', 40.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateCookieDuration', '30', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_cookie_duration', 'text', NULL, '', 40.03, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal', 50, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary||2=la_opt_PriceCalculationByOptimal', 50, 0, 1, NULL);
# Section "in-commerce:output":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.01, 2, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.02, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName CONCAT("cust_" FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.01, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName CONCAT("cust_" FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.02, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products', 'text', NULL, NULL, 10.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products_Shortlist', 'text', NULL, NULL, 10.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_NewDays', '7', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_DaysToBeNew', 'text', NULL, NULL, 10.05, 0, 1, NULL);
@@ -52,11 +52,11 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MaxHotNumber', '5', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MaxHotNumber', 'text', NULL, NULL, 10.08, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'products_EditorPicksAboveRegular', '1', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_EditorPicksAboveRegular', 'checkbox', NULL, NULL, 10.09, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.1, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.1, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.1, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ShowProductImagesInOrders', '0', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_config_ShowProductImagesInOrders', 'checkbox', NULL, NULL, 10.11, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Reviews', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_config_PerpageReviews', 'text', NULL, NULL, 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 20.02, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 20.02, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 20.02, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers', 'text', NULL, NULL, 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers_Short', 'text', NULL, NULL, 30.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_CategoryTemplate', '/in-commerce/designs/section', 'In-Commerce', 'in-commerce:output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0, NULL);
Index: in-commerce/install/upgrades.sql
===================================================================
--- in-commerce/install/upgrades.sql (revision 13400)
+++ in-commerce/install/upgrades.sql (working copy)
@@ -122,4 +122,8 @@
# ===== v 5.0.2 =====
# ===== v 5.1.0-B1 =====
-UPDATE Modules SET Path = 'modules/in-commerce/' WHERE `Name` = 'In-Commerce';
\ No newline at end of file
+UPDATE Modules SET Path = 'modules/in-commerce/' WHERE `Name` = 'In-Commerce';
+
+UPDATE ConfigurationValues
+SET ValueList = '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
+WHERE ValueList = '0=lu_none||<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>';
\ No newline at end of file
Index: in-commerce/units/addresses/addresses_config.php
===================================================================
--- in-commerce/units/addresses/addresses_config.php (revision 13400)
+++ in-commerce/units/addresses/addresses_config.php (working copy)
@@ -22,17 +22,6 @@
'AutoLoad' => true,
'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => '',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate'),
- 'DoPrefix' => '',
- 'DoSpecial' => '*',
- 'DoEvent' => 'OnPrepareStates',
- ),
-
// create/update profile addres (in addresses table)
Array(
'Mode' => hAFTER,
@@ -108,11 +97,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => '1', 'required' => 1, 'default' => ''
),
Index: in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- in-commerce/units/addresses/addresses_event_handler.php (revision 13400)
+++ in-commerce/units/addresses/addresses_event_handler.php (working copy)
@@ -88,17 +88,18 @@
return ;
}
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->CheckStateField($event, 'State', 'Country');
+ $cs_helper->PopulateStates($event, 'State', 'Country');
+
$this->processLastUsed($object, 'Shipping');
$this->processLastUsed($object, 'Billing');
}
function OnUpdate(&$event)
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- /* @var $cs_helper kCountryStatesHelper */
-
- $cs_helper->CheckStateField($event, 'State', 'Country');
-
parent::OnUpdate($event);
$this->setNextTemplate($event);
@@ -111,11 +112,6 @@
*/
function OnCreate(&$event)
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- /* @var $cs_helper kCountryStatesHelper */
-
- $cs_helper->CheckStateField($event, 'State', 'Country');
-
parent::OnCreate($event);
$this->setNextTemplate($event);
@@ -140,22 +136,20 @@
}
/**
- * [HOOK] Prefill states dropdown with correct values
+ * Fills states for object country
*
* @param kEvent $event
- * @access public
*/
- function OnPrepareStates(&$event)
+ function OnAfterItemLoad(&$event)
{
+ parent::OnAfterItemLoad($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'State', 'Country');
-
- $object =& $event->MasterEvent->getObject();
-
- if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
}
-
/**
* [HOOK] Update PortalUser table when address marked as ProfileAddress is changed via addr prefix object
*
@@ -303,6 +297,12 @@
$object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->CheckStateField($event, 'State', 'Country');
+ $cs_helper->PopulateStates($event, 'State', 'Country');
+
$this->processLastUsed($object, 'Shipping');
$this->processLastUsed($object, 'Billing');
}
Index: in-commerce/units/gateways/gw_classes/authorizenet.php
===================================================================
--- in-commerce/units/gateways/gw_classes/authorizenet.php (revision 13400)
+++ in-commerce/units/gateways/gw_classes/authorizenet.php (working copy)
@@ -53,9 +53,11 @@
}
$post_fields['x_email'] = $billing_email;
$post_fields['x_phone'] = $item_data['BillingPhone'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $post_fields['x_country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $post_fields['x_country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$post_fields['x_cust_id'] = $item_data['PortalUserId'];
$post_fields['x_invoice_num'] = $item_data['OrderNumber'];
$post_fields['x_description'] = 'Invoice #'.$item_data['OrderNumber'];
Index: in-commerce/units/gateways/gw_classes/google_checkout.php
===================================================================
--- in-commerce/units/gateways/gw_classes/google_checkout.php (revision 13400)
+++ in-commerce/units/gateways/gw_classes/google_checkout.php (working copy)
@@ -363,8 +363,11 @@
'ShippingZip' => $address_info['POSTAL-CODE'],
);
- $shipping_address['ShippingCountry'] = $this->getCountryISO($address_info['COUNTRY-CODE']);
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+ $shipping_address['ShippingCountry'] = $cs_helper->getCountryIso($address_info['COUNTRY-CODE'], true);
+
$order->SetDBFieldsFromHash($shipping_address);
$order->Update();
@@ -514,6 +517,10 @@
'REGION' => 'State',
'POSTAL-CODE' => 'Zip',
);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
foreach ($user_address as $field_prefix => $address_details) {
foreach ($address_mapping as $src_field => $dst_field) {
$order->SetDBField($field_prefix.$dst_field, $address_details[$src_field]);
@@ -523,7 +530,7 @@
$order->SetDBField($field_prefix.'Phone', '-'); // required field
}
- $order->SetDBField($field_prefix.'Country', $this->getCountryISO($address_details['COUNTRY-CODE']));
+ $order->SetDBField( $field_prefix.'Country', $cs_helper->getCountryIso($address_details['COUNTRY-CODE'], true) );
}
$order->SetDBField('OnHold', 1);
@@ -808,20 +815,6 @@
}
/**
- * Returns 3 symbols ISO code from 2 symbols ISO code
- *
- * @param string $country_code
- * @return string
- */
- function getCountryISO($country_code)
- {
- $sql = 'SELECT DestAbbr
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr2 = '.$this->Conn->qstr($country_code);
- return $this->Conn->GetOne($sql);
- }
-
- /**
* Retrieves shipping types available for given order
*
* @param OrdersItem $order
Index: in-commerce/units/gateways/gw_classes/multicards.php
===================================================================
--- in-commerce/units/gateways/gw_classes/multicards.php (revision 13400)
+++ in-commerce/units/gateways/gw_classes/multicards.php (working copy)
@@ -91,8 +91,6 @@
$ret['cust_city'] = $item_data['BillingCity'];
$ret['cust_state'] = $item_data['BillingState'];
$ret['cust_zip'] = $item_data['BillingZip'] ? $item_data['BillingZip'] : '99999';
-// $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
-// $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
$ret['cust_country'] = $item_data['BillingCountry'];
$ret['user1'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
Index: in-commerce/units/gateways/gw_classes/paymentech.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paymentech.php (revision 13400)
+++ in-commerce/units/gateways/gw_classes/paymentech.php (working copy)
@@ -72,9 +72,11 @@
'ShippingRef' => '',
);
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $data['AVScountryCode'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+ $data['AVScountryCode'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
+
if ($data['AVScountryCode'] != 'US') {
$data['AVSstate'] = '';
}
Index: in-commerce/units/gateways/gw_classes/paypal.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paypal.php (revision 13400)
+++ in-commerce/units/gateways/gw_classes/paypal.php (working copy)
@@ -80,9 +80,11 @@
$ret['city'] = $item_data['BillingCity'];
$ret['state'] = $item_data['BillingState'];
$ret['zip'] = $item_data['BillingZip'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'];
$ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button
return $ret;
@@ -142,9 +144,11 @@
$ret['city'] = $item_data['BillingCity'];
$ret['state'] = $item_data['BillingState'];
$ret['zip'] = $item_data['BillingZip'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'].'&payment_type_id='.$tag_params['payment_type_id'];
$ret['cmd'] = '_xclick-subscriptions'; // act as "Buy Now" PayPal button
Index: in-commerce/units/gateways/gw_classes/paypal_direct.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paypal_direct.php (revision 13400)
+++ in-commerce/units/gateways/gw_classes/paypal_direct.php (working copy)
@@ -76,8 +76,11 @@
$post_fields['STREET2'] = $item_data['BillingAddress2'];
$post_fields['CITY'] = $item_data['BillingCity'];
$post_fields['STATE'] = $item_data['BillingState'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $post_fields['COUNTRYCODE'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $post_fields['COUNTRYCODE'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$post_fields['ZIP'] = $item_data['BillingZip'];
$post_fields['INVNUM'] = $item_data['OrderNumber'];
$post_fields['CUSTOM'] = $item_data['PortalUserId'];
@@ -115,8 +118,7 @@
}
$post_fields['x_email'] = $billing_email;
$post_fields['x_phone'] = $item_data['BillingPhone'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $post_fields['x_country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $post_fields['x_country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$post_fields['x_cust_id'] = $item_data['PortalUserId'];
$post_fields['x_invoice_num'] = $item_data['OrderNumber'];
Index: in-commerce/units/gateways/gw_classes/worldpay.php
===================================================================
--- in-commerce/units/gateways/gw_classes/worldpay.php (revision 13400)
+++ in-commerce/units/gateways/gw_classes/worldpay.php (working copy)
@@ -74,8 +74,10 @@
}
$ret['postcode'] = $item_data['BillingZip'];
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
- $ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
$ret['tel'] = $item_data['BillingPhone'];
$ret['fax'] = $item_data['BillingFax'];
$ret['email'] = $item_data['BillingEmail'];
Index: in-commerce/units/gift_certificates/gift_certificates_config.php
===================================================================
--- in-commerce/units/gift_certificates/gift_certificates_config.php (revision 13400)
+++ in-commerce/units/gift_certificates/gift_certificates_config.php (working copy)
@@ -112,11 +112,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'required' => 1, 'default' => 'USA'
),
Index: in-commerce/units/manufacturers/manufacturers_config.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_config.php (revision 13400)
+++ in-commerce/units/manufacturers/manufacturers_config.php (working copy)
@@ -20,18 +20,7 @@
'EventHandlerClass' => Array('class'=>'ManufacturersEventHandler','file'=>'manufacturers_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ManufacturersTagProcessor','file'=>'manufacturers_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'manuf',
- 'HookToSpecial' => '',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnPrepareStates',
- ),
- ),
+
'QueryString' => Array(
1 => 'id',
2 => 'Page',
@@ -116,11 +105,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', 'default' => null
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name', 'default' => null
),
),
Index: in-commerce/units/manufacturers/manufacturers_event_handler.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_event_handler.php (revision 13400)
+++ in-commerce/units/manufacturers/manufacturers_event_handler.php (working copy)
@@ -79,38 +79,45 @@
* @param kEvent $event
* @access public
*/
- function OnPrepareStates(&$event)
+ function OnAfterItemLoad(&$event)
{
+ parent::OnAfterItemLoad($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'State', 'Country');
-
- $object =& $event->getObject();
-
- if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
}
- function OnUpdate(&$event)
+ /**
+ * Processes states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->CheckStateField($event, 'State', 'Country');
-
- parent::OnUpdate($event);
+ $cs_helper->PopulateStates($event, 'State', 'Country');
}
- function OnCreate(&$event)
+ /**
+ * Processes states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
- $cs_helper->CheckStateField($event, 'State', 'Country');
+ /* @var $cs_helper kCountryStatesHelper */
- parent::OnCreate($event);
- }
-
- function OnPreSave(&$event)
- {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$cs_helper->CheckStateField($event, 'State', 'Country');
-
- parent::OnPreSave($event);
+ $cs_helper->PopulateStates($event, 'State', 'Country');
}
-
}
\ No newline at end of file
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 13400)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -334,11 +334,10 @@
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'default' => 'USA'
),
'VAT' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.2f'),
@@ -366,11 +365,10 @@
'ShippingCountry' => Array(
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE DestType = 1
- ORDER BY l%2$s_Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ FROM '.TABLE_PREFIX.'CountryStates
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY l%2$s_Name',
+ 'option_key_field' => 'IsoCode', 'option_title_field' => 'l%2$s_Name',
'not_null' => 1, 'default' => 'USA'
),
'ShippingType' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ShippingType WHERE Status = 1','option_key_field'=>'ShippingID','option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
Index: in-commerce/units/orders/orders_event_handler.php
===================================================================
--- in-commerce/units/orders/orders_event_handler.php (revision 13400)
+++ in-commerce/units/orders/orders_event_handler.php (working copy)
@@ -171,6 +171,8 @@
if ($shipping_address_id || $billing_address_id) {
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$address =& $this->Application->recallObject('addr.-item','addr', Array('skip_autoload' => true));
$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$addr_list->Query();
@@ -592,16 +594,6 @@
{
$this->setBillingAddress($event);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
-
- $object =& $event->getObject();
- if( $object->HasTangibleItems() )
- {
- $cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
- }
-
- $cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
-
parent::OnUpdate($event);
if ($this->Application->isAdminUser) {
@@ -616,6 +608,9 @@
}
else {
// strange: recalculate total amount on error
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
$object->SetDBField('TotalAmount', $object->getTotalAmount());
}
}
@@ -664,28 +659,6 @@
}
}
- /**
- * Enter description here...
- *
- * @param kEvent $event
- */
- function OnPreSave(&$event)
- {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
-
- $object =& $event->getObject();
- if ( $object->GetID() !== false)
- {
- if( $object->HasTangibleItems() )
- {
- $cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
- }
- $cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
- }
-
- parent::OnPreSave($event);
- }
-
function OnUpdateCart(&$event)
{
$this->Application->HandleEvent($items_event, 'orditems:OnUpdate');
@@ -1199,9 +1172,8 @@
foreach ($req_fields as $field) {
$order->Fields[$field]['required'] = $has_tangibles;
}
- if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'ShippingCountry') )) {
- $order->Fields['ShippingState']['required'] = true; // $has_tangibles
- }
+
+ $order->setRequired('ShippingState', $cs_helper->CountryHasStates( $field_values['ShippingCountry'] ));
}
// billing address required fields
@@ -1210,9 +1182,8 @@
foreach ($req_fields as $field) {
$order->Fields[$field]['required'] = true;
}
- if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'BillingCountry') )) {
- $order->Fields['BillingState']['required'] = true;
- }
+
+ $order->setRequired('BillingState', $cs_helper->CountryHasStates( $field_values['BillingCountry'] ));
}
$check_cc = $this->Application->GetVar('check_credit_card');
@@ -1965,6 +1936,8 @@
$object->SetDBField('PaymentCVV2', $this->Application->RecallVar('CVV2Code') );
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
@@ -1975,19 +1948,49 @@
}
/**
+ * Processes states
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
+ $cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
+ }
+
+ /**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
+ $object =& $event->getObject();
+ /* @var $object OrdersItem */
+
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
- $object = &$event->getObject();
- if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return;
+ if ($object->HasTangibleItems()) {
+ $cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry', false);
+ }
+ $cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry', false);
+
+ if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) {
+ return ;
+ }
+
$this->CheckUser($event);
if(!$object->GetDBField('OrderIP'))
{
Index: in-commerce/units/orders/orders_item.php
===================================================================
--- in-commerce/units/orders/orders_item.php (revision 13400)
+++ in-commerce/units/orders/orders_item.php (working copy)
@@ -172,14 +172,15 @@
*/
function getTaxPercent()
{
- $sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType = %s AND DestAbbr = %s';
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
- $shipping_country_id = (int) $this->Conn->GetOne( sprintf($sql, 1, $this->Conn->qstr($this->GetDBField('ShippingCountry') ) ) );
- $shipping_state_id = (int) $this->Conn->GetOne( sprintf($sql, 2, $this->Conn->qstr($this->GetDBField('ShippingState') ) ) );
+ $shipping_country_id = $cs_helper->getCountryStateId($this->GetDBField('ShippingCountry'), DESTINATION_TYPE_COUNTRY);
+ $shipping_state_id = $cs_helper->getCountryStateId($this->GetDBField('ShippingState'), DESTINATION_TYPE_STATE);
$shipping_zip = (string) $this->GetDBField('ShippingZip');
- $billing_country_id = (int) $this->Conn->GetOne( sprintf($sql, 1, $this->Conn->qstr($this->GetDBField('BillingCountry') ) ) );
- $billing_state_id = (int) $this->Conn->GetOne( sprintf($sql, 2, $this->Conn->qstr($this->GetDBField('BillingState') ) ) );
+ $billing_country_id = $cs_helper->getCountryStateId($this->GetDBField('BillingCountry'), DESTINATION_TYPE_COUNTRY);
+ $billing_state_id = $cs_helper->getCountryStateId($this->GetDBField('BillingState'), DESTINATION_TYPE_STATE);
$billing_zip = (string) $this->GetDBField('BillingZip');
/*
Index: in-commerce/units/orders/orders_tag_processor.php
===================================================================
--- in-commerce/units/orders/orders_tag_processor.php (revision 13400)
+++ in-commerce/units/orders/orders_tag_processor.php (working copy)
@@ -51,10 +51,10 @@
foreach ($fields as $field) {
$value = $this->Application->ConfigValue('Comm_'.$field);
if ($field == 'Country') {
- $sql = 'SELECT DestName
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestAbbr = '.$this->Conn->qstr($value);
- $value = $this->Application->Phrase( $this->Conn->GetOne($sql) );
+ $sql = 'SELECT l' . $this->Application->GetVar('m_lang') . '_Name
+ FROM ' . TABLE_PREFIX . 'CountryStates
+ WHERE IsoCode = ' . $this->Conn->qstr($value);
+ $value = $this->Conn->GetOne($sql);
}
if ($field == 'Country' && $value) {
@@ -814,7 +814,7 @@
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
- $cs_helper->PopulateStates(new kEvent('u:OnBuild') , 'State', 'Country');
+ $cs_helper->PopulateStates(new kEvent('u:OnBuild'), 'State', 'Country');
}
function UserLink($params)
Index: in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php
===================================================================
--- in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php (revision 13400)
+++ in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php (working copy)
@@ -38,12 +38,16 @@
return $shipping_types;
}
- function QueryShippingCost($user_country_abbr, $user_state_abbr, $user_zip, $weight, $items, $amount, $shipping_type=null, $promo_params)
+ function QueryShippingCost($user_country, $user_state, $user_zip, $weight, $items, $amount, $shipping_type=null, $promo_params)
{
$db =& $this->Application->GetADODBConnection();
- $user_country_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1 AND DestAbbr = '.$db->qstr($user_country_abbr));
- $user_state_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestAbbr = '.$db->qstr($user_state_abbr));
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $user_country_id = $cs_helper->getCountryStateId($user_country, DESTINATION_TYPE_COUNTRY);
+ $user_state_id = $cs_helper->getCountryStateId($user_state, DESTINATION_TYPE_STATE);
+
$user_zip = (string) $user_zip;
$weight = (float) $weight;
$items = (int) $items;
Index: in-commerce/units/shipping_quote_engines/intershipper.php
===================================================================
--- in-commerce/units/shipping_quote_engines/intershipper.php (revision 13400)
+++ in-commerce/units/shipping_quote_engines/intershipper.php (working copy)
@@ -153,8 +153,7 @@
}
}
- if(isset($custom_params['orig_addr1']))
- {
+ if (isset($custom_params['orig_addr1'])) {
$params['orig_name'] = $custom_params['orig_name'];
$params['orig_addr1'] = $custom_params['orig_addr1'];
$params['orig_addr2'] = $custom_params['orig_addr2'];
@@ -163,8 +162,7 @@
$params['orig_postal'] = $custom_params['orig_postal'];
$params['orig_country'] = $custom_params['orig_country'];
}
- else
- {
+ else {
$params['orig_name'] = $this->Application->ConfigValue('Comm_StoreName');
$params['orig_addr1'] = $this->Application->ConfigValue('Comm_Shipping_AddressLine1');
$params['orig_addr2'] = $this->Application->ConfigValue('Comm_Shipping_AddressLine2');
@@ -173,21 +171,23 @@
$params['orig_postal'] = $this->Application->ConfigValue('Comm_Shipping_ZIP');
$params['orig_country'] = $this->Application->ConfigValue('Comm_Shipping_Country');
}
- if( mb_strlen($params['orig_country']) == 3)
- {
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$params['orig_country'].'"';
- $params['orig_country'] = $db->GetOne($sql);
+
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ if (strlen($params['orig_country']) == 3) {
+ // got 3symbol ISO code -> resolve to 2symbol ISO code
+ $params['orig_country'] = $cs_helper->getCountryIso( $params['orig_country'] );
}
- if( mb_strlen($params['orig_state']) != 2)
- {
- $sql = ' SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations
- WHERE DestName = "'.$params['orig_state'].'"';
- $params['orig_state'] = $db->GetOne($sql);
+
+ if (strlen($params['orig_state']) != 2) {
+ // got state name instead of ISO code -> resolve it to ISO code
+ $country_iso = $cs_helper->getCountryIso($params['orig_country'], true);
+ $params['orig_state'] = $cs_helper->getStateIso($params['orig_state'], $country_iso);
}
- if(isset($custom_params['ShipMethod']))
- {
- $params['ShipMethod'] = $custom_params['ShipMethod'];
+ if (isset($custom_params['ShipMethod'])) {
+ $params['ShipMethod'] = $custom_params['ShipMethod'];
}
$params['packages'] = $custom_params['packages'];
@@ -199,10 +199,10 @@
$params['dest_state'] = $custom_params['dest_state'];
$params['dest_postal'] = $custom_params['dest_postal'];
$params['dest_country'] = $custom_params['dest_country'];
- if( mb_strlen($params['dest_country']) == 3)
- {
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$params['dest_country'].'"';
- $params['dest_country'] = $db->GetOne($sql);
+
+ if (strlen($params['dest_country']) == 3) {
+ // got 3symbol ISO code -> resolve to 2symbol ISO code
+ $params['dest_country'] = $cs_helper->getCountryIso( $params['dest_country'] );
}
if(!$params['dest_city'] || !$params['dest_country'] ||
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (revision 13400)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (working copy)
@@ -57,11 +57,14 @@
$object->SetDBField('Properties', $properties);
$from_country = $this->Application->ConfigValue('Comm_Shipping_Country');
- if( mb_strlen($from_country) == 3)
- {
- $sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$from_country.'"';
- $from_country = $this->Conn->GetOne($sql);
+ if (strlen($from_country) == 3) {
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ // get 2symbol ISO code from 3symbol ISO code
+ $from_country = $cs_helper->getCountryIso($from_country);
}
+
if( !function_exists('curl_init') )
{
$object->FieldErrors['Status']['pseudo'] = 'curl_not_present';
Index: in-commerce/units/shipping_quote_engines/usps.php
===================================================================
--- in-commerce/units/shipping_quote_engines/usps.php (revision 13400)
+++ in-commerce/units/shipping_quote_engines/usps.php (working copy)
@@ -84,16 +84,9 @@
$country = $this->Application->ConfigValue('Comm_Shipping_Country');
if ($country != '') {
- $db =& $this->Application->GetADODBConnection();
- $this->shipping_origin_country = $db->GetOne(
- 'SELECT DestAbbr2
- FROM '.TABLE_PREFIX.'StdDestinations
- WHERE
- DestAbbr = '.$db->qstr($country).'
- AND destType = 1
- '
- );
+ $this->shipping_origin_country = $this->GetUSPSCountry($country, '');
}
+
$contact_name = trim($this->_prepare_xml_param($this->Application->ConfigValue('Comm_Contacts_Name')));
$split_pos = strpos($contact_name, ' ');
if ($split_pos === false) {
@@ -1003,11 +996,14 @@
return array('TrackingNumber' => $TrackingNumber, 'PostnetBarCode' => $PostnetBarCode, 'Postage' => $Postage);
}
- function GetUSPSCountry($country)
+ function GetUSPSCountry($country, $default = 'US')
{
- $country = $this->Application->Conn->GetOne('SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = '.$this->Application->Conn->qstr($country));
- if ( $country == '' ) $country = 'US';
- return $country;
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
+
+ $country = $cs_helper->getCountryIso($country);
+
+ return $country == '' ? $default : $country;
}
function GetShippingQuotes($params = null)
Index: in-commerce/units/taxes/taxes_tag_processor.php
===================================================================
--- in-commerce/units/taxes/taxes_tag_processor.php (revision 13400)
+++ in-commerce/units/taxes/taxes_tag_processor.php (working copy)
@@ -15,457 +15,259 @@
class TaxesTagProcessor extends kDBTagProcessor
{
- /*
- function ShowDestinations($param)
+
+ function ShowCountries($params)
{
- $zone =& $this->Application->recallObject('tax');
- $zone->SetDBField('TaxZoneId', $zone->ID);
- $destination =& $this->Application->recallObject('taxdst');
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- if(!$this->Application->GetVar('loaded'))
- {
- if ($zone->GetID() == 0)
- {
- $this->Application->DeleteVar('taxdst');
- }
- else
- {
- $sql = 'SELECT * FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
- $res = $this->Conn->Query($sql);
- if (is_array($res)) foreach ($res as $dest_record)
- {
- $temp[$dest_record['TaxZoneDestId']]['TaxZoneDestId'] = $dest_record['TaxZoneDestId'];
- $temp[$dest_record['TaxZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
- $temp[$dest_record['TaxZoneDestId']]['DestValue'] = $dest_record['DestValue'];
- }
- $this->Application->SetVar('taxdst', $temp);
- }
- }
- $destination =& $this->Application->recallObject('taxdst');
+ $destination_table = $this->getDestinationsTable($params);
+ $selected_country_id = (int)$this->Application->GetVar('CountrySelector');
- $hidden_clause = '<input type="hidden" name="loaded" value="1"><input type="hidden" name="zone_id" value="'.$zone->GetDBField('TaxZoneId').'">';
+ $name_field = 'l' . $this->Application->GetVar('m_lang') . '_Name';
+ $id_field = $this->Application->getUnitOption('country-state', 'IDField');
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
- switch ( $zone->GetDBField('Type') )
- {
- case 1:
+ switch ($params['show']) {
+ case 'current':
+ // selected countries in current zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE cs.Type = ' . DESTINATION_TYPE_COUNTRY . ' AND zd.TaxZoneId = ' . $object->GetID() . '
+ ORDER BY cs.' . $name_field;
+ break;
- $sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- $res = $this->Conn->Query($sql, 'DestId');
-
- $dropdown = '<select name="country">'."\n";
- foreach ($res as $record)
- {
- $dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $dropdown .= '</select>'."\n";
-
- $form_params = Array();
- $form_params['dropdown'] = $dropdown;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $res;
- $ret = $this->ShowDestionationForm($form_params);
+ case 'available':
+ // available countries in current zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE cs.Type = ' . DESTINATION_TYPE_COUNTRY . ' AND zd.TaxZoneId IS NULL
+ ORDER BY cs.' . $name_field;
break;
- case 2:
- $country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1,
- '.TABLE_PREFIX.'StdDestinations d2
- WHERE d1.DestType=1 AND d1.DestId=d2.DestParentId
- GROUP BY d1.DestId';
- if( !($current_country = $this->Application->GetVar('StatesCountry')) )
- {
- $current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
- if($zone->GetDBField('TaxZoneId'))
- {
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
+ case 'all':
+ // always preselect 1st country, when user haven't selected any
+ if (!$selected_country_id) {
+ $sql = 'SELECT StdDestId
+ FROM ' . $destination_table . '
+ WHERE TaxZoneId = ' . $object->GetID();
+ $selected_country_id = $this->Conn->GetOne($sql);
- if(!$current_country)
- {
- $current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- $current_country = $this->Conn->GetOne($current_country_sql);
+ if ($selected_country_id) {
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
}
- $states_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestParentId='.$current_country;
- $countries = $this->Conn->Query($country_sql, 'DestId');
- $states = $this->Conn->Query($states_sql, 'DestId');
- if($countries)
- {
- $countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
- foreach ($countries as $record)
- {
- $countries_dropdown .= '<option value="'.$record['DestId'].'" ';
- if($record['DestId'] == $current_country)
- {
- $countries_dropdown .= 'selected';
- }
- $countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $countries_dropdown .= '</select>'."\n";
- }
-
- if($states)
- {
- $states_dropdown = '<select name="state">'."\n";
- foreach ($states as $id => $record)
- {
- $states_dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
- }
- $states_dropdown .= '</select>'."\n";
- }
-
- $form_params = Array();
- $table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
- $table .= '<tr><td>'.$this->Application->Phrase('la_State').': </td><td>'.$states_dropdown.'</td></tr></table>';
- $form_params['dropdown'] = $table;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $states;
- $ret = $this->ShowDestionationForm($form_params);
-
+ // all countries
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
+ ORDER BY ' . $name_field;
break;
- case 3:
- if( !($current_country = $this->Application->GetVar('StatesCountry')) )
- {
- $current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
- if($zone->GetDBField('TaxZoneId'))
- {
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
+ case 'has_states':
+ $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ /* @var $cs_helper kCountryStatesHelper */
- if(!$current_country)
- {
- $current_country_sql = 'SELECT StdDestId FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
+ $has_states = $cs_helper->getCountriesWithStates();
- if(!$current_country)
- {
- $current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
- $current_country = $this->Conn->GetOne($current_country_sql);
- }
-
-
+ if ($selected_country_id && !array_key_exists($selected_country_id, $has_states)) {
+ list ($selected_country_id, ) = each($has_states);
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1
- WHERE d1.DestType=1
- GROUP BY d1.DestId';
- $countries = $this->Conn->Query($country_sql, 'DestId');
+ // preselect country from 1st found state
+ if (!$selected_country_id) {
+ $sql = 'SELECT cs.StateCountryId
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE (cs.Type = ' . DESTINATION_TYPE_STATE . ') AND (zd.TaxZoneId = ' . $object->GetID() . ')';
+ $selected_country_id = $this->Conn->GetOne($sql);
- if($countries)
- {
- $countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
- foreach ($countries as $record)
- {
- print "<br>";
- $countries_dropdown .= '<option value="'.$record['DestId'].'" ';
- if($record['DestId'] == $current_country)
- {
- $countries_dropdown .= 'selected';
- }
- $countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+ if ($selected_country_id) {
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $countries_dropdown .= '</select>'."\n";
- }
-
- $sql = 'SELECT DestValue FROM '.$this->Application->getUnitOption('taxdst', 'TableName').' WHERE NOT(DestValue IS NULL) AND DestValue<>"" AND StdDestId='.$current_country;
- $res = array_unique( $this->Conn->GetCol($sql) );
- $dropdown = '<input type="text" name="zip_input" id="zip_input" size="15">';
- if($res)
- {
- $dropdown .= ' or <select name="zip_dropdown">'."\n";
- $dropdown .= '<option value=""></option>';
- foreach ($res as $record)
- {
- $dropdown .= '<option value="'.$record.'">'.$record.'</option>'."\n";
+ else {
+ list ($selected_country_id, ) = each($has_states);
+ $this->Application->SetVar('CountrySelector', $selected_country_id);
}
- $dropdown .= '</select>'."\n";
}
- $table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
- $table .= '<tr><td>'.$this->Application->Phrase('la_fld_ZIP').': </td><td>'.$dropdown.'</td></tr></table>';
-
- $form_params = Array();
- $form_params['dropdown'] = $table;
- $form_params['block'] = $param['block'];
- $form_params['res'] = $res;
- $ret = $this->ShowDestionationForm($form_params);
-
+ // gets only countries with states
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' AND ' . $id_field . ' IN (' . implode(',', array_keys($has_states)) . ')
+ ORDER BY ' . $name_field;
break;
+
default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
+ break;
}
- $ret .= $hidden_clause;
- return $ret;
- }
- */
- /*
- function ShowDestionationForm($param)
- {
- $add_button = '<input type="button" class="button" value="'.$this->Application->Phrase('la_btn_AddLocation').'" onclick="submit_event(\'tax\', \'OnAddLocation\')">';
+ $ret = '';
+ $countries = $this->Conn->GetCol($sql, $id_field);
- $main_processor =& $this->Application->RecallObject('m_TagProcessor');
- $oddevenparam['odd'] = 'table-color1';
- $oddevenparam['even'] = 'table-color2';
- $ret = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td>'.$param['dropdown'].'</td><td>'.$add_button.'</td></tr>';
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- $dest_list = $this->Application->GetVar('taxdst');
- if (is_array($dest_list))
- {
+ foreach ($countries as $country_id => $country_name) {
+ $block_params['id'] = $country_id;
+ $block_params['destination_title'] = $country_name;
+ $block_params['selected'] = $selected_country_id == $country_id ? ' selected="selected"' : '';
-
- if (sizeof($dest_list)>0){
- $ret .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td> </td><td>';
- $ret .= '<select multiple name="location_list" onchange="SelectToString(this)">';
- $hidden = '';
-
- foreach ($dest_list as $id => $destination)
- {
- $params = $destination;
- $params['id'] = $id;
- $hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" value="'.$destination['TaxZoneDestId'].'">';
- if($destination['StdDestId'] && !$destination['DestValue'])
- {
- $params['destination_title'] = $param['res'][$destination['StdDestId']]['DestName'];
- $hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
- }
- else
- {
- $params['destination_title'] = $destination['DestValue'];
- $hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" name="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" value="'.$destination['DestValue'].'">';
- }
-
- $params['name'] = $param['block'];
- $ret .= $main_processor->ParseBlock($params);
- }
- $ret .= '</select>';
-
- $ret .= '</td><td><input type="button" class="button" value="'.$this->Application->Phrase('la_btn_RemoveLocations').'" onclick="remove_location('.$destination['TaxZoneDestId'].')">';
- $ret .= $hidden;
- $ret .= " </td></tr>";
- }else{
-
- }
+ $ret .= $this->Application->ParseBlock($block_params);
}
-// <input type="hidden" id="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" name="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" value="<inp:m_param name="id"/>">
return $ret;
}
- */
- function ShowCountries($param){
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ function ShowStates($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $destination = &$this->Application->recallObject('taxdst');
- $zone = &$this->Application->recallObject('tax');
+ $destination_table = $this->getDestinationsTable($params);
- switch ($param['show']){
+ $name_field = 'l' . $this->Application->GetVar('m_lang') . '_Name';
+ $id_field = $this->Application->getUnitOption('country-state', 'IDField');
+ $table_name = $this->Application->getUnitOption('country-state', 'TableName');
+
+ $country_id = $this->Application->GetVar('CountrySelector');
+
+ switch ($params['show']) {
case 'current':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND zd.TaxZoneId = '.$zone->GetDBField('TaxZoneId').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // selected states for current country and zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE
+ cs.Type = ' . DESTINATION_TYPE_STATE . ' AND
+ cs.StateCountryId = ' . $country_id . ' AND
+ zd.TaxZoneId = ' . $object->GetID() . '
+ ORDER BY cs.' . $name_field;
break;
case 'available':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND zd.TaxZoneId IS NULL
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // available states for current country and zone
+ $sql = 'SELECT cs.' . $name_field . ', cs.' . $id_field . '
+ FROM ' . $table_name . ' cs
+ LEFT JOIN ' . $destination_table . ' zd ON zd.StdDestId = cs.' . $id_field . '
+ WHERE
+ cs.Type = ' . DESTINATION_TYPE_STATE . '
+ AND zd.TaxZoneId IS NULL
+ AND cs.StateCountryId = ' . $country_id . '
+ ORDER BY cs.' . $name_field;
break;
case 'all':
- $selected_country = $this->Application->GetVar('CountrySelector');
- if (!$selected_country){
- // get 1st available country ID
- $selected_country = $this->Conn->GetOne('SELECT StdDestId FROM '.$destination->TableName.'
- WHERE TaxZoneId='.$zone->GetDBField('TaxZoneId'));
- if ($selected_country){
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- }
-
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ // all possible states for selected country
+ $sql = 'SELECT ' . $name_field . ', ' . $id_field . '
+ FROM ' . $table_name . '
+ WHERE Type = ' . DESTINATION_TYPE_STATE . ' AND StateCountryId = ' . $country_id . '
+ ORDER BY ' . $name_field;
break;
- case 'has_states':
- $has_states = $this->Conn->GetCol('SELECT DISTINCT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- WHERE sd.DestType=2');
- $selected_country = $this->Application->GetVar('CountrySelector');
-
- if ($selected_country && !in_array($selected_country, $has_states)){
- $selected_country = $has_states[0];
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
-
- if (!$selected_country){
- // get 1st available country ID
- $selected_country = $this->Conn->GetOne('SELECT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- WHERE sd.DestType=2
- AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId'));
- if ($selected_country){
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- else {
- $selected_country = $has_states[0];
- $this->Application->SetVar('CountrySelector', $selected_country);
- }
- }
-
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 1 AND DestId IN ('.implode(',', $has_states).')
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
break;
}
- $countries = $this->Conn->Query($sql);
- $o = '';
+ $ret = '';
+ $states = $this->Conn->GetCol($sql, $id_field);
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- foreach($countries as $key => $country) {
- $param['id'] = $country['DestId'];
- $param['destination_title'] = $this->Application->Phrase($country['DestName']);
- if (isset($selected_country) && $selected_country == $param['id']){
- $param['selected'] = ' selected="selected"';
- }
- else {
- $param['selected']='';
- }
- $o .= $this->Application->ParseBlock($param);
+ foreach($states as $state_id => $state_name) {
+ $block_params['id'] = $state_id;
+ $block_params['destination_title'] = $state_name;
+
+ $ret .= $this->Application->ParseBlock($block_params);
}
- return $o;
+ return $ret;
}
- function ShowStates($param)
+ function ShowZips($params)
{
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $destination = &$this->Application->recallObject('taxdst');
- $zone = &$this->Application->recallObject('tax');
+ $destination_table = $this->getDestinationsTable($params);
- switch ($param['show']){
- case 'current':
- $sql = 'SELECT *
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ $country_id = (int)$this->Application->GetVar('CountrySelector');
+
+ $current_sql = 'SELECT DestValue
+ FROM ' . $destination_table . '
WHERE
- sd.DestType=2
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ COALESCE(DestValue, "") <> "" AND
+ TaxZoneId = ' . $object->GetID() . '
+ ORDER BY DestValue';
+
+ switch ($params['show']) {
+ case 'current':
+ $sql = $current_sql;
break;
case 'available':
- $sql = 'SELECT *
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ $selected_zips = $this->Conn->GetCol($current_sql);
+ $selected_zips = array_map(Array (&$this->Conn, 'qstr'), $selected_zips);
+
+ $sql = 'SELECT DISTINCT DestValue
+ FROM ' . $this->Application->getUnitOption('taxdst', 'TableName') . '
WHERE
- sd.DestType=2
- AND zd.TaxZoneId IS NULL
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ COALESCE(DestValue, "") <> "" AND
+ TaxZoneId <> ' . $object->GetID() . ' AND
+ ' . ($selected_zips ? 'DestValue NOT IN (' . implode(',', $selected_zips) . ') AND' : '') . '
+ StdDestId = ' . $country_id . '
+ ORDER BY DestValue';
break;
- case 'all':
- $sql = 'SELECT sd.*
- FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType = 2 AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
+ default:
+ trigger_error('Unknown "show" parameter value "' . $params['show'] . '" used.', E_USER_ERROR);
break;
}
- $states = $this->Conn->Query($sql);
- $o = '';
- foreach($states as $key => $state) {
- $param['id'] = $state['DestId'];
- $param['destination_title'] = $this->Application->Phrase($state['DestName']);
- $o .= $this->Application->ParseBlock($param);
- }
- return $o;
+ $zips = $this->Conn->GetCol($sql);
- }
+ $ret = '';
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['block'];
- function ShowZips($param){
+ foreach($zips as $zip) {
+ $block_params['id'] = '0|' . $zip;
+ $block_params['destination_title'] = $zip;
- $param = $this->prepareTagParams($param);
- $param['name'] = $param['block'];
+ $ret .= $this->Application->ParseBlock($block_params);
+ }
- $destination = &$this->Application->recallObject('taxdst');
- $zone = &$this->Application->recallObject('tax');
+ return $ret;
+ }
- $country_selector = $this->Application->GetVar('CountrySelector');
- if (!$country_selector){
- $country_selector=0;
- }
+ /**
+ * Returns table for shipping zone destinations
+ *
+ * @param Array $params
+ * @return string
+ */
+ function getDestinationsTable($params)
+ {
+ static $table_name = '';
- switch ($param['show']){
- case 'current':
- $sql = 'SELECT * FROM '.$destination->TableName.'
- WHERE NOT(DestValue IS NULL)
- AND DestValue<>""
- AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
- ORDER BY DestValue
- ';
- break;
- case 'available':
- $selected_zips = $this->Conn->GetCol('SELECT DestValue FROM '.$destination->TableName.'
- WHERE NOT(DestValue IS NULL)
- AND DestValue<>""
- AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
- ORDER BY DestValue
- ');
+ if (!$table_name) {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $sql = 'SELECT DISTINCT(DestValue) FROM '.$this->Application->getUnitOption('taxdst', 'TableName').'
- WHERE NOT(DestValue IS NULL)
- AND TaxZoneID!='.$zone->GetDBField('TaxZoneId').'
- AND DestValue NOT IN ("'.implode('", "', $selected_zips).'")
- AND DestValue<>"" AND StdDestId='.$country_selector.'
- ORDER BY DestValue
- ';
+ $table_name = $this->Application->getUnitOption('taxdst', 'TableName');
- break;
- case 'all':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- WHERE sd.DestType=3 AND sd.DestParentId='.$country_selector.'
- ORDER BY DestValue
- ';
- break;
+ if ($object->IsTempTable()) {
+ $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+ }
}
- $zips = $this->Conn->Query($sql);
- $o = '';
- foreach($zips as $key => $zip) {
- $param['id'] = $zip['DestId'].'|'.$zip['DestValue'];
- $param['destination_title'] = $zip['DestValue'];
- $o .= $this->Application->ParseBlock($param);
- }
- return $o;
-
+ return $table_name;
}
-
}
\ No newline at end of file
Index: in-commerce/units/zones/zones_tag_processor.php
============================================== |