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/addCategory.php
Jonathan Ernst 2083bf521b - OO version of user class
- no more duplicated functions
- improved performances (much less duplicated mysql queries)
- less code and better error handling
2005-01-30 23:12:48 +00:00

42 lines
628 B
PHP

<?php
include("path.php");
include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php");
if(!$_SESSION['current']->hasPriv("admin"))
{
errorpage();
exit;
}
else
{
global $admin_mode;
$admin_mode = 1;
}
apidb_header("Add Application Category");
$t = new TableVE("create");
if($_POST)
{
$t->update($_POST);
}
else
{
$table = "appCategory";
$query = "INSERT INTO $table VALUES(0, 'NONAME', null, 0)";
query_appdb("DELETE FROM $table WHERE catName = 'NONAME'");
if(debugging())
echo "$query <br /><br />\n";
$t->create($query, $table, "catId");
}
apidb_footer();
?>