forked from internetbuilder/zipppit_officiel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin.html
209 lines (168 loc) · 15.8 KB
/
admin.html
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<html>
<head>
<title>Waxio - WAX Dashboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="files/codebase/suite.js"></script>
<link rel="stylesheet" href="files/codebase/suite.css">
<link rel="stylesheet" href="files/index.css">
<link rel="stylesheet" href="files/popup.css">
<script src='files/menu.js'></script>
<script src='waxjs.js'></script>
<script type='text/javascript' src='https://platform-api.sharethis.com/js/sharethis.js#property=62cf506ab6b056001a4f90c2&product=image-share-buttons' async='async'></script>
<script>
var url_string = window.location.href;
var url = new URL(url_string);
var ref = url.searchParams.get("ref") || 'waxdashwaxio';
//var wallet = url.searchParams.get("wallet") || 'waxdashwaxio';
//var wallet = ${wax.userAccount};
console.log(sessionStorage.getItem('waxwallet'));
console.log(sessionStorage.getItem('affiliatewallet'));
//const affiliate_wallet = url.searchParams.get("ref") || 'waxdashwaxio';
const affiliate_wallet = sessionStorage.getItem('affiliatewallet');
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z3G6E8QZ28"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-Z3G6E8QZ28');
</script>
<script>
// When the user clicks on <div>, open the popup
function myFunction() {
var popup = document.getElementById("myPopup");
popup.classList.toggle("show");
}
</script>
</head>
<!--<body style="background-image: url('files/bg3-plain.png');" align="center">-->
<body>
<center>
<div hidden="hidden" class="clickable" onclick="dhxwindow.show()">show</div>
<div class="container">
<iframe name="iframe" class="reponsive-iframe" src="go.html" width="100%" height="100%"></iframe>
</div>
<!--
<strong>ClashDome</strong> - <a target="iframe" href="https://clashdome.io/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/clashdomenft">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=clashdomenft">Market</a><br>
<div class="popup" onclick="myFunction()">Market<span class="popuptext" id="myPopup"><iframe name="popup" class="reponsive-iframe" src="xxx" width="1000px" height="600px"></iframe></span></div>
-->
<script>
const windowHtml = '<strong>Games</strong><br><!--<strong>Test</strong> - <a target="iframe" href="https://game.neoland.io/">Website</a><br>--><strong>Xpansion</strong> - <a target="iframe" href="https://play.xpsgame.io/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/xpansiongame">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=xpansiongame">Market</a><br><strong>Million On Mars</strong> - <a target="iframe" href="https://milliononmars.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/onmars">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=onmars">Market</a><br><strong>MiningNetwork</strong> - <a target="iframe" href="https://miningnetwork.io/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/miningntwrkc">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=miningntwrkc">Market</a><br><strong>FarmersWorld</strong> - <a target="iframe" href="https://play.farmersworld.io/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/farmersworld">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=farmersworld">Market</a><br><strong>FreeCityGame</strong> - <a target="iframe" href="https://play.remixworlds.com/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/freecitygame">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=freecitygame">Market</a><br><strong>ImmerSys</strong> - <a target="iframe" href="https://companion.immersys.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/immersys">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=immersys">Market</a><br><strong>ArenaOfGlory</strong> - <a target="iframe" href="https://play.arenaofglory.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/arenaofglory">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=arenaofglory">Market</a><br><strong>DiggersWorld</strong> - <a target="iframe" href="https://play.diggersworld.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/diggersworld">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=diggersworld">Market</a><br><strong>GreenRabbit</strong> - <a target="iframe" href="https://play.greenrabbitgame.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/greenrabbit">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=greenrabbit">Market</a><br><strong>GnoCity</strong> - <a target="iframe" href="https://www.gnocity.io/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/gnocityworld">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=gnocityworld">Market</a><br><strong>AgeOfFarming</strong> - <a target="iframe" href="https://play.ageoffarming.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/ageoffarming">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=ageoffarming">Market</a><br><strong>FunnyCat</strong> - <a target="iframe" href="https://play.funnycat.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/funnycatgame">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=funnycatgame">Market</a><br><strong>NFTPanda</strong> - <a target="iframe" href="https://game.nftpanda.space">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/nftpandawaxp">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=nftpandawaxp">Market</a><br><strong>GoldMand</strong> - <a target="iframe" href="https://play.goldmand.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/goldmandgame">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=goldmandgame">Market</a><br><strong>RealmNFT</strong> - <a target="iframe" href="https://play.realmnft.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/realmnftgame">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=realmnftgame">Market</a><br><strong>DragonsValley</strong> - <a target="iframe" href="https://play.dragonsvalley.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/dragonvalley">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=dragonvalley">Market</a><br><strong>TokenLands</strong> - <a target="iframe" href="https://playing.tokenlands.io/en/play/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/tokenlands11">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=tokenlands11">Market</a><br><strong>BCBrawlers</strong> - <a target="iframe" href="https://play.bcbrawlers.com/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/bcbrawlers">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=bcbrawlers">Market</a><br><strong>WaxRush</strong> - <a target="iframe" href="https://waxrush.com">Play</a>/<a target="iframe" href="https://waxrush.com/referral?ref=">Embed this tool$</a><details><summary><strong>More Games</strong></summary><strong>DesertFarm</strong> - <a target="iframe" href="https://play.desertfarm.io/?ref=waxdashwaxio">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/desertfarmio">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=desertfarmio">Market</a><br><strong>ClashDome</strong> - <a target="iframe" href="https://clashdome.io/">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/clashdomenft">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=clashdomenft">Market</a><br><strong>CenturyTrain</strong> - <a target="iframe" href="https://play.trains.cards">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/centurytrain">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=centurytrain">Market</a><br><strong>BlockchainRPG</strong> - <a target="iframe" href="https://play.blockchainrpg.io">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/brpg">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=brpg">Market</a><br><strong>Rplanet</strong> - <a target="iframe" href="https://rplanet.io/lab">Play</a>/<a target="iframe" href="https://waxmarketcap.com/collection/rplanet">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=rplanet">Market</a><br></details><details><summary><strong>Collections</strong></summary><strong>HotWheels</strong> - <a target="iframe" href="https://hotwheelsnftg.io/shop/">dApp</a>/<a target="iframe" href="https://waxmarketcap.com/collection/hotwheels/">Info</a>/<a target="iframe" href="https://nfthive.io/market?collection=hotwheels">Market</a></details><details><summary><strong>Tools</strong></summary><strong>Alcor</strong> - <a target="iframe" href="https://wax.alcor.exchange/swap/">Swap</a>/<a target="iframe" href="https://wax.alcor.exchange/wallet/">Wallet</a>/<a target="iframe" href="https://wax.alcor.exchange/markets/">Markets</a><br><strong>NFTHive</strong> - <a target="iframe" href="https://nfthive.io/market/">Market</a>/<a target="iframe" href="https://nfthive.io/trade/">Trade</a>/<a target="iframe" href="https://nfthive.io/stats/">Stats</a><br><strong>WaxMarketcap</strong> - <a target="iframe" href="https://waxmarketcap.com/">dApp</a><br><strong>WaxAffiliation</strong> - <a target="iframe" href="https://waxaffiliation.io/?ref=">dApp</a></details><center><img id="login" onclick=login() style="display: block; width: 50px; height: 50px; margin-top: 20px; margin-left: auto; margin-right: auto" src="files/wax.svg"><strong><div id="current2">WaxLogin</div></strong><br><details><summary id="sign" onclick=sign() alt="Sign"><strong>Subscribe to Waxio</strong></summary><div id="response"></div><br><p hidden="hidden" id="current"></p><input hidden="hidden" id="wallet"></details><br><strong><a target="iframe" href="about.html">About</a> - <a target="iframe" href="team.html">Team</a> - <a target="iframe" href="chat.html">ChatRoom</a> - <a target="iframe" href="affiliation.html">Affiliation</a></strong><br><br>Share with <a target="_blank" href="http://twitter.com/share?url=http%3A%2F%2Fwaxio.io&text=Wax%20Gaming%20Dashboard%20to%20manage%20multiple%20games%20and%20dApp%20in%20the%20same%20page%20%23wax%20%23waxp%20%23waxgaming%20%23waxio%20%23waxgame%20%23waxnft%20%23nft&">Twitter</a> or <a target="_blank" href="http://www.facebook.com/share.php?u=https://waxio.io.org/">Facebook</a><br><br><div class="sharethis-inline-share-buttons"></div></center>';
const dhxwindow = new dhx.Window({
width: 305,
height: 800,
closable: false,
movable: true,
modal: false,
title: 'Waxio Dashboard (Drag me)',
html: windowHtml
});
dhxwindow.show();
</script>
<script>
const wax = new waxjs.WaxJS({
rpcEndpoint: 'https://wax.greymass.com'
});
async function login() {
try {
const userAccount = await wax.login();
document.getElementById('wallet').value = wax.userAccount;
await getCurrentMessage();
} catch(e) {
document.getElementById('response').append(e.message);
}
}
async function sign() {
if(!wax.api) {
return document.getElementById('response').append('Login First! ');
}
const wallet = document.getElementById('wallet').value;
try {
const result = await wax.api.transact({
actions: [{
account: 'freecitygamx',
name: 'adduseraff',
authorization: [{
actor: wax.userAccount,
permission: 'active',
}],
data: {
wallet,
affiliate_wallet,
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30
});
document.getElementById('response').append(`All Good Thank You!`);
// document.getElementById('response').append(wax.userAccount);
// document.createElement("<div id='myID'> my Text </div>");
// document.body.insertBefore(elem,document.body.childNodes[0]);
// document.getElementById('response').append(JSON.stringify(result));
// console.log(result);
await new Promise(resolve => setTimeout(resolve, 1000));
await getCurrentMessage();
} catch(e) {
document.getElementById('response').append('* Expired Transaction *');
}
}
async function getCurrentMessage() {
const res = await wax.rpc.get_table_rows({
json: true,
code: 'freecitygamx',
scope: 'freecitygamx',
table: 'users',
lower_bound: wax.userAccount,
upper_bound: wax.userAccount,
});
const message = res.rows[0] ? res.rows[0].message : `Wallet: ${wax.userAccount}`;
document.getElementById('current').textContent = message;
document.getElementById('current2').textContent = `${wax.userAccount}`;
// document.getElementById('current3').textContent = `Now you are ready to `;
sessionStorage.setItem('waxwallet', wax.userAccount);
console.log(sessionStorage.getItem('waxwallet'));
sessionStorage.setItem('affiliatewallet', ref);
console.log(sessionStorage.getItem('affiliatewallet'));
//console.log(sessionStorage.getItem('waxwallet'));
//document.getElementById('current3').textContent = `${wax.userAccount}`;
//document.getElementById('nameinput').append(wax.userAccount);
//document.getElementById('nameinput').textContent = wax.userAccount;
// document.getElementById('current2').append(wax.userAccount);
//document.getElementById('options').textContent = (wax.userAccount);
//document.getElementById('options').textContent = (new GrowlNotification(options)).show();
}
// set a random value to the initial message value
document.getElementById('message').value = Math.random().toString(36).substring(2);
</script>
</script>
</center>
<!--
<script>
const windowHtml = '<strong><a href="https://play.remixworlds.com/" target="iframe">2222</a> - <a href="https://remixdapp.vercel.app" target="iframe">Test</a></strong><iframe name="iframe" src="https://remixworlds.com/" width="100%" height="100%"></iframe>';
const dhxwindow = new dhx.Window({
width: 600,
height: 725,
closable: false,
movable: true,
modal: false,
resize: true,
title: 'Wax Dashboard - Wallet: ' + wax_wallet,
html: windowHtml
});
dhxwindow.show2();
</script>
-->
<!--
<div id="debug"></div>
<script>
fetch("../config.json")
.then(response => response.json())
.then(data => {
console.log(data.website_url)
document.querySelector("#debug").innerText = data.website_url
})
</script>
-->
</body>
</html>