- v1.1.0 - Redesign
This commit is contained in:
@@ -9,6 +9,14 @@ $myBiz = $bizIds
|
||||
? qall("SELECT b.*,c.name cat,COALESCE(AVG(r.rating),0) avg,COUNT(r.id) rcnt FROM businesses b JOIN categories c ON c.id=b.category_id LEFT JOIN reviews r ON r.business_id=b.id WHERE b.id IN(".implode(',',array_fill(0,count($bizIds),'?')).") GROUP BY b.id ORDER BY b.name",$bizIds)
|
||||
: [];
|
||||
$myEvents = authed() ? qall("SELECT * FROM events WHERE submitted_by=? ORDER BY created_at DESC LIMIT 10",[uid()]) : [];
|
||||
$myClaims = authed() ? qall("
|
||||
SELECT bcr.*, b.name biz_name, b.slug biz_slug
|
||||
FROM business_claim_requests bcr
|
||||
JOIN businesses b ON b.id=bcr.business_id
|
||||
WHERE bcr.user_id=?
|
||||
ORDER BY bcr.created_at DESC
|
||||
LIMIT 5
|
||||
", [uid()]) : [];
|
||||
include __DIR__.'/includes/header.php';
|
||||
?>
|
||||
<div class="page-hdr">
|
||||
@@ -19,6 +27,32 @@ include __DIR__.'/includes/header.php';
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<?php if($myClaims): ?>
|
||||
<div class="eyebrow" style="margin-bottom:1rem">BUSINESS CLAIMS</div>
|
||||
<div class="tbl-wrap" style="margin-bottom:2.5rem">
|
||||
<table class="dtbl">
|
||||
<thead><tr><th>BUSINESS</th><th>CONTACT PHONE</th><th>STATUS</th><th>SUBMITTED</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
<?php foreach($myClaims as $claim): ?>
|
||||
<tr>
|
||||
<td class="td-name"><?=e($claim['biz_name'])?></td>
|
||||
<td><?=e($claim['contact_phone'])?></td>
|
||||
<td>
|
||||
<?php $cc=['approved'=>'badge-green','pending'=>'badge-gold','rejected'=>'badge-red']; ?>
|
||||
<span class="badge <?=$cc[$claim['status']]??'badge-gray'?>"><?=strtoupper($claim['status'])?></span>
|
||||
<?php if($claim['status']==='pending'): ?>
|
||||
<div style="font-size:.76rem;color:var(--text-d);margin-top:.2rem">We will contact you within a few business days for verification.</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=ago($claim['created_at'] ?? '')?></td>
|
||||
<td><a href="/business.php?slug=<?=e($claim['biz_slug'])?>" class="btn btn-xs btn-outline">View Page</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($myBiz): ?>
|
||||
<div class="eyebrow" style="margin-bottom:1rem">MY BUSINESS LISTINGS</div>
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:1.4rem;margin-bottom:2.5rem">
|
||||
|
||||
Reference in New Issue
Block a user