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_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 ''; } } }