here; $urlHere = explode('/', $urlHere); foreach ($urlHere as $k => $v) { $urlHere[$k] = urlencode($v); } $urlHere = implode('/', $urlHere); $urlHere = $baseurl . $urlHere; $mayModify = ($isSiteAdmin || ($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id'])); $mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']); $mayChangeCorrelation = !Configure::read('MISP.completely_disable_correlation') && ($isSiteAdmin || ($mayModify && Configure::read('MISP.allow_disabling_correlation'))); $possibleAction = 'Proposal'; if ($mayModify) $possibleAction = 'Attribute'; $all = false; if (isset($this->params->params['paging']['Event']['page'])) { if ($this->params->params['paging']['Event']['page'] == 0) $all = true; $page = $this->params->params['paging']['Event']['page']; } else { $page = 0; } $fieldCount = 11; if (!empty($event['Sighting'])) { foreach ($sightingsData['data'] as $aid => $data) { $sightingsData['data'][$aid]['html'] = ''; foreach ($data as $type => $typeData) { $name = (($type != 'expiration') ? Inflector::pluralize($type) : $type); $sightingsData['data'][$aid]['html'] .= '' . ucfirst(h($name)) . '
'; foreach ($typeData['orgs'] as $org => $orgData) { $extra = (($org == $me['Organisation']['name']) ? " class= 'bold'" : ""); if ($type == 'expiration') { $sightingsData['data'][$aid]['html'] .= '' . h($org) . ': ' . date('Y-m-d H:i:s', $orgData['date']) . '
'; } else { $sightingsData['data'][$aid]['html'] .= '' . h($org) . ': ' . h($orgData['count']) . ' (' . date('Y-m-d H:i:s', $orgData['date']) . ')
'; } } $sightingsData['data'][$aid]['html'] .= '
'; } } } $filtered = false; if(isset($passedArgsArray)){ if (count($passedArgsArray) > 0) { $filtered = true; } } ?>
Form->create('Attribute', array('id' => 'delete_selected', 'url' => $deleteSelectedUrl)); echo $this->Form->input('ids_delete', array( 'type' => 'text', 'value' => 'test', 'style' => 'display:none;', 'label' => false, )); echo $this->Form->end(); ?> Form->create('ShadowAttribute', array('id' => 'accept_selected', 'url' => '/shadow_attributes/acceptSelected/' . $event['Event']['id'])); echo $this->Form->input('ids_accept', array( 'type' => 'text', 'value' => '', 'style' => 'display:none;', 'label' => false, )); echo $this->Form->end(); ?> Form->create('ShadowAttribute', array('id' => 'discard_selected', 'url' => '/shadow_attributes/discardSelected/' . $event['Event']['id'])); echo $this->Form->input('ids_discard', array( 'type' => 'text', 'value' => '', 'style' => 'display:none;', 'label' => false, )); echo $this->Form->end(); if (!isset($attributeFilter)) $attributeFilter = 'all'; ?>
element('eventattributetoolbar', array( 'target' => $target, 'attributeFilter' => $attributeFilter, 'urlHere' => $urlHere, 'filtered' =>$filtered, 'mayModify' => $mayModify, 'possibleAction' => $possibleAction )); ?> %s', __('Related Tags')); } $fieldCount += 1; ?> 'attribute', 1 => 'proposal', 2 => 'proposal_delete', 3 => 'object' ); $focusedRow = false; foreach ($event['objects'] as $k => $object) { $insertBlank = false; echo $this->element('/Events/View/row_' . $object['objectType'], array( 'object' => $object, 'k' => $k, 'mayModify' => $mayModify, 'mayChangeCorrelation' => $mayChangeCorrelation, 'page' => $page, 'fieldCount' => $fieldCount, 'includeRelatedTags' => !empty($includeRelatedTags) ? 1 : 0, 'includeDecayingScore' => !empty($includeDecayingScore) ? 1 : 0 )); if (!empty($focus) && ($object['objectType'] == 'object' || $object['objectType'] == 'attribute') && $object['uuid'] == $focus) { $focusedRow = $k; } if ( ($object['objectType'] == 'attribute' && !empty($object['ShadowAttribute'])) || $object['objectType'] == 'object' ): ?>
Paginator->sort('timestamp', __('Date'), array('direction' => 'desc'));?> Paginator->sort('event_id', __('Event'));?> Paginator->sort('Org.name', __('Org')); ?> Paginator->sort('category');?> Paginator->sort('type');?> Paginator->sort('value');?> Paginator->sort('comment');?> Paginator->sort('to_ids', 'IDS');?> Paginator->sort('distribution');?>
Js->writeBuffer(); ?>