mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 16:36:59 +01:00
Backups errors are shown. Return to active tab when save configurations tabs. Fix translations.
73 lines
2.0 KiB
PHP
73 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* sysPass
|
|
*
|
|
* @author nuxsmin
|
|
* @link http://syspass.org
|
|
* @copyright 2012 Rubén Domínguez nuxsmin@syspass.org
|
|
*
|
|
* This file is part of sysPass.
|
|
*
|
|
* sysPass 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 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* sysPass 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 sysPass. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
define('APP_ROOT', '..');
|
|
include_once (APP_ROOT."/inc/init.php");
|
|
|
|
SP_Util::checkReferer('POST');
|
|
|
|
if (!SP_Init::isLoggedIn()) {
|
|
SP_Util::logout();
|
|
}
|
|
|
|
|
|
if ( SP_Common::parseParams('p', 'id', FALSE, TRUE) && SP_Common::parseParams('p', 'type', FALSE, TRUE) ) {
|
|
$tplvars['itemid'] = SP_Common::parseParams('p', 'id', 0);
|
|
$itemType = $tplvars['itemtype'] = SP_Common::parseParams('p', 'type', 0);
|
|
$tplvars['active'] = SP_Common::parseParams('p', 'active', 0);
|
|
} else {
|
|
return;
|
|
}
|
|
|
|
switch ($itemType) {
|
|
case 1:
|
|
$tplvars['header'] = _('Editar Usuario');
|
|
break;
|
|
case 2:
|
|
$tplvars['header'] = _('Nuevo Usuario');
|
|
break;
|
|
case 3:
|
|
$tplvars['header'] = _('Editar Grupo');
|
|
break;
|
|
case 4:
|
|
$tplvars['header'] = _('Nuevo Grupo');
|
|
break;
|
|
case 5:
|
|
$tplvars['header'] = _('Editar Perfil');
|
|
break;
|
|
case 6:
|
|
$tplvars['header'] = _('Nuevo Perfil');
|
|
break;
|
|
default :
|
|
break;
|
|
}
|
|
|
|
if ($itemType == 1 || $itemType == 2) {
|
|
SP_Html::getTemplate('users', $tplvars);
|
|
} elseif ($itemType == 3 || $itemType == 4) {
|
|
SP_Html::getTemplate('groups', $tplvars);
|
|
} elseif ($itemType == 5 || $itemType == 6) {
|
|
SP_Html::getTemplate('profiles', $tplvars);
|
|
} |