public function init() { parent::init(); /* $this->api->pathfinder ->addLocation(array( 'addons' => array('addons', 'vendor'), )) ->setBasePath($this->pathfinder->base_location->getPath() . '/..') ; */ $this->template['css'] = 'compact.css'; $this->dbConnect(); $this->api->menu->addItem(['Dashboard', 'icon' => 'home'], '/'); $this->api->menu->addItem(['Users', 'icon' => 'users'], 'users'); $this->api->menu->addItem(['Keys', 'icon' => 'key'], 'keychain'); $this->add('dokku_alt/Initiator'); $auth = $this->add('Auth'); $user = $auth->setModel('User'); $auth->usePasswordEncryption(); if ((string) $user->count() > 0) { $auth->check(); } else { $this->layout->add('View_Error')->set('No user accounts found. Please define them before continuing.'); } }
function init() { parent::init(); $this->dbConnect(); $a = $this->add('Auth'); $a->setModel('Admin'); $a->check(); $this->api->menu->addItem('Manage Widgets', 'widgets'); $this->api->menu->addItem('Manage Access', 'access'); $this->api->menu->addItem('Logout', 'logout'); }
function init() { parent::init(); //DB Connect not default $this->dbConnect(); // Might come handy when multi-timezone base networks integrates $this->today = date('Y-m-d', strtotime($this->recall('current_date', date('Y-m-d')))); $this->now = date('Y-m-d H:i:s', strtotime($this->recall('current_date', date('Y-m-d H:i:s')))); $superadmin = $this->add('Model_User'); // ->addCondition('type','Backend'); // print_r($superadmin->getRows()); $auth = $this->add('BasicAuth'); $auth->setModel($superadmin, 'email', 'password'); $auth->check(); $this->api->pathfinder->addLocation(array('addons' => array('addons', 'vendor', 'shared/addons2')))->setBasePath($this->pathfinder->base_location->getPath() . '/..'); }
function init() { parent::init(); $this->api->pathfinder->addLocation(array('addons' => array('addons', 'vendor')))->setBasePath($this->pathfinder->base_location->getPath() . '/..'); $this->api->menu->addMenuItem('/', 'Home'); }