mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
new files for transfering docs, folders, etc. to a new owner
This commit is contained in:
parent
36e2b29e8a
commit
ca58278f29
57
out/out.TransferObjects.php
Normal file
57
out/out.TransferObjects.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
// MyDMS. Document Management System
|
||||
// Copyright (C) 2002-2005 Markus Westphal
|
||||
// Copyright (C) 2006-2008 Malcolm Cowe
|
||||
// Copyright (C) 2010-2016 Uwe Steinmann
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// This program 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.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
include("../inc/inc.Settings.php");
|
||||
include("../inc/inc.Language.php");
|
||||
include("../inc/inc.Init.php");
|
||||
include("../inc/inc.Extension.php");
|
||||
include("../inc/inc.DBInit.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
if (!$user->isAdmin()) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if (!isset($_GET["userid"]) || !is_numeric($_GET["userid"]) || intval($_GET["userid"])<1) {
|
||||
UI::exitError(getMLText("rm_user"),getMLText("invalid_user_id"));
|
||||
}
|
||||
|
||||
$rmuser = $dms->getUser(intval($_GET["userid"]));
|
||||
if (!is_object($rmuser)) {
|
||||
UI::exitError(getMLText("rm_user"),getMLText("invalid_user_id"));
|
||||
}
|
||||
|
||||
if ($rmuser->getID()==$user->getID()) {
|
||||
UI::exitError(getMLText("rm_user"),getMLText("cannot_delete_yourself"));
|
||||
}
|
||||
|
||||
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('rmuser', $rmuser);
|
||||
$view->setParam('allusers', $allusers);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
90
views/bootstrap/class.TransferObjects.php
Normal file
90
views/bootstrap/class.TransferObjects.php
Normal file
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
/**
|
||||
* Implementation of TransferObjects view
|
||||
*
|
||||
* @category DMS
|
||||
* @package SeedDMS
|
||||
* @license GPL 2
|
||||
* @version @version@
|
||||
* @author Uwe Steinmann <uwe@steinmann.cx>
|
||||
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
||||
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
||||
* 2010-2012 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Include parent class
|
||||
*/
|
||||
require_once("class.Bootstrap.php");
|
||||
|
||||
/**
|
||||
* Class which outputs the html page for TransferObjects view
|
||||
*
|
||||
* @category DMS
|
||||
* @package SeedDMS
|
||||
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
|
||||
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
||||
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
||||
* 2010-2012 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_TransferObjects extends SeedDMS_Bootstrap_Style {
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$rmuser = $this->params['rmuser'];
|
||||
$allusers = $this->params['allusers'];
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
||||
$this->contentHeading(getMLText("transfer_objects"));
|
||||
|
||||
?>
|
||||
<div class="alert">
|
||||
<?php printMLText("confirm_transfer_objects", array ("username" => htmlspecialchars($rmuser->getFullName())));?>
|
||||
</div>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.UsrMgr.php" name="form1" method="post">
|
||||
<input type="hidden" name="userid" value="<?php print $rmuser->getID();?>">
|
||||
<input type="hidden" name="action" value="transferobjects">
|
||||
<?php echo createHiddenFieldWithKey('transferobjects'); ?>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="assignTo">
|
||||
<?php printMLText("transfer_objects_to_user"); ?>:
|
||||
</label>
|
||||
<div class="controls">
|
||||
<select name="assignTo" class="chzn-select">
|
||||
<?php
|
||||
foreach ($allusers as $currUser) {
|
||||
if ($currUser->isGuest() || ($currUser->getID() == $rmuser->getID()) )
|
||||
continue;
|
||||
|
||||
if ($rmuser && $currUser->getID()==$rmuser->getID()) $selected=$count;
|
||||
print "<option value=\"".$currUser->getID()."\">" . htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName());
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn"><i class="icon-share-alt"></i> <?php printMLText("transfer_objects");?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user