<div id="one_ad_<?php echo $D->ad->idad?>" class="onead">
	<div class="imgad">
		<?php if (empty($D->ad->image)) { ?>
        <img src="<?php echo $C->SITE_URL.'themes/'.$C->THEME.'/imgs/icoads-default.png'; ?>">
        <?php } else { ?>
        <img src="<?php echo $C->SITE_URL.$C->FOLDER_ADS.'min2/'.$D->ad->image; ?>">
        <?php } ?>
    </div>

    <div class="info">
    	<div class="name">
        	<span class="linkblue2"><a href="<?php echo $C->SITE_URL?>admin/ads/a:<?php echo $D->ad->code?>"><?php echo stripslashes($D->ad->headline); ?></a></span>       
        </div>
        <div class="moreinfo">
        
            		<?php if ($D->ad->status==2) { ?>
            <div><span class="red bold"><?php echo $this->lang('admin_ads_userads_deletedbyuser')?></span></div>
                    <?php } ?>
                    
					<?php if ($D->ad->status==0) { ?>
            <div><span class="orange italica"><?php echo $this->lang('admin_ads_userads_pausedbyuser')?></span></div>
                    <?php } ?>

            		<?php if ($D->ad->status_admin == 1) { ?>
            <div><span class="orange italica"><?php echo $this->lang('admin_ads_userads_pausedbyadmin')?></span></div>
                    <?php } ?>

			
            <?php if ($D->withPlan) { ?>
            
            	<?php if ($D->withCredit) { ?>
                
                	<?php if ($D->ad->typeaction == 1) { ?>
            
            <div><span><?php echo $this->lang('admin_ads_userads_txt_purchasedimpressions')?>:</span> <span class="bold"><?php echo $D->ad->impressions_available?></span></div>
            <div><span><?php echo $this->lang('admin_ads_userads_txt_impressionsavailable')?>:</span> <span class="bold"><?php echo (($D->ad->impressions_available - $D->ad->num_impressions_unique) <= 0 ? 0 : ($D->ad->impressions_available - $D->ad->num_impressions_unique))?></span></div>
            
            		<?php } ?>
                    
                	<?php if ($D->ad->typeaction == 2) { ?>
            
            <div><span><?php echo $this->lang('admin_ads_userads_txt_purchasedclics')?>:</span> <span class="bold"><?php echo $D->ad->clicks_available?></span></div>
            <div><span><?php echo $this->lang('admin_ads_userads_txt_clicsavailable')?>:</span> <span class="bold"><?php echo (($D->ad->clicks_available - $D->ad->num_clicks_unique) <= 0 ? 0 : ($D->ad->clicks_available - $D->ad->num_clicks_unique))?></span></div>
            
            		<?php } ?>
            
            		<?php if ($D->ad->last_assignedby==1) { ?>
            <div><span class="grey1 italica"><?php echo $this->lang('admin_ads_userads_txt_assignedbyadmin')?></span></div>
                    <?php } ?>

            		<?php if ($D->ad->last_assignedby==2) { ?>
            <div><span class="grey1 italica"><?php echo $this->lang('admin_ads_userads_txt_assignedbypaypal')?></span></div>
                    <?php } ?>
                    
            <div class="mrg5T"><span class="linkblue2"><a href="<?php echo $C->SITE_URL?>admin/ads/assignplan/a:<?php echo $D->ad->code?>"><?php echo $this->lang('admin_ads_userads_txt_assignotherplan');?></a></span></div>

                
                <?php } else { ?>
            
            <div class=""><span><?php echo $this->lang('admin_ads_userads_txt_balanceout')?></span> - <span class="linkblue2"><a href="<?php echo $C->SITE_URL?>admin/ads/assignplan/a:<?php echo $D->ad->code?>"><?php echo $this->lang('admin_ads_userads_txt_assignotherplan');?></a></span></div>                
                
                <?php } ?>

            
			<?php } else { ?>
            
            <div class=""><span class="linkblue2"><a href="<?php echo $C->SITE_URL?>admin/ads/assignplan/a:<?php echo $D->ad->code?>"><?php echo $this->lang('admin_ads_userads_txt_assignplan');?></a></span></div>            
			
			<?php } ?>
            
		</div>
    </div>
    <div class="sh"></div>
</div>
<script>

</script>