Here I am writing user profiles from scratch (user details) and logging efforts here. This aims to be a full social profile system offering bio, comments, friends list, uploads, bookmarks, widgets, active transfers, and much more!

Logging progress as I tie into my user class and pull user data and perform on-the-fly AJAX field updating (edit profile), photos and comments, & torrent ratings. This will offer a spawn of code to replace the entire comment system by using AJAX developed first for profiles, effectively and finally, killing off the old TT comments out (last of the few chunks of V3 code nested throughout a clean system of code).

Here, we are simply plugging a query into the user class with a "getter" function viewUsers() by determining permissions with this query:

SELECT *, u.username FROM groups g LEFT JOIN users u ON u.class = g.group_id;


Now we use "Edit in Place" jquery plugin, that allows for on-the-fly field editing and updating in place. All mouse-over and click events as the photo below.


<!-- jQuery-inlineEdit-0.2.1 -->
   <script type="text/javascript" src="/js/jquery-inlineedit-0.2.1/jquery.inlineEdit.js"></script>

   <style type="text/css">
       .hover { background-color: #ffC }
       .inlineEdit-placeholder { font-style: italic; color: #555; }
   </style>

   <script>
       $(function () {}); $('.editable2').inlineEdit();
   </script>


We simply assign the class .editable2 to any body element of our choice, like a div

[ATTACH type="full" alt="editinplace.png"]5969[/ATTACH]

ajax_profile_live_update.php

<?
// Profile Bio : Live-Edit - Nov 22, 2020
// GET: retrieve profile bio
// Save: Update database with edited in-place field value
require_once 'dbConfig.php';
try {
   $conn = new PDO("mysql:host={$dbHost};dbname={$dbName};charset=utf8", $dbUsername, $dbPassword);
   $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
   $conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
}
catch (PDOException $e) {
   die('Unable to connect to database');
}
error_reporting(0);
$action  = isset($_POST) && $_POST['action'] ? $_POST['action'] : 'get';
$value   = isset($_POST) && $_POST['value'] ? $_POST['value'] : '';
$user_id = intval($_GET['id']);
$stmt    = $conn->prepare('SELECT * FROM users WHERE user_id = :user_id');
$stmt->bindParam(':user_id', $user_id, PDO::PARAM_INT);
$stmt->execute();
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($data as $row) {
   $field_bio  = $row['profile_bio'];
}
switch ($action) {
   case 'get':
       echo $field_bio;
       break;
   case 'save':
       if ($value != '') {
           $stmt = $conn->prepare('UPDATE users SET profile_bio = :post_data WHERE user_id = :user_id');
           $stmt->bindParam(':post_data', $value, PDO::PARAM_STR);
           $stmt->bindParam(':user_id', $user_id, PDO::PARAM_INT);
           $stmt->execute();
           echo "OK";
       } else {
           echo "ERROR: no value received.";
       }
       break;
   default:
       echo "ERROR: no action specified.";
       break;
}



user.php

<?
if (session_status() == PHP_SESSION_NONE) { session_start(); }
 
// New rewritten user profiles/details - Nov 21, 2020

require_once '../site.php';
$db->connect();

site_header();

error_reporting(0); // Debug

if ($account->sessionLogin()) {

// User fields - $user
$r = $db->query_params('SELECT * FROM users WHERE user_id = :id', array('id' => intval($_GET['id'])));
$user = $r->fetch() or die('<h1 itemprop="name"><span class="card-title">User not found.</span></h1>');

// Log location
if ($account->getId() != $user['user_id']) {
   $db->query_params("UPDATE users SET page = 'Viewing Users Profile', last_access = NOW() WHERE user_id = :user_id", array('user_id' => $account->getId()));
}elseif ($account->getId() == $user['user_id']) {
   $db->query_params("UPDATE users SET page = 'Viewing Their Profile', last_access = NOW() WHERE user_id = :user_id", array('user_id' => $account->getId()));
}

// Post comment - Nov 22, 2020
if ($_SERVER['REQUEST_METHOD'] === 'POST' && array_key_exists('profile', $_POST)) {
csrf_html();

   if (!array_key_exists('profile', $_POST)) {
       die;
   }
 
   $body = html_escape($_POST['profile']);
   $id = $_GET['id'];
   if (strlen($body) > 500) {
       die('Comment too long.');
   }
 
   if (strlen($body) < 5) {
       die('Comment too short.');
   }

   $postcomment = $db->query_params("INSERT INTO comments (user, userprofile, added, text) VALUES (:current_user, :user_id, now(), :body)", array('current_user' => $account->getId(), 'user_id' => $user['user_id'], 'body' => $body));
   //$db->query_params("UPDATE torrents SET comments = comments + 1 WHERE torrent_id = :torrent_id", array('torrent_id' => $id));
   header(sprintf('Location: %s/details/%s/#comments', $CONFIG['base_url'], $row['torrentid']));  
}


// Update profile views except self
if ($account->sessionLogin() && $user['user_id'] != $account->getId()) {
   $db->query_params('INSERT INTO profileviews (userid, userviewed) VALUES (:current_id, :id) ON DUPLICATE KEY UPDATE viewed = NOW()', array('current_id' => $account->getId(), 'id' => $user['user_id']));
   $db->query_params('UPDATE profileviews SET times = times + 1, viewed = NOW() WHERE userid = :current_id AND userviewed = :id', array('current_id' => $account->getId(), 'id' => $user['user_id']));
}

//var_dump($user); // Dev testing

// User view
if ($account->viewUsers() == 'no' && $account->getId() != $user['user_id'])
   die('No permission to view user.');
     
// Enabled
if (($user['enabled'] == 'no' || ($user['status'] == 'pending')) && $account->getUserRole() == 'Regular')
   die('No access. Account disabled.');

// Country
$res = $db->query_params('SELECT flagpic, name FROM countries WHERE id = :country LIMIT 1', array('country' => $user['country']));
if ($res) {
   $arr     = $res->fetch();
   $country = " <img src='/images/countries/$arr[flagpic]' style='width:25;height:25px;vertical-align:middle' />";
}

// Total friends
$friends = $db->query_params('SELECT COUNT(*) as totalfriends FROM friends WHERE userid = :user_id', array('user_id' => $user['user_id']));
$totalf = $friends->fetch();

// Stored media
$stored = $db->query_params('SELECT u.avatar, u.avatar_thumb, t.image1, t.image2, t.added, u.added AS added_avatar, t.cover1 AS cover, t.name FROM users u LEFT JOIN torrents t ON u.user_id = t.user_id WHERE u.user_id = :user_id ORDER BY t.added DESC LIMIT 12', array('user_id' => $user['user_id']));
$totals = $stored->fetch();

// Total uploads
$uploads = $db->query_params('SELECT COUNT(*) as totaluploads FROM torrents t LEFT JOIN users u ON u.user_id = t.user_id WHERE u.user_id = :user_id', array('user_id' => $user['user_id']));
$totalu = $uploads->fetch();

// Profile comments
$comments = $db->query_params('SELECT c.user AS sender_id, c.text AS comment, u.user_id AS receiver_id, u.avatar_thumb AS avatar FROM comments c LEFT JOIN users u ON u.user_id = c.user WHERE c.userprofile = :user_id ORDER BY c.added DESC', array('user_id' => $user['user_id']));
$totalc = $comments->fetch();

// Total bookmarks
$bookmarks = $db->query_params('SELECT COUNT(*) as totalbkmarks FROM bookmarks b LEFT JOIN users u ON u.user_id = b.userid WHERE u.user_id = :user_id', array('user_id' => $user['user_id']));
$totalb = $bookmarks->fetch();

if (!$country)
   $country = ' Country Unknown';
 
// Moods
$res = $db->query_params('SELECT name, moodspic FROM moods WHERE id = :moods LIMIT 1', array('moods' => $user['moods']));
if ($res) {
   $arr   = $res->fetch();
   $moods = '';
}

// Ratio conditions
if ($user['downloaded'] > 0) {
   $ratio = $user['uploaded'] / $user['downloaded'];
} else {
   $ratio = 'N/A';
}

// Profile photo
$avatar = htmlspecialchars($user['avatar_thumb']);
if (is_null($avatar)) $avatar = 'images/noavatar.png';

// Begin profile
?>

<!-- BEGIN layout -->

<h1 itemprop="name">
   <span class="card-title">@<?=html_escape($user['username'])?></span>
</h1>

<?
// Buttons according to users privacy setting
if ($account->getId() != $user['user_id']) {
   $r      = $db->query_params("SELECT id FROM friends WHERE userid = :user_id AND friendid = :friendid", array('user_id' => $account->getId(), 'friendid' => intval($_GET['id'])));
   $friend = $r->fetch();
   $r      = $db->query_params("SELECT id FROM blocked WHERE userid = :user_id AND blockid = :friendid", array('user_id' => $account->getId(), 'friendid' => intval($_GET['id'])));
   $block  = $r->fetch();
   if ($user['privacy'] != 'strong' || ($account->getId() == $user['user_id'])) {
       print("<button type=\"button\" style=\"font-weight:normal\" class=\"btn btn-danger\" onclick=\"location.href='/message/?compose&id=$user[user_id]'\"><i class=\"material-icons\" style=\"vertical-align:bottom;padding-right:5px\">message</i> Message</button>");
       if ($friend)
           print("<button type=\"button\" style=\"font-weight:normal;margin-left:5px\" class=\"btn btn-danger\" onclick=\"location.href='/friends.php?action=delete&type=friend&targetid=$_GET[id]\"><i class=\"material-icons\" style=\"vertical-align:bottom;padding-right:5px\">remove_circle</i> Unfriend</button>");
       elseif ($block)
           print("<button type=\"button\" style=\"font-weight:normal;margin-left:5px\" class=\"btn btn-danger\" onclick=\"location.href='/friends.php?action=delete&type=block&targetid=$_GET[id]'\"><i class=\"material-icons\" style=\"vertical-align:bottom;padding-right:5px\">remove_circle_outline</i> Unblock</button>");
       else {
           print("<button type=\"button\" style=\"font-weight:normal;margin-left:5px\" class=\"btn btn-danger\" onclick=\"location.href='/friends.php?action=add&type=friend&targetid=$_GET[id]'\"><i class=\"material-icons\" style=\"vertical-align:bottom;padding-right:5px\">face</i> + Friend</button>
                     <button type=\"button\" style=\"font-weight:normal;margin-left:5px\" class=\"btn btn-danger\" onclick=\"location.href='/friends.php?action=add&type=block&targetid=$_GET[id]'\"><i class=\"material-icons\" style=\"vertical-align:bottom;padding-right:5px\">block</i> Block</button>");
       }
   }
}

// Check users privacy settings
if ($user['privacy'] != 'strong' || $account->getId() == $user['user_id']) { ?>

<article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article" class="card" style="width:57%;text-align:center">

<!-- User photo -->
<img src="<?=$CONFIG['base_url'] . "/" . $avatar; ?>" alt="<?=html_escape($user['username'])?>" style="border-radius:50%;width:250px;height:250px;margin-top:25px;border:7px solid #ECECEC" />

<!-- Profile views -->  
<div style="color:#C0C0C0;padding:10px 0px 5px 0;text-align:center">Profile views</div>
<?
$res = $db->query_params('SELECT DISTINCT profileviews.userid, profileviews.userviewed, users.avatar_thumb AS avatar, users.user_id FROM profileviews LEFT JOIN users ON users.user_id = profileviews.userid WHERE profileviews.userviewed = :userviewed ORDER BY profileviews.viewed DESC LIMIT 30', array('userviewed' => intval($_GET['id'])));
while ($arr = $res->fetch()) {
   if (!$arr['avatar']) {
       echo "<a href=\"" . $CONFIG['base_url'] . "/user.php?id=" . $arr['user_id'] . "\">
           <img style='width:45px;height:45px;border-radius:50%;margin-right:5px;' src='" . $CONFIG['base_url'] . "/images/noavatar.png' /></a>";
   } else if ($arr['avatar']) {
       echo "<a href=\"" . $CONFIG['base_url'] . "/user.php?id=" . $arr['user_id'] . "\">
           <img itemprop=\"image\" class=\"responsive-img\" src=\"" . $CONFIG['base_url'] . "/" . htmlspecialchars($arr["avatar"]) . "\" style='width:30px;height:30px;border-radius:50%;margin-right:5px;' /></a>";
   }
}
?>
</div>

<!-- Begin Fields: Username, Gender, Join Date, Online -->
<h2 style="font-size:19px">
   <?=html_escape($user['username']) . ', ' . $user['gender'] . ' ' . $country; ?>
   <div style="font-size:16px"><span style='color:#C0C0C0'>Joined <?=$user['added']?></span>
   <div>Online <?=str_replace('< 1 min', '<span><i class="material-icons" style="color:green;vertical-align:middle">check_circle_outline</i> now</span>', time_ago($user['last_access'])); ?></div>
</h2>

<!-- Begin User Class Name -->
<h2>
   <center>      
<?
if ($user['class'] == 7) {
   echo '<div style="border-radius:5px;background:#c0c0c0;padding:5px;color:#FFF;width:200px;padding-bottom:10px">Administrator</div>';
} elseif ($user['class'] == 4) {
   echo '<div style="border-radius:5px;background:#c0c0c0;padding:5px;color:#FFF;width:200px;padding-bottom:10px">Uploader</div>';
} elseif ($user['class'] == 1) {
   echo '<div style="text-align:center;padding-bottom:10px">Regular User</div>';
}
?>
   </center>
</h2>

<div>          
<?
if ($user['class'] >= 7) {
$r2 = $db->query_params('SELECT id FROM bookmarkuser WHERE userid = :user_id AND bkid = :bkid', array('user_id' => $account->getId(), 'bkid' => intval($_GET['id'])));
$bookmarkuser = $r2->fetch();
   if ($bookmarkuser) {
       print("<center><button type='button' style='font-weight:normal' class='btn btn-danger' onclick=\"location.href='" . $CONFIG["base_url"] . "/watch/?action=delete&type=bookmarkuser&targetid=$_GET[id]'\">Remove from Watchlist</button></center>\n");
   } else {
       print("<center><button type='button' style='font-weight:normal' class='btn btn-danger' onclick=\"location.href='" . $CONFIG["base_url"] . "/watch/?action=add&type=bookmarkuser&targetid=$_GET[id]'\">Add to Watchlist</button></center></a>&nbsp;<br />");
   }
}
?>    
</div>

</article>

<!-- User Friends -->
<div style="position:absolute;top:150px;right:120px;width:41%">

<h1 itemprop="name">
   <i class="material-icons">face</i> <?=$totalf['totalfriends']; ?> Friends
</h1>

<article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article">
 
<? if ($account->getId() == $user['user_id']) { ?>
   <div style="padding-bottom:25px">
       <button type='button' style='font-weight:normal' class='btn btn-danger' onclick="location.href='/findfriends.php'">Find Friends</button>
   </div>
<? } ?>

<?
$res = $db->query_params('SELECT DISTINCT (SELECT COUNT(*) FROM friends WHERE userid = :user_id) as totalfriends, f.id, f.userid, f.friendid, u.user_id, u.avatar_thumb AS avatar FROM friends f LEFT JOIN users u ON u.user_id = f.friendid WHERE f.userid = :friend_id ORDER BY f.userid DESC LIMIT 50', array('friend_id' => $user['user_id'], 'user_id' => $user['user_id']));
while ($arr = $res->fetch()) {
   if (!$arr['avatar']) {
       echo "<a href=\"" . $CONFIG['base_url'] . "/user.php?id=" . $arr['user_id'] . "\">
           <img style='width:45px;height:45px;border-radius:50%;margin-right:5px;' src='" . $CONFIG['base_url'] . "/images/noavatar.png' /></a>";
   } else if ($arr['avatar']) {
       echo "<a href=\"" . $CONFIG['base_url'] . "/user.php?id=" . $arr['user_id'] . "\">
           <img itemprop=\"image\" class=\"responsive-img\" src=\"" . $CONFIG['base_url'] . "/" . htmlspecialchars($arr["avatar"]) . "\" style='width:45px;height:45px;border-radius:50%;margin-right:5px;' /></a>";
   }
}
?>

<!-- Total Torrent Bookmarks -->
<h1 itemprop="name">
   <i class="material-icons">bookmarks</i> <?=$totalb['totalbkmarks']; ?> Bookmarks
</h1>
<article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article">
   Coming soon.
</article>

<!-- Total Torrents -->
<h1 itemprop="name">
   <i class="material-icons">list</i> <?=$totalu['totaluploads']; ?> Torrents
</h1>
<article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article">
   Coming soon.
</article>

<!-- End side content -->
</article>
</div>

<!-- Profile Bio -->
<h1 itemprop="name">
   my bio
   <span style="float:right;font-size:17px;padding-right:10px">
       <a href="#"><i class="material-icons" style="vertical-align:middle;padding-right:5px;font-size:16px;color:orange">edit</i>Edit Bio</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#"><i class="material-icons" style="vertical-align:middle;padding-right:5px;font-size:16px;color:red;">color_lens</i>Style</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#"><i class="material-icons" style="vertical-align:middle;padding-right:5px;font-size:16px;color:purple">share</i>Share</a>
   </span>
</h1>
<!-- Content -->
<article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article" class="card" style="width:96%; padding:10px; font-size:17px">
   <?=html_escape($user['profile_bio'])?>
</article>



<!-- Profile Comments -->
<h1 itemprop="name">
   comments
</h1>
<!-- Comments -->
<article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article" class="card" style="width:96%; padding:10px; font-size:17px">
   <div>
<?
// Begin comments
foreach ($totalc as $person): //var_dump($person); // USE THIS TO TEST DIFFERENT THINGS FOR UI/features ?>
 
<!-- Begin profile comments - Sep 2, 2020 -->
<div ng-repeat="item in items" class="col" style="margin-left:7px;padding-bottom:10px;width:698px">
        <article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article" class="card" style="padding:0px;margin:0px">
           <table class="responsive-table">
              <tr>
                 <th scope='row' style='color:#FFF;background:#ED2324;text-align:left;height:0px;box-shadow: inset 1px 5px 7px -6px #000000;padding-bottom:2px;padding-top:5px;width:180px'>
                     <a href="/user/?id=<?=$person['userid']?>"><img src="/<?=$person['avatar']?>" style="width:65px;height:65px;border-radius:50%" /></a>
                 </th>
                 <td style='background:#e6e6e6;border-bottom:1px solid #FFF;text-align:left;color:#000;padding-left:10px'><?=html_escape($person['text'])?></td>
              </tr>
           </table>
        </article>
</div>          
               
<? endforeach;
printf('<form class="cd-form floating-labels" name="comment" method="post" action="">');
csrf_html();
?>
  <div class='b-border' style="margin-left: 5px; margin-top:-10px">
     <table border='0' cellpadding='6' cellspacing='0' class='responsive-table'>
        <tr class='b-title'>
           <th colspan="2" align='center' valign="middle">
              <table border="0" align="center" cellpadding="4" cellspacing="0">
                 <!--<span style='font-weight:normal;color:#c0c0c0;padding-left:4px'>bbcode - HTML turned <i>off</i><span style='text-align:right;float:right'>Images, links - <a href='/community/?action=viewtopic&topicid=48' target='_new'>see posting rules</a></span></span>-->
                 <tr>
                    <td align="center"><button type="button" style="font-weight:bold" class="btn btn-danger" onclick="javascript: BBTag('[b]','bold','body','comment'); FocusAfter('textarea_css');">B</button></td>
                    <td align="center">
                       <button type="button" style="font-weight:normal;font-style:italic" class="btn btn-danger" onclick="javascript: BBTag('[i]','italic','body','comment'); FocusAfter('textarea_css');">
                          i
                    </td>
                    <td align="center"><button type="button" style="font-weight:normal;text-decoration:underline" class="btn btn-danger" onclick="javascript: BBTag('[u]','underline','body','comment'); FocusAfter('textarea_css');">u</td>
                    <td align="center"><button type="button" style="font-weight:normal" class="btn btn-danger" onclick="javascript: BBTag('
  • ','li','body','comment'); FocusAfter('textarea_css');">*</td>
                        <td align="center"><button type="button" style="font-weight:normal" class="btn btn-danger" onclick="javascript: BBTag('[quote]','quote','body','comment'); FocusAfter('textarea_css');">" "</td>
                        <td align="center"><button type="button" style="font-weight:normal" class="btn btn-danger" onclick="javascript: BBTag('[url]','url','body','comment'); FocusAfter('textarea_css');">URL</td>
                        <td align="center"><button type="button" style="font-weight:normal" class="btn btn-danger" onclick="javascript: BBTag('[img]','img','body','comment'); FocusAfter('textarea_css');">IMG</td>
                     </tr>
                  </table>
               </th>
            </tr>
            <tr class='b-row'>
            <td class='bb-comment' align='center' valign='top'>
            <textarea name="profile" id="textarea_css" rows="10" cols="50" style="width: 654px; margin-top:-40px" placeholder="Say something..." /></textarea>
            <table border="0" cellpadding="3" cellspacing="3" align="center">
            <tr>
            <td width="55"><a href="javascript:SmileIT(':)','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/smile.png" border="0" alt=':)' title=':)' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':(','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/sad.png" border="0" alt=':(' title=':(' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':D','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/grin.png" border="0" alt=':D' title=':D' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':P','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/razz.png" border="0" alt=':P' title=':P' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':-)','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/smile-big.png" border="0" alt=':-)' title=':-)' /></a></td>
            <td width="55"><a href="javascript:SmileIT('B)','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/cool.png" border="0" alt='B)' title='B)' /></a></td>
            <td width="55"><a href="javascript:SmileIT('8o','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/eek.png" border="0" alt='8o' title='8o' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':?','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/confused.png" border="0" alt=':?' title=':?' /></a></td>  
            <td width="55"><a href="javascript:SmileIT('8)','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/glasses.png" border="0" alt='8)' title='8)' /></a></td>
            <td width="55"><a href="javascript:SmileIT(';)','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/wink.png" border="0" alt=';)' title=';)' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':-*','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/kiss.png" border="0" alt=':-*' title=':-*' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':-(','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/crying.png" border="0" alt=':-(' title=':-(' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':|','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/plain.png" border="0" alt=':|' title=':|' /></a></td>
            <td width="55"><a href="javascript:SmileIT('O:-D','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/angel.png" border="0" alt='O:-D' title='0:-D' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':-@','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/devilish.png" border="0" alt=':-@' title=':-@' /></a></td>
            </tr><tr>
            <td width="55"><a href="javascript:SmileIT(':o)','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/monkey.png" border="0" alt=':o)' title=':o)' /></a></td>
            <td width="55"><a href="javascript:SmileIT('brb','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/brb.png" border="0" alt='brb' title='brb' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':warn','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/warn.png" border="0" alt=':warn' title=':warn' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':help','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/help.png" border="0" alt=':help' title=':help' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':bad','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/bad.png" border="0" alt=':bad' title=':bad' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':love','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/love.png" border="0" alt=':love' title=':love' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':idea','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/idea.png" border="0" alt=':idea' title=':idea' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':bomb','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/bomb.png" border="0" alt=':bomb' title=':bomb' /></a></td>
            <td width="55"><a href="javascript:SmileIT(':!','comment','body'); FocusAfter('textarea_css');"><img style="width:24px;height:24px" src="/images/smilies/important.png" border="0" alt=':!' title=':!' /></a></td>
            </tr>
            </table>
            </td>
            </tr>
         </table>
      </div>
      <br><button class="btn btn-danger" onclick="this.form.submit()" style='margin-top:-125px;float:right;position:absolute;right: 37px'>Post</button>
       </form>
       </div>
    </article>

    <!-- Stored Media -->
    <h1 itemprop="name">
       stored media
       <span style="float:right;font-size:17px;padding-right:10px">
           <a href="#"><i class="material-icons" style="vertical-align:middle;padding-right:5px;font-size:16px;color:lightblue">insert_photo</i>Manage</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#"><i class="material-icons" style="vertical-align:middle;padding-right:5px;font-size:16px;color:red;">get_app</i>Save All</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#"><i class="material-icons" style="vertical-align:middle;padding-right:5px;font-size:16px;color:green">tab_unselected</i>Torrents</a>
       </span>
    </h1>
    <!-- Content -->
    <article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article" class="card" style="height: 300px; width:96%; padding:10px; font-size:17px">
    <?
    while ($row = $stored->fetch()) {
       print("<div style='display:inline;float:left;width:220px;height:220px;margin:5px;'><img style=\"width:220px;height:220px\" src='" . $CONFIG['base_url'] . "/uploads/images/" . $row['image1'] . "' /><br>Uploaded: " . time_ago($row['added']) . "<br>Location: <b>" . str_replace('.torrent', '', $row['name']) . "</b></div>"); break;
    }
    while ($row = $stored->fetch()) {
       print("<div style='display:inline;float:left;width:220px;height:220px;margin:5px;'><img style=\"width:220px;height:220px\" src='" . $CONFIG['base_url'] . "/uploads/images/" . $row['image2'] . "' /><br>Uploaded: " . time_ago($row['added']) . "<br>Location: <b>" . str_replace('.torrent', '', $row['name'])  . "</b></div>"); break;
    }
    while ($row = $stored->fetch()) {
       print("<div style='display:inline;float:left;width:220px;height:220px;margin:5px;'><img style=\"border-radius:100%;width:220px;height:220px\" src='" . $CONFIG['base_url'] . "/" . $row['avatar_thumb'] . "' /><br>Uploaded: " . time_ago($row['added_avatar']) . "<br>Location: <i>Profile</i></div>");  break;

    }
    /*
    while ($row = $stored->fetch()) {
       print("<div style='display:inline;float:left;width:220px;height:220px;margin:5px;'><img style=\"width: 107px;height:176px;\" src='" . $row['image1'] . "/images/covers/" . $row['cover'] . "' /><br>Uploaded: " . time_ago($row['added']) . "</div>");  break;

    }
    */
    ?>
    <div style="clear:both"></div>
    </article>

    <?
    // End profile

    } // End privacy check - line 95

    site_footer();

    } else { // check session
       header(sprintf('Location: %s/signin/', $CONFIG['base_url']));
       die;
    }
  • editinplace.png
    editinplace.png