name = strtolower(substr($classname, 0, - 4)); $this->step = acym_getVar('string', 'nextstep', ''); if (empty($this->step)) { $this->step = acym_getVar('string', 'step', ''); } } public function getName() { return $this->name; } public function getLayout() { return acym_getVar('cmd', 'layout', acym_getVar('cmd', 'task', 'listing')); } public function setLayout($value) { acym_setVar('layout', $value); } public function display($controller, $data = []) { $name = $this->getName(); $view = $this->getLayout(); if (method_exists($this, $view)) $this->$view(); $viewFolder = acym_isAdmin() ? ACYM_VIEW : ACYM_VIEW_FRONT; if (!file_exists($viewFolder.ucfirst($name).DS.'tmpl'.DS.$view.'.php')) { $view = 'listing'; } $getCleanView = ($name !== 'archive' && $view !== 'listing') && ($name !== 'frontusers' || $view !== 'profile'); if (ACYM_CMS === 'wordpress' && $getCleanView) { echo ob_get_clean(); } if (ACYM_CMS !== 'wordpress' || ($name === 'frontusers' && ($view === 'unsubscribe' || $view === 'unsubscribepage')) || !defined( 'DOING_AJAX' ) || !DOING_AJAX || ($name === 'archive' && $view === 'view')) { acym_loadAssets($name, $view); $controller->loadScripts($view); } if (!empty($_SESSION['acynotif'])) { echo implode('', $_SESSION['acynotif']); $_SESSION['acynotif'] = []; } $outsideForm = (strpos($name, 'mails') !== false && $view === 'edit') || (strpos($name, 'campaigns') !== false && $view === 'edit_email'); if ($outsideForm) { echo '
'; } if (acym_getVar('cmd', 'task') != 'ajaxEncoding') { echo '
'; } if (acym_isLeftMenuNecessary()) { echo acym_getLeftMenu($name).'
'; } if (!empty($data['header'])) { echo $data['header']; } $remindme = json_decode($this->config->get('remindme', '[]'), true); if ($this->config->get('walk_through', 0) == 0) { if (acym_isAdmin()) { if (!in_array('multilingual', $remindme) && acym_level(ACYM_ESSENTIAL) && $this->config->get('multilingual', '0') === '0') { if (count(acym_getLanguages(false, true)) > 1) { $message = acym_translation('ACYM_MULTILINGUAL_OPTIONS_PROMPT'); $message .= ' '.acym_translation('ACYM_YES').''; $message .= ' / '.acym_translation('ACYM_NO').''; acym_display($message, 'info', false); } else { $remindme[] = 'multilingual'; $this->config->save(['remindme' => json_encode($remindme)]); } } $maliciousScan = $this->config->get('malicious_scan', 0); if (!empty($maliciousScan)) { $this->config->save(['malicious_scan' => 0]); acym_display(acym_translation('ACYM_NEW_SECURITY_TOOL'), 'info'); } } } acym_trigger('acym_displayTrackingMessage', [&$message], 'plgAcymWoocommerce'); if (acym_isAdmin()) { acym_trigger('onAcymDisplayPage'); acym_displayMessages(); } include acym_getView($name, $view); if (acym_isLeftMenuNecessary()) echo '
'; if (acym_getVar('cmd', 'task') != 'ajaxEncoding') { echo '
'; } if ($outsideForm) { echo '
'; } if (ACYM_CMS !== 'wordpress' || !acym_isAdmin()) { return; } $remind = json_decode($this->config->get('remindme', '[]')); $installationDate = $this->config->get('install_date', time()); if (!in_array('reviews', $remind) && !in_array($controller->name, ['dashboard', 'language']) && $installationDate < time() - 7 * 86400) { echo ''; } } }