<?php
require_once __DIR__.'/../includes/functions.php';
$admin=require_admin(); mj_review_ensure_schema();
$adminTitle='Update Review Center'; $adminSubtitle='One place to review user changes for listings, companies and deals.';
$cards=[
 ['Listing Updates','Old listing stays live until approved.','listing-revisions.php','fas fa-tags','warning',mj_review_pending_count('listing')],
 ['Company Updates','Old company profile stays live until approved.','company-revisions.php','fas fa-building','info',mj_review_pending_count('company')],
 ['Deal Updates','Old deal remains visible until approved.','deal-revisions.php','fas fa-fire','danger',mj_review_pending_count('deal')],
];
include __DIR__.'/_header.php';
?>
<div class="alert alert-info"><b>Safe update rule:</b> active listings, companies and deals are not overwritten by user edits. Admin reviews old vs new and approves or rejects.</div>
<div class="row">
<?php foreach($cards as $c): ?>
  <div class="col-lg-4 mb-3"><a href="<?=e($c[2])?>" class="card shadow-sm text-dark h-100"><div class="card-body d-flex align-items-center justify-content-between"><div><h4 class="font-weight-bold mb-1"><i class="<?=e($c[3])?> text-<?=e($c[4])?> mr-2"></i><?=e($c[0])?></h4><p class="text-muted mb-0"><?=e($c[1])?></p></div><span class="badge badge-<?=e($c[4])?> badge-pill p-3"><?=e($c[5])?></span></div></a></div>
<?php endforeach; ?>
</div>
<?php include __DIR__.'/_footer.php'; ?>
