'; echo '› Posté le : '.date_fr('d-m-Y à H:i:s', strtotime($row['postDate'])).'
'; echo '› Par : '.html($row['postAuthor']).'
'; echo '› Dans : '; $stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID ORDER BY catTitle ASC'); $stmt2->bindValue(':postID', $row['postID'], PDO::PARAM_INT); $stmt2->execute(); $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC); $links = array(); foreach ($catRow as $cat) { $links[] = "".$cat['catTitle'].""; } echo implode(", ", $links); echo '
'; echo '› Lien web du média : URL
'; echo '› Taille : '.makesize($row['postTaille']).'
'; $filetorrent = $REP_TORRENTS.html($row['postTorrent']); //On décode le fichier torrent... //$fd = fopen($_FILES["torrent"]["tmp_name"], "rb"); //$length=filesize($_FILES["torrent"]["tmp_name"]); $fd = fopen($filetorrent, "rb"); $length = filesize($filetorrent); if ($length) { $alltorrent = fread($fd, $length); } $array = BDecode($alltorrent); $hash = sha1(BEncode($array["info"])); fclose($fd); if (isset($array["info"]) && $array["info"]) { $upfile=$array["info"]; } else { $upfile = 0; } if (isset($upfile["length"])) { $size = (float)($upfile["length"]); } else if (isset($upfile["files"])) { //Pour les torrents multifichiers (Lupin - Xbtit - Btiteam - 2005) $size=0; foreach ($upfile["files"] as $file) { $size+=(float)($file["length"]); } } else { $size = "0"; } $ffile=fopen($filetorrent,"rb"); $content=fread($ffile,filesize($filetorrent)); fclose($ffile); $content=BDecode($content); $numfiles=0; if (isset($content["info"]) && $content["info"]) { $thefile=$content["info"]; if (isset($thefile["length"])) { $dfiles[$numfiles]["filename"]=$thefile["name"]; $dfiles[$numfiles]["size"]=makesize($thefile["length"]); $numfiles++; } elseif (isset($thefile["files"])) { foreach($thefile["files"] as $singlefile) { $dfiles[$numfiles]["filename"]=implode("/",$singlefile["path"]); $dfiles[$numfiles]["size"]=makesize($singlefile["length"]); $numfiles++; } } else { // Impossible ... mais bon ... } } //echo '› Nb de fichiers : '.$numfiles.'
'; $stmt3 = $db->prepare('SELECT * FROM blog_posts_seo,xbt_files WHERE blog_posts_seo.postID = :postID AND xbt_files.fid = blog_posts_seo.postID'); $stmt3->bindValue(':postID', $row['postID'], PDO::PARAM_INT); $stmt3->execute(); $xbt = $stmt3->fetch(); //echo '› Hash : '.bin2hex($xbt['info_hash']).'
'; echo '› Trafic : '; echo 'S : '.$xbt['seeders'].' | '; echo 'L : '.$xbt['leechers'].' | '; // on met à jour le nb de vues de l'article $stmt33 = $db->query('UPDATE blog_posts_seo SET postViews = postViews+1 WHERE postID = '.$row['postID']); // on affiche le nombre de vue de l'article $stmt333 = $db->prepare('SELECT postViews FROM blog_posts_seo WHERE postID = :postID'); $stmt333->execute(array(':postID' => $row['postID'])); $views = $stmt333->fetch(); echo 'T : '.$xbt['completed'].'
'; echo '› Lu : '.$views['postViews'].' fois
'; echo '› Licence(s) : '; $stmt3 = $db->prepare('SELECT licenceID,licenceTitle FROM blog_licences, blog_post_licences WHERE blog_licences.licenceID = blog_post_licences.licenceID_BPL AND blog_post_licences.postID_BPL = :postID_BPL ORDER BY licenceTitle ASC'); $stmt3->execute(array(':postID_BPL' => $row['postID'])); $licenceRow = $stmt3->fetchALL(PDO::FETCH_ASSOC); $liclist = array(); foreach($licenceRow as $lic) { $liclist[] = $lic['licenceTitle']; } echo implode(", ", $liclist); if(isset($_SESSION['username']) && isset($_SESSION['userid'])) { if(($row['postAuthor'] == $_SESSION['username']) || ($_SESSION['userid'] == 1)) { echo '
'; echo ''; ?> '; echo '
'; if (!empty($row['postImage']) && file_exists($REP_IMAGES_TORRENTS.$row['postImage'])) { echo ''; } else { echo ''; } echo '
'.nl2br(bbcode($row['postDesc'])).'
'; echo ''.nl2br(bbcode($row['postCont'])).'
'; echo 'Nb de fichier du torrent : '.$numfiles.' |
Nb de fichiers du torrent : '.$numfiles.' |
Fichiers du torrent : |
'.implode('/',$multiplefiles['path']).' |
Fichier du torrent : |
'.html($thefile['name']).' |