-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathwithdraw.php
More file actions
78 lines (67 loc) · 1.96 KB
/
withdraw.php
File metadata and controls
78 lines (67 loc) · 1.96 KB
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
<?php
include("login.php");
if (isset($_SESSION['username'])){include("coinhandler.php");}
?>
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet2.css">
<meta charset="utf-8">
<title>BitWallet - The Online Bitcoin Wallet</title>
</head>
<body>
<div id="headBar"><p class="logoFont">BitWallet</p></div>
<div id="userInfo"><?php
if (isset($_SESSION['username']))
{
echo('<p>Welcome, <b>'.$_SESSION['username'].'</b>! Your current balance is: '.$balance.' BTC</p>');
}
else
{
echo('<p>User not logged in.</p>');
}
?>
</div>
<div id="container">
<div id="nav">
<?php
if (isset($_SESSION['username']))
{
echo('
- <a href="deposit.php">Deposit</a><br>
- <a href="withdraw.php">Withdraw</a><br>
- <a href="accountsettings.php">Account Settings</a><br>
- <a href="logout.php">Log out</a>');
}
else
//display login form
{
echo('<p>Log in:</p><form action="login.php" method="post">
<p>Username:</p> <input name="username" type="text" />
<p>Password:</p> <input name="password" type="password" />
<input type="submit" value="Go" /></form>
</p><a href="registrationform.php">Register</a></p>');
}
?>
</div>
<div id="main">
<?php
if (isset($_SESSION['username']))
{
echo('<h3>Withdraw Bitcoin</h3>
<form action="send.php" method="post"><p><b>Amount: </b><input type="text" name="amount" size="8" /> BTC </p>
<p><b>Address: </b><input type="text" name="address" size="34" /></p>
<input type="submit" value="SEND" /> </form>
<br>
<p>Warning: it may take up to 1-2 hours for the transaction to appear in the blockchain.</p>');
}
else
{
echo('<h3>Withdraw Bitcoin</h3><p><b>Error:</b> User not logged in.</p>');
}
?>
</div>
</div>
<div id="footer"><p>BitWallet 2015</p></div>
</body>
</html>