This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/noteview.php

61 lines
1.1 KiB
PHP
Raw Normal View History

2004-03-15 16:22:00 +00:00
<?
/*
* Application Database - Note Viewer
*
*/
include("path.php");
require(BASE."include/"."incl.php");
global $apidb_root;
function admin_menu()
{
global $noteId;
global $apidb_root;
$m = new htmlmenu("Admin");
$m->add("Edit this Note", $apidb_root."admin/editAppNote.php?noteId=$noteId");
$m->done();
}
//do query
$result = mysql_query("SELECT noteTitle, noteDesc FROM appNotes WHERE noteId = $noteId");
$ob = mysql_fetch_object($result);
//die if error
if(!$result || mysql_num_rows($result) == 0)
{
// error
errorpage("No Note Found","The selected note was not found.");
exit;
}
//display admin menu
if(loggedin() && (havepriv("admin") || $_SESSION['current']->ownsApp($appId))) {
2004-03-15 16:22:00 +00:00
apidb_sidebar_add("admin_menu");
}
//show page
apidb_header();
echo html_frame_start("View Note - $ob->noteTitle ","80%");
echo add_br(stripslashes($ob->noteDesc));
echo html_frame_end();
if ($versionId)
{
echo html_back_link(1,"appview.php?appId=$appId&versionId=$versionId");
}
else
{
echo html_back_link(1,"appview.php?appId=$appId");
}
apidb_footer();
?>