mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-16 04:54:24 +02:00
customer inbox
This commit is contained in:
parent
1843ff222d
commit
587437c93c
6 changed files with 156 additions and 3 deletions
|
@ -45,6 +45,18 @@ switch ($action) {
|
|||
die('--');
|
||||
}
|
||||
break;
|
||||
case 'inbox_unread':
|
||||
$count = ORM::for_table('tbl_customers_inbox')->where('customer_id', $user['id'])->whereRaw('date_read is null')->count('id');
|
||||
if($count>0){
|
||||
echo $count;
|
||||
}
|
||||
die();
|
||||
case 'inbox':
|
||||
$inboxs = ORM::for_table('tbl_customers_inbox')->selects(['id', 'subject', 'date_created'])->where('customer_id', $user['id'])->whereRaw('date_read is null')->order_by_desc('date_created')->limit(10)->find_many();
|
||||
foreach($inboxs as $inbox){
|
||||
echo '<li><a href="'.U.'mail/view/'.$inbox['id'].'">'.$inbox['subject'].'<br><sub class="text-muted">'.Lang::dateTimeFormat($inbox['date_created']).'</sub></a></li>';
|
||||
}
|
||||
die();
|
||||
default:
|
||||
$ui->display('404.tpl');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue