private function _can_cleanup() { // check happens once a day only.... if (time() > tpp\ini('lastcleanup') + 60 * 60 * 24) { // yes this time will be a few milliseconds before the cleanup actually happens, but who cares! tpp\ini('lastcleanup', time()); return true; } else { return false; } }
protected function action_toggle_insert() { $cur = \tpp\ini('insert_pos'); $pos = $cur == 'top' ? 'bottom' : 'top'; \tpp\ini('insert_pos', $pos); return self::ACTION; }
function footer() { $view = new Template('footer'); $view->langs = tpp\config('lang_list'); $view->cur_lang = tpp\ini('language'); $view->logged_in_as = $this->_user->logged_in_as(); return $view; }