<!-- Script PHP/MYSQL of management of classifieds ads developed by Script PAG. Script PAG all rights reserved. Use under license. http://www.script-pag.com -->
<div class="internal-body">
	
	<p class="header-internal-body"><?php if(!empty($_GET['id_cat'])) echo $language_adm['page_crea_subcat_info']; else echo $language_adm['page_crea_cat_info']; ?></p>
	
	<div class="body-internal-body form">
	
		<?php if(!empty($error) && $error == 1) echo '<p class="error">'. $language_adm['page_crea_cat_error'] .'</p>'; ?>
	
		<form method="post" action="<?php echo $action; ?>">
			<div>
			<?php
			
				if(!empty($_GET['id_cat']))
				echo '<input type="hidden" name="id_cat" value="'. $_GET['id_cat'] .'" />';
				
				foreach($cache_lang as $row)
				{
					$id_lang = (int) $row['id_lang'];
					$code_lang = stripslashes(htmlspecialchars($row['code_lang'], ENT_QUOTES));
					$active = (int) $row['active'];
					
					if($active == 1)
					{
					?>
					<div class="flex-container div-form">
						<p class="title"><?php if(!empty($_GET['id_cat'])) echo $language_adm['page_crea_subcat_name']; else echo $language_adm['page_crea_cat_name']; echo ' <span class="uppercase">'. $code_lang .'<span>'; ?></p>
						<div>
							<input type="hidden" name="<?php echo $code_lang; ?>" value="<?php echo $code_lang; ?>" />
							<input type="text" name="name_<?php echo $id_lang; ?>" value="<?php if(isset($_POST['name_'. $id_lang])) echo htmlspecialchars($_POST['name_'. $id_lang]); ?>" />
						</div>
					</div>
					<?php
					}
				}
					
			?>
			</div>
			
			<div class="input-submit"><input type="submit" value="<?php echo $language_adm['bt_link_submit']; ?>" /></div>
		
		</form>
		
	</div>
</div>