Your IP : 216.73.217.64
<?php
/* *************************************************
*
* Document Manager (C) 2002-2010
* Version 4 - dmanager MySQL
* Benjamin Sonntag <benjamin@sonntag.fr>
* Chantal Bernard-Putz <chantal@bernard-putz.net>
* Franck Denis
* This software is protected by copyright laws,
* please read the file COPYRIGHT
* This software is provided as is with no warranty.
*
************************************************* */
/* $Id: deletefolder.php 29 2009-11-26 07:02:26Z chantal $ */
require_once ("common.php");
$fields = array (
"dir" => array ("request", "integer", 0),
"folder" => array ("request", "integer", 0),
"action" => array ("post", "string", ""),
);
getFields($fields);
$title = _l("Delete a folder");
if ($action == "dodelete" && !isEmpty($dir) && !isEmpty($folder))
{
if ($doc->hasRight($_SESSION["Sid_user"], "p", $dir))
{
if (!$doc->deleteFolder($folder))
$error = $doc->errstr();
else
$error = _l("Folder successfully deleted !");
}
else
$error = _l("You cannot delete folders !");
include ("browser.php");
exit();
}
require_once ("head.php");
?>
<p style="display: inline"><br /></p>
<p style="display: inline"><br /></p>
<?php if (!empty($error)) { echo "<p class=\"error\">" . $error . "</p>"; } ?>
<form method="post" action="deletefolder.php">
<div>
<input type="hidden" name="dir" value="<?php echo $dir; ?>" />
<input type="hidden" name="folder" value="<?php echo $folder; ?>" />
<input type="hidden" name="action" value="dodelete" />
<table cellpadding="4" cellspacing="0" class="center noborder">
<tr>
<th colspan="2"><?php __l("Confirm the deletion of the folder (it must be empty too) ?") ?></th>
</tr>
<tr>
<th><?php __l("Name") ?></th>
<td><code><?echo $doc->folderPath($folder); ?></code></td>
</tr>
<tr>
<td colspan="2" class="center"><input class="inb" type="submit" value="<?php __l("Delete") ?>" /></td>
</tr>
</table>
</div>
</form>
<p style="display: inline"><br /></p>
<table style="width: 70%" cellpadding="1" cellspacing="0" class="center">
<tr>
<td style="width: 30px"> </td>
<td><img class="vmiddle noborder" src="<?php echo $pngPath; ?>folder.png" alt="Back to the Document Manager" /> <a href="browser.php?dir=<?php echo $dir; ?>"><?php __l("Cancel and go back to the Document Manager") ?></a></td>
</tr>
</table>
<?php require_once ("foot.php"); ?>