Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start(); //fixes something with headers
- include "config.php"; //include the config.php file to get the main data
- /*
- Basic PHP Usersystem system coded by m0nsta.
- www.mark-eriksson.com
- www.forum.ragezone.com/f282
- www.clubhabboforum.net
- */
- if(isset($_GET['id'])){ //a user id has been set in the url
- $id = clean($_GET['id']); //remove any bad content from the users id
- if(!userExists($id)){ //the user does not exist
- $title = 'User does not exist';
- }else{ //user exists
- $title = userRow($id, 'username'); //get their username
- }
- }else{
- $title = 'User does not exist';
- }
- ?>
- <html>
- <head>
- <title><?php echo $site[title]; ?> - View Profile: <?php echo $title; ?></title>
- <style type="text/css">
- body {
- margin: 0 auto;
- background-color: white;
- }
- div#container {
- width: 650px;
- margin: 0 auto;
- }
- body, input, select, textarea {
- font-family: Verdana;
- font-size: 11px;
- color: black;
- padding: 3px;
- }
- div#content {
- width: 650px;
- border: 1px solid black;
- border-bottom: 2px solid black;
- -moz-border-radius: 3px;
- padding: 4px;
- }
- a {
- color: inherit;
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- font-weight: bold;
- }
- label {
- cursor: pointer;
- font-weight: bold;
- }
- th {
- font-weight: bold;
- padding: 8px;
- background-color: #e6e6e6;
- }
- td {
- padding: 4px;
- background-color: #f5f5f5;
- }
- td, th {
- border: 1px solid black;
- }
- </style>
- </head>
- <body>
- <div id="container">
- <h2><center><?php echo $site[title]; ?> - View Profile: <?php echo $title; ?></center></h2>
- <center><a href="index.php">Go Home</a></center>
- <div id="content">
- <?php
- if($in["username"]){ //check if logged in
- if(userExists($id)){ //the user exists
- echo '<h3>'.userRow($id, 'username').'\'s Profile</h3>';
- echo '<fieldset><legend><strong>User Details</strong></legend>
- <p>
- <label>Username</label><br>
- '.userRow($id, 'username').'
- </p>
- <p>
- <label>User ID</label><br>
- '.userRow($id, 'id').'
- </p>
- <p>
- <label>E-mail</label><br>
- '.userRow($id, 'email').'
- </p>
- <p>
- <label>Rank</label><br>
- '.userRow($id, 'rank').'
- </p>
- <p>
- <label>Join Date</label><br>
- '.userRow($id, 'joindate').'
- </p>
- </fieldset>';
- }else{ //user does not exist
- echo 'This user does not exist!<br><br>« <a href="index.php">Home</a>';
- }
- }else{ //they are not logged in
- echo 'You are not logged in! Therefore you can not view this profile.<br><br>« <a href="index.php">Home</a>';
- }
- ?>
- </div>
- <?php echo $site[copyright]; ?>
- </div>
- </div>
- <?php
- ob_flush(); //fixes something with headers
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement