-
Notifications
You must be signed in to change notification settings - Fork 20
/
registrationform.php
86 lines (69 loc) · 2.05 KB
/
registrationform.php
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
<?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>');
}
?>
</div>
<div id="main"><?php
if (!isset($_SESSION['username']))
{
echo('<h3>Register a new account</h3>
<form action="register.php" method="post">
<p>Username:</p> <input name="username" type="text" />
<p>Password:</p> <input name="password" type="password" />
<p>Repeat password:</p> <input name="repeatpassword" type="password" />
<br>
<input type="submit" value="Go" />
<br>
<p><b>Warning:</b> Because BitWallet does not ask for your email address, your account <b>cannot</b> be recovered if you lose or forget your password!
</form>');
}
else
{
echo('<p><b>Error:</b> User already logged in!');
}
?>
</div>
</div>
<div id="footer"><p>BitWallet 2015</p></div>
</body>
</html>