<?php
$resp = $dbc->query("SELECT * FROM `pagina` WHERE `pid`='1' LIMIT 1");
$rwp = $resp->fetch_assoc();
?>
<style>.headers {padding: 10px;height:100px;}.contents {padding: 16px;}.sticky {position: fixed;top: -2px;width: 100%;}.sticky + .contents {padding-top: 60px;}.w3-bar-item:hover{text-decoration:none;}
</style>
<div class="headers" style="margin-top:0px;margin-bottom:6px;padding:4px;height:auto;max-height:146px;">

<div class="w3-col l3 m3 s12 w3-white w3-center">
<a href="<?='https://www.'.$rwset['domeniu']?>" class="">
    <img src="<?=BASE_URL?>asset/img/logo.png" 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;" loading="lazy"/>
    <h1 class="w3-hide"><?=BASE_NAME?> &nbsp; &nbsp; </h1>
    </a>
</div>

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

<a class="" href="<?='https://www.'.$rwset['domeniu']?>/columbofili/">
<img src="https://pmar.ro/wp-content/uploads/2019/10/banner-columbofili.jpg" class="w3-center" style="width:730px;max-width:100%;height:auto;margin-top:10px;margin-bottomes:20px;padding:8px;" loading="lazy"/>
</a>

</div>


</div>
<div id="navbar" class="w3-margin-bottom" style="z-index:1005;max-width:1431px;">
<div class="w3-content" style="max-width:1431px;">
  <div class="w3-bar w3-bluepm w3-card w3-large" style="text-transform:uppercase;height:42px;" id="myNavbar">
    
<a onclick="document.getElementById('categorii').style.display='block'" class="w3-bar-item w3-button w3-left w3-hover-seagreen w3-hide-large" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;transition: 0.3s;"><i class="fa fa-th"></i></a>

<a href="<?='https://www.'.$rwset['domeniu']?>" 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;">Prima pagină</a>

<a href="<?='https://www.'.$rwset['domeniu']?>/columbofili/" 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;">Catalog columbofili</a>

<a href="<?='https://www.'.$rwset['domeniu']?>/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;">Competiții</a>

<a href="<?='https://www.'.$rwset['domeniu']?>/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;">Licitații</a>

<a href="<?='https://www.'.$rwset['domeniu']?>/anunturi/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;">Anunțuri</a>

<a href="<?='https://www.'.$rwset['domeniu']?>/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;">Links</a>

<a href="<?='https://www.'.$rwset['domeniu']?>/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;">Contact</a>


<!--
<div class="w3-dropdown-click w3-bluepm w3-hover-seagreen w3-hide-small w3-hide-medium">
  <button type="button" onclick="subCategorii()" 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-th-large fa-fw"></i> Categorii <i class="fa fa-caret-down fa-fw"></i></button>
  <div id="subCategorii" class="w3-dropdown-content w3-bar-block w3-card" style="margin-left:-54px;">
<?php /*
$rcatm = $dbc->query("SELECT * FROM categorii ORDER BY titlu ASC");
while($rcm = $rcatm->fetch_assoc()){ 
echo '<a class="w3-bar-item w3-button w3-bluepm w3-hover-seagreen" href="'.PATH.$rcm['seo'].'.html">'.$rcm['titlu'].'</a>';
 } */?>
</div>
</div> -->

<!-- Right-sided navbar links -->
<?php include FORM; ?>
<form action="" method="post">
<div class="w3-right w3-hide-small w3-hide-medium">

<a href="<?=PATH?>anunturi.html" class="w3-bar-item w3-button w3-hover-seagreen w3-hide-small w3-hide-medium w3-hide" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;"><i class="fa fa-bullhorn fa-fw"></i> Toate anunțurile </a>

<a href="nou.html" class="w3-bar-item w3-button w3-hover-seagreen" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;">
<i class="fa fa-plus fa-fw"></i> Adaugă anunț </a>
<?php
if(isset($_SESSION['user_id']) AND (substr($_SERVER['PHP_SELF'], -10) != 'iesire.html')) {
if($_SESSION['level'] >= 1){
?>
<a href="admin.html" class="w3-bar-item w3-button w3-black w3-hover-seagreen" style="font-size:16px;margin-top:4px;margin-bottom:4px; padding:5px;">
<i class="fa fa-dashboard fa-fw"></i> Admin </a>
<?php } ?>
<a href="cont.html" class="w3-bar-item w3-button w3-hover-seagreen" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;">
<i class="fa fa-user fa-fw"></i> Contul meu </a>
<button class="w3-bar-item w3-button w3-hover-seagreen" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" type="submit"><i class="fa fa-power-off fa-fw"></i> Ieșire </button>
<input type="hidden" name="iesire" value="true"/>
<?php } else { ?>
<div class="w3-dropdown-click w3-hover-seagreen">
  <button type="button" onclick="accesform()" 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-lock fa-fw"></i> Acces <i class="fa fa-caret-down fa-fw"></i></button>
  <div id="accesform" class="w3-dropdown-content w3-bar-block w3-card" style="text-transform:none;">    
<div class="w3-row-padding w3-card w3-hide-small">
<form class="w3-container" action="" method="post">
   <div class="w3-margin-bottom">
   <label>Adresa de e-mail</label>
   <input class="w3-input" type="email" name="email" placeholder="Treceți adresa dvs. de e-mail" required=""/>
   </div>   
   <div class="w3-margin-bottom">
   <label>Parola</label>
   <input class="w3-input" type="password" name="parola" placeholder="Introduce-ți parola" required=""/>
   </div>   
   <div class="w3-margin-bottom w3-center">
   <button class="w3-button w3-bluepm w3-hover-seagreen w3-large" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;" type="submit"><i class="fa fa-unlock"></i> Accesează</button>
   </div>   
   <input type="hidden" name="acces" value="true"/>   
   </form>
</div>    
  </div>
</div>
<a href="contnou.html" class="w3-bar-item w3-button w3-hover-seagreen" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;">
<i class="fa fa-user-plus fa-fw"></i> Cont nou </a>
<?php } ?>
</div></form>
<!-- Hide right-floated links on small screens and replace them with a menu icon -->
<a href="javascript:void(0)" class="w3-bar-item w3-button w3-right w3-hover-seagreen w3-hide-large" onclick="w3_open()" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;"><i class="fa fa-th-large"></i></a>

<a onclick="document.getElementById('searchmobile').style.display='block'" class="w3-bar-item w3-button w3-right w3-hover-seagreen w3-hide-large" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;"><i class="fa fa-search"></i></a>

<a href="nou.html" class="w3-bar-item w3-button w3-right w3-hover-seagreen w3-hide-large w3-padding-small_" style="font-weight: 700;line-height: 1.188em;font-size: 14px;padding:13px;"><i class="fa fa-plus"></i> Adaugă anunț</a>
     
  </div>
</div>
</div>
<!-- Sidebar on small screens when clicking the menu icon -->
<nav class="w3-sidebar w3-white w3-card-4 w3-animate-left w3-hide-large" style="display:none; z-index: 3; width:100%;margin-top:30px;" id="mySidebar">
<?php
if(isset($_SESSION['user_id']) AND (substr($_SERVER['PHP_SELF'], -10) != 'iesire.html')) {
    ?>
<div class="w3-row w3-center">
<div class="w3-col w3-card" style="width:46%;margin:2%;">
<a href="cont.html" onclick="w3_close()" class="w3-bar-item w3-button w3-text-blue">
<i class="fa fa-user w3-xxxlarge"></i><br/>Contul meu</a>
</div>
<div class="w3-col w3-card" style="width:46%;margin:2%;">
<form action="" method="post">
<button onclick="w3_close()" class="w3-bar-item w3-button w3-text-red" type="submit">
<i class="fa fa-power-off w3-xxxlarge"></i><br/>Ieșire</button>
<input type="hidden" name="iesire" value="true"/>
</form>
</div>
</div>
<?php }else{ ?>
<div class="w3-row w3-center">
<div class="w3-col w3-card" style="width:31%;margin:1%;">
<a onclick="document.getElementById('acces').style.display='block'"  class="w3-bar-item w3-button w3-text-red">
<i class="fa fa-lock w3-xxxlarge"></i><br/>Acces</a>
</div>
<div class="w3-col w3-card" style="width:31%;margin:1%;">
<a href="contnou.html" onclick="w3_close()" class="w3-button w3-text-blue">
<i class="fa fa-user-plus w3-xxxlarge"></i><br/>Cont Nou</a>
</div>
<div class="w3-col w3-card" style="width:31%;margin:1%;">
<a href="recuperareparola.html" onclick="w3_close()" class="w3-button w3-text-blue">
<i class="fa fa-key w3-xxxlarge"></i><br/>Rec. parola</a>
</div>
</div>
<?php } ?>
<div class="w3-row w3-center">
<div class="w3-col w3-card" style="width:46%;margin:2%;">
<a href="anunturi.html" onclick="w3_close()" class="w3-button w3-text-blue">
<i class="fa fa-bullhorn w3-xxxlarge"></i><br/>Toate anunțurile</a>
</div>
<div class="w3-col w3-card" style="width:46%;margin:2%;">
<a href="mailto:<?=$rwset['aemail']?>" onclick="w3_close()" class="w3-button w3-text-blue">
<i class="fa fa-envelope w3-xxxlarge"></i><br/>Contact</a>
</div>
</div>
</nav>
<!-- Categorii for mobile -->
<div id="categorii" class="w3-modal">

<div class="w3-modal-content w3-animate-top" style="width:90%;max-width:90%;margin:auto;margin-top:4%;">

<span onclick="document.getElementById('categorii').style.display='none'" class="w3-button w3-display-topright w3-text-white w3-hover-red">&times;</span>

<div class="w3-row w3-hide-large">
<div class="w3-container w3-text-white w3-card w3-bluepm">
<h3 style="margin-top:8px;font-size:22px;"><i class="fa fa-th-large"></i> Categorii</h3>
</div>
<div class="w3-bar-block w3-white">
<?php
$qcateg = "SELECT * FROM `categorii` WHERE 1=1 ORDER BY cat_id ASC";
$rcateg = $dbc->query($qcateg);
 if($rcateg->num_rows > 0){
     while($rowcat = $rcateg->fetch_assoc()){
       $qscateg = "SELECT * FROM `scategorii` WHERE `cat_id`='".$rowcat['cat_id']."'";
       $rscateg = $dbc->query($qscateg);        
echo '<a href="'.PATH.$rowcat['seo'].'.html" class="w3-bar-item w3-button w3-hover-blue w3-card" style="margin-bottom:4px;"><i class="fa fa-th-large"></i> &nbsp;'.$rowcat['titlu'].'</a>';     
      } 
   }else{
      echo '<div class="w3-padding w3-center">Nu sunt categorii adăugate</div>';
 } ?>
      </div>
    </div>

  </div>
</div>
<!-- // Categorii for mobile -->

<!-- Search for mobile -->
<div id="searchmobile" class="w3-modal">
<div class="w3-modal-content w3-animate-top" style="width:90%;max-width:90%;margin:auto;margin-top:4%;">    
  
<span onclick="document.getElementById('searchmobile').style.display='none'" class="w3-button w3-display-topright w3-bluepm w3-hover-red">&times;</span>

<div class="w3-container w3-text-white w3-card w3-bluepm">
<h3 style="padding-bottomss:0;margin-bottomss:34px;"><i class="fa fa-search"></i> Căutare</h3>
</div>

<div class="w3-row-padding" style="margin-top:50px;">       
<?php include APP.'srcmobile.php'; ?>      
</div>

    </div>
  </div>
<!-- // Search for mobile -->

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

<!-- Menu from bottom -->
<div class="w3-bottom w3-hide-medium w3-hide-large " style="z-index:10003;">
<div class="w3-bar w3-center w3-card w3-text-white" style="width:100%;background-color:#117594;">
<a href="tel:+<?=$rwset['mobil']?>" style="width:33.33%;" class="w3-bar-item w3-button w3-hover-teal">
<i class="fa" style="font-size:24px;">&#xf095;</i></a>
<a href="https://api.whatsapp.com/send?phone=<?=$rwset['mobil']?>&text=Vă contactez de pe <?php echo $_SERVER["HTTP_HOST"]; ?> și vreau să iau legătura cu dvs. Mulțumesc!" target="_blank" style="width:33.33%;" class="w3-bar-item w3-button w3-hover-teal"><i class="fa" style="font-size:24px;">&#xf232;</i></a>
<a href="mailto:<?=$rwset['aemail']?>" style="width:33.33%;" class="w3-bar-item w3-button w3-hover-teal">
<i class="fa" style="font-size:24px;">&#xf003;</i></a>
</div>
</div>
<!-- // Menu from bottom -->