Ejemplo n.º 1
0
 /**
  * getEntryFull($resultOfSelect)
  * To retrieve ALL the fields of one entry for the entry profile page.
  * @param type $resultOfSelect
  * @return \Entry
  */
 private function getEntryFull($resultOfSelect)
 {
     // 42,43,44
     $Entry = new Entry();
     // 45
     while ($list = mysqli_fetch_assoc($resultOfSelect)) {
         // 41
         $Entry->setEntryId($list['ent_entry_id']);
         $Entry->setEntryLanguage($list['lan_lang_name']);
         //53
         $Entry->setEntryText($list['ent_entry_text']);
         $Entry->setEntryVerbatim($list['ent_entry_verbatim']);
         $Entry->setEntryTranslit($list['ent_entry_translit']);
         $Entry->setEntryAuthenStatusId($list['ent_entry_authen_status_id']);
         $Entry->setEntryTranslOf($list['ent_entry_translation_of']);
         $Entry->setEntryUserId($list['ent_entry_creator_id']);
         $Entry->setEntryMediaId($list['ent_entry_media_id']);
         $Entry->setEntryCommentId($list['ent_entry_comment_id']);
         $Entry->setEntryRatingId($list['ent_entry_rating_id']);
         $Entry->setEntryTags($list['ent_entry_tags']);
         //$Entry->setEntryAuthorId(       $list['ent_entry_author_id']);
         $Entry->setEntryAuthors($list['ent_entry_authors']);
         $Entry->setEntrySourceId($list['ent_entry_source_id']);
         $Entry->setEntryUse($list['ent_entry_use']);
         $Entry->setEntryHttpLink($list['ent_entry_http_link']);
         $Entry->setEntryCreationDate($list['ent_entry_creation_date']);
     }
     // while
     return $Entry;
 }
Ejemplo n.º 2
0
         // 30 (?)
         $entry->setEntryText(htmlentities($_POST['text']));
         $entry->setEntryVerbatim(htmlentities($_POST['verbatim']));
         $entry->setEntryTranslit(htmlentities($_POST['translit']));
         $entry->setEntryAuthenStatusId($_POST['authen']);
         $entry->setEntryTranslOf($_POST['translOf']);
         //$entry->setEntryUserId('3');//$_POST['creator']);
         $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