Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.28
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
usermin /
mailbox /
[ HOME SHELL ]
Name
Size
Permission
Action
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
ulang
[ DIR ]
drwxr-xr-x
xinha
[ DIR ]
drwxr-xr-x
CHANGELOG
15.09
KB
-rw-r--r--
add_address.cgi
558
B
-rwxr-xr-x
address_chooser.cgi
5.04
KB
-rwxr-xr-x
auto.pl
1.89
KB
-rwxr-xr-x
boxes-lib.pl
80.03
KB
-rwxr-xr-x
classlinks.sh
160
B
-rwxr-xr-x
config-ALL-linux
481
B
-rw-r--r--
config-aix
482
B
-rw-r--r--
config-freebsd
478
B
-rw-r--r--
config-hpux
478
B
-rw-r--r--
config-irix
477
B
-rw-r--r--
config-macos
478
B
-rw-r--r--
config-msc-linux
495
B
-rw-r--r--
config-netbsd
478
B
-rw-r--r--
config-openbsd
478
B
-rw-r--r--
config-openserver
483
B
-rw-r--r--
config-osf1
484
B
-rw-r--r--
config-qnx
478
B
-rw-r--r--
config-solaris
477
B
-rw-r--r--
config-unixware
477
B
-rw-r--r--
config.info
3.15
KB
-rw-r--r--
config.info.ca
3.54
KB
-rwxr-xr-x
config.info.de
1.59
KB
-rw-r--r--
config.info.el
4.76
KB
-rw-r--r--
config.info.hu
0
B
-rw-r--r--
config.info.nl
2.9
KB
-rwxr-xr-x
config.info.no
3.09
KB
-rw-r--r--
copy.cgi
795
B
-rwxr-xr-x
copy_form.cgi
1.08
KB
-rwxr-xr-x
defaultuconfig
732
B
-rw-r--r--
delete_folders.cgi
1.27
KB
-rwxr-xr-x
delete_mail.cgi
6.67
KB
-rwxr-xr-x
detach.cgi
3
KB
-rwxr-xr-x
detachall.cgi
1.83
KB
-rwxr-xr-x
edit_auto.cgi
1.76
KB
-rwxr-xr-x
edit_comp.cgi
1.53
KB
-rwxr-xr-x
edit_folder.cgi
2.62
KB
-rwxr-xr-x
edit_ifolder.cgi
1
KB
-rwxr-xr-x
edit_imap.cgi
1.8
KB
-rwxr-xr-x
edit_pop3.cgi
1.64
KB
-rwxr-xr-x
edit_sig.cgi
499
B
-rwxr-xr-x
edit_virt.cgi
1.19
KB
-rwxr-xr-x
export.cgi
1.27
KB
-rwxr-xr-x
folders-lib.pl
102.93
KB
-rwxr-xr-x
import.cgi
2.97
KB
-rwxr-xr-x
inbox_login.cgi
1.36
KB
-rwxr-xr-x
inbox_login_error.cgi
1.12
KB
-rwxr-xr-x
inbox_logout.cgi
450
B
-rwxr-xr-x
index.cgi
12.21
KB
-rwxr-xr-x
list_addresses.cgi
8.47
KB
-rwxr-xr-x
list_folders.cgi
4.89
KB
-rwxr-xr-x
list_ifolders.cgi
2.77
KB
-rwxr-xr-x
mail_search.cgi
7.43
KB
-rwxr-xr-x
mailbox-lib.pl
65.52
KB
-rwxr-xr-x
module.info
296
B
-rw-r--r--
module.info.af
0
B
-rw-r--r--
module.info.af.auto
152
B
-rw-r--r--
module.info.ar
0
B
-rw-r--r--
module.info.ar.auto
256
B
-rw-r--r--
module.info.be
0
B
-rw-r--r--
module.info.be.auto
300
B
-rw-r--r--
module.info.bg
0
B
-rw-r--r--
module.info.bg.auto
305
B
-rw-r--r--
module.info.ca
26
B
-rw-r--r--
module.info.ca.auto
168
B
-rw-r--r--
module.info.cs
25
B
-rw-r--r--
module.info.cs.auto
142
B
-rw-r--r--
module.info.da
0
B
-rw-r--r--
module.info.da.auto
159
B
-rw-r--r--
module.info.de
119
B
-rw-r--r--
module.info.el
0
B
-rw-r--r--
module.info.el.auto
357
B
-rw-r--r--
module.info.es
26
B
-rw-r--r--
module.info.es.auto
163
B
-rw-r--r--
module.info.eu
0
B
-rw-r--r--
module.info.eu.auto
166
B
-rw-r--r--
module.info.fa
0
B
-rw-r--r--
module.info.fa.auto
242
B
-rw-r--r--
module.info.fi
0
B
-rw-r--r--
module.info.fi.auto
149
B
-rw-r--r--
module.info.fr
26
B
-rw-r--r--
module.info.fr.auto
167
B
-rw-r--r--
module.info.he
0
B
-rw-r--r--
module.info.he.auto
208
B
-rw-r--r--
module.info.hr
0
B
-rw-r--r--
module.info.hr.auto
167
B
-rw-r--r--
module.info.hu
38
B
-rw-r--r--
module.info.hu.auto
173
B
-rw-r--r--
module.info.it
0
B
-rw-r--r--
module.info.it.auto
151
B
-rw-r--r--
module.info.ja
0
B
-rw-r--r--
module.info.ja.auto
213
B
-rw-r--r--
module.info.ko
0
B
-rw-r--r--
module.info.ko.auto
177
B
-rw-r--r--
module.info.lt
0
B
-rw-r--r--
module.info.lt.auto
180
B
-rw-r--r--
module.info.lv
0
B
-rw-r--r--
module.info.lv.auto
168
B
-rw-r--r--
module.info.ms
0
B
-rw-r--r--
module.info.ms.auto
137
B
-rw-r--r--
module.info.mt
0
B
-rw-r--r--
module.info.mt.auto
146
B
-rw-r--r--
module.info.nl
29
B
-rw-r--r--
module.info.nl.auto
137
B
-rw-r--r--
module.info.no
19
B
-rw-r--r--
module.info.no.auto
122
B
-rw-r--r--
module.info.pl
0
B
-rw-r--r--
module.info.pl.auto
170
B
-rw-r--r--
module.info.pt
0
B
-rw-r--r--
module.info.pt.auto
159
B
-rw-r--r--
module.info.pt_BR
0
B
-rw-r--r--
module.info.pt_BR.auto
165
B
-rw-r--r--
module.info.ro
0
B
-rw-r--r--
module.info.ro.auto
173
B
-rw-r--r--
module.info.ru
55
B
-rw-r--r--
module.info.ru.auto
264
B
-rw-r--r--
module.info.sk
0
B
-rw-r--r--
module.info.sk.auto
162
B
-rw-r--r--
module.info.sl
0
B
-rw-r--r--
module.info.sl.auto
155
B
-rw-r--r--
module.info.sv
0
B
-rw-r--r--
module.info.sv.auto
150
B
-rw-r--r--
module.info.th
0
B
-rw-r--r--
module.info.th.auto
306
B
-rw-r--r--
module.info.tr
0
B
-rw-r--r--
module.info.tr.auto
172
B
-rw-r--r--
module.info.uk
0
B
-rw-r--r--
module.info.uk.auto
298
B
-rw-r--r--
module.info.ur
0
B
-rw-r--r--
module.info.ur.auto
282
B
-rw-r--r--
module.info.vi
0
B
-rw-r--r--
module.info.vi.auto
175
B
-rw-r--r--
module.info.zh
0
B
-rw-r--r--
module.info.zh.auto
141
B
-rw-r--r--
module.info.zh_TW
0
B
-rw-r--r--
module.info.zh_TW.auto
147
B
-rw-r--r--
newfolder.cgi
170
B
-rwxr-xr-x
print_mail.cgi
1.21
KB
-rwxr-xr-x
quotacheck.pl
3.13
KB
-rwxr-xr-x
reply_mail.cgi
26.55
KB
-rwxr-xr-x
save_address.cgi
981
B
-rwxr-xr-x
save_allow.cgi
708
B
-rwxr-xr-x
save_auto.cgi
1.07
KB
-rwxr-xr-x
save_comp.cgi
1.18
KB
-rwxr-xr-x
save_folder.cgi
3.85
KB
-rwxr-xr-x
save_group.cgi
744
B
-rwxr-xr-x
save_ifolder.cgi
1.73
KB
-rwxr-xr-x
save_imap.cgi
1.8
KB
-rwxr-xr-x
save_pop3.cgi
1.58
KB
-rwxr-xr-x
save_sig.cgi
595
B
-rwxr-xr-x
save_virt.cgi
983
B
-rwxr-xr-x
search_form.cgi
2.49
KB
-rwxr-xr-x
send_mail.cgi
18.73
KB
-rwxr-xr-x
slideshow.cgi
1.65
KB
-rwxr-xr-x
sort.cgi
1.03
KB
-rwxr-xr-x
specialsync.cgi
1.15
KB
-rwxr-xr-x
system_info.pl
978
B
-rw-r--r--
uconfig.info
5.01
KB
-rw-r--r--
uconfig.info.ca
5.66
KB
-rwxr-xr-x
uconfig.info.cs
5.03
KB
-rw-r--r--
uconfig.info.da
0
B
-rw-r--r--
uconfig.info.de
5.92
KB
-rw-r--r--
uconfig.info.el
7.4
KB
-rw-r--r--
uconfig.info.es
0
B
-rw-r--r--
uconfig.info.fr
145
B
-rw-r--r--
uconfig.info.hu
0
B
-rw-r--r--
uconfig.info.it
3.27
KB
-rw-r--r--
uconfig.info.nl
5.26
KB
-rw-r--r--
uconfig.info.no
5.02
KB
-rw-r--r--
uconfig.info.pl
0
B
-rwxr-xr-x
uconfig.info.pt_BR
5.01
KB
-rw-r--r--
uconfig_info.pl
264
B
-rwxr-xr-x
view_mail.cgi
17.62
KB
-rwxr-xr-x
virtualize.cgi
605
B
-rwxr-xr-x
webmin_menu.pl
4.5
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : view_mail.cgi
#!/usr/bin/perl # view_mail.cgi # View a single email message use strict; use warnings; our (%text, %in, %config, %gconfig, %userconfig); our $module_name; our $user_module_config_directory; require './mailbox-lib.pl'; &ReadParse(); my %inbook; foreach my $a (&list_addresses()) { $inbook{lc($a->[0])}++; } # Get the actual email being viewed, even if is a sub-message my @folders = &list_folders_sorted(); my ($folder) = grep { $_->{'index'} == $in{'folder'} } @folders; my $qid = &urlize($in{'id'}); my $mail = &mailbox_get_mail($folder, $in{'id'}, 0); $mail || &error($text{'view_egone'}); &parse_mail($mail, undef, $in{'raw'}); my @sub = split(/\0/, $in{'sub'}); my $subs = join("", map { "&sub=$_" } @sub); foreach my $s (@sub) { # We are looking at a mail within a mail .. &decrypt_attachments($mail); my $amail = &extract_mail($mail->{'attach'}->[$s]->{'data'}); &parse_mail($amail, undef, $in{'raw'}); $mail = $amail; } my $mid = $mail->{'header'}->{'message-id'}; # Special mode - viewing whole raw message. After this, there is no need to # do anyting else if ($in{'raw'}) { print "Content-type: text/plain\n\n"; if ($mail->{'fromline'}) { print $mail->{'fromline'},"\n"; } if (defined($mail->{'rawheaders'})) { #$mail->{'rawheaders'} =~ s/(\S)\t/$1\n\t/g; print $mail->{'rawheaders'}; } else { foreach my $h (@{$mail->{'headers'}}) { #$h->[1] =~ s/(\S)\t/$1\n\t/g; print "$h->[0]: $h->[1]\n"; } } print "\n"; print $mail->{'body'}; exit; } # Work out base URL for self links my $baseurl = "$gconfig{'webprefix'}/$module_name/view_mail.cgi?id=$qid&folder=$in{'folder'}&start=$in{'start'}$subs"; # Possibly send a DSN, or check if one is needed my $dsn_req = &requires_delivery_notification($mail); my %dsn; my ($sent_dsn, $send_dsn_button, $sent_dsn_at, $sent_dsn_to); if (!@sub && $dsn_req && !$folder->{'sent'} && !$folder->{'drafts'}) { &open_dbm_db(\%dsn, "$user_module_config_directory/dsn", 0600); if ($userconfig{'send_dsn'} == 1 && !$dsn{$mid}) { # Send a DSN for this mail now my $dsnaddr = &send_delivery_notification($mail, undef, 0); if ($dsnaddr) { $dsn{$mid} = time()." ".$dsnaddr; $sent_dsn = 1; } } elsif ($userconfig{'send_dsn'} == 2 && !$dsn{$mid}) { # User may want to send one $send_dsn_button = 1; } ($sent_dsn_at, $sent_dsn_to) = split(/\s+/, $dsn{$mid}, 2); dbmclose(%dsn); } # Check if we have gotten back a DSN for *this* email &update_delivery_notification($mail, $folder); our (%dsnreplies, %delreplies); # XXX sniffy. my ($got_dsn, $got_dsn_from); my @delmsgs; &open_dsn_hash(); if (defined($dsnreplies{$mid}) && $dsnreplies{$mid} != 1) { ($got_dsn, $got_dsn_from) = split(/\s+/, $dsnreplies{$mid}, 2); } if (defined($delreplies{$mid}) && $delreplies{$mid} != 1) { my @del = split(/\s+/, $delreplies{$mid}); my $i; for($i=0; $i<@del; $i+=2) { my $tm = localtime($del[$i]); if ($del[$i+1] =~ /^\!(.*)$/) { push(@delmsgs, &text('view_delfailed', "$1", $tm)); } else { push(@delmsgs, &text('view_delok', $del[$i+1], $tm)); } } } # Mark this mail as read my $refresh; if ($userconfig{'auto_mark'}) { my $wasread = &get_mail_read($folder, $mail); if (($wasread&1) == 0) { &set_mail_read($folder, $mail, $wasread+1); $refresh = 1; } } # Check for encryption my ($deccode, $decmessage) = &decrypt_attachments($mail); my @attach = @{$mail->{'attach'}}; # Find body attachment and type my ($textbody, $htmlbody, $body) = &find_body($mail, $userconfig{'view_html'}); $body = $htmlbody if ($in{'body'} == 2); $body = $textbody if ($in{'body'} == 1); # Show pre-body HTML my $headstuff; if ($body && $body eq $htmlbody && $userconfig{'head_html'}) { $headstuff = &head_html($body->{'data'}); } my $mail_charset = &get_mail_charset($mail, $body); if ($body && &get_charset() eq 'UTF-8' && &can_convert_to_utf8(undef, $mail_charset)) { # Convert to UTF-8 $body->{'data'} = &convert_to_utf8($body->{'data'}, $mail_charset); } else { # Set the character set for the page to match email no warnings "once"; $main::force_charset = $mail_charset; use warnings "once"; } &set_module_index($in{'folder'}); &mail_page_header($text{'view_title'}, $headstuff); &show_arrows(); print "<br>\n"; # Start of form print &ui_form_start("reply_mail.cgi"); print &ui_hidden("id", $in{'id'}),"\n"; print &ui_hidden("folder", $in{'folder'}),"\n"; print &ui_hidden("mod", &modification_time($folder)),"\n"; print &ui_hidden("body", $in{'body'}),"\n"; print &ui_hidden("start", $in{'start'}),"\n"; foreach my $s (@sub) { print &ui_hidden("sub", $s),"\n"; } # Find any delivery status attachment my ($dstatus) = grep { $_->{'type'} eq 'message/delivery-status' } @attach; # Check for signing my ($sigcode, $sigmessage, $sindex) = &check_signature_attachments(\@attach, $textbody); # Check if we can create email filters my $can_create_filter = 0; if (&foreign_available("filter")) { &foreign_require("filter", "filter-lib.pl"); $can_create_filter = !&filter::no_user_procmailrc(); } if ($userconfig{'top_buttons'} == 2 && &editable_mail($mail)) { &show_buttons(1, scalar(@sub)); print "<br>\n"; } # Start of headers section my @hmode; if ($in{'headers'}) { push(@hmode, "<a href='$baseurl&body=$in{'body'}&headers=0&images=$in{'images'}'>$text{'view_noheaders'}</a>"); } else { push(@hmode, "<a href='$baseurl&body=$in{'body'}&headers=1&images=$in{'images'}'>$text{'view_allheaders'}</a>"); } push(@hmode, "<a href='$baseurl&body=$in{'body'}&raw=1&images=$in{'images'}'>$text{'view_raw'}</a>"); print &ui_table_start($text{'view_headers'}, "width=100%", 2, [ "width=10% nowrap" ], &ui_links_row(\@hmode)); if ($in{'headers'}) { # Show all the headers if ($mail->{'fromline'}) { print &ui_table_row($text{'mail_rfc'}, &eucconv_and_escape($mail->{'fromline'})); } foreach my $h (@{$mail->{'headers'}}) { print &ui_table_row("$h->[0]:", &eucconv_and_escape(&decode_mimewords($h->[1]))); } } else { # Just show the most useful headers my @addrs = &split_addresses(&decode_mimewords( $mail->{'header'}->{'from'})); my @toaddrs = &split_addresses(&decode_mimewords( $mail->{'header'}->{'to'})); print &ui_table_row($text{'mail_from'}, &left_right_align(&address_link($mail->{'header'}->{'from'}, $in{'id'}, $subs), &search_link("from", $text{'mail_fromsrch'}, $addrs[0]->[0], $addrs[0]->[1]). &filter_link("From", $text{'mail_fromfilter'}, $addrs[0]->[0]))); print &ui_table_row($text{'mail_to'}, &left_right_align(&address_link($mail->{'header'}->{'to'}, $in{'id'}, $subs), &search_link("to", $text{'mail_tosrch'}, $toaddrs[0]->[0], $toaddrs[0]->[1]). &filter_link("To", $text{'mail_tofilter'}, $toaddrs[0]->[0]))); if ($mail->{'header'}->{'cc'}) { print &ui_table_row($text{'mail_cc'}, &address_link($mail->{'header'}->{'cc'}, $in{'id'}, $subs)); } if ($mail->{'header'}->{'bcc'}) { print &ui_table_row($text{'mail_bcc'}, &address_link($mail->{'header'}->{'bcc'}, $in{'id'}, $subs)); } print &ui_table_row($text{'mail_date'}, &eucconv_and_escape( &simplify_date($mail->{'header'}->{'date'}))); my $subj = $mail->{'header'}->{'subject'}; $subj =~ s/^((Re:|Fwd:|\[\S+\])\s*)+//ig; print &ui_table_row($text{'mail_subject'}, &left_right_align(&convert_header_for_display( $mail->{'header'}->{'subject'}), &search_link("subject", $text{'mail_subsrch'}, $subj). &filter_link("Subject", $text{'mail_subfilter'}, ".*".$subj))); } print &ui_table_end(); # Show body attachment, with properly linked URLs my $image_mode = defined($in{'images'}) ? $in{'images'} : $userconfig{'view_images'}; my @bodyright; my ($bodycontents, $bodystuff); if ($body && $body->{'data'} =~ /\S/) { if ($body eq $textbody) { # Show plain text $bodycontents = "<pre>"; foreach my $l (&wrap_lines(&eucconv($body->{'data'}), $userconfig{'wrap_width'})) { $bodycontents .= &link_urls_and_escape($l, $userconfig{'link_mode'})."\n"; } $bodycontents .= "</pre>"; if ($htmlbody && $userconfig{'view_html'} != 0) { # Link to show HTML push(@bodyright, "<a href='$baseurl&body=2&headers=$in{'headers'}'>$text{'view_ashtml'}</a>"); } } elsif ($body eq $htmlbody) { # Attempt to show HTML ($bodycontents, $bodystuff) = &safe_html($body->{'data'}); my @imageurls; $bodycontents = &disable_html_images($bodycontents, $image_mode, \@imageurls); $bodycontents = &fix_cids($bodycontents, \@attach, "detach.cgi?id=$qid&folder=$in{'folder'}$subs"); if ($userconfig{'link_mode'}) { $bodycontents = &links_urls_new_target($bodycontents); } if ($textbody) { # Link to show text push(@bodyright, "<a href='$baseurl&body=1&headers=$in{'headers'}&images=$in{'images'}'>$text{'view_astext'}</a>"); } if (@imageurls && $image_mode) { # Link to show images push(@bodyright, "<a href='$baseurl&body=$in{'body'}&headers=$in{'headers'}&images=0'>$text{'view_images'}</a>"); } } } if ($bodycontents) { print &ui_table_start($text{'view_body'}, "width=100%", 1, undef, @bodyright ? &ui_links_row(\@bodyright) : undef); print &ui_table_row(undef, $bodycontents, undef, [ undef, $bodystuff ]); print &ui_table_end(); } else { print &ui_table_start($text{'view_body'}, "width=100%", 1); print &ui_table_row(undef, "<b>$text{'view_nobody'}</b>"); print &ui_table_end(); } # If *this* message is a delivery status, display it if ($dstatus) { &show_delivery_status($dstatus); } # Display other attachments @attach = &remove_body_attachments($mail, \@attach); @attach = &remove_cid_attachments($mail, \@attach); if (@attach) { # Table of attachments my $viewurl = "view_mail.cgi?id=".&urlize($in{'id'}). "&folder=$folder->{'index'}$subs"; my $detachurl = "detach.cgi?id=".&urlize($in{'id'}). "&folder=$folder->{'index'}$subs"; my @detach = &attachments_table(\@attach, $folder, $viewurl, $detachurl, undef, undef, undef); # Links to download all / slideshow my @links; if (@attach > 1 && &can_download_all()) { push(@links, "<a href='detachall.cgi/attachments.zip?folder=$in{'folder'}&id=$qid$subs'>$text{'view_aall'}</a>"); } my @iattach = grep { $_->{'type'} =~ /^image\// } @attach; if (@iattach > 1) { push(@links, "<a href='slideshow.cgi?folder=$in{'folder'}&id=$qid$subs'>$text{'view_aslideshow'}</a>"); } print &ui_links_row(\@links) if (@links); # Show form to detact to server, if enabled if ($config{'server_attach'} == 2 && @detach) { print &ui_table_start($text{'view_dheader'}, "width=100%", 1); my $dtach = &ui_submit($text{'view_detach'}, 'detach'); $dtach .= &ui_hidden("bindex", $body->{'idx'}) if ($body); $dtach .= &ui_hidden("sindex", $sindex) if (defined($sindex)); $dtach .= &ui_select("attach", undef, [ [ '*', $text{'view_dall'} ], @detach ]); $dtach .= "<b>$text{'view_dir'}</b>\n"; $dtach .= &ui_textbox("dir", undef, 60)." ". &file_chooser_button("dir", 1); print &ui_table_row(undef, $dtach); print &ui_table_end(); } } # Display GnuPG results if (defined($sigcode)) { print &ui_table_start($text{'view_gnupg'}, "width=100%", 1); $sigmessage = &html_escape($sigmessage); $sigmessage = $sigmessage if ($sigcode == 4); print &ui_table_row(undef, &text('view_gnupg_'.$sigcode, $sigmessage)); if ($sigcode == 3) { print &ui_table_row(undef, &text('view_recv', $sigmessage, "/gnupg/recv.cgi?id=$sigmessage&return=".&urlize($baseurl)."&returnmsg=".&urlize($text{'view_return'}))); } print &ui_table_end(); } if ($deccode) { print &ui_table_start($text{'view_crypt'}, "width=100%", 1); print &ui_table_row(undef, &text('view_crypt_'.$deccode, "<pre>$decmessage</pre>")); print &ui_table_end(); } # Display DSN status if ($sent_dsn_to || $send_dsn_button || $got_dsn || @delmsgs) { print &ui_table_start($text{'view_dsn'}, "width=100%", 1); if ($sent_dsn_to) { print &ui_table_row(undef, &text($sent_dsn ? 'view_dnsnow' : 'view_dsnbefore', &html_escape($sent_dsn_to), &make_date($sent_dsn_at))); } elsif ($send_dsn_button) { print &ui_table_row(undef, &text('view_dsnreq', &html_escape($dsn_req))."<br>". &ui_submit($text{'view_dsnsend'}, "dsn")); } elsif ($got_dsn) { print &ui_table_row(undef, &text('view_dsngot', &html_escape($got_dsn_from), &make_date($got_dsn))); } elsif (@delmsgs) { print &ui_table_row(undef, join("<br>\n", @delmsgs)); } print &ui_table_end(); } &show_buttons(2, scalar(@sub)) if (&editable_mail($mail)); if ($userconfig{'arrows'} == 2 && !@sub) { print "<br>\n"; &show_arrows(); } print "</form>\n"; if ($refresh) { # Refresh left frame if we have changed the read status if (defined(&theme_post_save_folder)) { &theme_post_save_folder($folder, 'read'); } } # Show footer links my @sr = !@sub ? ( ) : ( "view_mail.cgi?id=$qid&folder=$in{'folder'}", $text{'view_return'} ), &mail_page_footer(@sub ? ( "view_mail.cgi?id=$qid&folder=$in{'folder'}", $text{'view_return'} ) : ( ), "index.cgi?folder=$in{'folder'}&start=$in{'start'}", $text{'mail_return'}); &save_last_folder_id($folder); &pop3_logout_all(); # show_buttons(pos, submode) sub show_buttons { my $spacer = " \n"; if ($folder->{'sent'} || $folder->{'drafts'}) { print &ui_submit($text{'view_enew'}, "enew"); print &ui_submit($text{'view_reply'}, "ereply"); print &ui_submit($text{'view_reply2'}, "erall"); } else { print &ui_submit($text{'view_reply'}, "reply"); print &ui_submit($text{'view_reply2'}, "rall"); } print $spacer; if ($userconfig{'open_mode'}) { # Compose button needs to pop up a window print &ui_submit($text{'mail_compose'}, "new", undef, "onClick='window.open(\"reply_mail.cgi?new=1\", \"compose\", \"toolbar=no,menubar=no,scrollbars=yes,width=1024,height=768\"); return false'>"); } else { # Compose button can just submit and redirect print &ui_submit($text{'mail_compose'}, "new"); } print $spacer; print &ui_submit($text{'view_forward'}, "forward"); print $spacer; if (!$_[1]) { # Show mark buttons, except for current mode if (!$folder->{'sent'} && !$folder->{'drafts'}) { my $m = &get_mail_read($folder, $mail); foreach my $i (0 .. 2) { if ($m != $i) { print &ui_submit($text{'view_markas'.$i}, "markas".$i); } } print $spacer; } if (@folders > 1) { print &movecopy_select($_[0], \@folders, $folder); print $spacer; } print &ui_submit($text{'view_delete'}, "delete"); print $spacer; } else { if (@folders > 1) { print &movecopy_select($_[0], \@folders, $folder, 1); print $spacer; } } print &ui_submit($text{'view_print'}, "print", undef, "onClick='window.open(\"print_mail.cgi?id=".&urlize($in{'id'}). "&folder=".&urlize($in{'folder'}). "&print=1\", \"print\"); return false'"); print $spacer; if (!$_[1]) { # Show spam and/or ham report buttons if ($userconfig{'spam_buttons'} =~ /mail/ && &can_report_spam($folder)) { print &ui_submit($text{'view_black'}, "black"); if ($userconfig{'spam_del'}) { print &ui_submit($text{'view_razordel'}, "razor"); } else { print &ui_submit($text{'view_razor'}, "razor"); } print $spacer; } if ($userconfig{'spam_buttons'} =~ /mail/ && &can_report_ham($folder)) { if ($userconfig{'white_move'} && $folder->{'spam'}) { print &ui_submit($text{'view_whitemove'}, "white"); } else { print &ui_submit($text{'view_white'}, "white"); } if ($userconfig{'ham_move'} && $folder->{'spam'}) { print &ui_submit($text{'view_hammove'}, "ham"); } else { print &ui_submit($text{'view_ham'}, "ham"); } print $spacer; } } print "<br>\n"; } sub show_arrows { if (!@sub) { # Get next and previous emails, where they exist my $c = &mailbox_folder_size($folder, 1); my $prv = $mail->{'sortidx'} == 0 ? 0 : $mail->{'sortidx'}-1; my $nxt = $mail->{'sortidx'} == $c-1 ? $c-1 : $mail->{'sortidx'}+1; my @beside = &mailbox_list_mails_sorted($prv, $nxt, $folder, 1); my ($left, $right); if ($mail->{'sortidx'} != 0) { my $mailprv = $beside[$prv]; $left = "view_mail.cgi?id=".&urlize($mailprv->{'id'}). "&folder=$in{'folder'}&start=$in{'start'}"; } if ($mail->{'sortidx'} < $c-1) { my $mailnxt = $beside[$nxt]; $right = "view_mail.cgi?id=".&urlize($mailnxt->{'id'}). "&folder=$in{'folder'}&start=$in{'start'}"; } print &ui_page_flipper(&text('view_desc', $mail->{'sortidx'}+1, $folder->{'name'}), undef, undef, $left, $right); } else { print "<center>$text{'view_sub'}</center>\n"; } } # search_link(field, text, what, ...) # Returns HTML for a link to search for mails with the same sender or subject sub search_link { my ($field, $text, @what) = @_; my $fid; if ($userconfig{'related_search'}) { # Search is across all folders $fid = -$userconfig{'related_search'}; } elsif (!$folder->{'searchable'}) { # Search is source folder if ($mail->{'subfolder'}) { $fid = $mail->{'subfolder'}->{'index'}; } else { return undef; } } else { # Search is in this folder $fid = $in{'folder'}; } if ($_[1]) { my $qtext = "e_escape($text); my $whats; my $fields; my $i = 0; foreach my $w (@what) { if ($w) { $fields .= "&field_".$i."=".&urlize($field); $whats .= "&what_".$i."=".&urlize($w); $i++; } } return "<a href='mail_search.cgi?folder=".$fid."&and=0". $fields.$whats. "'><img src=images/search.gif ". "alt='$qtext' title='$qtext' border=0></a>"; } else { return undef; } } # filter_link(field, text, value) # Returns HTML for creating an email filter matching some field, if possible sub filter_link { my ($field, $text, $what) = @_; return undef if (!$can_create_filter); my $qtext = "e_escape($text); return "<a href='../filter/edit.cgi?new=1&header=".&urlize($field). "&value=".&urlize($what)."'><img src=images/filter.gif ". "alt='$qtext' title='$qtext' border=0></a>"; }
Close