我有这个查询
$result = select_query("tblemails", "", array("userid" => $userid), "id", "DESC", "0,5");
$lastfivemail = array();
while ($data = mysql_fetch_array($result))
{
$lastfivemail[] = array("id" => $data["id"], "processtime" => $data["processtime"], "date" => frommysqldate($data["date"], "time"), "subject" => $data["subject"] ? $data["subject"] : "No Subject");
continue;
}
$templatevars["lastfivemail"] = $lastfivemail;
和这个
"processtime" => $data["processtime"]
以秒为单位带来发送电子邮件所需的时间。
我需要以分钟:秒的格式显示它。
这是聪明的一面
<div class="clientssummarybox">
<div class="title">{$_ADMINLANG.clientsummary.emailsheading}</div>
<table class="clientssummarystats" cellspacing="0" cellpadding="2">
{foreach key=num from=$lastfivemail item=email}
<tr class="{cycle values=",altrow"}"><td align="center">{$email.date} - <a href="#" onClick="window.open('clientsemails.php?&displaymessage=true&id={$email.id}','','width=650,height=400,scrollbars=yes');return false">{$email.subject}</a></td><td>{$email.processtime}</td></tr>
{foreachelse}
<tr><td align="center">{$_ADMINLANG.clientsummary.noemails}</td></tr>
{/foreach}
</table>
</div>
</td><td width="25%" valign="top">
谢谢