GetGroupRight("sender"); if($POST_RIGHT=="D") $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); $isUserHavePhpAccess = $USER->CanDoOperation('edit_php'); $aTabs = array( array("DIV" => "edit1", "TAB" => GetMessage("sender_tmpl_edit_tab_main"), "ICON"=>"main_user_edit", "TITLE"=>GetMessage("sender_tmpl_edit_tab_main_title")), ); $tabControl = new CAdminTabControl("tabControl", $aTabs); $ID = intval($ID); // Id of the edited record $message = null; $bVarsFromForm = false; $blockTemplateId = $ID; if($REQUEST_METHOD == "POST" && ($save!="" || $apply!="") && $POST_RIGHT=="W" && check_bitrix_sessid()) { $arError = array(); $NAME = trim($NAME); if(!$isUserHavePhpAccess) { $MESSAGE_OLD = false; if($ID>0) { $templateOld = \Bitrix\Sender\TemplateTable::getRowById(array('ID' => $ID)); if($templateOld) { $MESSAGE_OLD = $templateOld['MESSAGE']; } } $MESSAGE = CMain::ProcessLPA($MESSAGE, $MESSAGE_OLD); } $CONTENT = ''; if(!empty($MESSAGE)) $CONTENT = $MESSAGE; $arFields = Array( "ACTIVE" => ($ACTIVE <> "Y"? "N":"Y"), "CONTENT" => $CONTENT, "NAME" => $NAME, ); if($ID > 0) { $mailingUpdateDb = \Bitrix\Sender\TemplateTable::update($ID, $arFields); $res = $mailingUpdateDb->isSuccess(); if(!$res) { $arError = $mailingUpdateDb->getErrorMessages(); $_SESSION['bx_sender_template_tmp'] = base64_encode($CONTENT); $blockTemplateId = ''; } } else { $mailingAddDb = \Bitrix\Sender\TemplateTable::add($arFields); if($mailingAddDb->isSuccess()) { $ID = $mailingAddDb->getId(); $res = ($ID > 0); $_SESSION['bx_sender_template_tmp'] = ''; $blockTemplateId = ''; } else { $arError = $mailingAddDb->getErrorMessages(); $_SESSION['bx_sender_template_tmp'] = base64_encode($CONTENT); $blockTemplateId = ''; } } if($res) { if($apply!="") LocalRedirect("/bitrix/admin/sender_template_edit.php?ID=".$ID."&lang=".LANG."&".$tabControl->ActiveTabParam()); else LocalRedirect("/bitrix/admin/sender_template_admin.php?lang=".LANG); } else { if(!empty($arError)) $message = new CAdminMessage(implode("
", $arError)); $bVarsFromForm = true; } } //Edit/Add part ClearVars(); $str_SORT = 100; $str_ACTIVE = "Y"; $str_VISIBLE = "Y"; if($ID>0) { $rubric = new CDBResult(\Bitrix\Sender\TemplateTable::getById($ID)); if(!$rubric->ExtractFields("str_")) $ID=0; } if($bVarsFromForm) $DB->InitTableVarsForEdit("b_sender_preset_template", "", "str_"); $APPLICATION->SetTitle(($ID>0? GetMessage("sender_tmpl_edit_title_edit").$ID : GetMessage("sender_tmpl_edit_title_add"))); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php"); \CJSCore::Init(array("sender_admin")); $templateListHtml = \Bitrix\Sender\Preset\Template::getTemplateListHtml('tabControl_layout'); $aMenu = array( array( "TEXT"=>GetMessage("sender_tmpl_edit_list"), "TITLE"=>GetMessage("sender_tmpl_edit_list_title"), "LINK"=>"sender_template_admin.php?lang=".LANG, "ICON"=>"btn_list", ) ); if($ID>0) { $aMenu[] = array("SEPARATOR"=>"Y"); $aMenu[] = array( "TEXT"=>GetMessage("sender_tmpl_edit_action_add"), "TITLE"=>GetMessage("sender_tmpl_edit_action_add_title"), "LINK"=>"sender_template_edit.php?lang=".LANG, "ICON"=>"btn_new", ); $aMenu[] = array( "TEXT"=>GetMessage("sender_tmpl_edit_action_del"), "TITLE"=>GetMessage("sender_tmpl_edit_action_del_title"), "LINK"=>"javascript:if(confirm('".GetMessage("sender_tmpl_edit_action_del_confirm")."'))window.location='sender_template_admin.php?ID=".$ID."&action=delete&lang=".LANGUAGE_ID."&".bitrix_sessid_get()."';", "ICON"=>"btn_delete", ); $aMenu[] = array("SEPARATOR"=>"Y"); } $context = new CAdminContextMenu($aMenu); $context->Show(); ?> Show(); elseif($rubric->LAST_ERROR!="") CAdminMessage::ShowMessage($rubric->LAST_ERROR); ?>
Begin(); ?> BeginNextTab(); ?> >    
Warning: Undefined variable $templateListHtml in D:\ktt\ttepla.com\public_html\bitrix\modules\sender\admin\template_edit.php on line 179

Fatal error: Uncaught Error: Call to undefined function GetMessage() in D:\ktt\ttepla.com\public_html\bitrix\modules\sender\admin\template_edit.php:192 Stack trace: #0 {main} thrown in D:\ktt\ttepla.com\public_html\bitrix\modules\sender\admin\template_edit.php on line 192