Advertisement
Guest User

account.php

a guest
Oct 31st, 2017
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.16 KB | None | 0 0
  1. <?php
  2. /*
  3. UserSpice 4
  4. An Open Source PHP User Management System
  5. by the UserSpice Team at http://UserSpice.com
  6.  
  7. This program is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation, either version 3 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. ?>
  21. <?php require_once 'init.php'; ?>
  22. <?php require_once $abs_us_root.$us_url_root.'users/includes/header.php'; ?>
  23. <?php require_once $abs_us_root.$us_url_root.'users/includes/navigation.php'; ?>
  24.  
  25. <?php if (!securePage($_SERVER['PHP_SELF'])){die();}?>
  26. <?php
  27.  
  28. //dealing with if the user is logged in
  29. if($user->isLoggedIn() || !$user->isLoggedIn() && !checkMenu(2,$user->data()->id)){
  30.     if (($settings->site_offline==1) && (!in_array($user->data()->id, $master_account)) && ($currentPage != 'login.php') && ($currentPage != 'maintenance.php')){
  31.         $user->logout();
  32.         Redirect::to($us_url_root.'users/maintenance.php');
  33.     }
  34. }
  35. $grav = get_gravatar(strtolower(trim($user->data()->email)));
  36. $get_info_id = $user->data()->id;
  37. // $groupname = ucfirst($loggedInUser->title);
  38. $raw = date_parse($user->data()->join_date);
  39. $signupdate = $raw['month']."/".$raw['day']."/".$raw['year'];
  40. $userdetails = fetchUserDetails(NULL, NULL, $get_info_id); //Fetch user details
  41.  ?>
  42.  
  43. <div id="page-wrapper">
  44. <div class="container">
  45. <div class="well">
  46. <div class="row">
  47.     <div class="col-xs-12 col-md-3">
  48.         <p><img src="<?=$grav; ?>" class="img-thumbnail" alt="Generic placeholder thumbnail"></p>
  49.         <p><a href="user_settings.php" class="btn btn-primary">Edit Account Info</a></p>
  50.         <p><a class="btn btn-primary " href="profile.php?id=<?=$get_info_id;?>" role="button">Public Profile</a></p>
  51.  
  52.     </div>
  53.     <div class="col-xs-12 col-md-9">
  54.         <h1><?=ucfirst($user->data()->username)?></h1>
  55.         <p><?=ucfirst($user->data()->fname)." ".ucfirst($user->data()->lname)?></p>
  56.         <p>Company:<?=ucfirst($user->data()->company)?></p>
  57.         <p>Address:<?=ucfirst($user->data()->address)?></p>
  58.         <p>Phone:<?=ucfirst($user->data()->phone)?></p>
  59.         <p>Rol:<?php getRoles(1);?></p>
  60.         <p>Member Since:<?=$signupdate?></p>
  61.         <p>Number of Logins: <?=$user->data()->logins?></p>
  62.         <p>This is the private account page for your users. It can be whatever you want it to be; This code serves as a guide on how to use some of the built-in UserSpice functionality. </p>
  63.  
  64.     </div>
  65. </div>
  66. </div>
  67.  
  68. </div> <!-- /container -->
  69.  
  70. </div> <!-- /#page-wrapper -->
  71.  
  72. <!-- footers -->
  73. <?php require_once $abs_us_root.$us_url_root.'users/includes/page_footer.php'; // the final html footer copyright row + the external js calls ?>
  74.  
  75. <!-- Place any per-page javascript here -->
  76.  
  77. <?php require_once $abs_us_root.$us_url_root.'users/includes/html_footer.php'; // currently just the closing /body and /html ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement