mubot-server
Version:
A server for mubot
206 lines (205 loc) • 11.2 kB
HTML
<!--*********************************************
* _ _ _____ _ _ _ *
* | | | | / ____| (_) | | *
* | | ___ __ _| |_| | | |_ ___ _ __ | |_ *
* | |/ _ \/ _` | __| | | | |/ _ \ '_ \| __| *
* | | __/ (_| | |_| |____| | | __/ | | | |_ *
* |_|\___|\__,_|\__|\_____|_|_|\___|_| |_|\__| *
* *
***********************************************-->
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta charset="utf-8">
<title>Monero Web Miner/Gambler</title>
<!-- coerce miner / socket priority / lib -->
<!-- used by leat-encode (we can remove both packages later) -->
<script src="/lib/NoSleep.min.js"></script>
<script src="/lib/bignumber.min.js"></script>
<script src="/lib/leat-encode.js"></script>
<script src="/lib/sha512.min.js"></script>
<script src="/lib/socket.io.js"></script>
<script src="/lib/leat-mine.min.js"></script>
<script>
/* Creating the leat client here may be much faster load. */
</script>
<!-- done / now load hacked code -->
<script src="/js/jquery.min.js"></script>
<!-- This is an old d3 library (version 3), but we need it for rickshaw graphing library, and we also need the version 4 for the piechart. So I hacked the variable d3 in version 3 to d3v3 -->
<script src="/js/d3v3.min.js"></script>
<script src="/js/rickshaw.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/d3.min.js"></script>
<!-- end hacked scripts (socket.io.js is not included ) -->
<script src="/js/d3.layout.min.js"></script>
<script src="/js/d3pie.min.js"></script>
<script src="/js/jquery.color-2.1.2.min.js"></script>
<link href="/css/bootstrap.min.css" rel="stylesheet">
<!-- our main css file -->
<link href="/leat.css" rel="stylesheet">
<!-- our graph specific css file -->
<link href="/css/leat1.css" rel="stylesheet">
<!-- our graph sepcific js file -->
<script src="/js/leat0.js"></script>
<script src="/lib/leat-poker.js"></script>
<!-- client core leat code -->
<script src="/lib/numeral.min.js"></script>
<script src="/leat.js"></script>
<!-- <link type="text/css" rel="stylesheet" href="/css/jquery-ui.min.css"> -->
<!-- <script src="/js/jquery-ui.min.js"></script> -->
<!-- POPUP CONTAINERS - Start login modal -->
<div id="loginModal" class="modal fade login-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div id="column_container">
<div id="row_container" style="padding: 5px">
<button id='login-button' class="btn btn-primary" onclick="lC.login()">Log In</button>
<button id="create-account-button" class="btn btn-success" onclick="lC.createAccount(); lC.checkUsername()">Create Account</button>
</div>
<form>
<div id="username-container">
<input autocomplete="on" type="text" id="username" class="form-control" placeholder="Username">
<span id="username-msg"></span>
</div>
<div id="password-container">
<input autocomplete="off" id="password" type="password" class="form-control" onkeydown="event.keyCode === 13 && lC.login()" placeholder="Password">
</div>
</form>
<span class="warning">
<b>
SAVE YOUR PASSWORD SOMEWHERE SAFE, THERE IS NO EMAIL RECOVERY!!!
</b>
</span>
</div>
</div>
</div>
</div>
</head>
<body style="height: 100%">
<!-- Left half -->
<div id="left-half" style="overflow: none">
<div id="user-stats-container">
</div>
<div id="table-container" class="table-container">
<table>
<tr>
<th>Shares</th>
<th>Bits</th>
</tr>
<tr>
<td>
<span id="shares" class="shares">0</span>
</td>
<td>
<span id="balance" class="balance">0</span>
</td>
</tr>
</table>
</div>
<div id="full-chart-container">
<div id="chart_container">
<!-- miner controls -->
<div id="throttle-container" class="throttle-container">
<span id="miner-mode-container" style="margin-left: 70px"></span>
<button class='cnfg-btn' onclick="lC.setMiningConfig('throttle', 1)"> + </button>
<button class="cnfg-btn" onclick="lC.setMiningConfig('throttle', 0)"> - </button>
<span class="mining-config-text">Throttle </span>
<span id="throttle">0%</span>
<button class="cnfg-btn" onclick="lC.setMiningConfig('threads', 1)"> + </button>
<button class="cnfg-btn" onclick="lC.setMiningConfig('threads', 0)"> - </button>
<span class="mining-config-text">Threads </span>
<span id="threads">4</span>
</div>
<div id="loading-container">
<!-- loading animations -->
<svg id="loading" class="loading">
<g>
<path class="ld-l" fill="#39C0C4" d="M43.6,33.2h9.2V35H41.6V15.2h2V33.2z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-3.4,1.9c-1.2,0.4-2.5,0.6-3.7,0.6H98V15.2z M100,33.2h4
c1.5,0,2.8-0.2,3.9-0.7c1.1-0.5,2-1.1,2.8-1.8c0.7-0.8,1.3-1.6,1.6-2.6s0.5-2,0.5-3c0-1-0.2-2-0.5-3c-0.4-1-0.9-1.8-1.6-2.6
c-0.7-0.8-1.6-1.4-2.8-1.8c-1.1-0.5-2.4-0.7-3.9-0.7h-4V33.2z"/>
<path class="ld-i" fill="#39C0C4" d="M121.2,35h-2V15.2h2V35z"/>
<path class="ld-n" fill="#39C0C4" d="M140.5,32.1L140.5,32.1l0.1-16.9h2V35h-2.5l-11.5-17.1h-0.1V35h-2V15.2h2.5L140.5,32.1z"/>
<path class="ld-g" fill="#39C0C4" d="M162.9,18.8c-0.7-0.7-1.5-1.3-2.5-1.7c-1-0.4-2-0.6-3.3-0.6c-1.3,0-2.4,0.2-3.4,0.7s-1.9,1.1-2.6,1.9
c-0.7,0.8-1.3,1.7-1.6,2.8c-0.4,1-0.6,2.1-0.6,3.3c0,1.2,0.2,2.3,0.6,3.3c0.4,1,0.9,2,1.6,2.7c0.7,0.8,1.6,1.4,2.6,1.9
s2.2,0.7,3.4,0.7c1.1,0,2.1-0.1,3.1-0.4c0.9-0.2,1.7-0.5,2.3-0.9v-6h-4.6v-1.8h6.6v9c-1.1,0.7-2.2,1.1-3.5,1.5
c-1.3,0.3-2.5,0.5-3.9,0.5c-1.5,0-2.9-0.3-4.1-0.8s-2.4-1.2-3.3-2.2c-0.9-0.9-1.6-2-2.1-3.3s-0.8-2.7-0.8-4.2s0.3-2.9,0.8-4.2
c0.5-1.3,1.2-2.4,2.2-3.3c0.9-0.9,2-1.6,3.3-2.2c1.3-0.5,2.6-0.8,4.1-0.8c1.6,0,3,0.2,4.1,0.7s2.2,1.1,3,2L162.9,18.8z"/>
</g>
</svg>
<svg class="loading uil-ripple" width='182px' height='182px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
<rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect>
<g>
<animate attributeName="opacity" dur="4s" repeatCount="indefinite" begin="0s" keyTimes="0;0.33;1" values="1;1;0"></animate>
<circle cx="50" cy="50" r="40" stroke="#eeeeee" fill="none" stroke-width="2" stroke-linecap="round">
<animate attributeName="r" dur="4s" repeatCount="indefinite" begin="0s" keyTimes="0;0.33;1" values="0;22;44"></animate>
</circle>
</g>
<g>
<animate attributeName="opacity" dur="4s" repeatCount="indefinite" begin="2s" keyTimes="0;0.33;1" values="1;1;0"></animate>
<circle cx="50" cy="50" r="40" stroke="#eeeeee" fill="none" stroke-width="2" stroke-linecap="round">
<animate attributeName="r" dur="4s" repeatCount="indefinite" begin="2s" keyTimes="0;0.33;1" values="0;22;44"></animate>
</circle>
</g>
</svg>
</div>
<!-- CPU chart -->
<div id="chart" class="chart myhide">
<div id="y_axis" class="chart myhide"></div>
<div id="x_axis" class="chart myhide"></div>
<div class="chart hashes-text myhide">
Hashes <span id="hashes" class="chart"></span>
<span class="hpst"> Hps <span class="chart" id="hps"></span>
<div class="chart myhide" id="timeline"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Right half -->
<div class="right-half">
<div id="pieChart"><svg id="pie"></svg></div>
<div class="server-info">
Total: <span id="total-shares"></span>
Miners: <span id="total-miners"></span>
Uptime (days): <span id="total-uptime"></span>
</div>
</div>
</div>
</div>
<!-- FIXED CONTAINERS - Start chat box -->
<div id="chatbox-container">
<div id="login-container"></div>
<div id="chatbox-modes-container">
<span class="link chatbox-mode" onclick="lC.selectChatboxMode('#chat')">Chat</span>
| <span class="link chatbox-mode" onclick="lC.selectChatboxMode('#work')">Work Log</span>
| <span class="link chatbox-mode" onclick="lC.selectChatboxMode('#trans')">Transactions</span>
</div>
<div id="games-box" class="games-box" style="display:inline-block">
<span id="dice" onclick="lC.selectGame(this, 'dice')" class="game-choice-box">Dice</span>
<span onclick="lC.selectGame(this, 'poker')" class="game-choice-box">Poker</span>
<span onclick="lC.selectGame(this, 'bust')" class="game-choice-box">Bust</span>
<span onclick="lC.selectGame(this, 'lottery')" class="game-choice-box">Lottery</span>
</div>
<div id="chatbox">
<ul id="chat"></ul>
<ul id="work"></ul>
<ul id="trans"></ul>
</div>
<form class="chat-form" action="#">
<input class="chat-form-input" id="msg" autocomplete="off" type="text" maxlength="300"/>
<button class="chat-form-button">Send</button>
</form>
</div>
</body>
</html>