Пример #1
0
    exit;
}
if (isset($_GET["template-attached-files-iframe"])) {
    template_attach_iframe();
    exit;
}
if (isset($_GET["template-attached-files-delete"])) {
    template_attach_delete();
    exit;
}
if (isset($_GET["template-attached-files-show"])) {
    echo template_attach_list($_GET["template-attached-files-show"]);
    exit;
}
if (isset($_POST['upload'])) {
    template_attach_uploaded();
}
function template_edit_js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $template_title = $tpl->_ENGINE_parse_body("{template}::{$_GET["edit-template-js"]}");
    $css = $tpl->_ENGINE_parse_body("{css}::{$_GET["edit-template-js"]}");
    $keyword = $tpl->_ENGINE_parse_body("{keywords}::{$_GET["edit-template-js"]}");
    $advanced_options = $tpl->_ENGINE_parse_body("{advanced_options}::{$_GET["edit-template-js"]}");
    $attached_files = $tpl->_ENGINE_parse_body("{attached_files}::{$_GET["edit-template-js"]}");
    $are_you_sure_to_delete = $tpl->javascript_parse_text("{are_you_sure_to_delete}");
    $html = "\n\t\tfunction emailing_template_edit(){\n\t\t\tYahooWin4(656,'{$page}?template-edit-popup={$_GET["edit-template-js"]}&ou={$_GET["ou"]}','{$template_title}');\n\t\t}\n\t\t\n\tvar x_template_edit_gene= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\t\tYahooWin4Hide();\n\t\t\tRefreshTab('emailing_campaigns');\n\t\t\temailing_template_edit();\t\n\t\t}\t\t\t\n\t\t\nfunction template_edit_gene(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('edit-template-perf','{$_GET["edit-template-js"]}');\n\tXHR.appendData('template_name',document.getElementById('template_name').value);\n\tXHR.appendData('subject',document.getElementById('subject').value);\n\tXHR.appendData('ou','{$_GET["ou"]}');\n\tXHR.sendAndLoad('{$page}', 'GET',x_template_edit_gene);\t\n\t}\n\t\nvar x_TemplateeMailingDelete= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)};\n\tYahooWin4Hide();\n\tRefreshTab('emailing_campaigns');\n}\t\t\n\t\nfunction TemplateeMailingDelete(){\n\tif(confirm('{$are_you_sure_to_delete}')){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('delete-template-perf','{$_GET["edit-template-js"]}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_TemplateeMailingDelete);\t\n\t\t}\n\n}\n\t\nvar x_EditCSSTemplateSave= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)};\n\tYahooWin5Hide();\n}\t\n\t\nfunction EditCSSTemplateSave(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('template-css-save','{$_GET["edit-template-js"]}');\n\tXHR.appendData('css',document.getElementById('template-css-content').value);\n\tXHR.appendData('ou','{$_GET["ou"]}');\n\tdocument.getElementById('template_css_edit_div').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n\tdocument.getElementById('template_css_edit_div2').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n\tXHR.sendAndLoad('{$page}', 'GET',x_EditCSSTemplateSave);\t\n\t}\t\n\t\nfunction EditCSSTemplate(){\n\t\tYahooWin5(700,'{$page}?template-css-popup={$_GET["edit-template-js"]}&ou={$_GET["ou"]}','{$css}');\n\t}\n\t\nfunction KeywordsTemplate(){\n\tYahooWin5(500,'{$page}?template-keyword-popup={$_GET["edit-template-js"]}&ou={$_GET["ou"]}','{$keyword}');\n}\n\nfunction template_edit_advopts(){\n\tYahooWin5(450,'{$page}?template-advopts-popup={$_GET["edit-template-js"]}&ou={$_GET["ou"]}','{$advanced_options}');\n}\n\nfunction emailing_template_attachedFiles(){\n\tYahooWin5(630,'{$page}?template-attached-files-popup={$_GET["edit-template-js"]}&ou={$_GET["ou"]}','{$attached_files}');\n}\n\t\t\n\temailing_template_edit();";
    echo $html;
}
function template_del_perform()
	
	if(isset($_GET["template-css"])){template_tinymce_css();exit;}
	if(isset($_GET["template-css-popup"])){template_css_edit();exit;}
	if(isset($_GET["template-css-save"])){template_css_save();exit;}
	
	if(isset($_GET["template-keyword-popup"])){template_keyword_popup();exit;}
	
	if(isset($_GET["template-advopts-popup"])){template_advopts_popup();exit;}
	if(isset($_GET["template-advopts-display"])){template_advopts_display();exit;}
	if(isset($_GET["X-headers-save"])){template_advopts_save();exit;}
	
	if(isset($_GET["template-attached-files-popup"])){template_attach_edit();exit;}
	if(isset($_GET["template-attached-files-iframe"])){template_attach_iframe();exit;}
	if(isset($_GET["template-attached-files-delete"])){template_attach_delete();exit;}
	if(isset($_GET["template-attached-files-show"])){echo template_attach_list($_GET["template-attached-files-show"]);exit;}
	if( isset($_POST['upload']) ){template_attach_uploaded();}
	
	
function template_edit_js(){
	$page=CurrentPageName();
	$tpl=new templates();
	$template_title=$tpl->_ENGINE_parse_body("{template}::{$_GET["edit-template-js"]}");
	$css=$tpl->_ENGINE_parse_body("{css}::{$_GET["edit-template-js"]}");
	$keyword=$tpl->_ENGINE_parse_body("{keywords}::{$_GET["edit-template-js"]}");
	$advanced_options=$tpl->_ENGINE_parse_body("{advanced_options}::{$_GET["edit-template-js"]}");
	$attached_files=$tpl->_ENGINE_parse_body("{attached_files}::{$_GET["edit-template-js"]}");
	$are_you_sure_to_delete=$tpl->javascript_parse_text("{are_you_sure_to_delete}");
	$html="
		function emailing_template_edit(){
			YahooWin4(656,'$page?template-edit-popup={$_GET["edit-template-js"]}&ou={$_GET["ou"]}','$template_title');
		}