$msg_cnt_str = '';
if ($pageOffset < $end_msg) {
$msg_cnt_str = sprintf(_("Viewing Messages: %s to %s (%s total)"),
$msg_cnt_str = '';
if ($pageOffset < $end_msg) {
$msg_cnt_str = sprintf(_("Viewing Messages: %s to %s (%s total)"),
- $msg_cnt_str = sprintf(_("Viewing Message: %s (%s total)"), '<b>'.$pageOffset.'</b>', $iNumberOfMessages);
+ $msg_cnt_str = sprintf(_("Viewing Message: %s (%s total)"), '<em>'.$pageOffset.'</em>', $iNumberOfMessages);
- $aSortSupported = array(SQM_COL_SUBJ => array(SQSORT_SUBJ_ASC , SQSORT_SUBJ_DESC),
- SQM_COL_DATE => array(SQSORT_DATE_ASC , SQSORT_DATE_DESC),
- SQM_COL_INT_DATE => array(SQSORT_INT_DATE_ASC, SQSORT_INT_DATE_DESC),
- SQM_COL_FROM => array(SQSORT_FROM_ASC , SQSORT_FROM_DESC),
- SQM_COL_TO => array(SQSORT_TO_ASC , SQSORT_TO_DESC),
- SQM_COL_CC => array(SQSORT_CC_ASC , SQSORT_CC_DESC),
- SQM_COL_SIZE => array(SQSORT_SIZE_ASC , SQSORT_SIZE_DESC));
+ $aSortSupported = array(SQM_COL_SUBJ => array(SQSORT_SUBJ_ASC , SQSORT_SUBJ_DESC),
+ SQM_COL_DATE => array(SQSORT_DATE_DESC , SQSORT_DATE_ASC),
+ SQM_COL_INT_DATE => array(SQSORT_INT_DATE_DESC, SQSORT_INT_DATE_ASC),
+ SQM_COL_FROM => array(SQSORT_FROM_ASC , SQSORT_FROM_DESC),
+ SQM_COL_TO => array(SQSORT_TO_ASC , SQSORT_TO_DESC),
+ SQM_COL_CC => array(SQSORT_CC_ASC , SQSORT_CC_DESC),
+ SQM_COL_SIZE => array(SQSORT_SIZE_ASC , SQSORT_SIZE_DESC));
- * Check usage of images for attachments, flags and priority
- */
-$bIcons = ($use_icons && $icon_theme) ? true : false;
-
-/**
- * Location of icon images
- */
-if ($bIcons) {
- $sImageLocation = SM_PATH . 'images/themes/' . $icon_theme . '/';
-}
+ * All icon functionality is now handled through $icon_theme_path.
+ * $icon_theme_path will contain the path to the user-selected theme. If it is
+ * NULL, the user and/or admin have turned off icons.
+*/
-<form id="<?php echo $form_id;?>" name="<?php echo $form_name;?>" method="post" action="<?php echo $php_self;?>">
-<table border="0" width="100%" cellpadding="0" cellspacing="0">
+<div id="message_list">
+<form id="<?php echo $form_name;?>" name="<?php echo $form_name;?>" method="post" action="<?php echo $php_self;?>">
+<table class="table_empty" cellspacing="0">
$paginator_str = $this->fetch('paginator.tpl');
echo $paginator_str . $thread_link_str ."\n"; ?>
<!-- end paginator and thread link string -->
$paginator_str = $this->fetch('paginator.tpl');
echo $paginator_str . $thread_link_str ."\n"; ?>
<!-- end paginator and thread link string -->
- </tt>
- <input type="submit" name="moveButton" value="<?php echo $aFormElements['moveButton'][0]; ?>" style="padding: 0px; margin: 0px;" />
- </small>
+<?php if (isset($aFormElements['moveButton'])) { ?>
+ <input type="submit" name="moveButton" value="<?php echo $aFormElements['moveButton'][0]; ?>" class="message_control_button" />
+<?php }
+ if (isset($aFormElements['copyButton'])) { ?>
+ <input type="submit" name="copyButton" value="<?php echo $aFormElements['copyButton'][0]; ?>" class="message_control_button" />
+<?php } ?>
- echo '<input type="checkbox" name="toggleAll" title="'._("Toggle All").'" onclick="toggle_all(\''.$form_id."',".$fancy_index_highlite.",'".$clickedColor.'\');" />';
+ echo '<input type="checkbox" name="toggleAll" title="'._("Toggle All").'" onclick="toggle_all(\''.$form_name."',".$fancy_index_highlite.')" />'."\n";
if (sqgetGlobalVar('checkall',$checkall,SQ_GET)) {
$link .= ($checkall) ? '0' : '1';
} else {
if (sqgetGlobalVar('checkall',$checkall,SQ_GET)) {
$link .= ($checkall) ? '0' : '1';
} else {
- case SQM_COL_FROM: echo _("From"); break;
- case SQM_COL_DATE: echo _("Date"); break;
- case SQM_COL_SUBJ: echo _("Subject"); break;
+ case SQM_COL_FROM: echo _("From")."\n"; break;
+ case SQM_COL_DATE: echo _("Date")."\n"; break;
+ case SQM_COL_SUBJ: echo _("Subject")."\n"; break;
- if ($bIcons) {
- echo '<img src="' . $sImageLocation. 'msg_new.png" border="0" height="12" width="18" alt="!" title="'. _("Message Flags") . '" />';
- } else {
- echo ' ';
- }
- break;
- case SQM_COL_SIZE: echo _("Size"); break;
+ echo getIcon($icon_theme_path, 'msg_new.png', ' ', _("Message Flags")) . "\n";
+ break;
+ case SQM_COL_SIZE: echo _("Size")."\n"; break;
- if ($bIcons) {
- echo '<img src="' . $sImageLocation. 'attach.png" border="0" height="10" width="6" alt="+" title="' . _("Attachment") . '"/>';
- } else {
- echo '+';
- }
- break;
- case SQM_COL_INT_DATE: echo _("Received"); break;
- case SQM_COL_TO: echo _("To"); break;
- case SQM_COL_CC: echo _("Cc"); break;
- case SQM_COL_BCC: echo _("Bcc"); break;
+ echo getIcon($icon_theme_path, 'attach.png', '+', _("Attachment")) . "\n";
+ break;
+ case SQM_COL_INT_DATE: echo _("Received")."\n"; break;
+ case SQM_COL_TO: echo _("To")."\n"; break;
+ case SQM_COL_CC: echo _("Cc")."\n"; break;
+ case SQM_COL_BCC: echo _("Bcc")."\n"; break;
- $newsort = $aSortSupported[$iCol][1];
- $img = 'up_pointer.png';
+ $newsort = $aSortSupported[$iCol][1];
+ $img = 'up_pointer.png';
+ $text_icon = '⇧'; // U+21E7 UPWARDS WHITE ARROW
- $newsort = $aSortSupported[$iCol][0];
- $img = 'sort_none.png';
+ $newsort = $aSortSupported[$iCol][0];
+ $img = 'sort_none.png';
+ $text_icon = '◻'; // U+25FB WHITE MEDIUM SQUARE
- echo " <a href=\"$baseurl&startMessage=1&srt=$newsort\">";
- echo '<img src="../images/' . $img
- . '" border="0" width="12" height="10" alt="sort" title="'
- . _("Click here to change the sorting of the message list") .'" /></a>';
+ echo " <a href=\"$baseurl&startMessage=1&srt=$newsort\" style=\"text-decoration:none\">" .
+ getIcon($icon_theme_path, $img, $text_icon, _("Click here to change the sorting of the message list")) . "\n" .
+ '</a>';
- /* FIX ME, we should use separate templates for icons */
- if ($bIcons) {
- $sValue = '<img src="' . $sImageLocation;
- switch ($aColumns[SQM_COL_PRIO]['value']) {
- case 1:
- case 2: $sValue .= 'prio_high.png" border="0" height="10" width="5" alt="" /> ' ; break;
- case 5: $sValue .= 'prio_low.png" border="0" height="10" width="5" alt="" /> ' ; break;
- default: $sValue .= 'transparent.png" border="0" width="5" alt="" /> ' ; break;
- }
- } else {
- $sValue = '';
- switch ($aColumns[SQM_COL_PRIO]['value']) {
- case 1:
- case 2: $sValue .= "<font color=\"$color[1]\">!</font>"; break;
- // use downwards arrow for low priority emails
- case 5: $sValue .= "<font color=\"$color[8]\">↓</font>"; break;
- default: break;
- }
- }
+ $sValue = getPriorityIcon($aColumns[SQM_COL_PRIO]['value'], $icon_theme_path);
- /* FIX ME, we should use separate templates for icons */
- if ($bIcons) {
- $sValue = '<img src="' . $sImageLocation;
- $sValue .= ($aColumns[SQM_COL_ATTACHMENT]['value'])
- ? 'attach.png" border="0" height="10" width="6" alt=""/>'
- : 'transparent.png" border="0" width="6" alt="" />';
- } else {
- $sValue = ($aColumns[SQM_COL_ATTACHMENT]['value']) ? '+' : '';
- }
+ $sValue = getAttachmentIcon($aColumns[SQM_COL_ATTACHMENT]['value'], $icon_theme_path);
$row_extra = '';
// this stuff does the auto row highlighting on mouseover
//
if ($javascript_on && $fancy_index_highlite) {
$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','". $mouseoverColor . '\', \'' . $clickedColor . '\');" onmouseout="setPointer(this, ' . $i . ', \'out\', \'' . $bgcolor . '\', \'' . $mouseoverColor . '\', \'' . $clickedColor . '\');" onmousedown="setPointer(this, ' . $i . ', \'click\', \'' . $bgcolor . '\', \'' . $mouseoverColor . '\', \'' . $clickedColor . '\');"';
+ $row_extra .= ' onmouseover="rowOver(\''.$form_id . '_msg' . $i.'\');" onmouseout="setPointer(this, ' . $i . ', \'out\', \'' . $class . '\', \'mouse_over\', \'clicked\');" onmousedown="setPointer(this, ' . $i . ', \'click\', \'' . $class . '\', \'mouse_over\', \'clicked\');"';
+/*
+ * 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')
+{
- if (!in_array('seen',$aFlags)) {
- $sPre = '<b>'; $sEnd = '</b>';
+ if (!in_array('seen',$aFlags) || !$aFlags['seen']) {
+ $sPre = '<span class="unread">'; $sEnd = '</span>';
*/
foreach ($aOrder as $iCol) {
if (in_array($iCol, $show_label_columns)) {
*/
foreach ($aOrder as $iCol) {
if (in_array($iCol, $show_label_columns)) {
- $aCol = (isset($aColumns[$iCol])) ? $aColumns[$iCol] : array();
- $title = (isset($aCol['title'])) ? $aCol['title'] : '';
- $link = (isset($aCol['link'])) ? $aCol['link'] : '';
- $value = (isset($aCol['value'])) ? $aCol['value'] : '';
- $target = (isset($aCol['target'])) ? $aCol['target'] : '';
+ $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'] : '';
+ $link = (isset($aCol['link'])) ? $aCol['link'] : '';
+ $value = (isset($aCol['value'])) ? $aCol['value'] : '';
+ $target = (isset($aCol['target'])) ? $aCol['target'] : '';
- echo '<td align="' .$align['left'] .'"'. $javascript_auto_click. ' bgcolor="'.$bgcolor.'" style="white-space: nowrap;">' ?>
- <input type="checkbox" name="<?php echo "msg[$i]";?>" id="<?php echo $form_id."_msg$i";?>" value="<?php echo $iUid;?>" <?php echo $checkbox_javascript;?> /></td>
+ if ($javascript_on) {
+ echo '<td class="col_check"'. $javascript_auto_click. '>' ?>
+ <input type="checkbox" name="<?php echo "msg[$i]";?>" id="<?php echo $form_id."_msg$i";?>" value="<?php echo $iUid;?>" <?php echo $checkbox_javascript;?> /></td>
if ($align['left'] == 'left') {
$sText .= str_repeat(' ',$indent);
}
$sText .= "<a href=\"$link\"";
if ($align['left'] == 'left') {
$sText .= str_repeat(' ',$indent);
}
$sText .= "<a href=\"$link\"";
- if ($target) { $sText .= " target=\"$target\"";}
- if ($title) { $sText .= " title=\"$title\"" ;}
+ if ($target) { $sText .= " target=\"$target\""; }
+ if ($title) { $sText .= " title=\"$title\""; }
+ if ($onclick) { $sText .= " onclick=\"$onclick\""; }
+ if ($link_extra) { $sText .= " $link_extra"; }
if ($javascript_on && $fancy_index_highlite) {
$sText .= " onmousedown=\"row_click('$form_id"."_msg$i'); setPointer(this." . (empty($bold) ? '' : 'parentNode.') .
if ($javascript_on && $fancy_index_highlite) {
$sText .= " onmousedown=\"row_click('$form_id"."_msg$i'); setPointer(this." . (empty($bold) ? '' : 'parentNode.') .
- 'parentNode.parentNode, ' . $i . ', \'click\', \'' . $bgcolor . '\', \'' . $mouseoverColor . '\', \'' .
+ 'parentNode.parentNode, ' . $i . ', \'click\', \''. $class. '\', \'mouse_over\', \'' .
- $sText = " <td class=\"col_flags\" align=\"$align[left]\" $javascript_auto_click bgcolor=\"$bgcolor\" style=\"white-space: nowrap;\">";
- $sText .= "<small>$value</small></td>\n";
+ $sText = " <td class=\"col_flags\" $javascript_auto_click>";
+ $sText .= "$value</td>\n";
- <td align="left"><small><?php echo $paginator_str; ?></small></td>
- <td align="right"><small><?php echo $msg_cnt_str; ?></small></td>
+ <td class="links_paginator"><?php echo $paginator_str; ?></td>
+ <td class="message_count"><?php echo $msg_cnt_str; ?></td>