Permalink
Please sign in to comment.
Showing
with
626 additions
and 0 deletions.
- +68 −0 panel/api/index.php
- +78 −0 panel/css/style.css
- +72 −0 panel/current_custodians.php
- +74 −0 panel/current_motions.php
- +1 −0 panel/data/custodians_last_100.dat
- +1 −0 panel/data/custodians_last_10k.dat
- +1 −0 panel/data/elected_custodians.dat
- +1 −0 panel/data/motions_last_100.dat
- +1 −0 panel/data/motions_last_10k.dat
- +47 −0 panel/elected_custodians.php
- BIN panel/img/alix_v1_double_a_transparent_small.png
- BIN panel/img/coinerella_logo_really_small.png
- BIN panel/img/favicon.ico
- +37 −0 panel/index.php
- +23 −0 panel/js/alix.js
- +185 −0 panel/liquidity.php
- +9 −0 panel/loader.php
- +28 −0 panel/static/header.html
| @@ -0,0 +1,68 @@ | ||
| +<?php | ||
| + | ||
| +//default message | ||
| +$message=array('message' => 'unknown request'); | ||
| +$message=json_encode($message); //make json | ||
| + | ||
| +//what's requested? | ||
| +if(isset($_GET["custodians_10k"])) | ||
| +{ | ||
| + $path = "/var/www/alix/panel/data/custodians_last_10k.dat"; | ||
| + $message = file_get_contents($path); | ||
| + | ||
| + while(!$message) { | ||
| + $message = file_get_contents($path); | ||
| + sleep(1); | ||
| + } | ||
| +} | ||
| + | ||
| +if(isset($_GET["custodians_100"])) | ||
| +{ | ||
| + $path = "/var/www/alix/panel/data/custodians_last_100.dat"; | ||
| + $message = file_get_contents($path); | ||
| + | ||
| + while(!$message) { | ||
| + $message = file_get_contents($path); | ||
| + sleep(1); | ||
| + } | ||
| +} | ||
| + | ||
| +if(isset($_GET["motions_10k"])) | ||
| +{ | ||
| + $path = "/var/www/alix/panel/data/motions_last_10k.dat"; | ||
| + $message = file_get_contents($path); | ||
| + | ||
| + while(!$message) { | ||
| + $message = file_get_contents($path); | ||
| + sleep(1); | ||
| + } | ||
| +} | ||
| + | ||
| +if(isset($_GET["motions_100"])) | ||
| +{ | ||
| + $path = "/var/www/alix/panel/data/motions_last_100.dat"; | ||
| + $message = file_get_contents($path); | ||
| + | ||
| + while(!$message) { | ||
| + $message = file_get_contents($path); | ||
| + sleep(1); | ||
| + } | ||
| +} | ||
| + | ||
| +if(isset($_GET["elected_custodians"])) | ||
| +{ | ||
| + $path = "/var/www/alix/panel/data/elected_custodians.dat"; | ||
| + $message = file_get_contents($path); | ||
| + | ||
| + while(!$message) { | ||
| + $message = file_get_contents($path); | ||
| + sleep(1); | ||
| + } | ||
| +} | ||
| + | ||
| + | ||
| + | ||
| +print_r($message); | ||
| + | ||
| +?> |
| @@ -0,0 +1,78 @@ | ||
| +body { | ||
| + font-family: 'Roboto', sans-serif; | ||
| + font-size: 20px; | ||
| + background-color: #231f20; | ||
| + color: white; | ||
| + margin: 20px; | ||
| +} | ||
| +h1 { | ||
| + color:#ffb800; | ||
| + font-style: bold; | ||
| +} | ||
| +h2 { | ||
| + color:white; | ||
| + font-size: 20px; | ||
| + font-style: bold; | ||
| +} | ||
| +p.explain { | ||
| + color:#f9f9f9; | ||
| + font-size: 13px; | ||
| + font-style: italic; | ||
| +} | ||
| +footer { | ||
| + margin-left: auto; | ||
| + margin-right: auto; | ||
| +} | ||
| + | ||
| +a:link { color: white; text-decoration: none} | ||
| +a:visited { color: white; text-decoration: none} | ||
| +a:hover { color: #ffb800; text-decoration: none} | ||
| +a:active { color: #000000; text-decoration: none} | ||
| + | ||
| +p.footer_link { | ||
| + display: inline; | ||
| +} | ||
| +p.black_link { | ||
| + color: #000000; | ||
| + display: inline; | ||
| +} | ||
| +p.black_link:hover { color: #ffb800; text-decoration: none} | ||
| + | ||
| +table { | ||
| + width: 60%; | ||
| + margin-left: auto; | ||
| + margin-right: auto; | ||
| +} | ||
| +table, th, td { | ||
| + border: 1px solid #231f20; | ||
| + border-collapse: collapse; | ||
| +} | ||
| +td { | ||
| + padding: 4px; | ||
| + text-align: right; | ||
| + color: #231f20; | ||
| +} | ||
| +th { | ||
| + padding: 4px; | ||
| + text-align: right; | ||
| +} | ||
| +table.t01 tr:nth-child(even) { | ||
| + background-color: #f9f9f9; | ||
| +} | ||
| +table.t01 tr:nth-child(odd) { | ||
| + background-color:#ffffff; | ||
| +} | ||
| +table.t01 th { | ||
| + background-color: #0074a0; | ||
| + color: white; | ||
| +} | ||
| + | ||
| +input, button { | ||
| + color: #0074a0; | ||
| +} | ||
| + | ||
| +#sidebar { | ||
| + position:absolute; | ||
| + top:0; bottom:0; left:0; | ||
| + width:50px; | ||
| +} |
| @@ -0,0 +1,72 @@ | ||
| +<?php | ||
| +if(isset($_GET["window"])) | ||
| +{ | ||
| + if($_GET["window"]=="100" OR $_GET["window"]=="10k") | ||
| + { | ||
| + $window=$_GET["window"]; | ||
| + } | ||
| + else{ | ||
| + $window="10k"; | ||
| + } | ||
| +} | ||
| +else { | ||
| + $window="10k"; | ||
| +} | ||
| + | ||
| +//generate buttons | ||
| + | ||
| +if ($window == "100") | ||
| +{ | ||
| + $button1="<a href=\"?load=current_custodians&window=100\" class=\"btn btn-primary btn-md active\" role=\"button\" style=\"margin: 2px;\">100 block window</a>"; | ||
| + $button2="<a href=\"?load=current_custodians&window=10k\" class=\"btn btn-primary btn-md\" role=\"button\" style=\"margin: 2px;\">10k block window</a>"; | ||
| +} | ||
| +if ($window == "10k") | ||
| +{ | ||
| + $button1=$button2="<a href=\"?load=current_custodians&window=100\" class=\"btn btn-primary btn-md\" role=\"button\" style=\"margin: 2px;\">100 block window</a>"; | ||
| + $button2=$button2="<a href=\"?load=current_custodians&window=10k\" class=\"btn btn-primary btn-md active\" role=\"button\" style=\"margin: 2px;\">10k block window</a>"; | ||
| +} | ||
| + | ||
| +//read last 10x data | ||
| +$path = "/var/www/alix/panel/data/custodians_last_$window.dat"; | ||
| +$content = file_get_contents($path); | ||
| + | ||
| +while(!$content) | ||
| +{ | ||
| + $content = file_get_contents($path); | ||
| + sleep(1); | ||
| +} | ||
| + | ||
| +$content=json_decode($content, true); | ||
| +array_pop($content); //remove last array entry -> totals | ||
| + | ||
| +$i=1; | ||
| + | ||
| +//create container | ||
| +?> | ||
| +<h1>Current Custodian Votes</h1> | ||
| +<p class="explain"> Votes casted over the last <?php echo $window; ?> blocks</p> | ||
| +<?php echo "$button1 $button2"; ?> | ||
| +<div style="margin: 30px;"> | ||
| + <div class="row"> | ||
| + <div class="col-md-12"> | ||
| + <table class="t01"> | ||
| + <th>#</th><th>Address</th><th>Amount</th><th>Block %</th><th>Sharedays %</th></tr> | ||
| + <?php | ||
| + foreach($content as $content_sub_array) | ||
| + { | ||
| + $block_percentage=number_format(round($content_sub_array["block_percentage"],2),2); | ||
| + $shareday_percentage=number_format(round($content_sub_array["shareday_percentage"],2),2); | ||
| + $address=$content_sub_array["address"]; | ||
| + $amount=$content_sub_array["amount"]; | ||
| + echo "<tr>"; | ||
| + echo "<td>$i</td><td><a href=\"https://discuss.nubits.com/search?q=$address\" target=\"_blank\"><p class=\"black_link\">$address</p></a></td><td>$amount</td><td><b>$block_percentage</b></td><td><b>$shareday_percentage</b></td>"; | ||
| + echo "</tr>"; | ||
| + $i++; | ||
| + } | ||
| + ?> | ||
| + </table> | ||
| + </div> | ||
| + </div> | ||
| +</div> | ||
| +</body> | ||
| +</html> |
| @@ -0,0 +1,74 @@ | ||
| +<?php | ||
| +if(isset($_GET["window"])) | ||
| +{ | ||
| + if($_GET["window"]=="100" OR $_GET["window"]=="10k") | ||
| + { | ||
| + $window=$_GET["window"]; | ||
| + } | ||
| + else{ | ||
| + $window="10k"; | ||
| + } | ||
| +} | ||
| +else { | ||
| + $window="10k"; | ||
| +} | ||
| + | ||
| +//generate buttons | ||
| + | ||
| +if ($window == "100") | ||
| +{ | ||
| + $button1="<a href=\"?load=current_motions&window=100\" class=\"btn btn-primary btn-md active\" role=\"button\" style=\"margin: 2px;\">100 block window</a>"; | ||
| + $button2="<a href=\"?load=current_motions&window=10k\" class=\"btn btn-primary btn-md\" role=\"button\" style=\"margin: 2px;\">10k block window</a>"; | ||
| +} | ||
| +if ($window == "10k") | ||
| +{ | ||
| + $button1=$button2="<a href=\"?load=current_motions&window=100\" class=\"btn btn-primary btn-md\" role=\"button\" style=\"margin: 2px;\">100 block window</a>"; | ||
| + $button2=$button2="<a href=\"?load=current_motions&window=10k\" class=\"btn btn-primary btn-md active\" role=\"button\" style=\"margin: 2px;\">10k block window</a>"; | ||
| +} | ||
| + | ||
| +//read last 10x data | ||
| +$path = "/var/www/alix/panel/data/motions_last_$window.dat"; | ||
| +$content = file_get_contents($path); | ||
| + | ||
| +while(!$content) | ||
| +{ | ||
| + $content = file_get_contents($path); | ||
| + sleep(1); | ||
| +} | ||
| + | ||
| +$content=json_decode($content, true); | ||
| + | ||
| +$i=1; | ||
| + | ||
| +//order array | ||
| +arsort($content); | ||
| + | ||
| +//create container | ||
| +?> | ||
| +<h1>Current Motion Votes</h1> | ||
| +<p class="explain"> Votes casted over the last <?php echo $window; ?> blocks</p> | ||
| +<?php echo "$button1 $button2"; ?> | ||
| +<div style="margin: 30px;"> | ||
| + <div class="row"> | ||
| + <div class="col-md-12"> | ||
| + <table class="t01"> | ||
| + <th>#</th><th>Hash</th><th>Block %</th><th>Sharedays %</th></tr> | ||
| + <?php | ||
| + foreach($content as $hash=>$motion) | ||
| + { | ||
| + $block_percentage=number_format(round($motion["block_percentage"],2),2); | ||
| + $shareday_percentage=number_format(round($motion["shareday_percentage"],2),2); | ||
| + | ||
| + echo "<tr>"; | ||
| + echo "<td>$i</td><td><a href=\"https://discuss.nubits.com/search?q=$hash\" target=\"_blank\"><p class=\"black_link\">$hash</p></a></td><td><b>$block_percentage</b></td> | ||
| + <td><b>$shareday_percentage</b></td>"; | ||
| + echo "</tr>"; | ||
| + $i++; | ||
| + } | ||
| + ?> | ||
| + </table> | ||
| + </div> | ||
| + </div> | ||
| +</div> | ||
| +</body> | ||
| +</html> |
| @@ -0,0 +1 @@ | ||
| +[{"block_percentage":"89.00","shareday_percentage":"96.19","address":"BFRhngri9DLUnatcnhSJrZDk5J7u3Mhu5H","amount":"440.00"},{"block_percentage":"64.00","shareday_percentage":"91.46","address":"BC84Af1QuytYF37yTd1hf34zRKnLWTJoTA","amount":"750.00"},{"block_percentage":"45.00","shareday_percentage":"10.31","address":"BEuimmeoME52rKhiuiXvGBoTKP8r5fPwrp","amount":"4760.00"},{"block_percentage":"21.00","shareday_percentage":"3.92","address":"BDroid6QBUXXt7QFD51BixZzmEgwmTBMNX","amount":"16000.00"},{"block_percentage":"15.00","shareday_percentage":"2.38","address":"BJ8vw82j8CTQwzi4QLocyddkgVtPkrcHXz","amount":"4000.00"},{"block_percentage":"3.00","shareday_percentage":"1.15","address":"BLYdibXLb7ixXgKW5bFVD4KiCRLkyk6Ks6","amount":"4760.00"},{"block_percentage":"3.00","shareday_percentage":"1.15","address":"BEv74GNRYyAeRJbXxjQvbbS48E7YvDgfs6","amount":"450.00"},{"block_percentage":"3.00","shareday_percentage":"1.15","address":"BCigRTj8Lg25xSZLW59eUwuszw8nuPAubs","amount":"990.00"},{"block_percentage":"3.00","shareday_percentage":"1.15","address":"BAs6fhm6bfJ1b6LGnDQwah1C8frfVjjWhm","amount":"1360.00"},{"block_percentage":"3.00","shareday_percentage":"1.15","address":"B6t3WuYQvqEW9SqjmpJDA1oy9cXbyFzgoq","amount":"3000.00"},{"block_percentage":"2.00","shareday_percentage":"1.46","address":"BJs4YbtaqCmxeHLiR6zzjnZEotYVFAPfMo","amount":"1.00"},{"block_percentage":"2.00","shareday_percentage":"1.46","address":"BEDt9yB7J2Vzp1A9UvD91vNuA1oJGyLqQ8","amount":"4760.00"},{"block_percentage":"2.00","shareday_percentage":"1.46","address":"B87mfnein7htqfUmk6Dtx5b6ye1SGxFXe1","amount":"600.00"},{"block_percentage":"2.00","shareday_percentage":"1.46","address":"B7Jj1q3CmFQy2RU6L97hEPPw1tG8rNgreC","amount":"4760.00"},{"block_percentage":"2.00","shareday_percentage":"1.46","address":"B5YxZq3CJdtq3qBRezthKtLybHND4gYzq5","amount":"198.00"}] |
| @@ -0,0 +1 @@ | ||
| +[{"block_percentage":"55.08","shareday_percentage":"66.04","address":"BC84Af1QuytYF37yTd1hf34zRKnLWTJoTA","amount":"750.00"},{"block_percentage":"53.41","shareday_percentage":"68.94","address":"BFRhngri9DLUnatcnhSJrZDk5J7u3Mhu5H","amount":"440.00"},{"block_percentage":"25.93","shareday_percentage":"20.56","address":"BEuimmeoME52rKhiuiXvGBoTKP8r5fPwrp","amount":"4760.00"},{"block_percentage":"23.46","shareday_percentage":"10.30","address":"BAs6fhm6bfJ1b6LGnDQwah1C8frfVjjWhm","amount":"1360.00"},{"block_percentage":"23.11","shareday_percentage":"10.18","address":"BLYdibXLb7ixXgKW5bFVD4KiCRLkyk6Ks6","amount":"4760.00"},{"block_percentage":"23.11","shareday_percentage":"10.18","address":"B6t3WuYQvqEW9SqjmpJDA1oy9cXbyFzgoq","amount":"3000.00"},{"block_percentage":"22.07","shareday_percentage":"9.83","address":"BEv74GNRYyAeRJbXxjQvbbS48E7YvDgfs6","amount":"450.00"},{"block_percentage":"20.62","shareday_percentage":"7.55","address":"BD8ork1pAt3vuVgGaX7j9Ei66xT3vvqrg2","amount":"1.00"},{"block_percentage":"14.88","shareday_percentage":"7.14","address":"BDroid6QBUXXt7QFD51BixZzmEgwmTBMNX","amount":"16000.00"},{"block_percentage":"5.93","shareday_percentage":"18.35","address":"BJ8vw82j8CTQwzi4QLocyddkgVtPkrcHXz","amount":"4000.00"},{"block_percentage":"5.79","shareday_percentage":"3.87","address":"BCigRTj8Lg25xSZLW59eUwuszw8nuPAubs","amount":"990.00"},{"block_percentage":"3.56","shareday_percentage":"2.93","address":"BRUuKfGur7CZSLy65gYUPJUQyQZeT1XQnD","amount":"1.00"},{"block_percentage":"1.33","shareday_percentage":"0.82","address":"B5Zi5XJ1sgS6mWGu7bWJqGVnuXwiMXi7qj","amount":"150000.00"},{"block_percentage":"0.44","shareday_percentage":"0.30","address":"BJs4YbtaqCmxeHLiR6zzjnZEotYVFAPfMo","amount":"1.00"},{"block_percentage":"0.39","shareday_percentage":"0.35","address":"BTgryZQ1dQNJYMjm74K3ajdRnDfsCjh3c3","amount":"499.00"},{"block_percentage":"0.38","shareday_percentage":"0.14","address":"BAaAqY4edsMPmACRkNM1mseG2SrVfmNsph","amount":"500.00"},{"block_percentage":"0.30","shareday_percentage":"0.17","address":"BQZZMgh4qkZCJyiDSNTPoadQTJcx79AmAT","amount":"4000.00"},{"block_percentage":"0.19","shareday_percentage":"0.06","address":"B5viA2YWcoLBvT8TWJywasQyAT9xkwhmWc","amount":"1.00"},{"block_percentage":"0.13","shareday_percentage":"0.04","address":"BFnkTWsyHcJJEAF1rjRmEre6bKv9TsTVHX","amount":"100.00"},{"block_percentage":"0.13","shareday_percentage":"0.04","address":"BChJDFCFS9biNrKU7r5SaAPk8X5xo3irpQ","amount":"1000.00"},{"block_percentage":"0.06","shareday_percentage":"0.16","address":"BEDt9yB7J2Vzp1A9UvD91vNuA1oJGyLqQ8","amount":"4760.00"},{"block_percentage":"0.06","shareday_percentage":"0.16","address":"B87mfnein7htqfUmk6Dtx5b6ye1SGxFXe1","amount":"600.00"},{"block_percentage":"0.06","shareday_percentage":"0.16","address":"B7Jj1q3CmFQy2RU6L97hEPPw1tG8rNgreC","amount":"4760.00"},{"block_percentage":"0.06","shareday_percentage":"0.16","address":"B5YxZq3CJdtq3qBRezthKtLybHND4gYzq5","amount":"198.00"}] |
| @@ -0,0 +1 @@ | ||
| +{"25d8226a7aeb47370e8db0c2035296fb7e2c4095":{"blocks":3,"block_percentage":3,"sharedays":1220673,"shareday_percentage":1.15112504},"3867806079bb45338c233ebd3dd364f40df69334":{"blocks":6,"block_percentage":6,"sharedays":1267436,"shareday_percentage":1.19522371},"392b89104ac63202baa11df9b4844db5f91532ed":{"blocks":6,"block_percentage":6,"sharedays":1267436,"shareday_percentage":1.19522371},"3f786850e387550fdab836ed7e6dc881de23001b":{"blocks":14,"block_percentage":14,"sharedays":2343598,"shareday_percentage":2.21007128},"5b184631f652c286b6b85c284a4f1b8839bf41fb":{"blocks":3,"block_percentage":3,"sharedays":1220673,"shareday_percentage":1.15112504},"6311782b5d731cd45dd6873b24bcd6e62846fb2d":{"blocks":2,"block_percentage":2,"sharedays":1549568,"shareday_percentage":1.46128122},"685bcc7211db2536734042c65d78d150348a3ec5":{"blocks":24,"block_percentage":24,"sharedays":6090529,"shareday_percentage":5.74352054},"7391fb3d1b2a7ba3f1adac2db71cc71e29664801":{"blocks":3,"block_percentage":3,"sharedays":1220673,"shareday_percentage":1.15112504},"8151325dcdbae9e0ff95f9f9658432dbedfdb209":{"blocks":14,"block_percentage":14,"sharedays":2343598,"shareday_percentage":2.21007128},"a0a57d12ec67ac6816532f8a0afffd9b7ce14329":{"blocks":3,"block_percentage":3,"sharedays":1220673,"shareday_percentage":1.15112504},"abab44f623bb3c5b29ce0d2dc873798cf2bfb8ae":{"blocks":2,"block_percentage":2,"sharedays":1549568,"shareday_percentage":1.46128122},"c8736970e5a824b07ad4c32eac60a50e37c093d8":{"blocks":3,"block_percentage":3,"sharedays":1220673,"shareday_percentage":1.15112504},"ee20086eb56a8a7b0f722227086b05de9941a293":{"blocks":3,"block_percentage":3,"sharedays":1220673,"shareday_percentage":1.15112504},"fa9596278970ed57e75b59eb01e15ce574911520":{"blocks":8,"block_percentage":8,"sharedays":2325973,"shareday_percentage":2.19345047}} |
| @@ -0,0 +1 @@ | ||
| +{"0940e0d267939f84c295731043dd6c95c005516a":{"blocks":13,"block_percentage":0.13,"sharedays":1943116,"shareday_percentage":0.03701703},"243e992e3b542644ec16147f543ad52e80d3491e":{"blocks":49,"block_percentage":0.49,"sharedays":12570037,"shareday_percentage":0.23946355},"25d8226a7aeb47370e8db0c2035296fb7e2c4095":{"blocks":548,"block_percentage":5.48,"sharedays":113585742,"shareday_percentage":2.16384766},"3867806079bb45338c233ebd3dd364f40df69334":{"blocks":170,"block_percentage":1.7,"sharedays":34032893,"shareday_percentage":0.64833838},"392b89104ac63202baa11df9b4844db5f91532ed":{"blocks":92,"block_percentage":0.92,"sharedays":17858509,"shareday_percentage":0.34021077},"3f786850e387550fdab836ed7e6dc881de23001b":{"blocks":219,"block_percentage":2.19,"sharedays":41548262,"shareday_percentage":0.79150876},"5b184631f652c286b6b85c284a4f1b8839bf41fb":{"blocks":223,"block_percentage":2.23,"sharedays":49566835,"shareday_percentage":0.94426535},"6311782b5d731cd45dd6873b24bcd6e62846fb2d":{"blocks":6,"block_percentage":0.06,"sharedays":8281597,"shareday_percentage":0.15776729},"685bcc7211db2536734042c65d78d150348a3ec5":{"blocks":2210,"block_percentage":22.1,"sharedays":533425935,"shareday_percentage":10.1619485},"6f361693a7b248730b41d4292f89dc6f6f166bc8":{"blocks":45,"block_percentage":0.45,"sharedays":19729412,"shareday_percentage":0.37585212},"7391fb3d1b2a7ba3f1adac2db71cc71e29664801":{"blocks":223,"block_percentage":2.23,"sharedays":49566835,"shareday_percentage":0.94426535},"8151325dcdbae9e0ff95f9f9658432dbedfdb209":{"blocks":219,"block_percentage":2.19,"sharedays":41548262,"shareday_percentage":0.79150876},"a0a57d12ec67ac6816532f8a0afffd9b7ce14329":{"blocks":309,"block_percentage":3.09,"sharedays":80282745,"shareday_percentage":1.52941405},"a4787e0fd9e234a83e1170a2751ad7f5a070fba5":{"blocks":30,"block_percentage":0.3,"sharedays":9088515,"shareday_percentage":0.17313935},"a951e9e8e72bcb313eb7fc6c65c797ccb53b9ef0":{"blocks":2062,"block_percentage":20.62,"sharedays":396397717,"shareday_percentage":7.55151357},"abab44f623bb3c5b29ce0d2dc873798cf2bfb8ae":{"blocks":6,"block_percentage":0.06,"sharedays":8281597,"shareday_percentage":0.15776729},"b1ef96aed5c7f9dec482467b254b40c82bf66d23":{"blocks":2,"block_percentage":0.02,"sharedays":216387,"shareday_percentage":0.00412225},"bda115840291067ba0814032f0c93d4d5900a5cf":{"blocks":39,"block_percentage":0.39,"sharedays":18496239,"shareday_percentage":0.35235975},"c8736970e5a824b07ad4c32eac60a50e37c093d8":{"blocks":543,"block_percentage":5.43,"sharedays":112581435,"shareday_percentage":2.14471526},"ee20086eb56a8a7b0f722227086b05de9941a293":{"blocks":548,"block_percentage":5.48,"sharedays":113585742,"shareday_percentage":2.16384766},"fa9596278970ed57e75b59eb01e15ce574911520":{"blocks":459,"block_percentage":4.59,"sharedays":96991153,"shareday_percentage":1.847715}} |
| @@ -0,0 +1,47 @@ | ||
| +<?php | ||
| +//read last 10k data | ||
| +$path = "/var/www/alix/panel/data/elected_custodians.dat"; | ||
| +$content = file_get_contents($path); | ||
| + | ||
| +while(!$content) | ||
| +{ | ||
| + $content = file_get_contents($path); | ||
| + sleep(1); | ||
| +} | ||
| + | ||
| +$content=json_decode($content, true); | ||
| +$i=1; | ||
| + | ||
| +//create container | ||
| +?> | ||
| +<h1>Elected Custodians</h1> | ||
| +<div style="margin: 30px;"> | ||
| + <div class="row"> | ||
| + <div class="col-md-12"> | ||
| + <table class="t01"> | ||
| + <th>#</th><th>Address</th><th>Amount</th><th>Block Passed</th><th>Time</th></tr> | ||
| + <?php | ||
| + foreach($content as $content_sub_array) | ||
| + { | ||
| + $address=$content_sub_array["address"]; | ||
| + $amount=$content_sub_array["amount"]; | ||
| + $height=$content_sub_array["height"]; | ||
| + $time=$content_sub_array["time"]; | ||
| + $unit=$content_sub_array["unit"]; | ||
| + | ||
| + if($unit=="B") {$unit="NBT";} else {$unit="NSR";} | ||
| + | ||
| + echo "<tr>"; | ||
| + echo "<td>$i</td><td><a href=\"https://discuss.nubits.com/search?q=$address\" target=\"_blank\"><p class=\"black_link\">$address</p></a></td><td>$amount $unit</td><td><a href=\"http://blockexplorer.nu/blocks/$height/1\" target=\"_blank\"><p class=\"black_link\"><b>$height</b></p></a></td><td><b>$time</b></td>"; | ||
| + echo "</tr>"; | ||
| + $i++; | ||
| + } | ||
| + ?> | ||
| + </table> | ||
| + </div> | ||
| + </div> | ||
| +</div> | ||
| +</body> | ||
| +</html> | ||
| + | ||
| + |
Binary file not shown.
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1,37 @@ | ||
| +<?php | ||
| +include("static/header.html"); | ||
| +$query = http_build_query($_GET); | ||
| + | ||
| +if(!isset($_GET["load"])) { | ||
| +$selected_page="load=liquidity"; | ||
| +} | ||
| + | ||
| +else { $selected_page=$query; } | ||
| +//sidebar | ||
| +?> | ||
| +<div id="sidebar" style="display: block;"> | ||
| +<table class ='t01'> | ||
| +<?php | ||
| +echo"<th>ALix Panel</th></tr><th>Liquidity</tr>"; | ||
| +echo"<td><a href=\"#\" onclick=\"setSelect('load=liquidity')\";><p class=\"black_link\">Network Liquidity</p></a></td></tr>"; | ||
| +echo"<th>Voting</th></tr>"; | ||
| +echo"<td><a href=\"#\" onclick=\"setSelect('load=current_motions')\";><p class=\"black_link\">Motions</p></a></td></tr>"; | ||
| +echo"<td><a href=\"#\" onclick=\"setSelect('load=current_custodians')\";><p class=\"black_link\">Custodians</p></a></td></tr>"; | ||
| +echo"<td><a href=\"#\" onclick=\"setSelect('load=elected_custodians')\";><p class=\"black_link\">Elected Custodians</p></a></td></tr>"; | ||
| +echo "</table>"; | ||
| +echo "</div>"; #end of sidebar | ||
| +?> | ||
| +<div class="container-fluid" id="container" style="margin: 50px; text-align: center;"> | ||
| + <div class="col-md-12"> | ||
| + <?php echo "<script>setSelect(\"$selected_page\"); </script>"; ?> | ||
| + </div> | ||
| +</div> | ||
| +<footer align="center"> | ||
| + <a href="https://alix.coinerella.com/walls"><p class="footer_link">ALix Walls -</p></a> | ||
| + <a href="https://alix.coinerella.com/volume"><p class="footer_link"> ALix Volume -</p></a> | ||
| + <a href="https://alix.coinerella.com/charts"><p class="footer_link"> ALix Charts -</p></a> | ||
| + <a href="https://alix.coinerella.com/panel"><p class="footer_link"> ALix Panel -</p></a> | ||
| + <a href="https://www.coinerella.com/index.php/ALix" target="_blank"><p class="footer_link"> About ALix</p></a> | ||
| +</footer> | ||
| +</body> | ||
| +</html> |
Oops, something went wrong.
0 comments on commit
66d050a