
<h3><?php echo L_G_PZONE_FLINKS; ?></h3>
<div style="width:500px;"><p><?php echo L_G_PZONE_FLINKS_DESC; ?></p></div>

<form class="mt10" action="index.php" method="get">
    <input type="hidden" name="md" value="Affiliate_Merchants_Views_PZoneFriendLinks" />
    <input type="hidden" name="action" value="add" />
    <input type="submit" class="btn" value="<?php echo L_G_PZONE_ADDFLINK; ?>" />
</form>
<div class="clear"></div>

<!-- Search Form Begin -->
<form method="GET" action="index.php">
<input type="hidden" name="md" value="Affiliate_Merchants_Views_PZoneFriendLinks" />
<table class="listing tb2 mt10" width="320px" cellpadding="0" cellspacing="0" border="0">
<tr><td class="tableheader" colspan="2"><b><?php echo L_G_FILTER; ?></b></td></tr>

<tr>
    <td class="listheaderNoLineLeft"><b><?php echo L_G_PZONE_SITETITLE; ?></b><?php showQuickHelp(L_G_PZONE_HLP_SITETITLE); ?></td>
    <td class="listheaderNoLineLeft"><input type="text" name="sitetitle" value="<?php echo $_GET['sitetitle']; ?>" /></td>
</tr>

<tr>
    <td class="listheaderNoLineLeft"><b><?php echo L_G_STATUS; ?></b><?php showQuickHelp(L_G_PZONE_HLP_STATUSSEARCH); ?></td>
    <td class="listheaderNoLineLeft"><?php echo $this->statusComboboxString; ?></td>
</tr>

<tr>
    <td class="listheaderNoLineLeft" colspan="2"><center>
        <input class="formbutton" type="submit" value="<?php echo L_G_FILTER; ?>" />
    </center></td>
</tr>

</table>
</form>
<!-- Search Form End -->

<form id="listform" action="" method="POST">
<table class="tblist mt10" cellspacing="0" cellpadding="0" border="0" width="780">
<tr class="header">
    <td width="8%" align="center"><?php echo L_G_SELSELECT; ?></td>
    <td width="26%"><?php echo L_G_PZONE_FLINKSTITLE; ?></td>
    <td width="43%">LOGO</td>
    <td width="15%" align="center"><?php echo L_G_PZONE_ADDTIME; ?></td>
    <td width="8%" align="center"><?php echo L_G_ACTION; ?></td>
</tr>
<?php
$tr = '<tr onMouseover="this.className=\'listresultMouseOver\'" onMouseOut="this.className=\'listresult\';" class="detailrow%s"><td align="center"><input class="checkbox" type="checkbox" value="%s" name="checkeditems[]" /></td><td>%s</td><td valign="top">%s</td><td align="center">%s</td><td align="center"><a href="index.php?md=Affiliate_Merchants_Views_PZoneFriendLinks&action=edit&id=%s" title="'.L_G_EDIT.'"><img  src="'.QUnit_UI_TemplatePage::getImage('edit.gif').'" />'.'</a></td></tr>';
foreach($this->listdata as $key=>$row) {
    $i = $key%2;
    $rstatustring = $row['rstatus']=='show'?L_G_DISPLAY:($row['rstatus']=='show2nav'?L_G_PZONE_SHOW2NAV:L_G_HIDDEN);
    if(empty($row['logourl'])) {
        $logourl = '';
        $imglogo = '无';
    }else {
        $logourl = '<br /><span style="color:gray;">['.cut_str(strip_tags($row['logourl']),70).']';
        $imglogo = '<a href="'.$row['logourl'].'" target="_blank"><img src="'.$row['logourl'].'" width="80" height="30" /></a>';
    }
    echo sprintf($tr,
        $i,
        $row['ID'],
        '<a href="'.$row['siteurl'].'" target="_blank"><b>'.htmlspecialchars($row['sitetitle']).'</b></a><br /><span style="color:gray;">['.$rstatustring.']</span>',
        $imglogo.$logourl,
        $row['dateinserted'],
        $row['ID']
    );
}
?>
<tr class="header">
<td width="49%" colspan="2" style="border-color:#B3CED9;">
<a id="selectall" href="javascript:;"><?php echo L_G_SELALL; ?></a> /
<a id="unselectall" href="javascript:;"><?php echo L_G_SELNONE; ?></a> /
<a id="antiselect" href="javascript:;"><?php echo L_G_ANISEL; ?></a>
<a id="delete" href="javascript:;"><?php echo L_G_DELSEL; ?></a>
<input type="hidden" value="yes" name="commited" />
<input type="hidden" value="delete" name="action" />
</td>
<td width="49%" colspan="3" style="border-color:#B3CED9;" align="right">
 <?php echo sprintf(L_G_PAGENAV,$this->page,$this->totalpage,$this->limit,$this->total); ?>
<a href="index.php?md=Affiliate_Merchants_Views_PZoneFriendLinks&page=<?php echo $this->page-1;echo $this->searchlink;?>"><?php echo L_G_PREPAGE; ?></a>
<a href="index.php?md=Affiliate_Merchants_Views_PZoneFriendLinks&page=<?php echo $this->page+1;echo $this->searchlink;?>"><?php echo L_G_NEXTPAGE; ?></a> <input id="gopage" type="text" value="<?php echo $this->page+1;?>" style="width:32px;text-align:center;" />
<a id="jumpage" href="javascript:;"><?php echo L_G_REDIRECT;?></a></td>
</tr>
</table></form>