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/admin/addAppNote.php

52 lines
977 B
PHP
Raw Normal View History

2004-03-15 16:22:00 +00:00
<?
/*
* Add Application Note
*
*/
include("path.php");
include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php");
global $apidb_root;
//check for admin privs
if(!loggedin() || (!havepriv("admin") && !$current->ownsApp($appId)) )
{
errorpage("Insufficient Privileges!");
exit;
}
apidb_header("Add Application Note");
$t = new TableVE("create");
if($HTTP_POST_VARS)
{
$t->update($HTTP_POST_VARS);
}
else
{
$table = "appNotes";
if (!$versionId) { $versionId = 0; }
//delete old NONAMES
mysql_query("DELETE FROM $table WHERE noteTitle = 'NONAME'");
//show edit form
$query = "INSERT INTO $table VALUES(0, 'NONAME', '', $appId, $versionId)";
if(debugging()) { echo "<p align=center><b>query:</b> $query </p>"; }
$t->create($query, $table, "noteId");
echo html_back_link(1,$apidb_root."appview.php?appId=$appId&versionId=$versionId");
}
apidb_footer();
?>