<?php
session_start();
header( 'Content-type: text/html; charset=windows-1251' );
error_reporting( 1 );
require($_SERVER['DOCUMENT_ROOT']."/sfb.php");

$id_user = (isset($_SESSION["iduser"]) && preg_match("|^[\d]{1,11}$|", trim($_SESSION["iduser"]))) ? intval(trim($_SESSION["iduser"])) : false;

if(!isset($_SESSION['iduser'])) { exit(); }
if(!isset($_POST['func'])) { exit(); }
if($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") { exit(); }

// info
if($_POST['func'] == "inf_user") {
$user_id = $_POST["id"];
require($_SERVER['DOCUMENT_ROOT'].'/statistika/stat_diogram.php');
initstat($user_id,1); 
}

?>