ACC SHELL

Path : /srv/www/vhosts/unitedsolution/admin/page/
File Upload :
Current File : /srv/www/vhosts/unitedsolution/admin/page/category.php

<?php

$category = new category;

if($_POST['button'] == 'ulozit'){
	
	$category->add($_POST['name']);

}

if($_GET['button'] == 'delete'){
	
	$category->delete($_GET['id']);

}

echo '<h1 class="page_show_h">Statické stránky</h1>';

?>

<form id="add_category" name="category" method="post" action="default.php?page=page/category">
	<label for="name_category">Jméno kategorie: </label><input type="text" name="name" id="name_category" />
	<input type="hidden" name="button" value="ulozit" />
	<input name="button" id="button_category_position" type="image" src="img/Save.jpg" title="Uložit" value="ulozit" />
<?php
	
echo '<span class="msg_page_category2">'.$category->msg.'</span></form>';

$category->show();

for($i=0;$i<count($category->id);$i++){
	
	echo 	'<div class="category">'.
				'<div class="category_name">'.$category->name[$i].'</div>'.
				'<div><a href="default.php?page=page/category_edit&amp;id='.$category->id[$i].'"><img border="0" src="img/edit.jpg" alt="Upravit" title="Upravit" /></a></div>'.
				'<div><a href="default.php?page=page/category&amp;button=delete&amp;id='.$category->id[$i].'"><img src="img/del.jpg" alt="Smazat" border="0" title="Smazat" /></a></div>'.			
			'</div>'.
			'<div class="clear"></div>';

}

?>

ACC SHELL 2018