// block item functions start
function sort_listoreder( $move_oid, $upordown, $db_table_name ) {
global $dblink;
$baze='';
$r3q = mysqli_query( $dblink, "SELECT listorder FROM $db_table_name$baze WHERE id=$move_oid ") or die(mysqli_error($dblink));
$r3 = mysqli_fetch_array( $r3q );
$move_object_listorder_current_value = $r3['listorder'];
// calculate items
$r5q = mysqli_query( $dblink, "SELECT id FROM $db_table_name$baze") or die(mysqli_error($dblink));
$move_object_total_count = mysqli_num_rows( $r5q );
if ( $upordown == 'down' ) {
$listorder_changed = $move_object_listorder_current_value+1;
if ( $listorder_changed<=$move_object_total_count ) { // check if element is not last
mysqli_query( $dblink, "UPDATE $db_table_name$baze SET listorder='$move_object_listorder_current_value' WHERE listorder='$listorder_changed'") or die(mysqli_error($dblink)); //pull down
mysqli_query( $dblink, "UPDATE $db_table_name$baze SET listorder='$listorder_changed' WHERE id='$move_oid' ") or die(mysqli_error($dblink)); //make item up
}
} else{
$listorder_changed = $move_object_listorder_current_value-1;
if ( $listorder_changed!==0 ) { // check if element is not first
mysqli_query( $dblink, "UPDATE $db_table_name$baze SET listorder='$move_object_listorder_current_value' WHERE listorder='$listorder_changed' ") or die(mysqli_error($dblink)); //pull down
mysqli_query( $dblink, "UPDATE $db_table_name$baze SET listorder='$listorder_changed' WHERE id='$move_oid' ") or die(mysqli_error($dblink)); //make item up
}
}
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
//build URL ierarchy
function build_url_by_id($menu_item_id) {
global $dblink;
global $baze;
global $language;
//buidl URL
$menu_item_url = "";
$check_parent_loop = $menu_item_id;
do {
$url_part = getfrombase('menu_items'.$baze,'id',$check_parent_loop,'url',$dblink);
$menu_item_url = "$url_part/".$menu_item_url;
$check_parent_loop = getfrombase('menu_items'.$baze,'id',$check_parent_loop,'parent_id',$dblink);
} while ($check_parent_loop != 0);
$menu_item_url = "$language/".$menu_item_url."index.html";
return $menu_item_url;
//buidl URL
}
//build URL ierarchy
function build_url_by_id_and_lang($menu_item_id,$lang_code) {
global $dblink;
$baze = "_$lang_code";
$language = $lang_code;
//buidl URL
$menu_item_url = "";
$check_parent_loop = $menu_item_id;
do {
$url_part = getfrombase('menu_items'.$baze,'id',$check_parent_loop,'url',$dblink);
$menu_item_url = "$url_part/".$menu_item_url;
$check_parent_loop = getfrombase('menu_items'.$baze,'id',$check_parent_loop,'parent_id',$dblink);
} while ($check_parent_loop != 0);
$menu_item_url = "$language/".$menu_item_url."index.html";
return $menu_item_url;
//buidl URL
}
// block item functions end
function debug_this($txt) {
global $debug_messages;
$debug_messages .= "# $txt #
";
}
function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyz';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
}
function deleteDir($dirPath) {
if (! is_dir($dirPath)) {
//throw new InvalidArgumentException("$dirPath must be a directory");
}
if (substr($dirPath, strlen($dirPath) - 1, 1) != '/') {
$dirPath .= '/';
}
$files = glob($dirPath . '*', GLOB_MARK);
foreach ( (array)$files as $file) {
if (is_dir($file)) {
deleteDir($file);
} else {
if ( file_exists( $file ) ) unlink($file);
}
}
if ( is_dir($dirPath)) rmdir($dirPath);
}
function curPageURL() {
$pageURL = 'http';
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
function month_full($m){
if ($m==12) $m="Gruodis";
if ($m==11) $m="Lapkritis";
if ($m==10) $m="Spalis";
if ($m==9) $m="Rugsėjis";
if ($m==8) $m="Rugpjūtis";
if ($m==7) $m="Liepa";
if ($m==6) $m="Birželis";
if ($m==5) $m="Gegužė";
if ($m==4) $m="Balandis";
if ($m==3) $m="Kovas";
if ($m==2) $m="Vasaris";
if ($m==1) $m="Sausis";
return $m;
}
function month_3($m){
if ($m==12) $m="Grd";
if ($m==11) $m="Lap";
if ($m==10) $m="Spl";
if ($m==9) $m="Rgs";
if ($m==8) $m="Rgp";
if ($m==7) $m="Lie";
if ($m==6) $m="Bir";
if ($m==5) $m="Geg";
if ($m==4) $m="Bal";
if ($m==3) $m="Kov";
if ($m==2) $m="Vas";
if ($m==1) $m="Sau";
return $m;
}
function month_links($m){
if ($m==12) $m="Gruodžio";
if ($m==11) $m="Lapkričio";
if ($m==10) $m="Spalio";
if ($m==9) $m="Rugsėjo";
if ($m==8) $m="Rugpjūčio";
if ($m==7) $m="Liepos";
if ($m==6) $m="Birželio";
if ($m==5) $m="Gegužės";
if ($m==4) $m="Balandžio";
if ($m==3) $m="Kovo";
if ($m==2) $m="Vasario";
if ($m==1) $m="Sausio";
return $m;
}
function salis($country){
if ($country=='AF') $country="Afghanistan";
if ($country=='AL') $country="Albania";
if ($country=='DZ') $country="Algeria";
if ($country=='AS') $country="American Samoa";
if ($country=='AD') $country="Andorra";
if ($country=='AG') $country="Angola";
if ($country=='AI') $country="Anguilla";
if ($country=='AG') $country="Antigua & Barbuda";
if ($country=='AR') $country="Argentina";
if ($country=='AA') $country="Armenia";
if ($country=='AW') $country="Aruba";
if ($country=='AU') $country="Australia";
if ($country=='AT') $country="Austria";
if ($country=='AZ') $country="Azerbaijan";
if ($country=='BS') $country="Bahamas";
if ($country=='BH') $country="Bahrain";
if ($country=='BD') $country="Bangladesh";
if ($country=='BB') $country="Barbados";
if ($country=='BY') $country="Belarus";
if ($country=='BE') $country="Belgium";
if ($country=='BZ') $country="Belize";
if ($country=='BJ') $country="Benin";
if ($country=='BM') $country="Bermuda";
if ($country=='BT') $country="Bhutan";
if ($country=='BO') $country="Bolivia";
if ($country=='BL') $country="Bonaire";
if ($country=='BA') $country="Bosnia & Herzegovina";
if ($country=='BW') $country="Botswana";
if ($country=='BR') $country="Brazil";
if ($country=='BC') $country="British Indian Ocean Ter";
if ($country=='BN') $country="Brunei";
if ($country=='BG') $country="Bulgaria";
if ($country=='BF') $country="Burkina Faso";
if ($country=='BI') $country="Burundi";
if ($country=='KH') $country="Cambodia";
if ($country=='CM') $country="Cameroon";
if ($country=='CA') $country="Canada";
if ($country=='IC') $country="Canary Islands";
if ($country=='CV') $country="Cape Verde";
if ($country=='KY') $country="Cayman Islands";
if ($country=='CF') $country="Central African Republic";
if ($country=='TD') $country="Chad";
if ($country=='CD') $country="Channel Islands";
if ($country=='CL') $country="Chile";
if ($country=='CN') $country="China";
if ($country=='CI') $country="Christmas Island";
if ($country=='CS') $country="Cocos Island";
if ($country=='CO') $country="Colombia";
if ($country=='CC') $country="Comoros";
if ($country=='CG') $country="Congo";
if ($country=='CK') $country="Cook Islands";
if ($country=='CR') $country="Costa Rica";
if ($country=='CT') $country="Cote D'Ivoire";
if ($country=='HR') $country="Croatia";
if ($country=='CU') $country="Cuba";
if ($country=='CB') $country="Curacao";
if ($country=='CY') $country="Cyprus";
if ($country=='CZ') $country="Czech Republic";
if ($country=='DK') $country="Denmark";
if ($country=='DJ') $country="Djibouti";
if ($country=='DM') $country="Dominica";
if ($country=='DO') $country="Dominican Republic";
if ($country=='TM') $country="East Timor";
if ($country=='EC') $country="Ecuador";
if ($country=='EG') $country="Egypt";
if ($country=='SV') $country="El Salvador";
if ($country=='GQ') $country="Equatorial Guinea";
if ($country=='ER') $country="Eritrea";
if ($country=='EE') $country="Estonia";
if ($country=='ET') $country="Ethiopia";
if ($country=='FA') $country="Falkland Islands";
if ($country=='FO') $country="Faroe Islands";
if ($country=='FJ') $country="Fiji";
if ($country=='FI') $country="Finland";
if ($country=='FR') $country="France";
if ($country=='GF') $country="French Guiana";
if ($country=='PF') $country="French Polynesia";
if ($country=='FS') $country="French Southern Ter";
if ($country=='GA') $country="Gabon";
if ($country=='GM') $country="Gambia";
if ($country=='GE') $country="Georgia";
if ($country=='DE') $country="Germany";
if ($country=='GH') $country="Ghana";
if ($country=='GI') $country="Gibraltar";
if ($country=='GB') $country="Great Britain";
if ($country=='GR') $country="Greece";
if ($country=='GL') $country="Greenland";
if ($country=='GD') $country="Grenada";
if ($country=='GP') $country="Guadeloupe";
if ($country=='GU') $country="Guam";
if ($country=='GT') $country="Guatemala";
if ($country=='GN') $country="Guinea";
if ($country=='GY') $country="Guyana";
if ($country=='HT') $country="Haiti";
if ($country=='HW') $country="Hawaii";
if ($country=='HN') $country="Honduras";
if ($country=='HK') $country="Hong Kong";
if ($country=='HU') $country="Hungary";
if ($country=='IS') $country="Iceland";
if ($country=='IN') $country="India";
if ($country=='ID') $country="Indonesia";
if ($country=='IA') $country="Iran";
if ($country=='IQ') $country="Iraq";
if ($country=='IR') $country="Ireland";
if ($country=='IM') $country="Isle of Man";
if ($country=='IL') $country="Israel";
if ($country=='IT') $country="Italy";
if ($country=='JM') $country="Jamaica";
if ($country=='JP') $country="Japan";
if ($country=='JO') $country="Jordan";
if ($country=='KZ') $country="Kazakhstan";
if ($country=='KE') $country="Kenya";
if ($country=='KI') $country="Kiribati";
if ($country=='NK') $country="Korea North";
if ($country=='KS') $country="Korea South";
if ($country=='KW') $country="Kuwait";
if ($country=='KG') $country="Kyrgyzstan";
if ($country=='LA') $country="Laos";
if ($country=='LV') $country="Latvija";
if ($country=='LB') $country="Lebanon";
if ($country=='LS') $country="Lesotho";
if ($country=='LR') $country="Liberia";
if ($country=='LY') $country="Libya";
if ($country=='LI') $country="Liechtenstein";
if ($country=='LT') $country="Lietuva";
if ($country=='LU') $country="Luxembourg";
if ($country=='MO') $country="Macau";
if ($country=='MK') $country="Macedonia";
if ($country=='MG') $country="Madagascar";
if ($country=='MY') $country="Malaysia";
if ($country=='MW') $country="Malawi";
if ($country=='MV') $country="Maldives";
if ($country=='ML') $country="Mali";
if ($country=='MT') $country="Malta";
if ($country=='MH') $country="Marshall Islands";
if ($country=='MQ') $country="Martinique";
if ($country=='MR') $country="Mauritania";
if ($country=='MU') $country="Mauritius";
if ($country=='ME') $country="Mayotte";
if ($country=='MX') $country="Mexico";
if ($country=='MI') $country="Midway Islands";
if ($country=='MD') $country="Moldova";
if ($country=='MC') $country="Monaco";
if ($country=='MN') $country="Mongolia";
if ($country=='MS') $country="Montserrat";
if ($country=='MA') $country="Morocco";
if ($country=='MZ') $country="Mozambique";
if ($country=='MM') $country="Myanmar";
if ($country=='NA') $country="Nambia";
if ($country=='NU') $country="Nauru";
if ($country=='NP') $country="Nepal";
if ($country=='AN') $country="Netherland Antilles";
if ($country=='NL') $country="Netherlands (Holland, Europe)";
if ($country=='NV') $country="Nevis";
if ($country=='NC') $country="New Caledonia";
if ($country=='NZ') $country="New Zealand";
if ($country=='NI') $country="Nicaragua";
if ($country=='NE') $country="Niger";
if ($country=='NG') $country="Nigeria";
if ($country=='NW') $country="Niue";
if ($country=='NF') $country="Norfolk Island";
if ($country=='NO') $country="Norway";
if ($country=='OM') $country="Oman";
if ($country=='PK') $country="Pakistan";
if ($country=='PW') $country="Palau Island";
if ($country=='PS') $country="Palestine";
if ($country=='PA') $country="Panama";
if ($country=='PG') $country="Papua New Guinea";
if ($country=='PY') $country="Paraguay";
if ($country=='PE') $country="Peru";
if ($country=='PH') $country="Philippines";
if ($country=='PO') $country="Pitcairn Island";
if ($country=='PL') $country="Lenkija";
if ($country=='PT') $country="Portugal";
if ($country=='PR') $country="Puerto Rico";
if ($country=='QA') $country="Qatar";
if ($country=='ME') $country="Republic of Montenegro";
if ($country=='RS') $country="Republic of Serbia";
if ($country=='RE') $country="Reunion";
if ($country=='RO') $country="Romania";
if ($country=='RU') $country="Rusija";
if ($country=='RW') $country="Rwanda";
if ($country=='NT') $country="St Barthelemy";
if ($country=='EU') $country="St Eustatius";
if ($country=='HE') $country="St Helena";
if ($country=='KN') $country="St Kitts-Nevis";
if ($country=='LC') $country="St Lucia";
if ($country=='MB') $country="St Maarten";
if ($country=='PM') $country="St Pierre & Miquelon";
if ($country=='VC') $country="St Vincent & Grenadines";
if ($country=='SP') $country="Saipan";
if ($country=='SO') $country="Samoa";
if ($country=='AS') $country="Samoa American";
if ($country=='SM') $country="San Marino";
if ($country=='ST') $country="Sao Tome & Principe";
if ($country=='SA') $country="Saudi Arabia";
if ($country=='SN') $country="Senegal";
if ($country=='RS') $country="Serbia";
if ($country=='SC') $country="Seychelles";
if ($country=='SL') $country="Sierra Leone";
if ($country=='SG') $country="Singapore";
if ($country=='SK') $country="Slovakia";
if ($country=='SI') $country="Slovenia";
if ($country=='SB') $country="Solomon Islands";
if ($country=='OI') $country="Somalia";
if ($country=='ZA') $country="South Africa";
if ($country=='ES') $country="Spain";
if ($country=='LK') $country="Sri Lanka";
if ($country=='SD') $country="Sudan";
if ($country=='SR') $country="Suriname";
if ($country=='SZ') $country="Swaziland";
if ($country=='SE') $country="Sweden";
if ($country=='CH') $country="Switzerland";
if ($country=='SY') $country="Syria";
if ($country=='TA') $country="Tahiti";
if ($country=='TW') $country="Taiwan";
if ($country=='TJ') $country="Tajikistan";
if ($country=='TZ') $country="Tanzania";
if ($country=='TH') $country="Thailand";
if ($country=='TG') $country="Togo";
if ($country=='TK') $country="Tokelau";
if ($country=='TO') $country="Tonga";
if ($country=='TT') $country="Trinidad & Tobago";
if ($country=='TN') $country="Tunisia";
if ($country=='TR') $country="Turkey";
if ($country=='TU') $country="Turkmenistan";
if ($country=='TC') $country="Turks & Caicos Is";
if ($country=='TV') $country="Tuvalu";
if ($country=='UG') $country="Uganda";
if ($country=='UA') $country="Ukraine";
if ($country=='AE') $country="United Arab Emirates";
if ($country=='GB') $country="United Kingdom";
if ($country=='US') $country="United States of America";
if ($country=='UY') $country="Uruguay";
if ($country=='UZ') $country="Uzbekistan";
if ($country=='VU') $country="Vanuatu";
if ($country=='VS') $country="Vatican City State";
if ($country=='VE') $country="Venezuela";
if ($country=='VN') $country="Vietnam";
if ($country=='VB') $country="Virgin Islands (Brit)";
if ($country=='VA') $country="Virgin Islands (USA)";
if ($country=='WK') $country="Wake Island";
if ($country=='WF') $country="Wallis & Futana Is";
if ($country=='YE') $country="Yemen";
if ($country=='ZR') $country="Zaire";
if ($country=='ZM') $country="Zambia";
if ($country=='ZW') $country="Zimbabwe";
return $country;
}
function en_salis($country){
if ($country=='AF') $country="Afghanistan";
if ($country=='AL') $country="Albania";
if ($country=='DZ') $country="Algeria";
if ($country=='AS') $country="American Samoa";
if ($country=='AD') $country="Andorra";
if ($country=='AG') $country="Angola";
if ($country=='AI') $country="Anguilla";
if ($country=='AG') $country="Antigua & Barbuda";
if ($country=='AR') $country="Argentina";
if ($country=='AA') $country="Armenia";
if ($country=='AW') $country="Aruba";
if ($country=='AU') $country="Australia";
if ($country=='AT') $country="Austria";
if ($country=='AZ') $country="Azerbaijan";
if ($country=='BS') $country="Bahamas";
if ($country=='BH') $country="Bahrain";
if ($country=='BD') $country="Bangladesh";
if ($country=='BB') $country="Barbados";
if ($country=='BY') $country="Belarus";
if ($country=='BE') $country="Belgium";
if ($country=='BZ') $country="Belize";
if ($country=='BJ') $country="Benin";
if ($country=='BM') $country="Bermuda";
if ($country=='BT') $country="Bhutan";
if ($country=='BO') $country="Bolivia";
if ($country=='BL') $country="Bonaire";
if ($country=='BA') $country="Bosnia & Herzegovina";
if ($country=='BW') $country="Botswana";
if ($country=='BR') $country="Brazil";
if ($country=='BC') $country="British Indian Ocean Ter";
if ($country=='BN') $country="Brunei";
if ($country=='BG') $country="Bulgaria";
if ($country=='BF') $country="Burkina Faso";
if ($country=='BI') $country="Burundi";
if ($country=='KH') $country="Cambodia";
if ($country=='CM') $country="Cameroon";
if ($country=='CA') $country="Canada";
if ($country=='IC') $country="Canary Islands";
if ($country=='CV') $country="Cape Verde";
if ($country=='KY') $country="Cayman Islands";
if ($country=='CF') $country="Central African Republic";
if ($country=='TD') $country="Chad";
if ($country=='CD') $country="Channel Islands";
if ($country=='CL') $country="Chile";
if ($country=='CN') $country="China";
if ($country=='CI') $country="Christmas Island";
if ($country=='CS') $country="Cocos Island";
if ($country=='CO') $country="Colombia";
if ($country=='CC') $country="Comoros";
if ($country=='CG') $country="Congo";
if ($country=='CK') $country="Cook Islands";
if ($country=='CR') $country="Costa Rica";
if ($country=='CT') $country="Cote D'Ivoire";
if ($country=='HR') $country="Croatia";
if ($country=='CU') $country="Cuba";
if ($country=='CB') $country="Curacao";
if ($country=='CY') $country="Cyprus";
if ($country=='CZ') $country="Czech Republic";
if ($country=='DK') $country="Denmark";
if ($country=='DJ') $country="Djibouti";
if ($country=='DM') $country="Dominica";
if ($country=='DO') $country="Dominican Republic";
if ($country=='TM') $country="East Timor";
if ($country=='EC') $country="Ecuador";
if ($country=='EG') $country="Egypt";
if ($country=='SV') $country="El Salvador";
if ($country=='GQ') $country="Equatorial Guinea";
if ($country=='ER') $country="Eritrea";
if ($country=='EE') $country="Estonia";
if ($country=='ET') $country="Ethiopia";
if ($country=='FA') $country="Falkland Islands";
if ($country=='FO') $country="Faroe Islands";
if ($country=='FJ') $country="Fiji";
if ($country=='FI') $country="Finland";
if ($country=='FR') $country="France";
if ($country=='GF') $country="French Guiana";
if ($country=='PF') $country="French Polynesia";
if ($country=='FS') $country="French Southern Ter";
if ($country=='GA') $country="Gabon";
if ($country=='GM') $country="Gambia";
if ($country=='GE') $country="Georgia";
if ($country=='DE') $country="Germany";
if ($country=='GH') $country="Ghana";
if ($country=='GI') $country="Gibraltar";
if ($country=='GB') $country="Great Britain";
if ($country=='GR') $country="Greece";
if ($country=='GL') $country="Greenland";
if ($country=='GD') $country="Grenada";
if ($country=='GP') $country="Guadeloupe";
if ($country=='GU') $country="Guam";
if ($country=='GT') $country="Guatemala";
if ($country=='GN') $country="Guinea";
if ($country=='GY') $country="Guyana";
if ($country=='HT') $country="Haiti";
if ($country=='HW') $country="Hawaii";
if ($country=='HN') $country="Honduras";
if ($country=='HK') $country="Hong Kong";
if ($country=='HU') $country="Hungary";
if ($country=='IS') $country="Iceland";
if ($country=='IN') $country="India";
if ($country=='ID') $country="Indonesia";
if ($country=='IA') $country="Iran";
if ($country=='IQ') $country="Iraq";
if ($country=='IR') $country="Ireland";
if ($country=='IM') $country="Isle of Man";
if ($country=='IL') $country="Israel";
if ($country=='IT') $country="Italy";
if ($country=='JM') $country="Jamaica";
if ($country=='JP') $country="Japan";
if ($country=='JO') $country="Jordan";
if ($country=='KZ') $country="Kazakhstan";
if ($country=='KE') $country="Kenya";
if ($country=='KI') $country="Kiribati";
if ($country=='NK') $country="Korea North";
if ($country=='KS') $country="Korea South";
if ($country=='KW') $country="Kuwait";
if ($country=='KG') $country="Kyrgyzstan";
if ($country=='LA') $country="Laos";
if ($country=='LV') $country="Latvia";
if ($country=='LB') $country="Lebanon";
if ($country=='LS') $country="Lesotho";
if ($country=='LR') $country="Liberia";
if ($country=='LY') $country="Libya";
if ($country=='LI') $country="Liechtenstein";
if ($country=='LT') $country="Lithuania";
if ($country=='LU') $country="Luxembourg";
if ($country=='MO') $country="Macau";
if ($country=='MK') $country="Macedonia";
if ($country=='MG') $country="Madagascar";
if ($country=='MY') $country="Malaysia";
if ($country=='MW') $country="Malawi";
if ($country=='MV') $country="Maldives";
if ($country=='ML') $country="Mali";
if ($country=='MT') $country="Malta";
if ($country=='MH') $country="Marshall Islands";
if ($country=='MQ') $country="Martinique";
if ($country=='MR') $country="Mauritania";
if ($country=='MU') $country="Mauritius";
if ($country=='ME') $country="Mayotte";
if ($country=='MX') $country="Mexico";
if ($country=='MI') $country="Midway Islands";
if ($country=='MD') $country="Moldova";
if ($country=='MC') $country="Monaco";
if ($country=='MN') $country="Mongolia";
if ($country=='MS') $country="Montserrat";
if ($country=='MA') $country="Morocco";
if ($country=='MZ') $country="Mozambique";
if ($country=='MM') $country="Myanmar";
if ($country=='NA') $country="Nambia";
if ($country=='NU') $country="Nauru";
if ($country=='NP') $country="Nepal";
if ($country=='AN') $country="Netherland Antilles";
if ($country=='NL') $country="Netherlands (Holland, Europe)";
if ($country=='NV') $country="Nevis";
if ($country=='NC') $country="New Caledonia";
if ($country=='NZ') $country="New Zealand";
if ($country=='NI') $country="Nicaragua";
if ($country=='NE') $country="Niger";
if ($country=='NG') $country="Nigeria";
if ($country=='NW') $country="Niue";
if ($country=='NF') $country="Norfolk Island";
if ($country=='NO') $country="Norway";
if ($country=='OM') $country="Oman";
if ($country=='PK') $country="Pakistan";
if ($country=='PW') $country="Palau Island";
if ($country=='PS') $country="Palestine";
if ($country=='PA') $country="Panama";
if ($country=='PG') $country="Papua New Guinea";
if ($country=='PY') $country="Paraguay";
if ($country=='PE') $country="Peru";
if ($country=='PH') $country="Philippines";
if ($country=='PO') $country="Pitcairn Island";
if ($country=='PL') $country="Poland";
if ($country=='PT') $country="Portugal";
if ($country=='PR') $country="Puerto Rico";
if ($country=='QA') $country="Qatar";
if ($country=='ME') $country="Republic of Montenegro";
if ($country=='RS') $country="Republic of Serbia";
if ($country=='RE') $country="Reunion";
if ($country=='RO') $country="Romania";
if ($country=='RU') $country="Russia";
if ($country=='RW') $country="Rwanda";
if ($country=='NT') $country="St Barthelemy";
if ($country=='EU') $country="St Eustatius";
if ($country=='HE') $country="St Helena";
if ($country=='KN') $country="St Kitts-Nevis";
if ($country=='LC') $country="St Lucia";
if ($country=='MB') $country="St Maarten";
if ($country=='PM') $country="St Pierre & Miquelon";
if ($country=='VC') $country="St Vincent & Grenadines";
if ($country=='SP') $country="Saipan";
if ($country=='SO') $country="Samoa";
if ($country=='AS') $country="Samoa American";
if ($country=='SM') $country="San Marino";
if ($country=='ST') $country="Sao Tome & Principe";
if ($country=='SA') $country="Saudi Arabia";
if ($country=='SN') $country="Senegal";
if ($country=='RS') $country="Serbia";
if ($country=='SC') $country="Seychelles";
if ($country=='SL') $country="Sierra Leone";
if ($country=='SG') $country="Singapore";
if ($country=='SK') $country="Slovakia";
if ($country=='SI') $country="Slovenia";
if ($country=='SB') $country="Solomon Islands";
if ($country=='OI') $country="Somalia";
if ($country=='ZA') $country="South Africa";
if ($country=='ES') $country="Spain";
if ($country=='LK') $country="Sri Lanka";
if ($country=='SD') $country="Sudan";
if ($country=='SR') $country="Suriname";
if ($country=='SZ') $country="Swaziland";
if ($country=='SE') $country="Sweden";
if ($country=='CH') $country="Switzerland";
if ($country=='SY') $country="Syria";
if ($country=='TA') $country="Tahiti";
if ($country=='TW') $country="Taiwan";
if ($country=='TJ') $country="Tajikistan";
if ($country=='TZ') $country="Tanzania";
if ($country=='TH') $country="Thailand";
if ($country=='TG') $country="Togo";
if ($country=='TK') $country="Tokelau";
if ($country=='TO') $country="Tonga";
if ($country=='TT') $country="Trinidad & Tobago";
if ($country=='TN') $country="Tunisia";
if ($country=='TR') $country="Turkey";
if ($country=='TU') $country="Turkmenistan";
if ($country=='TC') $country="Turks & Caicos Is";
if ($country=='TV') $country="Tuvalu";
if ($country=='UG') $country="Uganda";
if ($country=='UA') $country="Ukraine";
if ($country=='AE') $country="United Arab Emirates";
if ($country=='GB') $country="United Kingdom";
if ($country=='US') $country="United States of America";
if ($country=='UY') $country="Uruguay";
if ($country=='UZ') $country="Uzbekistan";
if ($country=='VU') $country="Vanuatu";
if ($country=='VS') $country="Vatican City State";
if ($country=='VE') $country="Venezuela";
if ($country=='VN') $country="Vietnam";
if ($country=='VB') $country="Virgin Islands (Brit)";
if ($country=='VA') $country="Virgin Islands (USA)";
if ($country=='WK') $country="Wake Island";
if ($country=='WF') $country="Wallis & Futana Is";
if ($country=='YE') $country="Yemen";
if ($country=='ZR') $country="Zaire";
if ($country=='ZM') $country="Zambia";
if ($country=='ZW') $country="Zimbabwe";
return $country;
}
?>
switch ( $this_page_file ){
case "list_blocks":
$pagefile = "list_blocks.php";
$pagetitle = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_title', $dblink );
$pagekeywords = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_keywords', $dblink );
$pagedescription = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_description', $dblink );
$meta_tags = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_tags', $dblink );
$cssjs = $meta_tags."\n";
break;
case "list_blocks_contacts":
$pagefile = "list_blocks_contacts.php";
$pagetitle = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_title', $dblink );
$pagekeywords = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_keywords', $dblink );
$pagedescription = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_description', $dblink );
$meta_tags = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_tags', $dblink );
$cssjs = $meta_tags."\n";
break;
case "list_blocks_products":
$pagefile = "list_blocks_products.php";
$pagetitle = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_title', $dblink );
$pagekeywords = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_keywords', $dblink );
$pagedescription = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_description', $dblink );
$meta_tags = getfrombase('menu_items'.$baze,'id',$this_page_id,'meta_tags', $dblink );
$cssjs = $meta_tags."\n";
break;
case "search":
$pagefile = "paieska.php";
$pagetitle = "$search_title";
$pagekeywords = '';
$pagedescription = '';
$cssjs = '';
break;
case "subscribe":
$pagefile = "subscribe.php";
$pagetitle = "$subscribe_title";
$pagekeywords = '';
$pagedescription = '';
$cssjs = '';
break;
case "404":
$pagefile = "404.php";
$pagetitle = "Klaida 404";
$pagekeywords = "";
$pagedescription = "";
$cssjs = '';
break;
case "gdpr_info":
$pagefile = "gdpr_info.php";
$pagetitle = "Imlitex";
$pagekeywords = "";
$pagedescription = "";
$cssjs = '
';
break;
default:
$pagefile = "main.php";
$pagetitle = getfrombase('settings'.$baze,'s_key','meta_title','s_value', $dblink );
$pagekeywords = getfrombase('settings'.$baze,'s_key','meta_keywords','s_value', $dblink );
$pagedescription = getfrombase('settings'.$baze,'s_key','meta_desc','s_value', $dblink );
$cssjs = '';
break;
}
$pagetitle.= "";
?>