/**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $this->AllTypes = DB::getInstance()->query('SELECT * FROM `' . PREFIX . 'equipment_type` WHERE `accountid`="' . SessionAccountHandler::getId() . '" ORDER BY `name` ASC')->fetchAll();
     $Options = array();
     foreach ($this->AllTypes as $data) {
         $Options[$data['id']] = $data['name'];
     }
     $Types = new PluginConfigurationValueSelect('type', __('Equipment type to display'));
     $Types->setOptions($Options);
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue($Types);
     if (isset($_GET['type']) && isset($Options[$_GET['type']])) {
         $Configuration->object('type')->setValue($_GET['type']);
         $Configuration->update('type');
         Cache::delete(PluginConfiguration::CACHE_KEY);
     }
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $this->AllTags = array();
     $AllTags = DB::getInstance()->query('SELECT `id`, `tag` FROM `' . PREFIX . 'tag` WHERE `accountid`="' . SessionAccountHandler::getId() . '" ORDER BY `tag` ASC')->fetchAll();
     foreach ($AllTags as $data) {
         $this->AllTags[$data['id']] = $data['tag'];
     }
     $Tags = new PluginConfigurationValueSelect('tag', __('Tag to analyze'));
     $Tags->setOptions($this->AllTags);
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue($Tags);
     if (isset($_GET['dat']) && isset($this->AllTags[$_GET['dat']])) {
         $Configuration->object('tag')->setValue($_GET['dat']);
         $Configuration->update('tag');
         Cache::delete(PluginConfiguration::CACHE_KEY);
     }
     $this->setConfiguration($Configuration);
     $this->TagId = (int) $this->Configuration()->value('tag');
 }