mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
Merge branch 'v1.1'
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -254,7 +254,7 @@ switch ($frmSaveType) {
|
||||
$account->accountUserEditId = $userId;
|
||||
|
||||
// Restaurar cuenta y clave
|
||||
if ($account->updateAccount(true) && $account->updateAccountPass(false,true)) {
|
||||
if ($account->updateAccount(true) && $account->updateAccountPass(false, true)) {
|
||||
SP_Common::printJSON(_('Cuenta restaurada'), 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 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/>.
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 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', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
@@ -32,7 +32,7 @@ if (!SP_Init::isLoggedIn()) {
|
||||
SP_Util::logout();
|
||||
}
|
||||
|
||||
if ( SP_Common::parseParams('p', 'id', false, true) && SP_Common::parseParams('p', 'type', false, true) ) {
|
||||
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['activeTab'] = SP_Common::parseParams('p', 'active', 0);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
@@ -135,7 +135,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
|
||||
|
||||
SP_Common::printJSON(_('Error al actualizar el usuario'));
|
||||
}
|
||||
// Cambio de clave
|
||||
// Cambio de clave
|
||||
} elseif ($frmAction == 3) {
|
||||
if (SP_Util::demoIsEnabled() && $userLogin == 'demo') {
|
||||
SP_Common::printJSON(_('Ey, esto es una DEMO!!'));
|
||||
@@ -157,7 +157,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
|
||||
}
|
||||
|
||||
SP_Common::printJSON(_('Error al modificar la clave'));
|
||||
// Eliminar usuario
|
||||
// Eliminar usuario
|
||||
} elseif ($frmAction == 4) {
|
||||
if (SP_Util::demoIsEnabled() && $userLogin == 'demo') {
|
||||
SP_Common::printJSON(_('Ey, esto es una DEMO!!'));
|
||||
@@ -210,7 +210,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
|
||||
SP_Common::printJSON(_('Error al actualizar el grupo'));
|
||||
}
|
||||
|
||||
// Eliminar grupo
|
||||
// Eliminar grupo
|
||||
} elseif ($frmAction == 4) {
|
||||
SP_Groups::$groupId = $frmItemId;
|
||||
|
||||
@@ -290,7 +290,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
|
||||
SP_Common::printJSON(_('Error al actualizar el perfil'));
|
||||
}
|
||||
|
||||
// Eliminar perfil
|
||||
// Eliminar perfil
|
||||
} elseif ($frmAction == 4) {
|
||||
$resProfileUse = SP_Profiles::checkProfileInUse();
|
||||
|
||||
@@ -348,7 +348,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
|
||||
SP_Common::printJSON(_('Error al actualizar el cliente'));
|
||||
}
|
||||
|
||||
// Eliminar cliente
|
||||
// Eliminar cliente
|
||||
} elseif ($frmAction == 4) {
|
||||
$resCustomerUse = SP_Customer::checkCustomerInUse($frmItemId);
|
||||
|
||||
@@ -399,7 +399,7 @@ if ($frmSaveType == 1 || $frmSaveType == 2) {
|
||||
SP_Common::printJSON(_('Error al actualizar la categoría'));
|
||||
}
|
||||
|
||||
// Eliminar categoría
|
||||
// Eliminar categoría
|
||||
} elseif ($frmAction == 4) {
|
||||
$resCategoryUse = SP_Category::checkCategoryInUse($frmItemId);
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
@@ -40,7 +40,7 @@ if (!$sk || !SP_Common::checkSessionKey($sk)) {
|
||||
}
|
||||
|
||||
// Variables POST del formulario
|
||||
$frmAction = SP_Common::parseParams('p', 'action');
|
||||
$frmAction = SP_Common::parseParams('p', 'action');
|
||||
$frmOnCloseAction = SP_Common::parseParams('p', 'onCloseAction');
|
||||
$frmActiveTab = SP_Common::parseParams('p', 'activeTab', 0);
|
||||
|
||||
@@ -78,7 +78,7 @@ if ($frmAction == "config") {
|
||||
|
||||
$frmMail = SP_Common::parseParams('p', 'mail_enabled', false, false, true);
|
||||
$frmMailServer = SP_Common::parseParams('p', 'mail_server');
|
||||
$frmMailPort = SP_Common::parseParams('p', 'mail_port',25);
|
||||
$frmMailPort = SP_Common::parseParams('p', 'mail_port', 25);
|
||||
$frmMailUser = SP_Common::parseParams('p', 'mail_user');
|
||||
$frmMailPass = SP_Common::parseParams('p', 'mail_pass', '', false, false, false);
|
||||
$frmMailSecurity = SP_Common::parseParams('p', 'mail_security');
|
||||
@@ -92,7 +92,7 @@ if ($frmAction == "config") {
|
||||
$intAccountCount = $frmAccountCount;
|
||||
}
|
||||
|
||||
if ($frmWiki && (!$frmWikiSearchUrl || !$frmWikiPageUrl || !$frmWikiFilter )) {
|
||||
if ($frmWiki && (!$frmWikiSearchUrl || !$frmWikiPageUrl || !$frmWikiFilter)) {
|
||||
SP_Common::printJSON(_('Faltan parámetros de Wiki'));
|
||||
} elseif ($frmWiki) {
|
||||
SP_Config::setValue("wiki_enabled", true);
|
||||
@@ -103,7 +103,7 @@ if ($frmAction == "config") {
|
||||
SP_Config::setValue("wiki_enabled", false);
|
||||
}
|
||||
|
||||
if ($frmLdap && (!$frmLdapServer || !$frmLdapBase || !$frmLdapBindUser )) {
|
||||
if ($frmLdap && (!$frmLdapServer || !$frmLdapBase || !$frmLdapBindUser)) {
|
||||
SP_Common::printJSON(_('Faltan parámetros de LDAP'));
|
||||
} elseif ($frmLdap) {
|
||||
SP_Config::setValue("ldap_enabled", true);
|
||||
@@ -119,7 +119,7 @@ if ($frmAction == "config") {
|
||||
SP_Config::setValue("ldap_enabled", false);
|
||||
}
|
||||
|
||||
if ($frmMail && (!$frmMailServer || !$frmMailFrom )) {
|
||||
if ($frmMail && (!$frmMailServer || !$frmMailFrom)) {
|
||||
SP_Common::printJSON(_('Faltan parámetros de Correo'));
|
||||
} elseif ($frmMail) {
|
||||
SP_Config::setValue("mail_enabled", true);
|
||||
@@ -129,7 +129,7 @@ if ($frmAction == "config") {
|
||||
SP_Config::setValue("mail_security", $frmMailSecurity);
|
||||
SP_Config::setValue("mail_from", $frmMailFrom);
|
||||
|
||||
if ( $frmMailAuth ){
|
||||
if ($frmMailAuth) {
|
||||
SP_Config::setValue("mail_authenabled", $frmMailAuth);
|
||||
SP_Config::setValue("mail_user", $frmMailUser);
|
||||
SP_Config::setValue("mail_pass", $frmMailPass);
|
||||
@@ -142,7 +142,7 @@ if ($frmAction == "config") {
|
||||
|
||||
if ($frmAllowedSize > 16384) {
|
||||
SP_Common::printJSON(_('El tamaño máximo de archivo es de 16MB'));
|
||||
}
|
||||
}
|
||||
|
||||
SP_Config::setValue("allowed_exts", $frmAllowedExts);
|
||||
SP_Config::setValue("account_link", $frmAccountLink);
|
||||
@@ -199,14 +199,14 @@ if ($frmAction == "config") {
|
||||
}
|
||||
|
||||
$hashMPass = SP_Crypt::mkHashPassword($newMasterPass);
|
||||
|
||||
|
||||
if (!$noAccountPassChange) {
|
||||
$objAccount = new SP_Account;
|
||||
|
||||
if (!$objAccount->updateAllAccountsMPass($currentMasterPass, $newMasterPass)) {
|
||||
SP_Common::printJSON(_('Errores al actualizar las claves de las cuentas'));
|
||||
}
|
||||
|
||||
|
||||
$objAccount->updateAllAccountsHistoryMPass($currentMasterPass, $newMasterPass, $hashMPass);
|
||||
}
|
||||
|
||||
@@ -216,14 +216,14 @@ if ($frmAction == "config") {
|
||||
|
||||
SP_Config::$arrConfigValue["masterPwd"] = $hashMPass;
|
||||
SP_Config::$arrConfigValue["lastupdatempass"] = time();
|
||||
|
||||
|
||||
if (SP_Config::writeConfig()) {
|
||||
$message['action'] = _('Actualizar Clave Maestra');
|
||||
|
||||
SP_Common::sendEmail($message);
|
||||
SP_Common::printJSON(_('Clave maestra actualizada'), 0);
|
||||
}
|
||||
|
||||
|
||||
SP_Common::printJSON(_('Error al guardar el hash de la clave maestra'));
|
||||
} else {
|
||||
SP_Common::printJSON(_('Acción Inválida'));
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
@@ -41,7 +41,7 @@ if (!$userLogin || !$userPass) {
|
||||
SP_Common::printJSON(_('Usuario/Clave no introducidos'));
|
||||
}
|
||||
|
||||
$resLdap = SP_Auth::authUserLDAP($userLogin,$userPass);
|
||||
$resLdap = SP_Auth::authUserLDAP($userLogin, $userPass);
|
||||
|
||||
$objUser = new SP_Users;
|
||||
$objUser->userLogin = $userLogin;
|
||||
@@ -96,7 +96,7 @@ if ($resLdap === true) {
|
||||
$message['action'] = _('Inicio sesión (MySQL)');
|
||||
|
||||
// Autentificamos con la BBDD
|
||||
if (!SP_Auth::authUserMySQL($userLogin,$userPass)) {
|
||||
if (!SP_Auth::authUserMySQL($userLogin, $userPass)) {
|
||||
$message['text'][] = _('Login incorrecto');
|
||||
$message['text'][] = _('Usuario') . ": " . $userLogin;
|
||||
SP_Log::wrLogInfo($message);
|
||||
@@ -123,7 +123,7 @@ if (!$objUser->getUserInfo()) {
|
||||
}
|
||||
|
||||
// Comprobamos que la clave maestra del usuario es correcta y está actualizada
|
||||
if (!$masterPass && (!$objUser->checkUserMPass() || !SP_Users::checkUserUpdateMPass($userLogin) )) {
|
||||
if (!$masterPass && (!$objUser->checkUserMPass() || !SP_Users::checkUserUpdateMPass($userLogin))) {
|
||||
SP_Common::printJSON(_('La clave maestra no ha sido guardada o es incorrecta'), 3);
|
||||
} elseif ($masterPass) {
|
||||
if (!$objUser->updateUserMPass($masterPass)) {
|
||||
@@ -135,10 +135,10 @@ if (!$masterPass && (!$objUser->checkUserMPass() || !SP_Users::checkUserUpdateMP
|
||||
}
|
||||
|
||||
// Comprobar si se ha forzado un cambio de clave
|
||||
if ($objUser->userChangePass){
|
||||
if ($objUser->userChangePass) {
|
||||
$hash = SP_Util::generate_random_bytes();
|
||||
|
||||
if (SP_Users::addPassRecover($userLogin, $hash)){
|
||||
if (SP_Users::addPassRecover($userLogin, $hash)) {
|
||||
$url = SP_Init::$WEBURI . '/index.php?a=passreset&h=' . $hash . '&t=' . time() . '&f=1';
|
||||
SP_Common::printJSON($url, 0);
|
||||
}
|
||||
@@ -154,15 +154,15 @@ if ($objUser->getUserMPass()) {
|
||||
$message['text'][] = _('Grupo') . ": " . SP_Groups::getGroupNameById($objUser->userGroupId);
|
||||
|
||||
SP_Log::wrLogInfo($message);
|
||||
|
||||
|
||||
// Comprobar si existen parámetros adicionales en URL via GET
|
||||
foreach ($_POST as $param => $value){
|
||||
if(preg_match('/g_.*/', $param)){
|
||||
$params[] = substr($param,2).'='.$value;
|
||||
foreach ($_POST as $param => $value) {
|
||||
if (preg_match('/g_.*/', $param)) {
|
||||
$params[] = substr($param, 2) . '=' . $value;
|
||||
}
|
||||
}
|
||||
|
||||
$urlParams = isset($params) ? '?'.implode('&', $params) : '';
|
||||
|
||||
SP_Common::printJSON('index.php'.$urlParams, 0);
|
||||
|
||||
$urlParams = isset($params) ? '?' . implode('&', $params) : '';
|
||||
|
||||
SP_Common::printJSON('index.php' . $urlParams, 0);
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
@@ -38,10 +38,10 @@ $start = SP_Common::parseParams('p', 'start', 0);
|
||||
$clear = SP_Common::parseParams('p', 'clear', 0);
|
||||
$sk = SP_Common::parseParams('p', 'sk', false);
|
||||
|
||||
if ( $clear && $sk && SP_Common::checkSessionKey($sk) ){
|
||||
if ( SP_Log::clearEvents() ){
|
||||
if ($clear && $sk && SP_Common::checkSessionKey($sk)) {
|
||||
if (SP_Log::clearEvents()) {
|
||||
SP_Common::printJSON(_('Registro de eventos vaciado'), 0, "doAction('eventlog');scrollUp();");
|
||||
} else{
|
||||
} else {
|
||||
SP_Common::printJSON(_('Error al vaciar el registro de eventos'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// TODO: comprobar permisos para eliminar archivos
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
@@ -116,7 +116,7 @@ if ($action == 'download' || $action == 'view') {
|
||||
exit(_('No es un ID de archivo válido'));
|
||||
}
|
||||
|
||||
$isView = ( $action == 'view' ) ? true : false;
|
||||
$isView = ($action == 'view') ? true : false;
|
||||
|
||||
$file = SP_Files::fileDownload($fileId);
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?php
|
||||
<?php
|
||||
@@ -1 +1 @@
|
||||
<?php
|
||||
<?php
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -160,9 +160,9 @@ foreach ($resQuery as $account) {
|
||||
$color = array_rand($colors);
|
||||
|
||||
if (!isset($customerColor)) {
|
||||
$customerColor[$account->account_customerId] = '#'.$colors[$color];
|
||||
$customerColor[$account->account_customerId] = '#' . $colors[$color];
|
||||
} elseif (isset($customerColor) && !array_key_exists($account->account_customerId, $customerColor)) {
|
||||
$customerColor[$account->account_customerId] = '#'.$colors[$color];
|
||||
$customerColor[$account->account_customerId] = '#' . $colors[$color];
|
||||
}
|
||||
|
||||
//$hexColor = $customerColor[$account->account_customerId][0];
|
||||
@@ -218,7 +218,7 @@ foreach ($resQuery as $account) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($account->account_notes){
|
||||
if ($account->account_notes) {
|
||||
$strAccNotes = (strlen($account->account_notes) > 300) ? substr($account->account_notes, 0, 300) . "..." : $account->account_notes;
|
||||
$strAccNotes = nl2br(wordwrap(htmlspecialchars($strAccNotes), 50, '<br>', true));
|
||||
}
|
||||
@@ -334,17 +334,17 @@ SP_Html::printQuerySearchNavBar($sortKey, $arrSearchFilter["limitStart"], $objAc
|
||||
<script>
|
||||
passToClip = 0;
|
||||
|
||||
var client = new ZeroClipboard( $('.clip_pass_button'), {
|
||||
var client = new ZeroClipboard($('.clip_pass_button'), {
|
||||
moviePath: "js/ZeroClipboard.swf",
|
||||
debug: false
|
||||
});
|
||||
|
||||
//client.setText(data);
|
||||
client.on( 'load', function(client) {
|
||||
client.on('load', function (client) {
|
||||
$('#global-zeroclipboard-html-bridge').attr('rel', 'tooltip').attr('title', '<?php echo _('Copiar Clave en Portapapeles'); ?>');
|
||||
});
|
||||
|
||||
client.on( "complete", function(client, args) {
|
||||
client.on("complete", function (client, args) {
|
||||
resMsg("ok", "<?php echo _('Clave Copiada al Portapapeles'); ?>");
|
||||
});
|
||||
</script>
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
*/
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('GET');
|
||||
|
||||
@@ -40,7 +40,7 @@ if ( ! $userId ) {
|
||||
|
||||
$strError = '<div id="fancyView" class="msgError">'._('No tiene permisos para realizar esta operación').'</div>';
|
||||
|
||||
SP_ACL::checkUserAccess("acceditpass",$userId) || die ($strError);
|
||||
SP_ACL::checkUserAccess("acceditpass", $userId) || die ($strError);
|
||||
|
||||
?>
|
||||
|
||||
@@ -54,7 +54,8 @@ SP_ACL::checkUserAccess("acceditpass",$userId) || die ($strError);
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="password" id="usrpass" name="pass" title="<?php echo _('Clave'); ?>" class="txtpass" OnFocus="$('#passLevel').show(); $('#resFancyAccion').hide();" OnKeyUp="checkPassLevel(this.value, 'fancyContainer')" />
|
||||
<img id="passGen" src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria'); ?>" class="inputImg" />
|
||||
<img id="passGen" src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria'); ?>"
|
||||
class="inputImg"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -62,7 +63,7 @@ SP_ACL::checkUserAccess("acceditpass",$userId) || die ($strError);
|
||||
<?php echo _('Clave (repetir)'); ?></td>
|
||||
<td class="valField">
|
||||
<input type="password" id="usrpassv" name="passv" title="<?php echo _('Clave (repetir)'); ?>" class="txtpassv" />
|
||||
<span class="passLevel fullround" title="<?php echo _('Nivel de fortaleza de la clave'); ?>" ></span>
|
||||
<span class="passLevel fullround" title="<?php echo _('Nivel de fortaleza de la clave'); ?>"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -78,13 +79,14 @@ SP_ACL::checkUserAccess("acceditpass",$userId) || die ($strError);
|
||||
<div class="action-in-box">
|
||||
<ul>
|
||||
<li>
|
||||
<img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="appMgmtSave('frmUpdUsrPass')" alt="<?php echo _('Guardar'); ?>"/>
|
||||
<img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg"
|
||||
OnClick="appMgmtSave('frmUpdUsrPass')" alt="<?php echo _('Guardar'); ?>"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#passGen').click(function(){
|
||||
$('#passGen').click(function () {
|
||||
$('#resFancyAccion').hide();
|
||||
password(11, true, false, 'fancyContainer');
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
define('APP_ROOT', '..');
|
||||
require_once APP_ROOT.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'init.php';
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'init.php';
|
||||
|
||||
SP_Util::checkReferer('POST');
|
||||
|
||||
@@ -84,7 +84,7 @@ if (!$isHistory && $fullTxt) {
|
||||
SP_Log::wrLogInfo($message);
|
||||
}
|
||||
|
||||
$accountPass = htmlentities(trim($accountClearPass),ENT_COMPAT,'UTF-8');
|
||||
$accountPass = htmlentities(trim($accountClearPass), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
if ($fullTxt) {
|
||||
?>
|
||||
@@ -100,7 +100,7 @@ if ($fullTxt) {
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
} else {
|
||||
echo $accountPass;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
.alertify {
|
||||
background: #FFF;
|
||||
border: 10px solid #333; /* browsers that don't support rgba */
|
||||
border: 10px solid rgba(0,0,0,.3);
|
||||
border: 10px solid rgba(0, 0, 0, .3);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 3px 3px rgba(0,0,0,.3);
|
||||
-webkit-background-clip: padding; /* Safari 4? Chrome 6? */
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -1,18 +1,86 @@
|
||||
div.tagsinput { border:1px solid #CCC; background: #FFF; padding:5px; width:300px; height:100px; overflow-y: auto;}
|
||||
div.tagsinput span.tag { border: 1px solid #a5d24a; -moz-border-radius:2px; -webkit-border-radius:2px; display: block; float: left; padding: 5px; text-decoration:none; background: #cde69c; color: #638421; margin-right: 5px; margin-bottom:5px;font-family: helvetica; font-size:13px;}
|
||||
div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:none; font-size: 11px; }
|
||||
div.tagsinput input { width:80px; margin:0px; font-family: helvetica; font-size: 13px; border:1px solid transparent; padding:5px; background: transparent; color: #000; outline:0px; margin-right:5px; margin-bottom:5px; }
|
||||
div.tagsinput div { display:block; float: left; }
|
||||
.tags_clear { clear: both; width: 100%; height: 0px; }
|
||||
.not_valid {background: #FBD8DB !important; color: #90111A !important;}
|
||||
div.tagsinput {
|
||||
border: 1px solid #CCC;
|
||||
background: #FFF;
|
||||
padding: 5px;
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
div.tagsinput {border: 1px solid #DFDFDF; background-color: #FFFEF0; box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset; border-radius: 5px; }
|
||||
div.tagsinput span.tag{width: 62px;}
|
||||
div.tagsinput input{width: 120px;}
|
||||
div.tagsinput span.tag {
|
||||
border: 1px solid #a5d24a;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 5px;
|
||||
text-decoration: none;
|
||||
background: #cde69c;
|
||||
color: #638421;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
font-family: helvetica;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
div.tagsinput span.tag a {
|
||||
font-weight: bold;
|
||||
color: #82ad2b;
|
||||
text-decoration: none;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
div.tagsinput input {
|
||||
width: 80px;
|
||||
margin: 0px;
|
||||
font-family: helvetica;
|
||||
font-size: 13px;
|
||||
border: 1px solid transparent;
|
||||
padding: 5px;
|
||||
background: transparent;
|
||||
color: #000;
|
||||
outline: 0px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
div.tagsinput div {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.tags_clear {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.not_valid {
|
||||
background: #FBD8DB !important;
|
||||
color: #90111A !important;
|
||||
}
|
||||
|
||||
div.tagsinput {
|
||||
border: 1px solid #DFDFDF;
|
||||
background-color: #FFFEF0;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
div.tagsinput span.tag {
|
||||
width: 62px;
|
||||
}
|
||||
|
||||
div.tagsinput input {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
div.tagsinput span.tag {
|
||||
background: url("smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png") repeat-x scroll 50% 50% #E6E6E6;
|
||||
border: 1px solid #D3D3D3;
|
||||
color: #555555;
|
||||
}
|
||||
div.tagsinput span.tag a {color: #555555;}
|
||||
|
||||
div.tagsinput span.tag a {
|
||||
color: #555555;
|
||||
}
|
||||
@@ -1,8 +1,16 @@
|
||||
#content #data-search .account-info img,
|
||||
#content #data-search .account-actions img {width: 24px; height: 24px;margin: 0 0.5em;}
|
||||
#content #data-search .account-actions img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin: 0 0.5em;
|
||||
}
|
||||
|
||||
#content #data-search {text-align: center; padding: 0.5em 0;}
|
||||
#content #data-search .account-label{
|
||||
#content #data-search {
|
||||
text-align: center;
|
||||
padding: 0.5em 0;
|
||||
}
|
||||
|
||||
#content #data-search .account-label {
|
||||
width: 95%;
|
||||
height: 70px;
|
||||
text-align: left;
|
||||
@@ -13,19 +21,53 @@
|
||||
background-color: #fcfcfc;
|
||||
display: inline-block;
|
||||
}
|
||||
#content #data-search .account-label .label-field{float: left; width: 18%; height: 3em;}
|
||||
#content #data-search .account-label .field-name{float: left; width: 80px; padding: 0.3em 0.2em; color: #b9b9b9; display: none}
|
||||
#content #data-search .account-label .field-text{float: left; width: 95%; padding: 0.3em 0.3em; word-wrap: break-word;}
|
||||
#content #data-search .account-label .header .field-name{color: white; font-weight: bold}
|
||||
|
||||
#content #data-search .account-label .field-text a{color: #4895FA}
|
||||
#content #data-search .account-label .label-field {
|
||||
float: left;
|
||||
width: 18%;
|
||||
height: 3em;
|
||||
}
|
||||
|
||||
#content #data-search .account-label .field-name {
|
||||
float: left;
|
||||
width: 80px;
|
||||
padding: 0.3em 0.2em;
|
||||
color: #b9b9b9;
|
||||
display: none
|
||||
}
|
||||
|
||||
#content #data-search .account-label .field-text {
|
||||
float: left;
|
||||
width: 95%;
|
||||
padding: 0.3em 0.3em;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#content #data-search .account-label .header .field-name {
|
||||
color: white;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
#content #data-search .account-label .field-text a {
|
||||
color: #4895FA
|
||||
}
|
||||
|
||||
#content #data-search .account-label .no-link,
|
||||
#content #data-search .account-label .no-link a{color: white; font-weight: bold;}
|
||||
#content #data-search .account-label .no-link a {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#content #data-search .account-label .field-customer .field-text{height: 2.5em; width: 95%;}
|
||||
#content #data-search .account-label .field-category{width: 10% !important;}
|
||||
#content #data-search .account-label .field-customer .field-text {
|
||||
height: 2.5em;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
#content #data-search .account-info{
|
||||
#content #data-search .account-label .field-category {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
#content #data-search .account-info {
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 20%;
|
||||
@@ -36,7 +78,7 @@
|
||||
border: none;
|
||||
}
|
||||
|
||||
#content #data-search .account-actions{
|
||||
#content #data-search .account-actions {
|
||||
float: right;
|
||||
position: relative;
|
||||
top: -3em;
|
||||
@@ -47,8 +89,20 @@
|
||||
text-align: right;
|
||||
/*border-top: 1px solid #c9c9c9;*/
|
||||
background-color: transparent;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.075) inset;
|
||||
}
|
||||
#content #data-search .account-actions img{margin:3px 5px;}
|
||||
#content .actions-optional{display: none;}
|
||||
#content #data-search .account-spacer{float: left; clear: left; height: 2em; width: 20%}
|
||||
|
||||
#content #data-search .account-actions img {
|
||||
margin: 3px 5px;
|
||||
}
|
||||
|
||||
#content .actions-optional {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #data-search .account-spacer {
|
||||
float: left;
|
||||
clear: left;
|
||||
height: 2em;
|
||||
width: 20%
|
||||
}
|
||||
1720
css/smoothness/jquery-ui.css
vendored
1720
css/smoothness/jquery-ui.css
vendored
File diff suppressed because one or more lines are too long
@@ -1750,11 +1750,22 @@ fieldset.warning a {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#whatsNewIcon {text-align: center;}
|
||||
#whatsNewIcon img{width: 64px; height: 64px;}
|
||||
#whatsNewIcon h2{display: inline-block; color: #555; font-size: 16px;}
|
||||
#whatsNewIcon {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#whatsNew{
|
||||
#whatsNewIcon img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
#whatsNewIcon h2 {
|
||||
display: inline-block;
|
||||
color: #555;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#whatsNew {
|
||||
margin: 0 auto;
|
||||
width: 500px;
|
||||
background-color: #fffde1;
|
||||
@@ -1767,7 +1778,11 @@ fieldset.warning a {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#whatsNew ul{padding: 0; border: none;}
|
||||
#whatsNew ul {
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#whatsNew li {
|
||||
padding-left: 37px;
|
||||
background: url("../imgs/arrow-list.png") left center no-repeat;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -204,7 +204,7 @@ class SP_Account
|
||||
}
|
||||
|
||||
if (!$isAdmin && !$globalSearch) {
|
||||
$arrFilterUser[] = "account_userGroupId = " . (int) $searchFilter["groupId"];
|
||||
$arrFilterUser[] = "account_userGroupId = " . (int)$searchFilter["groupId"];
|
||||
$arrFilterUser[] = "account_userId = " . $searchFilter["userId"];
|
||||
$arrFilterUser[] = "accgroup_groupId = " . $searchFilter["groupId"];
|
||||
$arrFilterUser[] = "accuser_userId = " . $searchFilter["userId"];
|
||||
@@ -327,7 +327,7 @@ class SP_Account
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $isRestore ){
|
||||
if (!$isRestore) {
|
||||
$message['action'] = _('Actualizar Cuenta');
|
||||
|
||||
if (!SP_Groups::updateGroupsForAccount($this->accountId, $this->accountUserGroupsId)) {
|
||||
@@ -557,7 +557,7 @@ class SP_Account
|
||||
|
||||
$message['action'] = __FUNCTION__;
|
||||
|
||||
if ( is_array($this->accountUserGroupsId) ){
|
||||
if (is_array($this->accountUserGroupsId)) {
|
||||
if (!SP_Groups::addGroupsForAccount($this->accountId, $this->accountUserGroupsId)) {
|
||||
$message['text'][] = _('Error al actualizar los grupos secundarios');
|
||||
SP_Log::wrLogInfo($message);
|
||||
@@ -565,7 +565,7 @@ class SP_Account
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_array($this->accountUsersId) ){
|
||||
if (is_array($this->accountUsersId)) {
|
||||
if (!SP_Users::addUsersForAccount($this->accountId, $this->accountUsersId)) {
|
||||
$message['text'][] = _('Error al actualizar los usuarios de la cuenta');
|
||||
SP_Log::wrLogInfo($message);
|
||||
@@ -1026,7 +1026,7 @@ class SP_Account
|
||||
/**
|
||||
* Actualiza la clave del histórico de una cuenta en la BBDD.
|
||||
*
|
||||
* @param int $id con el id del registro a actualizar
|
||||
* @param int $id con el id del registro a actualizar
|
||||
* @param string $newHash con el hash de la clave maestra
|
||||
* @return bool
|
||||
*/
|
||||
@@ -1081,19 +1081,19 @@ class SP_Account
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty($this->accountModHash) ){
|
||||
$hashItems = $this->accountModHash.(int)$users.(int)$groups;
|
||||
if (!empty($this->accountModHash)) {
|
||||
$hashItems = $this->accountModHash . (int)$users . (int)$groups;
|
||||
//error_log("HASH MySQL: ".$hashItems);
|
||||
} else{
|
||||
$hashItems = $this->accountName.
|
||||
$this->accountCategoryId.
|
||||
$this->accountCustomerId.
|
||||
$this->accountLogin.
|
||||
$this->accountUrl.
|
||||
$this->accountNotes.
|
||||
$this->accountOtherUserEdit.
|
||||
$this->accountOtherGroupEdit.
|
||||
(int)$users.
|
||||
} else {
|
||||
$hashItems = $this->accountName .
|
||||
$this->accountCategoryId .
|
||||
$this->accountCustomerId .
|
||||
$this->accountLogin .
|
||||
$this->accountUrl .
|
||||
$this->accountNotes .
|
||||
$this->accountOtherUserEdit .
|
||||
$this->accountOtherGroupEdit .
|
||||
(int)$users .
|
||||
(int)$groups;
|
||||
//error_log("HASH PHP: ".$hashItems);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -41,7 +41,7 @@ class SP_ACL
|
||||
* en la variable de sesión.
|
||||
*
|
||||
* @param string $strAction con el nombre de la acción
|
||||
* @param int $userId opcional, con el Id del usuario
|
||||
* @param int $userId opcional, con el Id del usuario
|
||||
* @return bool
|
||||
*/
|
||||
public static function checkUserAccess($strAction, $userId = 0)
|
||||
@@ -111,7 +111,7 @@ class SP_ACL
|
||||
/**
|
||||
* Comprueba los permisos de acceso a una cuenta.
|
||||
*
|
||||
* @param string $action con la acción realizada
|
||||
* @param string $action con la acción realizada
|
||||
* @param array $accountData con los datos de la cuenta a verificar
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -38,7 +38,7 @@ class SP_Auth
|
||||
* Autentificación de usuarios con LDAP.
|
||||
*
|
||||
* @param string $userLogin con el login del usuario
|
||||
* @param string $userPass con la clave del usuario
|
||||
* @param string $userPass con la clave del usuario
|
||||
* @return int|bool Número de error o boolean
|
||||
*/
|
||||
public static function authUserLDAP($userLogin, $userPass)
|
||||
@@ -141,7 +141,7 @@ class SP_Auth
|
||||
* se ejecuta el proceso para actualizar la clave.
|
||||
*
|
||||
* @param string $userLogin con el login del usuario
|
||||
* @param string $userPass con la clave del usuario
|
||||
* @param string $userPass con la clave del usuario
|
||||
* @return bool
|
||||
*/
|
||||
public static function authUserMySQL($userLogin, $userPass)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -155,11 +155,11 @@ class SP_Backup
|
||||
private static function backupApp($backupFile)
|
||||
{
|
||||
if (!class_exists('PharData')) {
|
||||
if(SP_Util::runningOnWindows()){
|
||||
if (SP_Util::runningOnWindows()) {
|
||||
throw new Exception(_('Esta operación sólo es posible en entornos Linux'));
|
||||
}
|
||||
|
||||
if(!self::backupAppLegacyLinux($backupFile)){
|
||||
if (!self::backupAppLegacyLinux($backupFile)) {
|
||||
throw new Exception(_('Error al realizar backup en modo compatibilidad'));
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class SP_Backup
|
||||
$compressedFile = $backupFile . '.gz';
|
||||
|
||||
try {
|
||||
if (file_exists($compressedFile)){
|
||||
if (file_exists($compressedFile)) {
|
||||
unlink($compressedFile);
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ class SP_Category
|
||||
/**
|
||||
* Obtiene el listado de categorías.
|
||||
*
|
||||
* @param int $id con el Id de la categoría
|
||||
* @param int $id con el Id de la categoría
|
||||
* @param bool $retAssocArray para devolver un array asociativo
|
||||
* @return array con en id de categorioa como clave y en nombre como valor
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ class SP_Common
|
||||
*
|
||||
* @param array $message con el nombre de la accióm y el texto del mensaje
|
||||
* @param string $mailTo con el destinatario
|
||||
* @param bool $isEvent para indicar si es um
|
||||
* @param bool $isEvent para indicar si es um
|
||||
* @return bool
|
||||
*/
|
||||
public static function sendEmail($message, $mailTo = '', $isEvent = true)
|
||||
@@ -177,8 +177,8 @@ class SP_Common
|
||||
* Devuelve una respuesta en formato JSON con el estado y el mensaje.
|
||||
*
|
||||
* @param string $description mensaje a devolver
|
||||
* @param int $status devuelve el estado
|
||||
* @param string $action con la accion a realizar
|
||||
* @param int $status devuelve el estado
|
||||
* @param string $action con la accion a realizar
|
||||
* @return bool
|
||||
*/
|
||||
public static function printJSON($description, $status = 1, $action = '')
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -220,7 +220,7 @@ class SP_Config
|
||||
return true;
|
||||
}
|
||||
|
||||
$configFile = SP_Init::$SERVERROOT . DIRECTORY_SEPARATOR . 'config'. DIRECTORY_SEPARATOR . 'config.php';
|
||||
$configFile = SP_Init::$SERVERROOT . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
|
||||
|
||||
if (!file_exists($configFile)) {
|
||||
return false;
|
||||
@@ -340,7 +340,7 @@ class SP_Config
|
||||
self::setValue('ldap_userattr', '');
|
||||
self::setValue('mail_server', '');
|
||||
self::setValue('mail_from', '');
|
||||
self::setValue('site_lang', str_replace('.utf8','',SP_Init::$LANG));
|
||||
self::setValue('site_lang', str_replace('.utf8', '', SP_Init::$LANG));
|
||||
self::setValue('session_timeout', '300');
|
||||
self::setValue('account_link', 1);
|
||||
self::setValue('account_count', 12);
|
||||
@@ -351,7 +351,7 @@ class SP_Config
|
||||
* Esta función establece el valor y reescribe config.php. Si el archivo
|
||||
* no se puede escribir, devolverá false.
|
||||
*
|
||||
* @param string $key clave
|
||||
* @param string $key clave
|
||||
* @param string $value valor
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -59,7 +59,7 @@ class SP_Crypt
|
||||
/**
|
||||
* Comprobar el hash de una clave.
|
||||
*
|
||||
* @param string $pwd con la clave a comprobar
|
||||
* @param string $pwd con la clave a comprobar
|
||||
* @param string $correctHash con el hash a comprobar
|
||||
* @return bool
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ class SP_Crypt
|
||||
* Generar una clave encriptada.
|
||||
* Esta función llama a los métodos privados para encriptar datos.
|
||||
*
|
||||
* @param string $pwd con la clave a encriptar
|
||||
* @param string $pwd con la clave a encriptar
|
||||
* @param string $masterPwd con la clave maestra
|
||||
* @return bool
|
||||
*/
|
||||
@@ -166,9 +166,9 @@ class SP_Crypt
|
||||
/**
|
||||
* Encriptar datos con la clave maestra.
|
||||
*
|
||||
* @param string $strValue con los datos a encriptar
|
||||
* @param string $strValue con los datos a encriptar
|
||||
* @param string $strPassword con la clave maestra
|
||||
* @param string $cryptIV con el IV
|
||||
* @param string $cryptIV con el IV
|
||||
* @return string con los datos encriptados
|
||||
*/
|
||||
private static function encrypt($strValue, $strPassword, $cryptIV)
|
||||
@@ -204,7 +204,8 @@ class SP_Crypt
|
||||
*
|
||||
* @return resource
|
||||
*/
|
||||
private static function getMcryptResource(){
|
||||
private static function getMcryptResource()
|
||||
{
|
||||
return mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -234,7 +234,7 @@ class SP_Customer
|
||||
/**
|
||||
* Obtener el listado de clientes.
|
||||
*
|
||||
* @param int $customerId con el Id del cliente
|
||||
* @param int $customerId con el Id del cliente
|
||||
* @param bool $retAssocArray para devolver un array asociativo
|
||||
* @return array con el id de cliente como clave y el nombre como valor
|
||||
*/
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -121,11 +121,11 @@ class DB
|
||||
/**
|
||||
* Obtener los datos para generar un select.
|
||||
*
|
||||
* @param string $tblName con el nombre de la tabla a cunsultar
|
||||
* @param string $tblColId con el nombre de la columna del tipo Id a mostrar
|
||||
* @param string $tblName con el nombre de la tabla a cunsultar
|
||||
* @param string $tblColId con el nombre de la columna del tipo Id a mostrar
|
||||
* @param string $tblColName con el nombre de la columna del tipo Name a mostrar
|
||||
* @param array $arrFilter con las columnas a filtrar
|
||||
* @param array $arrOrder con el orden de las columnas
|
||||
* @param array $arrFilter con las columnas a filtrar
|
||||
* @param array $arrOrder con el orden de las columnas
|
||||
* @return false|array con los valores del select con el Id como clave y el nombre como valor
|
||||
*/
|
||||
public static function getValuesForSelect($tblName, $tblColId, $tblColName, $arrFilter = NULL, $arrOrder = NULL)
|
||||
@@ -158,7 +158,7 @@ class DB
|
||||
*
|
||||
* @param string $query con la consulta a realizar
|
||||
* @param string $querySource con el nombre de la función que realiza la consulta
|
||||
* @param bool $retArray devolver un array si la consulta tiene esultados
|
||||
* @param bool $retArray devolver un array si la consulta tiene esultados
|
||||
* @param bool $unbuffered devolver el resultado registro a registro
|
||||
* @return bool|array devuelve bool si hay un error. Devuelve array con el array de registros devueltos
|
||||
*/
|
||||
@@ -186,9 +186,9 @@ class DB
|
||||
/**
|
||||
* Realizar una consulta a la BBDD.
|
||||
*
|
||||
* @param string $query con la consulta a realizar
|
||||
* @param string $query con la consulta a realizar
|
||||
* @param string $querySource con el nombre de la función que realiza la consulta
|
||||
* @param bool $unbuffered realizar la consulta para obtener registro a registro
|
||||
* @param bool $unbuffered realizar la consulta para obtener registro a registro
|
||||
* @return false|int devuelve bool si hay un error. Devuelve int con el número de registros
|
||||
*/
|
||||
public static function doQuery($query, $querySource, $unbuffered = false)
|
||||
|
||||
@@ -19,8 +19,8 @@ DROP TABLE IF EXISTS `accFiles`;
|
||||
CREATE TABLE `accFiles` (
|
||||
`accfile_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`accfile_accountId` smallint(5) unsigned NOT NULL,
|
||||
`accfile_name` varchar(100) NOT NULL,
|
||||
`accfile_type` varchar(100) NOT NULL,
|
||||
`accfile_name` VARCHAR(100) NOT NULL,
|
||||
`accfile_type` VARCHAR(100) NOT NULL,
|
||||
`accfile_size` int(11) NOT NULL,
|
||||
`accfile_content` mediumblob NOT NULL,
|
||||
`accfile_extension` varchar(10) NOT NULL,
|
||||
@@ -73,8 +73,8 @@ CREATE TABLE `accHistory` (
|
||||
`acchistory_isModify` bit(1) DEFAULT NULL,
|
||||
`acchistory_isDeleted` bit(1) DEFAULT NULL,
|
||||
`acchistory_mPassHash` varbinary(128) NOT NULL,
|
||||
`accHistory_otherUserEdit` bit(1) DEFAULT NULL,
|
||||
`accHistory_otherGroupEdit` varchar(45) DEFAULT NULL,
|
||||
`accHistory_otherUserEdit` BIT(1) DEFAULT NULL,
|
||||
`accHistory_otherGroupEdit` VARCHAR(45) DEFAULT NULL,
|
||||
PRIMARY KEY (`acchistory_id`),
|
||||
KEY `IDX_accountId` (`acchistory_accountId`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
|
||||
@@ -85,15 +85,18 @@ CREATE TABLE `accHistory` (
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `accUsers`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `accUsers` (
|
||||
`accuser_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`accuser_accountId` int(10) unsigned NOT NULL,
|
||||
`accuser_userId` int(10) unsigned NOT NULL,
|
||||
`accuser_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`accuser_accountId` INT(10) UNSIGNED NOT NULL,
|
||||
`accuser_userId` INT(10) UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (`accuser_id`),
|
||||
KEY `idx_account` (`accuser_accountId`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
|
||||
)
|
||||
ENGINE =InnoDB
|
||||
AUTO_INCREMENT =0
|
||||
DEFAULT CHARSET =utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
@@ -111,7 +114,7 @@ CREATE TABLE `accounts` (
|
||||
`account_customerId` int(10) unsigned NOT NULL,
|
||||
`account_name` varchar(50) NOT NULL,
|
||||
`account_categoryId` tinyint(3) unsigned NOT NULL,
|
||||
`account_login` varchar(50) DEFAULT NULL,
|
||||
`account_login` VARCHAR(50) DEFAULT NULL,
|
||||
`account_url` varchar(255) DEFAULT NULL,
|
||||
`account_pass` varbinary(32) NOT NULL,
|
||||
`account_IV` varbinary(32) NOT NULL,
|
||||
@@ -120,8 +123,8 @@ CREATE TABLE `accounts` (
|
||||
`account_countDecrypt` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`account_dateAdd` datetime NOT NULL,
|
||||
`account_dateEdit` datetime NOT NULL,
|
||||
`account_otherGroupEdit` bit(1) DEFAULT b'0',
|
||||
`account_otherUserEdit` bit(1) DEFAULT b'0',
|
||||
`account_otherGroupEdit` BIT(1) DEFAULT b'0',
|
||||
`account_otherUserEdit` BIT(1) DEFAULT b'0',
|
||||
PRIMARY KEY (`account_id`),
|
||||
KEY `IDX_categoryId` (`account_categoryId`),
|
||||
KEY `IDX_userId` (`account_userGroupId`,`account_userId`),
|
||||
@@ -140,7 +143,7 @@ DROP TABLE IF EXISTS `categories`;
|
||||
CREATE TABLE `categories` (
|
||||
`category_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`category_name` varchar(50) NOT NULL,
|
||||
`category_description` varchar(255) DEFAULT NULL,
|
||||
`category_description` VARCHAR(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@@ -153,8 +156,12 @@ DROP TABLE IF EXISTS `config`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `config` (
|
||||
`config_parameter` varchar(50) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
|
||||
`config_value` varchar(128) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
|
||||
`config_parameter` VARCHAR(50)
|
||||
CHARACTER SET utf8
|
||||
COLLATE utf8_spanish_ci NOT NULL,
|
||||
`config_value` VARCHAR(128)
|
||||
CHARACTER SET utf8
|
||||
COLLATE utf8_spanish_ci NOT NULL,
|
||||
UNIQUE KEY `vacParameter` (`config_parameter`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@@ -185,10 +192,10 @@ DROP TABLE IF EXISTS `log`;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `log` (
|
||||
`log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`log_date` int(10) unsigned NOT NULL,
|
||||
`log_date` INT(10) UNSIGNED NOT NULL,
|
||||
`log_login` varchar(25) NOT NULL,
|
||||
`log_userId` tinyint(3) unsigned NOT NULL,
|
||||
`log_ipAddress` varchar(45) NOT NULL,
|
||||
`log_ipAddress` VARCHAR(45) NOT NULL,
|
||||
`log_action` varchar(50) NOT NULL,
|
||||
`log_description` text NOT NULL,
|
||||
PRIMARY KEY (`log_id`)
|
||||
@@ -207,16 +214,16 @@ CREATE TABLE `usrData` (
|
||||
`user_name` varchar(80) NOT NULL,
|
||||
`user_groupId` tinyint(3) unsigned NOT NULL,
|
||||
`user_secGroupId` tinyint(3) unsigned DEFAULT NULL,
|
||||
`user_login` varchar(50) NOT NULL,
|
||||
`user_login` VARCHAR(50) NOT NULL,
|
||||
`user_pass` varbinary(40) NOT NULL,
|
||||
`user_mPass` varbinary(32) DEFAULT NULL,
|
||||
`user_mPass` VARBINARY(32) DEFAULT NULL,
|
||||
`user_mIV` varbinary(32) NOT NULL,
|
||||
`user_email` varchar(80) DEFAULT NULL,
|
||||
`user_email` VARCHAR(80) DEFAULT NULL,
|
||||
`user_notes` text,
|
||||
`user_count` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`user_profileId` tinyint(4) NOT NULL,
|
||||
`user_lastLogin` datetime DEFAULT NULL,
|
||||
`user_lastUpdate` datetime DEFAULT NULL,
|
||||
`user_lastLogin` DATETIME DEFAULT NULL,
|
||||
`user_lastUpdate` DATETIME DEFAULT NULL,
|
||||
`user_lastUpdateMPass` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`user_isAdminApp` bit(1) NOT NULL DEFAULT b'0',
|
||||
`user_isAdminAcc` bit(1) NOT NULL DEFAULT b'0',
|
||||
@@ -224,7 +231,7 @@ CREATE TABLE `usrData` (
|
||||
`user_isDisabled` bit(1) NOT NULL DEFAULT b'0',
|
||||
`user_hashSalt` varbinary(40) NOT NULL,
|
||||
`user_isMigrate` bit(1) DEFAULT b'0',
|
||||
`user_isChangePass` bit(1) DEFAULT b'0',
|
||||
`user_isChangePass` BIT(1) DEFAULT b'0',
|
||||
PRIMARY KEY (`user_id`),
|
||||
UNIQUE KEY `IDX_login` (`user_login`),
|
||||
KEY `IDX_pass` (`user_pass`)
|
||||
@@ -251,17 +258,20 @@ CREATE TABLE `usrGroups` (
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `usrPassRecover`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `usrPassRecover` (
|
||||
`userpassr_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`userpassr_userId` smallint(5) unsigned NOT NULL,
|
||||
`userpassr_hash` varbinary(40) NOT NULL,
|
||||
`userpassr_date` int(10) unsigned NOT NULL,
|
||||
`userpassr_used` bit(1) NOT NULL,
|
||||
`userpassr_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`userpassr_userId` SMALLINT(5) UNSIGNED NOT NULL,
|
||||
`userpassr_hash` VARBINARY(40) NOT NULL,
|
||||
`userpassr_date` INT(10) UNSIGNED NOT NULL,
|
||||
`userpassr_used` BIT(1) NOT NULL,
|
||||
PRIMARY KEY (`userpassr_id`),
|
||||
KEY `IDX_userId` (`userpassr_userId`,`userpassr_date`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
|
||||
KEY `IDX_userId` (`userpassr_userId`, `userpassr_date`)
|
||||
)
|
||||
ENGINE =InnoDB
|
||||
AUTO_INCREMENT =0
|
||||
DEFAULT CHARSET =utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
@@ -291,9 +301,9 @@ CREATE TABLE `usrProfiles` (
|
||||
`userProfile_pFiles` bit(1) DEFAULT b'0',
|
||||
`userProfile_pConfigMenu` bit(1) DEFAULT b'0',
|
||||
`userProfile_pUsersMenu` bit(1) DEFAULT b'0',
|
||||
`userProfile_pAppMgmtMenu` bit(1) DEFAULT b'0',
|
||||
`userProfile_pAppMgmtCategories` bit(1) DEFAULT b'0',
|
||||
`userProfile_pAppMgmtCustomers` bit(1) DEFAULT b'0',
|
||||
`userProfile_pAppMgmtMenu` BIT(1) DEFAULT b'0',
|
||||
`userProfile_pAppMgmtCategories` BIT(1) DEFAULT b'0',
|
||||
`userProfile_pAppMgmtCustomers` BIT(1) DEFAULT b'0',
|
||||
PRIMARY KEY (`userprofile_id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,12 +3,13 @@
|
||||
* PHPMailer RFC821 SMTP email transport class.
|
||||
* Version 5.2.7
|
||||
* PHP version 5.0.0
|
||||
*
|
||||
* @category PHP
|
||||
* @package PHPMailer
|
||||
* @link https://github.com/PHPMailer/PHPMailer/
|
||||
* @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @copyright 2013 Marcus Bointon
|
||||
* @copyright 2004 - 2008 Andy Prevost
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
@@ -30,7 +31,6 @@
|
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
|
||||
*/
|
||||
|
||||
class SMTP
|
||||
{
|
||||
/**
|
||||
@@ -50,25 +50,28 @@ class SMTP
|
||||
|
||||
/**
|
||||
* The PHPMailer SMTP Version number.
|
||||
*
|
||||
* @type string
|
||||
* @deprecated This should be a constant
|
||||
* @see SMTP::VERSION
|
||||
* @see SMTP::VERSION
|
||||
*/
|
||||
public $Version = '5.2.7';
|
||||
|
||||
/**
|
||||
* SMTP server port number.
|
||||
*
|
||||
* @type int
|
||||
* @deprecated This is only ever ued as default value, so should be a constant
|
||||
* @see SMTP::DEFAULT_SMTP_PORT
|
||||
* @see SMTP::DEFAULT_SMTP_PORT
|
||||
*/
|
||||
public $SMTP_PORT = 25;
|
||||
|
||||
/**
|
||||
* SMTP reply line ending
|
||||
*
|
||||
* @type string
|
||||
* @deprecated Use the class constant instead
|
||||
* @see SMTP::CRLF
|
||||
* @see SMTP::CRLF
|
||||
*/
|
||||
public $CRLF = "\r\n";
|
||||
|
||||
@@ -80,6 +83,7 @@ class SMTP
|
||||
* 2: data and commands
|
||||
* 3: as 2 plus connection status
|
||||
* 4: low level data output
|
||||
*
|
||||
* @type int
|
||||
*/
|
||||
public $do_debug = 0;
|
||||
@@ -87,12 +91,14 @@ class SMTP
|
||||
/**
|
||||
* The function/method to use for debugging output.
|
||||
* Options: 'echo', 'html' or 'error_log'
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
public $Debugoutput = 'echo';
|
||||
|
||||
/**
|
||||
* Whether to use VERP.
|
||||
*
|
||||
* @type bool
|
||||
*/
|
||||
public $do_verp = false;
|
||||
@@ -100,42 +106,49 @@ class SMTP
|
||||
/**
|
||||
* The timeout value for connection, in seconds.
|
||||
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2
|
||||
*
|
||||
* @type int
|
||||
*/
|
||||
public $Timeout = 300;
|
||||
|
||||
/**
|
||||
* The SMTP timelimit value for reads, in seconds.
|
||||
*
|
||||
* @type int
|
||||
*/
|
||||
public $Timelimit = 30;
|
||||
|
||||
/**
|
||||
* The socket for the server connection.
|
||||
*
|
||||
* @type resource
|
||||
*/
|
||||
protected $smtp_conn;
|
||||
|
||||
/**
|
||||
* Error message, if any, for the last call.
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $error = '';
|
||||
|
||||
/**
|
||||
* The reply the server sent to us for HELO.
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $helo_rply = '';
|
||||
|
||||
/**
|
||||
* The most recent reply received from the server.
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $last_reply = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
@@ -149,6 +162,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Output debugging info via a user-selected method.
|
||||
*
|
||||
* @param string $str Debug string to output
|
||||
* @return void
|
||||
*/
|
||||
@@ -162,23 +176,24 @@ class SMTP
|
||||
case 'html':
|
||||
//Cleans up output a bit for a better looking, HTML-safe output
|
||||
echo htmlentities(
|
||||
preg_replace('/[\r\n]+/', '', $str),
|
||||
ENT_QUOTES,
|
||||
'UTF-8'
|
||||
)
|
||||
. "<br>\n";
|
||||
preg_replace('/[\r\n]+/', '', $str),
|
||||
ENT_QUOTES,
|
||||
'UTF-8'
|
||||
)
|
||||
. "<br>\n";
|
||||
break;
|
||||
case 'echo':
|
||||
default:
|
||||
echo gmdate('Y-m-d H:i:s')."\t".trim($str)."\n";
|
||||
echo gmdate('Y-m-d H:i:s') . "\t" . trim($str) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to an SMTP server.
|
||||
* @param string $host SMTP server IP or host name
|
||||
* @param int $port The port number to connect to
|
||||
* @param int $timeout How long to wait for the connection to open
|
||||
*
|
||||
* @param string $host SMTP server IP or host name
|
||||
* @param int $port The port number to connect to
|
||||
* @param int $timeout How long to wait for the connection to open
|
||||
* @param array $options An array of options for stream_context_create()
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -258,6 +273,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Initiate a TLS (encrypted) session.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -281,7 +297,8 @@ class SMTP
|
||||
/**
|
||||
* Perform SMTP authentication.
|
||||
* Must be run after hello().
|
||||
* @see hello()
|
||||
*
|
||||
* @see hello()
|
||||
* @param string $username The user name
|
||||
* @param string $password The password
|
||||
* @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5)
|
||||
@@ -296,7 +313,8 @@ class SMTP
|
||||
$authtype = 'LOGIN',
|
||||
$realm = '',
|
||||
$workstation = ''
|
||||
) {
|
||||
)
|
||||
{
|
||||
if (empty($authtype)) {
|
||||
$authtype = 'LOGIN';
|
||||
}
|
||||
@@ -404,6 +422,7 @@ class SMTP
|
||||
* Calculate an MD5 HMAC hash.
|
||||
* Works like hash_hmac('md5', $data, $key)
|
||||
* in case that function is not available
|
||||
*
|
||||
* @param string $data The data to hash
|
||||
* @param string $key The key to hash with
|
||||
* @access protected
|
||||
@@ -438,6 +457,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Check connection state.
|
||||
*
|
||||
* @access public
|
||||
* @return bool True if connected.
|
||||
*/
|
||||
@@ -463,7 +483,8 @@ class SMTP
|
||||
/**
|
||||
* Close the socket and clean up the state of the class.
|
||||
* Don't use this function without first trying to use QUIT.
|
||||
* @see quit()
|
||||
*
|
||||
* @see quit()
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -489,6 +510,7 @@ class SMTP
|
||||
* on a single line followed by a <CRLF> with the message headers
|
||||
* and the message body being separated by and additional <CRLF>.
|
||||
* Implements rfc 821: DATA <CRLF>
|
||||
*
|
||||
* @param string $msg_data Message data to send
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -582,6 +604,7 @@ class SMTP
|
||||
* This makes sure that client and server are in a known state.
|
||||
* Implements from RFC 821: HELO <SP> <domain> <CRLF>
|
||||
* and RFC 2821 EHLO.
|
||||
*
|
||||
* @param string $host The host name or IP to connect to
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -601,7 +624,8 @@ class SMTP
|
||||
/**
|
||||
* Send an SMTP HELO or EHLO command.
|
||||
* Low-level implementation used by hello()
|
||||
* @see hello()
|
||||
*
|
||||
* @see hello()
|
||||
* @param string $hello The HELO string
|
||||
* @param string $host The hostname to say we are
|
||||
* @access protected
|
||||
@@ -621,6 +645,7 @@ class SMTP
|
||||
* the mail transaction is started and then one or more recipient
|
||||
* commands may be called followed by a data command.
|
||||
* Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
|
||||
*
|
||||
* @param string $from Source address of this message
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -639,6 +664,7 @@ class SMTP
|
||||
* Send an SMTP QUIT command.
|
||||
* Closes the socket if there is no error or the $close_on_error argument is true.
|
||||
* Implements from rfc 821: QUIT <CRLF>
|
||||
*
|
||||
* @param bool $close_on_error Should the connection close if an error occurs?
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -659,6 +685,7 @@ class SMTP
|
||||
* Sets the TO argument to $to.
|
||||
* Returns true if the recipient was accepted false if it was rejected.
|
||||
* Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
|
||||
*
|
||||
* @param string $to The address the message is being sent to
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -676,6 +703,7 @@ class SMTP
|
||||
* Send an SMTP RSET command.
|
||||
* Abort any transaction that is currently in progress.
|
||||
* Implements rfc 821: RSET <CRLF>
|
||||
*
|
||||
* @access public
|
||||
* @return bool True on success.
|
||||
*/
|
||||
@@ -686,6 +714,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Send a command to an SMTP server and check its return code.
|
||||
*
|
||||
* @param string $command The command name - not sent to the server
|
||||
* @param string $commandstring The actual command to send
|
||||
* @param int|array $expect One or more expected integer success codes
|
||||
@@ -738,6 +767,7 @@ class SMTP
|
||||
* will send the message to the users terminal if they are logged
|
||||
* in and send them an email.
|
||||
* Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
|
||||
*
|
||||
* @param string $from The address the message is from
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -749,6 +779,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Send an SMTP VRFY command.
|
||||
*
|
||||
* @param string $name The name to verify
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -761,6 +792,7 @@ class SMTP
|
||||
/**
|
||||
* Send an SMTP NOOP command.
|
||||
* Used to keep keep-alives alive, doesn't actually do anything
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -775,6 +807,7 @@ class SMTP
|
||||
* This method is here to make the RFC821 Definition
|
||||
* complete for this class and __may__ be implemented in future
|
||||
* Implements from rfc 821: TURN <CRLF>
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -791,6 +824,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Send raw data to the server.
|
||||
*
|
||||
* @param string $data The data to send
|
||||
* @access public
|
||||
* @return int|bool The number of bytes sent to the server or false on error
|
||||
@@ -805,6 +839,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Get the latest error.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -815,6 +850,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Get the last reply from the server.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -829,6 +865,7 @@ class SMTP
|
||||
* With SMTP we can tell if we have more lines to read if the
|
||||
* 4th character is '-' symbol. If it is a space then we don't
|
||||
* need to read anything else.
|
||||
*
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
@@ -886,6 +923,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Enable or disable VERP address generation.
|
||||
*
|
||||
* @param bool $enabled
|
||||
*/
|
||||
public function setVerp($enabled = false)
|
||||
@@ -895,6 +933,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Get VERP address generation mode.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getVerp()
|
||||
@@ -904,6 +943,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Set debug output method.
|
||||
*
|
||||
* @param string $method The function/method to use for debugging output.
|
||||
*/
|
||||
public function setDebugOutput($method = 'echo')
|
||||
@@ -913,6 +953,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Get debug output method.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDebugOutput()
|
||||
@@ -922,6 +963,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Set debug output level.
|
||||
*
|
||||
* @param int $level
|
||||
*/
|
||||
public function setDebugLevel($level = 0)
|
||||
@@ -931,6 +973,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Get debug output level.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDebugLevel()
|
||||
@@ -940,6 +983,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Set SMTP timeout.
|
||||
*
|
||||
* @param int $timeout
|
||||
*/
|
||||
public function setTimeout($timeout = 0)
|
||||
@@ -949,6 +993,7 @@ class SMTP
|
||||
|
||||
/**
|
||||
* Get SMTP timeout.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getTimeout()
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -67,7 +67,7 @@ class SP_Groups
|
||||
/**
|
||||
* Obtener los grupos de usuarios.
|
||||
*
|
||||
* @param int $groupId opcional, con el Id del grupo a consultar
|
||||
* @param int $groupId opcional, con el Id del grupo a consultar
|
||||
* @param bool $returnArray opcional, si se debe de devolver un array asociativo
|
||||
* @return false|array con la lista de grupos
|
||||
*/
|
||||
@@ -341,7 +341,7 @@ class SP_Groups
|
||||
/**
|
||||
* Actualizar la asociación de grupos con cuentas.
|
||||
*
|
||||
* @param int $accountId con el Id de la cuenta
|
||||
* @param int $accountId con el Id de la cuenta
|
||||
* @param array $groupsId con los grupos de la cuenta
|
||||
* @return bool
|
||||
*/
|
||||
@@ -357,7 +357,7 @@ class SP_Groups
|
||||
/**
|
||||
* Eliminar la asociación de grupos con cuentas.
|
||||
*
|
||||
* @param int $accountId con el Id de la cuenta
|
||||
* @param int $accountId con el Id de la cuenta
|
||||
* @param array $groupsId opcional con los grupos de la cuenta
|
||||
* @return bool
|
||||
*/
|
||||
@@ -385,7 +385,7 @@ class SP_Groups
|
||||
/**
|
||||
* Crear asociación de grupos con cuentas.
|
||||
*
|
||||
* @param int $accountId con el Id de la cuenta
|
||||
* @param int $accountId con el Id de la cuenta
|
||||
* @param array $groupsId con los grupos de la cuenta
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -176,7 +176,7 @@ class SP_Html
|
||||
public static function setCss()
|
||||
{
|
||||
$visualStyle = SP_Util::resultsCardsIsEnabled();
|
||||
$versionParameter = md5(implode(SP_Util::getVersion()).$visualStyle);
|
||||
$versionParameter = md5(implode(SP_Util::getVersion()) . $visualStyle);
|
||||
|
||||
self::$htmlPage[] = '<link rel="stylesheet" href="' . SP_Init::$WEBROOT . '/css/css.php?v=' . $versionParameter . '" />';
|
||||
}
|
||||
@@ -240,7 +240,7 @@ class SP_Html
|
||||
* Cargar un archivo de plantilla.
|
||||
*
|
||||
* @param string $template con el nombre de la plantilla
|
||||
* @param array $tplvars con los datos a pasar a la plantilla
|
||||
* @param array $tplvars con los datos a pasar a la plantilla
|
||||
* @return none
|
||||
*/
|
||||
public static function getTemplate($template, $tplvars = array())
|
||||
@@ -399,7 +399,7 @@ class SP_Html
|
||||
* Truncar un texto a una determinada longitud.
|
||||
*
|
||||
* @param string $str con la cadena a truncar
|
||||
* @param int $len con la longitud máxima de la cadena
|
||||
* @param int $len con la longitud máxima de la cadena
|
||||
* @return string con el texto truncado
|
||||
*/
|
||||
public static function truncate($str, $len)
|
||||
@@ -457,7 +457,7 @@ class SP_Html
|
||||
* Devolver una tabla con el resultado de una consulta y acciones.
|
||||
*
|
||||
* @param array $arrTableProp con las propiedades de la tabla
|
||||
* @param array $queryItems con los resultados de la consulta
|
||||
* @param array $queryItems con los resultados de la consulta
|
||||
* @return none
|
||||
*/
|
||||
public static function getQueryTable($arrTableProp, $queryItems)
|
||||
@@ -564,9 +564,9 @@ class SP_Html
|
||||
/**
|
||||
* Devolver un link HTML.
|
||||
*
|
||||
* @param string $text con la cadena de texto
|
||||
* @param string $link con el destino del enlace
|
||||
* @param string $title con el título del enlace
|
||||
* @param string $text con la cadena de texto
|
||||
* @param string $link con el destino del enlace
|
||||
* @param string $title con el título del enlace
|
||||
* @param string $attribs con atributos del enlace
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -124,7 +124,7 @@ class SP_Import
|
||||
throw new ImportException('critical', _('Error interno al leer el archivo'), _('Compruebe la configuración de PHP para subir archivos'));
|
||||
}
|
||||
|
||||
if ($fileData['type'] === 'text/csv' || $fileData['type'] === 'application/vnd.ms-excel'){
|
||||
if ($fileData['type'] === 'text/csv' || $fileData['type'] === 'application/vnd.ms-excel') {
|
||||
// Leemos el archivo a un array
|
||||
self::$fileContent = file($tmpName);
|
||||
|
||||
@@ -133,11 +133,11 @@ class SP_Import
|
||||
}
|
||||
// Obtenemos las cuentas desde el archivo CSV
|
||||
self::parseFileData();
|
||||
} elseif ($fileData['type'] === 'text/xml'){
|
||||
} elseif ($fileData['type'] === 'text/xml') {
|
||||
self::$tmpFile = $tmpName;
|
||||
// Analizamos el XML y seleccionamos el formato a importar
|
||||
self::detectXMLFormat();
|
||||
} else{
|
||||
} else {
|
||||
throw new ImportException('critical', _('Tipo mime no soportado'), _('Compruebe el formato del archivo'));
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class SP_Import
|
||||
throw new ImportException('critical', _('El número de campos es incorrecto'), _('Compruebe el formato del archivo CSV'));
|
||||
}
|
||||
|
||||
if (!self::addAccountData($fields)){
|
||||
if (!self::addAccountData($fields)) {
|
||||
$message['action'] = _('Importar Cuentas');
|
||||
$message['text'][] = _('Error importando cuenta');
|
||||
$message['text'][] = $data;
|
||||
@@ -231,7 +231,7 @@ class SP_Import
|
||||
*/
|
||||
private static function encryptPass($password)
|
||||
{
|
||||
if (empty($password)){
|
||||
if (empty($password)) {
|
||||
return array('pass' => '', 'IV' => '');
|
||||
}
|
||||
|
||||
@@ -260,9 +260,9 @@ class SP_Import
|
||||
*/
|
||||
private static function readXMLFile()
|
||||
{
|
||||
if ($xmlFile = simplexml_load_file(self::$tmpFile)){
|
||||
if ($xmlFile = simplexml_load_file(self::$tmpFile)) {
|
||||
return $xmlFile;
|
||||
} else{
|
||||
} else {
|
||||
throw new ImportException('critical', _('Error interno'), _('No es posible procesar el archivo XML'));
|
||||
}
|
||||
}
|
||||
@@ -277,9 +277,9 @@ class SP_Import
|
||||
{
|
||||
$xml = self::readXMLFile();
|
||||
|
||||
if ( $xml->Meta->Generator == 'KeePass' ){
|
||||
if ($xml->Meta->Generator == 'KeePass') {
|
||||
SP_KeePassImport::addKeepassAccounts($xml);
|
||||
} else if ($xmlApp = self::parseFileHeader()){
|
||||
} else if ($xmlApp = self::parseFileHeader()) {
|
||||
switch ($xmlApp) {
|
||||
case 'keepassx_database':
|
||||
SP_KeePassXImport::addKeepassXAccounts($xml);
|
||||
@@ -290,7 +290,7 @@ class SP_Import
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else{
|
||||
} else {
|
||||
throw new ImportException('critical', _('Archivo XML no soportado'), _('No es posible detectar la aplicación que exportó los datos'));
|
||||
}
|
||||
}
|
||||
@@ -305,13 +305,13 @@ class SP_Import
|
||||
$handle = @fopen(self::$tmpFile, "r");
|
||||
$headersRegex = '/(KEEPASSX_DATABASE|revelationdata)/i';
|
||||
|
||||
if ( $handle ){
|
||||
if ($handle) {
|
||||
// No. de líneas a leer como máximo
|
||||
$maxLines = 5;
|
||||
$count = 0;
|
||||
|
||||
while (($buffer = fgets($handle, 4096)) !== false && $count <= $maxLines){
|
||||
if ( preg_match($headersRegex,$buffer,$app) ){
|
||||
while (($buffer = fgets($handle, 4096)) !== false && $count <= $maxLines) {
|
||||
if (preg_match($headersRegex, $buffer, $app)) {
|
||||
fclose($handle);
|
||||
return strtolower($app[0]);
|
||||
}
|
||||
|
||||
13
inc/init.php
13
inc/init.php
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -56,6 +56,7 @@ class SP_Init
|
||||
} else {
|
||||
/**
|
||||
* Fall back to traditional autoload for old PHP versions
|
||||
*
|
||||
* @param string $classname The name of the class to load
|
||||
*/
|
||||
function __autoload($classname)
|
||||
@@ -216,7 +217,7 @@ class SP_Init
|
||||
* Establecer las rutas de la aplicación.
|
||||
* Esta función establece las rutas del sistema de archivos y web de la aplicación.
|
||||
* La variables de clase definidas son $SERVERROOT, $WEBROOT y $SUBURI
|
||||
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
private static function setPaths()
|
||||
@@ -335,7 +336,7 @@ class SP_Init
|
||||
/**
|
||||
* Devuelve un eror utilizando la plantilla de rror.
|
||||
*
|
||||
* @param string $str con la descripción del error
|
||||
* @param string $str con la descripción del error
|
||||
* @param string $hint opcional, con una ayuda sobre el error
|
||||
* @returns none
|
||||
*/
|
||||
@@ -420,8 +421,8 @@ class SP_Init
|
||||
if ($databaseVersion < $appVersion
|
||||
&& SP_Common::parseParams('g', 'nodbupgrade', 0) === 0
|
||||
) {
|
||||
if (SP_Upgrade::needDBUpgrade($databaseVersion)){
|
||||
if(!self::checkMaintenanceMode(true)) {
|
||||
if (SP_Upgrade::needDBUpgrade($databaseVersion)) {
|
||||
if (!self::checkMaintenanceMode(true)) {
|
||||
if (SP_Config::getValue('upgrade_key', 0) === 0) {
|
||||
SP_Config::setValue('upgrade_key', sha1(uniqid(mt_rand(), true)));
|
||||
SP_Config::setValue('maintenance', true);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'));
|
||||
|
||||
define('IS_INSTALLER',1);
|
||||
define('IS_INSTALLER', 1);
|
||||
|
||||
/**
|
||||
* Extender la clase Exception para mostrar ayuda en los mensajes
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -34,6 +34,7 @@ class SP_KeePassImport
|
||||
|
||||
/**
|
||||
* Iniciar la importación desde KeePass
|
||||
*
|
||||
* @param object $xml
|
||||
* @return none
|
||||
*/
|
||||
@@ -45,17 +46,17 @@ class SP_KeePassImport
|
||||
/**
|
||||
* Obtener los datos de las entradas de KeePass.
|
||||
*
|
||||
* @param object $entries con el objeto XML con las entradas
|
||||
* @param object $entries con el objeto XML con las entradas
|
||||
* @param string $groupName con nombre del grupo a procesar
|
||||
* @throws ImportException
|
||||
* @return none
|
||||
*/
|
||||
private static function getEntryData($entries, $groupName)
|
||||
{
|
||||
foreach ( $entries as $entry ){
|
||||
foreach ( $entry->String as $account ){
|
||||
$value = (isset($account->Value)) ? (string) $account->Value : '';
|
||||
switch ($account->Key){
|
||||
foreach ($entries as $entry) {
|
||||
foreach ($entry->String as $account) {
|
||||
$value = (isset($account->Value)) ? (string)$account->Value : '';
|
||||
switch ($account->Key) {
|
||||
case 'Notes':
|
||||
$notes = $value;
|
||||
break;
|
||||
@@ -74,7 +75,7 @@ class SP_KeePassImport
|
||||
}
|
||||
}
|
||||
|
||||
$accountData = array($name,'KeePass',$groupName,$url,$username,$password,$notes);
|
||||
$accountData = array($name, 'KeePass', $groupName, $url, $username, $password, $notes);
|
||||
SP_Import::addAccountData($accountData);
|
||||
}
|
||||
}
|
||||
@@ -88,27 +89,27 @@ class SP_KeePassImport
|
||||
*/
|
||||
private static function getGroups($xml)
|
||||
{
|
||||
foreach($xml as $node){
|
||||
if ( $node->Group ){
|
||||
foreach ( $node->Group as $group ){
|
||||
foreach ($xml as $node) {
|
||||
if ($node->Group) {
|
||||
foreach ($node->Group as $group) {
|
||||
$groupName = $group->Name;
|
||||
// Analizar grupo
|
||||
if ( $node->Group->Entry ){
|
||||
if ($node->Group->Entry) {
|
||||
// Obtener entradas
|
||||
self::getEntryData($group->Entry,$groupName);
|
||||
self::getEntryData($group->Entry, $groupName);
|
||||
}
|
||||
|
||||
if ( $group->Group ){
|
||||
if ($group->Group) {
|
||||
// Analizar subgrupo
|
||||
self::getGroups($group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $node->Entry ){
|
||||
if ($node->Entry) {
|
||||
$groupName = $node->Name;
|
||||
// Obtener entradas
|
||||
self::getEntryData($node->Entry,$groupName);
|
||||
self::getEntryData($node->Entry, $groupName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -46,21 +46,21 @@ class SP_KeePassXImport
|
||||
/**
|
||||
* Obtener los datos de las entradas de KeePass.
|
||||
*
|
||||
* @param object $entries con el objeto XML con las entradas
|
||||
* @param object $entries con el objeto XML con las entradas
|
||||
* @param string $groupName con nombre del grupo a procesar
|
||||
* @throws ImportException
|
||||
* @return none
|
||||
*/
|
||||
private static function getEntryData($entries, $groupName)
|
||||
{
|
||||
foreach ( $entries as $entry ){
|
||||
$notes = (isset($entry->comment)) ? (string) $entry->comment : '';
|
||||
$password = (isset($entry->password)) ? (string) $entry->password : '';
|
||||
$name = (isset($entry->title)) ? (string) $entry->title : '';
|
||||
$url = (isset($entry->url)) ? (string) $entry->url : '' ;
|
||||
$username = (isset($entry->username)) ? (string) $entry->username : '';
|
||||
foreach ($entries as $entry) {
|
||||
$notes = (isset($entry->comment)) ? (string)$entry->comment : '';
|
||||
$password = (isset($entry->password)) ? (string)$entry->password : '';
|
||||
$name = (isset($entry->title)) ? (string)$entry->title : '';
|
||||
$url = (isset($entry->url)) ? (string)$entry->url : '';
|
||||
$username = (isset($entry->username)) ? (string)$entry->username : '';
|
||||
|
||||
$accountData = array($name,'KeePassX',$groupName,$url,$username,$password,$notes);
|
||||
$accountData = array($name, 'KeePassX', $groupName, $url, $username, $password, $notes);
|
||||
SP_Import::addAccountData($accountData);
|
||||
}
|
||||
}
|
||||
@@ -74,27 +74,27 @@ class SP_KeePassXImport
|
||||
*/
|
||||
private static function getGroups($xml)
|
||||
{
|
||||
foreach($xml as $node){
|
||||
if ( $node->group ){
|
||||
foreach ( $node->group as $group ){
|
||||
foreach ($xml as $node) {
|
||||
if ($node->group) {
|
||||
foreach ($node->group as $group) {
|
||||
$groupName = $group->title;
|
||||
// Analizar grupo
|
||||
if ( $node->group->entry ){
|
||||
if ($node->group->entry) {
|
||||
// Obtener entradas
|
||||
self::getEntryData($group->entry,$groupName);
|
||||
self::getEntryData($group->entry, $groupName);
|
||||
}
|
||||
|
||||
if ( $group->group ){
|
||||
if ($group->group) {
|
||||
// Analizar subgrupo
|
||||
self::getGroups($group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $node->entry ){
|
||||
if ($node->entry) {
|
||||
$groupName = $node->title;
|
||||
// Obtener entradas
|
||||
self::getEntryData($node->entry,$groupName);
|
||||
self::getEntryData($node->entry, $groupName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -60,10 +60,10 @@ class SP_LDAP
|
||||
* Comprobar la conexión al servidor de LDAP.
|
||||
*
|
||||
* @param string $ldapServer con la dirección del servidor
|
||||
* @param string $bindDN con el usuario de conexión
|
||||
* @param string $bindPass con la clave del usuario de conexión
|
||||
* @param string $bindDN con el usuario de conexión
|
||||
* @param string $bindPass con la clave del usuario de conexión
|
||||
* @param string $searchBase con la base para las búsquedas
|
||||
* @param string $ldapGroup con el grupo con los usuarios de acceso
|
||||
* @param string $ldapGroup con el grupo con los usuarios de acceso
|
||||
* @return false|int Con el número de entradas encontradas
|
||||
*/
|
||||
public static function checkLDAPConn($ldapServer, $bindDN, $bindPass, $searchBase, $ldapGroup)
|
||||
@@ -114,7 +114,7 @@ class SP_LDAP
|
||||
/**
|
||||
* Realizar la autentificación con el servidor de LDAP.
|
||||
*
|
||||
* @param string $userDN con el DN del usuario
|
||||
* @param string $userDN con el DN del usuario
|
||||
* @param string $userPass con la clave del usuario
|
||||
* @throws Exception
|
||||
* @return bool
|
||||
@@ -360,7 +360,7 @@ class SP_LDAP
|
||||
$ldapGroup = SP_Config::getValue('ldap_group');
|
||||
|
||||
// El filtro de grupo no está establecido
|
||||
if (empty($ldapGroup)){
|
||||
if (empty($ldapGroup)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -37,6 +37,7 @@ class SP_Profiles
|
||||
|
||||
/**
|
||||
* Obtener los datos de un perfil
|
||||
*
|
||||
* @param int $id con el Id del perfil a consultar
|
||||
* @return array con el nombre de la columna como clave y los datos como valor
|
||||
*/
|
||||
@@ -85,6 +86,7 @@ class SP_Profiles
|
||||
|
||||
/**
|
||||
* Obtener los datos de un perfil
|
||||
*
|
||||
* @param int $profileId opcional, con el Id del perfil a consultar
|
||||
* @return array con la lista de perfiles
|
||||
*/
|
||||
@@ -130,6 +132,7 @@ class SP_Profiles
|
||||
|
||||
/**
|
||||
* Comprobar si un perfil existe
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function checkProfileExist()
|
||||
@@ -161,6 +164,7 @@ class SP_Profiles
|
||||
|
||||
/**
|
||||
* Añadir un nuevo perfil
|
||||
*
|
||||
* @param array $profileProp con las propiedades del perfil
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -165,84 +165,84 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
<?php endif; ?>
|
||||
<?php if ($account->accountIsHistory): ?>
|
||||
<table class="data round tblIcon">
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<table class="data round">
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Nombre'); ?></td>
|
||||
<td class="valField">
|
||||
<?php
|
||||
if ($showform) {
|
||||
?>
|
||||
<input name="name" type="text" placeholder="<?php echo _('Nombre de cuenta'); ?>" required
|
||||
maxlength="50"
|
||||
value="<?php echo ($gotData) ? $accountData->account_name : ''; ?>">
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->account_name;
|
||||
}
|
||||
?>
|
||||
if ($showform) {
|
||||
?>
|
||||
<input name="name" type="text" placeholder="<?php echo _('Nombre de cuenta'); ?>" required
|
||||
maxlength="50"
|
||||
value="<?php echo ($gotData) ? $accountData->account_name : ''; ?>">
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->account_name;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Cliente'); ?></td>
|
||||
<td class="valField">
|
||||
<?php
|
||||
if ($showform) {
|
||||
SP_Html::printSelect(DB::getValuesForSelect('customers', 'customer_id', 'customer_name'), $customersSelProp);
|
||||
?>
|
||||
<br><br>
|
||||
<input type="text" name="customer_new" maxlength="50"
|
||||
placeholder="<?php echo _('Buscar en desplegable o introducir'); ?>"/>
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->customer_name;
|
||||
}
|
||||
?>
|
||||
if ($showform) {
|
||||
SP_Html::printSelect(DB::getValuesForSelect('customers', 'customer_id', 'customer_name'), $customersSelProp);
|
||||
?>
|
||||
<br><br>
|
||||
<input type="text" name="customer_new" maxlength="50"
|
||||
placeholder="<?php echo _('Buscar en desplegable o introducir'); ?>"/>
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->customer_name;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Categoría'); ?></td>
|
||||
<td class="valField">
|
||||
<?php
|
||||
if ($showform) {
|
||||
SP_Html::printSelect(DB::getValuesForSelect('categories', 'category_id', 'category_name'), $categoriesSelProp);
|
||||
} else {
|
||||
echo $accountData->category_name;
|
||||
}
|
||||
?>
|
||||
if ($showform) {
|
||||
SP_Html::printSelect(DB::getValuesForSelect('categories', 'category_id', 'category_name'), $categoriesSelProp);
|
||||
} else {
|
||||
echo $accountData->category_name;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('URL / IP'); ?></td>
|
||||
<td class="valField">
|
||||
<?php
|
||||
if ($showform) {
|
||||
?>
|
||||
<input name="url" type="text" placeholder="<?php echo _('URL o IP de acceso'); ?>"
|
||||
maxlength="255"
|
||||
value="<?php echo ($gotData) ? $accountData->account_url : ''; ?>">
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->account_url;
|
||||
}
|
||||
?>
|
||||
if ($showform) {
|
||||
?>
|
||||
<input name="url" type="text" placeholder="<?php echo _('URL o IP de acceso'); ?>"
|
||||
maxlength="255"
|
||||
value="<?php echo ($gotData) ? $accountData->account_url : ''; ?>">
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->account_url;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Usuario'); ?></td>
|
||||
<td class="valField">
|
||||
<?php
|
||||
if ($showform) {
|
||||
?>
|
||||
<input name="login" type="text" placeholder="<?php echo _('Usuario de acceso'); ?>"
|
||||
maxlength="50"
|
||||
value="<?php echo ($gotData) ? $accountData->account_login : ''; ?>">
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->account_login;
|
||||
}
|
||||
?>
|
||||
if ($showform) {
|
||||
?>
|
||||
<input name="login" type="text" placeholder="<?php echo _('Usuario de acceso'); ?>"
|
||||
maxlength="50"
|
||||
value="<?php echo ($gotData) ? $accountData->account_login : ''; ?>">
|
||||
<?php
|
||||
} else {
|
||||
echo $accountData->account_login;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($showPass): ?>
|
||||
@@ -254,7 +254,8 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
<img src="imgs/user-pass.png" title="<?php echo _('La clave generada se mostrará aquí'); ?>"
|
||||
class="inputImg" id="viewPass"/>
|
||||
|
||||
<img id="passGen" src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria'); ?>" class="inputImg" />
|
||||
<img id="passGen" src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria'); ?>"
|
||||
class="inputImg"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -291,8 +292,8 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
$userSelected = (in_array($otherUserId, $accountUsers)) ? "selected" : "";
|
||||
}
|
||||
echo "<option value='" . $otherUserId . "' $userSelected>" . $otherUserName . "</option>";
|
||||
} else{
|
||||
if ($userId === $otherUserId){
|
||||
} else {
|
||||
if ($userId === $otherUserId) {
|
||||
continue;
|
||||
}
|
||||
echo "<option value='" . $otherUserId . "' $userSelected>" . $otherUserName . "</option>";
|
||||
@@ -322,8 +323,8 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
$uGroupSelected = (in_array($otherGroupId, $accountGroups)) ? "selected" : "";
|
||||
}
|
||||
echo "<option value='" . $otherGroupId . "' $uGroupSelected>" . $otherGroupName . "</option>";
|
||||
} else{
|
||||
if ($userGroupId === $otherGroupId){
|
||||
} else {
|
||||
if ($userGroupId === $otherGroupId) {
|
||||
continue;
|
||||
}
|
||||
echo "<option value='" . $otherGroupId . "' $uGroupSelected>" . $otherGroupName . "</option>";
|
||||
@@ -395,7 +396,10 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
|
||||
SP_Html::printSelect($account->getAccountHistoryList(), $arrSelectProp);
|
||||
?>
|
||||
<script>$("#sel-history").chosen({disable_search: true, placeholder_text_single: "<?php echo _('Seleccionar fecha'); ?>"});</script>
|
||||
<script>$("#sel-history").chosen({
|
||||
disable_search: true,
|
||||
placeholder_text_single: "<?php echo _('Seleccionar fecha'); ?>"
|
||||
});</script>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
@@ -479,7 +483,7 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Editor'); ?></td>
|
||||
<td class="valField"><?php echo ($accountData->user_editName) ? $accountData->user_editName : $accountData->user_editLogin ; ?></td>
|
||||
<td class="valField"><?php echo ($accountData->user_editName) ? $accountData->user_editName : $accountData->user_editLogin; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
@@ -499,70 +503,71 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
<div class="action">
|
||||
<ul>
|
||||
<?php if ($account->accountIsHistory): ?>
|
||||
<li>
|
||||
<img src="imgs/back.png" title="<?php echo _('Ver Actual'); ?>" class="inputImg" id="btnBack"
|
||||
OnClick="doAction('accview','accsearch',<?php echo $account->accountParentId; ?>)"/>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<img src="imgs/back.png" title="<?php echo _('Atrás'); ?>" class="inputImg" id="btnBack"
|
||||
OnClick="doAction('<?php echo $account->lastAction; ?>', '<?php echo $action; ?>',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<li>
|
||||
<img src="imgs/back.png" title="<?php echo _('Ver Actual'); ?>" class="inputImg" id="btnBack"
|
||||
OnClick="doAction('accview','accsearch',<?php echo $account->accountParentId; ?>)"/>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<img src="imgs/back.png" title="<?php echo _('Atrás'); ?>" class="inputImg" id="btnBack"
|
||||
OnClick="doAction('<?php echo $account->lastAction; ?>', '<?php echo $action; ?>',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showRestore): ?>
|
||||
<li>
|
||||
<img src="imgs/restore.png" title="<?php echo _('Restaurar cuenta desde este punto'); ?>" class="inputImg" id="btnRestore"
|
||||
OnClick="saveAccount('frmAccount');"/>
|
||||
</li>
|
||||
<?php if ($showRestore): ?>
|
||||
<li>
|
||||
<img src="imgs/restore.png" title="<?php echo _('Restaurar cuenta desde este punto'); ?>" class="inputImg"
|
||||
id="btnRestore"
|
||||
OnClick="saveAccount('frmAccount');"/>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showViewPass): ?>
|
||||
<li>
|
||||
<img src="imgs/user-pass.png" title="<?php echo _('Ver Clave'); ?>"
|
||||
onClick="viewPass(<?php echo $account->accountId; ?>,1,<?php echo $account->accountIsHistory; ?>)"
|
||||
class="inputImg"/>
|
||||
</li>
|
||||
<li>
|
||||
<img src="imgs/clipboard.png" title="<?php echo _('Copiar Clave en Portapapeles'); ?>"
|
||||
onmouseover="viewPass(<?php echo $account->accountId; ?>,0,<?php echo $account->accountIsHistory; ?>)"
|
||||
data-clipboard-target="clip_pass_text"
|
||||
class="inputImg clip_pass_button"/>
|
||||
</li>
|
||||
<?php if ($showViewPass): ?>
|
||||
<li>
|
||||
<img src="imgs/user-pass.png" title="<?php echo _('Ver Clave'); ?>"
|
||||
onClick="viewPass(<?php echo $account->accountId; ?>,1,<?php echo $account->accountIsHistory; ?>)"
|
||||
class="inputImg"/>
|
||||
</li>
|
||||
<li>
|
||||
<img src="imgs/clipboard.png" title="<?php echo _('Copiar Clave en Portapapeles'); ?>"
|
||||
onmouseover="viewPass(<?php echo $account->accountId; ?>,0,<?php echo $account->accountIsHistory; ?>)"
|
||||
data-clipboard-target="clip_pass_text"
|
||||
class="inputImg clip_pass_button"/>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showSave): ?>
|
||||
<li>
|
||||
<img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" id="btnSave"
|
||||
OnClick="saveAccount('frmAccount');"/>
|
||||
</li>
|
||||
<?php if ($showSave): ?>
|
||||
<li>
|
||||
<img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" id="btnSave"
|
||||
OnClick="saveAccount('frmAccount');"/>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showEditPass): ?>
|
||||
<li>
|
||||
<img src="imgs/key.png" title="<?php echo _('Modificar Clave de Cuenta'); ?>" class="inputImg"
|
||||
OnClick="doAction('acceditpass', '<?php echo $action; ?>',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<?php if ($showEditPass): ?>
|
||||
<li>
|
||||
<img src="imgs/key.png" title="<?php echo _('Modificar Clave de Cuenta'); ?>" class="inputImg"
|
||||
OnClick="doAction('acceditpass', '<?php echo $action; ?>',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showEdit): ?>
|
||||
<li>
|
||||
<img src="imgs/edit.png" title="<?php echo _('Modificar Cuenta'); ?>" class="inputImg"
|
||||
OnClick="doAction('accedit','accview',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<?php elseif (!$showEdit && $action == 'accview' && SP_Util::mailrequestIsEnabled()): ?>
|
||||
<li>
|
||||
<img src="imgs/request.png" title="<?php echo _('Solicitar Modificación'); ?>" class="inputImg"
|
||||
OnClick="doAction('accrequest','accview',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<?php if ($showEdit): ?>
|
||||
<li>
|
||||
<img src="imgs/edit.png" title="<?php echo _('Modificar Cuenta'); ?>" class="inputImg"
|
||||
OnClick="doAction('accedit','accview',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<?php elseif (!$showEdit && $action == 'accview' && SP_Util::mailrequestIsEnabled()): ?>
|
||||
<li>
|
||||
<img src="imgs/request.png" title="<?php echo _('Solicitar Modificación'); ?>" class="inputImg"
|
||||
OnClick="doAction('accrequest','accview',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showDelete): ?>
|
||||
<?php if ($showDelete): ?>
|
||||
<li>
|
||||
<img src="imgs/delete.png" title="<?php echo _('Eliminar Cuenta'); ?>" class="inputImg"
|
||||
OnClick="delAccount(<?php echo $account->accountId; ?>,3,'<?php echo $skey; ?>');"/>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -596,7 +601,9 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
}
|
||||
});
|
||||
|
||||
$('#passGen').click(function(){password(11, true, true);});
|
||||
$('#passGen').click(function () {
|
||||
password(11, true, true);
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -606,19 +613,19 @@ $maxFileSize = round(SP_Config::getValue('files_allowed_size') / 1024, 1);
|
||||
<script>
|
||||
passToClip = 0;
|
||||
|
||||
var client = new ZeroClipboard( $('.clip_pass_button'), {
|
||||
var client = new ZeroClipboard($('.clip_pass_button'), {
|
||||
moviePath: "js/ZeroClipboard.swf",
|
||||
debug: true
|
||||
} );
|
||||
});
|
||||
|
||||
//client.setText(data);
|
||||
client.on( 'load', function(client) {
|
||||
client.on('load', function (client) {
|
||||
$('#global-zeroclipboard-html-bridge').attr('rel', 'tooltip').attr('title', '<?php echo _('Copiar Clave en Portapapeles'); ?>');
|
||||
} );
|
||||
});
|
||||
|
||||
client.on( "complete", function(client, args) {
|
||||
client.on("complete", function (client, args) {
|
||||
resMsg("ok", "<?php echo _('Clave Copiada al Portapapeles'); ?>");
|
||||
//console.log("Copied text to clipboard: " + args.text );
|
||||
} );
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@@ -68,7 +68,7 @@ $lastBackupTime = (file_exists($backupFile['absolute'])) ? _('Último backup') .
|
||||
</table>
|
||||
|
||||
<form method="post" name="frmBackup" id="frmBackup">
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="backup" value="1"/>
|
||||
<input type="hidden" name="isAjax" value="1"/>
|
||||
|
||||
@@ -32,36 +32,41 @@ $activeTab = $data['activeTab'];
|
||||
|
||||
<div id="fancyContainer" align="center">
|
||||
<h2 class="midround"><?php echo $data['header']; ?></H2>
|
||||
|
||||
<form method="post" name="frmCategories" id="frmCategories">
|
||||
<table class="fancydata">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Nombre'); ?></td>
|
||||
<td class="valField">
|
||||
<input type="text" id="grpname" name="name" title="<?php echo _('Nombre de la categoría'); ?>" value="<?php echo $category["category_name"] ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Nombre'); ?></td>
|
||||
<td class="valField">
|
||||
<input type="text" id="grpname" name="name" title="<?php echo _('Nombre de la categoría'); ?>"
|
||||
value="<?php echo $category["category_name"] ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Descripción'); ?></td>
|
||||
<td class="valField"><input type="text" id="grpdesc" name="description" title="<?php echo _('Descripción de la categoría'); ?>" value="<?php echo $category["category_description"]; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Descripción'); ?></td>
|
||||
<td class="valField"><input type="text" id="grpdesc" name="description"
|
||||
title="<?php echo _('Descripción de la categoría'); ?>"
|
||||
value="<?php echo $category["category_description"]; ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $category["category_id"]; ?>" />
|
||||
<input type="hidden" name="action" value="<?php echo $category["action"] ?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>" />
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $category["category_id"]; ?>"/>
|
||||
<input type="hidden" name="action" value="<?php echo $category["action"] ?>"/>
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>"/>
|
||||
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(true) ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
<div id="resCheck"><span id="resFancyAccion"></span></div>
|
||||
<div class="action-in-box">
|
||||
<ul>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="appMgmtSave('frmCategories');" /></li>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg"
|
||||
OnClick="appMgmtSave('frmCategories');"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,33 +30,33 @@ $activeTab = $data['activeTab'];
|
||||
$onCloseAction = $data['onCloseAction'];
|
||||
|
||||
SP_ACL::checkUserAccess($action) || SP_Html::showCommonError('unavailable');
|
||||
|
||||
|
||||
$arrLangAvailable = array(
|
||||
'Español' => 'es_ES',
|
||||
'English' => 'en_US',
|
||||
'Deutsch' => 'de_DE',
|
||||
'Magyar' => 'hu_HU',
|
||||
'Français' => 'fr_FR');
|
||||
$arrAccountCount = array(6,9,12,15,21,27,30,51,99);
|
||||
$mailSecurity = array('SSL','TLS');
|
||||
$arrAccountCount = array(6, 9, 12, 15, 21, 27, 30, 51, 99);
|
||||
$mailSecurity = array('SSL', 'TLS');
|
||||
|
||||
$isDemoMode = SP_Util::demoIsEnabled();
|
||||
|
||||
$isDisabled = ( $isDemoMode ) ? "DISABLED" : "";
|
||||
$chkLog = ( SP_Config::getValue('log_enabled') ) ? 'checked="checked"' : '';
|
||||
$isDisabled = ($isDemoMode) ? "DISABLED" : "";
|
||||
$chkLog = (SP_Config::getValue('log_enabled')) ? 'checked="checked"' : '';
|
||||
$chkDebug = ( SP_Config::getValue('debug') ) ? 'checked="checked"' : '';
|
||||
$chkMaintenance = ( SP_Config::getValue('maintenance') ) ? 'checked="checked"' : '';
|
||||
$chkUpdates = ( SP_Config::getValue('checkupdates') ) ? 'checked="checked"' : '';
|
||||
$chkGlobalSearch = ( SP_Config::getValue('globalsearch') ) ? 'checked="checked"' : '';
|
||||
$chkGlobalSearch = (SP_Config::getValue('globalsearch')) ? 'checked="checked"' : '';
|
||||
$chkAccountLink = ( SP_Config::getValue('account_link') ) ? 'checked="checked"' : '';
|
||||
$chkFiles = ( SP_Config::getValue('files_enabled') ) ? 'checked="checked"' : '';
|
||||
$chkWiki = ( SP_Config::getValue('wiki_enabled') ) ? 'checked="checked"' : '';
|
||||
$chkLdap = ( SP_Config::getValue('ldap_enabled') ) ? 'checked="checked"' : '';
|
||||
$chkLdapADS = ( SP_Config::getValue('ldap_ads') ) ? 'checked="checked"' : '';
|
||||
$chkMail = ( SP_Config::getValue('mail_enabled') ) ? 'checked="checked"' : '';
|
||||
$chkMailRequests = ( SP_Config::getValue('mail_requestsenabled') ) ? 'checked="checked"' : '';
|
||||
$chkMailAuth = ( SP_Config::getValue('mail_authenabled') ) ? 'checked="checked"' : '';
|
||||
$chkResultsAsCards = ( SP_Config::getValue('resultsascards') ) ? 'checked="checked"' : '';
|
||||
$chkFiles = (SP_Config::getValue('files_enabled')) ? 'checked="checked"' : '';
|
||||
$chkWiki = (SP_Config::getValue('wiki_enabled')) ? 'checked="checked"' : '';
|
||||
$chkLdap = (SP_Config::getValue('ldap_enabled')) ? 'checked="checked"' : '';
|
||||
$chkLdapADS = (SP_Config::getValue('ldap_ads')) ? 'checked="checked"' : '';
|
||||
$chkMail = (SP_Config::getValue('mail_enabled')) ? 'checked="checked"' : '';
|
||||
$chkMailRequests = (SP_Config::getValue('mail_requestsenabled')) ? 'checked="checked"' : '';
|
||||
$chkMailAuth = (SP_Config::getValue('mail_authenabled')) ? 'checked="checked"' : '';
|
||||
$chkResultsAsCards = (SP_Config::getValue('resultsascards')) ? 'checked="checked"' : '';
|
||||
$allowedExts = SP_Config::getValue('files_allowed_exts');
|
||||
|
||||
$groupsSelProp = array('name' => 'ldap_defaultgroup',
|
||||
@@ -67,7 +67,7 @@ $groupsSelProp = array('name' => 'ldap_defaultgroup',
|
||||
'selected' => SP_Config::getValue('ldap_defaultgroup'),
|
||||
'default' => '',
|
||||
'js' => '',
|
||||
'attribs' => array('required',$isDisabled));
|
||||
'attribs' => array('required', $isDisabled));
|
||||
|
||||
$profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
'id' => 'ldap_defaultprofile',
|
||||
@@ -77,7 +77,7 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
'selected' => SP_Config::getValue('ldap_defaultprofile'),
|
||||
'default' => '',
|
||||
'js' => '',
|
||||
'attribs' => array('required',$isDisabled));
|
||||
'attribs' => array('required', $isDisabled));
|
||||
?>
|
||||
|
||||
<div id="title" class="midroundup titleNormal">
|
||||
@@ -92,9 +92,9 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<td class="descField"><?php echo _('Idioma'); ?></td>
|
||||
<td class="valField">
|
||||
<select name="sitelang" id="sel-sitelang" size="1">
|
||||
<?php
|
||||
foreach ( $arrLangAvailable as $langName => $langValue ){
|
||||
$selected = ( SP_Config::getValue('sitelang') == $langValue ) ? "SELECTED" : "";
|
||||
<?php
|
||||
foreach ($arrLangAvailable as $langName => $langValue) {
|
||||
$selected = (SP_Config::getValue('sitelang') == $langValue) ? "SELECTED" : "";
|
||||
echo "<option value='$langValue' $selected>$langName</option>";
|
||||
}
|
||||
?>
|
||||
@@ -106,7 +106,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo _('Timeout de sesión (s)'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="session_timeout" value="<?php echo SP_Config::getValue('session_timeout'); ?>" maxlength="4" <?php echo $isDisabled; ?> />
|
||||
<input type="text" name="session_timeout" value="<?php echo SP_Config::getValue('session_timeout'); ?>"
|
||||
maxlength="4" <?php echo $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -116,7 +117,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="logenabled"><?php echo ($chkLog) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="log_enabled" id="logenabled" class="checkbox" <?php echo $chkLog.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="log_enabled" id="logenabled"
|
||||
class="checkbox" <?php echo $chkLog . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -126,7 +128,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="debug"><?php echo ($chkDebug) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="debug" id="debug" class="checkbox" <?php echo $chkDebug.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="debug" id="debug"
|
||||
class="checkbox" <?php echo $chkDebug . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -136,7 +139,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="maintenance"><?php echo ($chkMaintenance) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="maintenance" id="maintenance" class="checkbox" <?php echo $chkMaintenance.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="maintenance" id="maintenance"
|
||||
class="checkbox" <?php echo $chkMaintenance . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -146,7 +150,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="updates"><?php echo ($chkUpdates) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="updates" id="updates" class="checkbox" <?php echo $chkUpdates.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="updates" id="updates"
|
||||
class="checkbox" <?php echo $chkUpdates . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -156,7 +161,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="account_link"><?php echo ($chkAccountLink) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="account_link" id="account_link" class="checkbox" <?php echo $chkAccountLink; ?> />
|
||||
<input type="checkbox" name="account_link" id="account_link"
|
||||
class="checkbox" <?php echo $chkAccountLink; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -166,7 +172,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="filesenabled"><?php echo ($chkFiles) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="files_enabled" id="filesenabled" class="checkbox" <?php echo $chkFiles.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="files_enabled" id="filesenabled"
|
||||
class="checkbox" <?php echo $chkFiles . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -176,7 +183,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="globalsearch"><?php echo ($chkGlobalSearch) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="globalsearch" id="globalsearch" class="checkbox" <?php echo $chkGlobalSearch.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="globalsearch" id="globalsearch"
|
||||
class="checkbox" <?php echo $chkGlobalSearch . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -194,7 +202,9 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 6); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="files_allowed_size" value="<?php echo SP_Config::getValue('files_allowed_size'); ?>" maxlength="5" <?php echo $isDisabled; ?> />
|
||||
<input type="text" name="files_allowed_size"
|
||||
value="<?php echo SP_Config::getValue('files_allowed_size'); ?>"
|
||||
maxlength="5" <?php echo $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -204,9 +214,9 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<select name="account_count" id="sel-account_count" size="1">
|
||||
<?php
|
||||
foreach ($arrAccountCount as $num ){
|
||||
$selected = ( SP_Config::getValue('account_count') == $num) ? 'SELECTED' : '';
|
||||
<?php
|
||||
foreach ($arrAccountCount as $num) {
|
||||
$selected = (SP_Config::getValue('account_count') == $num) ? 'SELECTED' : '';
|
||||
echo "<option $selected>$num</option>";
|
||||
}
|
||||
?>
|
||||
@@ -220,7 +230,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="resultsascards"><?php echo ($chkResultsAsCards) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="resultsascards" id="resultsascards" class="checkbox" <?php echo $chkResultsAsCards.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="resultsascards" id="resultsascards"
|
||||
class="checkbox" <?php echo $chkResultsAsCards . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -238,7 +249,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="wikienabled"><?php echo ($chkWiki) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="wiki_enabled" id="wikienabled" class="checkbox" <?php echo $chkWiki.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="wiki_enabled" id="wikienabled"
|
||||
class="checkbox" <?php echo $chkWiki . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -247,7 +259,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 8); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="wiki_searchurl" class="txtLong" value="<?php echo SP_Config::getValue('wiki_searchurl'); ?>" maxlength="128" />
|
||||
<input type="text" name="wiki_searchurl" class="txtLong"
|
||||
value="<?php echo SP_Config::getValue('wiki_searchurl'); ?>" maxlength="128"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -256,7 +269,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 9); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="wiki_pageurl" class="txtLong" value="<?php echo SP_Config::getValue('wiki_pageurl'); ?>" maxlength="128" />
|
||||
<input type="text" name="wiki_pageurl" class="txtLong"
|
||||
value="<?php echo SP_Config::getValue('wiki_pageurl'); ?>" maxlength="128"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -265,7 +279,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 10); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="wiki_filter" id="wikifilter" value="<?php echo SP_Config::getValue('wiki_filter'); ?>" />
|
||||
<input type="text" name="wiki_filter" id="wikifilter"
|
||||
value="<?php echo SP_Config::getValue('wiki_filter'); ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -277,7 +292,7 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</div>
|
||||
|
||||
<table id="tblLdap" class="data tblConfig round">
|
||||
<?php if ( SP_Util::ldapIsAvailable() || $isDemoMode ): ?>
|
||||
<?php if (SP_Util::ldapIsAvailable() || $isDemoMode): ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Habilitar LDAP'); ?>
|
||||
@@ -285,7 +300,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="ldapenabled"><?php echo ($chkLdap) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="ldap_enabled" id="ldapenabled" class="checkbox" <?php echo $chkLdap.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="ldap_enabled" id="ldapenabled"
|
||||
class="checkbox" <?php echo $chkLdap . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -294,7 +310,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 15); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="ldap_server" value="<?php echo SP_Config::getValue('ldap_server'); ?>" maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
<input type="text" name="ldap_server" value="<?php echo SP_Config::getValue('ldap_server'); ?>"
|
||||
maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -303,7 +320,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 12); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="ldap_binduser" value="<?php echo SP_Config::getValue('ldap_binduser'); ?>" maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
<input type="text" name="ldap_binduser" value="<?php echo SP_Config::getValue('ldap_binduser'); ?>"
|
||||
maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -312,7 +330,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 17); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="password" name="ldap_bindpass" value="<?php echo SP_Config::getValue('ldap_bindpass'); ?>" maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
<input type="password" name="ldap_bindpass" value="<?php echo SP_Config::getValue('ldap_bindpass'); ?>"
|
||||
maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -321,7 +340,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 13); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="ldap_base" class="txtLong" value="<?php echo SP_Config::getValue('ldap_base'); ?>" maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
<input type="text" name="ldap_base" class="txtLong" value="<?php echo SP_Config::getValue('ldap_base'); ?>"
|
||||
maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -330,45 +350,48 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo SP_Common::printHelpButton("config", 14); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="ldap_group" class="txtLong" value="<?php echo SP_Config::getValue('ldap_group'); ?>" maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Grupo por Defecto'); ?>
|
||||
<?php echo SP_Common::printHelpButton("config", 27); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrGroups', 'usergroup_id', 'usergroup_name'), $groupsSelProp); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Perfil por Defecto'); ?>
|
||||
<?php echo SP_Common::printHelpButton("config", 28); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrProfiles', 'userprofile_id', 'userprofile_name'), $profilesSelProp); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Active Directory'); ?>
|
||||
<?php echo SP_Common::printHelpButton("config", 26); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="ldap_ads"><?php echo ($chkLdapADS) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="ldap_ads" id="ldap_ads" class="checkbox" <?php echo $chkLdapADS.' '.$isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Comprobar'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<img src="imgs/refresh.png" class="inputImg" title="<?php echo _('Comprobar conexión con LDAP'); ?>" onclick="checkLdapConn();"/>
|
||||
<input type="text" name="ldap_group" class="txtLong"
|
||||
value="<?php echo SP_Config::getValue('ldap_group'); ?>" maxlength="128" <?php echo $isDisabled; ?>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Grupo por Defecto'); ?>
|
||||
<?php echo SP_Common::printHelpButton("config", 27); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrGroups', 'usergroup_id', 'usergroup_name'), $groupsSelProp); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Perfil por Defecto'); ?>
|
||||
<?php echo SP_Common::printHelpButton("config", 28); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrProfiles', 'userprofile_id', 'userprofile_name'), $profilesSelProp); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Active Directory'); ?>
|
||||
<?php echo SP_Common::printHelpButton("config", 26); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="ldap_ads"><?php echo ($chkLdapADS) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="ldap_ads" id="ldap_ads"
|
||||
class="checkbox" <?php echo $chkLdapADS . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Comprobar'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<img src="imgs/refresh.png" class="inputImg" title="<?php echo _('Comprobar conexión con LDAP'); ?>"
|
||||
onclick="checkLdapConn();"/>
|
||||
</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td class="option-disabled">
|
||||
@@ -390,7 +413,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="mailenabled"><?php echo ($chkMail) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="mail_enabled" id="mailenabled" class="checkbox" <?php echo $chkMail.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="mail_enabled" id="mailenabled"
|
||||
class="checkbox" <?php echo $chkMail . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -398,7 +422,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo _('Servidor'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="mail_server" size="20" value="<?php echo SP_Config::getValue('mail_server','localhost'); ?>" maxlength="128" />
|
||||
<input type="text" name="mail_server" size="20"
|
||||
value="<?php echo SP_Config::getValue('mail_server', 'localhost'); ?>" maxlength="128"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -406,7 +431,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo _('Puerto'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="mail_port" size="20" value="<?php echo SP_Config::getValue('mail_port',25); ?>" maxlength="5" />
|
||||
<input type="text" name="mail_port" size="20" value="<?php echo SP_Config::getValue('mail_port', 25); ?>"
|
||||
maxlength="5"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -415,7 +441,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="mailauthenabled"><?php echo ($chkMailAuth) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="mail_authenabled" id="mailauthenabled" class="checkbox" <?php echo $chkMailAuth.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="mail_authenabled" id="mailauthenabled"
|
||||
class="checkbox" <?php echo $chkMailAuth . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -423,7 +450,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo _('Usuario'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="mail_user" size="20" value="<?php echo SP_Config::getValue('mail_user'); ?>" maxlength="50" />
|
||||
<input type="text" name="mail_user" size="20" value="<?php echo SP_Config::getValue('mail_user'); ?>"
|
||||
maxlength="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -431,7 +459,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo _('Clave'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="password" name="mail_pass" size="20" value="<?php echo SP_Config::getValue('mail_pass'); ?>" maxlength="50" />
|
||||
<input type="password" name="mail_pass" size="20" value="<?php echo SP_Config::getValue('mail_pass'); ?>"
|
||||
maxlength="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -442,9 +471,9 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<select name="mail_security" id="sel-mailsecurity" size="1">
|
||||
|
||||
<?php
|
||||
echo '<option>'._('Deshabilitada').'</option>';
|
||||
foreach ( $mailSecurity as $security ){
|
||||
$selected = ( SP_Config::getValue('mail_security') == $security ) ? "SELECTED" : "";
|
||||
echo '<option>' . _('Deshabilitada') . '</option>';
|
||||
foreach ($mailSecurity as $security) {
|
||||
$selected = (SP_Config::getValue('mail_security') == $security) ? "SELECTED" : "";
|
||||
echo "<option $selected>$security</option>";
|
||||
}
|
||||
?>
|
||||
@@ -456,7 +485,8 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
<?php echo _('Dirección de correo de envío'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<input type="text" name="mail_from" size="20" value="<?php echo SP_Config::getValue('mail_from'); ?>" maxlength="128" />
|
||||
<input type="text" name="mail_from" size="20" value="<?php echo SP_Config::getValue('mail_from'); ?>"
|
||||
maxlength="128"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -465,20 +495,21 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label for="mailrequestsenabled"><?php echo ($chkMailRequests) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="mail_requestsenabled" id="mailrequestsenabled" class="checkbox" <?php echo $chkMailRequests.' '.$isDisabled; ?> />
|
||||
<input type="checkbox" name="mail_requestsenabled" id="mailrequestsenabled"
|
||||
class="checkbox" <?php echo $chkMailRequests . ' ' . $isDisabled; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php if ( $isDemoMode ): ?>
|
||||
<input type="hidden" name="log_enabled" value="1" />
|
||||
<input type="hidden" name="files_enabled" value="1" />
|
||||
<input type="hidden" name="wiki_enabled" value="1" />
|
||||
<input type="hidden" name="log_enabled" value="1"/>
|
||||
<input type="hidden" name="files_enabled" value="1"/>
|
||||
<input type="hidden" name="wiki_enabled" value="1"/>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>" />
|
||||
<input type="hidden" name="action" value="config" />
|
||||
<input type="hidden" name="isAjax" value="1" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="action" value="config"/>
|
||||
<input type="hidden" name="isAjax" value="1"/>
|
||||
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(true); ?>">
|
||||
</form>
|
||||
|
||||
@@ -491,72 +522,72 @@ $profilesSelProp = array('name' => 'ldap_defaultprofile',
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#sel-sitelang,#sel-account_link,#sel-account_count,#sel-mailsecurity").chosen({disable_search : true});
|
||||
$("#sel-sitelang,#sel-account_link,#sel-account_count,#sel-mailsecurity").chosen({disable_search: true});
|
||||
$('#frmConfig').find('.checkbox').button();
|
||||
$('#frmConfig').find('.ui-button').click(function(){
|
||||
$('#frmConfig').find('.ui-button').click(function () {
|
||||
// El cambio de clase se produce durante el evento de click
|
||||
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
|
||||
if ( $(this).hasClass('ui-state-active') ){
|
||||
if ($(this).hasClass('ui-state-active')) {
|
||||
$(this).children().html('OFF');
|
||||
} else{
|
||||
} else {
|
||||
$(this).children().html('ON');
|
||||
}
|
||||
});
|
||||
$('#allowed_exts').tagsInput({
|
||||
'width':'350px',
|
||||
'defaultText':'<?php echo _('Añadir extensión'); ?>',
|
||||
'defaultRemoveText':'<?php echo _('Eliminar extensión'); ?>',
|
||||
'removeWithBackspace' : false,
|
||||
'tagsToUpper' : true,
|
||||
'maxChars' : 4,
|
||||
'onAddTag' : function(){
|
||||
'width': '350px',
|
||||
'defaultText': '<?php echo _('Añadir extensión'); ?>',
|
||||
'defaultRemoveText': '<?php echo _('Eliminar extensión'); ?>',
|
||||
'removeWithBackspace': false,
|
||||
'tagsToUpper': true,
|
||||
'maxChars': 4,
|
||||
'onAddTag': function () {
|
||||
// Fix scrolling to bottom
|
||||
var $tagsbox = $(this).next();
|
||||
$tagsbox.animate({scrollTop: $tagsbox.height()});
|
||||
|
||||
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
|
||||
|
||||
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
|
||||
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[13] + '" />');
|
||||
}
|
||||
},
|
||||
'onRemoveTag' : function(){
|
||||
'onRemoveTag': function () {
|
||||
var $tagsbox = $(this).next();
|
||||
|
||||
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
|
||||
|
||||
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
|
||||
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[13] + '"/>');
|
||||
}
|
||||
},
|
||||
onChange : function(){
|
||||
onChange: function () {
|
||||
// Fix tooltip on refresh the tags list
|
||||
$(this + '[title]').powerTip(powertipOptions);
|
||||
}
|
||||
});
|
||||
$('#wikifilter').tagsInput({
|
||||
'width':'350px',
|
||||
'height':'50px',
|
||||
'defaultText':'<?php echo _('Añadir filtro'); ?>',
|
||||
'defaultRemoveText':'<?php echo _('Eliminar filtro'); ?>',
|
||||
'removeWithBackspace' : false,
|
||||
onAddTag : function(){
|
||||
'width': '350px',
|
||||
'height': '50px',
|
||||
'defaultText': '<?php echo _('Añadir filtro'); ?>',
|
||||
'defaultRemoveText': '<?php echo _('Eliminar filtro'); ?>',
|
||||
'removeWithBackspace': false,
|
||||
onAddTag: function () {
|
||||
// Fix scrolling to bottom
|
||||
var $tagsbox = $(this).next();
|
||||
$tagsbox.animate({scrollTop: $tagsbox.height()});
|
||||
|
||||
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
|
||||
|
||||
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
|
||||
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[13] + '"/>');
|
||||
}
|
||||
},
|
||||
onRemoveTag : function(){
|
||||
onRemoveTag: function () {
|
||||
var $tagsbox = $(this).next();
|
||||
|
||||
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
|
||||
|
||||
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
|
||||
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[13] + '"/>');
|
||||
}
|
||||
},
|
||||
onChange : function(){
|
||||
onChange: function () {
|
||||
var $tagsbox = $(this).next();
|
||||
last_width = $tagsbox.find("span:last").width() + 10;
|
||||
$tagsbox.find(".tag:last").css('width', last_width);
|
||||
|
||||
|
||||
// Fix tooltip on refresh the tags list
|
||||
$(this + '[title]').powerTip(powertipOptions);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
@@ -32,36 +32,41 @@ $activeTab = $data['activeTab'];
|
||||
|
||||
<div id="fancyContainer" align="center">
|
||||
<h2 class="midround"><?php echo $data['header']; ?></H2>
|
||||
|
||||
<form method="post" name="frmCustomers" id="frmCustomers">
|
||||
<table class="fancydata">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Nombre'); ?></td>
|
||||
<td class="valField">
|
||||
<input type="text" id="grpname" name="name" title="<?php echo _('Nombre del cliente'); ?>" value="<?php echo $customer["customer_name"] ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Nombre'); ?></td>
|
||||
<td class="valField">
|
||||
<input type="text" id="grpname" name="name" title="<?php echo _('Nombre del cliente'); ?>"
|
||||
value="<?php echo $customer["customer_name"] ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Descripción'); ?></td>
|
||||
<td class="valField"><input type="text" id="grpdesc" name="description" title="<?php echo _('Descripción del cliente'); ?>" value="<?php echo $customer["customer_description"]; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Descripción'); ?></td>
|
||||
<td class="valField"><input type="text" id="grpdesc" name="description"
|
||||
title="<?php echo _('Descripción del cliente'); ?>"
|
||||
value="<?php echo $customer["customer_description"]; ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $customer["customer_id"]; ?>" />
|
||||
<input type="hidden" name="action" value="<?php echo $customer["action"] ?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>" />
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $customer["customer_id"]; ?>"/>
|
||||
<input type="hidden" name="action" value="<?php echo $customer["action"] ?>"/>
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>"/>
|
||||
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(true) ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
<div id="resCheck"><span id="resFancyAccion"></span></div>
|
||||
<div class="action-in-box">
|
||||
<ul>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="appMgmtSave('frmCustomers');" /></li>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg"
|
||||
OnClick="appMgmtSave('frmCustomers');"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,7 +56,8 @@ $accountData = $account->getAccount();
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Clave'); ?></td>
|
||||
<td class="valField">
|
||||
<input type="password" maxlength="255" name="password" onKeyUp="checkPassLevel(this.value)" autocomplete="off">
|
||||
<input type="password" maxlength="255" name="password" onKeyUp="checkPassLevel(this.value)"
|
||||
autocomplete="off">
|
||||
<img src="imgs/user-pass.png" title="<?php echo _('La clave generada se mostrará aquí'); ?>"
|
||||
class="inputImg" id="viewPass"/>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -26,28 +26,28 @@
|
||||
?>
|
||||
|
||||
<div id="actions" align="center">
|
||||
|
||||
<?php if ( isset($data['showlogo']) ): ?>
|
||||
<div id="logo">
|
||||
<img src="<?php echo SP_Init::$WEBROOT; ?>/imgs/logo_full.png" alt="sysPass logo"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$errors = $data['errors'];
|
||||
|
||||
if( count($errors) > 0){
|
||||
echo '<ul class="errors round">';
|
||||
<?php if (isset($data['showlogo'])): ?>
|
||||
<div id="logo">
|
||||
<img src="<?php echo SP_Init::$WEBROOT; ?>/imgs/logo_full.png" alt="sysPass logo"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
foreach($errors as $err){
|
||||
if( is_array($err) ){
|
||||
echo '<li class="err_'.$err["type"].'">';
|
||||
echo '<strong>'.$err['description'].'</strong>';
|
||||
echo ( $err['hint'] ) ? '<p class="hint">'.$err['hint'].'</p>' : '';
|
||||
echo '</li>';
|
||||
<?php
|
||||
$errors = $data['errors'];
|
||||
|
||||
if (count($errors) > 0) {
|
||||
echo '<ul class="errors round">';
|
||||
|
||||
foreach ($errors as $err) {
|
||||
if (is_array($err)) {
|
||||
echo '<li class="err_' . $err["type"] . '">';
|
||||
echo '<strong>' . $err['description'] . '</strong>';
|
||||
echo ($err['hint']) ? '<p class="hint">' . $err['hint'] . '</p>' : '';
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'
|
||||
$startTime = microtime();
|
||||
$rowClass = "row_even";
|
||||
$isDemoMode = SP_Util::demoIsEnabled();
|
||||
$start = ( isset($data['start']) ) ? (int) $data['start'] : 0;
|
||||
$start = (isset($data['start'])) ? (int)$data['start'] : 0;
|
||||
|
||||
$events = SP_Log::getEvents($start);
|
||||
?>
|
||||
@@ -70,48 +70,48 @@ $numRows = SP_Log::$numRows;
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="resSearch">
|
||||
<?php
|
||||
foreach ($events as $log) {
|
||||
$rowClass = ( $rowClass == "row_even" ) ? "row_odd" : "row_even";
|
||||
$description = ( $isDemoMode === false ) ? utf8_decode($log->log_description) : preg_replace("/\d+\.\d+\.\d+\.\d+/", "*.*.*.*", utf8_decode($log->log_description));
|
||||
<?php
|
||||
foreach ($events as $log) {
|
||||
$rowClass = ($rowClass == "row_even") ? "row_odd" : "row_even";
|
||||
$description = ($isDemoMode === false) ? utf8_decode($log->log_description) : preg_replace("/\d+\.\d+\.\d+\.\d+/", "*.*.*.*", utf8_decode($log->log_description));
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $rowClass; ?>">
|
||||
<td class="cell">
|
||||
<?php echo $log->log_id; ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo $log->date; ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo utf8_decode($log->log_action); ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo strtoupper($log->log_login); ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo ($isDemoMode) ? preg_replace('#\d+#','*',$log->log_ipAddress) : $log->log_ipAddress; ?>
|
||||
</td>
|
||||
<td class="cell-description">
|
||||
<?php
|
||||
$descriptions = explode(';;', $description);
|
||||
<tr class="<?php echo $rowClass; ?>">
|
||||
<td class="cell">
|
||||
<?php echo $log->log_id; ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo $log->date; ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo utf8_decode($log->log_action); ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo strtoupper($log->log_login); ?>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<?php echo ($isDemoMode) ? preg_replace('#\d+#', '*', $log->log_ipAddress) : $log->log_ipAddress; ?>
|
||||
</td>
|
||||
<td class="cell-description">
|
||||
<?php
|
||||
$descriptions = explode(';;', $description);
|
||||
|
||||
foreach ($descriptions as $text) {
|
||||
if (preg_match('/^SQL.*/', $text)){
|
||||
$text = preg_replace('/([[:alpha:]_]+),/', '\\1,<br>', $text);
|
||||
$text = preg_replace('/(UPDATE|DELETE|TRUNCATE|INSERT|SELECT|WHERE|LEFT|ORDER|LIMIT|FROM)/', '<br>\\1', $text);
|
||||
}
|
||||
|
||||
if (strlen($text) >= 150) {
|
||||
echo wordwrap($text, 150, '<br>', true);
|
||||
} else {
|
||||
echo $text . '<br>';
|
||||
}
|
||||
foreach ($descriptions as $text) {
|
||||
if (preg_match('/^SQL.*/', $text)) {
|
||||
$text = preg_replace('/([[:alpha:]_]+),/', '\\1,<br>', $text);
|
||||
$text = preg_replace('/(UPDATE|DELETE|TRUNCATE|INSERT|SELECT|WHERE|LEFT|ORDER|LIMIT|FROM)/', '<br>\\1', $text);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
if (strlen($text) >= 150) {
|
||||
echo wordwrap($text, 150, '<br>', true);
|
||||
} else {
|
||||
echo $text . '<br>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -126,7 +126,8 @@ SP_Html::printQueryLogNavBar($start, $numRows, $totalTime);
|
||||
<div class="action fullWidth">
|
||||
<ul>
|
||||
<li>
|
||||
<img src="imgs/clear.png" title="<?php echo _('Vaciar registro de eventos'); ?>" class="inputImg" OnClick="clearEventlog('<?php echo SP_Common::getSessionKey(); ?>');" />
|
||||
<img src="imgs/clear.png" title="<?php echo _('Vaciar registro de eventos'); ?>" class="inputImg"
|
||||
OnClick="clearEventlog('<?php echo SP_Common::getSessionKey(); ?>');"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -49,9 +49,9 @@ $activeTab = $data['activeTab'];
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $group["usergroup_id"]; ?>" />
|
||||
<input type="hidden" name="action" value="<?php echo $group["action"] ?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>" />
|
||||
@@ -61,7 +61,8 @@ $activeTab = $data['activeTab'];
|
||||
<div id="resCheck"><span id="resFancyAccion"></span></div>
|
||||
<div class="action-in-box">
|
||||
<ul>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="appMgmtSave('frmGroups');" /></li>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg"
|
||||
OnClick="appMgmtSave('frmGroups');"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -79,7 +79,7 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ( SP_Util::demoIsEnabled() ) {
|
||||
if (SP_Util::demoIsEnabled()) {
|
||||
$newFeatures = array(
|
||||
_('Nuevo interface de búsqueda con estilo de lista o tipo tarjeta'),
|
||||
_('Selección de grupos y usuarios de acceso a cuentas'),
|
||||
@@ -98,13 +98,13 @@ if ( SP_Util::demoIsEnabled() ) {
|
||||
_('Mejoras de seguridad en XSS e inyección SQL')
|
||||
);
|
||||
echo '<div id="whatsNewIcon">';
|
||||
echo '<img src="imgs/gearscolorful.png" title="' . _('Nuevas Características') . '" alt="'. _('Nuevas Características').'" onclick="$(\'#whatsNew\').show(500);"/>';
|
||||
echo '<img src="imgs/gearscolorful.png" title="' . _('Nuevas Características') . '" alt="' . _('Nuevas Características') . '" onclick="$(\'#whatsNew\').show(500);"/>';
|
||||
echo '<h2>' . _('Nuevas Características') . '</h2>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="whatsNew" class="round5 shadow">';
|
||||
echo '<ul>';
|
||||
foreach ( $newFeatures as $feature) {
|
||||
foreach ($newFeatures as $feature) {
|
||||
echo '<li>' . $feature . '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
|
||||
@@ -29,8 +29,8 @@ $startTime = microtime();
|
||||
|
||||
$adminApp = ( isset($_SESSION["uisadminapp"]) && $_SESSION["uisadminapp"] == 1 ) ? "<span title=\""._('Admin Aplicación')."\">(A+)</span>" : "";
|
||||
$userId = ( isset($_SESSION["uid"]) ) ? $_SESSION["uid"] : 0;
|
||||
$userLogin = ( isset($_SESSION["ulogin"]) && ! empty($_SESSION["ulogin"])) ? strtoupper($_SESSION["ulogin"]) : '';
|
||||
$userName = ( isset($_SESSION["uname"]) && ! empty($_SESSION["uname"])) ? $_SESSION["uname"] : strtoupper($userLogin);
|
||||
$userLogin = (isset($_SESSION["ulogin"]) && !empty($_SESSION["ulogin"])) ? strtoupper($_SESSION["ulogin"]) : '';
|
||||
$userName = (isset($_SESSION["uname"]) && !empty($_SESSION["uname"])) ? $_SESSION["uname"] : strtoupper($userLogin);
|
||||
$userGroup = ( isset($_SESSION["ugroupn"]) ) ? $_SESSION["ugroupn"] : '';
|
||||
|
||||
$strUser = "$userName ($userGroup) " . $adminApp;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'));
|
||||
|
||||
$activeTab = $data['activeTab'];
|
||||
@@ -79,15 +79,15 @@ $onCloseAction = $data['onCloseAction'];
|
||||
<?php echo _('Los datos actuales serán borrados (excepto el usuario actual)'); ?>
|
||||
<br><br>
|
||||
<label for="chkmigrate"><?php echo _('NO'); ?></label>
|
||||
<input type="checkbox" name="chkmigrate" id="chkmigrate" class="checkbox" />
|
||||
<input type="checkbox" name="chkmigrate" id="chkmigrate" class="checkbox"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="action" value="migrate" />
|
||||
<input type="hidden" name="isAjax" value="1" />
|
||||
<input type="hidden" name="isAjax" value="1"/>
|
||||
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(true); ?>">
|
||||
</form>
|
||||
|
||||
@@ -112,7 +112,7 @@ $onCloseAction = $data['onCloseAction'];
|
||||
</td>
|
||||
<td class="valField">
|
||||
<form method="post" enctypr="multipart/form-data" name="upload_form" id="fileUpload">
|
||||
<input type="file" id="inFile" name="inFile" />
|
||||
<input type="file" id="inFile" name="inFile"/>
|
||||
</form>
|
||||
<div id="dropzone" class="round" title="<?php echo _('Soltar archivo aquí o click para seleccionar'); ?>">
|
||||
<img src="imgs/upload.png" alt="upload" class="opacity50"/>
|
||||
@@ -123,12 +123,12 @@ $onCloseAction = $data['onCloseAction'];
|
||||
|
||||
<script>
|
||||
$('#frmMigrate .checkbox').button();
|
||||
$('#frmMigrate .ui-button').click(function(){
|
||||
$('#frmMigrate .ui-button').click(function () {
|
||||
// El cambio de clase se produce durante el evento de click
|
||||
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
|
||||
if ( $(this).hasClass('ui-state-active') ){
|
||||
if ($(this).hasClass('ui-state-active')) {
|
||||
$(this).children().html('<?php echo _('NO'); ?>');
|
||||
} else{
|
||||
} else {
|
||||
$(this).children().html('<?php echo _('SI'); ?>');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -92,11 +92,15 @@ $activeTab = $data['activeTab'];
|
||||
<br>
|
||||
<label for="profile_profiles" title="<?php echo _('Gestión de perfiles'); ?>"><?php echo _('Perfiles'); ?></label>
|
||||
<input type="checkbox" id="profile_profiles" name="profile_profiles" <?php echo $profile['userProfile_pProfiles']; ?> />
|
||||
<label for="profile_categories" title="<?php echo _('Gestión de categorías'); ?>"><?php echo _('Categorías'); ?></label>
|
||||
<input type="checkbox" id="profile_categories" name="profile_categories" <?php echo $profile['userProfile_pAppMgmtCategories']; ?> />
|
||||
<label for="profile_categories"
|
||||
title="<?php echo _('Gestión de categorías'); ?>"><?php echo _('Categorías'); ?></label>
|
||||
<input type="checkbox" id="profile_categories"
|
||||
name="profile_categories" <?php echo $profile['userProfile_pAppMgmtCategories']; ?> />
|
||||
<br>
|
||||
<label for="profile_customers" title="<?php echo _('Gestión de clientes'); ?>"><?php echo _('Clientes'); ?></label>
|
||||
<input type="checkbox" id="profile_customers" name="profile_customers" <?php echo $profile['userProfile_pAppMgmtCustomers']; ?> />
|
||||
<label for="profile_customers"
|
||||
title="<?php echo _('Gestión de clientes'); ?>"><?php echo _('Clientes'); ?></label>
|
||||
<input type="checkbox" id="profile_customers"
|
||||
name="profile_customers" <?php echo $profile['userProfile_pAppMgmtCustomers']; ?> />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -111,9 +115,9 @@ $activeTab = $data['activeTab'];
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $profile['userprofile_id']; ?>" />
|
||||
<input type="hidden" name="action" value="<?php echo $profile["action"] ?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>" />
|
||||
@@ -131,7 +135,8 @@ $activeTab = $data['activeTab'];
|
||||
<div id="resCheck"><span id="resFancyAccion"></span></div>
|
||||
<div class="action-in-box">
|
||||
<ul>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="appMgmtSave('frmProfiles');" /></li>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg"
|
||||
OnClick="appMgmtSave('frmProfiles');"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
@@ -32,32 +32,36 @@ $accountData = $account->getAccount();
|
||||
|
||||
<div id="title" class="midroundup titleNormal"><?php echo _('Solicitar Modificación de Cuenta'); ?></div>
|
||||
|
||||
<form method="post" name="requestmodify" id="frmRequestModify" >
|
||||
<form method="post" name="requestmodify" id="frmRequestModify">
|
||||
<table class="data round">
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Nombre'); ?></td><td class="valField"><?php echo $accountData->account_name; ?></td>
|
||||
<td class="descField"><?php echo _('Nombre'); ?></td>
|
||||
<td class="valField"><?php echo $accountData->account_name; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Cliente'); ?></td><td class="valField"><?php echo $accountData->customer_name; ?></td>
|
||||
</tr>
|
||||
<?php if ( $data['lastaction'] == 'accview' ): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('URL / IP'); ?></td>
|
||||
<td class="valField"><A href="<?php echo $accountData->account_url; ?>" target="_blank"><?php echo $accountData->account_url; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Usuario'); ?></td>
|
||||
<td class="valField"><?php echo $accountData->account_login; ?></td>
|
||||
<td class="descField"><?php echo _('Cliente'); ?></td>
|
||||
<td class="valField"><?php echo $accountData->customer_name; ?></td>
|
||||
</tr>
|
||||
<?php if ($data['lastaction'] == 'accview'): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('URL / IP'); ?></td>
|
||||
<td class="valField"><A href="<?php echo $accountData->account_url; ?>"
|
||||
target="_blank"><?php echo $accountData->account_url; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Usuario'); ?></td>
|
||||
<td class="valField"><?php echo $accountData->account_login; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Petición'); ?></td>
|
||||
<td class="valField">
|
||||
<textarea name="description" cols="30" rows="5" placeholder="<?php echo _('Descripción de la petición'); ?>" maxlength="1000"></textarea>
|
||||
<textarea name="description" cols="30" rows="5"
|
||||
placeholder="<?php echo _('Descripción de la petición'); ?>" maxlength="1000"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="accountid" value="<?php echo $account->accountId; ?>" />
|
||||
<input type="hidden" name="accountid" value="<?php echo $account->accountId; ?>"/>
|
||||
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(true); ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
@@ -65,10 +69,12 @@ $accountData = $account->getAccount();
|
||||
<div class="action">
|
||||
<ul>
|
||||
<li>
|
||||
<img SRC="imgs/back.png" title="<?php echo _('Atrás'); ?>" class="inputImg" id="btnBack" OnClick="doAction('<?php echo $data['lastaction']; ?>', 'accsearch',<?php echo $account->accountId; ?>)" />
|
||||
<img SRC="imgs/back.png" title="<?php echo _('Atrás'); ?>" class="inputImg" id="btnBack"
|
||||
OnClick="doAction('<?php echo $data['lastaction']; ?>', 'accsearch',<?php echo $account->accountId; ?>)"/>
|
||||
</li>
|
||||
<li>
|
||||
<img SRC="imgs/check.png" title="<?php echo _('Enviar'); ?>" class="inputImg" id="btnSave" OnClick="sendRequest();" />
|
||||
<img SRC="imgs/check.png" title="<?php echo _('Enviar'); ?>" class="inputImg" id="btnSave"
|
||||
OnClick="sendRequest();"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@ $categoriesSelProp = array("name" => "category",
|
||||
"attribs" => "");
|
||||
|
||||
$isAdmin = ($_SESSION["uisadminapp"] || $_SESSION["uisadminacc"]);
|
||||
$globalSearch = SP_Config::getValue('globalsearch',0);
|
||||
$globalSearch = SP_Config::getValue('globalsearch', 0);
|
||||
$chkGlobalSearch = SP_Common::parseParams('s', 'accountGlobalSearch', 0);
|
||||
$searchStart = SP_Common::parseParams('s', 'accountSearchStart', 0);
|
||||
$searchKey = SP_Common::parseParams('s', 'accountSearchKey', 0);
|
||||
@@ -56,15 +56,20 @@ $searchOrder = SP_Common::parseParams('s', 'accountSearchOrder', 0);
|
||||
<table id="tblTools" class="round shadow">
|
||||
<tr>
|
||||
<td id="toolsLeft">
|
||||
<img src="imgs/clear.png" title="<?php echo _('Limpiar'); ?>" class="inputImg" id="btnClear" onClick="clearSearch(); accSearch(0);" />
|
||||
<input type="text" name="search" id="txtSearch" onKeyUp="accSearch(1,event)" value="<?php echo SP_Common::parseParams('s', 'accountSearchTxt'); ?>" placeholder="<?php echo _('Texto a buscar'); ?>"/>
|
||||
<?php if ( $globalSearch && ! $isAdmin ): ?>
|
||||
<input type="checkbox" name="gsearch" id="gsearch" class="checkbox" <?php echo ($chkGlobalSearch) ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="gsearch" title="<?php echo _('Búsqueda global');?>"><?php echo ($chkGlobalSearch) ? 'ON' : 'OFF'; ?></label>
|
||||
<?php endif; ?>
|
||||
<img src="imgs/clear.png" title="<?php echo _('Limpiar'); ?>" class="inputImg" id="btnClear"
|
||||
onClick="clearSearch(); accSearch(0);"/>
|
||||
<input type="text" name="search" id="txtSearch" onKeyUp="accSearch(1,event)"
|
||||
value="<?php echo SP_Common::parseParams('s', 'accountSearchTxt'); ?>"
|
||||
placeholder="<?php echo _('Texto a buscar'); ?>"/>
|
||||
<?php if ($globalSearch && !$isAdmin): ?>
|
||||
<input type="checkbox" name="gsearch" id="gsearch"
|
||||
class="checkbox" <?php echo ($chkGlobalSearch) ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="gsearch"
|
||||
title="<?php echo _('Búsqueda global'); ?>"><?php echo ($chkGlobalSearch) ? 'ON' : 'OFF'; ?></label>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="start" value="<?php echo $searchStart; ?>">
|
||||
<input type="hidden" name="skey" value="<?php echo $searchKey; ?>" />
|
||||
<input type="hidden" name="sorder" value="<?php echo $searchOrder; ?>" />
|
||||
<input type="hidden" name="skey" value="<?php echo $searchKey; ?>"/>
|
||||
<input type="hidden" name="sorder" value="<?php echo $searchOrder; ?>"/>
|
||||
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(true); ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
<?php
|
||||
@@ -83,16 +88,17 @@ $searchOrder = SP_Common::parseParams('s', 'accountSearchOrder', 0);
|
||||
accSearch(0);
|
||||
mkChosen({id: 'selCustomer', placeholder: '<?php echo _('Seleccionar Cliente'); ?>', noresults: '<?php echo _('Sin resultados'); ?>' });
|
||||
mkChosen({id: 'selCategory', placeholder: '<?php echo _('Seleccionar Categoría'); ?>', noresults: '<?php echo _('Sin resultados'); ?>' });
|
||||
|
||||
$("#rpp").spinner({step: 3, max: 50, min: 6, numberFormat: "n", stop: function(event, ui) {
|
||||
|
||||
$("#rpp").spinner({
|
||||
step: 3, max: 50, min: 6, numberFormat: "n", stop: function (event, ui) {
|
||||
accSearch(0);
|
||||
}});
|
||||
<?php if ( $globalSearch ): ?>
|
||||
$('#tblTools').find('.checkbox').button();
|
||||
$('#gsearch').click(function(){
|
||||
if ( $(this).next('label').hasClass('ui-state-active') ){
|
||||
$('#gsearch').click(function () {
|
||||
if ($(this).next('label').hasClass('ui-state-active')) {
|
||||
$(this).next('label').children('span').html('OFF');
|
||||
} else{
|
||||
} else {
|
||||
$(this).next('label').children('span').html('ON');
|
||||
}
|
||||
accSearch(0);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
|
||||
@@ -32,7 +32,7 @@ $isView = $data['view'];
|
||||
$user = SP_Users::getUserData($data['itemid']);
|
||||
|
||||
$isDemo = SP_Util::demoIsEnabled();
|
||||
$isDisabled = ( $isDemo || $isView ) ? 'disabled' : '';
|
||||
$isDisabled = ($isDemo || $isView) ? 'disabled' : '';
|
||||
|
||||
$profilesSelProp = array('name' => 'profileid',
|
||||
'id' => 'selProfile',
|
||||
@@ -42,7 +42,7 @@ $profilesSelProp = array('name' => 'profileid',
|
||||
'selected' => $user['user_profileId'],
|
||||
'default' => '',
|
||||
'js' => '',
|
||||
'attribs' => array('required',$isDisabled));
|
||||
'attribs' => array('required', $isDisabled));
|
||||
|
||||
$groupsSelProp = array('name' => 'groupid',
|
||||
'id' => 'selGroup',
|
||||
@@ -52,7 +52,7 @@ $groupsSelProp = array('name' => 'groupid',
|
||||
'selected' => $user['user_groupId'],
|
||||
'default' => '',
|
||||
'js' => '',
|
||||
'attribs' => array('required',$isDisabled));
|
||||
'attribs' => array('required', $isDisabled));
|
||||
|
||||
$ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : "";
|
||||
?>
|
||||
@@ -65,12 +65,14 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : "";
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Nombre') ?></td>
|
||||
<td class="valField">
|
||||
<?php
|
||||
if ( ! $isView ){
|
||||
?>
|
||||
<input type="text" id="usrname" name="name" title="<?php echo _('Nombre de usuario completo'); ?>" class="txtuser" maxlength="80" value="<?php echo $user['user_name']; ?>" />
|
||||
<?php
|
||||
} else{
|
||||
<?php
|
||||
if (!$isView) {
|
||||
?>
|
||||
<input type="text" id="usrname" name="name"
|
||||
title="<?php echo _('Nombre de usuario completo'); ?>" class="txtuser" maxlength="80"
|
||||
value="<?php echo $user['user_name']; ?>"/>
|
||||
<?php
|
||||
} else {
|
||||
echo $user['user_name'];
|
||||
}
|
||||
?>
|
||||
@@ -80,14 +82,16 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : "";
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Login'); ?></td><td class="valField">
|
||||
<?php
|
||||
if ( ! $isView ){
|
||||
?>
|
||||
<input type="text" id="usrlogin" name="login" title="<?php echo _('Login de inicio de sesión'); ?>" class="txtlogin" maxlength="30" value="<?php echo $user['user_login'] ?>" <?php echo $ro; ?> />
|
||||
if (!$isView) {
|
||||
?>
|
||||
<input type="text" id="usrlogin" name="login"
|
||||
title="<?php echo _('Login de inicio de sesión'); ?>" class="txtlogin" maxlength="30"
|
||||
value="<?php echo $user['user_login'] ?>" <?php echo $ro; ?> />
|
||||
<?php if ($ro): ?>
|
||||
<img src="imgs/ldap.png" title="<?php echo _('Usuario de LDAP'); ?>" class="iconMini" />
|
||||
<img src="imgs/ldap.png" title="<?php echo _('Usuario de LDAP'); ?>" class="iconMini"/>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
} else{
|
||||
} else {
|
||||
echo $user['user_login'];
|
||||
}
|
||||
?>
|
||||
@@ -97,26 +101,28 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : "";
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Perfil'); ?></td>
|
||||
<td class="valField">
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrProfiles', 'userprofile_id', 'userprofile_name'), $profilesSelProp); ?>
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrProfiles', 'userprofile_id', 'userprofile_name'), $profilesSelProp); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Grupo'); ?></td>
|
||||
<td class="valField">
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrGroups', 'usergroup_id', 'usergroup_name'), $groupsSelProp); ?>
|
||||
<?php SP_Html::printSelect(DB::getValuesForSelect('usrGroups', 'usergroup_id', 'usergroup_name'), $groupsSelProp); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Email'); ?></td>
|
||||
<td class="valField">
|
||||
<?php
|
||||
if ( ! $isView ){
|
||||
?>
|
||||
<input type="text" id="usremail" name="email" title="<?php echo _('Dirección de correo'); ?>" class="txtemail" maxlength="50" value="<?php echo $user['user_email']; ?>" />
|
||||
<?php
|
||||
} else{
|
||||
if (!$isView) {
|
||||
?>
|
||||
<input type="text" id="usremail" name="email"
|
||||
title="<?php echo _('Dirección de correo'); ?>" class="txtemail" maxlength="50"
|
||||
value="<?php echo $user['user_email']; ?>"/>
|
||||
<?php
|
||||
} else {
|
||||
echo $user['user_email'];
|
||||
}
|
||||
?>
|
||||
@@ -124,13 +130,14 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : "";
|
||||
|
||||
</tr>
|
||||
|
||||
<?php if ( $user['action'] === 1 && ! $isView ): ?>
|
||||
<?php if ($user['action'] === 1 && !$isView): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Clave'); ?></td>
|
||||
<td class="valField">
|
||||
<input type="password" id="usrpass" name="pass" class="txtpass" maxlength="50" OnFocus="$('#passLevel').show();
|
||||
$('#resFancyAccion').hide();" OnKeyUp="checkPassLevel(this.value)" />
|
||||
<img id="passGen" src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria') ?>" class="inputImg" />
|
||||
<img id="passGen" src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria') ?>"
|
||||
class="inputImg"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -162,52 +169,56 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : "";
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
<label for="usrdisabled" title="<?php echo _('Deshabilitado'); ?>"><?php echo _('Deshabilitado'); ?></label>
|
||||
<input type="checkbox" id="usrdisabled" name="disabled" <?php echo $user['checks']['user_isDisabled'] . ' ' . $isDisabled; ?>/>
|
||||
<label for="usrchangepass" title="<?php echo _('Forzar cambio de clave'); ?>"><?php echo _('Cambio de Clave'); ?></label>
|
||||
<input type="checkbox" id="usrchangepass" name="changepass" <?php echo $user['checks']['user_isChangePass'] . ' ' . $isDisabled; ?>/>
|
||||
<input type="checkbox" id="usrdisabled"
|
||||
name="disabled" <?php echo $user['checks']['user_isDisabled'] . ' ' . $isDisabled; ?>/>
|
||||
<label for="usrchangepass"
|
||||
title="<?php echo _('Forzar cambio de clave'); ?>"><?php echo _('Cambio de Clave'); ?></label>
|
||||
<input type="checkbox" id="usrchangepass"
|
||||
name="changepass" <?php echo $user['checks']['user_isChangePass'] . ' ' . $isDisabled; ?>/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( $isView ): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Entradas'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_count']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Último Acceso'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_lastLogin']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Última Modificación'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_lastUpdate']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Fecha Clave Maestra'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_lastUpdateMPass']; ?></td>
|
||||
</tr>
|
||||
<?php if ($isView): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Entradas'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_count']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Último Acceso'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_lastLogin']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Última Modificación'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_lastUpdate']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo _('Fecha Clave Maestra'); ?></td>
|
||||
<td class="valField"> <?php echo $user['user_lastUpdateMPass']; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ( ! $isView ): ?>
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>" />
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>" />
|
||||
<input type="hidden" name="ldap" value="<?php echo $user['user_isLdap']; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $user['user_id']; ?>" />
|
||||
<input type="hidden" name="action" value="<?php echo $user['action']; ?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>" />
|
||||
<?php if (!$isView): ?>
|
||||
<input type="hidden" name="activeTab" value="<?php echo $activeTab ?>"/>
|
||||
<input type="hidden" name="onCloseAction" value="<?php echo $onCloseAction ?>"/>
|
||||
<input type="hidden" name="ldap" value="<?php echo $user['user_isLdap']; ?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $user['user_id']; ?>"/>
|
||||
<input type="hidden" name="action" value="<?php echo $user['action']; ?>"/>
|
||||
<input type="hidden" name="type" value="<?php echo $data['itemtype']; ?>"/>
|
||||
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(true) ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
|
||||
<?php if ( ! $isView ): ?>
|
||||
|
||||
<?php if (!$isView): ?>
|
||||
<div id="resCheck"><span id="resFancyAccion"></span></div>
|
||||
<div class="action-in-box">
|
||||
<ul>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="appMgmtSave('frmUsers');" /></li>
|
||||
<li><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg"
|
||||
OnClick="appMgmtSave('frmUsers');"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -224,7 +235,7 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : "";
|
||||
disable_search_threshold: 10,
|
||||
no_results_text: "<?php echo _('Sin resultados'); ?>"
|
||||
});
|
||||
$('#passGen').click(function(){
|
||||
$('#passGen').click(function () {
|
||||
$('#resFancyAccion').hide();
|
||||
password(11, true, true);
|
||||
});
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -31,7 +31,7 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'
|
||||
*/
|
||||
class SP_Upgrade
|
||||
{
|
||||
private static $dbUpgrade = array(110, 1121, 1122, 1123,11213);
|
||||
private static $dbUpgrade = array(110, 1121, 1122, 1123, 11213);
|
||||
private static $cfgUpgrade = array(1124);
|
||||
|
||||
/**
|
||||
@@ -117,7 +117,9 @@ class SP_Upgrade
|
||||
*/
|
||||
public static function needDBUpgrade($version)
|
||||
{
|
||||
$upgrades = array_filter(self::$dbUpgrade, function ($uVersions) use ($version){ return ($uVersions >= $version); } );
|
||||
$upgrades = array_filter(self::$dbUpgrade, function ($uVersions) use ($version) {
|
||||
return ($uVersions >= $version);
|
||||
});
|
||||
|
||||
return (count($upgrades) > 0);
|
||||
}
|
||||
@@ -169,9 +171,9 @@ class SP_Upgrade
|
||||
|
||||
$currData = SP_Config::getKeys(true);
|
||||
|
||||
foreach ( $mapParams as $newParam => $oldParam){
|
||||
if ( array_key_exists($oldParam,$currData)){
|
||||
SP_Config::setValue($newParam,$currData[$oldParam]);
|
||||
foreach ($mapParams as $newParam => $oldParam) {
|
||||
if (array_key_exists($oldParam, $currData)) {
|
||||
SP_Config::setValue($newParam, $currData[$oldParam]);
|
||||
SP_Config::deleteKey($oldParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ class SP_Users
|
||||
* Actualizar la clave de un usuario desde phpPMS.
|
||||
*
|
||||
* @param string $userLogin con el login del usuario
|
||||
* @param string $userPass con la clave del usuario
|
||||
* @param string $userPass con la clave del usuario
|
||||
* @return bool
|
||||
*
|
||||
* Esta función actualiza la clave de un usuario que ha sido migrado desde phpPMS
|
||||
@@ -506,7 +506,7 @@ class SP_Users
|
||||
* Insertar un registro de recuperación de clave.
|
||||
*
|
||||
* @param string $login con el login del usuario
|
||||
* @param string $hash con el hash para el cambio
|
||||
* @param string $hash con el hash para el cambio
|
||||
* @return bool
|
||||
*/
|
||||
public static function addPassRecover($login, $hash)
|
||||
@@ -553,6 +553,7 @@ class SP_Users
|
||||
/**
|
||||
* Comprobar si un usuario autentifica mediante LDAP
|
||||
* .
|
||||
*
|
||||
* @param string $userLogin con el login del usuario
|
||||
* @return bool
|
||||
*/
|
||||
@@ -811,8 +812,8 @@ class SP_Users
|
||||
$message['action'] = _('Nuevo Usuario');
|
||||
$message['text'][] = SP_Html::strongText(_('Usuario') . ': ') . $this->userName . ' (' . $this->userLogin . ')';
|
||||
|
||||
if ($this->userChangePass){
|
||||
if ( ! SP_Auth::mailPassRecover(DB::escape($this->userLogin),DB::escape($this->userEmail)) ){
|
||||
if ($this->userChangePass) {
|
||||
if (!SP_Auth::mailPassRecover(DB::escape($this->userLogin), DB::escape($this->userEmail))) {
|
||||
$message['text'][] = SP_Html::strongText(_('No se pudo realizar la petición de cambio de clave.'));
|
||||
}
|
||||
}
|
||||
@@ -853,8 +854,8 @@ class SP_Users
|
||||
$message['action'] = _('Modificar Usuario');
|
||||
$message['text'][] = SP_Html::strongText(_('Usuario') . ': ') . $this->userName . ' (' . $this->userLogin . ')';
|
||||
|
||||
if ($this->userChangePass){
|
||||
if ( ! SP_Auth::mailPassRecover(DB::escape($this->userLogin),DB::escape($this->userEmail)) ){
|
||||
if ($this->userChangePass) {
|
||||
if (!SP_Auth::mailPassRecover(DB::escape($this->userLogin), DB::escape($this->userEmail))) {
|
||||
$message['text'][] = SP_Html::strongText(_('No se pudo realizar la petición de cambio de clave.'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -639,7 +639,7 @@ class SP_Util
|
||||
* such as 'false','N','yes','on','off', etc.
|
||||
*
|
||||
* @author Samuel Levy <sam+nospam@samuellevy.com>
|
||||
* @param mixed $in The variable to check
|
||||
* @param mixed $in The variable to check
|
||||
* @param bool $strict If set to false, consider everything that is not false to
|
||||
* be true.
|
||||
* @return bool The boolean equivalent or null (if strict, and no exact equivalent)
|
||||
@@ -670,8 +670,11 @@ class SP_Util
|
||||
* @param $array
|
||||
* @return array
|
||||
*/
|
||||
public static function arrayJSEscape(&$array){
|
||||
array_walk($array, function(&$value, $index) {$value = str_replace(array("'", '"'), "\\'", $value);});
|
||||
public static function arrayJSEscape(&$array)
|
||||
{
|
||||
array_walk($array, function (&$value, $index) {
|
||||
$value = str_replace(array("'", '"'), "\\'", $value);
|
||||
});
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link http://syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
|
||||
431
js/ZeroClipboard.min.js
vendored
431
js/ZeroClipboard.min.js
vendored
File diff suppressed because one or more lines are too long
1166
js/alertify.js
1166
js/alertify.js
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,7 @@ jQuery.extend(jQuery.fancybox.defaults, {
|
||||
autoHeight: 'true',
|
||||
minHeight: 50,
|
||||
padding: 0,
|
||||
helpers: {overlay: { css: { 'background': 'rgba(0, 0, 0, 0.1)'}}},
|
||||
helpers: {overlay: {css: {'background': 'rgba(0, 0, 0, 0.1)'}}},
|
||||
afterShow: function () {
|
||||
"use strict";
|
||||
|
||||
@@ -341,7 +341,8 @@ function doLogin() {
|
||||
404: function () {
|
||||
var txt = LANG[1] + '<p>' + LANG[13] + '</p>';
|
||||
resMsg("error", txt);
|
||||
}}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
@@ -773,7 +774,7 @@ function appMgmtSave(frmId, isDel, id, type, sk, nextaction) {
|
||||
var url = '/ajax/ajax_appMgmtSave.php';
|
||||
|
||||
if (isDel === 1) {
|
||||
data = {'id': id, 'type': type, 'action': 4, 'sk': sk, 'activeTab': frmId, 'onCloseAction': nextaction };
|
||||
data = {'id': id, 'type': type, 'action': 4, 'sk': sk, 'activeTab': frmId, 'onCloseAction': nextaction};
|
||||
var atext = '<div id="alert"><p id="alert-text">' + LANG[12] + '</p></div>';
|
||||
|
||||
alertify.confirm(atext, function (e) {
|
||||
@@ -813,7 +814,7 @@ function clearEventlog(sk) {
|
||||
|
||||
alertify.confirm(atext, function (e) {
|
||||
if (e) {
|
||||
var data = { 'clear': 1, 'sk': sk, 'isAjax': 1};
|
||||
var data = {'clear': 1, 'sk': sk, 'isAjax': 1};
|
||||
var url = '/ajax/ajax_eventlog.php';
|
||||
|
||||
sendAjax(data, url);
|
||||
@@ -1000,9 +1001,11 @@ function resMsg(type, txt, url, action) {
|
||||
"use strict";
|
||||
|
||||
if (typeof url !== "undefined") {
|
||||
$.ajax({ url: url, type: 'get', dataType: 'html', async: false, success: function (data) {
|
||||
txt = data;
|
||||
}});
|
||||
$.ajax({
|
||||
url: url, type: 'get', dataType: 'html', async: false, success: function (data) {
|
||||
txt = data;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var html;
|
||||
@@ -1011,13 +1014,13 @@ function resMsg(type, txt, url, action) {
|
||||
|
||||
switch (type) {
|
||||
case "ok":
|
||||
alertify.set({ beforeCloseAction: action });
|
||||
alertify.set({beforeCloseAction: action});
|
||||
return alertify.success(txt);
|
||||
case "error":
|
||||
alertify.set({ beforeCloseAction: action });
|
||||
alertify.set({beforeCloseAction: action});
|
||||
return alertify.error(txt);
|
||||
case "warn":
|
||||
alertify.set({ beforeCloseAction: action });
|
||||
alertify.set({beforeCloseAction: action});
|
||||
return alertify.log(txt);
|
||||
case "info":
|
||||
html = '<div id="fancyMsg" class="msgInfo">' + txt + '</div>';
|
||||
@@ -1029,17 +1032,23 @@ function resMsg(type, txt, url, action) {
|
||||
html = '<P CLASS="error round">Oops...<BR />' + LANG[1] + '<BR />' + txt + '</P>';
|
||||
return html;
|
||||
default:
|
||||
alertify.set({ beforeCloseAction: action });
|
||||
alertify.set({beforeCloseAction: action});
|
||||
return alertify.error(txt);
|
||||
}
|
||||
|
||||
$.fancybox(html, {afterLoad: function () {
|
||||
$('.fancybox-skin,.fancybox-outer,.fancybox-inner').css({'border-radius': '25px', '-moz-border-radius': '25px', '-webkit-border-radius': '25px'});
|
||||
}, afterClose: function () {
|
||||
if (typeof action !== "undefined") {
|
||||
eval(action);
|
||||
$.fancybox(html, {
|
||||
afterLoad: function () {
|
||||
$('.fancybox-skin,.fancybox-outer,.fancybox-inner').css({
|
||||
'border-radius': '25px',
|
||||
'-moz-border-radius': '25px',
|
||||
'-webkit-border-radius': '25px'
|
||||
});
|
||||
}, afterClose: function () {
|
||||
if (typeof action !== "undefined") {
|
||||
eval(action);
|
||||
}
|
||||
} });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Función para comprobar la conexión con LDAP
|
||||
@@ -1052,7 +1061,15 @@ function checkLdapConn() {
|
||||
var ldapBindUser = $('#frmConfig').find('[name=ldap_binduser]').val();
|
||||
var ldapBindPass = $('#frmConfig').find('[name=ldap_bindpass]').val();
|
||||
var sk = $('#frmConfig').find('[name=sk]').val();
|
||||
var data = {'ldap_server': ldapServer, 'ldap_base': ldapBase, 'ldap_group': ldapGroup, 'ldap_binduser': ldapBindUser, 'ldap_bindpass': ldapBindPass, 'isAjax': 1, 'sk': sk};
|
||||
var data = {
|
||||
'ldap_server': ldapServer,
|
||||
'ldap_base': ldapBase,
|
||||
'ldap_group': ldapGroup,
|
||||
'ldap_binduser': ldapBindUser,
|
||||
'ldap_bindpass': ldapBindPass,
|
||||
'isAjax': 1,
|
||||
'sk': sk
|
||||
};
|
||||
|
||||
sendAjax(data, '/ajax/ajax_checkLdap.php');
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
//
|
||||
//Requires jQuery UI: options to pass into jQuery UI Dialog
|
||||
//
|
||||
dialogOptions: { modal: true },
|
||||
dialogOptions: {modal: true},
|
||||
|
||||
//
|
||||
//a function to call while the dowload is being prepared before the browser's dialog appears
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
|
||||
|
||||
jQuery Tags Input Plugin 1.3.3
|
||||
|
||||
|
||||
Copyright (c) 2011 XOXCO, Inc
|
||||
|
||||
|
||||
Documentation for this plugin lives here:
|
||||
http://xoxco.com/clickable/jquery-tags-input
|
||||
|
||||
|
||||
Licensed under the MIT license:
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
|
||||
ben@xoxco.com
|
||||
|
||||
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
(function ($) {
|
||||
|
||||
var delimiter = new Array();
|
||||
var tags_callbacks = new Array();
|
||||
$.fn.doAutosize = function(o) {
|
||||
$.fn.doAutosize = function (o) {
|
||||
var minWidth = $(this).data('minwidth'),
|
||||
maxWidth = $(this).data('maxwidth'),
|
||||
val = '',
|
||||
input = $(this),
|
||||
testSubject = $('#' + $(this).data('tester_id'));
|
||||
maxWidth = $(this).data('maxwidth'),
|
||||
val = '',
|
||||
input = $(this),
|
||||
testSubject = $('#' + $(this).data('tester_id'));
|
||||
|
||||
if (val === (val = input.val())) {
|
||||
return;
|
||||
@@ -34,9 +34,9 @@
|
||||
testSubject.html(escaped);
|
||||
// Calculate new width + whether to change
|
||||
var testerWidth = testSubject.width(),
|
||||
newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,
|
||||
currentWidth = input.width(),
|
||||
isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth)
|
||||
newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,
|
||||
currentWidth = input.width(),
|
||||
isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth)
|
||||
|| (newWidth > minWidth && newWidth < maxWidth);
|
||||
|
||||
// Animate width
|
||||
@@ -46,24 +46,24 @@
|
||||
|
||||
|
||||
};
|
||||
$.fn.resetAutosize = function(options) {
|
||||
$.fn.resetAutosize = function (options) {
|
||||
// alert(JSON.stringify(options));
|
||||
var minWidth = $(this).data('minwidth') || options.minInputWidth || $(this).width(),
|
||||
maxWidth = $(this).data('maxwidth') || options.maxInputWidth || ($(this).closest('.tagsinput').width() - options.inputPadding),
|
||||
val = '',
|
||||
input = $(this),
|
||||
testSubject = $('<tester/>').css({
|
||||
position: 'absolute',
|
||||
top: -9999,
|
||||
left: -9999,
|
||||
width: 'auto',
|
||||
fontSize: input.css('fontSize'),
|
||||
fontFamily: input.css('fontFamily'),
|
||||
fontWeight: input.css('fontWeight'),
|
||||
letterSpacing: input.css('letterSpacing'),
|
||||
whiteSpace: 'nowrap'
|
||||
}),
|
||||
testerId = $(this).attr('id') + '_autosize_tester';
|
||||
maxWidth = $(this).data('maxwidth') || options.maxInputWidth || ($(this).closest('.tagsinput').width() - options.inputPadding),
|
||||
val = '',
|
||||
input = $(this),
|
||||
testSubject = $('<tester/>').css({
|
||||
position: 'absolute',
|
||||
top: -9999,
|
||||
left: -9999,
|
||||
width: 'auto',
|
||||
fontSize: input.css('fontSize'),
|
||||
fontFamily: input.css('fontFamily'),
|
||||
fontWeight: input.css('fontWeight'),
|
||||
letterSpacing: input.css('letterSpacing'),
|
||||
whiteSpace: 'nowrap'
|
||||
}),
|
||||
testerId = $(this).attr('id') + '_autosize_tester';
|
||||
if (!$('#' + testerId).length > 0) {
|
||||
testSubject.attr('id', testerId);
|
||||
//testSubject.appendTo('body');
|
||||
@@ -75,9 +75,9 @@
|
||||
input.css('width', minWidth);
|
||||
};
|
||||
|
||||
$.fn.addTag = function(value, options) {
|
||||
$.fn.addTag = function (value, options) {
|
||||
options = jQuery.extend({focus: false, callback: true}, options);
|
||||
this.each(function() {
|
||||
this.each(function () {
|
||||
var id = $(this).attr('id');
|
||||
|
||||
var tagslist = $(this).val().split(delimiter[id]);
|
||||
@@ -85,9 +85,9 @@
|
||||
tagslist = new Array();
|
||||
}
|
||||
|
||||
if ( options.tagToUpper == true ){
|
||||
if (options.tagToUpper == true) {
|
||||
value = jQuery.trim(value).toUpperCase();
|
||||
} else{
|
||||
} else {
|
||||
value = jQuery.trim(value);
|
||||
}
|
||||
|
||||
@@ -103,15 +103,15 @@
|
||||
|
||||
if (value != '' && skipTag != true) {
|
||||
$('<span>').addClass('tag').append(
|
||||
$('<span>').text(value).append(' '),
|
||||
$('<a>', {
|
||||
href: '#',
|
||||
title: options.removeText,
|
||||
text: 'x'
|
||||
}).click(function() {
|
||||
return $('#' + id).removeTag(escape(value), {removeText: (options.removeText)});
|
||||
})
|
||||
).insertBefore('#' + id + '_addTag');
|
||||
$('<span>').text(value).append(' '),
|
||||
$('<a>', {
|
||||
href: '#',
|
||||
title: options.removeText,
|
||||
text: 'x'
|
||||
}).click(function () {
|
||||
return $('#' + id).removeTag(escape(value), {removeText: (options.removeText)});
|
||||
})
|
||||
).insertBefore('#' + id + '_addTag');
|
||||
|
||||
tagslist.push(value);
|
||||
|
||||
@@ -128,8 +128,7 @@
|
||||
var f = tags_callbacks[id]['onAddTag'];
|
||||
f.call(this, value);
|
||||
}
|
||||
if (tags_callbacks[id] && tags_callbacks[id]['onChange'])
|
||||
{
|
||||
if (tags_callbacks[id] && tags_callbacks[id]['onChange']) {
|
||||
var i = tagslist.length;
|
||||
var f = tags_callbacks[id]['onChange'];
|
||||
f.call(this, $(this), tagslist[i - 1]);
|
||||
@@ -141,9 +140,9 @@
|
||||
return false;
|
||||
};
|
||||
|
||||
$.fn.removeTag = function(value, options) {
|
||||
$.fn.removeTag = function (value, options) {
|
||||
value = unescape(value);
|
||||
this.each(function() {
|
||||
this.each(function () {
|
||||
var id = $(this).attr('id');
|
||||
|
||||
var old = $(this).val().split(delimiter[id]);
|
||||
@@ -167,7 +166,7 @@
|
||||
return false;
|
||||
};
|
||||
|
||||
$.fn.tagExist = function(val) {
|
||||
$.fn.tagExist = function (val) {
|
||||
var id = $(this).attr('id');
|
||||
var tagslist = $(this).val().split(delimiter[id]);
|
||||
//true when tag exists, false when not
|
||||
@@ -175,13 +174,13 @@
|
||||
};
|
||||
|
||||
// clear all existing tags and import new ones from a string
|
||||
$.fn.importTags = function(str) {
|
||||
$.fn.importTags = function (str) {
|
||||
id = $(this).attr('id');
|
||||
$('#' + id + '_tagsinput .tag').remove();
|
||||
$.fn.tagsInput.importTags(this, str);
|
||||
};
|
||||
|
||||
$.fn.tagsInput = function(options) {
|
||||
$.fn.tagsInput = function (options) {
|
||||
var settings = jQuery.extend({
|
||||
interactive: true,
|
||||
defaultText: 'Add tag',
|
||||
@@ -201,7 +200,7 @@
|
||||
tagsToUpper: false
|
||||
}, options);
|
||||
|
||||
this.each(function() {
|
||||
this.each(function () {
|
||||
if (settings.hide) {
|
||||
$(this).hide();
|
||||
}
|
||||
@@ -250,11 +249,11 @@
|
||||
$(data.fake_input).css('background-color', '#FFFFFF');
|
||||
$(data.fake_input).resetAutosize(settings);
|
||||
|
||||
$(data.holder).bind('click', data, function(event) {
|
||||
$(data.holder).bind('click', data, function (event) {
|
||||
$(event.data.fake_input).focus();
|
||||
});
|
||||
|
||||
$(data.fake_input).bind('focus', data, function(event) {
|
||||
$(data.fake_input).bind('focus', data, function (event) {
|
||||
if ($(event.data.fake_input).val() == $(event.data.fake_input).attr('data-default')) {
|
||||
$(event.data.fake_input).val('');
|
||||
}
|
||||
@@ -269,15 +268,25 @@
|
||||
|
||||
if (jQuery.Autocompleter !== undefined) {
|
||||
$(data.fake_input).autocomplete(settings.autocomplete_url, settings.autocomplete);
|
||||
$(data.fake_input).bind('result', data, function(event, data, formatted) {
|
||||
$(data.fake_input).bind('result', data, function (event, data, formatted) {
|
||||
if (data) {
|
||||
$('#' + id).addTag(data[0] + "", {focus: true, unique: (settings.unique), removeText: (settings.defaultRemoveText), tagToUpper: (settings.tagsToUpper)});
|
||||
$('#' + id).addTag(data[0] + "", {
|
||||
focus: true,
|
||||
unique: (settings.unique),
|
||||
removeText: (settings.defaultRemoveText),
|
||||
tagToUpper: (settings.tagsToUpper)
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (jQuery.ui.autocomplete !== undefined) {
|
||||
$(data.fake_input).autocomplete(autocomplete_options);
|
||||
$(data.fake_input).bind('autocompleteselect', data, function(event, ui) {
|
||||
$(event.data.real_input).addTag(ui.item.value, {focus: true, unique: (settings.unique), removeText: (settings.defaultRemoveText), tagToUpper: (settings.tagsToUpper)});
|
||||
$(data.fake_input).bind('autocompleteselect', data, function (event, ui) {
|
||||
$(event.data.real_input).addTag(ui.item.value, {
|
||||
focus: true,
|
||||
unique: (settings.unique),
|
||||
removeText: (settings.defaultRemoveText),
|
||||
tagToUpper: (settings.tagsToUpper)
|
||||
});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@@ -286,11 +295,16 @@
|
||||
} else {
|
||||
// if a user tabs out of the field, create a new tag
|
||||
// this is only available if autocomplete is not used.
|
||||
$(data.fake_input).bind('blur', data, function(event) {
|
||||
$(data.fake_input).bind('blur', data, function (event) {
|
||||
var d = $(this).attr('data-default');
|
||||
if ($(event.data.fake_input).val() != '' && $(event.data.fake_input).val() != d) {
|
||||
if ((event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)))
|
||||
$(event.data.real_input).addTag($(event.data.fake_input).val(), {focus: true, unique: (settings.unique), removeText: (settings.defaultRemoveText), tagToUpper: (settings.tagsToUpper) });
|
||||
$(event.data.real_input).addTag($(event.data.fake_input).val(), {
|
||||
focus: true,
|
||||
unique: (settings.unique),
|
||||
removeText: (settings.defaultRemoveText),
|
||||
tagToUpper: (settings.tagsToUpper)
|
||||
});
|
||||
} else {
|
||||
$(event.data.fake_input).val($(event.data.fake_input).attr('data-default'));
|
||||
$(event.data.fake_input).css('color', settings.placeholderColor);
|
||||
@@ -300,11 +314,16 @@
|
||||
|
||||
}
|
||||
// if user types a comma, create a new tag
|
||||
$(data.fake_input).bind('keypress', data, function(event) {
|
||||
$(data.fake_input).bind('keypress', data, function (event) {
|
||||
if (event.which == event.data.delimiter.charCodeAt(0) || event.which == 13) {
|
||||
event.preventDefault();
|
||||
if ((event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)))
|
||||
$(event.data.real_input).addTag($(event.data.fake_input).val(), {focus: true, unique: (settings.unique), removeText: (settings.defaultRemoveText), tagToUpper: (settings.tagsToUpper)});
|
||||
$(event.data.real_input).addTag($(event.data.fake_input).val(), {
|
||||
focus: true,
|
||||
unique: (settings.unique),
|
||||
removeText: (settings.defaultRemoveText),
|
||||
tagToUpper: (settings.tagsToUpper)
|
||||
});
|
||||
$(event.data.fake_input).resetAutosize(settings);
|
||||
return false;
|
||||
} else if (event.data.autosize) {
|
||||
@@ -313,10 +332,8 @@
|
||||
}
|
||||
});
|
||||
//Delete last tag on backspace
|
||||
data.removeWithBackspace && $(data.fake_input).bind('keydown', function(event)
|
||||
{
|
||||
if (event.keyCode == 8 && $(this).val() == '')
|
||||
{
|
||||
data.removeWithBackspace && $(data.fake_input).bind('keydown', function (event) {
|
||||
if (event.keyCode == 8 && $(this).val() == '') {
|
||||
event.preventDefault();
|
||||
var last_tag = $(this).closest('.tagsinput').find('.tag:last').text();
|
||||
var id = $(this).attr('id').replace(/_tag$/, '');
|
||||
@@ -329,7 +346,7 @@
|
||||
|
||||
//Removes the not_valid class when user changes the value of the fake input
|
||||
if (data.unique) {
|
||||
$(data.fake_input).keydown(function(event) {
|
||||
$(data.fake_input).keydown(function (event) {
|
||||
if (event.keyCode == 8 || String.fromCharCode(event.which).match(/\w+|[áéíóúÁÉÍÓÚñÑ,/]+/)) {
|
||||
$(this).removeClass('not_valid');
|
||||
}
|
||||
@@ -339,17 +356,17 @@
|
||||
// if settings.interactive
|
||||
$(data.holder).animate({scrollTop: $(data.holder).height()});
|
||||
});
|
||||
|
||||
|
||||
return this;
|
||||
|
||||
};
|
||||
|
||||
$.fn.tagsInput.updateTagsField = function(obj, tagslist) {
|
||||
$.fn.tagsInput.updateTagsField = function (obj, tagslist) {
|
||||
var id = $(obj).attr('id');
|
||||
$(obj).val(tagslist.join(delimiter[id]));
|
||||
};
|
||||
|
||||
$.fn.tagsInput.importTags = function(obj, val, options) {
|
||||
$.fn.tagsInput.importTags = function (obj, val, options) {
|
||||
options = jQuery.extend({removeText: ''}, options);
|
||||
$(obj).val('');
|
||||
var id = $(obj).attr('id');
|
||||
@@ -357,8 +374,7 @@
|
||||
for (i = 0; i < tags.length; i++) {
|
||||
$(obj).addTag(tags[i], {focus: false, callback: false, removeText: options.removeText});
|
||||
}
|
||||
if (tags_callbacks[id] && tags_callbacks[id]['onChange'])
|
||||
{
|
||||
if (tags_callbacks[id] && tags_callbacks[id]['onChange']) {
|
||||
var f = tags_callbacks[id]['onChange'];
|
||||
f.call(obj, obj, tags[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user