<?php
$titlelogo = explode(" ", BASE_NAME);
$titleword1 = $titlelogo[0];
$titleword2 = $titlelogo[1];
// Solve problem for H1 Tags count character for SEO 20-70, so i choise only for minimal
if(strlen(BASE_NAME) < 20){$addchar = str_repeat("&nbsp;", 22 - strlen(BASE_NAME));}
// Good work for H1 tags

echo '<div class="" style="margin-top:0px;margin-bottom:6px;padding:4px;height:auto;max-height:146px;">';
echo '<div class="w3-col l3 m3 s12 w3-center">';

if (file_exists(THM.$set['theme'].'/img/'.$set['logo'])){
    
echo '<a rel="dofollow" class="w3-center" style="margin-top:10px;" href="'.BASE_URL.'">';
echo '<img src="'.PATH.'themes/'.$set['theme'].'/img/'.$set['logo'].'" alt="'.BASE_NAME.'" title="'.BASE_NAME.'" class="w3-center" style="width:300px;max-width:100%;height:auto;margin-top:16px;margin-bottomes:20px;padding:8px;"/></a>';

echo '<h1 class="w3-hide" style="margin:0;padding:0;">';
echo $titleword1.' <span class="dotcom">'.$titleword2.'</span>'.$addchar;
echo '</h1>';
  
   }else{
    
echo '<a rel="dofollow" class="w3-container logo" href="'.BASE_URL.'">';
echo '<h1 style="margin:0;padding:0;">';
echo $titleword1.'<span class="dotcom">'.$titleword2.'</span>'.$addchar;
echo '</h1></a>';
  
  }
echo '</div>';

echo '<div class="w3-col l9 m9 s12 w3-center">';

$banner_url    = 'https://pmar.ro/anunturi/';
$banner_image  = 'https://pmar.ro/wp-content/uploads/2019/10/banner-anunturi.jpg';
$banner_title  = 'Anunțuri';
$banner_alt    = 'banner-anunturi.jpg';
$banner_target = '_blank';

//echo '<div class="w3-display-container_ w3-hide-small w3-hide-medium" style="height:146px;">';
echo '<a class=""  href="'.$banner_url.'" target="'.$banner_target.'">';
echo '<img src="'.$banner_image.'" alt="'.$banner_alt.'" title="'.$banner_title.'" class="w3-center" style="width:730px;max-width:100%;height:auto;margin-top:10px;margin-bottomes:20px;padding:8px;"></a>';
//echo '</div>';

echo '<div class="w3-margin-bottom w3-hide w3-mobile">';
echo '<a class="" href="'.$banner_url.'" target="'.$banner_target.'">';
echo '<img src="'.$banner_image.'" alt="'.$banner_alt.'" title="'.$banner_title.'" style="max-width:100%;"></a>';
echo '</div>';

echo '</div></div>';

echo '<div id="navbar" class="w3-margin-bottom" style="z-index:1005;">';
echo '<div class="w3-content" style="max-width:1431px;">';
echo '<div class="w3-bar w3-bluepm w3-card w3-large" style="text-transform:uppercase;height:42px;" id="myNavbar">';

// Left Menu
echo '<a href="'.BASE_URL.'" class="w3-bar-item w3-button w3-hover-seagreen w3-hide w3-wide" title="'.$lng['top_menu_home'].'" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;">'.BASE_NAME.'</a>';

echo '<a href="'.BASE_URL.'" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" title="'.$lng['top_menu_home'].'">'.$lng['top_menu_home'].'</a>';

echo '<a href="'.BASE_URL.'/columbofili/index.html" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" title="Catalog Columbofili">Catalog columbofili</a>';

echo '<a href="'.BASE_URL.'/competitii/" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" title="Competiții">Competiții</a>';

echo '<a href="'.BASE_URL.'/licitatii/" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" title="Licitații">Licitații</a>';

echo '<a href="'.BASE_URL.'/anunturi/" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" title="Anunțuri">Anunțuri</a>';

echo '<a href="'.BASE_URL.'/links/" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" title="Link-uri">Links</a>';

echo '<a href="'.BASE_URL.'/contact/" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" title="Contact">Contact</a>';

//echo '<a class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" href="'.PATH.'book.html" title="'.$lng['top_menu_book'].'"> ';

//echo '<i class="fa fa-fw fa-address-book-o"></i> '.$lng['top_menu_book'].'</a>';

/*echo '<div class="w3-dropdown-click w3-bluepm w3-hover-seagreen w3-hide-small w3-hide-medium">';

echo '<button onclick="dropDownMenu()" class="w3-button w3-bluepm w3-hover-seagreen" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;text-transform:uppercase;"> <i class="fa fa-fw fa-flag w3-margin-left"></i> '.$lng['top_menu_country'];

echo '<i class="fa fa-fw fa-caret-down"></i></button> ';

echo '<div id="countries" class="dropdown-content w3-card">';

echo '<div class="w3-content" style="max-width:1431px;">';

echo '<div class="header w3-container w3-white w3-card">';

echo '<h2 class="w3-container" style="margin:0;padding:0;padding-left:10px;font-size:18px;">'.$lng['top_smenu_country_head'].'</h2>';

echo '</div>';

echo '<div class="w3-row w3-animate-bottom">';

include(BASE);
$qcountry = $dbc->query("SELECT * FROM countries ORDER BY country_name ASC");
if($qcountry->num_rows > 0){while($resco = $qcountry->fetch_assoc()){

echo '<div class="column">';

echo '<a href="'.PATH.'country-';

$link = strtolower(str_replace(' ', '-', $resco['country_name']));

echo $link.'.html" style="text-decoration:none;">';

echo '<img src="'.PATH.'libs/img/flags/'.$resco['country_code'].'.png" alt="'.$lng['lng_'.$resco['country_code']].'" title="'.$lng['lng_'.$resco['country_code']].'" style="width:24px;height:24px;margin:0;margin-top:-4px;" loading="lazy"/> '.$lng['lng_'.$resco['country_code']].'</a>';

echo '</div>';
 } } 
$dbc->close();

echo '</div></div></div></div>';*/
// END Left Menu

// Right Menu
if(!empty($set['trs_g'])){
// Google Translate
echo '<div id="google_translate_element" class="w3-bar-item w3-button w3-hover-seagreen w3-right w3-hide-small" style="margin:0px;margin-top:-3px;width:200px;overflow:hidden;font-weight: 700;line-height: 1.188em;font-size: 14px;padding:0px;padding-left:6px;text-transform:uppercase;"></div>';
// END Google Translate
 }else{
 if(!empty($set['trs'])){

echo '<div class="w3-dropdown-hover w3-hide-small w3-right" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:0px;">';

echo '<button class="w3-button w3-bluepm w3-hover-seagreen" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;text-transform:uppercase;" title="'.$lng['language'].'">';

echo '<img src="'.PATH.'libs/img/flags/'.$lang.'.png" alt="'.$lng['top_menu_lang_active'].'" title="'.$lng['top_menu_lang_active'].'" style="width:24px;height:24px;margin:0;margin-top:-4px;" loading="lazy"/> <i class="fa fa-fw fa-caret-down"></i></button>';

echo '<div class="w3-dropdown-content w3-bar-block w3-card w3-bluepm" style="margin-top:-4px;margin-left:-87px;">';
     
echo '<form action="" method="post">';
echo '<button class="w3-bar-item w3-button w3-hover-seagreen">';
echo '<img src="'.PATH.'libs/img/flags/en.png" alt="English" title="English" style="width:24px;height:24px;margin:0;margin-top:-4px;" loading="lazy"/> English</button>';
echo '<input type="hidden" name="langID" value="1"/>';
echo '<input type="hidden" name="changelang" value="true"/>';
echo '</form>';
      
echo '<form action="" method="post">';
echo '<button class="w3-bar-item w3-button w3-hover-seagreen">';
echo '<img src="'.PATH.'libs/img/flags/ro.png" alt="Română" title="Română" style="width:24px;height:24px;margin:0;margin-top:-4px;" loading="lazy"/> Română</button>';
echo '<input type="hidden" name="langID" value="2"/>';
echo '<input type="hidden" name="changelang" value="true"/>';
echo '</form>';
echo '</div>';
echo '</div>';
  }
 }
 
if(isset($_SESSION['uid'])){

echo '<div class="w3-dropdown-hover w3-bluepm w3-hover-seagreen w3-hide-small w3-hide-medium w3-right">';

echo '<button class="w3-button w3-bluepm w3-hover-seagreen" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;text-transform:uppercase;"><i class="fa fa-fw fa-user-o"></i> ';

//if(!empty($_SESSION['first_name'])){echo $_SESSION['first_name'];}else{$gun = explode("-", $_SESSION['user_name']);echo $gun[0];} 

echo ' <i class="fa fa-fw fa-caret-down"></i></button>';

echo '<div class="w3-dropdown-content w3-bar-block w3-card w3-bluepm" style="margin-left:-135px;text-transform:none;">';
     
echo '<a href="'.PATH.'myaccount.html" class="w3-bar-item w3-button w3-hover-seagreen">';

echo '<i class="fa fa-fw fa-user-o"></i> '.$lng['top_smenu_my_account'].'</a>';

echo '<a href="'.PATH.'change_password.html" class="w3-bar-item w3-button w3-hover-seagreen">';

echo '<i class="fa fa-fw fa-key"></i> '.$lng['top_smenu_change_password'].'</a>';

echo '<form action="" method="post">';
echo '<button class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-right" type="submit">';
echo '<i class="fa fa-fw fa-power-off"></i> '.$lng['top_smenu_logout'].'</button>';
echo '<input type="hidden" name="userlogout" value="true"/>';
echo '</form>';
      
echo '</div>';
echo '</div>';

if($_SESSION['lid'] > 0){
     
echo '<a href="'.PATH.'admin-dashboard.html" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium w3-right" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;">';
echo '<i class="fa fa-user-secret"></i> '.$lng['top_smenu_admin'].'</a>';

    }
 }else{
echo '<a class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium w3-right" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" href="'.PATH.'login.html">';
echo '<i class="fa fa-fw fa-lock"></i> '.$lng['top_smenu_sign_in'].'</a>';

if(!empty($set['reg'])){
echo '<a class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium w3-right" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" href="'.PATH.'index.html">';
echo '<i class="fa fa-user-plus"></i> '.$lng['top_smenu_signup'].'</a>';
     }
  }
// Right Menu

// Hide right-floated links on small screens and replace them with a menu icon

echo '<a href="javascript:void(0)" class="w3-bar-item w3-button w3-right w3-seagreen w3-hover-bluepm w3-hide-large" onclick="w3_open()"><i class="fa fa-th-large"></i><span class="w3-hide">Menu for Mobile</span></a>';

echo '<a href="javascript:void(0)" onclick="document.getElementById(\'searchmobile\').style.display=\'block\'" class="w3-bar-item w3-button w3-right w3-bluepm w3-hover-seagreen w3-hide-large"><i class="fa fa-search"></i><span class="w3-hide">Search for Mobile</span></a>';

echo '<a class="w3-bar-item w3-button w3-right w3-hover-teal w3-hide w3-round-large" style="margin-top:6px;"><i class="fa fa-plus"></i></a>';

// END Hide

echo '</div></div></div>';

// Sidebar on small screens when clicking the menu icon
echo '<nav class="w3-sidebar w3-white w3-card-4 w3-animate-left w3-hide-large" style="display:none;z-index:3;width:100%;top:0px;" id="mySidebar">';

echo '<div class="w3-row w3-center">';

    echo '<div class="w3-col w3-card" style="width:96%;margin:2%;">';

    echo '<a onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
    echo '<i class="fa fa-close w3-xxxlarge"></i></a>';
   
    echo '</div></div>';

if(isset($_SESSION['uid'])){

echo '<div class="w3-row w3-center">';

echo '<div class="w3-col w3-card" style="width:27.33%;margin:2%;">';

echo '<a href="'.PATH.'myaccount.html" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-seagreen w3-hover-text-seagreen">';

echo '<i class="fa fa-user-o w3-xxxlarge"></i><br/>';
echo '<span class="w3-small">'.$lng['top_smenu_my_account'].'</span></a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:33.33%;margin:2%;">';

echo '<a href="'.PATH.'change_password.html" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm"><i class="fa fa-key w3-xxxlarge"></i><br/>';
echo '<span class="w3-tiny" style="word-break: break-all;">'.$lng['top_smenu_change_password'].'</span></a>';

echo '</div>';

echo '<div class="w3-col w3-card" style="width:27.33%;margin:2%;">';

echo '<form action="" method="post">';

echo '<button class="w3-bar-item w3-button w3-white w3-hover-white w3-text-red w3-hover-text-red" type="submit"><i class="fa fa-power-off w3-xxxlarge"></i><br/>';

echo '<span class="w3-small">'.$lng['top_smenu_logout'].'</span></button>';

echo '<input type="hidden" name="userlogout" value="true"/>';

echo '</form>';

echo '</div></div>';

if($_SESSION['lid'] > 0){
    
    echo '<div class="w3-row w3-center">';

    echo '<div class="w3-col w3-card" style="width:98%;margin:2%;">';

    echo '<a href="'.PATH.'admin-dashboard.html" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
    echo '<i class="fa fa-user-secret w3-xxxlarge"></i><br/>';
echo '<span class="w3-small">'.$lng['top_smenu_admin'].'</span></a>';
   
    echo '</div></div>';
    
    }
    
  }else{

echo '<div class="w3-row w3-center">';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.PATH.'index.html" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-seagreen w3-hover-text-seagreen">';
echo '<i class="fa fa-user-plus w3-xxxlarge"></i><br/>';
echo $lng['top_smenu_signup'];
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.PATH.'login.html" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-red w3-hover-text-red"><i class="fa fa-lock w3-xxxlarge"></i><br/>';
echo $lng['top_smenu_sign_in'];
echo '</a>';
echo '</div>';
echo '</div>';
 }
 
echo '<div class="w3-row w3-center">'; 
 
echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.BASE_URL.'" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
echo '<i class="fa fa-home w3-xxxlarge"></i><br/>';
echo $lng['top_menu_home'];
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.BASE_URL.'/columbofili/" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
echo '<i class="fa fa-folder w3-xxxlarge"></i><br/>';
echo 'Catalog';
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.BASE_URL.'/competitii/" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
echo '<i class="fa fa-trophy w3-xxxlarge"></i><br/>';
echo 'Competiții';
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.BASE_URL.'/licitatii/" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
echo '<i class="fa fa-suitcase w3-xxxlarge"></i><br/>';
echo 'Licitații';
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.BASE_URL.'/anunturi/" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
echo '<i class="fa fa-bullhorn w3-xxxlarge"></i><br/>';
echo 'Anunțuri';
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.BASE_URL.'/links/" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
echo '<i class="fa fa-link w3-xxxlarge"></i><br/>';
echo 'Links';
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:46%;margin:2%;">';
echo '<a href="'.BASE_URL.'/contact/" onclick="w3_close()" class="w3-bar-item w3-button w3-white w3-hover-white w3-text-bluepm w3-hover-text-bluepm">';
echo '<i class="fa fa-envelope w3-xxxlarge"></i><br/>';
echo 'Contact';
echo '</a>';
echo '</div>';
 
 echo '</div>'; 
 

/*echo '<div class="w3-row w3-center w3-hide">';

echo '<div class="w3-col w3-card" style="width:32%;margin:2%;">';
echo '<a onclick="document.getElementById(\'countries\').style.display=\'block\'" class="w3-bar-item w3-button w3-text-blue">';
echo '<i class="fa fa-globe w3-xxxlarge"></i><br/>';
echo $lng['top_menu_country'];
echo '</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:24%;margin:2%;">';
echo '<a href="<?=PATH?>book.html" onclick="w3_close()" class="w3-bar-item w3-button w3-text-blue">';
echo '<i class="fa fa-address-book w3-xxxlarge"></i><br/>'.$lng['top_menu_book'].'</a>';
echo '</div>';

echo '<div class="w3-col w3-card" style="width:32%;margin:2%;">';
echo '<a onclick="document.getElementById(\'language\').style.display=\'block\'" class="w3-bar-item w3-button w3-text-blue">';
echo '<i class="fa fa-flag w3-xxxlarge"></i><br/>';
echo $lng['language'];
echo '</a>';

echo '</div></div>'; */

echo '</nav>';

// Modal Section 

// Countries for mobile
/*
echo '<div id="countries" class="w3-modal" style="z-index:1007;margin-top:-50px;">';
echo '<div class="w3-modal-content w3-animate-top" style="width:100%;max-width:100%;margin:auto;">';
echo '<div class="w3-container_">';
echo '<span onclick="document.getElementById(\'countries\').style.display=\'none\'" class="w3-button w3-display-topright w3-red" style="margin-top:5px;"><i class="fa fa-close w3-xlarge"></i></span>';

echo '<div class="w3-row w3-hide-large">';
echo '<div class="w3-container w3-text-white w3-card" style="background-color:#117594;">';
echo '<h3 style="margin-top:8px;font-size:22px;"><i class="fa fa-fw fa-flag"></i> '.$lng['top_menu_country'].'</h3>';
echo '</div>';
echo '<div class="w3-bar-block w3-white">';

include(BASE);

$rcountry = $dbc->query("SELECT * FROM `countries` WHERE 1=1 ORDER BY country_name ASC");
 if($rcountry->num_rows > 0){
     while($rowcnt = $rcountry->fetch_assoc()){
               
echo '<a href="<'.PATH.'country-';
$link = strtolower(str_replace(' ', '-', $rowcnt['country_name']));
echo $link.'.html" class="w3-bar-item w3-button w3-hover-blue w3-card" style="margin-bottom:4px;text-decoration:none;"><img src="'.PATH.'libs/img/flags/'.$rowcnt['country_code'].'.png" alt="'.$rowcnt['country_name'].'" title="'.$rowcnt['country_name'].'" style="width:24px;height:24px;margin:0;margin-top:-4px;" loading="lazy"/> '.$rowcnt['country_name'].'</a>';
     } 
   }else{
      echo '<div class="w3-padding w3-center">Not country found.</div>';
   }
$dbc->close();

echo '</div></div></div>';
echo '<div class="w3-hide">&nbsp;</div>';
echo '</div></div>'; */
// END Countries for mobile

// Languages for mobile
/*
echo '<div id="language" class="w3-modal" style="z-index:1007;margin-top:-50px;">';
echo '<div class="w3-modal-content w3-animate-top" style="width:100%;max-width:100%;margin:auto;">';
echo '<div class="w3-container_">';
echo '<span onclick="document.getElementById(\'language\').style.display=\'none\'" class="w3-button w3-display-topright w3-red" style="margin-top:5px;"><i class="fa fa-close w3-xlarge"></i></span>';

echo '<div class="w3-row w3-hide-large">';
echo '<div class="w3-container w3-text-white w3-card" style="background-color:#117594;">';
echo '<h3 style="margin-top:8px;font-size:22px;"><i class="fa fa-fw fa-language"></i> '.$lng['language'].'</h3>';
echo '</div>';
echo '<div class="w3-bar-block w3-white">';

echo '<form action="" method="post">';
echo '<button class="w3-bar-item w3-button w3-hover-blue w3-card" style="margin-bottom:4px;">';
echo '<img src="'.PATH.'libs/img/flags/uk.png" alt="English" title="English" style="width:24px;height:24px;margin:0;margin-top:-4px;" loading="lazy"/> English</button>';
echo '<input type="hidden" name="langID" value="1"/>';
echo '<input type="hidden" name="changelang" value="true"/>';
echo '</form>';
      
echo '<form action="" method="post">';
echo '<button class="w3-bar-item w3-button w3-hover-blue w3-card" style="margin-bottom:4px;">';
echo '<img src="'.PATH.'libs/img/flags/ro.png" alt="Română" title="Română" style="width:24px;height:24px;margin:0;margin-top:-4px;" loading="lazy"/> Română</button>';
echo '<input type="hidden" name="langID" value="2"/>';
echo '<input type="hidden" name="changelang" value="true"/>';
echo '</form>';

echo '</div></div></div><div class="w3-hide">&nbsp;</div></div></div>';*/
// END Languages for mobile

// Search for mobile
echo '<div id="searchmobile" class="w3-modal" style="z-index:1007;margin-top:-50px;">';
echo '<div class="w3-modal-content w3-animate-top" style="width:100%;max-width:100%;margin:auto;">';
echo '<div class="w3-container_">';
echo '<span onclick="document.getElementById(\'searchmobile\').style.display=\'none\'" class="w3-button w3-display-topright w3-seagreen w3-hover-bluepm" style="margin-top:5px;"><i class="fa fa-close w3-xlarge"></i></span>';

echo '<div class="w3-row w3-hide-large">';
echo '<div class="w3-container w3-seagreen w3-card">';
echo '<h2 style="margin-top:8px;font-size:22px;"><i class="fa fa-fw fa-search"></i> '.$lng['search_form_search_btn'].'</h2>';
echo '</div>';
echo '<div class="w3-bar-block w3-white">'; ?><div class="w3-row"><div class="w3-container w3-bluepm" style="margin-top:0px;padding-top:5px;padding-bottom:5px;"><?php
echo '<form action="search.html" method="POST">';

echo '<div class="w3-col l3 m6 s12" style="padding:2px;"><input class="w3-input w3-border w3-large w3-white" type="text" name="first_name" value="" placeholder="'.$lng['search_form_ph_first_name'].'" required=""/></div>';

echo '<div class="w3-col l3 m6 s12" style="padding:2px;"><input class="w3-input w3-border w3-large w3-white" type="text" name="last_name" value="" placeholder="'.$lng['search_form_ph_last_name'].'"/></div>';

echo '<div class="w3-col l2 m6 s12 w3-hide" style="padding:2px;">';
echo '<select class="w3-select w3-border w3-large w3-bluepm" name="country_id" id="country" required="">';

//echo '<option value="">Select a country</option>';

//include(BASE);
//$rcountryB = $dbc->query("SELECT * FROM `countries` WHERE 1=1 ORDER BY country_name ASC");
// if($rcountryB->num_rows > 0){
//     while($rowcntB = $rcountryB->fetch_assoc()){
                
//echo '<option class="w3-hover-seagreen" value="'.$rowcntB['country_id'].'">'.$lng['lng_'.$rowcntB['country_code']].'</option>';
echo '<option class="w3-hover-seagreen" value="23" selected="">'.$lng['lng_ro'].'</option>';     
//    } 
//   }
// $dbc->close();

echo '</select>';
echo '</div>';

echo '<div class="w3-col l3 m6 s12" style="padding:2px;">';
echo '<select class="w3-select w3-border w3-large  w3-white" name="cnty_id" id="county">';


include(BASE);
$res = $dbc->query("SELECT * FROM `counties` WHERE `country_id`='23'");
if($res->num_rows > 0){
echo "<option selected=\"\" value=\"\">".$lng['search_form_select_all_county']."</option>"; 
while($r = $res->fetch_array()){
echo "<option value='".$r['cnty_id']."'>".$r['county_name']."</option>";          
 }
 }else{
    echo "<option selected=\"\" disabled=\"\">".$lng['search_form_select_no_county']."</option>"; 
 } 

echo '</select>';
echo '</div>';

echo '<div class="w3-col l3 m6 s12 w3-center" style="padding:2px;">';
echo '<button class="w3-button w3-block w3-bluepm w3-hover-seagreen w3-large" type="submit"/>';
echo '<i class="fa fa-search"></i> '.$lng['search_form_search_btn'];
echo '</button>';
echo '</div>';

echo '<input type="hidden" name="" value=""/>';
echo '<input type="hidden" name="searchformamember" value="true"/>';

echo '</form>';

?></div></div><?php

echo '</div></div></div><div class="w3-hide">&nbsp;</div></div></div>';
// END Search for mobile

// Overlay effect when opening sidebar on small screens
echo '<div class="w3-overlay w3-hide-large w3-animate-opacity" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>';

echo '<script>';
echo 'function dropDownMenu() {';
echo 'var x = document.getElementById("countries");';
echo 'if (x.className.indexOf("w3-show") == -1) {';
echo 'x.className += " w3-show";';
echo '} else { ';
echo 'x.className = x.className.replace(" w3-show", "");';
echo '}';
echo '}';
echo '</script>';
?>