Your IP : 216.73.217.64


Current Path : /home3/gp97/docs.slibienetre.97gp.net/dmanager/php/
Upload File :
Current File : //home3/gp97/docs.slibienetre.97gp.net/dmanager/php/editfoldercomment.php

<?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,v 1.1.1.1 2005/04/10 01:52:22 benjamin Exp $ */

require_once ("common.php");

$fields = array (
	"dir"      => array ("request", "integer", 0),
	"folder"   => 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" && $folder)
{
	if ($doc->hasRight($_SESSION["Sid_user"], "c", $dir))
	{
		$doc->editFolderComment($folder, $comments);
		$error = _l("Comment changed successfully !");
	}
	else
		$error = _l("You cannot change the comments of documents !");

	include ("browser.php");
	exit();
}

$infoFolder = $doc->getFolderInfo($folder);
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="editfoldercomment.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="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($infoFolder["id_folder"]); ?></th>
	</tr>
	<tr>
		<th><?php __l("Comment") ?></th>
		<td><textarea class="int" name="comments" cols="60" rows="10"><?php echo $infoFolder["folder_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">&nbsp;</td>
		<td><img class="vmiddle noborder" src="<?php echo $pngPath; ?>folder.png" alt="Back to the Document Manager" />&nbsp;<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"); ?>