$cnt = 0;
// Compile all out
- while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($cnt < 3)) {
+ while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($cnt < 4)) {
// Init common variables
$content = array();
$newContent = '';
}
// Generate a list of administrative links to a given userid
-function generateMemberAdminActionLinks ($userid, $status = '') {
+function generateMemberAdminActionLinks ($userid) {
// Make sure userid is a number
if ($userid != bigintval($userid)) debug_report_bug(__FUNCTION__, __LINE__, 'userid is not a number!');
// Define all main targets
$targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points');
+ // Get user status
+ $status = getFetchedUserData('userid', $userid, 'status');
+
// Begin of navigation links
$OUT = '[';
$OUT .= strtoupper($tar);
}
$OUT .= '--}</a></span>|';
- }
+ } // END - foreach
// Finish navigation link
- $OUT = substr($OUT, 0, -7) . ']';
+ $OUT = substr($OUT, 0, -1) . ']';
// Return string
return $OUT;
// Prepare constants
// @TODO No longer needed? define('__CATS_BASE' , '<a href="{%url=modules.php?module=admin&userid=');
$content['userid'] = bigintval(getRequestParameter('userid'));
- $content['member_links'] = generateMemberAdminActionLinks($content['userid']);
$content['email'] = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
// Ok, list categories of this user
}
// Prepare data for template
- $content['admin_links'] = generateMemberAdminActionLinks($userid, $content['status']);
$content['email_link'] = generateEmailLink($content['email'], 'user_data');
$content['last_online'] = generateDateTime($content['last_online'], 0);
if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&what=email_details&userid=' . $userid . '%}">' . translateComma($content['emails_sent']) . '</a>]';
// Transfer data to array
$content['sw'] = $SW;
$content['email'] = '[<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['email'] . '</a>]';
- $content['alinks'] = generateMemberAdminActionLinks($content['userid'], $content['status']);
$content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
$content['refs'] = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', true);
$content['locked'] = countSumTotalData($content['userid'], 'user_points', 'locked_points');
<u>{--ADMIN_MEMBER_FUNCTIONS--}:</u>
</div>
<div>
- $content[member_links]
+ {%pipe,generateMemberAdminActionLinks=$content[userid]%}
</div>
</td>
</tr>
-<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
- <tr>
- <td align="center" class="admin_title bottom">
- <strong>{--ADMIN_MEMBER_NO_CATS_1--}<a href="{%url=modules.php?module=admin&what=list_user&userid=$content[userid]%}">$content[userid]</a>{--ADMIN_MEMBER_NO_CATS_2--}</strong>
- </td>
- </tr>
- <tr>
- <td align="center" class="admin_title">
- <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u><br />
- $content[member_links]
- </td>
- </tr>
-</table>
+<div align="center">
+<div class="admin_table dashed">
+ <div class="admin_title bottom">
+ <strong>{--ADMIN_MEMBER_NO_CATS_1--}<a href="{%url=modules.php?module=admin&what=list_user&userid=$content[userid]%}">$content[userid]</a>{--ADMIN_MEMBER_NO_CATS_2--}</strong>
+ </div>
+ <div class="admin_title">
+ <div>
+ <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u>
+ </div>
+ <div>
+ {%pipe,generateMemberAdminActionLinks=$content[userid]%}
+ </div>
+ </div>
+</div>
+</div>
<tr>
- <td class="bottom switch_sw$content[sw]" width="30" align="right">$content[cnt]. </td>
- <td class="bottom switch_sw$content[sw]">$content[cat]</td>
- <td class="bottom switch_sw$content[sw] left" width="50"
- align="center">$content[sel]</td>
+ <td class="bottom switch_sw$content[sw]" width="30" align="right">
+ $content[cnt].
+ </td>
+ <td class="bottom switch_sw$content[sw]">
+ $content[cat]
+ </td>
+ <td class="bottom switch_sw$content[sw] left" width="50" align="center">
+ $content[sel]
+ </td>
</tr>
<td align="center" class="switch_sw$content[sw] bottom">---</td>
</tr>
<tr>
- <td height="22" colspan="5" class="admin_title">$content[alinks]</td>
+ <td height="22" colspan="5" class="admin_title">{%pipe,generateMemberAdminActionLinks=$content[userid]%}</td>
</tr>
</tr>
<tr>
<td align="center" class="admin_footer top" colspan="4">
- <strong>{--ADMIN_MEMBER_FUNCTIONS--}:</strong><br />
- $content[admin_links]
+ <div>
+ <strong>{--ADMIN_MEMBER_FUNCTIONS--}:</strong>
+ </div>
+ <div>
+ {%pipe,generateMemberAdminActionLinks=$content[userid]%}
+ </div>
</td>
</tr>
</table>