Files
sysPass/ajax/ajax_eventlog.php
nuxsmin 0f172ed1d8 - Closes #26. Enable users password reset by email and forced by an admin.
- Improved email handling by using phpmailer class. All emails are sent in HTML format and security and authentication are available.
- Improved javascript code by code refactoring.
- Client IP address is logged in event log.
- Translation fixes.
- Minor bugfixes.
- Needs database upgrade (read wiki if unsure).
2014-02-24 01:51:23 +01:00

50 lines
1.6 KiB
PHP

<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2014 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';
SP_Util::checkReferer('POST');
if (!SP_Init::isLoggedIn()) {
SP_Util::logout();
}
SP_ACL::checkUserAccess('eventlog') || SP_Html::showCommonError('unavailable');
$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() ){
SP_Common::printJSON(_('Registro de eventos vaciado'), 0, "doAction('eventlog');scrollUp();");
} else{
SP_Common::printJSON(_('Error al vaciar el registro de eventos'));
}
}
$tplvars = array('start' => $start);
SP_Html::getTemplate('eventlog', $tplvars);