Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 16:51
Voici les 1ères lignes du fichier stat.php
<?php
################################################################################
# @Name : stat.php
# @Description : Display Statistics
# @call : /menu.php
# @parameters :
# @Author : Flox
# @Create : 12/01/2011
# @Update : 15/02/2022
# @Version : 3.2.20
Voici le bloc "generate stat token access" :
//generate stat token access
if($rright['stat'])
{
//generate ticket token access
$qry=$db->prepare("DELETE FROM `ttoken` WHERE `action`='stat_access' AND `user_id`=:user_id");
$qry->execute(array('user_id' => $_SESSION['user_id']));
$token = bin2hex(random_bytes(32));
$qry=$db->prepare("INSERT INTO `ttoken` (`date`,`token`,`action`,`user_id`) VALUES (NOW(),:token,'stat_access',:user_id)");
$qry->execute(array('token' => $token,'user_id' => $_SESSION['user_id']));
}
<?php
################################################################################
# @Name : stat.php
# @Description : Display Statistics
# @call : /menu.php
# @parameters :
# @Author : Flox
# @Create : 12/01/2011
# @Update : 15/02/2022
# @Version : 3.2.20
Voici le bloc "generate stat token access" :
//generate stat token access
if($rright['stat'])
{
//generate ticket token access
$qry=$db->prepare("DELETE FROM `ttoken` WHERE `action`='stat_access' AND `user_id`=:user_id");
$qry->execute(array('user_id' => $_SESSION['user_id']));
$token = bin2hex(random_bytes(32));
$qry=$db->prepare("INSERT INTO `ttoken` (`date`,`token`,`action`,`user_id`) VALUES (NOW(),:token,'stat_access',:user_id)");
$qry->execute(array('token' => $token,'user_id' => $_SESSION['user_id']));
}