gdpr fixes

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2019-08-20 15:41:18 +02:00
parent 816f004bf1
commit 874fb36d6b
6 changed files with 46 additions and 23 deletions

View File

@ -277,6 +277,15 @@ $config['FOUR_EYES_LOGIN_FOR_AUDITOR'] = 0;
$config['MEMCACHED_PREFIX'] = '_piler:'; $config['MEMCACHED_PREFIX'] = '_piler:';
$config['MEMCACHED_TTL'] = 900; $config['MEMCACHED_TTL'] = 900;
$config['JS_CODE'] = '
<script src="//code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
<script src="//stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<script type="text/javascript" src="/view/javascript/rc-splitter.js"></script>
<script type="text/javascript" src="/view/javascript/piler.js"></script>
';
$SUPPRESS_RECIPIENTS = array(); $SUPPRESS_RECIPIENTS = array();

View File

@ -75,6 +75,9 @@ class ControllerLoginLogin extends Controller {
if(isAdminUser() == 1) { if(isAdminUser() == 1) {
header("Location: " . SITE_URL . "index.php?route=health/health"); header("Location: " . SITE_URL . "index.php?route=health/health");
exit; exit;
} else ifisAdminUser() == 4) {
header("Location: " . SITE_URL . "index.php?route=audit/removal");
exit;
} }
header("Location: " . SITE_URL . "search.php"); header("Location: " . SITE_URL . "search.php");

View File

@ -34,9 +34,9 @@ class ControllerMessageBulkremove extends Controller {
} }
if(NEED_TO_APPROVE_DELETE) { if(NEED_TO_APPROVE_DELETE) {
$deleted = 0;
} else {
$deleted = -1; $deleted = -1;
} else {
$deleted = 1;
} }
foreach($idlist as $id) { foreach($idlist as $id) {

View File

@ -9,7 +9,7 @@ class ModelAuditRemoval extends Model {
if($page_len > 0) { $limit = " LIMIT " . (int)$from . ", " . (int)$page_len; } if($page_len > 0) { $limit = " LIMIT " . (int)$from . ", " . (int)$page_len; }
$query = $this->db->query("SELECT * FROM " . TABLE_DELETED . " WHERE deleted=-1 ORDER BY date1 DESC $limit"); $query = $this->db->query("SELECT * FROM " . TABLE_DELETED . " WHERE deleted=-1 ORDER BY date1 DESC $limit");
return $query->rows; return $query->rows;
} }

View File

@ -13,7 +13,7 @@
<a xid="user" xorder="0" onclick="Piler.changeOrder(this);"><i class="icon-chevron-down"></i></a> <a xid="user" xorder="0" onclick="Piler.changeOrder(this);"><i class="icon-chevron-down"></i></a>
</th> </th>
<th class="auditcell action header"> <th class="auditcell action header">
<?php print $text_delete; ?> <?php print $text_delete_reason; ?>
<a xid="action" xorder="1" onclick="Piler.changeOrder(this);"><i class="icon-chevron-up"></i></a> <a xid="action" xorder="1" onclick="Piler.changeOrder(this);"><i class="icon-chevron-up"></i></a>
<a xid="action" xorder="0" onclick="Piler.changeOrder(this);"><i class="icon-chevron-down"></i></a> <a xid="action" xorder="0" onclick="Piler.changeOrder(this);"><i class="icon-chevron-down"></i></a>
</th> </th>
@ -31,18 +31,18 @@
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php $i=0; foreach ($data as $d) { $i++; ?> <?php $i=0; foreach ($data as $d) { $i++; ?>
<tr class="resultrow<?php if($i % 2) { ?> odd<?php } ?>"> <tr class="resultrow<?php if($i % 2) { ?> odd<?php } ?>">
<td class="auditcell date"><?php print date(DATE_TEMPLATE . " H:i", $d['date1']); ?></td> <td class="auditcell date"><?php print date(DATE_TEMPLATE . " H:i", $d['date1']); ?></td>
<td class="auditcell user"><?php print $d['email']; ?></td> <td class="auditcell user"><?php print $d['requestor']; ?></td>
<td class="auditcell date"><?php print $d['deleted']; ?></td> <td class="auditcell date"><?php print $d['reason1']; ?></td>
<td class="auditcell ip"><?php print $d['reason']; ?></td> <td class="auditcell ip"><?php print $d['reason2']; ?></td>
<td class="auditcell ref"><?php if($d['deleted'] == 0) { ?><a href="#" onclick="Piler.view_message(<?php print $d['id']; ?>);"><?php } print $d['id']; if($d['deleted'] == 0) { ?></a><?php } ?></td> <td class="auditcell ref"><?php if($d['deleted'] == -1) { ?><a href="#" onclick="Piler.view_message(<?php print $d['id']; ?>);"><?php } print $d['id']; if($d['deleted'] == 0) { ?></a><?php } ?></td>
<td class="auditcell aaa"><a href="#" data-toggle="modal" data-target="#exampleModal" data-id="<?php print $d['id']; ?>" data-whatever="zzzz"><i class="icon-remove-sign"></i>&nbsp;<?php print $text_remove; ?></a></td> <td class="auditcell aaa"><a href="#" data-toggle="modal" data-target="#delete-approved-modal" data-id="<?php print $d['id']; ?>"><i class="icon-remove-sign"></i>&nbsp;<?php print $text_remove; ?></a></td>
<td class="auditcell aaa"><a href="#" data-toggle="modal" data-target="#exampleModal" data-id="<?php print $d['id']; ?>" data-whatever="zzzz"><i class="icon-ban-circle"></i>&nbsp;<?php print $text_cancel; ?></a></td> <td class="auditcell aaa"><a href="#" data-toggle="modal" data-target="#delete-rejected-modal" data-id="<?php print $d['id']; ?>"><i class="icon-ban-circle"></i>&nbsp;<?php print $text_cancel; ?></a></td>
</tr> </tr>
<?php } ?> <?php } ?>

View File

@ -13,18 +13,8 @@
<link href="/view/theme/default/assets/css/metro-bootstrap.css" rel="stylesheet" /> <link href="/view/theme/default/assets/css/metro-bootstrap.css" rel="stylesheet" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <?php print JS_CODE; ?>
<!-- original location: http://html5shim.googlecode.com/svn/trunk/html5.js -->
<!--[if lt IE 9]>
<script src="/view/theme/default/assets/js/html5.js"></script>
<style>body{padding-top:70px;}</style>
<![endif]-->
<script type="text/javascript" src="/view/javascript/jquery.min.js"></script>
<script type="text/javascript" src="/view/javascript/jquery-ui-custom.min.js"></script>
<script type="text/javascript" src="/view/javascript/rc-splitter.js"></script>
<script type="text/javascript" src="/view/theme/default/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="/view/javascript/piler.js"></script>
<!-- Fav and touch icons --> <!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png">
@ -41,7 +31,21 @@
<div id="messagebox1" class="audit audit-info"></div> <div id="messagebox1" class="audit audit-info"></div>
<div id="deleteconfirm-modal" class="modal hide fade"> <div id="delete-approved-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="deleteApprovedLabel">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button>
<h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3>
</div>
<div class="modal-body">
<p>Remove message <span id="id1"/>?</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php print $text_close; ?></a>
<a href="#" class="btn btn-primary" id="id2"><?php print $text_delete; ?></a>
</div>
</div>
<div id="delete-rejected-modal" class="modal hide fade">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button> <button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button>
<h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3> <h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3>
@ -94,6 +98,13 @@
$(document).ready(function(){ $(document).ready(function(){
split.init(); split.init();
}); });
$('#delete-approved-modal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget)
var id = button.data('id')
$('#id1').text(id)
$('#id2').attr('href', 'index.php?route=message/remove&id=' + id + '&confirmed=1')
})
</script> </script>
<?php } ?> <?php } ?>