Ver a proveniência

Filtre NFT sur images existantes

nft
MEUNIER Thibaud há 4 anos
ascendente
cometimento
995d5f4298
3 ficheiros alterados com 13 adições e 4 eliminações
  1. +7
    -1
      data/getBlockInfo.php
  2. +5
    -2
      js/blockexplorer.js
  3. +1
    -1
      nft.php

+ 7
- 1
data/getBlockInfo.php Ver ficheiro

@ -45,7 +45,13 @@ if (isset($_REQUEST['block_hash']))
header('Content-Type: application/json');
}
$message = '{"hash":"'.$the_block->hash.'", "block_index":"'.$the_block->block_index.'", "time":"'.$the_block->time.'", "height":"'.$the_block->height.'", "topisto_outputs":"'.$the_block->topisto_outputs.'", "prev":"'.$the_block->prev_block.'", "topisto_inputs":"'.$the_block->topisto_inputs.'", "topisto_fees":"'.$the_block->topisto_fees.'", "topisto_reward":"'.$the_block->topisto_reward.'", "nonce":"'.$the_block->nonce.'", "n_tx":"'.$the_block->n_tx.'"}';
// ---
// --- Récupérer la liste des images existantes pour ce bloc
// ---
$img_liste = glob(DATA_PATH.'/*/'.$the_block->hash.'.png');
$json_img_liste = json_encode($img_liste);
$message = '{"hash":"'.$the_block->hash.'", "block_index":"'.$the_block->block_index.'", "time":"'.$the_block->time.'", "height":"'.$the_block->height.'", "topisto_outputs":"'.$the_block->topisto_outputs.'", "prev":"'.$the_block->prev_block.'", "topisto_inputs":"'.$the_block->topisto_inputs.'", "topisto_fees":"'.$the_block->topisto_fees.'", "topisto_reward":"'.$the_block->topisto_reward.'", "nonce":"'.$the_block->nonce.'", "n_tx":"'.$the_block->n_tx.'", "img_list":'.$json_img_liste.'}';
if ($_REQUEST['FULL'] == 'OK') $message = json_encode($the_block);

+ 5
- 2
js/blockexplorer.js Ver ficheiro

@ -429,9 +429,12 @@ blockchainExplorer = function(){
{
_cur_methode = allMethod[i];
_addDivForBlock(_cur_methode);
if (data.img_list.includes('/opt/TOPISTO/data/'+_cur_methode+'/'+data.hash+'.png'))
{
_addDivForBlock(_cur_methode);
_addInfoForBlock(data, _cur_methode);
_addInfoForBlock(data, _cur_methode);
}
}
});

+ 1
- 1
nft.php Ver ficheiro

@ -60,7 +60,7 @@
function toggleInfos()
{
c.toggleInfos();
blockchainExplorer.toggleInfos();
}
function selectBlock()

Carregando…
Cancelar
Guardar