$parentwindow = $this->params['wid']; // Check if we really got sane values if ($template != 'template') { $templatePreview = ''; $templateInfo = $templateMgr->getTemplate($template); $koala->callJSFunction('Koala.windows[\'wid_' . $parentwindow . '\'].refreshMailingTemplateRoot', $template, $templateInfo['NAME']); } break; case 'setMailingConfigTemplate': $template = $this->params['templateId']; $parentwindow = $this->params['wid']; // Check if we really got sane values if ($template != 'template') { $templatePreview = ''; $templateInfo = $templateMgr->getTemplate($template); $templateInfo['PREVIEWPATH'] = $templateMgr->getPreviewPath($template); if ($templateInfo['FILE'] > 0) { $templatePreview = $templateInfo['PREVIEWPATH']; } $koala->callJSFunction('Koala.windows[\'wid_' . $parentwindow . '\'].refreshMailingTemplate', $templateInfo['NAME'], $templateInfo['FILENAME'], $template, $templatePreview); } break; case 'saveMailingVersion': // Cannot use new style of parameters here (function is called by a custom-attribute event - and therefore does not know about named parameters) $data = explode('-', $this->reponsedata['null']->yg_id); $wid = $data[2]; $mailingId = $data[0]; $mailing = $mailingMgr->getMailing($mailingId); $new_version = $mailing->newVersion(); $koala->queueScript('Koala.windows[\'wid_' . $wid . '\'].tabs.select(Koala.windows[\'wid_' . $wid . '\'].tabs.selected, Koala.windows[\'wid_' . $wid . '\'].tabs.params);'); break;
<?php $siteID = $this->request->parameters["site"]; $pageID = $this->request->parameters["page"]; $action = $this->request->parameters["action"]; $template = (int) sanitize($this->request->parameters["template"]); $templateMgr = new Templates(); if ($template == 0 && $siteID && $pageID) { if ($siteID == "mailing") { $mailingMgr = new MailingMgr(); $mailing = $mailingMgr->getMailing($pageID); $mailingInfo = $mailing->get(); $template = $mailingInfo["TEMPLATEID"]; } else { $pageMgr = new PageMgr($siteID); $page = $pageMgr->getPage($pageID); $pageInfo = $page->get(); $template = $pageInfo["TEMPLATEID"]; } } else { $template = (int) sanitize($this->request->parameters["template"]); } if ($template != 0) { $templateInfo = $templateMgr->getTemplate($template); $templateInfo["PREVIEWPATH"] = $templateMgr->getPreviewPath($template); } else { $templateInfo = false; } $smarty->assign("templateInfo", $templateInfo); $smarty->assign("mode", sanitize($this->request->parameters["mode"])); $smarty->display("file:" . getrealpath($this->page_template));
$ygid = $this->request->parameters['yg_id']; $refresh = $this->request->parameters['refresh']; $initload = $this->request->parameters['initload']; $siteID = explode('-', $ygid); $siteID = $siteID[0]; $siteMgr = new Sites(); $siteinfo = $siteMgr->get($siteID); if ($siteinfo['FAVICON']) { // Favicon is set, get all information about file $file = sFileMgr()->getFile($siteinfo['FAVICON']); if ($file) { $favicon = $file->get(); $smarty->assign('favicon', $favicon); } } $templateMgr = new Templates(); $templateInfo = $templateMgr->getTemplate($siteinfo['DEFAULTTEMPLATE']); $templateInfo['PREVIEWPATH'] = $templateMgr->getPreviewPath($siteinfo['DEFAULTTEMPLATE']); if ($siteinfo['TEMPLATEROOT']) { $templaterootinfo = $templateMgr->getTemplate($siteinfo['TEMPLATEROOT']); } $smarty->assign('object', $siteID); $smarty->assign('siteinfo', $siteinfo); $smarty->assign('templateInfo', $templateInfo); $smarty->assign('templaterootinfo', $templaterootinfo); $smarty->assign('mode', 1); $smarty->assign('refresh', $refresh); $smarty->assign('initload', $initload); $smarty->assign('win_no', $this->request->parameters['win_no']); $smarty->display('file:' . $this->page_template);