Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
echo $view;
?>

<div class="info-box flat box-telechargement-exe" onclick="Ajax('pages/_LegacyPages/Telechargement.php')">

    <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'});">