} break; case 'category': if (!isset($_POST['cat_name'])) { category::update_category_list($_POST); header('Location: index.php?p=category'); } else { $category = new category(); $category->create_category($_POST['cat_name']); header('Location: index.php?p=category'); } break; case 'page': if (isset($_POST['page_id']) && $_POST['page_id'] != 0) { //update post::update_page($_POST['title'], htmlentities($_POST["content_code"]), $_POST["status"], $_POST['page_id']); header('Location: index.php?p=edit_page&id=' . $_POST["page_id"]); } else { //insert $post_id = post::create_page($_POST["title"], $_POST["status"], htmlentities($_POST["content_code"])); header('Location: index.php?p=edit_page&id=' . $post_id); } break; case 'comment': //létrehozunk egy új commentet comment::create_comment(nl2br($_POST["com_content"]), $_POST["post_id"]); header("Location: index.php?p=view_post&id=" . $_POST["post_id"]); break; case 'media': //új kép feltöltése if (!empty($_FILES['image'])) {