require_once(SM_PATH . 'functions/imap_mailbox.php');
require_once(SM_PATH . 'functions/imap_messages.php');
require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/forms.php');
/**
* default value for page_selector_max
if (!isset($hlt_color)) {
$hlt_color = $color_string;
}
- $checked = ($checkall == 1) ? ' checked' : '';
$col = 0;
$msg['SUBJECT'] = str_replace(' ', ' ', decodeHeader($msg['SUBJECT']));
$subject = processSubject($msg['SUBJECT'], $indent_array[$msg['ID']]);
switch ($index_order_part) {
case 1: /* checkbox */
echo html_tag( 'td',
- "<input type=\"checkbox\" name=\"msg[$t]\" value=\"".$msg['ID']."\"$checked />",
+ addCheckBox("msg[$t]", $checkall, $msg['ID']),
'center',
$hlt_color );
break;
$msgs = getThreadMessages($imapConnection, $start_msg, $show_num, $num_msgs);
if ($msgs === false) {
echo '<b><small><center><font color=red>' .
- _("Thread sorting is not supported by your IMAP server.") . "<br />" .
+ _("Thread sorting is not supported by your IMAP server.") . '<br />' .
_("Please report this to the system administrator.").
'</center></small></b>';
$thread_sort_messages = 0;
$num_msgs, $sort, $mbxresponse);
if ($msgs === false) {
echo '<b><small><center><font color=red>' .
- _( "Server-side sorting is not supported by your IMAP server.") . "<br />" .
+ _( "Server-side sorting is not supported by your IMAP server.") . '<br />' .
_("Please report this to the system administrator.").
'</center></small></b>';
$sort = $server_sort_order;
$location = $php_self;
}
- $moveFields = '<input type="hidden" name="msg" value="'.htmlspecialchars($msg).'" />' .
- '<input type="hidden" name="mailbox" value="'.htmlspecialchars($mailbox).'" />' .
- '<input type="hidden" name="startMessage" value="'.htmlspecialchars($start_msg).'" />'.
- '<input type="hidden" name="location" value="'.$location.'" />';
+ $moveFields = addHidden('msg', $msg).
+ addHidden('mailbox', $mailbox).
+ addHidden('startMessage', $start_msg).
+ addHidden('location', $location);
/* build thread sorting links */
if ($allow_thread_sort == TRUE) {
<td>
<table bgcolor="<?php echo $color[4]; ?>" border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
- <td align="left"><small>
- <?php
- echo $paginator;
- echo $thread_link_str;
- ?>
- </small></td>
+ <td align="left"><small><?php echo $paginator . $thread_link_str; ?></small></td>
<td align="center"></td>
<td align="right"><small><?php echo $msg_cnt_str; ?></small></td>
</tr>
. '&startMessage=1&mailbox=' . urlencode($mailbox)
. '"><img src="../images/' . $img
. '" border="0" width="12" height="10" alt="sort" title="'
- . _("Click here to change the sorting of the message list") .'"></a>';
+ . _("Click here to change the sorting of the message list") .' /"></a>';
}
/**
. "function " . $func_name . "() {\n"
. " for (var i = 0; i < document." . $form_name . ".elements.length; i++) {\n"
. " if(document." . $form_name . ".elements[i].type == 'checkbox' && "
- . "document." . $form_name . ".elements[i].name != 'bypass_trash'){\n"
+ . " document." . $form_name . ".elements[i].name.substring(0,3) == 'msg'){\n"
. " document." . $form_name . ".elements[i].checked = "
. " !(document." . $form_name . ".elements[i].checked);\n"
. " }\n"
* I am leaving this debug code here, commented out, because
* it is a really nice way to see what the above code is doing.
* echo "qts = $q1_pgs/$q2_pgs/$q3_pgs/$q4_pgs = "
- * . ($q1_pgs + $q2_pgs + $q3_pgs + $q4_pgs) . '<br>';
+ * . ($q1_pgs + $q2_pgs + $q3_pgs + $q4_pgs) . '<br />';
*/
/* Print out the page links from the compute page quarters. */
return $handleAsSent_result;
}
-?>
\ No newline at end of file
+?>