/** * @param Observer $observer * @see Subject::detach() */ public function detach(Observer $observer) { $hash = $observer->hashCode(); if (isset($this->observers[$hash])) { unset($this->observers[$hash]); } }
public function testBindByObject() { $stdMock = $this->getMock('\\StdClass', ['test']); $stdMock->expects($this->once())->method('test'); $callback = function () use($stdMock) { $stdMock->test(); }; $obj = new \StdClass(); $observer = new Observer([[$obj, 'test', $callback]]); $observer->trigger($obj, 'test'); }
/** * Dispatch event * * Calls all observer callbacks registered for this event * and multiple observers matching event name pattern * * @param string $eventName * @param array $data * @return void */ public function dispatch($eventName, array $data = array()) { \Magento\Framework\Profiler::start('EVENT:' . $eventName, array('group' => 'EVENT', 'name' => $eventName)); foreach ($this->_eventConfig->getObservers($eventName) as $observerConfig) { $event = new \Magento\Framework\Event($data); $event->setName($eventName); $wrapper = new Observer(); $wrapper->setData(array_merge(array('event' => $event), $data)); \Magento\Framework\Profiler::start('OBSERVER:' . $observerConfig['name']); $this->_invoker->dispatch($observerConfig, $wrapper); \Magento\Framework\Profiler::stop('OBSERVER:' . $observerConfig['name']); } \Magento\Framework\Profiler::stop('EVENT:' . $eventName); }
/** * Remove um observador do objeto * @param Observer $observer * @return boolean TRUE caso o observador tenha sido * removido com sucesso * @see Subject::detach() */ public function detach( Observer $observer ) { if ( $observer instanceof Object ) { $hashCode = $observer->hashCode(); } else { $hashCode = spl_object_hash( $observer ); } if ( isset( $this->observers[ $hashCode ] ) ) { unset( $this->observers[ $hashCode ] ); return true; } return false; }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->template = array(); $this->templateFile = "newslettersettings.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('newsletter_overview_settings', 'a'); $this->sqlParser->addField(new SqlField('a', 'set_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'set_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'set_display', 'display', 'Display', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'set_msg_subject', 'subject', 'Onderwerp', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'set_msg_from', 'mailfrom', 'Van', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_EMAIL, true)); $this->sqlParser->addField(new SqlField('a', 'set_msg_action', 'action', 'Action', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'set_msg_text', 'mailtext', 'Mail intro', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'set_msg_ref_tree_id', 'ref_tree_id', 'Referentie node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'set_del_tree_id', 'del_tree_id', 'Unsubscribe Referentie node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'set_msg_optin_tree_id', 'optin_tree_id', 'Referentie node opt-in', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'set_cap_gender', 'cap_gender', 'Caption gender', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'set_cap_name', 'cap_name', 'Caption name', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'set_cap_email', 'cap_email', 'Caption email', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'set_cap_submit', 'cap_submit', 'Caption submit button', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'set_field_width', 'field_width', 'Field width', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'set_usr_id', 'usr_id', 'User', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'set_own_id', 'own_id', 'Owner', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'set_create', 'createdate', 'Created', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'set_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); }
public function before() { $page = strtolower(substr(get_class($this), 11)); Model_Navigation::init(Kohana::$config->load('sitemap')->as_array()); parent::before(); $navigation = Model_Navigation::get(); $this->page = Model_Navigation::$current; if ($this->auto_render !== TRUE) { return; } $this->template->set_global(array('page_body_id' => $this->get_path(), 'page_name' => $page, 'page' => $this->page)); if ($this->request->is_iframe()) { $navigation = NULL; $this->template->footer = NULL; $this->template->breadcrumbs = NULL; Config::set('site', 'profiling', 'no'); $this->query_params = array('type' => 'iframe'); } else { $this->template->breadcrumbs = Config::get('site', 'breadcrumbs') == Config::YES ? $this->breadcrumbs : NULL; $this->template->footer = View::factory('system/blocks/footer'); } $this->template->theme = 'theme-' . Model_User_Meta::get('admin_theme', Config::get('global', 'default_theme')); $this->template->bind_global('navigation', $navigation); Observer::notify('controller_before_' . $this->get_path()); }
public function browse() { $this->_checkPermission(); $params = func_get_args(); $this->path = join('/', $params); // make sure there's a / at the end if (substr($this->path, -1, 1) != '/') { $this->path .= '/'; } //security // we dont allow back link if (strpos($this->path, '..') !== false) { if (Plugin::isEnabled('statistics_api')) { $user = null; if (AuthUser::isLoggedIn()) { $user = AuthUser::getUserName(); } $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $event = array('event_type' => 'hack_attempt', 'description' => __('A possible hack attempt was detected.'), 'ipaddress' => $ip, 'username' => $user); Observer::notify('stats_file_manager_hack_attempt', $event); } } $this->fullpath = FILES_DIR . '/sidebarlink/images/'; // clean up nicely $this->fullpath = preg_replace('/\\/\\//', '/', $this->fullpath); $this->display('sidebarlink/index', array('dir' => $this->path, 'files' => $this->_getListFiles(), 'sidebarlinks' => Record::findAllFrom('SidebarLink', '1=1 ORDER BY id desc'), 'pages' => Record::findAllFrom('Page', 'parent_id=1 OR parent_id=0 order by parent_id,position'))); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->importing = false; $this->template = array(); $this->templateFile = "attachmentoverview.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('attachment', 'a'); $this->sqlParser->addField(new SqlField('a', 'att_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'att_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'att_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'att_ref_id', 'ref_id', 'Referentie', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, false)); $this->sqlParser->addField(new SqlField('a', 'att_weight', 'weight', 'Index', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'att_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'att_online', 'online', 'Online datum', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'att_offline', 'offline', 'Offline datum', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'att_name', 'name', 'Naam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'att_intro', 'intro', 'Introductie', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'att_file', 'file', 'Bestand', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'att_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'att_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'att_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'att_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->orderStatement = array(Attachment::ORDER_ASC => 'order by a.att_weight asc, a.att_name asc', Attachment::ORDER_DESC => 'order by a.att_weight desc, a.att_name asc', Attachment::ORDER_RAND => "order by rand()"); }
public function __construct() { parent::__construct(); $this->template = array(); $this->templateFile = "logging.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; }
public function __construct() { parent::__construct(); $this->usergroup = new SystemUserGroup(); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('users', 'a'); $this->sqlParser->addField(new SqlField('a', 'usr_id', 'id', 'Identifier', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'usr_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'usr_notify', 'notify', 'Notify actions', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'usr_role', 'role', 'User Role', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'usr_name', 'name', 'AchterNaam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'usr_firstname', 'firstname', 'Voornaam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'usr_address', 'address', 'Adres', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'usr_address_nr', 'address_nr', 'Huisnummer', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'usr_zipcode', 'zipcode', 'Postcode', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'usr_city', 'city', 'Plaats', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'usr_country', 'country', 'Land', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'usr_phone', 'phone', 'Telefoon', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_PHONE)); $this->sqlParser->addField(new SqlField('a', 'usr_mobile', 'mobile', 'Mobiel nummer', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_PHONE)); $this->sqlParser->addField(new SqlField('a', 'usr_email', 'email', 'Email', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_EMAIL, true)); $this->sqlParser->addField(new SqlField('a', 'usr_username', 'username', 'Gebruikersnaam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::SEL_USERNAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'usr_password', 'password', 'Wachtwoord', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT | SqlParser::SEL_PASSWORD, SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'usr_logincount', 'logincount', 'Aantal logins', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'usr_logindate', 'logindate', 'Laatste login', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'usr_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE)); $this->orderStatement = array('order by a.usr_name asc, a.usr_firstname asc'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->template = array(); $this->templateFile = "reservationoverview.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('reservation', 'a'); $this->sqlParser->addField(new SqlField('a', 'res_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'res_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'res_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'res_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('b', 'usr_name', 'name', 'AchterNaam', SqlParser::getTypeSelect() | SqlParser::NAME, SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('b', 'usr_firstname', 'firstname', 'Voornaam', SqlParser::getTypeSelect() | SqlParser::NAME, SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'res_usr_id', 'usr_id', 'User', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'res_date', 'reservation_date', 'Date', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'res_time', 'reservation_time', 'Time', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'res_vip', 'vip', 'VIP reservation', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'res_own_id', 'own_id', 'Owner', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'res_create', 'createdate', 'Created', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'res_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->addFrom('left join users as b on b.usr_id = a.res_usr_id'); $this->orderStatement = array(self::ORDER_TIME_ASC => 'order by a.res_date %s, a.res_time asc , b.usr_name asc', self::ORDER_TIME_DESC => 'order by a.res_date %s, a.res_time desc , b.usr_name asc'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->template = array(); $this->templateFile = "newslettertag.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('newsletter_tag', 'a'); $this->sqlParser->addField(new SqlField('b', 'nl_name', 'name', 'Newsletter title', SqlParser::getTypeSelect() | SqlParser::NAME, SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'tag_nl_id', 'nl_id', 'NewsLetter id', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'tag_parent_tag', 'parent_tag', 'Parent tag name', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('b', 'nl_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER, false)); $this->sqlParser->addField(new SqlField('b', 'nl_tag', 'tag', 'Tag', SqlParser::getTypeSelect(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'tag_tags', 'tags', 'Replacement tags', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'tag_template', 'template', 'Template', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'tag_stylesheet', 'stylesheet', 'Stylesheet', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'tag_usr_id', 'usr_id', 'User', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'tag_own_id', 'own_id', 'Owner', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'tag_create', 'createdate', 'Create date', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'tag_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->addFrom("inner join newsletter as b on b.nl_id = a.tag_nl_id"); //$this->orderStatement = array('order by a.tag_tag %s'); $this->settings = array(); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->importing = false; $this->template = array(); $this->templateFile = "galleryoverview.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->reference = array(); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('gallery', 'a'); $this->sqlParser->addField(new SqlField('a', 'gal_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'gal_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'gal_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'gal_weight', 'weight', 'Gewicht', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'gal_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'gal_active', 'activated', 'Geactiveerd', SqlParser::getTypeSelect(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'gal_name', 'name', 'Naam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'gal_description', 'description', 'Introductie', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'gal_thumbnail', 'thumbnail', 'Afbeelding', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'gal_image', 'image', 'Afbeelding', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'gal_img_x', 'img_x', 'Offset x', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'gal_img_y', 'img_y', 'Offset y', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'gal_img_width', 'img_width', 'Offset width', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'gal_img_height', 'img_height', 'Offset height', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'gal_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'gal_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'gal_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'gal_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->orderStatement = array(Gallery::ORDER_LINEAR => 'order by a.gal_weight asc, a.gal_create asc', Gallery::ORDER_RANDOM => "order by rand()", Gallery::ORDER_PREVIOUS => 'order by a.gal_weight desc, a.gal_create asc'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->template = array(); $this->templateFile = "newsoverview.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('news', 'a'); $this->sqlParser->addField(new SqlField('a', 'news_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'news_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'news_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'news_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'news_online', 'online', 'Online datum', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'news_offline', 'offline', 'Offline datum', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'news_date', 'date', 'Date', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'news_name', 'name', 'Name', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'news_intro', 'intro', 'Introduction', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'news_text', 'text', 'Content', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'news_thumbnail', 'thumbnail', 'Thumbnail', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'news_image', 'image', 'Afbeelding', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'news_img_x', 'img_x', 'Offset x', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'news_img_y', 'img_y', 'Offset y', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'news_img_width', 'img_width', 'Offset width', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'news_img_height', 'img_height', 'Offset height', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'news_count', 'count', 'Visits', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'news_usr_id', 'usr_id', 'User', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'news_own_id', 'own_id', 'Owner', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'news_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'news_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->orderStatement = array('order by a.news_online desc, a.news_id desc'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->pagerKey = 'nlusr'; $this->template = array(); $this->templateFile = "newsletteruser.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('newsletter_user', 'a'); $this->sqlParser->addField(new SqlField('a', 'usr_id', 'id', 'Id', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'usr_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'usr_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'usr_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'usr_gender', 'gender', 'Gender', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'usr_name', 'name', 'Name', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'usr_email', 'email', 'Email', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'usr_count', 'count', 'Newsletters sent', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'usr_bounce', 'bounce', 'Bounce count', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'usr_ip', 'ip', 'Ip adres', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'usr_host', 'host', 'Host', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'usr_client', 'client', 'Client', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'usr_optin', 'optin', 'Opt-in', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'usr_unsubscribe', 'unsubscribe_date', 'Unsubscribe date', SqlParser::getTypeSelect() | SqlParser::MOD_DELETE, SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'usr_create', 'createdate', 'Created', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'usr_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->setGroupby('group by a.usr_id'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->template = array(); $this->templateFile = "formelement.tpl"; $this->templateEmail = "formemail.tpl"; $this->templateEmailItem = "formemailitem.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->type = array('InputTextField' => 'Text field', 'InputTextArea' => 'Text area', 'InputEmail' => 'Email field', 'InputEmailSender' => 'Email field (sender)', 'InputNumeric' => 'Numeric field', 'InputPhone' => 'Phone field', 'InputDate' => 'Date field', 'InputHidden' => 'Hidden field', 'InputConstant' => 'Constant value', 'InputLogin' => 'Authenticated User name', 'InputCombo' => 'Pull-down list', 'InputCheckbox' => 'Checkbox', 'InputRadio' => 'Radio button list Vertical', 'InputRadioHorizontal' => 'Radio button list Horizontal', 'InputRadioScale' => 'Radio button list Scale', 'InputRadioExtra' => 'Radio button list Vertical + text field', 'InputMultiCheckbox' => 'Checkbox list Vertical', 'InputMultiCheckboxHorizontal' => 'Checkbox list Horizontal', 'InputMultiCheckboxExtra' => 'Checkbox list Vertical + text field', 'InputDescription' => 'Description'); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('form', 'a'); $this->sqlParser->addField(new SqlField('a', 'form_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'form_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'form_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'form_type', 'type', 'Type element', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'form_weight', 'weight', 'Index', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'form_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'form_active', 'activated', 'Actieve status', SqlParser::getTypeSelect(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'form_mandatory', 'mandatory', 'Verplicht status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'form_size', 'size', 'Lengte', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'form_name', 'name', 'Naam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'form_description', 'description', 'Omschrijving', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'form_default', 'def', 'Standaard waarde', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'form_options', 'options', 'Opties', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'form_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'form_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'form_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'form_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->orderStatement = array('order by a.form_weight %s, a.form_name asc'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->importing = false; $this->template = array(); $this->templateFile = "linksoverview.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('links', 'a'); $this->sqlParser->addField(new SqlField('a', 'lnk_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'lnk_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'lnk_active', 'activated', 'Activated status', SqlParser::getTypeSelect(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'lnk_weight', 'weight', 'Reference Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'lnk_ref_tree_id', 'ref_tree_id', 'Reference Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'lnk_url', 'url', 'Url', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'lnk_name', 'name', 'Naam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_intro', 'intro', 'Introductie', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'lnk_text', 'text', 'Inhoud', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'lnk_thumbnail', 'thumbnail', 'Afbeelding', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'lnk_image', 'image', 'Afbeelding', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'lnk_img_x', 'img_x', 'Offset x', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'lnk_img_y', 'img_y', 'Offset y', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'lnk_img_width', 'img_width', 'Offset width', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'lnk_img_height', 'img_height', 'Offset height', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'lnk_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->orderStatement = array('order by a.lnk_weight asc, a.lnk_name asc'); }
function comment_save(&$page) { // check if we need to save a comment if (!isset($_POST['comment'])) { return; } global $__FROG_CONN__; if ($page->comment_status != Comment::OPEN) { return; } $data = $_POST['comment']; if (is_null($data)) { return; } if (!isset($data['author_name']) or trim($data['author_name']) == '') { return; } if (!isset($data['author_email']) or trim($data['author_email']) == '') { return; } if (!isset($data['body']) or trim($data['body']) == '') { return; } use_helper('Kses'); $allowed_tags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'b' => array(), 'blockquote' => array('cite' => array()), 'br' => array(), 'code' => array(), 'em' => array(), 'i' => array(), 'p' => array(), 'strike' => array(), 'strong' => array()); // get the setting for comments moderations //$sql = 'SELECT value FROM '.TABLE_PREFIX.'setting WHERE name=\'auto_approve_comment\''; //$stmt = $__FROG_CONN__->prepare($sql); //$stmt->execute(); //$auto_approve_comment = (int) $stmt->fetchColumn(); $auto_approve_comment = 1; $sql = 'INSERT INTO ' . TABLE_PREFIX . 'comment (page_id, author_name, author_email, author_link, body, is_approved, created_on) VALUES (' . '\'' . $page->id . '\', ' . $__FROG_CONN__->quote(strip_tags($data['author_name'])) . ', ' . $__FROG_CONN__->quote(strip_tags($data['author_email'])) . ', ' . $__FROG_CONN__->quote(strip_tags($data['author_link'])) . ', ' . $__FROG_CONN__->quote(kses($data['body'], $allowed_tags)) . ', ' . $__FROG_CONN__->quote($auto_approve_comment) . ', ' . $__FROG_CONN__->quote(date('Y-m-d H:i:s')) . ')'; $__FROG_CONN__->exec($sql); Observer::notify('comment_after_add'); }
public function __construct() { parent::__construct(); $this->tree = new SiteTree($this); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('sitetree', 'a'); $this->sqlParser->addField(new SqlField('a', 'tree_id', 'id', 'Identifier', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'tree_parent_id', 'parent', 'Parent node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'tree_sitegrp_id', 'sitegroup_id', 'Site group', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'tree_weight', 'weight', 'Gewicht', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'tree_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'tree_visible', 'visible', 'Zichtbaar status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'tree_hide', 'hide', 'Verberg mode', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'tree_startpage', 'startpage', 'Startpagina', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'tree_online', 'online', 'Online datum', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'tree_offline', 'offline', 'Offline datum', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE)); $this->sqlParser->addField(new SqlField('a', 'tree_name', 'name', 'Naam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'tree_title', 'title', 'Titel', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'tree_url', 'url', 'Url', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'tree_external', 'external', 'Externe url', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'tree_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'tree_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'tree_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'tree_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); //$this->sqlParser->addFrom("left join groups as d on d.grp_id = a.tree_grp_id"); $this->orderStatement = array('order by a.tree_parent_id asc, a.tree_weight asc, a.tree_name asc'); }
public function on_page_load() { $email_ctx_id = $this->get('email_id_ctx', 'email'); $email = $this->_ctx->get($email_ctx_id); $referrer_page = Request::current()->referrer(); $next_page = $this->get('next_url', Request::current()->referrer()); if (!Valid::email($email)) { Messages::errors(__('Use a valid e-mail address.')); HTTP::redirect($referrer_page); } $user = ORM::factory('user', array('email' => $email)); if (!$user->loaded()) { Messages::errors(__('No user found!')); HTTP::redirect($referrer_page); } $reflink = ORM::factory('user_reflink')->generate($user, 'forgot', array('next_url' => URL::site($this->next_url, TRUE))); if (!$reflink) { Messages::errors(__('Reflink generate error')); HTTP::redirect($referrer_page); } Observer::notify('admin_login_forgot_before', $user); try { Email_Type::get('user_request_password')->send(array('username' => $user->username, 'email' => $user->email, 'reflink' => Route::url('reflink', array('code' => $reflink)), 'code' => $reflink)); Messages::success(__('Email with reflink send to address set in your profile')); } catch (Exception $e) { Messages::error(__('Something went wrong')); } HTTP::redirect($next_page); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->template = array(); $this->templateFile = "calendaroverview.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('calendar', 'a'); $this->sqlParser->addField(new SqlField('a', 'cal_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'cal_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'cal_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'cal_active', 'active', 'Active state', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'cal_start', 'start', 'Start date', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'cal_stop', 'stop', 'End date', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'cal_start_time', 'start_time', 'Start time', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'cal_stop_time', 'stop_time', 'End time', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'cal_name', 'name', 'Name', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'cal_intro', 'intro', 'Introduction', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'cal_text', 'text', 'Content', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'cal_thumbnail', 'thumbnail', 'Thumbnail', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'cal_image', 'image', 'Image', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'cal_img_x', 'img_x', 'Offset x', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'cal_img_y', 'img_y', 'Offset y', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'cal_img_width', 'img_width', 'Offset width', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'cal_img_height', 'img_height', 'Offset height', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'cal_count', 'count', 'Visits', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'cal_usr_id', 'usr_id', 'User', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'cal_own_id', 'own_id', 'Owner', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'cal_create', 'createdate', 'Created', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'cal_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->orderStatement = array('order by a.cal_start %s, a.cal_start_time desc'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->reference = array(); $this->template = array(); $this->templateFile = "newsletterplugin.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('newsletter_plugin', 'a'); $this->sqlParser->addField(new SqlField('a', 'plug_nl_id', 'nl_id', 'NewsLetter id', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('b', 'nl_name', 'name', 'Name', SqlParser::getTypeSelect() | SqlParser::NAME, SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'plug_tag', 'nl_tag', 'Tag name', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('b', 'nl_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER, false)); $this->sqlParser->addField(new SqlField('b', 'nl_tag', 'tag', 'Tag', SqlParser::getTypeSelect(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('b', 'nl_active', 'nl_active', 'Actieve status', SqlParser::getTypeSelect(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'plug_type', 'type', 'Type of tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'plug_text', 'text', 'Content', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'plug_plugin_id', 'plugin_id', 'Plugin identifier', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'plug_plugin_type', 'plugin_type', 'Plugin type', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'plug_plugin_keys', 'plugin_keys', 'Plugin keys', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'plug_usr_id', 'usr_id', 'User', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'plug_own_id', 'own_id', 'Owner', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'plug_create', 'createdate', 'Create date', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'plug_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->addFrom("inner join newsletter as b on b.nl_id = a.plug_nl_id"); $this->orderStatement = array('order by a.plug_tag %s'); $this->settings = array(); }
public function __construct() { $this->_check(); $this->setLayout("backend"); $this->assignToLayout("sidebar", new View("../../plugins/paw_users/admin/sidebar")); Observer::observe("view_backend_layout_head", "UserController::_loadCSS"); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->setPagerKey('patt'); $this->importing = false; $this->template = array(); $this->templateFile = "calendarimage.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('calendar_image', 'a'); $this->sqlParser->addField(new SqlField('a', 'img_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'img_cal_id', 'cal_id', 'Calendar', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('b', 'cal_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER, false)); $this->sqlParser->addField(new SqlField('b', 'cal_tag', 'tag', 'Tag', SqlParser::getTypeSelect(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('b', 'cal_active', 'cal_active', 'Actieve status', SqlParser::getTypeSelect(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'img_weight', 'weight', 'Index', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'img_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'img_name', 'name', 'Naam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'img_thumbnail', 'thumbnail', 'Afbeelding', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'img_image', 'image', 'Afbeelding', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'img_img_x', 'img_x', 'Offset x', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'img_img_y', 'img_y', 'Offset y', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'img_img_width', 'img_width', 'Offset width', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'img_img_height', 'img_height', 'Offset height', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'img_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'img_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'img_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'img_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->addFrom("inner join calendar as b on b.cal_id = a.img_cal_id"); $this->orderStatement = array('order by a.img_weight asc, a.img_name asc'); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->setPagerKey('pcom'); $this->template = array(); $this->templateFile = "calendarcomment.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('calendar_comment', 'a'); $this->sqlParser->addField(new SqlField('a', 'com_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'com_cal_id', 'cal_id', 'Calendar id', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('b', 'cal_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER, false)); $this->sqlParser->addField(new SqlField('b', 'cal_tag', 'tag', 'Tag', SqlParser::getTypeSelect(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('b', 'cal_active', 'cal_active', 'Actieve status', SqlParser::getTypeSelect(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'com_active', 'active', 'Active state', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'com_name', 'name', 'Name', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'com_email', 'email', 'Email', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'com_text', 'text', 'Content', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'com_ip', 'ip', 'Ip address', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'com_date', 'date', 'Date', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'com_create', 'createdate', 'Create date', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'com_ts', 'ts', 'Modified', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->addFrom("inner join calendar as b on b.cal_id = a.com_cal_id"); $this->orderStatement = array('order by a.com_date %s'); $this->settings = array(); }
public function send($title, $text, $from = NULL, $to, $parent_id = 0, $to_from = TRUE) { if (!is_array($to)) { $to = array($to); } if (!empty($to)) { if ($from !== NULL and $to_from === TRUE) { $to[] = $from; } $to = array_unique($to); $users = DB::select('id', 'email')->from('users')->where('id', 'IN', $to)->execute()->as_array('id', 'email'); $message = Kses::filter($text, Kohana::$config->load('global')->get('allowed_html_tags')); $data = array('created_on' => date('Y-m-d H:i:s'), 'text' => $message, 'title' => $title, 'from_user_id' => $from); list($message_id, $rows) = DB::insert($this->table_name())->columns(array_keys($data))->values($data)->execute($this->_db); if ($message_id) { $insert = DB::insert('messages_users')->columns(array('status', 'user_id', 'message_id', 'parent_id')); foreach ($users as $id => $email) { $insert->values(array('status' => self::STATUS_NEW, 'user_id' => (int) $id, 'message_id' => $message_id, 'parent_id' => (int) $parent_id)); self::clear_cache($id); Observer::notify('send_message', (int) $id, $text); } $insert->execute($this->_db); if ($from !== NULL) { Api::post('user-messages.mark_read', array('id' => $message_id, 'uid' => $from)); } return $message_id; } } return FALSE; }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->template = array(); $this->templateFile = "formsettings.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('form_tree_settings', 'a'); $this->sqlParser->addField(new SqlField('a', 'form_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'form_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'form_subject', 'subject', 'Onderwerp', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'form_from', 'mailfrom', 'Van', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_EMAIL, true)); $this->sqlParser->addField(new SqlField('a', 'form_to', 'mailto', 'Naar', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_EMAIL)); $this->sqlParser->addField(new SqlField('a', 'form_caption', 'caption', 'Caption', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'form_action', 'action', 'Action', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'form_mail_text', 'mailtext', 'Mail intro', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'form_ref_tree_id', 'ref_tree_id', 'Referentie node', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'form_optin_tree_id', 'optin_tree_id', 'Referentie node opt-in', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'form_templatefield', 'templatefield', 'Template', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'form_mandatorysign', 'mandatorysign', 'Verplicht symbool', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('a', 'form_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'form_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'form_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'form_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); }
public function on_page_load() { $username = Auth::get_username(); Auth::instance()->logout(TRUE); Observer::notify('admin_after_logout', $username); HTTP::redirect($this->get('next_url', Request::current()->referrer())); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct($plugin) { parent::__construct(); $this->plugin = $plugin; $this->setPagerKey('patt'); $this->importing = false; $this->template = array(); $this->templateFile = "newsletterattachment.tpl"; $this->basePath = realpath(dirname(__FILE__) . "/../") . "/"; $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('newsletter_attachment', 'a'); $this->sqlParser->addField(new SqlField('a', 'att_id', 'id', 'id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'att_nl_id', 'nl_id', 'Nieuwsbericht', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('b', 'nl_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect(), SqlField::TYPE_INTEGER, false)); $this->sqlParser->addField(new SqlField('b', 'nl_tag', 'tag', 'Tag', SqlParser::getTypeSelect(), SqlField::TYPE_STRING, false)); $this->sqlParser->addField(new SqlField('b', 'nl_active', 'nl_active', 'Actieve status', SqlParser::getTypeSelect(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'att_weight', 'weight', 'Index', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER)); $this->sqlParser->addField(new SqlField('a', 'att_active', 'active', 'Actieve status', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_BOOLEAN)); $this->sqlParser->addField(new SqlField('a', 'att_name', 'name', 'Naam', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'att_file', 'file', 'Bestand', SqlParser::getTypeSelect(), SqlField::TYPE_STRING)); $this->sqlParser->addField(new SqlField('a', 'att_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'att_own_id', 'own_id', 'Eigenaar', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'att_create', 'createdate', 'Creatie', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); $this->sqlParser->addField(new SqlField('a', 'att_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); $this->sqlParser->addFrom("inner join newsletter as b on b.nl_id = a.att_nl_id"); $this->orderStatement = array('order by a.att_weight asc, a.att_name asc'); }
public function __construct() { parent::__construct(); //$this->log =& LoggerManager::getLogger(get_class($this)); $this->setCacheable(true); self::$cacheEnabled = true; $this->initialize(); }