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 d3d9e853d9 - replaced tons of tabs with spaces
- replaced <? with <?php for compatibility sake (see TODO and CODING_STANDARD to know more)
- improved overall code lisibility
2004-12-12 03:51:51 +00:00

43 lines
675 B
PHP

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