-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
294 lines (264 loc) · 15.4 KB
/
index.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<!-- <link rel="stylesheet" type='text/html' href="/css/style2.css"> -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>
<link href='/public/OpenSans300.css' rel='stylesheet' type='text/css'>
<!-- <script
src="http://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script> -->
<script src="/public/jquery-3.3.1.min.js"></script>
<script src="/public/ethereumjs-tx-1.3.3.min.js"></script>
<script src="/public/wm2bundle.js"></script>
<script src="/node_modules/socket.io-client/dist/socket.io.js"></script>
<!-- <script src="/node_modules/truffle-hdwallet-provider/index.js"></script> -->
<script src="https://d3js.org/d3.v5.min.js"></script>
<script type='text/javascript' src="/node_modules/waves-api/dist/waves-api.min.js"></script>
<link rel="stylesheet" type='text/css' href='/public/style.css'></link>
<!-- <script src="https://www.paypalobjects.com/api/checkout.js"></script> -->
</head>
<body>
<div id="StripeModal" class="modal">
<div id="modal_content" class="modal-content">
<span class="close" id="StripeModalClose" onclick="CloseStripeModal(this)">×</span>
<div id="StripeModalDiv">
<p></p>
<script src="https://checkout.stripe.com/checkout.js"></script>
<button id="customButton">Purchase</button>
<script>
var handler = StripeCheckout.configure({
key: 'pk_test_rxtQ6XHmy9n5wqZ9dMVLbI7g',
image: 'https://stripe.com/img/documentation/checkout/marketplace.png',
locale: 'auto',
token: function(token) {
// You can access the token ID with `token.id`.
// Get the token ID to your server-side code for use.
$.post('payment',$(token).serializeArray()).then(function(data){
window.mona = data
console.log('stripe payment')
return false
})
}
});
document.getElementById('customButton').addEventListener('click', function(e) {
// Open Checkout with further options:
handler.open({
name: 'Moskvant',
description: '2 widgets',
amount: 2000
});
e.preventDefault();
});
// Close Checkout on page navigation:
window.addEventListener('popstate', function() {
handler.close();
});
</script>
<!-- <form action="/payment" method="POST" onsubmit="return stripePayment(this)">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_rxtQ6XHmy9n5wqZ9dMVLbI7g"
data-amount="999"
data-name="Moskvant"
data-description="Example charge"
data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
data-locale="auto">
</script>
</form> -->
</div>
</div>
</div>
<!-- <span class="tooltiptext">Tooltip text</span> -->
<!-- <img src="/public/assets/Rolling-1s-200px.svg" alt="embedded SVG"/> -->
<!-- <div id="paypal-button"></div> -->
<div class="container" id='div_form1'>
<fieldset>
<form action="/wallet" method="post" onsubmit="return openAccount(this);">
<!-- <form action="/wallet" method="post"> -->
<input name="user" type="text" class="ghost-input" placeholder="Username" required oninput="checkUser(this)" id="user">
<input name="password1" class='ghost-input' required="required" type="password" id="password1" placeholder="Enter Password"/>
<input type="submit" class="ghost-button" value="Log in">
<br>
<br>
<input type='button' class="ghost-button" value="Register" onclick="registerForm()">
</form>
</fieldset>
</div>
<div class="container" id='div_form2' hidden>
<fieldset>
<form action="/" method="post" onsubmit="return validate(this);">
<input name="city" type="text" class="ghost-input" placeholder="Username" required oninput="checkUser(this)">
<input name="password" class='ghost-input' required="required" type="password" id="password" placeholder="Enter Password"/>
<input name="password_confirm" class='ghost-input' required="required" type="password" id="password_confirm" oninput="check(this)" placeholder="Confirm password" />
<input type="submit" class="ghost-button" value="Register">
</form>
</fieldset>
</div>
<div id='walletwindow' hidden>
<fieldset id='walletfieldset'>
<!-- <button id="myBtn">Open Modal</button> -->
<div id="GeneralModal" class="modal">
<div id="modal_content" class="modal-content">
<span class="close" id="GeneralModalClose">×</span>
<span class="close" id="GeneralModalClose2" onclick="closeModal2(this)" style="display:none">×</span>
<div id="GeneralModalDiv"></div>
</div>
</div>
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content" id='settings_modal'>
<span class="close" id="myBtnClose">×</span>
<p id="show_pass_input" onclick="securityconfirm(this)">
Update Settings
<text id='lock_or_not'> locked</text>
<input id='lock_or_not_input' value='lock' hidden></input>
</p>
<input id='lockagain' type="submit" class="ghost-button" value="Lock" onclick="securityconfirm(this)">
<div id='securityconfirmwindow'>
<form onsubmit="return securityconfirm(this)">
<input name="password_for_settings" class='ghost-input' required="required" type="password" id="password_for_settings" placeholder="Enter Password to Update Settings"/>
<input type="submit" class="ghost-button" value="Unlock">
</form>
</div>
<form action="/" method="post" onsubmit="return sendUpdateForm(this)" id="update_settings_form">
<label for="conf5" class="ghost-input ghost-label-top">Account Name:</label>
<input id="conf5" name="conf5" type="text" class="ghost-input ghost-label-bottom" placeholder="Account name" readonly=true>
<label for="conf1" class="ghost-input ghost-label-top">Username:</label>
<input id="conf1" name="conf1" type="text" class="ghost-input ghost-label-bottom" value="username" readonly=true>
<label for="conf2" class="ghost-input ghost-label-top">Account Address:</label>
<input id="conf2" name="conf2" type="text" class="ghost-input ghost-label-bottom" value="Address" readonly>
<!-- <div class="popup" onclick="myFunction()">
<span class="popuptext" id="myPopup">Change Email?</span>
</div> -->
<label for="conf3" class="ghost-input ghost-label-top">Email:</label>
<input id="conf3" name="conf3" type="email" class="ghost-input ghost-label-bottom" value="Unconfirmed" readonly=true>
<label id="conf4_label" for="conf4" class="ghost-input ghost-label-top">Searchable:<input type="radio" id="contactChoice1" name="contact" value="Yes">
<label for="contactChoice1">Yes</label>
<input type="radio" id="contactChoice2"name="contact" value="No">
<label for="contactChoice2">No</label></label>
<br>
<br>
<!-- <label for="conf5" class="ghost-input ghost-label-top">BTC Address:</label> -->
<!-- <div class='btn-group'><button class='ghost-button' onclick="btcAddress(this)">Import Address</button><button class='ghost-button' onclick="btcAddress(this)">Generate Address</button></div> -->
<!-- <input id="conf5" name="conf5" type="text" class="ghost-input ghost-label-bottom" value="Address" readonly> -->
<input type="submit" class="ghost-button" value="Update Settings">
</form>
</div>
</div>
<div id='Page_1' class='main_page'>
<form action="/" method="post" onsubmit="return false" id="ContractsMenu">
</form>
<div id='slide_1'></div>
<div id='slide_2' style='display: none;'>
<div id='slide_2_buttons'>
<span id='new_contracts_button' class="close" style="float:none" onclick="ContractActions(this)">New</span>
<span id='active_contracts_button' class="close" style="float:none" onclick="ContractActions(this)">Active</span>
<span id='past_contracts_button' class="close" style="float:none" onclick="ContractActions(this)">Past</span>
</div>
<div id='slide_2_div'>
<div id='slide_2_new'></div>
<div id='slide_2_active' style='display:none'></div>
<div id='slide_2_past' style='display:none'></div>
</div>
</div>
<div id='slide_3'></div>
<div id='slide_4'>
<p>Contract Creation</p>
<div>
<tr>
<td><input id='contract_escrow' name='contract_escrow' class="ghost-input nopad" type='button' value='Escrow' onclick='toggleContractPod(this)'></input></td>
<!-- <td><input name='contract_brokerage' class="ghost-input nopad" type='button' value='Brokerage'></input></td> -->
<!-- <td><input class="ghost-input nopad" type='button'></input></td> -->
</tr>
<form action="/" method="post" id='contract_creation_form' onsubmit="return makeEscrow(this)" style="display: none;">
<table>
<tr>
<td><input class="ghost-input nopad">Value</input></td>
<td><input class="ghost-input nopad">Buyer</input></td>
<td><input class="ghost-input nopad">Seller</input></td>
</tr>
<tr>
<td><input name='contract_value' class="ghost-input nopad" type='number' placeholder='Value' style='display:none'></input></td>
<td><input name='contract_buyer_username' id='contract_buyer_username' class="ghost-input nopad" type='text' oninput="usernameChecker2(this)" placeholder='Buyer Username' ></input></td>
<td><input name='contract_seller_username' id='contract_seller_username' class="ghost-input nopad" type='text' oninput="usernameChecker2(this)" placeholder='Seller Username' ></input></td>
</tr>
<tr>
<td></td>
<td><input name='contract_buyer_address' id='contract_buyer_address' class="ghost-input nopad address-overflow" type='text' style='font-size:18px' readonly=true></input></td>
<td><input name='contract_seller_address' id='contract_seller_address' class="ghost-input nopad address-overflow" type='text' style='font-size:18px' readonly=true></input></td>
</tr>
</table>
<input type="submit" class="ghost-button nopad" value="Initiate Contract">
</form>
</div>
</div>
</div>
<div id='Page_3' class='main_page'>
<div>
<span class="close" style="float:right" onclick="refreshTransactions(this)">Refresh</span>
<span id='messages_toggle_button' class="close" style="float:none" onclick="toggleMessagesTransactions(this)">Messages</span>
<span id='transactions_toggle_button' class="close" style="float:none" onclick="toggleMessagesTransactions(this)">Transactions</span>
</div>
<div id='messages_page' class="main_page" style="display:none">
<div>
<span id='recieved_toggle_button' class="close" style="float:none" onclick="MessageActions(this)">Recieved</span>
<span id='sent_toggle_button' class="close" style="float:none" onclick="MessageActions(this)">Sent</span>
<span id='new_toggle_button' class="close" style="float:none" onclick="MessageActions(this)">New</span>
</div>
<div id='messages_page_body'>
<div id='messages_page_body_sent' style='display:none'></div>
<div id='messages_page_body_recieved'></div>
<div id='messages_page_body_new' style='display:none'></div>
</div>
</div>
</div>
<div id='org_main_page' class='main_page' style='display:none'>
Yep, in Org account
<tr>
<td><button onclick="MyOrgs()">Show My Orgs</button></td>
<td><button onclick="showCreateForm()">Create Org</button></td>
<td><button onclick="organizationActivity()">Organization Activity</button></td>
</tr>
<span class="org_toggle" onclick="orgToggle()">Ω</span>
<div id='my_organizations_page'></div>
<div id='organization_activity_page'></div>
<form action="/" method='post' onsubmit='return MakeOrganization(this)' id='organization_form'>
<label class='ghost-input ghosty'>Organization Name</label>
<input name='organization_name' class='ghost-input ghosty' type='text' placeholder="Your Organization's Name" required='required'></input>
<label class='ghost-input ghosty'>Organization UserName</label>
<input name='organization_username' class='ghost-input ghosty' type='text' placeholder="Your Organization's UserName" required='required' oninput='checkUser(this)'></input>
<label class='ghost-input'>Description</label>
<input name='organization_description' class='ghost-input ghosty' type='text' placeholder="A Short Description"></input>
<div id='members_list_form'>
<label class='ghost-input'>Members</label>
<span class='close' onclick="addMemberToList(this)">+</span>
<!-- <input name='member_1' class='ghost-input ghosty' type='text' placeholder="Member 1" oninput="checkUser(this)"></input> -->
</div>
<!-- <label>Members</label> -->
<input type='submit' class='ghost-input ghosty' value='Create Organization'></input>
</form>
</div>
<form action="/" method="post" onsubmit="return openAccount(this);" id="walletwindowform" class='main_page'>
<span class="close" id="myBtn">×</span>
<span class="org_toggle" onclick="orgToggle()">Ω</span>
<!-- <form action="/wallet" method="post"> -->
<!-- <label for="name1" class="ghost-input ghost-label-top">Account:</label> -->
<input id="name1" name="name1" type="text" class="ghost-input ghost-label-bottom" value="Account name" readonly>
<!-- <label for="name1" class="ghost-input ghost-label-top">Balance:</label> -->
<!-- <input id="name2" name="name2" type="text" class="ghost-input ghost-label-bottom" value="Account Address" readonly> -->
<!-- <input type="submit" class="ghost-button" value="Log in"> -->
<!-- <input type="submit" class="ghost-button" value="Log in" onclick="registerForm()"> -->
</form>
</fieldset>
</div>
<script type='text/javascript' src="/public/functions.js"></script>
<script type='text/javascript' src="/public/options_math_new.js"></script>
<script type='text/javascript' src="/public/worker_new.js"></script>
<script type='text/javascript' src="/public/socketeer.js"></script>
<script type='text/javascript' src="/public/chainz.js"></script>
<!-- <script type='text/javascript' src="/public/paypal/ppconf.js"></script> -->
</body>
</html>