-
Notifications
You must be signed in to change notification settings - Fork 99
/
page-label.php
41 lines (35 loc) · 1.31 KB
/
page-label.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
<?php
if (@$_POST['setlabel']) {
$address=$_POST['address'];
if (no_displayed_error_result($labeltxid, multichain(
'publishfrom', $address, 'root', '', bin2hex($_POST['label'])
)))
output_success_text('Label successfully updated in transaction '.$labeltxid);
} else
$address=$_GET['address'];
$labels=multichain_labels();
?>
<div class="row">
<div class="col-sm-12">
<h3>Set address label</h3>
<form class="form-horizontal" method="post" action="./?chain=<?php echo html($_GET['chain'])?>&page=<?php echo html($_GET['page'])?>">
<div class="form-group">
<label for="address" class="col-sm-2 control-label">For address:</label>
<div class="col-sm-9">
<input class="form-control" name="address" id="address" value="<?php echo html($address)?>">
</div>
</div>
<div class="form-group">
<label for="label" class="col-sm-2 control-label">Label:</label>
<div class="col-sm-9">
<input class="form-control" name="label" id="label" value="<?php echo html($labels[$address])?>">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-9">
<input class="btn btn-default" type="submit" name="setlabel" value="Set Label">
</div>
</div>
</form>
</div>
</div>