<?php
$this->load_template('_header.php');
$this->load_template('_top.php');
?>
<script>
var admin_norequest = '<?php echo $this->lang('admin_no_request');?>';
var msgalertdelete = '<?php echo $this->lang('admin_ads_plans_txt_alertdelete');?>';
</script>
<script type="text/javascript" src="<?php echo $C->SITE_URL?>themes/<?php echo $C->THEME ?>/js/js_admin.js"></script>
<div id="generalspace">
        
    <div id="container">
    
    	<div id="column1-admin"><?php $this->load_template('_verticalmenu-admin.php'); ?></div>
        
        <div id="column2-admin">
		
            <div id="dashboard-admin2">
                
                <div class="editarea">
                	
                    <div class="boxdash">
                
	                    <div class="title"><?php echo $this->lang('admin_ads_title');?></div>
                        
                        <div class="spaceinfo">
                    
							<?php $this->load_template('__admin-smenu-ads.php');?>
                            
                            

							<div id="formadd" class="hide mrg20T">                                
                                
								<div class="editarea">
                                    
                                    <div class="subtitle"><?php echo $this->lang('admin_ads_plans_txt_createplans'); ?></div>
                
                                    <div id="form01" class="mrg30B">
                                        <form id="form1" name="form1" method="post" action="">
                                        <div class="mrg10T grey1"><?php echo $this->lang('admin_ads_plans_txt_planname')?>:</div>
                                        <div><input name="nameplan" type="text" id="nameplan" class="boxinput withbox"/></div>

                                        <div class="mrg10T grey1"><?php echo $this->lang('admin_ads_plans_txt_action')?></div>
                                        <div><select name="actionplan" id="actionplan" class="boxinput withbox" style="width:150px;">
                                            <option value="1"><?php echo $this->lang('admin_ads_plans_txt_impressions')?></option>
                                            <option value="2"><?php echo $this->lang('admin_ads_plans_txt_clicks')?></option>
                                        </select></div>

                                        <div class="mrg10T grey1"><?php echo $this->lang('admin_ads_plans_txt_quantity')?>:</div>
                                        <div><input name="quantity" type="text" id="quantity" class="boxinput withbox" style="width:100px;"/></div>

                                        <div class="mrg10T grey1"><?php echo $this->lang('admin_ads_plans_txt_priceplan')?> (<?php echo $this->lang('admin_ads_plans_txt_currency')?>):</div>
                                        <div><input name="priceplan" type="text" id="priceplan" class="boxinput withbox" style="width:100px;"/></div>

                                        <div id="msgerror" class="redbox"></div>
                                        <div class="mrg20T mrg5B">
                                            <span><input type="submit" name="bsave" id="bsave" value="<?php echo $this->lang('admin_ads_plans_txt_bsubmit')?>" class="bblue hand"/></span> <span id="lcancelf" class="mrg20L onlyblue hand"><?php echo $this->lang('admin_ads_plans_txt_bcancel'); ?></span>
                                        </div>
                  
                                      </form>
                                    </div>
                                
                                </div>
                                
                                
                            </div>
                            
                            
                            <?php if (empty($D->htmlPlans)) { ?>
                            
                            <div id="spacelink" class="centered mrg40T mrg30B">
                                <div class="txtsize01"><?php echo $this->lang('admin_ads_plans_txt_noplans'); ?></div>
                                
                                <div class="mrg10T"><span id="linkadd" class="onlyblue hand txtsize01"><?php echo $this->lang('admin_ads_plans_txt_createplans')?></span></div>
                            </div>
                            
                            <?php } else { ?>
                            
                            <div id="spacelink" class="mrg10T tright"><span id="linkadd" class="onlyblue hand txtsize00"><?php echo $this->lang('admin_ads_plans_txt_createplans')?></span></div>
                            
                            <div class="mrg10T"><?php echo $D->htmlPlans?></div>
                            
                            <?php } ?>
                            
							<script>                                
								var error_planname = '<?php echo $this->lang('admin_ads_plans_error_planname')?>';
								var error_quantity = '<?php echo $this->lang('admin_ads_plans_error_quantity')?>';
								var error_quantitynumber = '<?php echo $this->lang('admin_ads_plans_error_quantitynumber')?>';
								var error_price = '<?php echo $this->lang('admin_ads_plans_error_price')?>';
								var error_pricenumber = '<?php echo $this->lang('admin_ads_plans_error_pricenumber')?>';
                                $('#bsave').click(function(){
                                    createPlan('#msgerror', '#bsave');
                                    return false;
                                });	
                                
                                $('#linkadd').click(function(){
                                    $('#spacelink').slideUp('low',function(){
                                        $('#formadd').slideDown('low');
                                    });
                                })
                            
                                $('#lcancelf').click(function(){
                                    $('#formadd').slideUp('low',function(){
                                        $('#spacelink').slideDown('low');
                                    });
                                })
                            </script>

                    
                    	</div>
                        
                    </div>
                    
				</div>

            </div>
        
        
        </div>
        
        <div class="sh"></div>
    
    </div>
            
</div> 

 

<?php
$this->load_template('_foot.php');
$this->load_template('_footer.php');
?>