Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "
- <table width='90%' cellspacing='1' class='table'>
- <tr style='background:grey'>
- <th colspan='3'>Users Comments <a href='comments.php?ID={$r['userid']}'>[Add Comment]</a></th>";
- if($ir['user_level'] == 2 || $ir['user_level == 3) {
- echo "<th width='10%'>Delete</th>";
- }
- if($ir['userid'] == $r['userid']) {
- echo "<th width='10%'>Block</th>";
- }
- echo "</tr>";
- $query = $db->query("SELECT `cmtTIME`,`cmtTO`,`cmtFROM`,`cmtTEXT` FROM `comments`
- WHERE `cmtTO` = {$r['userid']} ORDER BY `cmtTIME` DESC LIMIT 5");
- while($q=$db->fetch_row($query)) {
- $they = $db->query("SELECT `username`,`userid` FROM `users` WHERE `userid` = {$q['cmtFROM']}");
- $them = $db->fetch_row($they);
- $sent = date('F j, Y, g:i:s a',$q['cmtTIME']);
- if($them['display_pic']) {
- echo "
- <td width='50'>
- <img src='{$them['display_pic']}' width='50'
- height='50' alt='User Display Pic' title='User Display Pic' />
- </td>";
- }
- else {
- echo "
- <td width='50'>
- <img src='images/default.jpg' width='50' height='50'
- alt='User Display Pic' title='User Display Pic' />
- </td>";
- }
- }
- echo "
- <td><a href='viewuser.php?u={$them['userid']}'>{$them['username']} [{$them['userid']}]</a></br></br>$sent</td>
- <td>{$q['cmtTEXT']}</td>";
- if($ir['user_level'] == 2 || $ir['user_level'] == 3) {
- echo "
- <td width='10%'><a href='comments.php?action=delete&ID={$q['cmtID']}'>Delete</a></td>";
- }
- if($ir['userid'] == $r['userid']) {
- echo "
- <td width='10%'><a href='comments_block.php?action=add&ID={$them['userid']}'>Block</a></td>";
- }
- echo "</tr>";
- }
- echo "</table><hr width='90%'>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement