while (($command ne "q") && ($command ne "Q")) {
system "clear";
- if ($menu == 0) {
- print $WHT."SquirrelMail Configuration : ".$NRM;
- if ($config == 1) { print "Read: config.php"; }
- elsif ($config == 2) { print "Read: config_default.php"; }
- print "\n";
+ print $WHT."SquirrelMail Configuration : ".$NRM;
+ if ($config == 1) { print "Read: config.php"; }
+ elsif ($config == 2) { print "Read: config_default.php"; }
+ print "\n";
+ print "---------------------------------------------------------\n";
+ if ($menu == 0) {
print $WHT."Main Menu --\n".$NRM;
print "1. Organization Preferences\n";
print "2. Server Settings\n";
sub set_defaults {
system "clear";
+ print $WHT."SquirrelMail Configuration : ".$NRM;
+ if ($config == 1) { print "Read: config.php"; }
+ elsif ($config == 2) { print "Read: config_default.php"; }
+ print "\n";
+ print "---------------------------------------------------------\n";
+
print "While we have been building SquirrelMail, we have discovered some\n";
print "preferences that work better with some servers that don't work so\n";
print "well with others. If you select your IMAP server, this option will\n";
$sent_folder = "INBOX/Sent Items";
$show_prefix_option = false;
$show_contain_subfolders_option = false;
-
$imap_server_type = "exchange";
+ print " default_folder_prefix = INBOX/\n";
+ print " default_sub_of_inbox = true\n";
+ print " trash_folder = \"INBOX/Deleted Items\"\n";
+ print " sent_folder = \"INBOX/Sent Items\"\n";
+ print " show_prefix_option = false\n";
+ print " show_contain_subfolders_option = false\n";
+ print " imap_server_type = exchange\n";
+
$continue = 1;
} elsif ($server eq "courier") {
$imap_server_type = "courier";
+
+ print " imap_server_type = courier\n";
$continue = 1;
} elsif ($server eq "quit") {
function parseUrl ($body) {
#Possible ways a URL could finish.
- $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ". ", " ", ")", "(",""");
+ $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ". ", " ", ")", "(",
+ """, "<", ">", ".<");
$done=False;
while (!$done) {
#Look for when a URL starts
if ($end == 0) $end = $enda;
if ($enda < $end and $enda != 0) $end = $enda;
}
+ if (!$end) $end = strlen($body);
#Extract URL
$url = substr($body,$where,$end-$where);
#Replace URL with HyperLinked Url
if ($url != "") {
$url_str = "<a href=\"$url\" target=\"_blank\">$url</a>";
# $body = str_replace($url,$url_str,$body);
+ echo "$where, $end<br>";
$body = replaceBlock($body,$url_str,$where,$end);
$start = strpos($body,"</a>",$where);
} else {