function postDrop($post_id) { global $database_cfg; if (postExistsById($post_id)) { databaseQuery("delete from " . $database_cfg["prefix"] . "posts where id='" . intval($post_id) . "'", "Can't delete post"); } }
echo "Your last visit: " . stringDecode($user["last_visit"]) . "<br /><br />"; echo "<a href=index.php?profile>Profile</a><br />"; echo "<a href=index.php?logout>Logout</a>"; } ?> </div> <div class="menu_bottom"></div> </div> <div id="content_container"> <div class="content"> <?php if (isset($_GET["editpost"])) { $post = postGetById(intval($_GET["post_id"])); if (postExistsById($post["id"])) { echo "<form action=\"index.php?changepost&post_id=" . $_GET["post_id"] . "\" method=\"post\">"; echo "Message:<br /><textarea name=\"message\">" . stringDecode($post["message"]) . "</textarea><br /><br />"; echo "<input type=\"submit\" value=\"Save\" />"; echo "</form>"; } } else { if (isset($_GET["find"])) { $res2 = topicSearchByTitle(stringEncode($_POST["query"])); $res4 = postSearchByMessage(stringEncode($_POST["query"])); $res5 = userSearchByEmail(stringEncode($_POST["query"])); $res6 = userSearchByNickname(stringEncode($_POST["query"])); $res7 = groupSearchByName(stringEncode($_POST["query"])); $user = userGetLoggedIn(); echo "<h1>Search results</h1><br />"; echo "<br /><p class=\"item_top\">Topic search results: " . count($res2) . "</p>";