<?php
$this->load_template('_header.php');
$this->load_template('_top.php');
?>
<script type="text/javascript" src="<?php echo $C->SITE_URL?>themes/<?php echo $C->THEME ?>/js/js_admin.js"></script>
<script>
	var admin_norequest = '<?php echo $this->lang('admin_no_request');?>';
	var admin_txt_error_name_category = '<?php echo $this->lang('admin_pages_txterror_namesubcategory');?>';
	var msgalertdelete = '<?php echo $this->lang('admin_pages_category_txt_alertdelete');?>';
</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_pages_title');?></div>
                        
                        <div class="spaceinfo">
                        
                        	<?php $this->load_template('__admin-smenu-pages.php');?>
                    		<div class="title-bloque-subcat mrg15T mrg15B centered"><?php echo $D->namecat?></div>
                    		<div id="addcat"><span class="onlyblue hand"><?php echo $this->lang('admin_pages_categories_txt_addsubcategory'); ?></span></div>
					        <div id="form01" class="mrg20B mrg20T hide">
                            	<div class="bold mrg5B"><?php echo $this->lang('admin_pages_categories_txt_newsubcategory'); ?></div>
                                <form id="form1" name="form1" method="post" action="">
                                
                                <div class="grey1"><?php echo $this->lang('admin_pages_categories_txt_namesubcategory'); ?></div>
                                <div><input name="namecategory" type="text" id="namecategory" class="boxinput withbox" /></div>
                                                    
                                <div id="msgerror1" class="redbox"></div>
                                <div id="msgok1" class="yellowbox"></div>
                                <div class="mrg5T mrg5B">
                                	<span><input type="submit" name="bsave1" id="bsave1" value="<?php echo $this->lang('admin_pages_categories_txt_createsubcategory');?>" class="bblue hand"/></span>
                                </div>
                                
                                </form>
                                
                            </div>        
                                                
                            <?php if (empty($D->htmlSubCatPages)) {?>
                            <div class="mrg20T mrg20B"><?php echo $this->lang('admin_pages_categories_txt_nosubcategory');?></div>
                            <?php } else { ?>
                            <div class="mrg20B"><?php echo $D->htmlSubCatPages; ?></div>
                            <?php } ?>
                    
                    	</div>
                        
                    </div>
                    
				</div>

            </div>
        
        
        </div>
        
        <div class="sh"></div>
    
    </div>
            
</div>    
<script>
	$('#addcat').click(function(){
		$('#addcat').slideUp('slow', function(){
			$('#form01').slideDown('slow');
		});
		return false;
	});
	
	$('#bsave1').click(function(){
		createCategory('#msgerror1', '#bsave1', <?php echo $D->codcat?>);
		return false;
	});
</script>

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