mirror of
				https://bitbucket.org/jsuto/piler.git
				synced 2025-10-31 18:12:26 +01:00 
			
		
		
		
	| @@ -75,6 +75,9 @@ class ControllerLoginLogin extends Controller { | ||||
|                   if(isAdminUser() == 1) { | ||||
|                      header("Location: " . SITE_URL . "index.php?route=health/health"); | ||||
|                      exit; | ||||
|                   } else ifisAdminUser() == 4) { | ||||
|                      header("Location: " . SITE_URL . "index.php?route=audit/removal"); | ||||
|                      exit; | ||||
|                   } | ||||
|  | ||||
|                   header("Location: " . SITE_URL . "search.php"); | ||||
|   | ||||
| @@ -34,9 +34,9 @@ class ControllerMessageBulkremove extends Controller { | ||||
|       } | ||||
|  | ||||
|       if(NEED_TO_APPROVE_DELETE) { | ||||
|          $deleted = 0; | ||||
|       } else { | ||||
|          $deleted = -1; | ||||
|       } else { | ||||
|          $deleted = 1; | ||||
|       } | ||||
|  | ||||
|       foreach($idlist as $id) { | ||||
|   | ||||
| @@ -9,7 +9,7 @@ class ModelAuditRemoval extends Model { | ||||
|       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"); | ||||
|        | ||||
|  | ||||
|       return $query->rows; | ||||
|    } | ||||
|  | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|              <a xid="user" xorder="0" onclick="Piler.changeOrder(this);"><i class="icon-chevron-down"></i></a> | ||||
|           </th> | ||||
|           <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="0" onclick="Piler.changeOrder(this);"><i class="icon-chevron-down"></i></a> | ||||
|           </th> | ||||
| @@ -31,18 +31,18 @@ | ||||
|           </th> | ||||
|        </tr> | ||||
|     </thead> | ||||
|     | ||||
|  | ||||
|     <tbody> | ||||
|  | ||||
| <?php $i=0; foreach ($data as $d) { $i++; ?> | ||||
|          <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 user"><?php print $d['email']; ?></td> | ||||
|             <td class="auditcell date"><?php print $d['deleted']; ?></td> | ||||
|             <td class="auditcell ip"><?php print $d['reason']; ?></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 aaa"><a href="#" data-toggle="modal" data-target="#exampleModal" data-id="<?php print $d['id']; ?>" data-whatever="zzzz"><i class="icon-remove-sign"></i> <?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> <?php print $text_cancel; ?></a></td> | ||||
|             <td class="auditcell user"><?php print $d['requestor']; ?></td> | ||||
|             <td class="auditcell date"><?php print $d['reason1']; ?></td> | ||||
|             <td class="auditcell ip"><?php print $d['reason2']; ?></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="#delete-approved-modal" data-id="<?php print $d['id']; ?>"><i class="icon-remove-sign"></i> <?php print $text_remove; ?></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> <?php print $text_cancel; ?></a></td> | ||||
|  | ||||
|          </tr> | ||||
| <?php } ?> | ||||
|   | ||||
| @@ -13,18 +13,8 @@ | ||||
|  | ||||
|     <link href="/view/theme/default/assets/css/metro-bootstrap.css" rel="stylesheet" /> | ||||
|  | ||||
|     <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> | ||||
|     <!-- 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]--> | ||||
|     <?php print JS_CODE; ?> | ||||
|  | ||||
|     <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 --> | ||||
|     <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"> | ||||
| @@ -41,7 +31,21 @@ | ||||
|  | ||||
|     <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"> | ||||
|         <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> | ||||
| @@ -94,6 +98,13 @@ | ||||
|    $(document).ready(function(){ | ||||
|       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> | ||||
|  | ||||
| <?php } ?> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user