This repository has been archived by the owner on Nov 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.php
218 lines (145 loc) · 4.55 KB
/
account.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
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
<?php
include_once "header.php";
$rt = true;
if(!$lg && !$vp){
$rt = false;
}
if($lg && $lg != $id){
$rt = false;
}
if($vp && $vp != $id){
$rt = false;
}
?>
<style>
.wrapper {
border : 0px dotted #ccc; padding: 0px;
}
#sidebar { }
#tree { background-color: white;
background-size: cover;
background-image: url(https://i.imgur.com/dEqI5GG.png);
height: 100vh;
}
@media screen and (min-width: 600px) {
.wrapper {
height: auto; overflow: hidden; // clearing
}
#sidebar { padding: 20px;width: 400px; float: left;height: 100vh; }
#tree { margin-left: 400px; }
}
.input-color {
position: relative;
}
.input-color input {
padding-left: 20px;
margin-bottom: 10px;
}
.input-color .color-box {
width: 30px;
height: 30px;
background-color: #ccc;
left: 5px;
top: 5px;
}
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
width: 100%;
padding: 8px 14px;
text-align: left;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
</style>
<style>
.top-container {
background-color: #f1f1f1;
padding: 30px;
text-align: center;
}
.header {
padding: 10px 16px;
background: #f95318;
color: #fff;
}
.content {
padding: 16px;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
}
.sticky + .content {
padding-top: 102px;
}
</style>
<div class="wrapper">
<?php
include_once "sidebar.php";
?>
<div id="tree">
<div class="header" id="myHeader">
<h4><i class="fas fa-cog"></i> To customize your tree, go to Customization <u><a href="https://myvegantree.org/customize" style="color: #ffffff;">over here</a></u>!</h4>
</div>
<div class="pt-box" style="width: 574px;border-radius: 3px;margin: 20px 0px 0px 50px;background: #fff0;box-shadow: 0 0px 0px rgba(0, 0, 0, 0.13);">
<form class="pt-form" id="send-detail" style="background-color: #ffffffba;">
<h4><b>Updating your account</b></h4><br>
<p>You can update your account details here. If you've sent out tree requests that have been accepted, you will no longer be able to edit your username. Editing your username also changes your public/private tree link when you share it, your old link will break!</p>
<br>
<h4><b>Update your Account Details</b></h4><br>
<div class="pt-input">
<i class="icons icon-user"></i>
<input type="text" name="username" value="<?=db_get("accounts", "username", $lg)?>" placeholder="Update your Username">
</div>
<div class="pt-input">
<i class="icons icon-user"></i>
<input type="text" name="name" value="<?=db_get("accounts", "name", $lg)?>" placeholder="Update your Name">
</div>
<div class="pt-input">
<i class="icons icon-key"></i>
<input type="password" name="pass" placeholder="Update your account password">
</div>
<div class="pt-input">
<i class="icons icon-envelope"></i>
<input type="text" name="email" value="<?=db_get("accounts", "email", $lg)?>" placeholder="Update your email">
</div>
<hr>
<div class="pt-input">
<select name="public" class="tree-select">
<?php
$grabcurrentvalue = db_get("accounts", "public", $lg);
if ($grabcurrentvalue == 1) {
echo '<option value="1" selected="selected">Make my tree link public</option>';
echo '<option value="2">Password protect my tree</option>';
} else if ($grabcurrentvalue == 2) {
echo '<option value="1">Make my tree link public</option>';
echo '<option value="2" selected="selected">Password protect my tree</option>';
} else {
echo '<option value="1" selected="selected">Make my tree link public</option>';
echo '<option value="2">Password protect my tree</option>';
}
?>
</select>
</div>
<div class="pt-input tree-pass"<?php if($grabcurrentvalue) echo ' style="display: none;"'; ?>>
<i class="icons icon-list"></i>
<input type="password" name="vpass" placeholder="Update your tree password" />
</div>
<p style="font-size: 13px;line-height: 16px;padding: 10px;">Note: If you password protect your tree, users you've given access to attach your tree will still be able to see your tree regardless!</p>
<hr />
<button type="submit" class="pt-button bg-0"><i class="icons icon-login"></i> Update Account</button>
</form>
</div>
</div>
</div>
<!-- Latest compiled and minified JavaScript -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/jquery.livequery.js"></script>
<script src="js/custom.js"></script>