Ejemplo n.º 1
0
function backup_show()
{
    $message_id = $_GET["message_id"];
    $tpl = new templates();
    $q = new mysql();
    $sql = "SELECT MessageBody FROM storage WHERE MessageID='{$message_id}'";
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sq, "artica_backup"));
    writelogs($sql, __FUNCTION__, __FILE__);
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    $ligne["MessageBody"] = CleanMail($ligne["MessageBody"]);
    $html = "<div style='width:99%;padding:5px;border:1px solid #CCCCCC;background-color:#FFFFFF' id='message-body-show'>\n\t<div style='float:right'>\n\t" . button("{release}", "BReleaseMail('{$message_id}')") . "\n\t</div>\n\t<div style='float:left;margin:5px;'>" . imgtootltip("delete-48.png", "{delete} {$message_id}", "Loadjs('domains.backup.php?delete-js=yes&message-id={$message_id}')") . "</div>\n\t\n\n\t{$ligne["MessageBody"]}\n\t\n\t</div>\n\t\n\t\n\t\n\t";
    return $tpl->_ENGINE_parse_body($html);
}
Ejemplo n.º 2
0
function quarantine_show(){
	$message_id=$_GET["message_id"];
	$page=CurrentPageName();
	$tpl=new templates();
	$q=new mysql();
	$sq="SELECT message_path,message_size FROM orgmails WHERE MessageID='$message_id'";
	$ligne=@mysql_fetch_array($q->QUERY_SQL($sq,"artica_backup"));
	$path=$ligne["message_path"];
	
	$sql="SELECT MessageBody,message_size,mailfrom,mailto,file_path FROM quarantine WHERE MessageID='$message_id'";
	
	
	
	writelogs($sql,__FUNCTION__,__FILE__);
	$ligne=@mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
	$ligne["MessageBody"]=CleanMail($ligne["MessageBody"]);
	$ligne["message_size"]=FormatBytes($ligne["message_size"]/1024);
	
	$html="
	
	<table class=form>
	<tr>
		<td style='font-size:14px'>{message_size}:{$ligne["message_size"]}</td>
		<td style='font-size:14px'>&nbsp;|&nbsp;</td>
		<td style='font-size:14px'>{from}:{$ligne["mailfrom"]}</td>
		<td style='font-size:14px'>&nbsp;|&nbsp;</td>
		<td style='font-size:14px'>{to}:{$ligne["mailto"]}</td>
		<td style='font-size:14px'>&nbsp;|&nbsp;</td>
		<td style='font-size:14px'><a href='#' OnClick=\"javascript:ViewMessageSource()\">{view_source}</a></td>
		<td style='font-size:14px'>&nbsp;|&nbsp;</td>
		<td style='font-size:14px'><a href='#' OnClick=\"javascript:ViewMessageHTML()\">{view_html}</a></td>
	</tr>
	</table>
	<div style='width:100%;text-align:right'>". button("{release}","QReleaseMail('$message_id')")."</div>
	<br>
	<div style='width:99%;padding:5px;border:1px solid #CCCCCC;background-color:#FFFFFF' id='message-body-show' class=form>

	<div style='float:left;margin:5px;'>". imgtootltip("delete-48.png","{delete} $message_id","Loadjs('domains.quarantine.php?delete-js=yes&message-id=$message_id')")."</div>
		<div id='QuarMessageBody' style='height:650px;overflow:auto'>
			{$ligne["MessageBody"]}
		</div>
	
	</div>
	
	<script>
		function ViewMessageSource(msgid){
			LoadAjax('QuarMessageBody','$page?message-id-source=$message_id');
		}
		
		function ViewMessageHTML(msgid){
			LoadAjax('QuarMessageBody','$page?message-id-html=$message_id');
		}		
	</script>
	
	
	";
	return $tpl->_ENGINE_parse_body($html);
	
	
}
Ejemplo n.º 3
0
function quarantine_show()
{
    $message_id = $_GET["message_id"];
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql();
    $sq = "SELECT message_path,message_size FROM orgmails WHERE MessageID='{$message_id}'";
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sq, "artica_backup"));
    $path = $ligne["message_path"];
    $sql = "SELECT MessageBody,message_size,mailfrom,mailto,file_path FROM quarantine WHERE MessageID='{$message_id}'";
    writelogs($sql, __FUNCTION__, __FILE__);
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    $ligne["MessageBody"] = CleanMail($ligne["MessageBody"]);
    $ligne["message_size"] = FormatBytes($ligne["message_size"] / 1024);
    $html = "\n\t\n\t<table>\n\t<tr>\n\t\t<td style='font-size:18px'>{message_size}:{$ligne["message_size"]}</td>\n\t\t<td style='font-size:18px'>&nbsp;|&nbsp;</td>\n\t\t<td style='font-size:18px'>{from}:{$ligne["mailfrom"]}</td>\n\t\t<td style='font-size:18px'>&nbsp;|&nbsp;</td>\n\t\t<td style='font-size:18px'>{to}:{$ligne["mailto"]}</td>\n\t</tr>\n\t</table>\n\t\n\t<div style='width:100%;text-align:right'>" . button("{release}", "QReleaseMail('{$message_id}')") . "</div>\n\t<br>\n\t<div style='width:99%;padding:5px;border:1px solid #CCCCCC;background-color:#FFFFFF' id='message-body-show' class=form>\n\n\t<div style='float:left;margin:5px;'>" . imgtootltip("delete-48.png", "{delete} {$message_id}", "Loadjs('domains.quarantine.php?delete-js=yes&message-id={$message_id}')") . "</div>\n\t\t<div id='QuarMessageBody' style='height:650px;overflow:auto'>\n\t\t\t{$ligne["MessageBody"]}\n\t\t</div>\n\t\n\t</div>\n\n\t\n\t\n\t";
    return $tpl->_ENGINE_parse_body($html);
}
Ejemplo n.º 4
0
function ShowBackupMail()
{
    $page = CurrentPageName();
    $s = new mysql();
    $sql = "SELECT message_path, MessageSize FROM orgmails WHERE MessageID='{$_GET["ShowBackupMail"]}'";
    $ligne = mysql_fetch_array($s->QUERY_SQL($sql, "artica_backup"));
    $message_path = $ligne["message_path"];
    $message_size = $ligne["message_size"];
    $sql = "SELECT MessageBody FROM storage WHERE MessageID='{$_GET["ShowBackupMail"]}';";
    $ligne = mysql_fetch_array($s->QUERY_SQL($sql, "artica_backup"));
    if (preg_match('#Body-Begin-->(.+?)<\\!--X-Body-of-Message-End-->#is', $ligne["MessageBody"], $re)) {
        $ligne["MessageBody"] = $re[1];
    }
    if (preg_match('#<!--X-Head-of-Message-->(.+?)<!--X-Head-of-Message-End-->#is', $ligne["MessageBody"], $re)) {
        $head = $re[1];
        $ligne["MessageBody"] = str_replace($head, '', $ligne["MessageBody"]);
    }
    $ligne["MessageBody"] = CleanMail($ligne["MessageBody"]);
    if ($_GET["tab"] == "header") {
        $ligne["MessageBody"] = $head;
    }
    if ($message_path != null) {
        $sock = new sockets();
        $r = $sock->getfile("statfile:{$message_path}");
        if (!preg_match('#SUCCESS#', $r)) {
            $resend = Paragraphe('folder-64-fetchmail-grey.png', '{mail_backup_lost}', '{mail_backup_lost_text}');
        } else {
            $uid = $_SESSION["uid"];
            $user = new user($uid);
            $usr = new usersMenus();
            if ($usr->AsPostfixAdministrator) {
                $user->mail = "ask";
            }
            $js = "javascript:ResendSendMail('{$message_path}','{$user->mail}')";
            $tpl = new templates();
            $resend = "<div id='resendmail'>" . Paragraphe('folder-64-fetchmail.png', '{resend_mail}', '{resend_mail_text}<br>' . $user->mail, $js, "{resend_mail_text}") . "</div>";
            $resend = $tpl->_ENGINE_parse_body($resend);
        }
    }
    $html = main_mailtabs() . "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t<div style='width:600px;overflow:auto;height:400px;margin-top:5px;padding:5px;background-color:#F9F9F9;border:1px solid #CCCCCC'>\n\t\t{$ligne["MessageBody"]}\n\t</div>\n\t</td>\n\t<td valign='top'>{$resend}</td>\n\t</tr>\n\t</table>";
    echo $html;
}