{*<!--

+---------------------------------------------------------------------------+
| OpenX v2.6                                                                |
| =========                                                                 |
|                                                                           |
| Copyright (c) 2003-2008 OpenX Limited                                     |
| For contact details, see: http://www.openx.org/                           |
|                                                                           |
| This program is free software; you can redistribute it and/or modify      |
| it under the terms of the GNU General Public License as published by      |
| the Free Software Foundation; either version 2 of the License, or         |
| (at your option) any later version.                                       |
|                                                                           |
| This program is distributed in the hope that it will be useful,           |
| but WITHOUT ANY WARRANTY; without even the implied warranty of            |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
| GNU General Public License for more details.                              |
|                                                                           |
| You should have received a copy of the GNU General Public License         |
| along with this program; if not, write to the Free Software               |
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |
+---------------------------------------------------------------------------+
$Id: advertiser-index-list.html 24736 2008-08-27 11:30:00Z andrew.hill $

-->*}
<table border="0" width="100%" cellpadding="0" cellspacing="0" >
  <thead>
    <tr height="25">
        <th height="25" width="40%">
            <b>&nbsp;&nbsp;{oa_title_sort str=Name item=name order=down default=1 url=advertiser-index.php}</b>
        </th>
        {if $showAdDirect}<th>{t str=Status}</th>{/if}
        <th height='25' width="20%">&nbsp;</th>
        <th height='25' width="13%">&nbsp;</th>
        <th height='25' width="13%">&nbsp;</th>
    </tr>
    <tr class="break">
        <td colspan="6"></td>
    </tr>
  </thead>

{if !$from|@count}
  <tbody class="even">
    <tr height='25' bgcolor='#F6F6F6'>
        <td height='25' colspan='5'>&nbsp;&nbsp;{t str=$listEmptyStr|default:"NoClients"}</td>
    </tr>

    <tr class="break">
        <td colspan="6"></td>
    </tr>
  </tbody>
{else}
    {cycle name=bgcolor values="odd,even" assign=bgColor reset=1}
    {foreach key=clientId item=client from=$from}
        {cycle name=bgcolor assign=bgColor}
    <tbody class="{$bgColor}">
    	<tr height="25">
    		<td height='25'>
          <div style="float:left;padding-right: 5px;">
    		{if $client.campaigns}
    			{if $client.expand}
    			<a href='advertiser-index.php?collapse=client:{$clientId}'><img src='{$assetPath|escape}/images/triangle-d.gif' align='absmiddle' border='0'></a>
    			{else}
    			<a href='advertiser-index.php?expand=client:{$clientId}'><img src='{$assetPath|escape}/images/{$phpAds_TextDirection}/triangle-l.gif' align='absmiddle' border='0'></a>
    			{/if}
    		{else}
    			<img src='{$assetPath|escape}/images/spacer.gif' height='16' width='16' align='absmiddle'>
    		{/if}
    			<img src='{oa_icon advertiser=$client}' align='absmiddle'>
          </div>
          <div>
            <a href='advertiser-edit.php?clientid={$clientId}'>{$client.clientname|escape:html}</a>
          </div>
    		</td>

    		{if $showAdDirect}<td class="sts sts-awaiting">&nbsp;</td>{/if}

    		<td height='25' style="padding-right: 10px;">
    	       <a href='campaign-edit.php?clientid={$clientId}' title="{t str=AddCampaign}"><img src='{$assetPath|escape}/images/icon-campaign-new.gif' border='0' align='absmiddle' alt='{t str=AddCampaign}'>&nbsp;{t str=AddCampaign}</a>
    		</td>

    		<td height='25' style="padding-right: 10px;">
    			<img src='{$assetPath|escape}/images/icon-overview.gif' border='0' align='absmiddle' alt='{t str=Campaigns}'>&nbsp;<a href='advertiser-campaigns.php?clientid={$clientId}' title="{t str=CampaignOverview}">{t str=Campaigns}</a>
            </td>

    		<td height='25' style="padding-right: 10px;">
    			<img src='{$assetPath|escape}/images/icon-recycle.gif' border='0' align='absmiddle' alt='{t str=Delete}'>&nbsp;<a href='advertiser-delete.php?clientid={$clientId}&returnurl=advertiser-index.php'{phpAds_DelConfirm str=ConfirmDeleteClient}>{t str=Delete}</a>
    		</td>
    	</tr>

      {if $client.campaigns && $client.expand}
        {foreach key=campaignId item=campaign from=$client.campaigns}

      <tr>
          <td></td>
          <td colspan="5" bgcolor="#bbbbbb"></td>
      </tr>

      <tr height='25' class="data">
        <td height='25' style="padding-left: 25px; padding-right: 10px;">
          <div style="float:left;padding-right: 5px;">
          {if $campaign.banners}
              {if $campaign.expand}
            <a href='advertiser-index.php?collapse=campaign:{$clientId}-{$campaignId}'><img src='{$assetPath|escape}/images/triangle-d.gif' align='absmiddle' border='0'></a>
              {else}
            <a href='advertiser-index.php?expand=campaign:{$clientId}-{$campaignId}'><img src='{$assetPath|escape}/images/{$phpAds_TextDirection}/triangle-l.gif' align='absmiddle' border='0'></a>
              {/if}
            {else}
            <img src='{$assetPath|escape}/images/spacer.gif' height='16' width='16' align='absmiddle'>
            {/if}

            <img src='{oa_icon campaign=$campaign}' align='absmiddle'>

            </div>
            <div>
              <a href='campaign-edit.php?clientid={$clientId}&campaignid={$campaignId}'>{$campaign.campaignname|escape:html}</a>
            </div>
        </td>
        {if $showAdDirect}
        <td>
            {showStatusText status=$campaign.status an_status=$campaign.an_status clientid=$clientId campaignid=$campaignId}
        </td>
        {/if}

        <td height='25' style="padding-right: 15px;">
            <img src='{$assetPath|escape}/images/icon-banner-new.gif' border='0' align='absmiddle' alt='{t str=AddBanner}'>&nbsp;<a href='banner-edit.php?clientid={$clientId}&campaignid={$campaignId}' title="{t str=AddBanner}">{t str=AddBanner}</a>
        </td>

        <td height='25' style="padding-right: 15px;">
            <img src='{$assetPath|escape}/images/icon-overview-light.gif' border='0' align='absmiddle' alt='{t str=Banners}'>&nbsp;<a href='campaign-banners.php?clientid={$clientId}&campaignid={$campaignId}' title="{t str=BannerOverview}">{t str=Banners}</a>
        </td>

        <td height='25' style="padding-right: 15px;">
            <img src='{$assetPath|escape}/images/icon-recycle.gif' border='0' align='absmiddle' alt='{t str=Delete}'>&nbsp;<a href='campaign-delete.php?clientid={$clientId}&campaignid={$campaignId}&returnurl=advertiser-index.php'{phpAds_DelConfirm str=ConfirmDeleteCampaign}>{t str=Delete}</a>
        </td>
      </tr>

            {if $campaign.expand && $campaign.banners}
              {foreach key=bannerId item=banner from=$campaign.banners}
      <tr height='1'>
          <td><img src='{$assetPath|escape}/images/spacer.gif' width='1' height='1'></td>
          <td colspan='4' bgcolor='#888888'><img src='{$assetPath|escape}/images/break-l.gif' height='1' width='100%'></td>
      </tr>

      <tr height='25' class="data">
        <td height='25' style="padding-left: 70px">
          <div style="float:left; padding-right: 5px;">
            <img src='{oa_icon banner=$banner campaign=$campaign}' align='absmiddle'>
          </div>
          <div>
            <a href='banner-edit.php?clientid={$clientId}&campaignid={$campaignId}&bannerid={$bannerId}'>{$banner.name}</a>
          </div>
         </td>
        {if $showAdDirect}
        <td height='25'></td>
        {/if}
        <td>&nbsp;</td>
        <td height='25'>
            <img src='{$assetPath|escape}/images/icon-acl.gif' border='0' align='absmiddle' alt='{t str=ACL}'>&nbsp;<a href='banner-acl.php?clientid={$clientId}&campaignid={$campaignId}&bannerid={$bannerId}'>{t str=ACL}</a>
        </td>
        <td height='25'>
            <img src='{$assetPath|escape}/images/icon-recycle.gif' border='0' align='absmiddle' alt='{t str=Delete}'>&nbsp;<a href='banner-delete.php?clientid={$clientId}&campaignid={$campaignId}&bannerid={$bannerId}&returnurl=advertiser-index.php' {phpAds_DelConfirm str=ConfirmDeleteBanner}>{t str=Delete}</a>
        </td>
      </tr>
              {/foreach}
            {/if}
          {/foreach}
      <tr class="space">
        <td colspan="6"></td>
      </tr>
        {/if}
      <tr class="break">
        <td colspan="6"></td>
      </tr>
    </tbody>
    {/foreach}
{/if}


{if !$hide_controls}
    <tbody>
    <tr>
      <td height='25' colspan='5'>
        <div style="float:{$phpAds_TextAlignLeft}; white-space: nowrap">
          {if $hideinactive}
            &nbsp;&nbsp;<img src='{$assetPath|escape}/images/icon-activate.gif' align='absmiddle' border='0'>
            &nbsp;<a href='advertiser-index.php?hideinactive=0'>{t str=ShowAll}</a>
            &nbsp;&nbsp;|&nbsp;&nbsp;{$aCount.advertisers_hidden} {t str=InactiveAdvertisersHidden}
          {else}
            &nbsp;&nbsp;<img src='{$assetPath|escape}/images/icon-hideinactivate.gif' align='absmiddle' border='0'>
            &nbsp;<a href='advertiser-index.php?hideinactive=1'>{t str=HideInactiveAdvertisers}</a>
          {/if}
        </div>

        <div style="float:{$phpAds_TextAlignRight}; white-space: nowrap">
          <img src='{$assetPath|escape}/images/triangle-d.gif' align='absmiddle' border='0'>
          &nbsp;<a href='advertiser-index.php?expand=all' accesskey='{t key='ExpandAll'}'>{t str='ExpandAll'}</a>
          &nbsp;&nbsp;|&nbsp;&nbsp;
          <img src='{$assetPath|escape}/images/{$phpAds_TextDirection}/triangle-l.gif' align='absmiddle' border='0'>
          &nbsp;<a href='advertiser-index.php?expand=none' accesskey='{t key='CollapseAll'}'>{t str='CollapseAll'}</a>&nbsp;&nbsp;
        </div>
      </td>
    </tr>
    </tbody>
{/if}
</table>
