<?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>
<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>
                            	<div class="linkblue2 mrg10T">&laquo; <a href="<?php echo $C->SITE_URL?>admin/pages"><?php echo $this->lang('admin_txt_linkback');?></a></div>
                                <div class="mrg10T txtsize00 grey1"><?php echo $this->lang('admin_pages_update_txt_title')?></div>
                                <div class="mrg20B txtsize07 bold"><?php echo $D->titlepage?></div>
                                
                                <div id="formedit" class="mrg20T">                                
                                
									<div class="editarea">
                    
			                            <div id="form01" class="mrg30B">
            			            		<form id="form1" name="form1" method="post" action="">
                                            <div class="mrg20T grey1"><?php echo $this->lang('admin_pages_txt_category')?></div>
                                            <div><select name="pagecategory" id="pagecategory" class="boxinput withbox" onchange="loadsubcategorypages(this.value, -1, '<?php echo $this->lang('admin_pages_txt_choosesubcategory')?>','#pagesubcategory');"></select></div>
                    
                                            <div class="mrg10T grey1"><?php echo $this->lang('admin_pages_txt_subcategory')?></div>
                                            <div><select name="pagesubcategory" id="pagesubcategory" class="boxinput withbox"></select></div>

                        					<div class="mrg10T grey1"><?php echo $this->lang('admin_pages_txt_titlepage')?>:</div>
                        					<div><input name="titlepage" type="text" id="titlepage" class="boxinput withbox" value="<?php echo $D->titlepage?>"/></div>

                        					<div class="mrg10T grey1"><?php echo $this->lang('admin_pages_txt_descriptionpage')?>:</div>
                        					<div><textarea name="descriptionpage" rows="4" class="boxinput withbox" id="descriptionpage"><?php echo $D->description?></textarea></div>
                                            
                                            
                                            <div class="grey1 mrg10T"><?php echo $this->lang('admin_pages_txtverified_msg')?></div>
                                            <div class="mrg5T">
                                            <select name="pverified" id="pverified" class="boxinput withbox">
                                                <option value="1" <?php echo(1==$D->verified?'selected="selected"':'')?>><?php echo $this->lang('admin_pages_txtisverified')?></option>
                                                <option value="0" <?php echo(0==$D->verified?'selected="selected"':'')?>><?php echo $this->lang('admin_pages_txtisnotverified')?></option>
                                            </select>
                                            </div>

                                            
                                            
                                            <div class="mrg10T grey1"><?php echo $this->lang('admin_pages_txt_status')?></div>
                                            <div>
                                            <select name="statuspage" id="statuspage" class="boxinput withbox">
                                            	<option value="0" <?php echo($D->status==0?'Selected':'')?>><?php echo $this->lang('admin_pages_txt_status_inactive')?></option>
                                          		<option value="1" <?php echo($D->status==1?'Selected':'')?>><?php echo $this->lang('admin_pages_txt_status_active')?></option>
                                            </select>
                                            </div>

                                            <div id="msgerror" class="redbox"></div>
                                            <div id="msgok" class="yellowbox"></div>
                                            <div class="mrg10T mrg5B">
                                                <span><input type="submit" name="bsave" id="bsave" value="<?php echo $this->lang('admin_pages_update_txt_submitinfobasic')?>" class="bblue hand"/></span>
                                            </div>
                      
					                      </form>
                                        </div>
                                
                                    </div>
                                
                                
                                </div>                           
                            
								<script>
								var cpage = '<?php echo $D->codpage?>';                               
                                idcategory = <?php echo $D->idcategory?>;
                                idsubcategory = <?php echo $D->idsubcategory?>;
                                var msgccategories='<?php echo $this->lang('admin_pages_txt_choosecategory')?>';
                                var msgcsubcategories='<?php echo $this->lang('admin_pages_txt_choosesubcategory')?>';
                                loadcategorypages(idcategory, msgccategories, msgcsubcategories, '#pagecategory', '#pagesubcategory');
                                loadsubcategorypages(idcategory, idsubcategory, msgcsubcategories, '#pagesubcategory');
                                var txt_choose_category='<?php echo $this->lang('admin_pages_error_choosecategory')?>';
                                var txt_choose_subcategory='<?php echo $this->lang('admin_pages_error_choosesubcategory')?>';
                                var txt_enter_title='<?php echo $this->lang('admin_pages_error_entertitle')?>';
								var admin_norequest = '<?php echo $this->lang('admin_no_request');?>';
                                $('#bsave').click(function(){
                                    updatePage('#msgerror','#msgok','#bsave');
                                    return false;
                                });
    
                                </script>
                                
                    		</div>
                    	</div>
                        
                    </div>
                    
				</div>

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

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