$aMsg) {
echo $sLine;
/**
* Display message header row in messages list
*
*/
$aColumns = $aMsg['columns'];
/**
* Check the flags and set a class var.
*/
if (isset($aColumns[SQM_COL_FLAGS])) {
$aFlags = $aColumns[SQM_COL_FLAGS]['value'];
$sFlags = getFlagIcon($aFlags, $icon_theme_path);
/* add the flag string to the value index */
$aColumns[SQM_COL_FLAGS]['value'] = $sFlags;
}
/**
* Check the priority column
*/
if (isset($aColumns[SQM_COL_PRIO])) {
$sValue = getPriorityIcon($aColumns[SQM_COL_PRIO]['value'], $icon_theme_path);
$aColumns[SQM_COL_PRIO]['value'] = $sValue;
}
/**
* Check the attachment column
*/
if (isset($aColumns[SQM_COL_ATTACHMENT])) {
$sValue = getAttachmentIcon($aColumns[SQM_COL_ATTACHMENT]['value'], $icon_theme_path);
$aColumns[SQM_COL_ATTACHMENT]['value'] = $sValue;
}
$class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_even' : 'even');
$non_clicked_class = 'even';
/**
* If alternating row colors is set, adapt the CSS class
*/
if (isset($alt_index_colors) && $alt_index_colors) {
if (!($i % 2)) {
$class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_odd' : 'odd');
$non_clicked_class = 'odd';
}
}
/**
* Message Highlighting Functionality
*/
if (isset($aMsg['row']['color']))
{
if (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite) {
//FIXME: would be best not to use $color directly here; want to move this to be a CSS style-defined value only, but the problem is that this CSS class is being defined on the fly right here
$bgcolor = $color[16];
$class = 'clicked_misc'.$i;
} else {
$bgcolor = $aMsg['row']['color'];
$class = 'misc'.$i;
}
$non_clicked_class = 'misc'.$i;
$non_clicked_bgcolor = $aMsg['row']['color'];
}
else
{
$bgcolor = '';
$non_clicked_bgcolor = '';
}
$row_extra = '';
// this stuff does the auto row highlighting on mouseover
//
if ($javascript_on && $fancy_index_highlite) {
$row_extra = ' onmouseover="rowOver(\''.$form_id . '_msg' . $i.'\');" onmouseout="setPointer(this, ' . $i . ', \'out\', \'' . $non_clicked_class . '\', \'mouse_over\', \'clicked\');" onmousedown="setPointer(this, ' . $i . ', \'click\', \'' . $non_clicked_class . '\', \'mouse_over\', \'clicked\');"';
}
// this does the auto-checking of the checkbox no matter
// where on the row you click
//
$javascript_auto_click = '';
$row_click_extra = '';
if (!empty($plugin_output['row_click_extra'])) $row_click_extra = $plugin_output['row_click_extra'];
if ($javascript_on && $fancy_index_highlite) {
// include the form_id in order to show multiple messages lists. Otherwise id isn't unique
$javascript_auto_click = " onmousedown=\"row_click('$form_id"."_msg$i', event, '$form_name', 'msg[' + $i + ']', '$row_click_extra')\"";
}
/*
* Message Highlighting requires a unique CSS class declaration for proper
* mouseover functionality. There is no harm in doing this when the mouseover
* functionality is disabled
*/
if ($class != 'even' && $class != 'odd'
&& $class != 'clicked_even' && $class != 'clicked_odd')
{
?>
>
'; $sEnd = '';
}
if (in_array('deleted',$aFlags) && $aFlags['deleted']) {
$sPre = '' . $sPre;
$sEnd .= ' ';
} else {
if (in_array('flagged',$aFlags) && $aFlags['flagged']) {
$sPre = '' . $sPre;
$sEnd .= ' ';
}
}
}
/**
* Because the order of the columns and which columns to show is a user preference
* we have to do some php coding to display the columns in the right order
*/
foreach ($aOrder as $iCol) {
if (in_array($iCol, $show_label_columns)) {
$sLabelStart = '";
$sLabelEnd = ' ';
} else {
$sLabelStart = '';
$sLabelEnd = '';
}
$aCol = (isset($aColumns[$iCol])) ? $aColumns[$iCol] : array();
$title = (isset($aCol['title'])) ? $aCol['title'] : '';
$link = (isset($aCol['link'])) ? $aCol['link'] : '';
$link_extra = (isset($aCol['link_extra'])) ? $aCol['link_extra'] : '';
$onclick = (isset($aCol['onclick'])) ? $aCol['onclick'] : '';
$value = (isset($aCol['value'])) ? $aCol['value'] : '';
$target = (isset($aCol['target'])) ? $aCol['target'] : '';
if (!$show_personal_names
&& !empty($title)
&& ($iCol == SQM_COL_FROM
|| $iCol == SQM_COL_TO
|| $iCol == SQM_COL_CC
|| $iCol == SQM_COL_BCC)) {
// swap title and value
$tmp = $title;
$title = $value;
$value = $tmp;
}
if ($iCol !== SQM_COL_CHECK) {
$value = $sLabelStart.$sPre.$value.$sEnd.$sLabelEnd;
}
switch ($iCol) {
case SQM_COL_CHECK:
$checked = (($checkall || in_array($iUid, $preselected)) ? ' checked="checked" ' : '');
if ($javascript_on) {
echo '' ?>
" id="" value="" />
';
echo " ";
}
break;
case SQM_COL_SUBJ:
$indent = $aCol['indent'];
$sText = " ";
if ($align['left'] == 'left') {
$sText .= str_repeat(' ',$indent);
}
$sText .= "';
if ($align['left'] == 'right') {
$sText .= str_repeat(' ',$indent);
}
echo $sText." \n";
break;
case SQM_COL_SIZE:
case SQM_COL_FLAGS:
$sText = " "
. "$value \n";
echo $sText;
break;
case SQM_COL_INT_DATE:
case SQM_COL_DATE:
$sText = " "
. $value. " \n";
echo $sText;
break;
default:
$sText = " \n";
break;
}
}
echo ' ';
$sLine = " \n";
++$i;
/*
* End displaying row part
*/
}
?>