<?php 
// Expires on any date in the past.
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// Last modified at the current date and time.
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// For HTTP 1.1:
header ("Cache-Control: no-store, no-cache, must-revalidate");
header ("Cache-Control: post-check=0, pre-check=0", false);

// For HTTP 1.0:
header ("Pragma: no-cache");
header("Content-Type: text/html;charset=UTF-8");
header('x-powered-by: AdyDev.com');

// Start output buffering.
ob_start();
// Initialize a session.
session_start();
?>
<!DOCTYPE html>
<!--[if IE 8 ]><html class="ie8" lang="ro-RO" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#"><![endif]-->
<!--[if IE 9 ]><html class="ie9" lang="ro-RO" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#"><![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html xmlns="//w3.org/1999/xhtml" lang="ro-RO" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#"><!--<![endif]-->
<head>
<title><?=$title?></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<link rel="canonical" href="https://<?=$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]?>"/>
<meta name="description" content="<?=$description?>"/>
<meta name="keywords" content="<?=$keyords?>"/>
<!-- OPENGRAPH (Facebook) -->
<meta property="og:title" content="<?=$title?>"/>
<meta property="og:description" content="<?=$description?>"/>
<meta property="og:keywords" content="<?=$keyords?>"/>
<meta property="og:locale" content="ro_RO" />
<meta property="og:url" content="<?php echo 'https://www.'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];?>"/>
<meta property="og:site_name" content="<?=BASE_NAME?>"/>
<?php
if($rimg->num_rows == 1){
    $rwimg = $rimg->fetch_assoc();    
    echo '<meta name="og:image" content="'.BASE_URL.PATH.'imagini/'.$rwimg['nume_fisier'].'"/>';
    }elseif($rimg->num_rows > 1){
      while($rwimg = $rimg->fetch_assoc()){
      echo '<meta name="og:image" content="'.BASE_URL.PATH.'imagini/'.$rwimg['nume_fisier'].'"/>'."\n";
      }   
   }else{
    echo '<meta name="og:image" content="'.BASE_URL.PATH.'asset/img/logo.png"/>'."\n";    
   }
?>
<meta property="og:image:type" content="image/jpeg"/>
<meta property="og:image:type" content="image/jpg"/>
<meta property="og:image:type" content="image/png"/>
<meta property="og:image:type" content="image/gif"/>
<meta property="og:image:width" content="1600" />
<meta property="og:image:height" content="1067" />
<meta property="og:image:alt" content="<?=$title?>" />
<meta name="og:type" content="website" />
<!-- OPENGRAPH (Twitter) -->
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="<?=$title?>"/>
<meta name="twitter:description" content="<?=$description?>"/>
<?php
if($rimg->num_rows == 1){
    $rwimg = $rimg->fetch_assoc();    
    echo '<meta name="twitter:image" content="'.BASE_URL.PATH.'imagini/'.$rwimg['nume_fisier'].'"/>';
    }elseif($rimg->num_rows > 1){
      while($rwimg = $rimg->fetch_assoc()){
      echo '<meta name="twitter:image" content="'.BASE_URL.PATH.'imagini/'.$rwimg['nume_fisier'].'"/>'."\n";
      }   
   }else{
    echo '<meta name="twitter:image" content="'.BASE_URL.PATH.'asset/img/logo.png"/>'."\n";
   }
?>
<meta name="twitter:image:width" content="200"/>
<meta name="twitter:image:height" content="200"/>
<?php
if(!empty($rwset['robots'])){
    echo '<meta name="robots" content="'.$rwset['robots'].'"/>'."\n";}
if(!empty($rwset['revisit'])){
    echo '<meta name="revisit-after" content="'.$rwset['revisit'].'"/>'."\n";}

if(!empty($rwset['wgoogle'])){
    echo '<meta name="google-site-verification" content="'.$rwset['wgoogle'].'"/>'."\n";}
if(!empty($rwset['wbing'])){
    echo '<meta name="msvalidate.01" content="'.$rwset['wbing'].'"/>'."\n";}
if(!empty($rwset['wyandex'])){
    echo '<meta name="yandex-verification" content="'.$rwset['wyandex'].'"/>'."\n";}

if(!empty($rwset['wwot'])){
    echo '<meta name="wot-verification" content="'.$rwset['wwot'].'"/>'."\n";}
if(!empty($rwset['wnorton'])){
    echo '<meta name="norton-safeweb-site-verification" content="'.$rwset['wnorton'].'"/>'."\n";}

echo '<!-- Cod personalizat -->'."\n";    
if(!empty($rwset['headc'])){echo $rwset['headc'];}
echo "\n".'<!-- // Cod personalizat -->'."\n";

echo '<link rel="apple-touch-icon" sizes="57x57" href="'.PATH.'asset/img/apple-icon-57x57.png"/>';
echo '<link rel="apple-touch-icon" sizes="60x60" href="'.PATH.'asset/img/apple-icon-60x60.png"/>';
echo '<link rel="apple-touch-icon" sizes="72x72" href="'.PATH.'asset/img/apple-icon-72x72.png"/>';
echo '<link rel="apple-touch-icon" sizes="76x76" href="'.PATH.'asset/img/apple-icon-76x76.png"/>';
echo '<link rel="apple-touch-icon" sizes="114x114" href="'.PATH.'asset/img/apple-icon-114x114.png"/>';
echo '<link rel="apple-touch-icon" sizes="120x120" href="'.PATH.'asset/img/apple-icon-120x120.png"/>';
echo '<link rel="apple-touch-icon" sizes="144x144" href="'.PATH.'asset/img/apple-icon-144x144.png"/>';
echo '<link rel="apple-touch-icon" sizes="152x152" href="'.PATH.'asset/img/apple-icon-152x152.png"/>';
echo '<link rel="apple-touch-icon" sizes="180x180" href="'.PATH.'asset/img/apple-icon-180x180.png"/>';
echo '<link rel="icon" type="image/png" sizes="192x192"  href="'.PATH.'asset/img/android-icon-192x192.png"/>';
echo '<link rel="icon" type="image/png" sizes="32x32" href="'.PATH.'asset/img/favicon-32x32.png"/>';
echo '<link rel="icon" type="image/png" sizes="96x96" href="'.PATH.'asset/img/favicon-96x96.png"/>';
echo '<link rel="icon" type="image/png" sizes="16x16" href="'.PATH.'asset/img/favicon-16x16.png"/>';
echo '<link rel="manifest" href="'.PATH.'asset/img/manifest.json"/>';
echo '<meta name="msapplication-TileColor" content="#ffffff"/>';
echo '<meta name="msapplication-TileImage" content="'.PATH.'asset/img/ms-icon-144x144.png"/>';
echo '<meta name="theme-color" content="#ffffff"/>';
?>
<link href="<?=BASE_URL?>feed.xml" type="application/atom+xml" rel="alternate" title="Atom Feed"/>
<link rel="stylesheet" href="<?=PATH?>lib/css/style.css"/>
<link rel="stylesheet" href="<?=PATH?>lib/css/custom.css"/>
<?php
function getbrowser()
{
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
   return 'Internet explorer';
 elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false)
    return 'Internet explorer';
 elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false)
   return 'Mozilla Firefox';
 elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false)
   return 'Google Chrome';
 elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false)
   return "Opera Mini";
 elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false)
   return "Opera";
 elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false)
   return "Safari";
 else
   return 'Other';
}
    $browser = getbrowser();
    if(strtolower($browser->browser) == 'safari') {
        echo '<link href="'.PATH.'lib/css/safari.css" rel="stylesheet" type="text/css" />';
    } 
?>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>  
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="<?=PATH?>lib/css/cookieconsent.min.css" />
</head>
<body>
<div class="w3-margin-top w3-hide-small w3-hide">&nbsp;</div>
<div class="w3-content w3-card layoutcust" style="max-width:1431px;">
<?php include APP.'meniu.php'; ?>

<div class="w3-row w3-margin-top">
<?php if(isset($err_login)){ ?>
   <div class="w3-container" style="margin-top:-15px;">
       <div class="w3-panel w3-red w3-center">
            <h5 style="margin-top:5px;padding:5px;"><i class="fa fa-ban"></i> <?=$err_login?></h5>
       </div>
   </div>
<?php } ?>

<?php if(isset($userblocat)){ ?>
   <div class="w3-container" style="margin-top:-15px;">
       <div class="w3-panel w3-red w3-center">
            <h5 style="margin-top:5px;padding:5px;"><i class="fa fa-ban"></i> <?=$userblocat?></h5>
       </div>
   </div>
<?php } ?>

<div id="acces" class="w3-modal w3-margin-top">
    <div class="w3-modal-content w3-animate-top w3-card-4" style="width:400px;max-width:100%;">
      <header class="w3-container w3-text-white" style="background-color:#117594;"> 
        <span onclick="document.getElementById('acces').style.display='none'" 
        class="w3-button w3-display-topright">&times;</span>
        <h2>Autentificare</h2>
      </header>
      <div class="w3-container">        
        <div class="w3-row-padding">
<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-green w3-hover-teal w3-hover-black" type="submit"><i class="fa fa-unlock"></i> Accesează</button>
   </div>   
   <input type="hidden" name="acces" value="true"/>   
   </form>
</div>        
      </div>
      <footer class="w3-container w3-text-white" style="background-color:#117594;">
        <p><a href="contnou.html" class="w3-button w3-hover-teal w3-left" style="text-decoration:none;background-color:#117594;">Cont nou</a>
        <a href="recuperareparola.html" class="w3-button w3-hover-teal w3-right" style="text-decoration:none;background-color:#117594;">Recuperare parolă</a></p>
      </footer>
    </div>
  </div>  