public static function page($config) { if (!isset($config['action'])) { return '<p>No action param found!</p>'; } $base_path = dirname(dirname(dirname(__DIR__))); if (strpos($base_path, 'wordpress') !== false) { $base_path = dirname($base_path); } $nnorg_afltr_path = $base_path . '/' . file_get_contents(NNORG_AFLTR_SETTINGS_CFG); include_once $nnorg_afltr_path . '/inc/common.php'; include_once $nnorg_afltr_path . '/inc/controllers.php'; $isUtf8 = isset($config['isnotutf8']) ? (int) $config['isnotutf8'] : false; if ($config['action'] == 'showAffiliates') { $CtrlConfig['acceptedOnly'] = isset($config['acceptedonly']) ? (int) $config['acceptedonly'] : true; $CtrlConfig['textOnly'] = isset($config['textonly']) ? (int) $config['textonly'] : 0; $CtrlConfig['openBlank'] = isset($config['openblank']) ? (int) $config['openblank'] : false; $CtrlConfig['view'] = isset($config['view']) && !empty($config['view']) ? $config['view'] : null; $CtrlConfig['isNotUtf8'] = $isUtf8; $controller = new \pub\affiliate_list($config['category'], $CtrlConfig['view'], $CtrlConfig['acceptedOnly'], $CtrlConfig['textOnly'], $CtrlConfig['openBlank'], $CtrlConfig['isNotUtf8']); $controller->setReturnRender(true); } if ($config['action'] == 'showApplyForm') { $controller = new \pub\apply($isUtf8); $controller->setReturnRender(true); } if ($config['action'] == 'showBannerList') { $maxSize = array(); $maxSize['width'] = isset($config['maxWidth']) ? $config['maxWidth'] : array(); $maxSize['height'] = isset($config['maxHeight']) ? $config['maxHeight'] : array(); $controller = new \pub\linkbanner($isUtf8, $maxSize); $controller->setReturnRender(true); } return $controller->process(); }
/** * Link-us-Banner anzeigen * @param bool $isNotUtf8 */ public static function showLinkbanner($isNotUtf8 = false, $maxSize = array()) { $controller = new \pub\linkbanner($isNotUtf8, $maxSize); $controller->process(); unset($controller); }