管理機能から特定のアカウントを非表示にする必要があります。
現在、管理者用に eash アカウントがリストされています。ただし、たとえば gmail.com で終わるすべてのメールは、他のメールと一緒にリストするように依頼するまで非表示にします。
これは私が持っている電子メールのコードです:
if(empty($resLine['ord_conEmail'])){
$resLine['ord_conEmail'] = "Account {$resLine['ord_account']}";
}
コードの大きい方は次のとおりです。
$buffer .= "
<div id=\"catDetail\">
<h1>Orders Listing$pnStr</h1>
<div>
<table class=\"roundTableFormat\">
<thead>
<tr>
<th>Order ID</th>
<th>Order Date</th>
<th>Cust. Email Address</th>
<th>Order Total</th>
<th>Actions</th>
</tr>
</thead>
<tbody>";
forEach($res as $resLine){
if($resLine['ord_date'] > mktime() - 86400){
//24 hours
$resLine['ord_date'] = date("D jS - g:iA", $resLine['ord_date']);
}else if($resLine['ord_date'] > mktime() - 259200){
//OLD:display Day of Week for last five days (60*60*24*5=432000 sec
//New: 3 days = 259200
$resLine['ord_date'] = date("D jS - g:iA", $resLine['ord_date']);
}else{
//display full date
$resLine['ord_date'] = date("M j, Y", $resLine['ord_date']);
}
$resLine['ord_total'] = "$".number_format($resLine['ord_total'], 2);
if(empty($resLine['ord_conEmail'])){
$resLine['ord_conEmail'] = "Account {$resLine['ord_account']}";
}
$buffer .= "
<tr>
<td class=\"ds br\">{$resLine['ord_id']}</td>
<td class=\"al ls br\">{$resLine['ord_date']}</td>
<td class=\"al ls\">{$resLine['ord_conEmail']}</td>
<td class=\"ar bl br\">{$resLine['ord_total']}</td>
<td class=\"ds \">
<a href=\"?action=orders&ordview={$resLine['ord_id']}\">View</a>
<a href=\"?action=orders&ordprint={$resLine['ord_id']}\">Print</a>
</td>
</tr>";
}
特定のメールが表示されないようにするループを作成するにはどうすればよいですか?