本文整理汇总了PHP中Note::getSideLinks方法的典型用法代码示例。如果您正苦于以下问题:PHP Note::getSideLinks方法的具体用法?PHP Note::getSideLinks怎么用?PHP Note::getSideLinks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::getSideLinks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('view_note.tpl.html');
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
$note_id = $_GET['id'];
$note = Note::getDetails($note_id);
if ($note == '') {
$tpl->assign('note', '');
$tpl->displayTemplate();
exit;
} else {
$note['message'] = $note['not_note'];
$issue_id = Note::getIssueID($note_id);
$usr_id = Auth::getUserID();
}
if (User::getRoleByUser($usr_id, Issue::getProjectID($issue_id)) < User::getRoleID('Standard User') || !Access::canViewInternalNotes($issue_id, Auth::getUserID())) {
$tpl->setTemplate('permission_denied.tpl.html');
$tpl->displayTemplate();
exit;
}
$note = Note::getDetails($_GET['id']);
$note['message'] = $note['not_note'];
$issue_id = Note::getIssueID($_GET['id']);
$tpl->assign(array('note' => $note, 'issue_id' => $issue_id, 'extra_title' => 'Note #' . Note::getNoteSequenceNumber($issue_id, $note_id) . ': ' . $note['not_title'], 'recipients' => Mail_Queue::getMessageRecipients('notes', $note_id)));
if (!empty($issue_id)) {
$sides = Note::getSideLinks($issue_id, $_GET['id']);
$tpl->assign(array('previous' => $sides['previous'], 'next' => $sides['next']));
}
$tpl->displayTemplate();
示例2: Template_API
include_once APP_INC_PATH . "class.note.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("view_note.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
$note = Note::getDetails($HTTP_GET_VARS["id"]);
if ($note == '') {
$tpl->assign("note", '');
$tpl->displayTemplate();
exit;
} else {
$note["message"] = $note["not_note"];
$issue_id = Note::getIssueID($HTTP_GET_VARS["id"]);
$usr_id = Auth::getUserID();
}
if (User::getRoleByUser($usr_id, Issue::getProjectID($issue_id)) < User::getRoleID('Standard User') || !Issue::canAccess($issue_id, Auth::getUserID())) {
$tpl->setTemplate("permission_denied.tpl.html");
$tpl->displayTemplate();
exit;
}
$note = Note::getDetails($HTTP_GET_VARS["id"]);
$note["message"] = $note["not_note"];
$issue_id = Note::getIssueID($HTTP_GET_VARS["id"]);
$tpl->bulkAssign(array("note" => $note, "issue_id" => $issue_id, 'extra_title' => "Note #" . $HTTP_GET_VARS['num'] . ": " . $note['not_title']));
if (!empty($issue_id)) {
$sides = Note::getSideLinks($issue_id, $HTTP_GET_VARS["id"]);
$tpl->assign(array('previous' => $sides['previous'], 'next' => $sides['next']));
}
$tpl->displayTemplate();