-
Notifications
You must be signed in to change notification settings - Fork 10
/
editprofile.php
149 lines (130 loc) · 5.95 KB
/
editprofile.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
<?php
/*
* This file is part of enviroCar.
*
* enviroCar is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* enviroCar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with enviroCar. If not, see <http://www.gnu.org/licenses/>.
*/
include('header.php');
require_once('assets/includes/connection.php');
$loggedInUser = $_SESSION["name"];
$user = (isset($_GET['user'])) ? $_GET['user'] : $loggedInUser;
?>
<div id="edit-profile-input-error" class="container alert alert-block alert-error fade in" style="display:none;">
<a class="close" data-dismiss="alert">×</a>
<? echo $edit_profile_invalid_input; ?>
</div>
<div id="edit-profile-error" class="container alert alert-block alert-error fade in" style="display:none;">
<a class="close" data-dismiss="alert">×</a>
<? echo $edit_profile_error; ?>
</div>
<div id="edit-profile-success" class="container alert alert-block alert-success fade in" style="display:none;">
<a class="close" data-dismiss="alert">×</a>
<? echo $edit_profile_success; ?>
</div>
<div class="container rightband">
<div class="row-fluid">
<div class="span3">
<div class="sidebar-nav">
<span style="text-align: center; display: block">
<a href="javascript:deleteAccount();" class="btn btn-primary btn-small" style="margin-top: 1em">
<? echo $deletemyaccount; ?>
</a><br>
<br>
<img src="./assets/includes/get.php?redirectUrl=https://envirocar.org/api/stable/users/<? echo $user; ?>/avatar?size=200&auth=true" style="height: 200px; width:200px; margin-right: auto; margin-left: auto;" alt="<? echo $user;?>"/>
<h2 id="username"></h2>
<br>
<h3>Badges</h3>
</span>
<ul id="badges" class="nav nav-list" style="text-align:center"></ul>
</div><!--/.well -->
</div><!--/span-->
<div class="span6">
<? echo $avatarGravatar ?> <a href="http://www.gravatar.com" target='_blank'>Gravatar</a><br>
<form id="changeProfileForm" action="javascript:submitProfileChanges();">
<div class="control-group">
<label class="control-label" for="mail"><?php echo $email;?></label>
<div class="controls">
<input id="mail" name="mail" type="email" class="input-block-level" placeholder="<? echo $email; ?>" required aria-invalid="true" data-validation-email-message="<?php echo $email_validation_message ?>">
</div>
</div>
<div class="control-group">
<label for="firstName"><? echo $firstname; ?></label>
<div class="controls">
<input id="firstName" name="firstName" type="text" class="input-block-level" placeholder="<? echo $firstname; ?>"/>
</div>
</div>
<div class="control-group">
<label for="lastName"><? echo $lastname; ?></label>
<div class="controls">
<input id="lastName" name="lastName" type="text" class="input-block-level" placeholder="<? echo $lastname; ?>"/>
</div>
</div>
<div class="control-group">
<label for="country"><? echo $country; ?></label>
<div class="controls">
<input id="country" name="country" type="text" class="input-block-level" placeholder="<? echo $country; ?>"/>
</div>
</div>
<div class="control-group">
<label for="dayOfBirth"><? echo $birthday; ?> (2000-12-31)</label>
<div class="controls">
<input data-validation-regex-message="<?php echo $date_validation_message ?>" data-validation-regex-regex="^(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$" id="dayOfBirth" name="dayOfBirth" type="text" class="input-block-level" placeholder="<? echo $birthday; ?>"/>
</div>
</div>
<div class="control-group">
<label for="gender"><? echo $gender; ?></label>
<div class="controls">
<select id="gender" name="gender" class="input-block-level">
<option value="m"><? echo $male ?></option>
<option value="f"><? echo $female ?></option>
</select>
</div>
</div>
<div class="control-group">
<label for="language"><? echo $language; ?></label>
<div class="controls">
<select id="language" name="language" class="input-block-level">
<option value="de-DE">Deutsch</option>
<option value="en-EN">English</option>
</select>
</div>
</div>
<hr />
<div><?php echo $password_change_info ?></div>
<div class="control-group">
<label for="oldPassword"><? echo $oldPassword; ?></label>
<div class="controls">
<input id="oldPassword" name="oldPassword" type="password" class="input-block-level" placeholder="<? echo $oldPassword; ?>"/>
</div>
</div>
<div class="control-group">
<label for="password"><? echo $newPassword; ?></label>
<div class="controls">
<input data-validation-minlength-message="<?php echo $password_validation_message ?>" minlength="6" id="password" name="password" type="password" class="input-block-level" placeholder="<? echo $newPassword; ?>"/>
</div>
</div>
<div class="control-group">
<label for="passwordRepeat"><? echo $passwordRepeat; ?></label>
<div class="controls">
<input data-validation-match-message="<?php echo $password_match_validation_message ?>" data-validation-match-match="password" id="passwordRepeat" name="passwordRepeat" type="password" class="input-block-level" placeholder="<? echo $passwordRepeat; ?>"/>
</div>
</div>
<input type="submit" class="btn btn-primary" value="<? echo $editaccount; ?>">
</form>
</div>
</div>
</div>
<?
include('footer.php');
?>