Your IP : 216.73.217.64


Current Path : /home3/gp97/docs.sapat20172020.97gp.net/php/
Upload File :
Current File : //home3/gp97/docs.sapat20172020.97gp.net/php/movefolder.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: movefile.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),
	"newfolder" => array ("post", "integer", 0),
	"action"    => array ("post", "string", ""),
);

getFields($fields);

$title = _l("Move a file");

if ($action == "domove" && $folder)
{
	if ($doc->hasRight($_SESSION["Sid_user"], "m", $folder) && $doc->hasRight($_SESSION["Sid_user"], "u", $newfolder))
	{
		if (!$doc->moveFolder($folder, $newfolder))
			$error = $doc->errstr();
		else
			$error = _l("File successfully moved !");
	}
	else
		$error = _l("You cannot move files !");

	require_once ("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="movefolder.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="domove" />
<table cellpadding="4" cellspacing="0" class="center noborder">
	<tr>
		<th colspan="2"><?php __l("Choose the new folder of the file") ?> <?php echo $infoFolder["folder_name"]; ?></th>
	</tr>
	<tr>
		<th><?php __l("Old Folder") ?></th>
		<td><code><?php echo $doc->folderPath($infoFolder["id_folder"]) . SEP; ?></code></td>
	</tr>
	<tr>
		<th><?php __l("New Folder") ?></th>
	<td>
		<select name="newfolder" class="inl">
<?php $doc->dirListMoveFolder($newfolder, $folder, 0, 1); ?>
		</select>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="center"><input class="inb" type="submit" value="<?php __l("Move") ?>" /></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"); ?>