/** * this page needs a type, determining what it'll display * * @param string $type - see above for possible values * @access public * @throws Exception */ public function __construct($type) { parent::__construct(); $this->type = $type; switch (strtolower($type)) { case 'php': $this->logfile = '../../logs/php_errors.log'; break; case 'exception': $this->logfile = '../../logs/exception.log'; break; case 'mysql': $this->logfile = '../../logs/mysql/mysql-slow.log'; break; case 'apache': $this->logfile = '../../logs/www.bewelcome.org-error.log'; break; default: throw new Exception('Bad type specified for log in AdminLogsPage'); } $this->logname = basename($this->logfile); }
public function getLateLoadScriptFiles() { $scripts = parent::getLateLoadScriptfiles(); $scripts[] = 'adminrightsajax.js'; return $scripts; }
protected function getStylesheets() { $stylesheets = parent::getStylesheets(); $stylesheets[] = 'styles/css/minimal/screen/custom/admin.css?2'; return $stylesheets; }
public function __construct($model) { parent::__construct($model); $this->words = new MOD_words(); $this->scope = $this->rights['Comments']['Scope']; }
protected function getStylesheets() { $stylesheets = parent::getStylesheets(); $stylesheets[] = 'styles/css/minimal/screen/basemod_minimal_col3.css'; return $stylesheets; }
public function __construct($model) { parent::__construct($model); $this->scope = array_keys($this->rights); $this->member = $this->model->getLoggedInMember(); $this->rights = $this->member->getOldRights(); $scope = $this->rights["MassMail"]["Scope"]; $this->canChangeType = stripos($scope, '"changetype"') !== false; // newsletter types $this->newsletterSpecific = stripos($scope, '"specific"') !== false; $this->newsletterGeneral = stripos($scope, '"general"') !== false; $this->loginReminder = stripos($scope, '"remindtologin"') !== false; $this->suggestionsReminder = stripos($scope, '"suggestionsreminder"') !== false; $this->mailToConfirmReminder = stripos($scope, '"mailtoconfirmreminder"') !== false; $this->termsOfUse = stripos($scope, '"termsofuse"') !== false; // if no type is set assume all if (!($this->newsletterSpecific || $this->newsletterGeneral || $this->loginReminder || $this->suggestionsReminder || $this->mailToConfirmReminder || $this->termsOfUse)) { $this->newsletterSpecific = true; $this->newsletterGeneral = true; $this->loginReminder = true; $this->suggestionsReminder = true; $this->mailToConfirmReminder = true; $this->termsOfUse = true; } $this->enqueueGroups = array(); $this->enqueueCountries = array(); $this->canEnqueueMembers = stripos($scope, '"members"') !== false; $this->canEnqueueLocation = stripos($scope, '"location"') !== false || stripos($scope, '"location:') !== false; if ($this->canEnqueueLocation) { $startpos = stripos($scope, '"location:') + 10; if ($startpos !== false) { $endpos = strpos($scope, '"', $startpos); if ($endpos === false) { $endpos = strlen($scope); } $countries = substr($scope, $startpos, $endpos - $startpos); $this->enqueueCountries = explode(",", trim($countries)); } } $this->canEnqueueGroup = stripos($scope, "group") !== false || stripos($scope, "group:") !== false; if ($this->canEnqueueGroup) { $startpos = stripos($scope, '"group:') + 7; if ($startpos !== false) { $endpos = strpos($scope, '"', $startpos); if ($endpos === false) { $endpos = strlen($scope); } $groups = substr($scope, $startpos, $endpos - $startpos); $this->enqueueGroups = explode(",", trim($groups)); } } $this->canEnqueueReminder = stripos($scope, "reminder") !== false; $this->canEnqueueSuggestionsReminder = stripos($scope, "suggestionsreminder") !== false; $this->canEnqueueMailToConfirmReminder = stripos($scope, "mailtoconfirmreminder") !== false; $this->canEnqueueTermsOfUse = stripos($scope, "termsofuse") !== false; // if no scope was given for enqueueing assume full scope $enqueueAny = $this->canEnqueueMembers || $this->canEnqueueLocation || $this->canEnqueueGroup || $this->canEnqueueReminder || $this->canEnqueueSuggestionsReminder || $this->canEnqueueMailToConfirmReminder || $this->canEnqueueTermsOfUse; if ($enqueueAny == false) { $this->canEnqueueMembers = true; $this->canEnqueueLocation = true; $this->canEnqueueGroup = true; $this->canEnqueueReminder = true; $this->canEnqueueSuggestionsReminder = true; $this->canEnqueueMailToConfirmReminder = true; $this->canEnqueueTermsOfUse = true; } if ($this->rights["MassMail"]["Level"] >= 1) { $this->canEditCreateEnqueue = true; } if ($this->rights["MassMail"]["Level"] >= 5) { $this->canTrigger = true; } if (stripos($scope, "All") !== false) { $this->canEnqueueMembers = true; $this->canEnqueueLocation = true; $this->canEnqueueGroup = true; $this->canEnqueueReminder = true; $this->canEnqueueSuggestionsReminder = true; $this->canEnqueueMailToConfirmReminder = true; $this->canEnqueueTermsOfUse = true; $this->canChangeType = true; $this->canTrigger = true; $this->specificNewsletter = true; $this->generalNewsletter = true; $this->loginReminder = true; $this->suggestionsReminder = true; $this->mailToConfirmReminder = true; $this->termsOfUse = true; } }