1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| <?php
/* ---------------------------------------------
* Chargement du framework sql
*/
require PLX_PLUGINS.'portail/include/Medoo.php';
use Medoo\Medoo;
class portail extends plxPlugin {
public function __construct($default_lang) {
parent::__construct($default_lang);
$this->database = new Medoo([
'database_type' => 'mysql',
'database_name' => $this->getParam('dbname'),
'server' => $this->getParam('dbhost'),
'port' => $this->getParam('dbport'),
'username' => $this->getParam('dbuser'),
'password' => $this->getParam('dbpass'),
'logging' => $this->getParam('debug')
]);
# droit d'accès
$this->setConfigProfil(PROFIL_ADMIN);
$this->addHook('portailRoutage', 'portailRoutage');
$this->addHook('portailSidebarMenu', 'portailSidebarMenu');
} |
Partager