public function run() { global $config; $urlClient = $config["linkClient"]; $urlClientTorrent = $config["linkClientTorrent"]; $cacheManager = \CacheHelper::getCacheManager(); if ($cacheManager->isExisting("sizeOfClient")) { $size = $cacheManager->get("sizeOfClient"); } else { $size = \FonctionsUtiles::sizeOfFileExt($urlClient); $cacheManager->set("sizeOfClient", $size, 21600); } $this->arrayTemplate["urlClient"] = $urlClient; $this->arrayTemplate["urlClientTorrent"] = $urlClientTorrent; $this->arrayTemplate["tailleClient"] = \FonctionsUtiles::Formatage_Taille($size); $view = $this->template->render($this->arrayTemplate); $this->response->setContent($view); $this->response->send(); }
<span class="info-box-icon"><i class="material-icons md-icon-download md-36"></i></span> <div class="info-box-content"> <span class="info-box-text">Télécharger</span> <?php $urlClient = $config["linkClient"]; if ($cacheManager->isExisting("sizeOfClient")) { $size = $cacheManager->get("sizeOfClient"); } else { $size = \FonctionsUtiles::sizeOfFileExt($urlClient); $cacheManager->set("sizeOfClient", $size, 21600); } ?> <span class="info-box-number"><?php echo \FonctionsUtiles::Formatage_Taille($size); ?> </span> </div> </div> <div class="box box-default flat"> <div class="box-body no-padding"> <a onclick="$.featherlight({ajax: 'pages/_Home/trailer.php', variant: 'trailerVideo'});"> <img class="ImageVideoNouveaute" src="./images/trailer.png" /> </a> </div> </div>