$configuration->put('HOME_PAGE', 'index.php'); $configuration->put('VOCAL_SENSITIVITY', '0.0'); //Création du rang admin $rank = new Rank(); $rank->setLabel('admin'); $rank->save(); //Déclaration des sections du programme $sections = array('event', 'vocal', 'user', 'plugin', 'configuration', 'admin'); //Création des sections déclarées et attribution de tous les droits sur toutes ces sections pour l'admin foreach ($sections as $sectionName) { $s = new Section(); $s->setLabel($sectionName); $s->save(); $r = new Right(); $r->setSection($s->getId()); $r->setRead('1'); $r->setDelete('1'); $r->setCreate('1'); $r->setUpdate('1'); $r->setRank($rank->getId()); $r->save(); } $personalities = array('John Travolta', 'Jeff Buckley', 'Tom Cruise', 'John Lennon', 'Emmet Brown', 'Geo trouvetou', 'Luke Skywalker', 'Mac Gyver', 'Marty McFly'); $im = $personalities[rand(0, count($personalities) - 1)]; list($fn, $n) = explode(' ', $im); //Creation du premier compte et assignation en admin $user->setMail($_POST['email']); $user->setPassword($_POST['password']); $user->setLogin($_POST['login']); $user->setFirstName($fn); $user->setName($n);
<?php require_once 'KodiCmd.class.php'; $table = new KodiCmd(); $table->create(); $s1 = new Section(); $s1->setLabel('kodi'); $s1->save(); $r1 = new Right(); $r1->setSection($s1->getId()); $r1->setRead('1'); $r1->setDelete('1'); $r1->setCreate('1'); $r1->setUpdate('1'); $r1->setRank('1'); $r1->save(); $conf = new Configuration(); $conf->put('plugin_kodiCmd_api_url_kodi', 'http://192.168.1.107:85/jsonrpc'); $conf->put('plugin_kodiCmd_api_timeout_kodi', 5); $conf->put('plugin_kodiCmd_api_recognition_status', ''); $ro = new Room(); $ro->setName('KODI'); $ro->setDescription('De la bonne zic, un bon p\'tit film....'); $ro->save(); $roomManager = new Room(); $rooms = $roomManager->populate(); foreach ($rooms as $room) { if ($room->getName() == "KODI") { $kodiRoomId = $room->getId(); } }
*/ require_once 'Sensor.class.php'; $table = new Sensor(); $table->create(); require_once 'SensorType.class.php'; $table2 = new SensorType(); $table2->create(); $s1 = new Section(); $s1->setLabel('sensor'); $s1->save(); $s2 = new Section(); $s2->setLabel('sensortypes'); $s2->save(); $r1 = new Right(); $r1->setSection($s1->getId()); $r1->setRead('1'); $r1->setDelete('1'); $r1->setCreate('1'); $r1->setUpdate('1'); $r1->setRank('1'); $r1->save(); $r2 = new Right(); $r2->setSection($s2->getId()); $r2->setRead('1'); $r2->setDelete('1'); $r2->setCreate('1'); $r2->setUpdate('1'); $r2->setRank('1'); $r2->save(); $conf = new Configuration(); $conf->put('plugin_sensor_receptor_pin', '0');