/** * Generate the module * @return string */ public function generate() { $this->import('BackendUser', 'User'); foreach ($GLOBALS['BK_BP_MOD'] as $strGroup => $arrModules) { foreach ($arrModules as $strModule => $arrConfig) { if ($this->User->hasAccess($strModule, 'bk_modules')) { if (is_array($arrConfig['tables'])) { $GLOBALS['BE_MOD']['beekeeping']['bk_bee_pasture']['tables'] += $arrConfig['tables']; } $this->arrModules[$GLOBALS['TL_LANG']['BKM'][$strGroup]][$strModule] = array('name' => $GLOBALS['TL_LANG']['BKM'][$strModule][0] ? $GLOBALS['TL_LANG']['BKM'][$strModule][0] : $strModule, 'description' => $GLOBALS['TL_LANG']['BKM'][$strModule][1], 'icon' => $arrConfig['icon']); } } } // Open module if ($this->Input->get('mod') != '') { return $this->getBKBPModule($this->Input->get('mod')); } elseif ($this->Input->get('table') != '') { foreach ($GLOBALS['BK_BP_MOD'] as $arrGroup) { foreach ($arrGroup as $strModule => $arrConfig) { if (is_array($arrConfig['tables']) && in_array($this->Input->get('table'), $arrConfig['tables'])) { $this->redirect($this->addToUrl('mod=' . $strModule)); } } } } return parent::generate(); }
/** * Generate the module * @return string */ public function generate() { $this->arrModules = array(); // enable collapsing legends $session = \Session::getInstance()->get('fieldset_states'); foreach ($this->getModules() as $k => $arrGroup) { list($k, $hide) = explode(':', $k, 2); if (isset($session['iso_be_overview_legend'][$k])) { $arrGroup['collapse'] = !$session['iso_be_overview_legend'][$k]; } elseif ($hide == 'hide') { $arrGroup['collapse'] = true; } $this->arrModules[$k] = $arrGroup; } // Open module if (\Input::get('mod') != '') { return $this->getModule(\Input::get('mod')); } elseif (\Input::get('table') != '') { foreach ($this->arrModules as $arrGroup) { if (isset($arrGroup['modules'])) { foreach ($arrGroup['modules'] as $strModule => $arrConfig) { if (is_array($arrConfig['tables']) && in_array(\Input::get('table'), $arrConfig['tables'])) { \Controller::redirect($this->addToUrl('mod=' . $strModule)); } } } } } return parent::generate(); }
/** * Generate the module * @return string */ public function generate() { $this->import('BackendUser', 'User'); foreach ($GLOBALS['BN_SETUP_MOD'] as $strGroup => $arrModules) { foreach ($arrModules as $strModule => $arrConfig) { if ($this->User->hasAccess($strModule, 'bn_modules')) { if (is_array($arrConfig['tables'])) { $GLOBALS['BE_MOD']['bn']['tl_bn_setup']['tables'] = array_merge($GLOBALS['BE_MOD']['bn']['tl_bn_setup']['tables'], $arrConfig['tables']); // print_r($GLOBALS['BE_MOD']['bn']['tl_bn_setup']['tables']); } $this->arrModules[$GLOBALS['TL_LANG']['IMD'][$strGroup]][$strModule] = array('name' => $GLOBALS['TL_LANG']['IMD'][$strModule][0] ? $GLOBALS['TL_LANG']['IMD'][$strModule][0] : $strModule, 'description' => $GLOBALS['TL_LANG']['IMD'][$strModule][1], 'icon' => $arrConfig['icon'], 'href' => $arrConfig['href']); } } } // Open module if (\Input::get('mod') != '') { return $this->getBNModule($this->Input->get('mod')); } elseif ($this->Input->get('table') != '') { foreach ($GLOBALS['BN_SETUP_MOD'] as $arrGroup) { foreach ($arrGroup as $strModule => $arrConfig) { if (is_array($arrConfig['tables']) && in_array($this->Input->get('table'), $arrConfig['tables'])) { $url = $this->addToUrl('mod=' . $strModule); if ($arrConfig['href']) { $url = $this->addToUrl($arrConfig['href']); } $this->redirect($url); } } } } return parent::generate(); }
public function generate() { if (empty($GLOBALS['glossar']['tables'])) { return ''; } return parent::generate(); }
/** * Generate the module * @return string */ public function generate() { if (!\BackendUser::getInstance()->isAdmin) { return '<p class="tl_gerror">' . $GLOBALS['TL_LANG']['tl_iso_integrity']['permission'] . '</p>'; } \System::loadLanguageFile('tl_iso_integrity'); return parent::generate(); }
/** * (non-PHPdoc) * * @see BackendModule::generate() */ public function generate() { if ($this->Input->get('act') == 'details') { $this->strTemplate = 'be_avisota_outbox_details'; } if ($this->Input->get('act') == 'send') { $this->strTemplate = 'be_avisota_outbox_send'; } return parent::generate(); }
/** * Construct the module */ public function __construct() { parent::__construct(); // Add the help style sheet $GLOBALS['TL_CSS'][] = 'system/modules/readspeaker/assets/help.css||static'; // Add the help javascript $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/readspeaker/assets/help.js'; if ($GLOBALS['TL_LANGUAGE'] == "de") { $this->strTemplate = 'be_readspeaker_help_de'; } }
public function generate() { $this->import('BackendUser', 'User'); $this->import('Files'); if (!strlen($this->User->translation)) { return '<p class="tl_gerror">' . $GLOBALS['ISO_LANG']['ERR']['noLanguageForTranslation'] . '</p>'; } if ($this->Input->get('act') == 'download') { return $this->export(); } return parent::generate(); }
/** * Constructor */ public function __construct() { parent::__construct(); if ($this->Input->get('act', true) == 'zero') { $this->setZero(); } if ($this->Input->get('act', true) == 'zerobrowser') { $this->setZeroBrowser(); } if ($this->Input->post('id') > 0) { $this->intKatID = preg_replace('@\\D@', '', $this->Input->post('id')); // only digits } else { $this->intKatID = 0; } }
/** * generate the module * * @return string */ public function generate() { if (!$this->hasAccess('log')) { return ""; } $objResult = \Database::getInstance()->prepare("SELECT tstamp,source,action FROM tl_log WHERE FROM_UNIXTIME(tstamp) BETWEEN (CURDATE() - INTERVAL 30 DAY) AND SYSDATE() ORDER BY tstamp;")->execute(); if ($objResult->count() < 1) { return ""; } if (version_compare(VERSION, '3.2', '<=')) { $GLOBALS['TL_CONFIG']['addChart'] = true; } else { \Config::set('addChart', true); } $this->arrLog = $objResult->fetchAllAssoc(); return parent::generate(); }
/** * Generate module: * - Display a wildcard in the back end * - Select the template and compiler in the front end */ public function generate() { $this->rep = new stdClass(); $rep =& $this->rep; $rep->username = $this->BackendUser->username; $rep->isadmin = $this->BackendUser->isAdmin; $this->strTemplate = $this->actions[0][1]; $this->compiler = $this->actions[0][2]; foreach ($this->actions as &$act) { if ($act[0] != '') { $this->parameter = $this->Input->get($act[0]); if ($this->parameter != '') { $this->action = $act[0]; $this->strTemplate = $act[1]; $this->compiler = $act[2]; break; } // if } // if } // foreach return str_replace(array('{{', '}}'), array('[{]', '[}]'), parent::generate()); }
/** * Constructor * * @param DataContainer $objDc */ public function __construct(DataContainer $objDc = null) { parent::__construct($objDc); // Load helper $this->objSyncCtoDatabase = SyncCtoDatabase::getInstance(); $this->objSyncCtoFiles = SyncCtoFiles::getInstance(); // Load language $this->loadLanguageFile('tl_syncCto_backup'); $this->loadLanguageFile('tl_syncCto_steps'); // Load CSS $GLOBALS['TL_CSS'][] = 'system/modules/syncCto/assets/css/steps.css'; // Import $this->import('BackendUser', 'User'); // Choose template if (\Input::getInstance()->get("table") == "" && \Input::getInstance()->get("act") == "") { $this->strTemplate = "be_syncCto_backup"; } else { if (\Input::getInstance()->get("table") != "" && \Input::getInstance()->get("act") != "") { $this->strTemplate = "be_syncCto_steps"; } else { $this->strTemplate = "be_syncCto_backup"; } } }
/** * Construct the module */ public function __construct() { parent::__construct(); // Add the help style sheet $GLOBALS['TL_CSS'][] = 'system/modules/readspeaker/assets/contact.css||static'; }
public function generate() { $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/finanzen/assets/js/highcharts.js'; return parent::generate(); }
public function generate() { return parent::generate(); }
/** * Parse the template * @return string */ public function generate() { $GLOBALS['TL_CSS'][] = 'system/modules/metamodels/html/style.css'; if ($this->needUserAction()) { return parent::generate(); } else { return $this->performNormal(); } }
/** * Generate the module * @return string */ public function generate() { $this->objDc = func_get_arg(0); return parent::generate(); }
/** * Generate the backend module. * * @return string */ public function generate() { $this->loadLanguageFile('avisota_update'); if ($this->Input->post('FORM_SUBMIT') == 'avisota_update') { // on db update, redirect to er client if ($this->Input->post('dbupdate')) { $this->redirect('contao/main.php?do=repository_manager&update=database'); } // check for updates if ($this->Input->post('update')) { $versions = $this->Input->post('update'); $version = array_shift($versions); try { if ($this->runUpdate($version)) { $_SESSION['TL_INFO'][] = $GLOBALS['TL_LANG']['avisota_update']['updateSuccess']; } else { array_unshift($versions, $version); $_SESSION['TL_ERROR'][] = $GLOBALS['TL_LANG']['avisota_update']['updateFailed']; } } catch (Exception $e) { array_unshift($versions, $version); $_SESSION['TL_ERROR'][] = $e->getMessage(); } if (count($versions)) { $_SESSION['TL_INFO'][] = $GLOBALS['TL_LANG']['avisota_update']['moreUpdates']; $_SESSION['AUTORUN_UPDATES'] = $versions; } else { unset($_SESSION['AUTORUN_UPDATES']); } } $this->reload(); } if ($this->Environment->isAjaxRequest) { $version = $this->Input->get('update'); if ($this->runUpdate($version)) { header('Content-Type: text/plain'); echo $GLOBALS['TL_LANG']['avisota_update']['updateSuccess']; exit; } header("HTTP/1.0 500 Internal Server Error"); header('Content-Type: text/plain'); echo $GLOBALS['TL_LANG']['avisota_update']['updateFailed']; exit; } $GLOBALS['TL_JAVASCRIPT']['avisota_update'] = 'assets/avisota/core/css/avisota_update.js'; return parent::generate(); }
/** * Constructor * * @param DataContainer $objDc */ public function __construct(DataContainer $objDc = null) { parent::__construct($objDc); // Load helper $this->objSyncCtoDatabase = SyncCtoDatabase::getInstance(); $this->objSyncCtoFiles = SyncCtoFiles::getInstance(); $this->objSyncCtoCommunicationClient = SyncCtoCommunicationClient::getInstance(); $this->objSyncCtoHelper = SyncCtoHelper::getInstance(); // Load language $this->loadLanguageFile("tl_syncCto_steps"); $this->loadLanguageFile("tl_syncCto_check"); // Load CSS $GLOBALS['TL_CSS'][] = 'system/modules/syncCto/assets/css/steps.css'; // Init classes. $this->User = \BackendUser::getInstance(); }
/** * Constructor */ public function __construct() { $this->import('BackendUser', 'User'); parent::__construct(); }