<?php
	if ($_POST["acces"]==="0")
	{
		date_default_timezone_set("Europe/Bucharest");
		$today=date("Y-m-d H:i:s");
		$wdi=substr($today,0,10);
		$whi=substr($today,11,8);
		$wip=@$_SERVER['REMOTE_ADDR'];
		$wunit="";
		$path = $_SERVER['PHP_SELF']; preg_match('~/(.*?)/~', $path, $output);
		$wcale = STRTOUPPER($output[1]);		
		$wde="";
		$whe="";
		$wte=0;
		$query0="INSERT INTO accese (di,hi,ip,unit,cale,user,pw,aplic,de,he,te) ";
		$query0=$query0."VALUES (\"".$wdi."\",\"".$whi."\",\"".$wip."\",\"".$wunit."\",\"".$wcale."\",\"".$myusername."\",";
		$query0=$query0."\"".$mypassword."\",\"".$_POST["aplic"]."\",\"".$wde."\",\"".$whe."\",\"".$wte."\")";
		$result0=mysql_query($query0) or die("Interogare esuata: ".mysql_error());
	}
?>