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/deleteAny.php

57 lines
1.2 KiB
PHP
Raw Normal View History

<?php
/****************************************************/
/* code to delete versions, families and categories */
/****************************************************/
2004-03-15 16:22:00 +00:00
/*
* application environment
*/
2004-03-15 16:22:00 +00:00
include("path.php");
include(BASE."include/incl.php");
include(BASE."include/category.php");
include(BASE."include/application.php");
2004-03-15 16:22:00 +00:00
if(!loggedin() || !havepriv("admin"))
{
errorpage();
exit;
}
if($_REQUEST['confirmed'] != "yes")
2004-03-15 16:22:00 +00:00
{
// ask for confirmation
// could do some Real Damage if someone accidently hits the delete button on the main category :)
//
// perhaps we can do this with some javascript, popup
errorpage("Not confirmed");
}
if($_REQUEST['what'])
2004-03-15 16:22:00 +00:00
{
switch($_REQUEST['what'])
2004-03-15 16:22:00 +00:00
{
case "comment":
// delete a comment
//TODO
break;
case "category":
// delete category and the apps in it
deleteCategory($_REQUEST['catId']);
2004-03-15 16:22:00 +00:00
break;
case "appFamily":
// delete app family & all its versions
deleteAppFamily($_REQUEST['appId']);
2004-03-15 16:22:00 +00:00
break;
case "appVersion":
// delete a version
deleteAppVersion($_REQUEST['versionId']);
2004-03-15 16:22:00 +00:00
break;
}
//FIXME need to redirect to the page before the confirmation page
redirect(BASE."appbrowse.php");
2004-03-15 16:22:00 +00:00
}
?>