YaWK  24.1
Yet another WebKit
user-edit.php
Go to the documentation of this file.
1 <?php
2 
3 use YAWK\alert;
4 use YAWK\backend;
5 use YAWK\db;
6 use YAWK\language;
7 use YAWK\user;
8 
9 /** @var $db db */
10 /** @var $lang language */
11 if (!isset($user))
12 { // no username obj is set
13  if (isset($_GET['user']))
14  { // create new user obj
15  $user = new user($db);
16  // load properties for given user
17  $user->loadProperties($db, $_GET['user']);
18  }
19 }
20 else
21 { // obj is set
22  if (isset($_GET['user']))
23  { // user var is set,
24  // load user properties
25  $user->loadProperties($db, $_GET['user']);
26  }
27 }
28 
29 // if SAVE is clicked
30 if(isset($_POST['save']))
31 { // prepare username
32  $user->username = trim($user->username);
33  $user->username = strip_tags($_POST['username']);
34  if (isset($_FILES['userpicture']) && (!empty($_FILES['userpicture']['name'])))
35  { // if a user image is set,
36  // check file extension...
37  $file_ext = substr($_FILES['userpicture']['name'], 0, -4); // get the last 3 chars
38  if ($file_ext == ".jpg") {
39  $ext = 'jpg';
40  }
41  elseif ($file_ext == "jpeg") {
42  $ext = 'jpg';
43  }
44  elseif ($file_ext == ".gif") {
45  $ext = 'gif';
46  }
47  elseif ($file_ext == "png") {
48  $ext = 'png';
49  }
50 
51  // SET USER IMAGE UPLOAD SETTINGS
52  $target_dir = "../media/images/users/";
53  $target_file = $target_dir . basename("$user->username.jpg");
54  $uploadOk = 1;
55  // Check if image file is a actual image or fake image
56  if(isset($_POST["submit"]))
57  { // if user image form is sent
58  $check = getimagesize($_FILES["userpicture"]["tmp_name"]);
59  if($check !== false)
60  { // throw info
61  // echo "File is an image - " . $check["mime"] . ".";
62  // upload good
63  $uploadOk = 1;
64  }
65  else
66  { // throw error
67  // echo "File is not an image.";
68  $uploadOk = 0;
69  }
70  }
71  // Check if file already exists
72  /*
73  if (file_exists($target_file)) {
74  echo "Sorry, file already exists.";
75  $uploadOk = 0;
76  }
77  */
78  // Check file size
79  if ($_FILES["userpicture"]["size"] > 2560000) {
80  echo alert::draw("warning", "$lang[ERROR]", "$lang[FILE_UPLOAD_TOO_LARGE]","page=users","4800");
81  $uploadOk = 0;
82  }
83 
84  // Allow certain file formats
85  $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
86  if($imageFileType != "jpg" && $imageFileType != "jpeg" && $imageFileType != "png" && $imageFileType != "gif") {
87  echo alert::draw("warning", "$lang[ERROR]", "$lang[UPLOAD_ONLY_IMG_ALLOWED]","page=users","4800");
88  $uploadOk = 0;
89  }
90 
91  // Check if $uploadOk is set to 0 by an error
92  if ($uploadOk == 0)
93  {
94  echo alert::draw("danger", "$lang[ERROR]", "$lang[FILE_UPLOAD_FAILED]","page=users","4800");
95  // if everything is ok, try to upload file
96  }
97  else
98  {
99  if (!move_uploaded_file($_FILES["userpicture"]["tmp_name"], $target_file))
100  {
101  echo alert::draw("danger", "$lang[ERROR]", "$lang[FILE_UPLOAD_ERROR_CHMOD]","page=users","4800");
102  }
103  }
104  }
105  // prepare password
106  $password1 = htmlentities($_POST['password1']);
107  $password2 = htmlentities($_POST['password2']);
108  // check, if passwords match
109  if ($password1 == $password2) {
110  $password_check = $password1;
111  // vermeidung von doppelter md5 kodierung
112  if ($res = $db->query("SELECT password FROM {users} WHERE username='".$_GET['user']."'"))
113  {
114  $row = mysqli_fetch_row($res);
115  // wenn pwd gleich wie db, dann db wert
116  if ($row[0] == $password_check)
117  { // do not change password
118  $user->password = $row[0];
119  }
120  else
121  { // set new user password
122  $user->password = md5($password1);
123  }
124 
125  // if no templateID was sent, set default template (id: 1) which should always be loadable
126  if (empty($_POST['templateID'])) { $_POST['templateID'] = 1; }
127  // if override template was not sent, set default value (0) which means user is not able to override tpl
128  if (empty($_POST['overrideTemplate'])) { $_POST['overrideTemplate'] = 0; }
129 
130  // prepare vars
131  $user->username = htmlentities($_POST['username']);
132  $user->email = htmlentities($_POST['email']);
133  $user->url = htmlentities($_POST['url']);
134  $user->twitter = htmlentities($_POST['twitter']);
135  $user->facebook = htmlentities($_POST['facebook']);
136  $user->firstname = htmlentities($_POST['firstname']);
137  $user->lastname = htmlentities($_POST['lastname']);
138  $user->street = htmlentities($_POST['street']);
139  $user->zipcode = htmlentities($_POST['zipcode']);
140  $user->city = htmlentities($_POST['city']);
141  $user->country = htmlentities($_POST['country']);
142  $user->job = htmlentities($_POST['job']);
143  $user->templateID = htmlentities($_POST['templateID']);
144  $user->overrideTemplate = htmlentities($_POST['overrideTemplate']);
145  $user->gid = htmlentities($_POST['gid']);
146 
147  if (!isset($_POST['privacy']) OR (empty($_POST['privacy'])))
148  {
149  $_POST['privacy'] = 0;
150  }
151  if (!isset($_POST['mystatus']) OR (empty($_POST['mystatus'])))
152  {
153  $_POST['mystatus'] = 0;
154  }
155  $user->privacy=$db->quote($_POST['privacy']);
156  $user->blocked=$db->quote($_POST['mystatus']);
157  // save user
158  $user->save($db);
159  }
160  }
161 } //. end if isset [SAVE]
162 
163 // TEMPLATE WRAPPER - HEADER & breadcrumbs
164 echo "
165 <!-- Content Wrapper. Contains page content -->
166 <div class=\"content-wrapper\" id=\"content-FX\">
167  <!-- Content Header (Page header) -->
168  <section class=\"content-header\">";
169 /* draw Title on top */
170 echo backend::getTitle($lang['USER_PROFILE_EDIT'], $_GET['user']);
171 echo"<ol class=\"breadcrumb\">
172  <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
173  <li><a href=\"index.php?page=users\" title=\"$lang[USERS]\"> $lang[USERS]</a></li>
174  <li class=\"active\"><a href=\"index.php?page=user-edit&user=$_GET[user]\" title=\"$lang[EDIT]: $_GET[user]\"> $_GET[user]</a></li>
175  </ol>
176  </section>
177  <!-- Main content -->
178  <section class=\"content\">";
179 
180 echo "<script type='text/javascript'>
181 
182  function followUser(uid, hunted, user) {
183  // alert(uid);
184  $.ajax({ // do ajax request
185  url:'js/follow-user.php',
186  type:'post',
187  // data:'name='+name+'&comment='+comment+'&id='+id,
188  data:'uid='+uid+'&hunted='+hunted+'&user='+user,
189  success:function(data){
190  if(! data ){
191  alert('Something went wrong!');
192  return false;
193  }
194  else {
195 
196  $(data).hide().appendTo('#followBtn');
197  $('#followBtn').hide()
198  $('#unfollowBtn').fadeIn(800);
199  }
200  }
201  });
202  }
203 
204  function unfollowUser(uid, hunted, user) {
205  // alert(uid);
206  $.ajax({ // do ajax request
207  url:'js/follow-user.php',
208  type:'post',
209  // data:'name='+name+'&comment='+comment+'&id='+id,
210  data:'uid='+uid+'&hunted='+hunted+'&user='+user,
211  success:function(data){
212  if(! data ){
213  alert('Something went wrong!');
214  return false;
215  }
216  else {
217  $(data).hide().prependTo('#followBtn');
218  $('#unfollowBtn').hide(800);
219  $('#followBtn').show();
220  }
221  }
222  });
223  }
224 
225  function friendUser(uid, hunted, user) {
226  // alert(uid);
227  $.ajax({ // do ajax request
228  url:'js/friend-user.php',
229  type:'post',
230  // data:'name='+name+'&comment='+comment+'&id='+id,
231  data:'uid='+uid+'&hunted='+hunted+'&user='+user,
232  success:function(data){
233  if(! data ){
234  alert('Something went wrong!');
235  return false;
236  }
237  else {
238 
239  $(data).hide().prependTo('#friendBtn');
240  $('#friendBtn').hide()
241  $('#confirmBtn').fadeIn(800);
242 
243  }
244  }
245  });
246  }
247 
248  function unfriendUser(uid, hunted, user) {
249  // alert(uid);
250  $.ajax({ // do ajax request
251  url:'js/unfriend-user.php',
252  type:'post',
253  // data:'name='+name+'&comment='+comment+'&id='+id,
254  data:'uid='+uid+'&hunted='+hunted+'&user='+user,
255  success:function(data){
256  if(! data ){
257  alert('Something went wrong!');
258  return false;
259  }
260  else {
261  $(data).hide().prependTo('#friendBtn');
262  $('#unfriendBtn').hide(800);
263  $('#friendBtn').show();
264  }
265  }
266  });
267  }
268 
269  </script>";
270 ?>
271 
272 <!-- FORM -->
273 <form name="form" enctype="multipart/form-data" class="form" action="index.php?page=user-edit&user=<?php echo $user->username; ?>" method="post">
274  <input name="save" id="savebutton" type="submit" class="btn btn-success pull-right" value="speichern" />
275  <a class="btn btn-default pull-right" href="index.php?page=users">zur&uuml;ck</a>
276  <div class="row">
277  <div class="col-md-4">
278  <!-- Profile Image -->
279  <div class="box box-default">
280  <div class="box-body box-profile">
281  <?php echo user::getUserImage("backend","$user->username", "profile-user-img img-responsive img-circle", '140', '140'); ?>
282 
283  <h3 class="profile-username text-center"><?php echo backend::getFullUsername($user); ?></h3>
284 
285  <p class="text-muted text-center"><?php echo user::getGroupNameFromID($db, $user->gid); if (!empty($user->job)) echo " & $user->job"; ?><br>Member since <?php $date = \YAWK\sys::splitDateShort($user->date_created);
286  echo "<small>($date[month], $date[day] $date[year], $date[time])</small>"; ?></p>
287 
288  <ul class="list-group list-group-unbordered">
289  <li class="list-group-item">
290  <?php
291  // count user friends
292  $i_followers = user::countMyFollowers($db, $user->id);
293  if ($i_followers > 0)
294  {
295  $followersLink = "<a href=\"index.php?page=list-follower&uid=$user->id\">$lang[FOLLOWERS]</a>";
296  }
297  else
298  {
299  $followersLink = "$lang[FOLLOWER]";
300  }
301  ?>
302  <b><?php echo $followersLink; ?></b> <a class="pull-right"><?php echo $i_followers ?></a>
303  </li>
304  <li class="list-group-item">
305  <b>Likes</b> <a class="pull-right"><?php echo $user->likes; ?></a>
306  </li>
307  <li class="list-group-item">
308  <b>
309  <?php
310  // count user friends
311  $i_friends = user::countMyFriends($db, $user->id);
312  if ($i_friends > 0)
313  {
314  $friendlistLink = "<a href=\"index.php?page=friendslist&uid=$user->id\">$lang[FRIENDS]</a>";
315  }
316  else
317  {
318  $friendlistLink = "$lang[FRIENDS]";
319  }
320  ?>
321  <b><?php echo $friendlistLink; ?></b> <a class="pull-right"><?php echo $i_friends ?></a>
322  </li>
323  </ul>
324 
325  <?php
326  // to display the follow/like/friendship buttons correctly,
327  // we need to detect, if the current profile's user is equal
328  // to the current, logged in user (admin) uid
329  $follow_status = user::checkFollowStatus($db, $_SESSION['uid'], $user->id);
330  $isFriend = user::isFriend($db, $_SESSION['uid'], $user->id);
331  $friends = user::isFriendRequested($db, $_SESSION['uid'], $user->id);
332 
333  if ($follow_status === true)
334  {
335  $followBtn = "<a href=\"#\" id=\"unfollowBtn\" title=\"click to un-follow\" onclick=\"unfollowUser($_SESSION[uid], $user->id, '$user->username' )\" name=\"unfollowUser\" class=\"btn btn-success btn-block\"><b>$lang[YOU_FOLLOW] $user->username </b></a>";
336  }
337  else
338  { // avoid to show follow button to yourself
339  if ($_SESSION['uid'] != ($user->id))
340  { // follow request btn
341  $followBtn = "<a href=\"#\" id=\"followBtn\" onclick=\"followUser($_SESSION[uid], $user->id, '$user->username')\" name=\"followUser\" class=\"btn btn-primary btn-block\"><b>$lang[FOLLOW_ME]</b></a>";
342  }
343  else
344  {
345  $followBtn = $lang['FOLLOW_YOURSELF_FAIL'].'<br>';
346  }
347  }
348  echo $followBtn;
349 
350  if ($isFriend === true)
351  {
352  $friendBtn = "<button id=\"unfriendBtn\" title=\"$lang[YOU_ARE_FRIENDS]\" class=\"btn btn-success btn-block\"><b>$lang[YOU_ARE_FRIEND_WITH] $user->username </b></button>";
353  }
354  else
355  { // avoid to show friend request button to yourself
356  if ($_SESSION['uid'] != ($user->id))
357  { // friend request btn
358  $friendBtn = "<a href=\"#\" id=\"friendBtn\" onclick=\"friendUser($_SESSION[uid], $user->id, '$user->username')\" name=\"friendUser\" class=\"btn btn-primary btn-block\"><b>$lang[ASK_FOR_MY_FRIENDSHIP]</b></a>";
359  }
360  else
361  {
362  $friendBtn = $lang['FRIENDSHIP_SELF_FAIL'];
363  }
364  }
365 
366  foreach ($friends as $friend)
367  {
368  if ($_SESSION['uid'] == $friend['friendA'])
369  {
370  $btnText = "$lang[FRIEND_REQUEST_SENT_TO] $user->username";
371  }
372  elseif ($_SESSION['uid'] == $friend['friendB'])
373  {
374  $btnText = "$lang[FRIEND_REQUEST_SENT_TO] $user->username";
375  }
376 
377  if ($friend['confirmed'] == 0)
378  {
379  $friendBtn = "<a href=\"#\" id=\"confirmBtn\" title=\"$lang[FRIEND_AWAITING_RESPONSE] $user->username\" name=\"unfriendUser\" class=\"btn btn-warning btn-block\"><b>$btnText</b></a>";
380  }
381  if ($friend['aborted'] == 1)
382  {
383  $btnText = "$user->username $lang[DECLINED_FRIEND_REQUEST]";
384  $friendBtn = "<button id=\"blockedBtn\" title=\"$lang[ABORTED]\" class=\"btn btn-danger btn-block\"><b>$btnText</b></button>";
385  $friendBtn .= "<a id=\"askBtn\" class=\"btn btn-default btn-block\" title=\"$user->username $lang[FRIENDSHIP_REJECTED]\" style=\"display: none;\" href=\"index.php?plugin=messages&pluginpage=mailbox&active=compose&to=$user->username\"><b>$lang[ASK_WHY_REJECTED]</b></a>";
386  }
387  }
388 
389  echo $friendBtn;
390 
391  // follow btn
392  echo "<a href=\"#\" id=\"followBtn\" onclick=\"followUser($_SESSION[uid], $user->id, '$user->username')\" style=\"display:none;\" name=\"followUser\" class=\"btn btn-primary btn-block\"><b>$lang[FOLLOW_ME]</b></a>";
393  // un - follow btn
394  echo "<a href=\"#\" id=\"unfollowBtn\" onclick=\"unfollowUser($_SESSION[uid], $user->id, '$user->username' )\" style=\"display: none;\" name=\"unfollowUser\" class=\"btn btn-success btn-block\"><b>$lang[YOU_FOLLOW] $user->username </b></a>";
395  // avoid to show yourself friend request btn
396  if ($_SESSION['uid'] != ($user->id))
397  { // friend request button
398  echo "<a href=\"#\" id=\"friendBtn\" onclick=\"friendUser($_SESSION[uid], $user->id, '$user->username')\" style=\"display:none;\" name=\"friendUser\" class=\"btn btn-primary btn-block\"><b>$lang[ASK_FOR_MY_FRIENDSHIP]</b></a>";
399  }
400  // unfriend btn
401  echo "<a href=\"#\" id=\"unfriendBtn\" title=\"You are friends!\" style=\"display:none;\" class=\"btn btn-success btn-block\"><b>$lang[YOU_ARE_FRIEND_WITH] $user->username </b></a>";
402  // confirm btn
403  echo "<a href=\"#\" id=\"confirmBtn\" title=\"click to un-friend\" style=\"display:none;\" name=\"unfriendUser\" class=\"btn btn-warning btn-block\"><b>$lang[REQUEST_HAS_BEEN_SENT] $user->username </b></a>";
404 
405  ?>
406 
407  <!-- <a href="#" id="likeUser" class="btn btn-primary btn-block"><b>Like me</b></a>-->
408  <!-- <a href="#" id="requestFriendship" class="btn btn-primary btn-block"><b>Ask for my friendship</b></a> -->
409  </div>
410  <!-- /.box-body -->
411  </div>
412  <!-- /.box -->
413 
414  <?php // if ($user->gid <= 5) { ?>
415 
416  <div class="box box-default">
417  <div class="box-body">
418  <label><?php echo $lang['ASSIGN_TO_GROUP']; ?>
419  <select name="gid" style="width: 240px;" class="form-control">
420  <option value="<?php echo $user->gid; ?>"><?php echo $user->getGroupNameFromID($db, $user->gid); ?></option>
421  <option value="1">---</option>
422  <?php
423  foreach(YAWK\sys::getGroups($db, "users") as $role){
424 
425  echo "<option value=\"".$role['id']."\"";
426  echo ">".$role['value']."</option>";
427  }
428  ?>
429  </select>
430  </label>
431 
432  <label for="job"><?php echo $lang['JOB_DESCRIPTION']; ?><input type="text" id="job" name="job" value="<?php echo $user->job; ?>" placeholder="<?php echo $lang['JOB_PLACEHOLDER']; ?>" class="form-control"></label>
433  <?php if ($user->blocked === '1') { $code1="checked=\"checked\""; } else $code1=""; ?>
434  <?php if ($user->privacy === '1') { $code2="checked=\"checked\""; } else $code2=""; ?>
435 
436  <label for="mystatus"><input type="checkbox" id="mystatus" name="mystatus" value="1" <?php echo $code1 ?>> <?php echo $lang['LOGIN_LOCK']; ?></label>&nbsp;&nbsp;&nbsp;&nbsp;
437  <label for="privacy"><input type="checkbox" id="privacy" name="privacy" value="1" <?php echo $code2 ?>> <?php echo $lang['HIDE_FROM_WHOIS_ONLINE']; ?></label>&nbsp;
438 
439  </div>
440  </div>
441 
442  <!-- ##### TEMPLATE OVERRIDE SETTINGS ##### -->
443  <div class="box box-default">
444  <div class="box-header with-border">
445  <h3 class="box-title"><i class="fa fa-cube"></i> <?php echo "$lang[TPL] <small>$lang[TPL_USER_DEFINED]</small>"; ?></h3>
446  </div>
447  <div class="box-body">
448  <label for="templateID"><?php echo $lang['TPL']." ".$lang['ID']; ?>
449  <input type="text" style="width:75px;" id="templateID" name="templateID" value="<?php echo $user->templateID; ?>" placeholder="<?php echo $lang['ID']; ?>" class="form-control">
450  </label>
451  <label for="overrideTemplate"><?php echo $lang['TPL_ALLOW_OVERRIDE']; ?>
452  <select id="overrideTemplate" name="overrideTemplate" class="form-control">
453  <?php
454  if ($user->overrideTemplate == 1)
455  {
456  echo '<option value="1" selected>'.$lang['ALLOWED'].'</option>';
457  echo '<option value="0">'.$lang['FORBIDDEN'].'</option>';
458  }
459  else {
460  echo '<option value="0" selected>'.$lang['FORBIDDEN'].'</option>';
461  echo '<option value="1">'.$lang['ALLOWED'].'</option>';
462 
463  }
464  ?>
465  </select>
466  </label>
467  </div>
468  </div>
469 
470 
471  <!-- ##### USER PIC UPLOAD ##### -->
472  <div class="box box-default">
473  <div class="box-header with-border">
474  <h3 class="box-title"><i class="fa fa-photo"></i> <?php echo "$lang[YOUR_PHOTO] <small>$lang[UPLOAD_A_NEW_PIC]</small>"; ?></h3>
475  </div>
476  <div class="box-body">
477  <?php echo YAWK\user::getUserImage("backend","$user->username", "img-circle", 140, 140); ?>
478  <input type="file" class="btn btn-warning" name="userpicture" id="userpicture">
479  </div>
480  </div>
481 
482  </div>
483 
484  <div class="col-md-8">
485  <br>
486  <div class="box box-default">
487  <div class="box-header with-border">
488  <h3 class="box-title"><?php echo "$lang[USER_DATA] <small>$lang[USERNAME_EMAIL_PWD]</small>"; ?></h3>
489  </div>
490  <div class="box-body">
491  <?php if ($user->username === "admin" OR $user->username === "root")
492  {
493  $disabled="title=\"$user->username $lang[NOT_CHANGEABLE]\" readonly=\"readonly\"";
494  }
495  else
496  {
497  $disabled="";
498  }
499  ?>
500 
501  <dl class="dl-horizontal">
502  <dt><label for="username"><b class="fa fa-user"></b> &nbsp;<?php echo $lang['USERNAME']; ?></label></dt>
503  <dd><input type="text" id="username" name="username" class="form-control" maxlength="100" <?php echo $disabled; ?> value="<?php echo $user->username; ?>"></dd>
504 
505  <dt><label for="email"><b class="fa fa-envelope-o"></b> &nbsp;<?php echo $lang['EMAIL']; ?></label></dt>
506  <dd><input type="text" id="email" name="email" class="form-control" maxlength="100" value="<?php echo $user->email; ?>"></dd>
507 
508  <dt><label for="password1"><b class="fa fa-key"></b> &nbsp;<?php echo $lang['PASSWORD']; ?></label></dt>
509  <dd><input name="password1" id="password1" type="password" class="form-control" maxlength="100" value="<?php echo $user->password; ?>"></dd>
510 
511  <dt><label for="password2"><b class="fa fa-key"></b> &nbsp;<?php echo $lang['PASSWORD']; ?><br><small><?php echo $lang['REPEAT']; ?></small></label></dt>
512  <dd><input name="password2" id="password2" type="password" class="form-control"maxlength="100" value="<?php echo $user->password; ?>">&nbsp; </dd>
513  </dl>
514 
515  </div>
516  </div>
517 
518  <!-- OPTIONAL USER SETTINGS -->
519  <div class="box box-default">
520  <div class="box-header with-border">
521  <h3 class="box-title"><i class="fa fa-home"></i> <?php echo "$lang[OPTIONAL_PERSONAL_DATA] <small>$lang[FIRSTNAME_LASTNAME_ADDRESS]"; ?></small></h3>
522  </div>
523  <div class="box-body">
524  <dl class="dl-horizontal">
525  <dt><label for="firstname"><?php echo $lang['FIRSTNAME']; ?></label></dt>
526  <dd><input type="text" class="form-control" id="firstname" name="firstname" maxlength="100" value="<?php echo $user->firstname; ?>"></dd>
527 
528  <dt><label for="lastname"><?php echo $lang['LASTNAME']; ?></label></dt>
529  <dd><input type="text" class="form-control" id="lastname" name="lastname" maxlength="100" value="<?php echo $user->lastname; ?>"></dd>
530 
531  <dt><label for="street"><?php echo $lang['STREET']; ?></label></dt>
532  <dd><input type="text" class="form-control" id="street" name="street" maxlength="100" value="<?php echo $user->street; ?>"></dd>
533 
534  <dt><label for="zipcode"><?php echo $lang['ZIPCODE']; ?></label></dt>
535  <dd><input type="text" class="form-control" id="zipcode" name="zipcode" maxlength="12" value="<?php echo $user->zipcode; ?>"></dd>
536 
537  <dt><label for="city"><?php echo $lang['CITY']; ?></label></dt>
538  <dd><input type="text" class="form-control" id="city" name="city" maxlength="100" value="<?php echo $user->city; ?>"></dd>
539 
540  <dt><label for="country"><?php echo $lang['COUNTRY']; ?></label></dt>
541  <dd><input type="text" class="form-control" id="country" name="country" maxlength="100" value="<?php echo $user->country; ?>"></dd>
542  </dl>
543  </div>
544  </div>
545 
546  <!-- SOCIAL MEDIA USER SETTINGS -->
547  <div class="box box-default">
548  <div class="box-header with-border">
549  <h3 class="box-title"><i class="fa fa-facebook-official"></i> <?php echo "$lang[SOCIAL_MEDIA_LINKS] <small>$lang[WEBSITE], $lang[TWITTER], $lang[FACEBOOK]</small>"; ?></h3>
550  </div>
551  <div class="box-body">
552  <dl class="dl-horizontal">
553  <dt><label for="url"><i class="fa fa-globe"></i> <?php echo "$lang[WEBSITE]"; ?></label></dt>
554  <dd><input type="text" class="form-control" placeholder="http://www.yourdomain.com/" id="url" name="url" maxlength="100" value="<?php echo $user->url; ?>"></dd>
555 
556  <dt><label for="twitter"><i class="fa fa-twitter"></i> <?php echo "$lang[TWITTER]"; ?></label></dt>
557  <dd><input type="text" class="form-control" placeholder="http://www.twitter.com/yourprofile" id="twitter" name="twitter" maxlength="100" value="<?php echo $user->twitter; ?>"></dd>
558 
559  <dt><label for="facebook"><i class="fa fa-facebook-official"></i> <?php echo "$lang[FACEBOOK]"; ?></label></dt>
560  <dd><input type="text" class="form-control" placeholder="http://www.facebook.com/yourprofile" id="facebook" name="facebook" maxlength="100" value="<?php echo $user->facebook; ?>"></dd>
561  </dl>
562 
563  </div>
564  </div>
565  </div>
566  </div>
567 </form>
print $lang['FILEMAN_UPLOAD']
Throws a fancy Bootstrap Alert (success, info, warning or danger)
Definition: alert.php:19
Backend class serves a few useful functions for the admin backend.
Definition: backend.php:27
Mysqli database class; returns db connection object.
Definition: db.php:16
The language class - support multilingual backend.
Definition: language.php:17
static splitDateShort($date)
split a date to month, day, year and time this is the same as splitDate() but keep the months short
Definition: sys.php:1572
The default user class. Provide all functions to handle the user object.
Definition: user.php:17
static getUserImage($location, $user, $cssClass, $w, $h)
return and output user image
Definition: user.php:1079
$friend
function b(a)
Definition: browser.js:14
function a
Definition: browser.js:14
type
Definition: menu-new.php:35
This class serves methods to create backup from files.
Definition: AdminLTE.php:2
print $_GET['id']
Definition: page-edit.php:357
function i(e, t)
Definition: plyr.js:1
function p(e)
Definition: plyr.js:1
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp
$template name
$i_friends
Definition: user-edit.php:311
if($user->blocked==='1') else $code1
Definition: user-edit.php:433
$date
Definition: user-edit.php:285
$i_followers
Definition: user-edit.php:292
if($user->privacy==='1') else $code2
Definition: user-edit.php:434
$isFriend
Definition: user-edit.php:330
$friends
Definition: user-edit.php:331
$password2
Definition: user-new.php:93
$password1
Definition: user-new.php:92