Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
filetypes
:
delete.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /*************************************************************** * Copyright notice * * (c) 2003-2004 Tobias Bender (tobias@phpXplorer.org) * All rights reserved * * This script is part of the phpXplorer project. The phpXplorer project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * A copy is found in the textfile GPL.txt distributed with these scripts. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ require(dirname(__FILE__) . "/defaultActionHead.php"); $fileName = getRequestVar("fileName"); # check for url manipulation if(!(strpos($fileName, "..") === FALSE)) die($PXP_languages[$PXP_language]['accessDenied'] . " (804)"); $pInfo = checkFilePermissions($fileName); if(!$pInfo["allowOpen"] or !$pInfo["allowEdit"]) die($PXP_languages[$PXP_language]["accessDenied"] . " (809)"); if(isset($HTTP_POST_VARS['submit'])) $submit = $HTTP_POST_VARS['submit']; $isDir = is_dir($currentDir . "/" . $fileName); if(isset($submit)){ if(is_file($currentDir . "/" . $fileName)){ pxp_unlink($currentDir . "/" . $fileName); }else{ rmdirRecursive($currentDir . "/" . $fileName); } } ?> <html> <head> <title><?php echo $PXP_languages[$PXP_language]['deleteFile'] ?></title> <style type="text/css"> <!-- --> </style> <link rel="stylesheet" type="text/css" href="<?php echo $PXP_url ?>/styles/<?php echo $PXP_style ?>/main.css"/> <script language="JavaScript" type="text/javascript"> <!-- function init(){ window.resizeTo(400,160) <?php if(isset($submit)){ if($isDir) echo "opener.parent.frames['phpXplorerTree'].deleteNode('/|" . str_replace("/", "|", str_replace($PXP_basedir . "/", "", $currentDir . "/" . $fileName)) ."')\r\n"; echo "opener.refreshDir()\r\n"; echo "window.close()\r\n"; } ?>//javascript } //--> </script> </head> <body onLoad="init()"> <form name="frm1" action="./delete.php" method="post"> <input type="hidden" name="currentDir" value="<?php echo $currentDir ?>"> <input type="hidden" name="fileName" value="<?php echo $fileName ?>"> <input type="hidden" name="shareId" value="<?php echo $shareId ?>"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <?php echo $PXP_languages[$PXP_language]['reallyDelete'] . ' ("' . $fileName . '")' ?>? </td> </tr> <tr> <td align="right"> <br/><br/> <input type="submit" name="submit" value="<?php echo $PXP_languages[$PXP_language]['yes'] ?>" style="width:100px"> <input type="button" value="<?php echo $PXP_languages[$PXP_language]['no'] ?>" onClick="window.close()" style="width:100px"> </td> </tr> </table> </form> </body> </html>