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) {
|
$('.clicked_link_count').on('click', function(event) {
|
||||||
// Récupérer le chemin vers le fichier
|
// Récupérer le chemin vers le fichier
|
||||||
var filePath = $(this).attr('href');
|
var filePath = $(this).attr('href');
|
||||||
|
console.log(filePath);
|
||||||
// Envoyer une requête AJAX pour enregistrer le téléchargement
|
// Envoyer une requête AJAX pour enregistrer le téléchargement
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
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},
|
data: {'url': filePath},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -164,6 +164,10 @@ if ($this->getData(['core', 'dataVersion']) < 4501) {
|
||||||
$this->setData(['locale', 'editorLabel', $groupWhoIs[2] ]);
|
$this->setData(['locale', 'editorLabel', $groupWhoIs[2] ]);
|
||||||
$this->setData(['locale', 'moderatorLabel', $groupWhoIs[3] ]);
|
$this->setData(['locale', 'moderatorLabel', $groupWhoIs[3] ]);
|
||||||
$this->setData(['locale', 'administratorLabel', $groupWhoIs[4] ]);
|
$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]);
|
$this->setData(['core', 'dataVersion', 4501]);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -538,7 +538,7 @@ class statislite extends common {
|
||||||
'timeVisiteMini' => '30',
|
'timeVisiteMini' => '30',
|
||||||
'timePageMini' => '5',
|
'timePageMini' => '5',
|
||||||
'nbPageMini' => '2',
|
'nbPageMini' => '2',
|
||||||
'usersExclus' => '3',
|
'usersExclus' => '4',
|
||||||
'nbEnregSession' => '5',
|
'nbEnregSession' => '5',
|
||||||
'geolocalisation' => false,
|
'geolocalisation' => false,
|
||||||
'nbaffipagesvues' => '10',
|
'nbaffipagesvues' => '10',
|
||||||
|
|
|
@ -152,9 +152,11 @@ if( function_exists('datefmt_create') && function_exists('datefmt_format') && ex
|
||||||
* Affichage des téléchargements
|
* 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');
|
$json = file_get_contents($module::$downloadLink.'counter.json');
|
||||||
$download = json_decode($json, true);
|
$download = json_decode($json, true);
|
||||||
|
if( isset($download["date_creation_fichier"])){
|
||||||
if( function_exists('datefmt_create') && function_exists('datefmt_format') && extension_loaded('intl') ){
|
if( function_exists('datefmt_create') && function_exists('datefmt_format') && extension_loaded('intl') ){
|
||||||
// Affichage au format de la langue d'administration
|
// Affichage au format de la langue d'administration
|
||||||
$fmt = datefmt_create(
|
$fmt = datefmt_create(
|
||||||
|
@ -168,7 +170,10 @@ if( file_exists( $module::$downloadLink.'counter.json' ) && file_get_contents($m
|
||||||
|
|
||||||
} else{
|
} else{
|
||||||
$datedeb = $download["date_creation_fichier"];
|
$datedeb = $download["date_creation_fichier"];
|
||||||
} ?>
|
}
|
||||||
|
} else {
|
||||||
|
$datedeb =" ? ";
|
||||||
|
}?>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div class="blockTitle"><?php echo $text['statislite_view']['index'][31].$datedeb; ?></div>
|
<div class="blockTitle"><?php echo $text['statislite_view']['index'][31].$datedeb; ?></div>
|
||||||
<?php
|
<?php
|
||||||
|
@ -181,7 +186,7 @@ if( file_exists( $module::$downloadLink.'counter.json' ) && file_get_contents($m
|
||||||
</div>
|
</div>
|
||||||
<?php } } ?>
|
<?php } } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } }?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue