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

55 lines
1.4 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");
include(BASE."include/mail.php");
2004-03-15 16:22:00 +00:00
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'])
{
case "category":
// delete category and the apps in it
$oCategory = new Category($_REQUEST['catId']);
if(!$oCategory->delete())
errorpage();
else
redirect(BASE."appbrowse.php");
break;
case "appFamily":
// delete app family & all its versions
$oApp = new Application($_REQUEST['appId']);
if(!$oApp->delete())
errorpage();
else
redirect(BASE."appbrowse.php");
break;
case "appVersion":
$oVersion = new Version($_REQUEST['versionId']);
if(!$oVersion->delete())
errorpage();
else
redirect(BASE."appview.php?appId=".$_REQUEST['appId']);
break;
}
2004-03-15 16:22:00 +00:00
}
?>