$entry->setEntryUserId($user_id); $entry->setEntryMediaId('1'); //($_POST['media_id']); $entry->setEntryCommentId('2'); //$_POST['comment_id']; $entry->setEntryRatingId('1'); //($_POST['rating_id']); $entry->setEntryTags(htmlentities($_POST['tags'])); $entry->setEntryAuthors(htmlentities($_POST['authors'])); $entry->setEntrySourceId('1'); //$_POST['source']); $entry->setEntryUse(htmlentities($_POST['use'])); $entry->setEntryHttpLink(htmlentities(str_replace("watch?v=", "v/", $_POST['link']))); //43 $entry->setEntryCreationDate(date("Y-m-d H:i:s")); $id = $em->createEntry($entry); // 13 // 52* //header("Location: index.php?id=" . $id); // 31 echo "<script type='text/javascript'>\n window.onload = function () { \n top.location.href = 'entryview.php?id={$id}'; \n };\n </script>"; } // 16 } else { // if user's input is invalid if (isset($_GET['id'])) { if (isset($_GET['a'])) { // 48* $em = new EntryManager(); // 12 $dad = $em->getEntryById($_GET['id']); // 36