maj pour statislite
This commit is contained in:
parent
4272e85902
commit
4fd4eaf9fa
|
@ -674,10 +674,11 @@ $(document).ready(function(){
|
|||
$('.clicked_link_count').on('click', function(event) {
|
||||
// Récupérer le chemin vers le fichier
|
||||
var filePath = $(this).attr('href');
|
||||
console.log(filePath);
|
||||
// Envoyer une requête AJAX pour enregistrer le téléchargement
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/site/data/statislite/module/download_counter/download_counter.php',
|
||||
url: "<?php echo helper::baseUrl(false); ?>site/data/statislite/module/download_counter/download_counter.php",
|
||||
data: {'url': filePath},
|
||||
});
|
||||
});
|
||||
|
|
|
@ -164,6 +164,10 @@ if ($this->getData(['core', 'dataVersion']) < 4501) {
|
|||
$this->setData(['locale', 'editorLabel', $groupWhoIs[2] ]);
|
||||
$this->setData(['locale', 'moderatorLabel', $groupWhoIs[3] ]);
|
||||
$this->setData(['locale', 'administratorLabel', $groupWhoIs[4] ]);
|
||||
if( is_dir('./site/data/statislite/module') ){
|
||||
if ( !is_dir('./site/data/statislite/module/download_counter') ) mkdir('./site/data/statislite/module/download_counter', 0700);
|
||||
copy('./module/statislite/ressource/download_counter/download_counter.php', './site/data/statislite/module/download_counter/download_counter.php');
|
||||
}
|
||||
$this->setData(['core', 'dataVersion', 4501]);
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -538,7 +538,7 @@ class statislite extends common {
|
|||
'timeVisiteMini' => '30',
|
||||
'timePageMini' => '5',
|
||||
'nbPageMini' => '2',
|
||||
'usersExclus' => '3',
|
||||
'usersExclus' => '4',
|
||||
'nbEnregSession' => '5',
|
||||
'geolocalisation' => false,
|
||||
'nbaffipagesvues' => '10',
|
||||
|
|
|
@ -152,23 +152,28 @@ if( function_exists('datefmt_create') && function_exists('datefmt_format') && ex
|
|||
* Affichage des téléchargements
|
||||
*
|
||||
*/
|
||||
if( file_exists( $module::$downloadLink.'counter.json' ) && file_get_contents($module::$downloadLink.'counter.json') !== '{}'){
|
||||
if( file_exists( $module::$downloadLink.'counter.json' )){
|
||||
if( file_get_contents($module::$downloadLink.'counter.json') !== '{}'){
|
||||
$json = file_get_contents($module::$downloadLink.'counter.json');
|
||||
$download = json_decode($json, true);
|
||||
if( function_exists('datefmt_create') && function_exists('datefmt_format') && extension_loaded('intl') ){
|
||||
// Affichage au format de la langue d'administration
|
||||
$fmt = datefmt_create(
|
||||
$text['statislite_view']['index'][29],
|
||||
IntlDateFormatter::LONG,
|
||||
IntlDateFormatter::SHORT,
|
||||
$text['statislite_view']['index'][30],
|
||||
IntlDateFormatter::GREGORIAN
|
||||
);
|
||||
$datedeb = datefmt_format($fmt, strtotime($download["date_creation_fichier"]));
|
||||
if( isset($download["date_creation_fichier"])){
|
||||
if( function_exists('datefmt_create') && function_exists('datefmt_format') && extension_loaded('intl') ){
|
||||
// Affichage au format de la langue d'administration
|
||||
$fmt = datefmt_create(
|
||||
$text['statislite_view']['index'][29],
|
||||
IntlDateFormatter::LONG,
|
||||
IntlDateFormatter::SHORT,
|
||||
$text['statislite_view']['index'][30],
|
||||
IntlDateFormatter::GREGORIAN
|
||||
);
|
||||
$datedeb = datefmt_format($fmt, strtotime($download["date_creation_fichier"]));
|
||||
|
||||
} else{
|
||||
$datedeb = $download["date_creation_fichier"];
|
||||
} ?>
|
||||
} else{
|
||||
$datedeb = $download["date_creation_fichier"];
|
||||
}
|
||||
} else {
|
||||
$datedeb =" ? ";
|
||||
}?>
|
||||
<div class="block">
|
||||
<div class="blockTitle"><?php echo $text['statislite_view']['index'][31].$datedeb; ?></div>
|
||||
<?php
|
||||
|
@ -181,7 +186,7 @@ if( file_exists( $module::$downloadLink.'counter.json' ) && file_get_contents($m
|
|||
</div>
|
||||
<?php } } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } }?>
|
||||
|
||||
<?php
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue