[ Index ] |
PHP Cross Reference of Eventum |
[Summary view] [Print] [Text view]
1 <?php 2 /* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */ 3 // +----------------------------------------------------------------------+ 4 // | Eventum - Issue Tracking System | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 2003, 2004, 2005, 2006, 2007 MySQL AB | 7 // | | 8 // | This program is free software; you can redistribute it and/or modify | 9 // | it under the terms of the GNU General Public License as published by | 10 // | the Free Software Foundation; either version 2 of the License, or | 11 // | (at your option) any later version. | 12 // | | 13 // | This program is distributed in the hope that it will be useful, | 14 // | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 // | GNU General Public License for more details. | 17 // | | 18 // | You should have received a copy of the GNU General Public License | 19 // | along with this program; if not, write to: | 20 // | | 21 // | Free Software Foundation, Inc. | 22 // | 59 Temple Place - Suite 330 | 23 // | Boston, MA 02111-1307, USA. | 24 // +----------------------------------------------------------------------+ 25 // | Authors: João Prado Maia <jpm@mysql.com> | 26 // +----------------------------------------------------------------------+ 27 // 28 // @(#) $Id: view_note.php 3338 2007-06-19 21:49:22Z balsdorf $ 29 30 require_once(dirname(__FILE__) . "/init.php"); 31 require_once (APP_INC_PATH . "class.template.php"); 32 require_once (APP_INC_PATH . "class.auth.php"); 33 require_once (APP_INC_PATH . "class.issue.php"); 34 require_once (APP_INC_PATH . "class.misc.php"); 35 require_once (APP_INC_PATH . "class.note.php"); 36 require_once (APP_INC_PATH . "class.user.php"); 37 require_once (APP_INC_PATH . "db_access.php"); 38 39 $tpl = new Template_API(); 40 $tpl->setTemplate("view_note.tpl.html"); 41 42 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true); 43 $usr_id = Auth::getUserID(); 44 45 $note_id = $_GET["id"]; 46 $note = Note::getDetails($note_id); 47 48 if ($note == '') { 49 $tpl->assign("note", ''); 50 $tpl->displayTemplate(); 51 exit; 52 } else { 53 $note["message"] = $note["not_note"]; 54 $issue_id = Note::getIssueID($note_id); 55 $usr_id = Auth::getUserID(); 56 } 57 58 if ((User::getRoleByUser($usr_id, Issue::getProjectID($issue_id)) < User::getRoleID('Standard User')) || (!Issue::canAccess($issue_id, Auth::getUserID()))) { 59 $tpl->setTemplate("permission_denied.tpl.html"); 60 $tpl->displayTemplate(); 61 exit; 62 } 63 64 $note = Note::getDetails($_GET["id"]); 65 $note["message"] = $note["not_note"]; 66 67 $issue_id = Note::getIssueID($_GET["id"]); 68 $tpl->bulkAssign(array( 69 "note" => $note, 70 "issue_id" => $issue_id, 71 'extra_title' => "Note #" . Note::getNoteSequenceNumber($issue_id, $note_id) . ": " . $note['not_title'], 72 'recipients' => Mail_Queue::getMessageRecipients('notes', $note_id), 73 )); 74 75 if (!empty($issue_id)) { 76 $sides = Note::getSideLinks($issue_id, $_GET["id"]); 77 $tpl->assign(array( 78 'previous' => $sides['previous'], 79 'next' => $sides['next'] 80 )); 81 } 82 83 $tpl->displayTemplate();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 19 21:21:33 2007 | Cross-referenced by PHPXref 0.7 |