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
Jonathan Ernst bd91db228c - access most globals by their $_XYZ['varname'] name
- fix some code errors and typos (missing $ in front of variable names
and so on)
- fixed a lot of warnings that would have been thrown when error_reporting
is set to show notices (if(isset($variable))) instead of if($variable) for
example)
2004-12-10 01:07:45 +00:00

61 lines
1.1 KiB
PHP

<?
/*
* 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))) {
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();
?>