* @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 UsrMgr view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @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_UsrMgr extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ $seluser = $this->params['seluser']; $strictformcheck = $this->params['strictformcheck']; ?> function checkForm() { msg = new Array(); if($("#login").val() == "") msg.push(""); if(($("#userid").val() == "0") && ($("#pwd").val() == "")) msg.push(""); if(($("#pwd").val() != $("#pwdconf").val())&&($("#pwd").val() != "")&&($("#pwd").val() != "")) msg.push(""); if($("#name").val() == "") msg.push(""); if($("#email").val() == "") msg.push(""); if($("#comment").val() == "") msg.push(""); if (msg != "") { noty({ text: msg.join('
'), type: 'error', dismissQueue: true, layout: 'topRight', theme: 'defaultTheme', _timeout: 1500, }); return false; } else return true; } $(document).ready( function() { $('body').on('submit', '#form', function(ev){ if(checkForm()) return; event.preventDefault(); }); $( "#selector" ).change(function() { $('div.ajax').trigger('update', {userid: $(this).val()}); }); }); params['dms']; $user = $this->params['user']; $seluser = $this->params['seluser']; $quota = $this->params['quota']; $workflowmode = $this->params['workflowmode']; if($seluser) { $sessionmgr = new SeedDMS_SessionMgr($dms->getDB()); $this->contentHeading(getMLText("user_info")); echo "\n"; echo "\n"; $documents = $seluser->getDocuments(); echo "\n"; $documents = $seluser->getDocumentsLocked(); echo "\n"; if($workflowmode == "traditional") { $reviewStatus = $seluser->getReviewStatus(); if($reviewStatus['indstatus']) { $i = 0; foreach($reviewStatus['indstatus'] as $rv) { if($rv['status'] == 0) { $i++; } } echo "\n"; } } if($workflowmode == "traditional" || $workflowmode == 'traditional_only_approval') { $approvalStatus = $seluser->getApprovalStatus(); if($approvalStatus['indstatus']) { $i = 0; foreach($approvalStatus['indstatus'] as $rv) { if($rv['status'] == 0) { $i++; } } echo "\n"; } } if($workflowmode == 'advanced') { $workflowStatus = $seluser->getWorkflowStatus(); if($workflowStatus['u']) echo "\n"; } $sessions = $sessionmgr->getUserSessions($seluser); if($sessions) { $session = array_shift($sessions); echo "\n"; } echo "
".getMLText('discspace').""; $qt = $seluser->getQuota() ? $seluser->getQuota() : $quota; echo SeedDMS_Core_File::format_filesize($seluser->getUsedDiskSpace())." / ".SeedDMS_Core_File::format_filesize($qt)."
"; echo $this->getProgressBar($seluser->getUsedDiskSpace(), $qt); echo "
".getMLText('documents')."".count($documents)."
".getMLText('documents_locked')."".count($documents)."
".getMLText('pending_reviews')."".$i."
".getMLText('pending_approvals')."".$i."
".getMLText('pending_workflows')."".count($workflowStatus['u'])."
".getMLText('lastaccess')."".getLongReadableDate($session->getLastAccess())."
"; if($user->isAdmin() && $seluser->getID() != $user->getID()) echo "getID()."\" class=\"btn btn-primary\">".getMLText("substitute_user")."\n"; } } /* }}} */ function form() { /* {{{ */ $seluser = $this->params['seluser']; $this->showUserForm($seluser); } /* }}} */ function showUserForm($currUser) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $users = $this->params['allusers']; $groups = $this->params['allgroups']; $passwordstrength = $this->params['passwordstrength']; $passwordexpiration = $this->params['passwordexpiration']; $httproot = $this->params['httproot']; $enableuserimage = $this->params['enableuserimage']; $undeluserids = $this->params['undeluserids']; $workflowmode = $this->params['workflowmode']; $quota = $this->params['quota']; ?>
getID(), $undeluserids)) { ?> 0) { ?> 0) { ?> getAllWorkflows(); if($workflows) { ?>
: ">
: " name="pwd" id="pwd">
:
" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;">
:
: getPwdExpiration() : ""; ?>
: ">
: ">
:
:
:
: "> 0) echo $this->warningMsg(getMLText('current_quota', array('quota'=>SeedDMS_Core_File::format_filesize($quota)))); else echo $this->warningMsg(getMLText('quota_is_disabled')); ?>
: isHidden() ? " checked='checked'" : "");?>>
: isDisabled() ? " checked='checked'" : "");?>>
: hasImage()) print ""; else printMLText("no_user_image"); ?>
: printFileChooser('userfile', false, "image/jpeg"); ?>
: printFileChooser('userfile', false, 'image/jpeg'); ?>
:
:
:
:
:
:
:
params['dms']; $user = $this->params['user']; $seluser = $this->params['seluser']; $users = $this->params['allusers']; $groups = $this->params['allgroups']; $passwordstrength = $this->params['passwordstrength']; $passwordexpiration = $this->params['passwordexpiration']; $httproot = $this->params['httproot']; $enableuserimage = $this->params['enableuserimage']; $undeluserids = $this->params['undeluserids']; $workflowmode = $this->params['workflowmode']; $quota = $this->params['quota']; $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("user_management")); ?>
:
getID()."\"" : "") ?>>
getID()."\"" : "") ?>>
htmlEndPage(); } /* }}} */ } ?>