本文整理汇总了PHP中EntryManager::getEntryById方法的典型用法代码示例。如果您正苦于以下问题:PHP EntryManager::getEntryById方法的具体用法?PHP EntryManager::getEntryById怎么用?PHP EntryManager::getEntryById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntryManager
的用法示例。
在下文中一共展示了EntryManager::getEntryById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: nor
require_once BUSINESS_DIR_LANG . "LanguageManager.php";
require_once BUSINESS_DIR_LANG . "Language.php";
//Check if user is logged in or not
if (!isset($_GET['id']) && !isset($_POST['id'])) {
echo "neither (GET['id']) nor (POST['id'])";
}
if (isset($_GET['id'])) {
// echo "we have GET[id], it is " . $_GET['id'] . "<br>";
$entryId = $_GET['id'];
} elseif (isset($_POST['id'])) {
echo "we have POST[id], it is " . $_POST['id'] . "<br>";
$entryId = $_POST['id'];
}
$em = new EntryManager();
$trm = new TranslationRequestManager();
$entry = $em->getEntryById($entryId);
// 1
$treqs = $trm->getTreqByEntryId($entry->getEntryId());
$lm = new LanguageManager();
$um = new UserManager();
//$userId = 3; // the id of the current logged-in user
$loggedIn_userId = "";
$loggedIn_userType = "";
$user_logged_in = true;
if (isset($_SESSION['user'])) {
$user = $_SESSION['user'];
$loggedIn_userId = $user->getUserId();
$loggedIn_userType = $user->getUserType();
//echo "logged in user id==".$loggedIn_userId;
} else {
$user_logged_in = false;
示例2: EntryManager
form_to_create_entry($err_messages);
}
}
} else {
// 17
if (isset($_GET['id'])) {
// 34
if (isset($_GET['a'])) {
// 42
// 48*
$em = new EntryManager();
// 12
$dad = $em->getEntryById($_GET['id']);
// 36
form_to_create_kid($dad, $err_messages);
} else {
// 47
//49*
$em = new EntryManager();
// 12
$entry = $em->getEntryById($_GET['id']);
// 36
form_to_edit_entry($entry, $err_messages);
// 37
}
} else {
// 35
form_to_create_entry($err_messages);
}
}
require "footer.php";