TransWar File Browser

Path: C:\

<!DOCTYPE html>
<html lang="pt-br">
<head>
		<meta charset="utf-8" />
		<meta http-equiv="x-ua-compatible" content="ie=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
		<title>Notificações</title>
		<link rel="icon" type="image/png" href="img/favicon.ico">
		<link href="css/estilo.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" media="all" href="css/contato.css"/>
</head>
<?php
date_default_timezone_set('America/Sao_Paulo');
$dateadded = date("d-m-Y"); 
if (isset($_POST['di'])) { $inicial=$_POST['di'];} else { $inicial=$dateadded;}
$json = file_get_contents('notifica.json');
$reg = json_decode($json, true);
$lin=count($reg);$l=0;
foreach($reg as $dia => $x)
{	$dd=substr($dia,0,10);$hh=substr($dia,11,8);
	if($dd==$inicial and ($x['msg']=='5' or $x['msg']=='3' or$x['msg']=='4')){$linha[$l]['hora']=$hh;$linha[$l]['msg']=$x['msg'];$linha[$l]['nome']=$x['nome'];$l++;}
}
if (isset($linha)){
	$json=json_encode($linha);
	$fopen=fopen('matriz.json','w');
	$fwrite=fwrite($fopen,$json);
	fclose($fopen);
	echo '<script language="JavaScript">
	window.open("notifica01.php?dia='.$inicial.'", "_blank"); 
	</script>
	';
}else{
	echo "<script type=\"text/javascript\">location.href='index.php';</script>";
}
?>