<?php if (!hasRight('interactview', true)) { throw new Exception('{{401 - Accès non autorisé}}'); } $interacts = array(); $interacts[-1] = interactDef::all(null); $interactListGroup = interactDef::listGroup(); if (is_array($interactListGroup)) { foreach ($interactListGroup as $group) { $interacts[$group['group']] = interactDef::all($group['group']); } } ?> <div style="position : fixed;height:100%;width:15px;top:50px;left:0px;z-index:998;background-color:#f6f6f6;" id="bt_displayInteractList"><i class="fa fa-arrow-circle-o-right" style="color : #b6b6b6;"></i></div> <div class="row row-overflow"> <div class="col-lg-2 col-md-3 col-sm-4" id="div_listInteract" style="z-index:999"> <div class="bs-sidebar"> <a id="bt_addInteract" class="btn btn-default" style="width : 100%;margin-top : 5px;margin-bottom: 5px;"><i class="fa fa-plus-circle"></i> {{Ajouter interaction}}</a> <div class="row"> <div class="col-xs-6"> <a id="bt_regenerateInteract" class="btn btn-warning" style="width : 100%;margin-top : 5px;margin-bottom: 5px;text-shadow : none;"><i class="fa fa-refresh"></i> {{Regénérer}}</a> </div> <div class="col-xs-6"> <a id="bt_testInteract" class="btn btn-primary" style="width : 100%;margin-top : 5px;margin-bottom: 5px;text-shadow : none;"><i class="fa fa-comment-o"></i> {{Tester}}</a> </div> </div>
* Jeedom is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Jeedom. If not, see <http://www.gnu.org/licenses/>. */ try { require_once dirname(__FILE__) . '/../../core/php/core.inc.php'; include_file('core', 'authentification', 'php'); if (!isConnect('admin')) { throw new Exception(__('401 - Accès non autorisé', __FILE__)); } if (init('action') == 'all') { $results = utils::o2a(interactDef::all()); foreach ($results as &$result) { $result['nbInteractQuery'] = count(interactQuery::byInteractDefId($result['id'])); $result['nbEnableInteractQuery'] = count(interactQuery::byInteractDefId($result['id'], true)); if ($result['link_type'] == 'cmd' && $result['link_id'] != '') { $link_id = ''; foreach (explode('&&', $result['link_id']) as $cmd_id) { $cmd = cmd::byId($cmd_id); if (is_object($cmd)) { $link_id .= cmd::cmdToHumanReadable('#' . $cmd->getId() . '# && '); } } $result['link_id'] = trim(trim($link_id), '&&'); } } ajax::success($results);