|
@@ 67-78 (lines=12) @@
|
| 64 |
|
} |
| 65 |
|
|
| 66 |
|
// Prepare the context for the capacity bar. |
| 67 |
|
if (!empty($context['message_limit'])) |
| 68 |
|
{ |
| 69 |
|
$bar = ($user_info['messages'] * 100) / $context['message_limit']; |
| 70 |
|
|
| 71 |
|
$context['limit_bar'] = array( |
| 72 |
|
'messages' => $user_info['messages'], |
| 73 |
|
'allowed' => $context['message_limit'], |
| 74 |
|
'percent' => $bar, |
| 75 |
|
'bar' => min(100, (int) $bar), |
| 76 |
|
'text' => sprintf($txt['pm_currently_using'], $user_info['messages'], round($bar, 1)), |
| 77 |
|
); |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
// a previous message was sent successfully? show a small indication. |
| 81 |
|
if (isset($_GET['done']) && ($_GET['done'] == 'sent')) |
|
@@ 330-341 (lines=12) @@
|
| 327 |
|
} |
| 328 |
|
|
| 329 |
|
// Do we have a limit on the amount of messages we can keep? |
| 330 |
|
if (!empty($context['message_limit'])) |
| 331 |
|
{ |
| 332 |
|
$bar = round(($user_info['messages'] * 100) / $context['message_limit'], 1); |
| 333 |
|
|
| 334 |
|
$context['limit_bar'] = array( |
| 335 |
|
'messages' => $user_info['messages'], |
| 336 |
|
'allowed' => $context['message_limit'], |
| 337 |
|
'percent' => $bar, |
| 338 |
|
'bar' => $bar > 100 ? 100 : (int) $bar, |
| 339 |
|
'text' => sprintf($txt['pm_currently_using'], $user_info['messages'], $bar) |
| 340 |
|
); |
| 341 |
|
} |
| 342 |
|
|
| 343 |
|
require_once($sourcedir . '/Subs-Menu.php'); |
| 344 |
|
|