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: editcomment.php 29 2009-11-26 07:02:26Z chantal $ */
require_once ("common.php");
$fields = array (
"dir" => array ("request", "integer", 0),
"file" => array ("request", "integer", 0),
"comments" => array ("post", "string", 0),
"action" => array ("post", "string", ""),
);
getFields($fields);
$title = _l("Editing the comment of a document");
if ($action == "doedit" && $file)
{
if ($doc->hasRight($_SESSION["Sid_user"], "c", $dir))
{
$doc->editFileComment($file, $comments);
$error = _l("Comment changed successfully !");
}
else
$error = _l("You cannot change the comments of documents !");
include ("browser.php");
exit();
}
$infoFile = $doc->getFileInfo($file);
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="editcomment.php">
<div>
<input type="hidden" name="dir" value="<?php echo $dir; ?>" />
<input type="hidden" name="file" value="<?php echo $file; ?>" />
<input type="hidden" name="action" value="doedit" />
<table cellpadding="4" cellspacing="0" class="center noborder">
<tr>
<th colspan="2"><?php __l("Enter the comment for the file") ?> <?php echo $doc->folderPath($infoFile["id_folder"]) . SEP . $infoFile["file_name"]; ?></th>
</tr>
<tr>
<th><?php __l("Comment") ?></th>
<td><textarea class="int" name="comments" cols="60" rows="10"><?php echo $infoFile["file_comment"]; ?></textarea></td>
</tr>
<tr>
<td colspan="2" class="center"><input class="inb" type="submit" value="<?php __l("Save") ?>" /></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"); ?>