-
Notifications
You must be signed in to change notification settings - Fork 9
/
search.php
155 lines (155 loc) · 3.53 KB
/
search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<script type="text/javascript">
$(window).on('load',function(){
$('#myModal').modal('show');
});
</script>
<?
$block = get_block_info($search['height']);
?>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header"><span class="block_id_heeder">Block #<?=$block['height']?></span>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body" class="">
<table class="table table-striped">
<tr>
<td>
Height
</td>
<td>
<?=$block['height']?>
</td>
</tr>
<tr>
<td>
Transactions
</td>
<td>
<a href="?action=block_inspect&height=<?=$block['height']?>"><?=number_of_transactions($block['height'])?></a>
</td>
</tr>
<tr>
<td>
Burst sent
</td>
<td>
<?=burst_value(get_burst_amount($block['total_amount'],2,1))?> Burst
</td>
</tr>
<tr>
<td>
Timestamp
</td>
<td>
<?=convert_time($block['timestamp'])?>
</td>
</tr>
<tr>
<td>
Generator
</td>
<td>
<a href="?action=account&account=<?=show_account_id_name_and_or_rs($block['generator_id'],4,$block['height'])?>"><?=show_account_id_name_and_or_rs($block['generator_id'],6,$block['height'])?></a>
<?=blocks_short_name(show_account_id_name_and_or_rs($block['generator_id'],1,$block['height']),26)?>
</td>
</tr>
<tr>
<td>
Pool
</td>
<td>
<a href="?action=account&account=<?=show_account_id_name_and_or_rs($block['generator_id'],3,$block['height'])?>"><?=blocks_short_name(show_account_id_name_and_or_rs($block['generator_id'],2,$block['height']),26)?></a>
</td>
</tr>
<tr>
<td class="text-nowrap">
Block Generation Time
</td>
<td>
<?=convert_time($block['timestamp'])?>
</td>
</tr>
<tr>
<td>
Base Target
</td>
<td>
<?=$block['base_target']?>
</td>
</tr>
<tr>
<td>
Size
</td>
<td>
<?=get_block_size($block['payload_length'])?>
</td>
</tr>
<tr>
<td>
Version
</td>
<td>
<?=$block['version']?>
</td>
</tr>
<tr>
<td>
Nonce
</td>
<td>
<?=toUnsignedLong($block['nonce'])?>
</td>
</tr>
<tr>
<td>
Block Reward
</td>
<td>
<?=burst_value(block_reward($block['height']));?> Burst
</td>
</tr>
<tr>
<td>
Block Reward Fees
</td>
<td>
<?=burst_value(get_burst_amount($block['total_fee'],2,1))?> Burst
</td>
</tr>
<tr>
<td>
Block Signature
</td>
<td>
<div class="word_break small"><?=str2bin($block['block_signature'])?></div>
</td>
</tr>
<tr>
<td>
Previous Block
</td>
<td>
<a href="#" data-dismiss="modal" data-toggle="modal" data-target="#myModal<?=$block['height']-1?>"><?=$block['height']-1?></a>
</td>
</tr>
<tr>
<td>
Next Block
</td>
<td>
<?if($block['next_block_id']){?>
<a href="#" data-dismiss="modal" data-toggle="modal" data-target="#myModal<?=$block['height']+1?>"><?=$block['height']+1?></a>
<?}?>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>