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

56 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");
2004-03-15 16:22:00 +00:00
if(!$_SESSION['current']->hasPriv("admin"))
2004-03-15 16:22:00 +00:00
{
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":
// TODO: delete a comment
redirect(BASE."appview.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']);
2004-03-15 16:22:00 +00:00
break;
case "category":
// delete category and the apps in it
deleteCategory($_REQUEST['catId']);
redirect(BASE."appbrowse.php");
2004-03-15 16:22:00 +00:00
break;
case "appFamily":
// delete app family & all its versions
deleteAppFamily($_REQUEST['appId']);
redirect(BASE."appbrowse.php");
2004-03-15 16:22:00 +00:00
break;
case "appVersion":
// delete a version
deleteAppVersion($_REQUEST['versionId']);
redirect(BASE."appview.php?appId=".$_REQUEST['appId']);
2004-03-15 16:22:00 +00:00
break;
}
}
?>