diff options
author | cvs2git | 2006-10-01 20:38:07 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | ce6cc7cd42da78f2ecbdb819fc288b12157eafea (patch) | |
tree | 4df3ba5ebd45f098b393a22dccaeab84b1e314d1 | |
parent | 7889880f51b59acb6940d18bda93671783f4ff5e (diff) | |
download | uebimiau-AC-branch.zip uebimiau-AC-branch.tar.gz |
This commit was manufactured by cvs2git to create branch 'AC-branch'.AC-branch
Sprout from master 2006-10-01 20:38:07 UTC Elan Ruusamäe <glen@pld-linux.org> '- rel 1'
Cherrypick from master 2005-08-05 07:33:46 UTC Michał Łukaszek <mlukaszek+pld@gmail.com> '- makes uebimiau give focus to the email or user field on the login screen':
uebimiau-bugfixes.patch -> 1.2
uebimiau-focus.patch -> 1.1
-rw-r--r-- | uebimiau-bugfixes.patch | 3101 | ||||
-rw-r--r-- | uebimiau-focus.patch | 12 |
2 files changed, 3113 insertions, 0 deletions
diff --git a/uebimiau-bugfixes.patch b/uebimiau-bugfixes.patch new file mode 100644 index 0000000..e3201a7 --- /dev/null +++ b/uebimiau-bugfixes.patch @@ -0,0 +1,3101 @@ +--- uebimiau-2.7.8-RC1-any/readmsg.php 2003-07-03 23:34:58.000000000 +0000 ++++ uebimiau-2.7.8-RC1-any.new/readmsg.php 2004-12-08 22:34:45.967411432 +0000 +@@ -1,310 +1,310 @@ +-<?
+-/************************************************************************
+-UebiMiau is a GPL'ed software developed by
+-
+- - Aldoir Ventura - aldoir@users.sourceforge.net
+- - http://uebimiau.sourceforge.net
+-
+-Fell free to contact, send donations or anything to me :-)
+-So Paulo - Brasil
+-*************************************************************************/
+-
+-//defines
+-require("./inc/inc.php");
+-
+-if(!isset($ix) || !isset($pag)) redirect("error.php?err=3&sid=$sid&tid=$tid&lid=$lid");
+-
+-$folderkey = base64_encode(strtolower($folder));
+-
+-$mysess = $sess["headers"][$folderkey];
+-$mail_info = $mysess[$ix];
+-$arAttachment = Array();
+-
+-if(isset($attachment)) {
+-
+- $is_attached = true;
+- $arAttachment = explode(",",$attachment);
+-
+- $UM->current_level = $arAttachment;
+-
+- $root = $mail_info;
+- foreach($arAttachment as $item )
+- if(is_numeric($item))
+- $root = &$root["attachments"][$item];
+-
+- if( !is_array($root) ||
+- !file_exists($root["filename"])) redirect("error.php?err=3&sid=$sid&tid=$tid&lid=$lid");
+-
+- $result = $UM->_read_file($root["filename"]);
+-
+-} else {
+- $is_attached = false;
+- $arAttachment = Array();
+- if(!$UM->mail_connect()) { redirect("error.php?err=1&sid=$sid&tid=$tid&lid=$lid"); exit; }
+- if(!$UM->mail_auth()) { redirect("badlogin.php?sid=$sid&tid=$tid&lid=$lid&error=".urlencode($UM->mail_error_msg)); exit; }
+-
+- if(!($result = $UM->mail_retr_msg($mail_info,1))) { redirect("messages.php?err=2&folder=".urlencode($folder)."&pag=$pag&sid=$sid&tid=$tid&lid=$lid&refr=true"); exit; }
+- if($UM->mail_set_flag($mail_info,"\\SEEN","+")) {
+- $sess["headers"][$folderkey][$ix] = $mail_info;
+- }
+-
+- $UM->mail_disconnect();
+-
+-}
+-echo($nocache);
+-
+-$UM->displayimages = $prefs["display-images"];
+-$UM->allow_scripts = $allow_scripts;
+-
+-$email = $UM->Decode($result);
+-
+-if($ix > 0) {
+-
+- $umHavePrevious = 1;
+- $umPreviousSubject = $mysess[($ix-1)]["subject"];
+- $umPreviousLink = "readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=".($ix-1)."&sid=$sid&tid=$tid&lid=$lid";
+-
+- $smarty->assign("umHavePrevious",$umHavePrevious);
+- $smarty->assign("umPreviousSubject",$umPreviousSubject);
+- $smarty->assign("umPreviousLink",$umPreviousLink);
+-
+-}
+-
+-if($ix < (count($mysess)-1)) {
+- $umHaveNext = 1;
+- $umNextSubject = $mysess[($ix+1)]["subject"];
+- $umNextLink = "readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=".($ix+1)."&sid=$sid&tid=$tid&lid=$lid";
+- $smarty->assign("umHaveNext",$umHaveNext);
+- $smarty->assign("umNextSubject",$umNextSubject);
+- $smarty->assign("umNextLink",$umNextLink);
+-}
+-
+-
+-
+-$body = $email["body"];
+-
+-if($block_external_images)
+- $body = eregi_replace("(src|background)=([\"]?)(http[s]?:\/\/[a-z0-9~#%@\&:=?+\/\.,_-]+[a-z0-9~#%@\&=?+\/_-]+)([\"]?)","\\1=\\2images/trans.gif\\4 original_url=\"\\3\"",$body);
+-
+-
+-$redir_path = getenv("PHP_SELF")?getenv("PHP_SELF"):$_SERVER["PHP_SELF"];
+-if(!$redir_path) $redir_path = $PHP_SELF;
+-$redir_path = dirname($redir_path)."/redir.php";
+-
+-$body = eregi_replace("target=[\"]?[A-Z_]+[\"]?","target=\"blank\"",$body);
+-$body = eregi_replace("href=\"http([s]?)://","target=\"_blank\" href=\"$redir_path?http\\1://",$body);
+-$body = eregi_replace("href=\"mailto:","target=\"_top\" href=\"newmsg.php?sid=$sid&tid=$tid&lid=$lid&to=",$body);
+-
+-$uagent = $HTTP_SERVER_VARS["HTTP_USER_AGENT"];
+-
+-$ns4 = (ereg("Mozilla/4",$uagent) && !ereg("MSIE",$uagent) &&
+- !ereg("Gecko",$uagent));
+-$ns6moz = ereg("Gecko",$uagent);
+-$ie4up = ereg("MSIE (4|5|6)",$uagent);
+-$other = (!$ns4 && !$ns6moz && !$ie4up);
+-
+-
+-if ($other) {
+- $body = eregi_replace("<base","<uebimiau_base_not_alowed",
+- eregi_replace("<link","<uebimiau_link_not_alowed",
+- $body));
+-
+- if(eregi("<[ ]*body.*background[ ]*=[ ]*[\"']?([A-Za-z0-9._&?=:/{}%+-]+)[\"']?.*>",$body,$regs))
+- $backimg = " background=\"".$regs[1]."\"";
+- $smarty->assign("umBackImg",$backimg);
+- if(eregi("<[ ]*body[A-Z0-9._&?=:/\"' -]*bgcolor=[\"']?([A-Z0-9#]+)[\"']?[A-Z0-9._&?=:/\"' -]*>",$body,$regs))
+- $backcolor = " bgcolor=\"".$regs[1]."\"";
+- $smarty->assign("umBackColor",$backcolor);
+-
+- $body = eregi_replace("<body","<uebimiau_body_not_alowed",$body);
+- $body = eregi_replace("a:(link|visited|hover)",".".uniqid(""),$body);
+- $body = eregi_replace("(body)[ ]?\\{",".".uniqid(""),$body);
+-
+-} elseif($ie4up || $ns6moz) {
+- $sess["currentbody"] = $body;;
+- $body = "<iframe src=\"show_body.php?sid=$sid&tid=$tid&lid=$lid&folder=".htmlspecialchars($folder)."&ix=$ix\" width=\"100%\" height=\"400\" frameborder=\"0\"></iframe>";
+-
+-} elseif($ns4) {
+- $sess["currentbody"] = $body;;
+- $body = "<ilayer width=\"100%\" left=\"0\" top=\"0\">$body</ilayer>";
+-}
+-
+-$smarty->assign("umMessageBody",$body);
+-
+-
+-$ARFrom = $email["from"];
+-$useremail = $sess["email"];
+-
+-// from
+-$name = $ARFrom[0]["name"];
+-$thismail = $ARFrom[0]["mail"];
+-$ARFrom[0]["link"] = "newmsg.php?nameto=".urlencode($name)."&mailto=$thismail&sid=$sid&tid=$tid&lid=$lid";
+-$ARFrom[0]["title"] = "$name <$thismail>";
+-
+-$smarty->assign("umFromList",$ARFrom);
+-
+-// To
+-$ARTo = $email["to"];
+-
+-for($i=0;$i<count($ARTo);$i++) {
+- $name = $ARTo[$i]["name"];
+- $thismail = $ARTo[$i]["mail"];
+- $link = "newmsg.php?nameto=".urlencode($name)."&mailto=$thismail&sid=$sid&tid=$tid&lid=$lid";
+- $ARTo[$i]["link"] = $link;
+- $ARTo[$i]["title"] = "$name <$thismail>";
+- $smarty->assign("umTOList",$ARTo);
+-}
+-
+-// CC
+-$ARCC = $email["cc"];
+-if(count($ARCC) > 0) {
+- $smarty->assign("umHaveCC",1);
+- for($i=0;$i<count($ARCC);$i++) {
+- $name = $ARCC[$i]["name"];
+- $thismail = $ARCC[$i]["mail"];
+- $link = "newmsg.php?nameto=".urlencode($name)."&mailto=$thismail&sid=$sid&tid=$tid&lid=$lid";
+- $ARCC[$i]["link"] = $link;
+- $ARCC[$i]["title"] = "$name <$thismail>";
+- }
+- $smarty->assign("umCCList",$ARCC);
+-}
+-
+-$smarty->assign("umPageTitle",$email["subject"]);
+-
+-$jssource = "
+-<script language=\"JavaScript\">
+-function deletemsg() {
+- if(confirm('".ereg_replace("'","\\'",$confirm_delete)."'))
+- with(document.move) { decision.value = 'delete'; submit(); }
+-}
+-function reply() { document.msg.submit(); }
+-function movemsg() { document.move.submit(); }
+-function newmsg() { location = 'newmsg.php?folder=$folder&pag=$pag&sid=$sid&tid=$tid&lid=$lid'; }
+-function headers() { mywin = window.open('headers.php?folder=".urlencode($folder)."&ix=$ix&sid=$sid&tid=$tid&lid=$lid','Headers','width=550, top=100, left=100, height=320,directories=no,toolbar=no,status=no,scrollbars=yes,resizable=yes'); }
+-function catch_addresses() { window.open('catch.php?folder=".urlencode($folder)."&ix=$ix&sid=$sid&tid=$tid&lid=$lid','Catch','width=550, top=100, left=100, height=320,directories=no,toolbar=no,status=no,scrollbars=yes'); }
+-function block_addresses() { window.open('block_address.php?folder=".urlencode($folder)."&ix=$ix&sid=$sid&tid=$tid&lid=$lid','Block','width=550, top=100, left=100, height=320,directories=no,toolbar=no,status=no,scrollbars=yes'); }
+-
+-function replyall() { with(document.msg) { rtype.value = 'replyall'; submit(); } }
+-function forward() { with(document.msg) { rtype.value = 'forward'; submit(); } }
+-function newmsg() { location = 'newmsg.php?pag=$pag&folder=".urlencode($folder)."&sid=$sid&tid=$tid&lid=$lid'; }
+-function folderlist() { location = 'folders.php?folder=".urlencode($folder)."&sid=$sid&tid=$tid&lid=$lid'}
+-function goend() { location = 'logout.php?sid=$sid&tid=$tid&lid=$lid'; }
+-function goinbox() { location = 'messages.php?folder=inbox&sid=$sid&tid=$tid&lid=$lid'; }
+-function goback() { location = 'messages.php?folder=".urlencode($folder)."&sid=$sid&tid=$tid&lid=$lid&pag=$pag'; }
+-function search() { location = 'search.php?sid=$sid&tid=$tid&lid=$lid'; }
+-function emptytrash() { location = 'folders.php?empty=trash&folder=".urlencode($folder)."&goback=true&sid=$sid&tid=$tid&lid=$lid';}
+-function addresses() { location = 'addressbook.php?sid=$sid&tid=$tid&lid=$lid'; }
+-function prefs() { location = 'preferences.php?sid=$sid&tid=$tid&lid=$lid'; }
+-function printit() { window.open('printmsg.php?sid=$sid&tid=$tid&lid=$lid&folder=".urlencode($folder)."&ix=$ix','PrintView','resizable=1,top=10,left=10,width=600,heigth=500,scrollbars=1,status=0'); }
+-function openmessage(attach) { window.open('readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=$ix&sid=$sid&tid=$tid&lid=$lid&attachment='+attach,'','resizable=1,top=10,left=10,width=600,height=400,scrollbars=1,status=0'); }
+-function openwin(targetUrl) { window.open(targetUrl); }
+-</script>
+-";
+-
+-$umDeleteForm = "<input type=hidden name=lid value=$lid>
+-<input type=hidden name=sid value=\"$sid\">
+-<input type=hidden name=tid value=\"$tid\">
+-<input type=hidden name=decision value=move>
+-<input type=hidden name=folder value=\"".htmlspecialchars($folder)."\">
+-<input type=hidden name=pag value=$pag>
+-<input type=hidden name=start_pos value=$ix>
+-<input type=hidden name=end_pos value=".($ix+1).">
+-<input type=hidden name=msg_$ix value=X>
+-<input type=hidden name=back value=true>";
+-
+-$umReplyForm = "<form name=msg action=\"newmsg.php\" method=POST>
+-<input type=hidden name=rtype value=\"reply\">
+-<input type=hidden name=sid value=\"$sid\">
+-<input type=hidden name=lid value=\"$lid\">
+-<input type=hidden name=tid value=\"$tid\">
+-<input type=hidden name=folder value=\"".htmlspecialchars($folder)."\">
+-<input type=hidden name=ix value=\"$ix\">
+-</form>
+-";
+-
+-$smarty->assign("umDeleteForm",$umDeleteForm);
+-$smarty->assign("umReplyForm",$umReplyForm);
+-$smarty->assign("umJS",$jssource);
+-
+-$smarty->assign("umSubject",$email["subject"]);
+-$smarty->assign("umDate",$email["date"]);
+-
+-$anexos = $email["attachments"];
+-$haveattachs = (count($anexos) > 0)?1:0;
+-
+-if(count($anexos) > 0) {
+- $root = &$mail_info["attachments"];
+-
+- foreach($arAttachment as $item ) {
+- if(is_numeric($item)) {
+- $root = &$root[$item]["attachments"];
+- }
+- }
+-
+- $root = $email["attachments"];
+- $sess["headers"][$folderkey][$ix] = $mail_info;
+-
+- $nIndex = count($arAttachment);
+- $attachAr = Array();
+-
+- for($i=0;$i<count($anexos);$i++) {
+-
+- $arAttachment[$nIndex] = $i;
+- $link1 = "download.php?folder=$folder&ix=$ix&attach=".join(",",$arAttachment)."&sid=$sid&tid=$tid&lid=$lid";
+- $link2 = "$link1&down=1";
+-
+- if(!$anexos[$i]["temp"]) {
+- if($anexos[$i]["content-type"] == "message/rfc822")
+- $anexos[$i]["normlink"] = "<a href=\"javascript:openmessage('".join(",",$arAttachment)."')\">";
+- else
+- $anexos[$i]["normlink"] = "<a href=\"$link1\" target=\"_new\">";
+-
+- $anexos[$i]["downlink"] = "<a href=\"$link2\" target=\"_new\">";
+- $anexos[$i]["size"] = ceil($anexos[$i]["size"]/1024);
+- $anexos[$i]["type"] = $anexos[$i]["content-type"];
+- $attachAr[] = $anexos[$i];
+- }
+- }
+- $smarty->assign("umHaveAttachments",(count($attachAr) > 0));
+- $smarty->assign("umAttachList",$attachAr);
+-}
+-
+-$SS->Save($sess);
+-
+-
+-$avalfolders = Array();
+-$d = dir($userfolder);
+-while($entry=$d->read()) {
+- if( is_dir($userfolder.$entry) &&
+- $entry != ".." &&
+- $entry != "." &&
+- substr($entry,0,1) != "_" &&
+- $entry != $folder &&
+- ($UM->mail_protocol == "imap" || $entry != "inbox")) {
+- $entry = $UM->fix_prefix($entry,0);
+- switch(strtolower($entry)) {
+- case "inbox":
+- $display = $inbox_extended;
+- break;
+- case "sent":
+- $display = $sent_extended;
+- break;
+- case "trash":
+- $display = $trash_extended;
+- break;
+- default:
+- $display = $entry;
+- }
+- $avalfolders[] = Array("path" => $entry, "display" => $display);
+-
+- }
+-}
+-$d->close();
+-$smarty->assign("umAvalFolders",$avalfolders);
+-unset($UM);
+-
+-if($is_attached)
+- $smarty->display("$selected_theme/readmsg_popup.htm");
+-else
+- $smarty->display("$selected_theme/readmsg.htm");
+-?>
++<? ++/************************************************************************ ++UebiMiau is a GPL'ed software developed by ++ ++ - Aldoir Ventura - aldoir@users.sourceforge.net ++ - http://uebimiau.sourceforge.net ++ ++Fell free to contact, send donations or anything to me :-) ++So Paulo - Brasil ++*************************************************************************/ ++ ++//defines ++require("./inc/inc.php"); ++ ++if(!isset($ix) || !isset($pag)) redirect("error.php?err=3&sid=$sid&tid=$tid&lid=$lid"); ++ ++$folderkey = base64_encode(strtolower($folder)); ++ ++$mysess = $sess["headers"][$folderkey]; ++$mail_info = $mysess[$ix]; ++$arAttachment = Array(); ++ ++if(isset($attachment)) { ++ ++ $is_attached = true; ++ $arAttachment = explode(",",$attachment); ++ ++ $UM->current_level = $arAttachment; ++ ++ $root = $mail_info; ++ foreach($arAttachment as $item ) ++ if(is_numeric($item)) ++ $root = &$root["attachments"][$item]; ++ ++ if( !is_array($root) || ++ !file_exists($root["filename"])) redirect("error.php?err=3&sid=$sid&tid=$tid&lid=$lid"); ++ ++ $result = $UM->_read_file($root["filename"]); ++ ++} else { ++ $is_attached = false; ++ $arAttachment = Array(); ++ if(!$UM->mail_connect()) { redirect("error.php?err=1&sid=$sid&tid=$tid&lid=$lid"); exit; } ++ if(!$UM->mail_auth()) { redirect("badlogin.php?sid=$sid&tid=$tid&lid=$lid&error=".urlencode($UM->mail_error_msg)); exit; } ++ ++ if(!($result = $UM->mail_retr_msg($mail_info,1))) { redirect("messages.php?err=2&folder=".urlencode($folder)."&pag=$pag&sid=$sid&tid=$tid&lid=$lid&refr=true"); exit; } ++ if($UM->mail_set_flag($mail_info,"\\SEEN","+")) { ++ $sess["headers"][$folderkey][$ix] = $mail_info; ++ } ++ ++ $UM->mail_disconnect(); ++ ++} ++echo($nocache); ++ ++$UM->displayimages = $prefs["display-images"]; ++$UM->allow_scripts = $allow_scripts; ++ ++$email = $UM->Decode($result); ++ ++if($ix > 0) { ++ ++ $umHavePrevious = 1; ++ $umPreviousSubject = $mysess[($ix-1)]["subject"]; ++ $umPreviousLink = "readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=".($ix-1)."&sid=$sid&tid=$tid&lid=$lid"; ++ ++ $smarty->assign("umHavePrevious",$umHavePrevious); ++ $smarty->assign("umPreviousSubject",$umPreviousSubject); ++ $smarty->assign("umPreviousLink",$umPreviousLink); ++ ++} ++ ++if($ix < (count($mysess)-1)) { ++ $umHaveNext = 1; ++ $umNextSubject = $mysess[($ix+1)]["subject"]; ++ $umNextLink = "readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=".($ix+1)."&sid=$sid&tid=$tid&lid=$lid"; ++ $smarty->assign("umHaveNext",$umHaveNext); ++ $smarty->assign("umNextSubject",$umNextSubject); ++ $smarty->assign("umNextLink",$umNextLink); ++} ++ ++ ++ ++$body = $email["body"]; ++ ++if($block_external_images) ++ $body = eregi_replace("(src|background)=([\"]?)(http[s]?:\/\/[a-z0-9~#%@\&:=?+\/\.,_-]+[a-z0-9~#%@\&=?+\/_-]+)([\"]?)","\\1=\\2images/trans.gif\\4 original_url=\"\\3\"",$body); ++ ++ ++$redir_path = getenv("PHP_SELF")?getenv("PHP_SELF"):$_SERVER["PHP_SELF"]; ++if(!$redir_path) $redir_path = $PHP_SELF; ++$redir_path = dirname($redir_path)."redir.php"; ++ ++$body = eregi_replace("target=[\"]?[A-Z_]+[\"]?","target=\"blank\"",$body); ++$body = eregi_replace("href=\"http([s]?)://","target=\"_blank\" href=\"$redir_path?http\\1://",$body); ++$body = eregi_replace("href=\"mailto:","target=\"_top\" href=\"newmsg.php?sid=$sid&tid=$tid&lid=$lid&to=",$body); ++ ++$uagent = $HTTP_SERVER_VARS["HTTP_USER_AGENT"]; ++ ++$ns4 = (ereg("Mozilla/4",$uagent) && !ereg("MSIE",$uagent) && ++ !ereg("Gecko",$uagent)); ++$ns6moz = ereg("Gecko",$uagent); ++$ie4up = ereg("MSIE (4|5|6)",$uagent); ++$other = (!$ns4 && !$ns6moz && !$ie4up); ++ ++ ++if ($other) { ++ $body = eregi_replace("<base","<uebimiau_base_not_alowed", ++ eregi_replace("<link","<uebimiau_link_not_alowed", ++ $body)); ++ ++ if(eregi("<[ ]*body.*background[ ]*=[ ]*[\"']?([A-Za-z0-9._&?=:/{}%+-]+)[\"']?.*>",$body,$regs)) ++ $backimg = " background=\"".$regs[1]."\""; ++ $smarty->assign("umBackImg",$backimg); ++ if(eregi("<[ ]*body[A-Z0-9._&?=:/\"' -]*bgcolor=[\"']?([A-Z0-9#]+)[\"']?[A-Z0-9._&?=:/\"' -]*>",$body,$regs)) ++ $backcolor = " bgcolor=\"".$regs[1]."\""; ++ $smarty->assign("umBackColor",$backcolor); ++ ++ $body = eregi_replace("<body","<uebimiau_body_not_alowed",$body); ++ $body = eregi_replace("a:(link|visited|hover)",".".uniqid(""),$body); ++ $body = eregi_replace("(body)[ ]?\\{",".".uniqid(""),$body); ++ ++} elseif($ie4up || $ns6moz) { ++ $sess["currentbody"] = $body;; ++ $body = "<iframe src=\"show_body.php?sid=$sid&tid=$tid&lid=$lid&folder=".htmlspecialchars($folder)."&ix=$ix\" width=\"100%\" height=\"400\" frameborder=\"0\"></iframe>"; ++ ++} elseif($ns4) { ++ $sess["currentbody"] = $body;; ++ $body = "<ilayer width=\"100%\" left=\"0\" top=\"0\">$body</ilayer>"; ++} ++ ++$smarty->assign("umMessageBody",$body); ++ ++ ++$ARFrom = $email["from"]; ++$useremail = $sess["email"]; ++ ++// from ++$name = $ARFrom[0]["name"]; ++$thismail = $ARFrom[0]["mail"]; ++$ARFrom[0]["link"] = "newmsg.php?nameto=".urlencode($name)."&mailto=$thismail&sid=$sid&tid=$tid&lid=$lid"; ++$ARFrom[0]["title"] = "$name <$thismail>"; ++ ++$smarty->assign("umFromList",$ARFrom); ++ ++// To ++$ARTo = $email["to"]; ++ ++for($i=0;$i<count($ARTo);$i++) { ++ $name = $ARTo[$i]["name"]; ++ $thismail = $ARTo[$i]["mail"]; ++ $link = "newmsg.php?nameto=".urlencode($name)."&mailto=$thismail&sid=$sid&tid=$tid&lid=$lid"; ++ $ARTo[$i]["link"] = $link; ++ $ARTo[$i]["title"] = "$name <$thismail>"; ++ $smarty->assign("umTOList",$ARTo); ++} ++ ++// CC ++$ARCC = $email["cc"]; ++if(count($ARCC) > 0) { ++ $smarty->assign("umHaveCC",1); ++ for($i=0;$i<count($ARCC);$i++) { ++ $name = $ARCC[$i]["name"]; ++ $thismail = $ARCC[$i]["mail"]; ++ $link = "newmsg.php?nameto=".urlencode($name)."&mailto=$thismail&sid=$sid&tid=$tid&lid=$lid"; ++ $ARCC[$i]["link"] = $link; ++ $ARCC[$i]["title"] = "$name <$thismail>"; ++ } ++ $smarty->assign("umCCList",$ARCC); ++} ++ ++$smarty->assign("umPageTitle",$email["subject"]); ++ ++$jssource = " ++<script language=\"JavaScript\"> ++function deletemsg() { ++ if(confirm('".ereg_replace("'","\\'",$confirm_delete)."')) ++ with(document.move) { decision.value = 'delete'; submit(); } ++} ++function reply() { document.msg.submit(); } ++function movemsg() { document.move.submit(); } ++function newmsg() { location = 'newmsg.php?folder=$folder&pag=$pag&sid=$sid&tid=$tid&lid=$lid'; } ++function headers() { mywin = window.open('headers.php?folder=".urlencode($folder)."&ix=$ix&sid=$sid&tid=$tid&lid=$lid','Headers','width=550, top=100, left=100, height=320,directories=no,toolbar=no,status=no,scrollbars=yes,resizable=yes'); } ++function catch_addresses() { window.open('catch.php?folder=".urlencode($folder)."&ix=$ix&sid=$sid&tid=$tid&lid=$lid','Catch','width=550, top=100, left=100, height=320,directories=no,toolbar=no,status=no,scrollbars=yes'); } ++function block_addresses() { window.open('block_address.php?folder=".urlencode($folder)."&ix=$ix&sid=$sid&tid=$tid&lid=$lid','Block','width=550, top=100, left=100, height=320,directories=no,toolbar=no,status=no,scrollbars=yes'); } ++ ++function replyall() { with(document.msg) { rtype.value = 'replyall'; submit(); } } ++function forward() { with(document.msg) { rtype.value = 'forward'; submit(); } } ++function newmsg() { location = 'newmsg.php?pag=$pag&folder=".urlencode($folder)."&sid=$sid&tid=$tid&lid=$lid'; } ++function folderlist() { location = 'folders.php?folder=".urlencode($folder)."&sid=$sid&tid=$tid&lid=$lid'} ++function goend() { location = 'logout.php?sid=$sid&tid=$tid&lid=$lid'; } ++function goinbox() { location = 'messages.php?folder=inbox&sid=$sid&tid=$tid&lid=$lid'; } ++function goback() { location = 'messages.php?folder=".urlencode($folder)."&sid=$sid&tid=$tid&lid=$lid&pag=$pag'; } ++function search() { location = 'search.php?sid=$sid&tid=$tid&lid=$lid'; } ++function emptytrash() { location = 'folders.php?empty=trash&folder=".urlencode($folder)."&goback=true&sid=$sid&tid=$tid&lid=$lid';} ++function addresses() { location = 'addressbook.php?sid=$sid&tid=$tid&lid=$lid'; } ++function prefs() { location = 'preferences.php?sid=$sid&tid=$tid&lid=$lid'; } ++function printit() { window.open('printmsg.php?sid=$sid&tid=$tid&lid=$lid&folder=".urlencode($folder)."&ix=$ix','PrintView','resizable=1,top=10,left=10,width=600,heigth=500,scrollbars=1,status=0'); } ++function openmessage(attach) { window.open('readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=$ix&sid=$sid&tid=$tid&lid=$lid&attachment='+attach,'','resizable=1,top=10,left=10,width=600,height=400,scrollbars=1,status=0'); } ++function openwin(targetUrl) { window.open(targetUrl); } ++</script> ++"; ++ ++$umDeleteForm = "<input type=hidden name=lid value=$lid> ++<input type=hidden name=sid value=\"$sid\"> ++<input type=hidden name=tid value=\"$tid\"> ++<input type=hidden name=decision value=move> ++<input type=hidden name=folder value=\"".htmlspecialchars($folder)."\"> ++<input type=hidden name=pag value=$pag> ++<input type=hidden name=start_pos value=$ix> ++<input type=hidden name=end_pos value=".($ix+1)."> ++<input type=hidden name=msg_$ix value=X> ++<input type=hidden name=back value=true>"; ++ ++$umReplyForm = "<form name=msg action=\"newmsg.php\" method=POST> ++<input type=hidden name=rtype value=\"reply\"> ++<input type=hidden name=sid value=\"$sid\"> ++<input type=hidden name=lid value=\"$lid\"> ++<input type=hidden name=tid value=\"$tid\"> ++<input type=hidden name=folder value=\"".htmlspecialchars($folder)."\"> ++<input type=hidden name=ix value=\"$ix\"> ++</form> ++"; ++ ++$smarty->assign("umDeleteForm",$umDeleteForm); ++$smarty->assign("umReplyForm",$umReplyForm); ++$smarty->assign("umJS",$jssource); ++ ++$smarty->assign("umSubject",$email["subject"]); ++$smarty->assign("umDate",$email["date"]); ++ ++$anexos = $email["attachments"]; ++$haveattachs = (count($anexos) > 0)?1:0; ++ ++if(count($anexos) > 0) { ++ $root = &$mail_info["attachments"]; ++ ++ foreach($arAttachment as $item ) { ++ if(is_numeric($item)) { ++ $root = &$root[$item]["attachments"]; ++ } ++ } ++ ++ $root = $email["attachments"]; ++ $sess["headers"][$folderkey][$ix] = $mail_info; ++ ++ $nIndex = count($arAttachment); ++ $attachAr = Array(); ++ ++ for($i=0;$i<count($anexos);$i++) { ++ ++ $arAttachment[$nIndex] = $i; ++ $link1 = "download.php?folder=$folder&ix=$ix&attach=".join(",",$arAttachment)."&sid=$sid&tid=$tid&lid=$lid"; ++ $link2 = "$link1&down=1"; ++ ++ if(!$anexos[$i]["temp"]) { ++ if($anexos[$i]["content-type"] == "message/rfc822") ++ $anexos[$i]["normlink"] = "<a href=\"javascript:openmessage('".join(",",$arAttachment)."')\">"; ++ else ++ $anexos[$i]["normlink"] = "<a href=\"$link1\" target=\"_new\">"; ++ ++ $anexos[$i]["downlink"] = "<a href=\"$link2\" target=\"_new\">"; ++ $anexos[$i]["size"] = ceil($anexos[$i]["size"]/1024); ++ $anexos[$i]["type"] = $anexos[$i]["content-type"]; ++ $attachAr[] = $anexos[$i]; ++ } ++ } ++ $smarty->assign("umHaveAttachments",(count($attachAr) > 0)); ++ $smarty->assign("umAttachList",$attachAr); ++} ++ ++$SS->Save($sess); ++ ++ ++$avalfolders = Array(); ++$d = dir($userfolder); ++while($entry=$d->read()) { ++ if( is_dir($userfolder.$entry) && ++ $entry != ".." && ++ $entry != "." && ++ substr($entry,0,1) != "_" && ++ $entry != $folder && ++ ($UM->mail_protocol == "imap" || $entry != "inbox")) { ++ $entry = $UM->fix_prefix($entry,0); ++ switch(strtolower($entry)) { ++ case "inbox": ++ $display = $inbox_extended; ++ break; ++ case "sent": ++ $display = $sent_extended; ++ break; ++ case "trash": ++ $display = $trash_extended; ++ break; ++ default: ++ $display = $entry; ++ } ++ $avalfolders[] = Array("path" => $entry, "display" => $display); ++ ++ } ++} ++$d->close(); ++$smarty->assign("umAvalFolders",$avalfolders); ++unset($UM); ++ ++if($is_attached) ++ $smarty->display("$selected_theme/readmsg_popup.htm"); ++else ++ $smarty->display("$selected_theme/readmsg.htm"); ++?> +--- uebimiau-2.7.8-RC1-any/process.php 2003-06-28 21:01:32.000000000 +0000 ++++ uebimiau-2.7.8-RC1-any.new/process.php 2004-12-08 22:35:24.862498480 +0000 +@@ -1,112 +1,112 @@ +-<?
+-/************************************************************************
+-UebiMiau is a GPL'ed software developed by
+-
+- - Aldoir Ventura - aldoir@users.sourceforge.net
+- - http://uebimiau.sourceforge.net
+-
+-Fell free to contact, send donations or anything to me :-)
+-So Paulo - Brasil
+-*************************************************************************/
+-
+-require("./inc/inc.php");
+-
+-function mail_connect() {
+- global $UM,$sid,$tid,$lid;
+- if(!$UM->mail_connect()) { redirect("error.php?err=1&sid=$sid&tid=$tid&lid=$lid\r\n"); exit; }
+- if(!$UM->mail_auth(true)) { redirect("badlogin.php?sid=$sid&tid=$tid&lid=$lid&error=".urlencode($UM->mail_error_msg)."\r\n"); exit; }
+-}
+-
+-$headers = null;
+-$folder_key = base64_encode(strtolower($folder));
+-if(!array_key_exists("headers",$sess)) $sess["headers"] = array();
+-
+-if(array_key_exists($folder_key,$sess["headers"]))
+- $headers = $sess["headers"][$folder_key];
+-
+-if( !is_array($headers)
+- || isset($decision)
+- || isset($refr)) {
+-
+- mail_connect();
+-
+- $sess["auth"] = true;
+-
+- if(isset($start_pos) && isset($end_pos)) {
+-
+- for($i=$start_pos;$i<$end_pos;$i++) {
+- if(isset(${"msg_$i"})) {
+- if ($decision == "delete") {
+- $UM->mail_delete_msg($headers[$i],$prefs["save-to-trash"],$prefs["st-only-read"]);
+- } else {
+- $UM->mail_move_msg($headers[$i],$aval_folders);
+- }
+- $expunge = true;
+- }
+- }
+-
+- if($expunge) {
+-
+- if($prefs["save-to-trash"])
+- unset($sess["headers"][base64_encode("trash")]);
+- if ($decision == "move")
+- unset($sess["headers"][base64_encode(strtolower($aval_folders))]);
+-
+- //some servers, don't hide deleted messages until you don't disconnect
+- $SS->Save($sess);
+- $UM->mail_disconnect();
+- mail_connect();
+- if ($back) {
+- $back_to = $start_pos;
+- }
+- }
+-
+- unset($sess["headers"][$folder_key]);
+-
+- } elseif (isset($refr) && array_key_exists("headers",$sess)) {
+- unset($sess["headers"][$folder_key]);
+- }
+-
+- $boxes = $UM->mail_list_boxes();
+- $sess["folders"] = $boxes;
+-
+- require("./get_message_list.php");
+-
+- require("./apply_filters.php");
+-
+- $UM->mail_disconnect();
+-
+- if($require_update) {
+- mail_connect();
+- require("./get_message_list.php");
+- $UM->mail_disconnect();
+- }
+-
+-}
+-
+-if(!is_array($headers = $sess["headers"][$folder_key])) { redirect("error.php?err=3&sid=$sid&tid=$tid&lid=$lid\r\n"); exit; }
+-
+-array_qsort2($headers,$sortby,$sortorder);
+-$sess["headers"][$folder_key] = $headers;
+-$SS->Save($sess);
+-
+-if($check_first_login && !$prefs["first-login"]) {
+- $prefs["first-login"] = 1;
+- save_prefs($prefs);
+- redirect("preferences.php?sid=$sid&tid=$tid&lid=$lid&folder=".urlencode($folder));
+- exit;
+-}
+-
+-
+-if(!isset($pag) || !is_numeric(trim($pag))) $pag = 1;
+-$refreshurl = "messages.php?sid=$sid&tid=$tid&lid=$lid&folder=".urlencode($folder)."&pag=$pag";
+-
+-if (isset($back_to)) {
+- if (count($headers) > $back_to) {
+- redirect("readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=$back_to&sid=$sid&tid=$tid&lid=$lid");
+- exit;
+- }
+-}
+-redirect("$refreshurl");
+-
+-?>
++<? ++/************************************************************************ ++UebiMiau is a GPL'ed software developed by ++ ++ - Aldoir Ventura - aldoir@users.sourceforge.net ++ - http://uebimiau.sourceforge.net ++ ++Fell free to contact, send donations or anything to me :-) ++So Paulo - Brasil ++*************************************************************************/ ++ ++require("./inc/inc.php"); ++ ++function mail_connect() { ++ global $UM,$sid,$tid,$lid; ++ if(!$UM->mail_connect()) { redirect("error.php?err=1&sid=$sid&tid=$tid&lid=$lid\r\n"); exit; } ++ if(!$UM->mail_auth(true)) { redirect("badlogin.php?sid=$sid&tid=$tid&lid=$lid&error=".urlencode($UM->mail_error_msg)."\r\n"); exit; } ++} ++ ++$headers = null; ++$folder_key = base64_encode(strtolower($folder)); ++if(!array_key_exists("headers",$sess)) $sess["headers"] = array(); ++ ++if(array_key_exists($folder_key,$sess["headers"])) ++ $headers = $sess["headers"][$folder_key]; ++ ++if( !is_array($headers) ++ || isset($decision) ++ || isset($refr)) { ++ ++ mail_connect(); ++ ++ $sess["auth"] = true; ++ ++ if(isset($start_pos) && isset($end_pos)) { ++ ++ for($i=$start_pos;$i<$end_pos;$i++) { ++ if(isset(${"msg_$i"})) { ++ if ($decision == "delete") { ++ $UM->mail_delete_msg($headers[$i],$prefs["save-to-trash"],$prefs["st-only-read"]); ++ } else { ++ $UM->mail_move_msg($headers[$i],$aval_folders); ++ } ++ $expunge = true; ++ } ++ } ++ ++ if($expunge) { ++ ++ if($prefs["save-to-trash"]) ++ unset($sess["headers"][base64_encode("trash")]); ++ if ($decision == "move") ++ unset($sess["headers"][base64_encode(strtolower($aval_folders))]); ++ ++ //some servers, don't hide deleted messages until you don't disconnect ++ $SS->Save($sess); ++ //$UM->mail_disconnect(); ++ //mail_connect(); ++ if ($back) { ++ $back_to = $start_pos; ++ } ++ } ++ ++ unset($sess["headers"][$folder_key]); ++ ++ } elseif (isset($refr) && array_key_exists("headers",$sess)) { ++ unset($sess["headers"][$folder_key]); ++ } ++ ++ $boxes = $UM->mail_list_boxes(); ++ $sess["folders"] = $boxes; ++ ++ require("./get_message_list.php"); ++ ++ require("./apply_filters.php"); ++ ++ $UM->mail_disconnect(); ++ ++ if($require_update) { ++ mail_connect(); ++ require("./get_message_list.php"); ++ $UM->mail_disconnect(); ++ } ++ ++} ++ ++if(!is_array($headers = $sess["headers"][$folder_key])) { redirect("error.php?err=3&sid=$sid&tid=$tid&lid=$lid\r\n"); exit; } ++ ++array_qsort2($headers,$sortby,$sortorder); ++$sess["headers"][$folder_key] = $headers; ++$SS->Save($sess); ++ ++if($check_first_login && !$prefs["first-login"]) { ++ $prefs["first-login"] = 1; ++ save_prefs($prefs); ++ redirect("preferences.php?sid=$sid&tid=$tid&lid=$lid&folder=".urlencode($folder)); ++ exit; ++} ++ ++ ++if(!isset($pag) || !is_numeric(trim($pag))) $pag = 1; ++$refreshurl = "messages.php?sid=$sid&tid=$tid&lid=$lid&folder=".urlencode($folder)."&pag=$pag"; ++ ++if (isset($back_to)) { ++ if (count($headers) > $back_to) { ++ redirect("readmsg.php?folder=".urlencode($folder)."&pag=$pag&ix=$back_to&sid=$sid&tid=$tid&lid=$lid"); ++ exit; ++ } ++} ++redirect("$refreshurl"); ++ ++?> +--- uebimiau-2.7.8-RC1-any/inc/inc.php 2003-06-28 12:41:22.000000000 +0000 ++++ uebimiau-2.7.8-RC1-any.new/inc/inc.php 2004-12-08 22:50:14.226294632 +0000 +@@ -1,193 +1,196 @@ +-<?
+-/************************************************************************
+-UebiMiau is a GPL'ed software developed by
+-
+- - Aldoir Ventura - aldoir@users.sourceforge.net
+- - http://uebimiau.sourceforge.net
+-
+-Fell free to contact, send donations or anything to me :-)
+-So Paulo - Brasil
+-*************************************************************************/
+-
+-@set_time_limit(0);
+-
+-require("./inc/config.php");
+-require("./inc/class.uebimiau.php");
+-require("./inc/lib.php");
+-
+-if(!preg_match("/{[A-F0-9]+-[A-F0-9]+-[0-9]+}/i",$sid)) $sid = strtoupper("{".uniqid("")."-".uniqid("")."-".time()."}");
+-
+-
+-define("SMARTY_DIR","./smarty/");
+-require_once(SMARTY_DIR."Smarty.class.php");
+-$smarty = new Smarty;
+-$smarty->compile_dir = $temporary_directory;
+-$smarty->security=true;
+-$smarty->secure_dir=array("./");
+-
+-
+-$smarty->assign("umMenuTemplate",dirname($PATH_TRANSLATED).$menu_template);
+-//$smarty->debugging = false;
+-$smarty->assign("umLanguageFile",$selected_language.".txt");
+-
+-$SS = New Session();
+-$SS->temp_folder = $temporary_directory;
+-$SS->sid = $sid;
+-$SS->timeout = $idle_timeout;
+-$SS->enable_cookies = ($enable_cookies && !$enable_debug);
+-
+-$sess = $SS->Load();
+-
+-
+-if(!array_key_exists("start",$sess)) $sess["start"] = time();
+-$start = $sess["start"];
+-
+-$UM = new UebiMiau();
+-
+-if(isset($f_pass) && strlen($f_pass) > 0) {
+-
+- switch(strtoupper($mail_server_type)) {
+-
+- case "DETECT":
+- $f_server = strtolower(getenv("HTTP_HOST"));
+- $f_server = str_replace($mail_detect_remove,"",$f_server);
+- $f_server = $mail_detect_prefix.$f_server;
+-
+- if(ereg("(.*)@(.*)",$f_email,$regs)) {
+- $f_user = $regs[1];
+- $domain = $regs[2];
+- if($mail_detect_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$mail_detect_login_type));
+- }
+-
+- $f_protocol = $mail_detect_protocol;
+- $f_port = $mail_detect_port;
+- $f_prefix = $mail_detect_folder_prefix;
+-
+- break;
+-
+- case "ONE-FOR-EACH":
+- $domain = $mail_servers[$six]["domain"];
+- $f_email = $f_user."@".$domain;
+- $f_server = $mail_servers[$six]["server"];
+- $login_type = $mail_servers[$six]["login_type"];
+-
+- $f_protocol = $mail_servers[$six]["protocol"];
+- $f_port = $mail_servers[$six]["port"];
+- $f_prefix = $mail_servers[$six]["folder_prefix"];
+-
+- if($login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$login_type));
+- break;
+-
+- case "ONE-FOR-ALL":
+- if(ereg("(.*)@(.*)",$f_email,$regs)) {
+- $f_user = $regs[1];
+- $domain = $regs[2];
+- if($one_for_all_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$one_for_all_login_type));
+- }
+- $f_server = $default_mail_server;
+-
+- $f_protocol = $default_protocol;
+- if($f_protocol=="imap")
+- {
+- $f_port = "143";
+- }elseif($f_protocol=="pop3")
+- {
+- $f_port = "110";
+- }
+- $f_prefix = $default_folder_prefix;
+-
+- break;
+- }
+-
+- $UM->mail_email = $sess["email"] = stripslashes($f_email);
+- $UM->mail_user = $sess["user"] = stripslashes($f_user);
+- $UM->mail_pass = $sess["pass"] = stripslashes($f_pass);
+- $UM->mail_server = $sess["server"] = stripslashes($f_server);
+-
+- $UM->mail_port = $sess["port"] = $f_port;
+- $UM->mail_protocol = $sess["protocol"] = $f_protocol;
+- $UM->mail_prefix = $sess["folder_prefix"] |