2012-06-28 17:24:12 +02:00
|
|
|
<?php
|
2014-01-05 21:30:39 +01:00
|
|
|
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Event']['orgc'] == $me['org']) || ($isAclModifyOrg && $event['Event']['orgc'] == $me['org']));
|
2013-04-25 14:04:08 +02:00
|
|
|
$mayPublish = ($isAclPublish && $event['Event']['orgc'] == $me['org']);
|
2012-06-28 17:24:12 +02:00
|
|
|
?>
|
2013-11-17 17:54:15 +01:00
|
|
|
<?php
|
2014-01-06 05:15:47 +01:00
|
|
|
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'viewEvent', 'mayModify' => $mayModify, 'mayPublish' => $mayPublish));
|
2013-10-24 10:33:34 +02:00
|
|
|
?>
|
2013-06-10 17:57:20 +02:00
|
|
|
<div class="events view">
|
2012-12-18 20:25:12 +01:00
|
|
|
<?php
|
2014-02-05 15:01:26 +01:00
|
|
|
if ('true' == Configure::read('MISP.showorg') || $isAdmin) {
|
2014-02-05 13:45:18 +01:00
|
|
|
echo $this->element('img', array('id' => $event['Event']['orgc']));
|
|
|
|
$left = true;
|
|
|
|
}
|
2014-03-06 17:21:57 +01:00
|
|
|
$title = $event['Event']['info'];
|
|
|
|
if (strlen($title) > 55) $title = substr($title, 0, 55) . '...';
|
2013-06-03 14:23:15 +02:00
|
|
|
?>
|
|
|
|
<div class="row-fluid">
|
|
|
|
<div class="span8">
|
2014-03-06 17:21:57 +01:00
|
|
|
<h2><?php echo nl2br(h($title)); ?></h2>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dl>
|
2014-03-06 17:21:57 +01:00
|
|
|
<dt>Event ID</dt>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dd>
|
|
|
|
<?php echo h($event['Event']['id']); ?>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>Uuid</dt>
|
|
|
|
<dd>
|
|
|
|
<?php echo h($event['Event']['uuid']); ?>
|
|
|
|
|
|
|
|
</dd>
|
2014-02-05 15:01:26 +01:00
|
|
|
<?php if ('true' == Configure::read('MISP.showorg') || $isAdmin): ?>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dt>Org</dt>
|
|
|
|
<dd>
|
|
|
|
<?php echo h($event['Event']['orgc']); ?>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($isSiteAdmin): ?>
|
|
|
|
<dt>Owner org</dt>
|
|
|
|
<dd>
|
|
|
|
<?php echo h($event['Event']['org']); ?>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<?php endif; ?>
|
2014-02-05 13:45:18 +01:00
|
|
|
<dt>Contributors</dt>
|
|
|
|
<dd>
|
|
|
|
<?php
|
|
|
|
foreach($logEntries as $k => $entry) {
|
2014-02-05 15:01:26 +01:00
|
|
|
if ('true' == Configure::read('MISP.showorg') || $isAdmin) {
|
2014-02-05 13:45:18 +01:00
|
|
|
?>
|
|
|
|
<a href="/logs/event_index/<?php echo $event['Event']['id'] . '/' . h($entry['Log']['org']);?>" style="margin-right:2px;text-decoration: none;">
|
|
|
|
<?php
|
|
|
|
echo $this->element('img', array('id' => $entry['Log']['org'], 'imgSize' => 24, 'imgStyle' => true));
|
|
|
|
?>
|
|
|
|
</a>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</dd>
|
2013-10-30 10:06:12 +01:00
|
|
|
<?php if (isset($event['User']['email']) && ($isSiteAdmin || ($isAdmin && $me['org'] == $event['Event']['org']))): ?>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dt>Email</dt>
|
|
|
|
<dd>
|
|
|
|
<?php echo h($event['User']['email']); ?>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<?php endif; ?>
|
2014-01-23 12:25:04 +01:00
|
|
|
<?php
|
|
|
|
if (Configure::read('MISP.tagging')): ?>
|
|
|
|
<dt>Tags</dt>
|
|
|
|
<dd>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<?php
|
|
|
|
foreach ($tags as $tag): ?>
|
|
|
|
<td style="padding-right:0px;">
|
2014-01-24 09:24:04 +01:00
|
|
|
<?php if ($isAclTagger): ?>
|
2014-01-23 12:25:04 +01:00
|
|
|
<a href="/events/index/searchtag:<?php echo $tag['Tag']['id']; ?>" class=tagFirstHalf style="background-color:<?php echo $tag['Tag']['colour'];?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
2014-01-24 09:24:04 +01:00
|
|
|
<?php else: ?>
|
|
|
|
<a href="/events/index/searchtag:<?php echo $tag['Tag']['id']; ?>" class=tag style="background-color:<?php echo $tag['Tag']['colour'];?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
|
|
|
<?php endif; ?>
|
2014-01-23 12:25:04 +01:00
|
|
|
</td>
|
2014-01-24 09:24:04 +01:00
|
|
|
<?php if ($isAclTagger): ?>
|
2014-01-23 12:25:04 +01:00
|
|
|
<td style="padding-left:0px;padding-right:5px;">
|
|
|
|
<?php
|
|
|
|
echo $this->Form->postLink('x', array('action' => 'removeTag', $event['Event']['id'], $tag['Tag']['id']), array('class' => 'tagSecondHalf', 'title' => 'Delete'), ('Are you sure you want to delete this tag?'));
|
|
|
|
?>
|
|
|
|
</td>
|
2014-01-24 09:24:04 +01:00
|
|
|
<?php endif; ?>
|
2014-01-23 12:25:04 +01:00
|
|
|
<?php
|
|
|
|
endforeach;
|
2014-01-24 09:24:04 +01:00
|
|
|
if ($isAclTagger) : ?>
|
|
|
|
<td id ="addTagTD" style="display:none;">
|
|
|
|
<?php
|
|
|
|
echo $this->Form->create('', array('action' => 'addTag', 'style' => 'margin:0px;'));
|
|
|
|
echo $this->Form->hidden('id', array('value' => $event['Event']['id']));
|
|
|
|
echo $this->Form->input('tag', array(
|
|
|
|
'options' => array($allTags),
|
|
|
|
'value' => 0,
|
|
|
|
'label' => false,
|
|
|
|
'style' => array('height:22px;padding:0px;margin-bottom:0px;'),
|
|
|
|
'onChange' => 'this.form.submit()',
|
|
|
|
'class' => 'input-large'));
|
|
|
|
echo $this->Form->end();
|
|
|
|
?>
|
2014-01-23 12:25:04 +01:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<button id="addTagButton" class="btn btn-inverse" style="line-height:10px; padding: 4px 4px;">+</button>
|
|
|
|
|
2014-01-24 09:24:04 +01:00
|
|
|
</td>
|
2014-02-20 10:07:51 +01:00
|
|
|
<?php else:
|
|
|
|
if (empty($tags)) echo ' ';
|
2014-02-05 13:45:18 +01:00
|
|
|
endif; ?>
|
2014-01-23 12:25:04 +01:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</dd>
|
|
|
|
<?php endif; ?>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dt>Date</dt>
|
|
|
|
<dd>
|
|
|
|
<?php echo h($event['Event']['date']); ?>
|
|
|
|
|
|
|
|
</dd>
|
2014-03-06 17:21:57 +01:00
|
|
|
<dt title="<?php echo $eventDescriptions['threat_level_id']['desc'];?>">Threat Level</dt>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dd>
|
2014-01-21 13:32:24 +01:00
|
|
|
<?php
|
|
|
|
if ($event['ThreatLevel']['name']) echo h($event['ThreatLevel']['name']);
|
|
|
|
else echo h($event['Event']['threat_level_id']);
|
|
|
|
?>
|
2013-06-03 14:23:15 +02:00
|
|
|
|
|
|
|
</dd>
|
2013-06-06 16:36:28 +02:00
|
|
|
<dt title="<?php echo $eventDescriptions['analysis']['desc'];?>">Analysis</dt>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dd>
|
|
|
|
<?php echo h($analysisLevels[$event['Event']['analysis']]); ?>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>Distribution</dt>
|
2014-03-13 14:52:32 +01:00
|
|
|
<dd <?php if($event['Event']['distribution'] == 0) echo 'class = "privateRedText"';?> title = "<?php echo h($distributionDescriptions[$event['Event']['distribution']]['formdesc'])?>">
|
|
|
|
<?php
|
|
|
|
echo h($distributionLevels[$event['Event']['distribution']]);
|
|
|
|
?>
|
2013-06-03 14:23:15 +02:00
|
|
|
</dd>
|
2014-03-06 17:21:57 +01:00
|
|
|
<dt>Description</dt>
|
2013-06-03 14:23:15 +02:00
|
|
|
<dd>
|
|
|
|
<?php echo nl2br(h($event['Event']['info'])); ?>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>Published</dt>
|
2013-06-06 16:36:28 +02:00
|
|
|
<dd style="color: red;">
|
2013-06-03 14:23:15 +02:00
|
|
|
<b><?php echo ($event['Event']['published'] == 1 ? 'Yes' : 'No'); ?></b>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
2013-03-18 15:25:32 +01:00
|
|
|
|
2013-06-03 14:23:15 +02:00
|
|
|
<?php if (!empty($relatedEvents)):?>
|
|
|
|
<div class="related span4">
|
|
|
|
<h3>Related Events</h3>
|
|
|
|
<ul class="inline">
|
|
|
|
<?php foreach ($relatedEvents as $relatedEvent): ?>
|
|
|
|
<li>
|
|
|
|
<div title="<?php echo h($relatedEvent['Event']['info']); ?>">
|
|
|
|
<?php
|
|
|
|
$linkText = $relatedEvent['Event']['date'] . ' (' . $relatedEvent['Event']['id'] . ')';
|
|
|
|
if ($relatedEvent['Event']['org'] == $me['org']) {
|
2013-09-05 10:40:53 +02:00
|
|
|
echo $this->Html->link($linkText, array('controller' => 'events', 'action' => 'view', $relatedEvent['Event']['id'], true, $event['Event']['id']), array('style' => 'color:red;'));
|
2013-06-03 14:23:15 +02:00
|
|
|
} else {
|
2013-09-05 10:40:53 +02:00
|
|
|
echo $this->Html->link($linkText, array('controller' => 'events', 'action' => 'view', $relatedEvent['Event']['id'], true, $event['Event']['id']));
|
2013-06-03 14:23:15 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div></li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
2013-09-10 16:51:56 +02:00
|
|
|
<br />
|
2014-03-03 12:00:48 +01:00
|
|
|
<div class="toggleButtons">
|
2013-10-30 10:06:12 +01:00
|
|
|
<button class="btn btn-inverse toggle-left btn.active qet" id="pivots_active">
|
|
|
|
<span class="icon-minus icon-white" style="vertical-align:top;"></span>Pivots
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-inverse toggle-left qet" style="display:none;" id="pivots_inactive">
|
|
|
|
<span class="icon-plus icon-white" style="vertical-align:top;"></span>Pivots
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-inverse toggle qet" id="attributes_active">
|
|
|
|
<span class="icon-minus icon-white" style="vertical-align:top;"></span>Attributes
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-inverse toggle qet" id="attributes_inactive" style="display:none;">
|
|
|
|
<span class="icon-plus icon-white" style="vertical-align:top;"></span>Attributes
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-inverse toggle-right qet" id="discussions_active">
|
2013-10-29 13:45:53 +01:00
|
|
|
<span class="icon-minus icon-white" style="vertical-align:top;"></span>Discussion
|
2013-10-30 10:06:12 +01:00
|
|
|
</button>
|
|
|
|
<button class="btn btn-inverse toggle-right qet" id="discussions_inactive" style="display:none;">
|
2013-10-29 13:45:53 +01:00
|
|
|
<span class="icon-plus icon-white" style="vertical-align:top;"></span>Discussion
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<br />
|
2013-10-30 10:06:12 +01:00
|
|
|
<br />
|
2013-09-10 16:51:56 +02:00
|
|
|
<div id="pivots_div">
|
2013-09-05 10:40:53 +02:00
|
|
|
<?php if (sizeOf($allPivots) > 1) echo $this->element('pivot'); ?>
|
2013-08-02 11:53:17 +02:00
|
|
|
</div>
|
2014-03-24 16:33:40 +01:00
|
|
|
<div id="create_object_div">
|
2014-03-25 13:56:00 +01:00
|
|
|
<span id="create-button" class="btn btn-inverse" onClick="clickCreateButton();">Add Attribute</span>
|
2014-03-24 16:33:40 +01:00
|
|
|
</div>
|
2014-03-25 13:56:00 +01:00
|
|
|
<br />
|
2014-03-24 16:33:40 +01:00
|
|
|
<div id="attribute_add_form" class="attribute_add_form"></div>
|
|
|
|
<div id="attribute_creation_div" style="display:none;">
|
|
|
|
<?php
|
|
|
|
echo $this->element('eventattributecreation');
|
|
|
|
?>
|
|
|
|
</div>
|
2013-09-10 16:51:56 +02:00
|
|
|
<div id="attributes_div">
|
2014-03-24 16:33:40 +01:00
|
|
|
<?php
|
|
|
|
echo $this->element('eventattribute');
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<div id="discussions_div">
|
2012-12-18 20:25:12 +01:00
|
|
|
<?php
|
2014-03-24 16:33:40 +01:00
|
|
|
echo $this->element('eventdiscussion');
|
2013-04-25 14:04:08 +02:00
|
|
|
?>
|
2014-03-24 16:33:40 +01:00
|
|
|
</div>
|
2011-11-26 10:45:31 +01:00
|
|
|
</div>
|
2013-06-06 16:36:28 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
// tooltips
|
|
|
|
$(document).ready(function () {
|
2013-09-10 09:13:52 +02:00
|
|
|
$("th, td, dt, div, span, li").tooltip({
|
2013-06-06 16:36:28 +02:00
|
|
|
'placement': 'top',
|
|
|
|
'container' : 'body',
|
|
|
|
delay: { show: 500, hide: 100 }
|
|
|
|
});
|
2013-09-10 16:51:56 +02:00
|
|
|
$('#discussions_active').click(function() {
|
|
|
|
$('#discussions_div').hide();
|
|
|
|
$('#discussions_active').hide();
|
|
|
|
$('#discussions_inactive').show();
|
|
|
|
});
|
|
|
|
$('#discussions_inactive').click(function() {
|
|
|
|
$('#discussions_div').show();
|
|
|
|
$('#discussions_active').show();
|
|
|
|
$('#discussions_inactive').hide();
|
|
|
|
});
|
|
|
|
$('#attributes_active').click(function() {
|
|
|
|
$('#attributes_div').hide();
|
|
|
|
$('#attributes_active').hide();
|
|
|
|
$('#attributes_inactive').show();
|
|
|
|
});
|
|
|
|
$('#attributes_inactive').click(function() {
|
|
|
|
$('#attributes_div').show();
|
|
|
|
$('#attributes_active').show();
|
|
|
|
$('#attributes_inactive').hide();
|
|
|
|
});
|
|
|
|
$('#pivots_active').click(function() {
|
|
|
|
$('#pivots_div').hide();
|
|
|
|
$('#pivots_active').hide();
|
|
|
|
$('#pivots_inactive').show();
|
|
|
|
});
|
|
|
|
$('#pivots_inactive').click(function() {
|
|
|
|
$('#pivots_div').show();
|
|
|
|
$('#pivots_active').show();
|
|
|
|
$('#pivots_inactive').hide();
|
|
|
|
});
|
2014-01-23 12:25:04 +01:00
|
|
|
|
|
|
|
$('#addTagButton').click(function() {
|
|
|
|
$('#addTagTD').show();
|
|
|
|
$('#addTagButton').hide();
|
|
|
|
});
|
2013-06-06 16:36:28 +02:00
|
|
|
});
|
2013-08-14 17:46:57 +02:00
|
|
|
|
2014-03-25 13:56:00 +01:00
|
|
|
function clickCreateButton() {
|
|
|
|
$.get( "/attributes/add/<?php echo $event['Event']['id']; ?>", function(data) {
|
|
|
|
$("#attribute_add_form").show();
|
|
|
|
$("#gray_out").show();
|
|
|
|
$("#attribute_add_form").html(data);
|
|
|
|
});
|
|
|
|
}
|
2013-06-06 16:36:28 +02:00
|
|
|
</script>
|