
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr><td>
<h3><?php echo L_G_COMMUNICATION; ?></h3>
<p><?php echo L_G_COMMUNICATIONDESCRIPTION_AFF; ?></p></td></tr>
</table>

<form id="listform" action="" method="POST">
<table class="tblist" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr class="header">
    <td width="25%"><?php echo L_G_TITLE.' / '.L_G_TIME; ?></td>
    <td width="10%"><?php echo L_G_TYPE; ?></td>
    <td width="10%"><?php echo L_G_SENDFROM; ?></td>
    <td width="10%"><?php echo L_G_RECIPIENT; ?></td>
    <td width="45%"><?php echo L_G_MESSAGE_TEXT; ?></td>
</tr>
<?php
$tr = '<tr onmouseout="this.className=\'listresult\';" onmouseover="this.className=\'listresultMouseOver\'" class="detailrow%s"><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s <a href="index.php?md=Affiliate_Affiliates_Views_Communications&id=%s">[详细]</a></td></tr>';
$scripts_url = urlencode($GLOBALS['Auth']->getSetting('Aff_scripts_url'));
foreach($this->listdata as $key=>$row) {
    $i = $key%2;
    echo sprintf($tr,
        $i,
        htmlspecialchars($row['title']).'<br /><i>'.$row['dateinserted'].'</i>',
        $row['rtype']==MESSAGETYPE_EMAIL?L_G_EMAIL:($row['rtype']==MESSAGETYPE_NEWS?L_G_NEWS:L_G_UNKNOWN_TYPE),
        $row['fromuser'],
        $row['touser'],
        cut_str(htmlspecialchars($row['rtext']),40),
        $row['messageid']
    );
}
?>
<tr class="header">
<td width="98%" colspan="5" align="center">
<?php
    echo sprintf(L_G_PAGENAV,$this->page,$this->totalpage,$this->limit,$this->total);
?>
<a href="index.php?md=Affiliate_Affiliates_Views_Communications&page=<?php echo $this->page-1;?>"><?php echo L_G_PREPAGE; ?></a>
<a href="index.php?md=Affiliate_Affiliates_Views_Communications&page=<?php echo $this->page+1;?>"><?php echo L_G_NEXTPAGE; ?></a> <input id="gopage" type="text" value="<?php echo $this->page+1;?>" />
<a id="jumpage" href="javascript:;"><?php echo L_G_REDIRECT; ?></a></td>
</tr>
</table></form>