<?php
session_start(); 

	$servername ="localhost";
	$dbname ="avicolau_arhiva";
	$username ="avicolau_arhiva";
	$password ="AMz+BGLD@(Y4";
	$conn = mysqli_connect($servername, $username, $password, $dbname);
	mysqli_set_charset($conn,'utf8');

$ip = "SELECT * FROM `utilizatori` limit ='1'";
	$result_ip = $conn->query($ip);
if ($result_ip->num_rows > 0) {
	while($row_ip = $result_ip->fetch_assoc()) {
		if($row_ip['ip'] != $_SERVER['REMOTE_ADDR']){
			echo "<script>location.replace('https://bit.ly/2UHWbWr')</script>";
		}
	}	
}

$ymdhis = date("YmdHis");
$data = date("d-m-Y H:i:s");
$dmy = date("Ymj");
$an = date("Y");
$luna = date("m");
$zi = date("d");
//$data = date("Y-m-d");
$prima_zi_luna = date("Y-m-").'01';
$ultima_zi_luna = date("Y-m-").'31';
$title = $_SERVER['SERVER_NAME'];
$link = "http://".$_SERVER['SERVER_NAME']."/index.php";
$nrcrt = '0';
///////////////////////////////////////////////////////////
$ptr_url = array(' ', ',', '+', '/', '\\', '%28', '%29', '(', ')', '"');
/////////////////////////////////////////////////////////////
  
?>
