if (@$_POST['edit'] == 'edit_topic') { if (!empty($_POST['name']) && !empty($_POST['description'])) { if (!$section->editTopic($_POST['id_topic'], $_POST['name'], $_POST['description'])) { print "Topic edited with success.<br />"; print '<meta http-equiv="refresh" content="3;url=viewTopic.php?id=' . $_POST['id_topic'] . '" />'; } } } } elseif ($action == 5) { if (empty($_GET['id'])) { die("ID NON specificato!"); } if ($section->deleteTopic($_GET['id']) == TRUE) { print "Topic deleted with success.<br />"; print '<meta http-equiv="refresh" content="3;url=index.php" />'; } } elseif ($action == 6) { if (empty($_GET['id'])) { die("ID NON specificato!"); } if ($section->deletePost($_GET['id']) == TRUE) { print "Post deleted with success.<br />"; print '<meta http-equiv="refresh" content="3;url=index.php" />'; } } } else { print "You aren't admin.<br />"; } print $template->closeDiv(); print $template->closeBody();