# Modified: $Date: 2013/06/12 14:05:47 $
# Language: perl
#
-# (c) Copyright 2000-2006, Andrew@DeFaria.com, all rights reserved.
+# (c) Copyright 2000-2021, Andrew@DeFaria.com, all rights reserved.
#
################################################################################
use strict;
th {-class => 'tablebordertopright'}, 'Comment',
];
- for my $sender (ReturnSenders(
+ my @senders = ReturnSenders(
userid => $userid,
type => $type,
start_at => $next,
lines => $lines,
date => $date
- )) {
+ );
+
+ for my $sender (@senders) {
my $msgs = ReturnMessages(
userid => $userid,
sender => $sender,
);
+ my $leftclass = 'tableleftdata';
+ my $dataclass = 'tabledata';
+ my $rightclass = 'tablerightdata';
+ my $senderclass = 'sender';
+ my $subjectclass = 'subject';
+
+ # Check to see if this is the last line
+ if ((($next + 1) % $lines) == (@senders % $lines)) {
+ # We always "bottom" the first column
+ $leftclass = 'tablebottomleft';
+
+ # Check to see if there any message lines to display
+ unless (@$msgs) {
+ $dataclass = 'tablebottomdata';
+ $rightclass = 'tablebottomright';
+ $senderclass = 'senderbottom';
+ } # unless
+ } # if
+
# This is for the purposes of supplying a subject line if the mailto address
# is clicked on. It's kludgy because we are simply grabbing the subject line
- # of the first email sent where there may be many emails from this sender.
+ # of the first email sent where there may be many emails from this sender
# Still it is often the right subject (or a good enough one)
#
# A little tricky here because of transliteration. If I test for
print start_Tr {-valign => 'middle'};
print td {
- -class => 'tableborder',
+ -class => $leftclass,
+ -align => 'right',
+ -valign => 'middle',
-rowspan => $rowspan,
- }, small ($next,
+ }, $next,
checkbox {
- -name => "action$next",
- -label => ''
- }), hidden({
+ -name => "action$next",
+ -label => '',
+ -valign => 'middle',
+ };
+
+ print hidden({
-name => "email$next",
- -default => $sender
+ -default => $sender,
});
# Get subject line
$heading = "?subject=$heading" if $heading;
print td {
- -class => 'sender',
+ -class => $senderclass,
}, a {
-href => "mailto:$sender$heading",
- }, " $sender";
+ }, " $sender";
my $listlink = ($list and $sequence) ? "$list:$sequence" : ' ';
print td {
- -class => 'tabledata',
+ -class => $dataclass,
-align => 'right',
}, a {
href => "/maps/php/list.php?type=$list&next=" . ($sequence - 1),
}, $listlink,
td {
- -class => 'tabledata',
+ -class => $dataclass,
-align => 'right',
}, "$hit_count ",
td {
- -class => 'tabledata',
+ -class => $dataclass,
}, $rule,
td {
- -class => 'tablerightdata',
+ -class => $rightclass,
}, $comment;
print end_Tr;
for my $rec (@$msgs) {
+ # We increased $next earlier so do not add 1 here
+ if (($next % $lines) == (@senders % $lines)) {
+ $dataclass = 'tablebottomdata';
+ $rightclass = 'tablebottomright';
+ $subjectclass = 'subjectbottom';
+ } # if
+
if ($date eq substr ($rec->{timestamp}, 0, 10)) {
$rec->{date} = b font {-color => 'green'}, SQLDatetime2UnixDatetime $rec->{timestamp};
} else {
print
Tr [
td {
- -class => 'subject',
- -valign => 'middle',
- -bgcolor => '#ffffff',
+ -class => $subjectclass,
-colspan => 4,
- }, a {-href => "display.cgi?sender=$sender;msg_date=$rec->{timestamp}"
+ }, a {
+ -href => "display.cgi?sender=$sender;msg_date=$rec->{timestamp}",
}, ' ' . $rec->{subject},
- td {-class => 'tablerightdata',
+ td {-class => $rightclass,
-width => '150',
- -valign => 'middle',
- -align => 'right'}, span {-class => 'date'}, $rec->{date},
+ -align => 'right'}, span {-class => 'date'}, $rec->{date} . ' ',
];
} # for
} # for
- print
- Tr [
- td {-class => 'tableborderbottomleft'}, ' ',
- th {-class => 'tableborder'}, ' ',
- th {-class => 'tableborder'}, ' ',
- th {-class => 'tableborder'}, ' ',
- th {-class => 'tableborder'}, ' ',
- th {-class => 'tableborderbottomright'}, ' '
- ];
print end_table;
print end_form;
return unless $execute;
- while (!eof *$msgfile) {
- my ($sender, $sender_long, $reply_to, $subject, $data) = ReadMsg (*$msgfile);
+ while (!eof $msgfile) {
+ my ($sender, $sender_long, $reply_to, $subject, $data) = ReadMsg ($msgfile);
my ($onlist, $rule, $sequence, $hit_count);
my %userOptions = SetContext $userid
or die "$userid is not a registered MAPS user\n";
-ProcessMsgs $msgfile, $userOptions{name}, $userOptions{email};
+ProcessMsgs $msgfile, $userOptions{name}, lc $userOptions{email};
exit 0;
background: SteelBlue;
color: white;
font-style: bold;
- font-size: 14;
+ font-size: 14px;
text-align: center;
-moz-border-radius-topleft: 7px;
border-top-left-radius: 7px;
background: SteelBlue;
color: white;
font-style: bold;
- font-size: 14;
+ font-size: 14px;
text-align: center;
-moz-border-radius-topright: 7px;
border-top-right-radius: 7px;
background: SteelBlue;
color: white;
font-style: bold;
- font-size: 14;
+ font-size: 14px;
text-align: center;
-moz-border-radius-topleft: 7px;
border-top-left-radius: 7px;
background: SteelBlue;
color: white;
font-style: bold;
- font-size: 14;
+ font-size: 14px;
text-align: center;
-moz-border-radius-topright: 7px;
border-top-right-radius: 7px;
background: SteelBlue;
color: white;
font-style: bold;
- font-size: 14;
+ font-size: 14px;
text-align: center;
-moz-border-radius-bottomleft: 7px;
border-bottom-left-radius: 7px;
background: SteelBlue;
color: white;
font-style: bold;
- font-size: 14;
+ font-size: 14px;
text-align: center;
-moz-border-radius-bottomright: 7px;
border-bottom-right-radius: 7px;
background: SteelBlue;
color: white;
font-style: bold;
- font-size: 14;
+ font-size: 14px;
text-align: center;
}
.tableleftdata {
background: White;
- color: Red;
+ color: black;
border-left: solid 3px SteelBlue;
border-bottom: 1px dotted #ccc;
- font-size: 14;
+ font-size: 12px;
}
.tableleftrightdata {
background: #c1dffc;
border-right: solid 3px SteelBlue;
border-left: solid 1px SteelBlue;
border-bottom: 1px dotted #ccc;
- font-size: 14;
+ font-size: 12px;
}
.tablerightleftdata {
background: #c1dffc;
border-right: solid 1px SteelBlue;
border-left: solid 3px SteelBlue;
border-bottom: 1px dotted #ccc;
- font-size: 14;
+ font-size: 12px;
}
.tablerightdata {
background: White;
border-right: solid 3px SteelBlue;
border-left: 1px dotted #ccc;
border-bottom: 1px dotted #ccc;
- font-size: 14;
+ font-size: 12px;
}
.tablebottomleft {
background: White;
- color: Red;
+ color: black;
border-left: solid 3px SteelBlue;
border-right: 1px dotted #ccc;
border-bottom: solid 3px SteelBlue;
- font-size: 14;
+ font-size: 14px;
-moz-border-radius-bottomleft: 7px;
border-bottom-left-radius: 7px;
}
border-right: solid 3px SteelBlue;
border-left: 1px dotted #ccc;
border-bottom: solid 3px SteelBlue;
- font-size: 14;
+ font-size: 14px;
-moz-border-radius-bottomright: 7px;
border-bottom-right-radius: 7px;
}
background: White;
border-left: 1px dotted #ccc;
border-bottom: solid 3px SteelBlue;
- font-size: 14;
+ font-size: 14px;
}
.tablebottomlefttotal {
background: #c1dffc;
border-left: solid 3px SteelBlue;
border-bottom: solid 3px SteelBlue;
border-right: 1px dotted #ccc;
- font-size: 14;
+ font-size: 14px;
-moz-border-radius-bottomleft: 7px;
border-bottom-left-radius: 7px;
}
background: #c1dffc;
border-right: solid 3px SteelBlue;
border-bottom: solid 3px SteelBlue;
- font-size: 14;
+ font-size: 14px;
-moz-border-radius-bottomright: 7px;
border-bottom-right-radius: 7px;
}
border-bottom: solid 3px SteelBlue;
border-top: solid 1px SteelBlue;
border-right: 1px dotted #ccc;
- font-size: 14;
+ font-size: 14px;
}
.tabledata {
background: White;
border-left: 1px dotted #ccc;
border-bottom: 1px dotted #ccc;
- font-size: 14;
+ font-size: 14px;
}
+
.date {
background: White;
- font-size: 10px;
+ font-size: 12px;
}
.dateright {
/* Special anchor effects */
.sender {
background: White;
+ border-top: 1px dotted #ccc;
+ border-left: 1px dotted #ccc;
font-family: arial, sans-serif;
- font-size: 12px;
- font-weight: bold;
+ font-size: 14px;
}
-
.sender a:link {
- color: Red;
+ color: steelblue;
}
-
-.sender a:visited {
- color: #0054e3;
-}
-
.sender a:hover {
- color: White;
- background: Red;
+ color: red;
+ background: white;
}
-.sender a:active {
- color: Yellow;
+.senderbottom {
+ background: White;
+ border-top: 1px dotted #ccc;
+ border-left: 1px dotted #ccc;
+ border-bottom: solid 3px SteelBlue;
+ font-size: 14px;
+}
+.senderbottom a:link {
+ color: steelblue;
+}
+.senderbottom a:hover {
+ color: red;
+ background: white;
}
.subject {
- background: White;
- font-family: arial, sans-serif;
- font-size: 10px;
- font-weight: bold;
+ background: white;
+ border-top: 1px dotted #ccc;
+ border-left: 1px dotted #ccc;
+ font-family: arial, sans-serif;
+ font-size: 16px;
}
-
.subject a:link {
- color: #0000ee;
+ color: #b11;
}
-
.subject a:visited {
- color: #cc33cc;
+ color: grey;
}
-
.subject a:hover {
- color: White;
- background: #0054e3;
+ color: blue;
+ background: white;
}
-.subject a:active {
- color: #ff0000;
+.subjectbottom {
+ background: White;
+ border-top: 1px dotted #ccc;
+ border-left: 1px dotted #ccc;
+ border-bottom: solid 3px SteelBlue;
+ font-size: 16px;
+}
+.subjectbottom a:link {
+ color: #b11;
+}
+.subjectbottom a:visited {
+ color: grey;
+}
+.subjectbottom a:hover {
+ color: blue;
+ background: white;
}
/* Menu anchors */
my $condition = "userid='$userid'";
$condition .= " and $additional_condition" if $additional_condition;
- return $db->count_distinct('log', 'sender', $condition);
+ return $db->count('log', $condition);
} # CountLog
sub Decrypt ($$) {
or DBError("DisplayList: Unable to execute query: ", $statement);
for ($i = 0; $i < $lines; $i++) {
- $row = mysqli_fetch_array ($result);
+ $row = mysqli_fetch_array($result);
- if (!isset ($row ["sequence"])) {
+ if (!isset ($row["sequence"])) {
break;
} // if
$rightclass = ($i == $lines || $sequence == $total || $sequence == $last) ?
"tablebottomright" : "tablerightdata";
- print "<td class=$leftclass align=center>" . $sequence . "</td>";
- print "<td class=$dataclass align=center><input type=checkbox name=action" . $sequence . " value=on></td>\n";
+ print "<td class=$leftclass align=right>" . $sequence . "<input type=checkbox name=action" . $sequence . " value=on></td>\n";
print "<td class=$dataclass align=right>" . $username . "</td>";
print "<td class=$dataclass align=center>@</td>";
print "<td class=$dataclass align=left><a href=\"http://$domain\" target=_blank>$domain</a></td>";
</div>
<table border="0" cellspacing="0" cellpadding="4" width="100%" align="center" name="list">
<tr>
- <th class="tableleftend">Seq</th>
- <th class="tableheader">Mark</th>
+ <th class="tableleftend"> </th>
<th class="tableheader">Username</th>
<th class="tableheader">@</th>
<th class="tableheader">Domain</th>
<th class="tablerightend">Comments</th>
</tr>
- <?php DisplayList ($type, $next, $lines)?>
+ <?php DisplayList($type, $next, $lines)?>
</table>
<br>