<div id="one_ad_<?php echo $D->ad->code?>" class="onead">
	<div class="imgad">
    
    	<img src="<?php echo $C->SITE_URL.$C->FOLDER_ADS.'min1/'.(empty($D->ad->image)?'default.png':$D->ad->image); ?>">
        
    </div>

    <div class="info">
    	<div class="name">
        	<span class="linkblue2"><a href="<?php echo $C->SITE_URL?>dashboard/myads/a:<?php echo $D->ad->code?>"><?php echo stripslashes($D->ad->headline); ?></a></span> <?php if ($D->ad->status == 0) { ?><span class="txtsize00 red">[<?php echo $this->lang('dashboard_myads_txt_paused')?>]</span><?php } ?>
        </div>
        <div class="moreinfo">
        
        <?php if ($D->ad->status_admin == 1) { ?>
        
        	<div><?php echo $this->lang('dashboard_myads_txt_pausedbyadministrador')?></div>
        
        <?php } else { ?>
        
            <div><span class="linkblue2"><a href="<?php echo $C->SITE_URL?>dashboard/myads/edit/a:<?php echo $D->ad->code?>"><?php echo $this->lang('dashboard_myads_txt_edit');?></a></span> <span id="linkdel_<?php echo $D->ad->code?>" class="onlyblue hand mrg10L"><?php echo $this->lang('dashboard_myads_txt_delete');?></span></div>
            <?php if ($D->withPlan) { ?>
            
            	<?php if ($D->withCredit) { ?>
                
                	<?php if ($D->ad->typeaction == 1) { ?>
            
            <div class="mrg5T"><span><?php echo $this->lang('dashboard_myads_txt_purchasedimpressions')?>:</span> <span class="bold"><?php echo $D->ad->impressions_available?></span></div>
            <div class="mrg5T"><span><?php echo $this->lang('dashboard_myads_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 class="mrg5T"><span><?php echo $this->lang('dashboard_myads_txt_purchasedclics')?>:</span> <span class="bold"><?php echo $D->ad->clicks_available?></span></div>
            <div class="mrg5T"><span><?php echo $this->lang('dashboard_myads_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 } else { ?>
            
            <div class="mrg5T"><span><?php echo $this->lang('dashboard_myads_txt_balanceout')?></span> - <span class="linkblue2"><a href="<?php echo $C->SITE_URL?>dashboard/myads/activate/a:<?php echo $D->ad->code?>"><?php echo $this->lang('dashboard_myads_txt_activatead')?></a></span></div>                
                
                <?php } ?>

            
			<?php } else { ?>
            
            <div class="mrg5T"><span class="linkblue2"><a href="<?php echo $C->SITE_URL?>dashboard/myads/activate/a:<?php echo $D->ad->code?>"><?php echo $this->lang('dashboard_myads_txt_activatead')?></a></span></div>            
			
			<?php } ?>
        
		<?php } ?>
		
        </div>
        
    </div>
    <div class="sh"></div>
</div>
<script>
	$('#linkdel_<?php echo $D->ad->code?>').click(function(){ 
		deleteAd('#one_ad_<?php echo $D->ad->code?>', '<?php echo $D->ad->code?>');
		return false;
	});
</script>