includes/pageprocess.php
changeset 108 1c7f59df9474
parent 103 a8891e108c95
child 142 ca9118d9c0f2
equal deleted inserted replaced
107:4042c4dd5ba4 108:1c7f59df9474
   707     if ( !empty($userdata['real_name']) )
   707     if ( !empty($userdata['real_name']) )
   708     {
   708     {
   709       echo '<tr><td class="row3">Real name: ' . $userdata['real_name'] . '</td></tr>';
   709       echo '<tr><td class="row3">Real name: ' . $userdata['real_name'] . '</td></tr>';
   710     }
   710     }
   711     
   711     
       
   712     // Administer user button
       
   713     
       
   714     if ( $session->user_level >= USER_LEVEL_ADMIN )
       
   715     {
       
   716       echo '<tr><td class="row1"><a href="' . makeUrlNS('Special', 'Administration', 'module=' . $paths->nslist['Admin'] . 'UserManager&src=get&user=' . urlencode($target_username), true) . '" onclick="ajaxAdminUser(\'' . addslashes($target_username) . '\'); return false;">Administer user</a></td></tr>';
       
   717     }
       
   718     
   712     // Comments
   719     // Comments
   713     
   720     
   714     echo '<tr><th class="subhead">' . htmlspecialchars($target_username) . '\'s latest comments</th></tr>';
   721     echo '<tr><th class="subhead">' . htmlspecialchars($target_username) . '\'s latest comments</th></tr>';
   715     $q = $db->sql_query('SELECT page_id, namespace, subject, time FROM '.table_prefix.'comments WHERE name=\'' . $db->escape($target_username) . '\' AND user_id=' . $userdata['authoritative_uid'] . ' AND approved=1 ORDER BY time DESC LIMIT 5;');
   722     $q = $db->sql_query('SELECT page_id, namespace, subject, time FROM '.table_prefix.'comments WHERE name=\'' . $db->escape($target_username) . '\' AND user_id=' . $userdata['authoritative_uid'] . ' AND approved=1 ORDER BY time DESC LIMIT 5;');
   716     if ( !$q )
   723     if ( !$q )