/**
     * @param PageBuilder $pageBuilder
     * @return ContactsPanel
     */
    function CNewMessagePanel(&$pagebuilder)
    {
        $this->Type = Post::val('mtype', 'mes');
        $this->To = '';
        $this->_pagebuilder =& $pagebuilder;
        $this->_proc =& $pagebuilder->_proc;
        $this->From = $this->_getFromEmail();
        $this->_pagebuilder->_top->AddOnResize('ResizeElements(\'all\');');
        if ($this->_proc->account->AllowDhtmlEditor) {
            $editorResize = 'HTMLEditor.Resize(width - 1, height - 2);';
            $editorReplace = 'HTMLEditor.Replace();';
        } else {
            $editorResize = '
						plainEditor.style.height = (height - 1) + "px";
						plainEditor.style.width = (width - 2) + "px";
					';
            $editorReplace = '';
        }
        $this->inputs = '';
        $contacts = null;
        if (Post::has('contacts') && is_array(Post::val('contacts'))) {
            $contactsArray = array_keys(Post::val('contacts'));
            $contacts =& $this->_proc->db->LoadContactsById($contactsArray);
        }
        if (Post::has('groupid')) {
            $group =& $this->_proc->db->SelectGroupById(Post::val('groupid', -1));
            $contacts =& $this->_proc->db->SelectAddressGroupContacts(Post::val('groupid', -1));
        }
        if ($contacts) {
            foreach ($contacts->Instance() as $contact) {
                if (!$contact->Email) {
                    continue;
                }
                $this->To .= $contact->Name ? '"' . $contact->Name . '" <' . $contact->Email . '>, ' : $contact->Email . ',';
            }
            $this->To = trim(trim($this->To), ',');
        }
        if (Post::has('mailto')) {
            $this->To = Post::val('mailto', '');
        }
        if (Get::has('to')) {
            $this->To = (string) trim(Get::val('to', ''));
        }
        $message = null;
        $isHtml = $this->_proc->account->AllowDhtmlEditor;
        $this->attacmentsHtml = '';
        $this->_pagebuilder->AddJSText('
			
var bcc, bcc_mode, bcc_mode_switcher;

var plainCont = null;
var plainEditor = null;
var HTMLEditor = null;
var EditAreaUrl = "edit-area.php";
var prevWidth = 0;
var prevHeight = 0;
var rowIndex = 0;

function ResizeElements(mode) 
{
	var width = GetWidth();
	if (width < 684)
		width = 684;
	width = width - 40;
	var height = Math.ceil(width/3);
	
	if (prevWidth != width && prevHeight != height) {
		prevWidth = width;
		prevHeight = height;
		if (plainCont != null) {
			plainCont.style.height = height + "px";
			plainCont.style.width = width + "px";
			' . $editorResize . '
		}
	}
}

function WriteEmails(str, field)
{
	var mailInput;
	if (field == 2) {
		mailInput = document.getElementById("toCC");
	} else if (field == 3) {
		mailInput = document.getElementById("toBCC");
	} else {
		mailInput = document.getElementById("toemail");
	}
	if (mailInput) {
		mailInput.value = (mailInput.value == "") ? str : mailInput.value + ", " + str;
		mailInput.focus();
	}
}

function LoadAttachmentHandler(attachObj)
{
	var attachtable = document.getElementById("attachmentTable");
	if (attachObj)
	{
		var imageLink = GetFileParams(attachObj.FileName);
		var tr = attachtable.insertRow(rowIndex++);
		tr.id = "tr_" + attachObj.TempName;
		var td = tr.insertCell(0);
		td.className = "wm_attachment";
		var innerHtml = \'<img src="./images/icons/\' + imageLink.image + \'" />\';
		innerHtml += \'<input type="hidden" name="attachments[\' + attachObj.TempName + \']" value="\' + attachObj.FileName + \'">\';
		innerHtml += HtmlEncode(attachObj.FileName) + \' (\' + GetFriendlySize(attachObj.Size) + \') <a href="#" id="\' + attachObj.TempName + \'" onclick="return  DeleteAttach(this.id);">' . JS_LANG_Delete . '</a>\';
		td.innerHTML = innerHtml;
	}
}

function ChangeBCCMode()
{
	if (bcc_mode == "hide") {
		bcc_mode = "show";
		bcc.className = "";
		bcc_mode_switcher.innerHTML = Lang.HideBCC;
	} else {
		bcc_mode = "hide";
		bcc.className = "wm_hide";
		bcc_mode_switcher.innerHTML = Lang.ShowBCC;
	}
	' . $editorReplace . '
	return false;
}

function UpdateIdUid(id, uid)
{
	var idf = document.getElementById("m_id");
	var uidf = document.getElementById("m_uid");
	if (idf && uidf) {
		idf.value = id;
		uidf.value = uid;
	}
}

var Rep_m, Err_m;
var hiddensaveiframe;
var pop3Pr = ' . ($pagebuilder->_proc->account->MailProtocol == MAILPROTOCOL_POP3 ? 'true' : 'false') . ';
function DoSaveButton()
{
	if (pop3Pr)
	{ 
		if (!hiddensaveiframe) {
			hiddensaveiframe = CreateChildWithAttrs(document.body, "iframe", [["name", "hiddensaveiframe"], ["class", "wm_hide"]]);
		}
	}
	
	var form = document.getElementById("messageForm");
	form.action = "' . ACTIONFILE . '?action=save&req=message";
	form.target = (pop3Pr) ? "hiddensaveiframe" : "";

	if (submitSaveMessage()) {
		form.submit();
	}
}

function DoSendButton()
{
	var toemail = document.getElementById("toemail");
	var ccemail = document.getElementById("toCC");
	var bccemail = document.getElementById("toBCC");
	var subject = document.getElementById("subject");
	var mailIsCorrect = false;
	
	if ((toemail && toemail.value.length > 3) || (ccemail && ccemail.value.length > 3) || (bccemail && bccemail.value.length > 3)) { 
		mailIsCorrect = true;
	}
	
	if (mailIsCorrect) {
		if (subject && subject.value.length < 1 && !confirm(Lang.ConfirmEmptySubject)) {
			return false;
		}
		
		var form = document.getElementById("messageForm");
		form.action = "' . ACTIONFILE . '?action=send&req=message";
		form.target = "";
		if (submitSaveMessage()) {
			form.submit();
		}
	} else {
		alert(Lang.WarningToBlank);
	}
}

function DeleteAttach(idline)
{
	var trtable = document.getElementById("tr_" + idline);
	if (trtable)
	{
		trtable.className = "wm_hide";
		CleanNode(trtable);
	}
	return false;
}

function ShowPictures()
{
	var showPictureTable = document.getElementById("showpicturestable");

	if (HTMLEditor) {
		var temp = HTMLEditor.GetText().ReplaceStr("wmx_src", "src");
		temp = temp.ReplaceStr("wmx_background", "background");
		HTMLEditor.SetHtml(temp);
		if (showPictureTable) {
			showPictureTable.className = "wm_hide";
		}
		HTMLEditor.Replace();
	}
}

');
        $this->_pagebuilder->AddInitText('

bcc_mode = "hide";
bcc = document.getElementById("bcc");
bcc_mode_switcher = document.getElementById("bcc_mode_switcher");

plainEditor = document.getElementById("editor_area");
plainCont = document.getElementById("editor_cont");

Rep_m = new CReport("Rep_m");
Rep_m.Build();

Err_m = new CError("Err_m", "' . ConvertUtils::ClearJavaScriptString($this->_pagebuilder->SkinName(), '"') . '");
Err_m.Build();
');
        $m_id = -1;
        $m_uid = '';
        if (Post::has('m_id')) {
            $mes_id = Post::val('m_id');
            $mes_uid = Post::val('m_uid');
            $folder_id = Post::val('f_id');
            $folder_name = Post::val('f_name');
            $folder_name = 'defaultname';
            $mes_charset = Post::val('charset', -1);
            $message = new GetMessageBase($this->_proc->account, $mes_id, $mes_uid, $folder_id, $folder_name, $mes_charset);
            $m_id = (int) $mes_id;
            $m_uid = $mes_uid;
        }
        $this->inputs = '<input type="hidden" id="m_id" name="m_id" value="' . ConvertUtils::AttributeQuote($m_id) . '"><input type="hidden" id="m_uid" name="m_uid" value="' . ConvertUtils::AttributeQuote($m_uid) . '">';
        $withSignature = false;
        switch ($this->_proc->account->SignatureOptions) {
            case SIGNATURE_OPTION_AddToAll:
                $withSignature = true;
                break;
            case SIGNATURE_OPTION_AddToNewOnly:
                $withSignature = $this->Type == 'mes';
                break;
            default:
            case SIGNATURE_OPTION_DontAdd:
                $withSignature = false;
                break;
        }
        if ($message) {
            if ($this->Type != 'forward' && $this->Type != 'reply' && $this->Type != 'replytoall') {
                $withSignature = false;
            }
            $this->_pagebuilder->AddInitText('SetPriority(' . $message->msg->GetPriorityStatus() . ');');
            switch ($this->Type) {
                default:
                    $this->To = $message->PrintTo(true);
                    $this->CC = $message->PrintCC(true);
                    $this->BCC = '';
                    $this->Subject = $message->PrintSubject(true);
                    break;
                case 'forward':
                    $this->To = '';
                    $this->CC = '';
                    $this->BCC = '';
                    $this->Subject = JS_LANG_Fwd . ': ' . $message->PrintSubject(true);
                    break;
                case 'reply':
                    $replyto = trim($message->PrintReplyTo(true));
                    $this->To = strlen($replyto) > 0 ? $replyto : $message->PrintFrom(true);
                    $this->CC = '';
                    $this->BCC = '';
                    $this->Subject = JS_LANG_Re . ': ' . $message->PrintSubject(true);
                    break;
                case 'replytoall':
                    $emailCollection =& $message->msg->GetAllRecipients(false, true);
                    $temp = '';
                    if ($emailCollection) {
                        foreach ($emailCollection->Instance() as $value) {
                            $email =& $value;
                            if ($email->Email != $this->_proc->account->Email) {
                                $temp .= $email->Email . ', ';
                            }
                        }
                    }
                    $this->To = trim(trim($temp), ',');
                    $this->CC = '';
                    $this->BCC = '';
                    $this->Subject = JS_LANG_Re . ': ' . $message->PrintSubject(true);
                    break;
            }
            if ($this->_proc->account->AllowDhtmlEditor) {
                switch ($this->Type) {
                    case 'forward':
                    case 'reply':
                    case 'replytoall':
                        if ($message->account->ViewMode == VIEW_MODE_PREVIEW_PANE_NO_IMG || $message->account->ViewMode == VIEW_MODE_WITHOUT_PREVIEW_PANE_NO_IMG) {
                            $isHtml = true;
                            $this->Body = ConvertUtils::HtmlBodyWithoutImages($message->msg->GetRelpyAsHtml(true));
                            if (isset($GLOBALS[GL_WITHIMG]) && $GLOBALS[GL_WITHIMG]) {
                                $GLOBALS[GL_WITHIMG] = false;
                                $this->isSafety = false;
                            }
                        } else {
                            $isHtml = true;
                            $this->Body = ConvertUtils::HtmlBodyWithoutImages($message->msg->GetRelpyAsHtml(true));
                        }
                        break;
                    default:
                        if ($message->account->ViewMode == VIEW_MODE_PREVIEW_PANE_NO_IMG || $message->account->ViewMode == VIEW_MODE_WITHOUT_PREVIEW_PANE_NO_IMG) {
                            if ($message->msg->HasHtmlText()) {
                                $isHtml = true;
                                $this->Body = ConvertUtils::HtmlBodyWithoutImages($message->msg->GetCensoredHtmlWithImageLinks(true));
                                if (isset($GLOBALS[GL_WITHIMG]) && $GLOBALS[GL_WITHIMG]) {
                                    $GLOBALS[GL_WITHIMG] = false;
                                    $this->isSafety = false;
                                }
                            } elseif ($message->msg->HasPlainText()) {
                                $isHtml = false;
                                $this->Body = $message->msg->GetNotCensoredTextBody(true);
                            }
                        } else {
                            if ($message->msg->HasHtmlText()) {
                                $isHtml = true;
                                $this->Body = $message->msg->GetCensoredHtmlWithImageLinks(true);
                            } elseif ($message->msg->HasPlainText()) {
                                $isHtml = false;
                                $this->Body = $message->msg->GetNotCensoredTextBody(true);
                            }
                        }
                        break;
                }
            } else {
                $isHtml = false;
                switch ($this->Type) {
                    case 'forward':
                    case 'reply':
                    case 'replytoall':
                        $this->Body = $message->msg->GetRelpyAsPlain(true);
                        break;
                    default:
                        $this->Body = $message->msg->GetNotCensoredTextBody(true);
                        break;
                }
            }
            if ($message->HasAttachments() && $this->Type != 'reply' && $this->Type != 'replytoall') {
                $attachments =& $message->msg->Attachments;
                if ($attachments != null && $attachments->Count() > 0) {
                    foreach (array_keys($attachments->Instance()) as $key) {
                        $attachment =& $attachments->Get($key);
                        $tempname = $message->msg->IdMsg . '-' . $key . '_' . $attachment->GetTempName();
                        //$filename = ConvertUtils::ConvertEncoding($attachment->GetFilenameFromMime(), $GLOBALS[MailInputCharset], $message->account->GetUserCharset());
                        $filename = ConvertUtils::WMHtmlSpecialChars($attachment->GetFilenameFromMime());
                        $filesize = GetFriendlySize(strlen($attachment->MimePart->GetBinaryBody()));
                        $fs =& new FileSystem(INI_DIR . '/temp', $message->account->Email, $message->account->Id);
                        $attfolder =& new Folder($message->account->Id, -1, Session::val('attachtempdir', md5(session_id())));
                        $fs->SaveAttach($attachment, $attfolder, $tempname);
                        $this->attacmentsHtml .= '
<tr id="tr_' . ConvertUtils::AttributeQuote($tempname) . '"><td class="wm_attachment"><img src="./images/icons/' . GetAttachImg($filename) . '" />
<input type="hidden" name="attachments[' . ConvertUtils::AttributeQuote($tempname) . ']" value="' . ConvertUtils::AttributeQuote($filename) . '"> ' . $filename . '
 (' . $filesize . ') 						
<a href="#" id="' . ConvertUtils::AttributeQuote($tempname) . '" onClick="return  DeleteAttach(this.id);">' . JS_LANG_Delete . '</a></td></tr>';
                    }
                }
            }
        } else {
            $this->_pagebuilder->AddInitText('SetPriority(3);');
        }
        $signature = '';
        if ($withSignature) {
            if ($this->_proc->account->AllowDhtmlEditor) {
                $signature = $this->_proc->account->SignatureType == 0 ? nl2br($this->_proc->account->Signature) : $this->_proc->account->Signature;
                $signature = $isHtml ? $signature : strip_tags(nl2br($signature));
            } else {
                $signature = $this->_proc->account->SignatureType == 0 ? strip_tags($this->_proc->account->Signature) : strip_tags($this->_proc->account->Signature);
            }
        }
        $this->Body = $signature . $this->Body;
        if ($this->_proc->account->AllowDhtmlEditor) {
            $this->_pagebuilder->AddJSFile('class.html-editor.js');
            $setText = $isHtml ? 'HTMLEditor.SetHtml(mess);' : 'HTMLEditor.SetText(mess);';
            $this->_pagebuilder->AddJSText('
		function submitSaveMessage()
		{
			var hiddenkey = document.getElementById("ishtml");
			
			if (HTMLEditor._htmlMode) {
				plainEditor.value = HTMLEditor.GetText();
				hiddenkey.value = "1";
			} else {
				hiddenkey.value = "0";
			}
			if (bcc_mode == "hide")
			{
				document.getElementById("toBCC").value = "";
			}
			return true;
		}
		
		function EditAreaLoadHandler() { HTMLEditor.LoadEditArea();	}
		function CreateLinkHandler(url) { HTMLEditor.CreateLinkFromWindow(url); }
		function DesignModeOnHandler(rer) {
			HTMLEditor.Show();
			var mess = "' . ConvertUtils::ReBuildStringToJavaScript($this->Body, '"') . '";
			if (mess.length == 0) {
				mess = "<br />";
			}
			' . $setText . '
		}
				');
            $this->_pagebuilder->AddInitText('
		HTMLEditor = new CHtmlEditorField(true);
		HTMLEditor.SetPlainEditor(plainEditor, document.getElementById("mode_switcher"));
		HTMLEditor.Show();');
        } else {
            $this->_pagebuilder->AddJSText('
		function submitSaveMessage()
		{
			var hiddenkey = document.getElementById("ishtml");
			hiddenkey.value = "0";
			if (bcc_mode == "hide") {
				document.getElementById("toBCC").value = "";
			}
			return true;
		}
				');
        }
    }
Example #2
0
	var SessionSaverUrl = 'session-saver.php';
	
	var Title = "<?php 
    echo ConvertUtils::ClearJavaScriptString(defaultTitle, '"');
    ?>
";
	var SkinName = "<?php 
    echo ConvertUtils::ClearJavaScriptString(defaultSkin, '"');
    ?>
";
	var Start = <?php 
    echo (int) $start;
    ?>
;
	var ToAddr = "<?php 
    echo ConvertUtils::ClearJavaScriptString($to, '"');
    ?>
";
	var XType = "<?php 
    echo (int) XTYPE;
    ?>
";
	var WmVersion = "<?php 
    echo JS_VERS;
    ?>
";
	var Seporated = <?php 
    echo isset($_SESSION[SEPARATED]) && $_SESSION[SEPARATED] ? 'true' : 'false';
    ?>
;
	var CSType = <?php 
    /**
     * @param PageBuilder $pageBuilder
     * @return ContactsPanel
     */
    function FullScreenPanel(&$pagebuilder)
    {
        $this->_pagebuilder =& $pagebuilder;
        $this->_proc =& $pagebuilder->_proc;
        $this->_pagebuilder->_top->AddOnResize('ResizeElements(\'all\');');
        $this->_pagebuilder->AddJSText('
var sep = "-----";
var logo, accountlist, toolbar, iframe;

function ResizeElements(mode) 
{
	var height = GetHeight();
	var exx = 0; var offsetHeight = 0;
	offsetHeight = (logo) ? logo.offsetHeight : 0; exx += (offsetHeight) ? offsetHeight : 0;
	offsetHeight = (accountlist) ? accountlist.offsetHeight : 0; exx += (offsetHeight) ? offsetHeight : 0;
	offsetHeight = (toolbar) ? toolbar.offsetHeight : 0; exx += (offsetHeight) ? offsetHeight : 0;
	iframe.height = height - exx;		
}

function LoadMessage(newcharset, newplain)
{
	BaseForm.Charset.value = newcharset;
	BaseForm.Plain.value = newplain;
	BaseForm.Form.submit();
}

function DoNewMessageButton()
{
	document.location = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_NEWOREDIT . '";
}

function DoPrintButton()
{
	var src = "print.php?msg_id=' . Post::val('m_id', '') . '&msg_uid=' . urlencode(Post::val('m_uid', '')) . '&folder_id=' . Post::val('f_id', '') . '&folder_fname=' . urlencode(Post::val('f_name', '')) . '&charset=" + BaseForm.Charset.value;
	var allHeight = GetHeight();
	var allWidth = GetWidth();
	var height = 480; if (height >= allHeight) height = Math.ceil(allHeight*2/3);
	var width = 640; if (width >= allWidth) width = Math.ceil(allWidth*2/3);
	var top = Math.ceil((allHeight - height)/2)
	var left = Math.ceil((allWidth - width)/2)
	var win = window.open(src, "Popup", "toolbar=yes,status=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left);
}

function ChangeCharset(newCharset)
{
	var idline = BaseForm.MessId.value + sep + BaseForm.MessUid.value + sep + BaseForm.FolderId.value + sep + BaseForm.Charset.value + sep;
	var newidline = BaseForm.MessId.value + sep + BaseForm.MessUid.value + sep + BaseForm.FolderId.value + sep + newCharset + sep;
	BaseForm.Charset.value = newCharset;
} 

function DoForwardButton()
{
		BaseForm.Form.action = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_NEWOREDIT . '";
		BaseForm.Form.target = "_self";
		BaseForm.Plain.value = "-1";
		BaseForm.Type.value = "forward";
		BaseForm.Form.submit();
}

function DoReplyButton()
{
		BaseForm.Form.action = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_NEWOREDIT . '";
		BaseForm.Form.target = "_self";
		BaseForm.Plain.value = "-1";
		BaseForm.Type.value = "reply";
		BaseForm.Form.submit();
}

function DoReplyAllButton()
{
		BaseForm.Form.action = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_NEWOREDIT . '";
		BaseForm.Form.target = "_self";
		BaseForm.Plain.value = "-1";
		BaseForm.Type.value = "replytoall";
		BaseForm.Form.submit();
}

function DoSaveButton()
{
	document.location = "attach.php?msg_id=' . Post::val('m_id', '') . '&msg_uid=' . urlencode(Post::val('m_uid', '')) . '&folder_id=' . Post::val('f_id', '') . '&folder_fname=' . urlencode(Post::val('f_name', '')) . '";
}


function AddContact(contactString)
{
	var obj = GetEmailParts(HtmlDecode(contactString));
	var hiddenform = CreateChildWithAttrs(document.body, "form", [["action", "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_CONTACTS . '&' . CONTACT_MODE . '=' . C_NEW . '"], ["target", "_self"], ["method", "POST"]]);
	CreateChildWithAttrs(hiddenform, "input", [["type", "hidden"], ["name", "cdata"], ["value",  "1"]]);
	CreateChildWithAttrs(hiddenform, "input", [["type", "hidden"], ["name", "cemail"], ["value",  obj.Email]]);
	CreateChildWithAttrs(hiddenform, "input", [["type", "hidden"], ["name", "cfullname"], ["value",  obj.Name]]);
	hiddenform.submit();
}


function DoDeleteButton()
{
	if (!confirm("' . ConvertUtils::ClearJavaScriptString(JS_LANG_ConfirmAreYouSure, '"') . '")) {
		return false;
	}
	var hiddenform = CreateChildWithAttrs(document.body, "form", [["action", "' . ACTIONFILE . '?action=delete&req=message"], ["target", "_self"], ["method", "POST"]]);
	CreateChildWithAttrs(hiddenform, "input", [["type", "hidden"], ["name", "messageId"], ["value",  "' . ConvertUtils::ClearJavaScriptString(Post::val('m_id', -1), '"') . '"]]);
	CreateChildWithAttrs(hiddenform, "input", [["type", "hidden"], ["name", "messageUid"], ["value",  "' . ConvertUtils::ClearJavaScriptString(Post::val('m_uid', ''), '"') . '"]]);
	CreateChildWithAttrs(hiddenform, "input", [["type", "hidden"], ["name", "folderId"], ["value",  "' . ConvertUtils::ClearJavaScriptString(Post::val('f_id', -1), '"') . '"]]);
	hiddenform.submit();
}

function CBaseForm()
{
	this.Form = document.getElementById("messform");
	this.MessId = document.getElementById("m_id");
	this.MessUid = document.getElementById("m_uid");
	this.FolderId = document.getElementById("f_id");
	this.FolderName = document.getElementById("f_name");
	this.Charset = document.getElementById("charset");
	this.Plain = document.getElementById("plain");
	this.Type = document.getElementById("mtype");
}
');
        $this->_pagebuilder->AddInitText('
BaseForm = new CBaseForm();
logo = document.getElementById("logo");
accountlist = document.getElementById("accountslist");
toolbar = document.getElementById("toolbar");
iframe = document.getElementById("iframe_container");
SetBodyAutoOverflow(false);
ResizeElements("all");
LoadMessage("' . ConvertUtils::ClearJavaScriptString(Post::val('charset', ''), '"') . '", "' . Post::val('plain', '-1') . '");
			');
    }
Example #4
0
	</body>
	</html>	
	
<?php 
        } else {
            $isNull = true;
        }
        break;
    default:
    case 'none':
        $isNull = true;
        break;
}
if ($isNull) {
    $err = $isError && isset($GLOBALS[ErrorDesc]) ? $GLOBALS[ErrorDesc] : '';
    $err = ConvertUtils::ClearJavaScriptString($err, '"');
    $temp = $isError ? 'parent.InfoPanel._isError = true; parent.InfoPanel.SetInfo("' . $err . '"); parent.InfoPanel.Show();' : '';
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html>
<head>
	<title>iframe</title>
	<link rel="stylesheet" href="./skins/' . $account->DefaultSkin . '/styles.css" type="text/css" />
	<script type="text/javascript" src="_functions.js"></script>
	<script type="text/javascript" src="./classic/base.messagepart.js"></script>
	<script type="text/javascript">
	
	var WebMail = { _html: document.getElementById("html") };
	
	' . $temp . '
	
	function ResizeElements()
    /**
     * @return string
     */
    function MessageListTr()
    {
        $out = '';
        if (!$this->messageCollection) {
            return '';
        }
        $c = $this->messageCollection->Count();
        $stylewidth = array(array('', ' style="width: 21px; text-align: center;"'), array('', ' style="width: 20px;"'), array('', ' style="width: 20px;"'), array('', ' style="width: 150px;"'), array('', ' style="width: 140px;"'), array('', ' style="width: 48px;"'), array('', ' style="width: 148px;"'));
        $atemp_1 = $atemp_2 = '';
        if ($this->_proc->account->ViewMode == VIEW_MODE_WITHOUT_PREVIEW_PANE || $this->_proc->account->ViewMode == VIEW_MODE_WITHOUT_PREVIEW_PANE_NO_IMG) {
            $atemp_1 = '<a href="#">';
            $atemp_2 = '</a>';
        }
        for ($i = 0; $i < $c; $i++) {
            $msg =& $this->messageCollection->Get($i);
            if (!$msg) {
                continue;
            }
            $isRead = ($msg->Flags & MESSAGEFLAGS_Seen) == MESSAGEFLAGS_Seen ? 'true' : 'false';
            $flaggedImg = '';
            $handclass = $this->_proc->account->MailProtocol != MAILPROTOCOL_IMAP4 && $this->_proc->currentFolder && $this->_proc->currentFolder->SyncType == FOLDERSYNC_DirectMode ? '' : 'wm_control';
            if (($msg->Flags & MESSAGEFLAGS_Flagged) == MESSAGEFLAGS_Flagged) {
                $isFlagged = 'true';
                $flaggedImg = '<img class="' . $handclass . '" src="skins/' . $this->_pagebuilder->SkinName() . '/menu/flag.gif" />';
            } else {
                $isFlagged = 'false';
                $flaggedImg = '<img class="' . $handclass . '" src="skins/' . $this->_pagebuilder->SkinName() . '/menu/unflag.gif" />';
            }
            if ($msg->IdFolder == -1 && $this->folder && $this->folder->SyncType == FOLDERSYNC_DirectMode) {
                $msg->IdFolder = $this->folder->IdDb;
            }
            $isForwarded = ($msg->Flags & MESSAGEFLAGS_Forwarded) == MESSAGEFLAGS_Forwarded ? 'true' : 'false';
            $isDeleted = ($msg->Flags & MESSAGEFLAGS_Deleted) == MESSAGEFLAGS_Deleted ? 'true' : 'false';
            $isGrey = ($msg->Flags & MESSAGEFLAGS_Grayed) == MESSAGEFLAGS_Grayed ? 'true' : 'false';
            $isReplied = 'false';
            $date =& $msg->GetDate();
            $date->FormatString = $this->_proc->account->DefaultDateFormat;
            $date->TimeFormat = $this->_proc->account->DefaultTimeFormat;
            $sep = '-----';
            $char = $msg->Charset > -1 ? ConvertUtils::GetCodePageName($msg->Charset) : -1;
            $idString = $msg->IdMsg . $sep . $msg->Uid . $sep . $msg->IdFolder . $sep . $char . $sep;
            $folderName = $this->folder ? $this->folder->FullName : '';
            $this->_pagebuilder->AddInitText('messObj = {Read: ' . $isRead . ', Replied: ' . $isReplied . ', Forwarded: ' . $isForwarded . ', Flagged: ' . $isFlagged . ', Deleted: ' . $isDeleted . ', Gray: ' . $isGrey . ', Id: ' . (int) $msg->IdMsg . ', Uid: "' . ConvertUtils::ClearJavaScriptString($msg->Uid, '"') . '", FolderId: ' . $msg->IdFolder . ', FolderFullName: "' . ConvertUtils::ClearJavaScriptString($folderName, '"') . '", FromAddr: "", Subject: ""}');
            $this->_pagebuilder->AddInitText('InboxLines.AddLine(new CSelectionPart(document.getElementById("' . ConvertUtils::ClearJavaScriptString($idString, '"') . '"), "' . $this->_pagebuilder->SkinName() . '" , messObj));');
            $from = ConvertUtils::WMHtmlSpecialChars($msg->GetFromAsStringForSend());
            $to = ConvertUtils::WMHtmlSpecialChars($msg->GetAllRecipientsEmailsAsString(true));
            $subject = ConvertUtils::WMHtmlSpecialChars($msg->GetSubject(true));
            if (isset($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) && strlen($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) > 0) {
                $from = preg_replace('/' . preg_quote($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) . '/i', '<font>$0</font>', $from);
                $to = preg_replace('/' . preg_quote($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) . '/i', '<font>$0</font>', $to);
                $subject = preg_replace('/' . preg_quote($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) . '/i', '<font>$0</font>', $subject);
            }
            $subjectId = $i == 0 ? 'id="subject"' : '';
            $out .= '
			<tr onclick="CheckThisLine(event, this);" ondblclick="CheckThisLineDb(event, this);" id="' . ConvertUtils::AttributeQuote($idString) . '">
			<td' . $stylewidth[0][(int) ($i == 0)] . ' id="none"><input type="checkbox" /></td>
			<td' . $stylewidth[1][(int) ($i == 0)] . '>';
            $out .= (int) $msg->HasAttachments() == 1 ? '<img src="skins/' . $this->_pagebuilder->SkinName() . '/menu/attachment.gif" />' : '';
            $out .= '</td><td' . $stylewidth[2][(int) ($i == 0)] . '>' . $flaggedImg;
            $tempFromTo = $this->folder && $this->folder->ToFolder ? $to : $from;
            $out .= '</td><td' . $stylewidth[3][(int) ($i == 0)] . ' class="wm_inbox_from_subject"><nobr>' . $atemp_1 . $tempFromTo . $atemp_2 . '</nobr></td>
			<td' . $stylewidth[4][(int) ($i == 0)] . '><nobr>' . $date->GetFormattedDate($this->_proc->account->GetDefaultTimeOffset()) . '</nobr></td><td' . $stylewidth[5][(int) ($i == 0)] . '><nobr>' . GetFriendlySize($msg->Size) . '</nobr></td>
			<td' . $stylewidth[6][(int) ($i == 0)] . ' class="wm_inbox_from_subject" ' . $subjectId . '><nobr>' . $atemp_1 . $subject . $atemp_2 . '</nobr></td>
			</tr>';
        }
        if (isset($this->_proc->sArray[SEARCH_ARRAY]) && isset($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) && strlen($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) > 0 && $c == 0) {
            $out = '<tr><td colspan="6" style="width: 404px;"></td>';
            $out .= '<td style="width: 150px;" id="subject"></td></tr>
				<tr><td colspan="7"><div class="wm_inbox_info_message">' . InfoNoMessagesFound . '</div></td></tr>
				';
        } else {
            if ($c == 0) {
                $out = '<tr><td colspan="6" style="width: 404px;"></td>';
                $out .= '<td style="width: 150px;" id="subject"></td></tr>
				<tr><td colspan="7"><div class="wm_inbox_info_message">' . JS_LANG_InfoEmptyFolder . '</div></td></tr>
				';
            }
        }
        return $out;
    }
/**
 * @param PageBuilder $pagebuilder
 * @param int $contact_id
 * @param bool $isNew
 * @return string
 */
function WriteContactEdit(&$pagebuilder, $contact_id, $isNew = false)
{
    $out = '';
    $isCorrect = false;
    $jsIsNew = $isNew ? 'true' : 'false';
    $pagebuilder->AddJSText('

function dolocation(idurl) 
{
	var url = document.getElementById(idurl);
	if (url && url.value.length > 2) {
		OpenURL(url.value);
	}
}

function MessageToMail(email)
{
	if (!email) {
		return false;
	}
	var form = CreateChildWithAttrs(document.body, "form", [["action", "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_NEWOREDIT . '"], ["method", "POST"]]);
	CreateChildWithAttrs(form, "input", [["type", "hidden"], ["name", "mailto"], ["value", email]]);
	form.submit();
}

function submitContactForm()
{
	var result = false;
	if (newContact) { 
		result = newContact.SubmitContact();
	}
	if (!result) {
		alert(Lang.WarningContactNotComplete);
	}
	return result;
} 

function DoCancle()
{
	if (' . $jsIsNew . ') {
		document.location = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_CONTACTS . '";
	} else {
		document.location = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_CONTACTS . '&' . CONTACT_MODE . '=' . C_VIEW . '&' . CONTACT_ID . '=' . $contact_id . '";
	}
}
	');
    if ($isNew) {
        $contact = new AddressBookRecord();
        $contact->PrimaryEmail = 0;
        $groupsArray = array();
        if (Post::val('cdata') == 1) {
            $contact->FullName = Post::val('cfullname', '');
            $contact->HomeEmail = Post::val('cemail', '');
        }
    } else {
        $contact =& $pagebuilder->_proc->db->SelectAddressBookRecord($contact_id);
        $groupsArray =& $pagebuilder->_proc->db->SelectAddressGroupContact($contact_id);
    }
    $allGroups =& $pagebuilder->_proc->db->SelectUserAddressGroupNames();
    $skinName = $pagebuilder->SkinName();
    if ($contact && is_object($contact)) {
        $isCorrect = true;
    }
    if ($isCorrect) {
        $pagebuilder->AddInitText($contact->isOpen() ? 'var isOpenContact = true;' : 'var isOpenContact = false;');
        $data = array();
        $data = @get_object_vars($contact);
        foreach ($data as $key => $value) {
            $data[$key] = $value && strlen($value) > 0 ? array('', $value) : array(' class="wm_hide"', '');
        }
        $Birthday[0] = $data['BirthdayDay'][1] || $data['BirthdayMonth'][1] || $data['BirthdayYear'][1] ? '' : ' class="wm_hide"';
        $Birthday[1] = GetBirthDay($data['BirthdayDay'][1], $data['BirthdayMonth'][1], $data['BirthdayYear'][1]);
        $Email = array('', '');
        switch ($contact->PrimaryEmail) {
            case PRIMARYEMAIL_Home:
                $Email[1] = $contact->HomeEmail;
                break;
            case PRIMARYEMAIL_Business:
                $Email[1] = $contact->BusinessEmail;
                break;
            case PRIMARYEMAIL_Other:
                $Email[1] = $contact->OtherEmail;
                break;
        }
        $Email[0] = $Email[1] ? '' : ' class="wm_hide"';
        $class_00 = $data['HomeEmail'][1] || $data['HomeStreet'][1] || $data['HomeCity'][1] || $data['HomeFax'][1] || $data['HomeState'][1] || $data['HomePhone'][1] || $data['HomeZip'][1] || $data['HomeMobile'][1] || $data['HomeCountry'][1] || $data['HomeWeb'][1];
        $class_00 = $class_00 ? ' class="wm_contacts_view"' : ' class="wm_hide"';
        $class_01 = $data['HomeCity'][1] || $data['HomeFax'][1] ? '' : ' class="wm_hide"';
        $data['HomeCity'][0] = $data['HomeCity'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['HomeCity'][2] = $data['HomeCity'][1] != '' ? '' : ' class="wm_hide"';
        $data['HomeFax'][0] = $data['HomeFax'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['HomeFax'][2] = $data['HomeFax'][1] != '' ? '' : ' class="wm_hide"';
        $class_02 = $data['HomeState'][1] || $data['HomePhone'][1] ? '' : ' class="wm_hide"';
        $data['HomeState'][0] = $data['HomeState'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['HomeState'][2] = $data['HomeState'][1] != '' ? '' : ' class="wm_hide"';
        $data['HomePhone'][0] = $data['HomePhone'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['HomePhone'][2] = $data['HomePhone'][1] != '' ? '' : ' class="wm_hide"';
        $class_03 = $data['HomeZip'][1] || $data['HomeMobile'][1] ? '' : ' class="wm_hide"';
        $data['HomeZip'][0] = $data['HomeZip'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['HomeZip'][2] = $data['HomeZip'][1] != '' ? '' : ' class="wm_hide"';
        $data['HomeMobile'][0] = $data['HomeMobile'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['HomeMobile'][2] = $data['HomeMobile'][1] != '' ? '' : ' class="wm_hide"';
        $class_10 = $data['BusinessCompany'][1] || $data['BusinessJobTitle'][1] || $data['BusinessDepartment'][1] || $data['BusinessOffice'][1] || $data['BusinessCity'][1] || $data['BusinessFax'][1] || $data['BusinessState'][1] || $data['BusinessPhone'][1] || $data['BusinessZip'][1] || $data['BusinessCountry'][1] || $data['BusinessEmail'][1] || $data['BusinessStreet'][1] || $data['BusinessWeb'][1];
        $class_10 = $class_10 ? ' class="wm_contacts_view"' : ' class="wm_hide"';
        $class_11 = $data['BusinessCompany'][1] || $data['BusinessJobTitle'][1] ? '' : ' class="wm_hide"';
        $data['BusinessCompany'][0] = $data['BusinessCompany'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessCompany'][2] = $data['BusinessCompany'][1] != '' ? '' : ' class="wm_hide"';
        $data['BusinessJobTitle'][0] = $data['BusinessJobTitle'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessJobTitle'][2] = $data['BusinessJobTitle'][1] != '' ? '' : ' class="wm_hide"';
        $class_12 = $data['BusinessDepartment'][1] || $data['BusinessOffice'][1] ? '' : ' class="wm_hide"';
        $data['BusinessDepartment'][0] = $data['BusinessDepartment'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessDepartment'][2] = $data['BusinessDepartment'][1] != '' ? '' : ' class="wm_hide"';
        $data['BusinessOffice'][0] = $data['BusinessOffice'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessOffice'][2] = $data['BusinessOffice'][1] != '' ? '' : ' class="wm_hide"';
        $class_13 = $data['BusinessCity'][1] || $data['BusinessFax'][1] ? '' : ' class="wm_hide"';
        $data['BusinessCity'][0] = $data['BusinessCity'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessCity'][2] = $data['BusinessCity'][1] != '' ? '' : ' class="wm_hide"';
        $data['BusinessFax'][0] = $data['BusinessFax'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessFax'][2] = $data['BusinessFax'][1] != '' ? '' : ' class="wm_hide"';
        $class_14 = $data['BusinessState'][1] || $data['BusinessPhone'][1] ? '' : ' class="wm_hide"';
        $data['BusinessState'][0] = $data['BusinessState'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessState'][2] = $data['BusinessState'][1] != '' ? '' : ' class="wm_hide"';
        $data['BusinessPhone'][0] = $data['BusinessPhone'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessPhone'][2] = $data['BusinessPhone'][1] != '' ? '' : ' class="wm_hide"';
        $class_15 = $data['BusinessZip'][1] || $data['BusinessCountry'][1] ? '' : ' class="wm_hide"';
        $data['BusinessZip'][0] = $data['BusinessZip'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessZip'][2] = $data['BusinessZip'][1] != '' ? '' : ' class="wm_hide"';
        $data['BusinessCountry'][0] = $data['BusinessCountry'][1] != '' ? ' class="wm_contacts_view_title"' : ' class="wm_hide"';
        $data['BusinessCountry'][2] = $data['BusinessCountry'][1] != '' ? '' : ' class="wm_hide"';
        $class_20 = $data['OtherEmail'][1] || $data['Notes'][1] || $Birthday[1];
        $class_20 = $class_20 ? ' class="wm_contacts_view"' : ' class="wm_hide"';
        $daysSelect = '';
        for ($i = 1; $i < 32; $i++) {
            $daysSelect .= $data['BirthdayDay'][1] == $i ? '<option value="' . $i . '" selected="selected">' . $i . '</option>' . "\r\n" : '<option value="' . $i . '">' . $i . '</option>' . "\r\n";
        }
        $selectedArray = array('', '', '', '', '', '', '', '', '', '', '', '', '', '');
        if (isset($data['BirthdayMonth'][1]) && $data['BirthdayMonth'][1] > 0 && $data['BirthdayMonth'][1] < 13) {
            $selectedArray[(int) $data['BirthdayMonth'][1]] = ' selected="selected"';
        }
        $monthsSelect = '<option value="1"' . $selectedArray[1] . '>' . JS_LANG_January . '</option>
						<option value="2"' . $selectedArray[2] . '>' . JS_LANG_February . '</option>
						<option value="3"' . $selectedArray[3] . '>' . JS_LANG_March . '</option>
						<option value="4"' . $selectedArray[4] . '>' . JS_LANG_April . '</option>
						<option value="5"' . $selectedArray[5] . '>' . JS_LANG_May . '</option>
						<option value="6"' . $selectedArray[6] . '>' . JS_LANG_June . '</option>
						<option value="7"' . $selectedArray[7] . '>' . JS_LANG_July . '</option>
						<option value="8"' . $selectedArray[8] . '>' . JS_LANG_August . '</option>
						<option value="9"' . $selectedArray[9] . '>' . JS_LANG_September . '</option>
						<option value="10"' . $selectedArray[10] . '>' . JS_LANG_October . '</option>
						<option value="11"' . $selectedArray[11] . '>' . JS_LANG_November . '</option>
						<option value="12"' . $selectedArray[12] . '>' . JS_LANG_December . '</option>';
        $yearsSelect = '';
        $lastyear = (int) date('Y', time()) > 1900 ? (int) date('Y', time()) : 2008;
        for ($i = $lastyear; $i > 1899; $i--) {
            $yearsSelect .= $data['BirthdayYear'][1] == $i ? '<option value="' . $i . '" selected="selected">' . $i . '</option>' . "\r\n" : '<option value="' . $i . '">' . $i . '</option>' . "\r\n";
        }
        $groupsHtml = '';
        if ($groupsArray && count($groupsArray) > 0) {
            $groupsHtml = '<table class="wm_contacts_view">
									<tr>
									<td class="wm_contacts_view_title wm_contacts_section_name">' . JS_LANG_Groups . ':</td>';
            $k = 0;
            $cnt = count($groupsArray);
            foreach ($groupsArray as $key => $value) {
                $k++;
                $tempstr = $cnt > $k ? ',' : '';
                $groupsHtml .= '<td class="wm_contacts_groups"><a href="' . BASEFILE . '?' . CONTACT_MODE . '=' . G_VIEW . '&' . CONTACT_ID . '=' . $key . '">' . $value . '</a>' . $tempstr . '</td>' . "\r\n";
            }
            $groupsHtml .= '</tr></table>';
        }
        $groupsHtml2 = '';
        if (count($allGroups) > 0) {
            $groupsHtml2 = '
							<table class="wm_contacts_tab" onclick="ChangeTabVisibility(\'street_addresses\');">
									<tr>
										<td>
											<span class="wm_contacts_tab_name">
												' . JS_LANG_Groups . '
											</span>
											<span class="wm_contacts_tab_mode">
												<img id="button_street_addresses" src="skins/' . $skinName . '/menu/arrow_down.gif" />
											</span>
										</td>
									</tr>
								</table>
								<table class="wm_hide" id="street_addresses">
									<tr><td>';
            foreach ($allGroups as $id => $name) {
                $inGroup = key_exists($id, $groupsArray);
                $inGroup = $inGroup ? 'checked="checked"' : '';
                $groupsHtml2 .= '<input id="inp_g_' . $id . '" class="wm_checkbox" ' . $inGroup . ' type="checkbox" value="' . $id . '" name="groupsIds[]"/>
					<label for="inp_g_' . $id . '">' . $name . '</label><br />';
            }
            $groupsHtml2 .= '
									</td></tr>
								</table>';
        }
        $useFrName = $contact->UseFriendlyName || $isNew ? ' checked="checked"' : '';
        $isNewHidden = $isNew ? '1' : '0';
        $out .= '<form action="' . ACTIONFILE . '?action=update&req=contact" method="POST" onsubmit="return submitContactForm()">
							<input type="hidden" name="isNewContact" value="' . $isNewHidden . '" />
							<input type="hidden" name="contactId" value="' . $contact_id . '" />
							<div id="viewTbl">
								<table class="wm_contacts_view">
									<tr' . $data['FullName'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_Name . ':</td>
										<td class="wm_contacts_name">' . ConvertUtils::WMHtmlSpecialChars($data['FullName'][1]) . '</td>
									</tr>
									<tr' . $Email[0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_Email . ':</td>
										<td class="wm_contacts_email"><a href="#" onclick="return MessageToMail(\'' . ConvertUtils::AttributeQuote(ConvertUtils::ClearJavaScriptString(ConvertUtils::WMHtmlSpecialChars($Email[1]), '\'')) . '\')">' . ConvertUtils::WMHtmlSpecialChars($Email[1]) . '</a></td>
									</tr>
								</table>
								<table' . $class_00 . '>
									<tr>
										<td class="wm_contacts_section_name" colspan="4">' . JS_LANG_Home . '</td>
									</tr>
									<tr' . $data['HomeEmail'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_PersonalEmail . ':</td>
										<td colspan="3">
											<a href="#" onclick="return MessageToMail(\'' . ConvertUtils::AttributeQuote(ConvertUtils::ClearJavaScriptString(ConvertUtils::WMHtmlSpecialChars($data['HomeEmail'][1]), '\'')) . '\')">' . ConvertUtils::WMHtmlSpecialChars($data['HomeEmail'][1]) . '</a>
										</td>
									</tr>
									<tr' . $data['HomeStreet'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_StreetAddress . ':</td>
										<td colspan="3">' . ConvertUtils::WMHtmlSpecialChars($data['HomeStreet'][1]) . '</td>
									</tr>
									<tr' . $class_01 . '>
										<td' . $data['HomeCity'][0] . '>' . JS_LANG_City . ':</td>
										<td' . $data['HomeCity'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['HomeCity'][1]) . '</td>
										<td' . $data['HomeFax'][0] . '>' . JS_LANG_Fax . ':</td>
										<td' . $data['HomeFax'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['HomeFax'][1]) . '</td>
									</tr>
									<tr' . $class_02 . '>
										<td' . $data['HomeState'][0] . '>' . JS_LANG_StateProvince . ':</td>
										<td' . $data['HomeState'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['HomeState'][1]) . '</td>
										<td' . $data['HomePhone'][0] . '>' . JS_LANG_Phone . ':</td>
										<td' . $data['HomePhone'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['HomePhone'][1]) . '</td>
									</tr>
									<tr' . $class_03 . '>
										<td' . $data['HomeZip'][0] . '>' . JS_LANG_ZipCode . ':</td>
										<td' . $data['HomeZip'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['HomeZip'][1]) . '</td>
										<td' . $data['HomeMobile'][0] . '>' . JS_LANG_Mobile . ':</td>
										<td' . $data['HomeMobile'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['HomeMobile'][1]) . '</td>
									</tr>
									<tr' . $data['HomeCountry'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_CountryRegion . ':</td>
										<td colspan="3">
											' . ConvertUtils::WMHtmlSpecialChars($data['HomeCountry'][1]) . '
										</td>
									</tr>
									<tr' . $data['HomeWeb'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_WebPage . ':</td>
										<td colspan="3">
											' . ConvertUtils::WMHtmlSpecialChars($data['HomeWeb'][1]) . '
										</td>
									</tr>
								</table>
								<table' . $class_10 . '>
									<tr>
										<td class="wm_contacts_section_name" colspan="4">' . JS_LANG_Business . '</td>
									</tr>
									<tr' . $data['BusinessEmail'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_BusinessEmail . ':</td>
										<td colspan="3">
											<a href="#" onclick="return MessageToMail(\'' . ConvertUtils::AttributeQuote(ConvertUtils::ClearJavaScriptString(ConvertUtils::WMHtmlSpecialChars($data['BusinessEmail'][1]), '\'')) . '\')">' . ConvertUtils::WMHtmlSpecialChars($data['BusinessEmail'][1]) . '</a>
										</td>
									</tr>
									<tr' . $class_11 . '>
										<td' . $data['BusinessCompany'][0] . '>' . JS_LANG_Company . ':</td>
										<td' . $data['BusinessCompany'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessCompany'][1]) . '</td>
										<td' . $data['BusinessJobTitle'][0] . '">' . JS_LANG_JobTitle . ':</td>
										<td' . $data['BusinessJobTitle'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessJobTitle'][1]) . '</td>
									</tr>
									<tr' . $class_12 . '>
										<td' . $data['BusinessDepartment'][0] . '>' . JS_LANG_Department . ':</td>
										<td' . $data['BusinessDepartment'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessDepartment'][1]) . '</td>
										<td' . $data['BusinessOffice'][0] . '>' . JS_LANG_Office . ':</td>
										<td' . $data['BusinessOffice'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessOffice'][1]) . '</td>
									</tr>
									<tr' . $data['BusinessStreet'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_StreetAddress . ':</td>
										<td colspan="3">' . ConvertUtils::WMHtmlSpecialChars($data['BusinessStreet'][1]) . '</td>
									</tr>
									<tr' . $class_13 . '>
										<td' . $data['BusinessCity'][0] . '>' . JS_LANG_City . ':</td>
										<td' . $data['BusinessCity'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessCity'][1]) . '</td>
										<td' . $data['BusinessFax'][0] . '>' . JS_LANG_Fax . ':</td>
										<td' . $data['BusinessFax'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessFax'][1]) . '</td>
									</tr>
									<tr' . $class_14 . '>
										<td' . $data['BusinessState'][0] . '>' . JS_LANG_StateProvince . ':</td>
										<td' . $data['BusinessState'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessState'][1]) . '</td>
										<td' . $data['BusinessPhone'][0] . '>' . JS_LANG_Phone . ':</td>
										<td' . $data['BusinessPhone'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessPhone'][1]) . '</td>
									</tr>
									<tr' . $class_15 . '>
										<td' . $data['BusinessZip'][0] . '>' . JS_LANG_ZipCode . ':</td>
										<td' . $data['BusinessZip'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessZip'][1]) . '</td>
										<td' . $data['BusinessCountry'][0] . '>' . JS_LANG_CountryRegion . ':</td>
										<td' . $data['BusinessCountry'][2] . '>' . ConvertUtils::WMHtmlSpecialChars($data['BusinessCountry'][1]) . '</td>
									</tr>
									<tr' . $data['BusinessWeb'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_WebPage . ':</td>
										<td colspan="3">
											' . ConvertUtils::WMHtmlSpecialChars($data['BusinessWeb'][1]) . '
										</td>
									</tr>
								</table>
								<table' . $class_20 . '>
									<tr>
										<td class="wm_contacts_section_name" colspan="2">' . JS_LANG_Other . '</td>
									</tr>
									<tr' . $Birthday[0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_Birthday . ':</td>
										<td>' . $Birthday[1] . '</td>
									</tr>
									<tr' . $data['OtherEmail'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_OtherEmail . ':</td>
										<td><a href="#" onclick="return MessageToMail(\'' . ConvertUtils::AttributeQuote(ConvertUtils::ClearJavaScriptString(ConvertUtils::WMHtmlSpecialChars($data['OtherEmail'][1]), '\'')) . '\')">' . ConvertUtils::WMHtmlSpecialChars($data['OtherEmail'][1]) . '</a></td>
									</tr>
									<tr' . $data['Notes'][0] . '>
										<td class="wm_contacts_view_title">' . JS_LANG_Notes . ':</td>
										<td>' . ConvertUtils::WMHtmlSpecialChars($data['Notes'][1]) . '</td>
									</tr>
								</table>
								' . $groupsHtml . '
								<table class="wm_contacts_view">
									<tr>
										<td>
											<a href="#" id="switch_to_edit">' . JS_LANG_EditContact . '</a>
										</td>
									</tr>
								</table>
							</div>
							
	<!-- -->
							<div id="editTbl" class="wm_hide">
								<table class="wm_contacts_view">
									<tr>
										<td class="wm_contacts_view_title" style="width: 25%;">' . JS_LANG_DefaultEmail . ':</td>
										<td style="width: 75%;">
											<span id="notSpecified" class="wm_hide">' . JS_LANG_NotSpecifiedYet . '</span>
											<select id="select_default_email" class="wm_hide" style="width: 200px;"></select>
											<input id="input_default_email" name="input_default_email" type="text" value="' . ConvertUtils::AttributeQuote($Email[1]) . '" class="wm_input" maxlength="255"/>
											<input id="default_email_type" type="hidden" name="default_email_type" value="' . ConvertUtils::AttributeQuote($contact->PrimaryEmail) . '" />
										</td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 25%;">' . JS_LANG_Name . ':</td>
										<td>
										<input class="wm_input" type="text" name="c_fullname" value="' . ConvertUtils::AttributeQuote($data['FullName'][1]) . '" id="c_fullname" maxlength="85" /></td>
									</tr>
									<tr>
										<td></td>
										<td>
											<input class="wm_checkbox" type="checkbox" name="use_friendly_name" id="use_friendly_name" value="1" ' . $useFrName . '>
											<label for="use_friendly_name">' . JS_LANG_UseFriendlyName1 . '</label><label class="wm_secondary_info wm_inline_info" for="use_friendly_name">' . JS_LANG_UseFriendlyName2 . '</label>
										</td>
									</tr>
								</table>
								<div class="wm_hide" id="more_info_div">
								<table class="wm_contacts_view" style="width: 94%; margin: 0px 15px 2px 15px;">
									<tr>
										<td style="text-align: right; border-top: solid 1px #8D8C89;">
											<a href="" id="more_info_hide">' . JS_LANG_HideAddFields . '</a>
										</td>
									</tr>
								</table>
								<table class="wm_contacts_tab" onclick="ChangeTabVisibility(\'access\');">
									<tr>
										<td>
											<span class="wm_contacts_tab_name">
												' . JS_LANG_Home . '
											</span>
											<span class="wm_contacts_tab_mode">
												<img id="button_access" src="skins/' . $skinName . '/menu/arrow_up.gif">
											</span>
										</td>
									</tr>
								</table>
								<table ' . $class_00 . ' id="access">
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_PersonalEmail . ':</td>
										<td style="width: 80%;" colspan="4"><input autocomplete="off" class="wm_input" type="text" size="45" id="personal_email" name="personal_email" value="' . ConvertUtils::AttributeQuote($data['HomeEmail'][1]) . '" maxlength="255" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_StreetAddress . ':</td>
										<td colspan="4"><textarea class="wm_input" rows="2" cols="35" name="personal_street" rows="4">' . $data['HomeStreet'][1] . '</textarea></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_City . ':</td>
										<td style="width: 30%;"><input class="wm_input" type="text" size="18" name="personal_city" value="' . ConvertUtils::AttributeQuote($data['HomeCity'][1]) . '" maxlength="65" /></td>
										<td style="width: 10%;"></td>
										<td class="wm_contacts_view_title" style="width: 10%;">' . JS_LANG_Fax . ':</td>
										<td style="width: 30%;"><input class="wm_input" type="text" size="18" name="personal_fax" value="' . ConvertUtils::AttributeQuote($data['HomeFax'][1]) . '" maxlength="50"/></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_StateProvince . ':</td>
										<td><input class="wm_input" type="text" size="18" name="personal_state" value="' . ConvertUtils::AttributeQuote($data['HomeState'][1]) . '" maxlength="65" /></td>
										<td></td>
										<td class="wm_contacts_view_title">' . JS_LANG_Phone . ':</td>
										<td><input class="wm_input" type="text" size="18" name="personal_phone" value="' . ConvertUtils::AttributeQuote($data['HomePhone'][1]) . '" maxlength="50" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_ZipCode . ':</td>
										<td><input class="wm_input" type="text" size="18" name="personal_zip" value="' . ConvertUtils::AttributeQuote($data['HomeZip'][1]) . '" maxlength="10" /></td>
										<td></td>
										<td class="wm_contacts_view_title">' . JS_LANG_Mobile . ':</td>
										<td><input class="wm_input" type="text" size="18" name="personal_mobile" value="' . ConvertUtils::AttributeQuote($data['HomeMobile'][1]) . '" maxlength="50" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_CountryRegion . ':</td>
										<td colspan="4"><input class="wm_input" type="text" size="18" name="personal_country" value="' . ConvertUtils::AttributeQuote($data['HomeCountry'][1]) . '" maxlength="65" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_WebPage . ':</td>
										<td colspan="4">
											<input class="wm_input" type="text" size="45" name="personal_web" id="personal_web" value="' . ConvertUtils::AttributeQuote($data['HomeWeb'][1]) . '" maxlength="255" />
											<input class="wm_button" type="button" value="' . ConvertUtils::AttributeQuote(JS_LANG_Go) . '" onClick="dolocation(\'personal_web\');" />
										</td>
									</tr>
								</table>
								<table class="wm_contacts_tab" onclick="ChangeTabVisibility(\'online_addresses\');">
									<tr>
										<td>
											<span class="wm_contacts_tab_name">
												' . JS_LANG_Business . '
											</span>
											<span class="wm_contacts_tab_mode">
												<img id="button_online_addresses" src="skins/' . $skinName . '/menu/arrow_down.gif">
											</span>
										</td>
									</tr>
								</table>
								<table ' . $class_10 . ' id="online_addresses">
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_BusinessEmail . ':</td>
										<td style="width: 80%;" colspan="4"><input class="wm_input" autocomplete="off" type="text" id="business_email" name="business_email" size="45" value="' . ConvertUtils::AttributeQuote($data['BusinessEmail'][1]) . '" maxlength="255" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_Company . ':</td>
										<td style="width: 30%;"><input class="wm_input" type="text" size="18" name="business_company" value="' . ConvertUtils::AttributeQuote($data['BusinessCompany'][1]) . '" maxlength="65" /></td>
										<td style="width: 5%;"></td>
										<td class="wm_contacts_view_title" style="width: 15%;">' . JS_LANG_JobTitle . ':</td>
										<td style="width: 30%;"><input class="wm_input" type="text" size="18" name="business_job" value="' . ConvertUtils::AttributeQuote($data['BusinessJobTitle'][1]) . '" maxlength="30" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_Department . ':</td>
										<td><input class="wm_input" type="text" size="18" name="business_departament" value="' . ConvertUtils::AttributeQuote($data['BusinessDepartment'][1]) . '" maxlength="65" /></td>
										<td></td>
										<td class="wm_contacts_view_title">' . JS_LANG_Office . ':</td>
										<td><input class="wm_input" type="text" size="18" name="business_office" value="' . ConvertUtils::AttributeQuote($data['BusinessOffice'][1]) . '" maxlength="65" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_StreetAddress . ':</td>
										<td colspan="4"><textarea rows="2" class="wm_input" cols="35" name="business_street" rows="4">' . $data['BusinessStreet'][1] . '</textarea></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_City . ':</td>
										<td><input class="wm_input" type="text" size="18" name="business_city" value="' . ConvertUtils::AttributeQuote($data['BusinessCity'][1]) . '" maxlength="65" /></td>
										<td></td>
										<td class="wm_contacts_view_title">' . JS_LANG_Fax . ':</td>
										<td><input class="wm_input" type="text" size="18" name="business_fax" value="' . ConvertUtils::AttributeQuote($data['BusinessFax'][1]) . '" maxlength="50" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_StateProvince . ':</td>
										<td><input class="wm_input" type="text" size="18" name="business_state" value="' . ConvertUtils::AttributeQuote($data['BusinessState'][1]) . '" maxlength="65" /></td>
										<td></td>
										<td class="wm_contacts_view_title">' . JS_LANG_Phone . ':</td>
										<td><input class="wm_input" type="text" size="18" name="business_phone" value="' . ConvertUtils::AttributeQuote($data['BusinessPhone'][1]) . '" maxlength="50" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_ZipCode . ':</td>
										<td><input class="wm_input" type="text" size="18" name="business_zip" value="' . ConvertUtils::AttributeQuote($data['BusinessZip'][1]) . '" maxlength="10" /></td>
										<td></td>
										<td class="wm_contacts_view_title">' . JS_LANG_CountryRegion . ':</td>
										<td colspan="4"><input class="wm_input" type="text" name="business_country" size="18" value="' . ConvertUtils::AttributeQuote($data['BusinessCountry'][1]) . '" maxlength="65" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_WebPage . ':</td>
										<td colspan="4">
											<input class="wm_input" type="text" size="45" id="business_web" name="business_web" value="' . ConvertUtils::AttributeQuote($data['BusinessWeb'][1]) . '" maxlength="255" />
											<input class="wm_button" type="button" value="' . ConvertUtils::AttributeQuote(JS_LANG_Go) . '" onClick="dolocation(\'business_web\');" />
										</td>
									</tr>
								</table>
								<table class="wm_contacts_tab" onclick="ChangeTabVisibility(\'phone_numbers\');">
									<tr>
										<td>
											<span class="wm_contacts_tab_name">
												' . JS_LANG_Other . '
											</span>
											<span class="wm_contacts_tab_mode">
												<img id="button_phone_numbers" src="skins/' . $skinName . '/menu/arrow_down.gif">
											</span>
										</td>
									</tr>
								</table>
								<table ' . $class_20 . ' id="phone_numbers">
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_Birthday . ':</td>
										<td>
											<select name="birthday_month">
												<option value="0">' . JS_LANG_Month . '</option>
												' . $monthsSelect . '
											</select>
											<select name="birthday_day">
												<option value="0">' . JS_LANG_Day . '</option>
												' . $daysSelect . '
											</select>
											<select name="birthday_year">
												<option value="0">' . JS_LANG_Year . '</option>
												' . $yearsSelect . '
											</select>
										</td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_OtherEmail . ':</td>
										<td style="width: 80%;"><input class="wm_input" autocomplete="off" id="other_email" name="other_email" type="text" size="45" value="' . ConvertUtils::AttributeQuote($data['OtherEmail'][1]) . '" maxlength="255" /></td>
									</tr>
									<tr>
										<td class="wm_contacts_view_title" style="width: 20%;">' . JS_LANG_Notes . ':</td>
										<td><textarea rows="2" class="wm_input" cols="35" rows="4" name="other_notes">' . $data['Notes'][1] . '</textarea></td>
									</tr>
								</table>
										' . $groupsHtml2 . '
								</div>
								<table class="wm_contacts_view" style="width: 94%; margin: 0px 15px 2px 15px;">
									<tr>
										<td style="text-align: right;">
											<a href="" id="more_info_show">' . JS_LANG_ShowAddFields . '</a>
										</td>
									</tr>
									<tr>
										<td style="text-align: right; border-top: solid 1px #8D8C89;">
											<input type="submit" class="wm_button" value="' . ConvertUtils::AttributeQuote(JS_LANG_Save) . '" />
											<input type="button" class="wm_button" name="cancle" value="' . ConvertUtils::AttributeQuote(JS_LANG_Cancel) . '" ID="Cancel" onclick="DoCancle();" />
										</td>
									</tr>
								</table>
							</div></form>';
    } else {
        $out = '';
    }
    return $out;
}
Example #7
0
?>
";
		var SkinName = "<?php 
echo ConvertUtils::ClearJavaScriptString(defaultSkin, '"');
?>
";
		var DefLang = "<?php 
echo ConvertUtils::ClearJavaScriptString(defaultLanguage, '"');
?>
";
		var HideLoginMode = <?php 
echo defaultHideLoginMode;
?>
;
		var DomainOptional = "<?php 
echo ConvertUtils::ClearJavaScriptString(defaultDomainOptional, '"');
?>
";
		var AllowAdvancedLogin = "******";
		var AdvancedLogin = "******";
		var EmptyHtmlUrl = "empty.html";
		var CheckMailUrl = "check-mail.php";
		var LanguageUrl = "langs.js.php";
		var WmVersion = "<?php 
echo JS_VERS;
Example #8
0
function ShowLoggingOffFromServer()
{
    echo '<script>parent.SetStateTextHandler("' . ConvertUtils::ClearJavaScriptString(LoggingOffFromServer, '"') . '");</script>' . CRLF;
    myFlush(true);
}
Example #9
0
            $insertResult &= $contactManager->CreateContact($ContactArray[$i]);
        }
        if ($insertResult) {
            $_SESSION['action_report'] = JS_LANG_InfoHaveImported . ' ' . $contactsCount . ' ' . JS_LANG_InfoNewContacts;
        } else {
            $ErrorInt = 0;
        }
    } else {
        if ($isNullFile) {
            $ErrorInt = $ErrorInt == 1 ? 2 : $ErrorInt;
        } else {
            $ErrorInt = 2;
        }
    }
} else {
    die('<script type="text/javascript">alert("' . ConvertUtils::ClearJavaScriptString($Error_Desc, '"') . '");</script>');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html>
<head>
	<title></title>
</head>
<body>
	<script type="text/javascript">
		parent.ImportContactsHandler(<?php 
echo $ErrorInt;
?>
, <?php 
echo $contactsCount;
?>
Example #10
0
 $messageIdUidSet[$message->IdMsg] = $message->Uid;
 if ($message->IdMsg != -1) {
     $messageIdSet = array($message->IdMsg);
 }
 $result = $message->IdMsg != -1 ? $Processor->UpdateMessage($message, $folder) : $Processor->SaveMessage($message, $folder);
 if ($Account->MailProtocol == MAILPROTOCOL_POP3) {
     if ($result) {
         $Processor->SetFlags($messageIdUidSet, $folder, MESSAGEFLAGS_Seen, ACTION_Set);
         $Processor->DbStorage->UpdateMailboxSize();
         echo '<script>if (parent.Rep_m) { parent.Rep_m.Show("' . ConvertUtils::ClearJavaScriptString(ReportMessageSaved, '"') . '"); }';
         if ($message && $message->IdMsg != -1) {
             echo "\r\n" . 'if (parent.UpdateIdUid) { parent.UpdateIdUid(' . (int) $message->IdMsg . ', "' . ConvertUtils::ClearJavaScriptString($message->Uid, '"') . '"); }';
         }
         echo '</script>';
     } else {
         echo '<script>if (parent.Err_m) { parent.Err_m.Show("' . ConvertUtils::ClearJavaScriptString(PROC_CANT_SAVE_MSG . ' ' . getGlobalError(), '"') . '"); }</script>';
     }
 } else {
     if ($result) {
         if ($Processor->SetFlags($messageIdUidSet, $folder, MESSAGEFLAGS_Seen, ACTION_Set)) {
             if ($needToDelete) {
                 if ($Processor->PurgeFolder($folder)) {
                     $Processor->DbStorage->DeleteMessages($messageIdSet, false, $folder);
                 }
             }
         }
         $Processor->DbStorage->UpdateMailboxSize();
         SetReport(ReportMessageSaved);
     } else {
         SetError(PROC_CANT_SAVE_MSG . ' ' . getGlobalError());
     }
Example #11
0
    $log->WriteLine($Error_Desc, LOG_LEVEL_ERROR);
    ?>
<script type="text/javascript">
	alert("<?php 
    echo ConvertUtils::ClearJavaScriptString($Error_Desc, '"');
    ?>
");
</script>
<?php 
} else {
    $jsOut = '{
FileName: "' . ConvertUtils::ClearJavaScriptString($filename, '"') . '",
TempName: "' . ConvertUtils::ClearJavaScriptString($tempname, '"') . '",
Size: ' . (int) $filesize . ', Inline: ' . ($isInline ? 'true' : 'false') . ',
MimeType: "' . ConvertUtils::ClearJavaScriptString($mime, '"') . '",
Url: "' . ConvertUtils::ClearJavaScriptString('attach.php?' . $addStr . 'tn=' . $tempname . '&filename=' . $filename, '"') . '"
}';
    $log->WriteLine($jsOut);
    ?>
<script type="text/javascript">
	parent.LoadAttachmentHandler(<?php 
    echo $jsOut;
    ?>
);
</script>
<?php 
}
?>
</body>
</html>
<?php 
Example #12
0
            $ErrorInt = 0;
        }
        if ($insertResult) {
            $_SESSION['action_report'] = JS_LANG_InfoHaveImported . ' ' . $contactsCount . ' ' . JS_LANG_InfoNewContacts;
        } else {
            $ErrorInt = 0;
        }
    } else {
        if ($isNullFile) {
            $ErrorInt = $ErrorInt == 1 ? 2 : $ErrorInt;
        } else {
            $ErrorInt = 3;
        }
    }
} else {
    die('<script language="JavaScript" type="text/javascript">alert("' . ConvertUtils::ClearJavaScriptString(str_replace('"', '\\"', $Error_Desc), '"') . '");</script>');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html>
<head>
	<title></title>
</head>
<body>
	<script language="JavaScript" type="text/javascript">
		parent.ImportContactsHandler(<?php 
echo $ErrorInt;
?>
, <?php 
echo $contactsCount;
?>
Example #13
0
$stepAccountEmail = $step2Question1 = $step2Question2 = '';
if (isset($_SESSION[SESSION_RESET_ACCT_ID]) && $_SESSION[SESSION_RESET_ACCT_ID] > 0) {
    $stepAccount =& Account::LoadFromDb($_SESSION[SESSION_RESET_ACCT_ID]);
    if ($stepAccount) {
        if (2 == $step) {
            $stepData .= ', email:\'' . ConvertUtils::ClearJavaScriptString($stepAccount->Email, '\'') . '\'';
            $stepData .= ', Q1:\'' . ConvertUtils::ClearJavaScriptString($stepAccount->Question1, '\'') . '\'';
            $stepData .= ', Q2:\'' . ConvertUtils::ClearJavaScriptString($stepAccount->Question2, '\'') . '\'';
        } else {
            if (3 == $step) {
                $stepData .= ', email:\'' . ConvertUtils::ClearJavaScriptString($stepAccount->Email, '\'') . '\'';
                $stepName = 'пользователь';
                if (strlen($stepAccount->FriendlyName) > 0) {
                    $stepName = $stepAccount->FriendlyName;
                }
                $stepData .= ', name:\'' . ConvertUtils::ClearJavaScriptString($stepName, '\'') . '\'';
            } else {
                if (4 == $step) {
                    unset($_SESSION[SESSION_RESET_ACCT_ID], $_SESSION[SESSION_RESET_STEP]);
                }
            }
        }
    }
}
$stepData = ltrim($stepData, ',');
$stepData .= '}';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    function ToHTML()
    {
        $textClass = $this->_pagebuilder->_proc->settings->ShowTextLabels ? '' : 'wm_hide';
        $fid = $this->_pagebuilder->_proc->currentFolder ? $this->_pagebuilder->_proc->currentFolder->IdDb : '-1';
        $temp = $this->isSearch ? '' : '<div onclick="confirm(\'' . ConvertUtils::AttributeQuote(ConvertUtils::ClearJavaScriptString(JS_LANG_ConfirmAreYouSure, '\'')) . '\') ? document.location=\'' . ACTIONFILE . '?action=delete&req=purge&f=' . $fid . '\' : \'\';" class="wm_menu_item" onmouseover="this.className=\'wm_menu_item_over\';" onmouseout="this.className=\'wm_menu_item\';">
		<img class="wm_menu_purge_img" src="skins/' . $this->_pagebuilder->SkinName() . '/menu/purge.gif" title="' . ConvertUtils::AttributeQuote(JS_LANG_PurgeDeleted) . '" />
		<span class="' . $textClass . '">' . JS_LANG_PurgeDeleted . '</span>
	</div>';
        return '
<div id="popup_replace_13" class="wm_tb">
	<div class="wm_toolbar_item" id="popup_title_13" onclick="DoDeleteButton();" >
		<img class="wm_menu_delete_img" src="skins/' . $this->_pagebuilder->SkinName() . '/menu/delete.gif" title="' . ConvertUtils::AttributeQuote(JS_LANG_Delete) . '" />&nbsp;
		<span class="' . $textClass . '">' . JS_LANG_Delete . '</span>
	</div>
	<div class="wm_toolbar_item" id="popup_control_13">
		<img class="wm_menu_control_img" src="skins/' . $this->_pagebuilder->SkinName() . '/menu/popup_menu_arrow.gif" />
	</div>
</div>
<div class="wm_hide" id="popup_menu_13">
	<div onclick="DoUnDeleteButton();" class="wm_menu_item" onmouseover="this.className=\'wm_menu_item_over\';" onmouseout="this.className=\'wm_menu_item\';">
		<img class="wm_menu_delete_img" src="skins/' . $this->_pagebuilder->SkinName() . '/menu/delete.gif" title="' . ConvertUtils::AttributeQuote(JS_LANG_Undelete) . '" />
		<span class="' . $textClass . '">' . JS_LANG_Undelete . '</span>
	</div>
	' . $temp . '
</div>
		';
    }