diff --git a/ajax/ajax_import.php b/ajax/ajax_import.php index bbb90702..2cfb2515 100644 --- a/ajax/ajax_import.php +++ b/ajax/ajax_import.php @@ -1 +1,69 @@ -. * */ use SP\Request; define('APP_ROOT', '..'); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; Request::checkReferer('POST'); if (!SP\Init::isLoggedIn()) { SP\Common::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10); } if (SP\Util::demoIsEnabled()) { SP\Common::printJSON(_('Ey, esto es una DEMO!!')); } $sk = SP\Request::analyze('sk', false); $defaultUser= SP\Request::analyze('defUser', 0); $defaultGroup = SP\Request::analyze('defGroup', 0); $importPwd = SP\Request::analyze('importPwd', '', false, false, false); $csvDelimiter = SP\Request::analyze('csvDelimiter'); if (!$sk || !SP\Common::checkSessionKey($sk)) { SP\Common::printJSON(_('CONSULTA INVÁLIDA')); } SP\Import::setDefUser($defaultUser); SP\Import::setDefGroup($defaultGroup); SP\Import::setImportPwd($importPwd); SP\Import::setCsvDelimiter($csvDelimiter); $res = SP\Import::doImport($_FILES["inFile"]); if (isset($res['error']) && is_array($res['error'])) { error_log($res['error']['hint']); $out = implode('\n\n', $res['error']); SP\Common::printJSON($out); } else if (is_array($res['ok'])) { $out = implode('\n\n', $res['ok']); SP\Common::printJSON($out, 0); } \ No newline at end of file +. + * + */ + +use SP\Request; + +define('APP_ROOT', '..'); + +require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; + +Request::checkReferer('POST'); + +if (!SP\Init::isLoggedIn()) { + SP\Common::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10); +} + +if (SP\Util::demoIsEnabled()) { + SP\Common::printJSON(_('Ey, esto es una DEMO!!')); +} + +$sk = SP\Request::analyze('sk', false); +$defaultUser= SP\Request::analyze('defUser', 0); +$defaultGroup = SP\Request::analyze('defGroup', 0); +$importPwd = SP\Request::analyze('importPwd', '', false, false, false); +$csvDelimiter = SP\Request::analyze('csvDelimiter'); + +if (!$sk || !SP\Common::checkSessionKey($sk)) { + SP\Common::printJSON(_('CONSULTA INVÁLIDA')); +} + +SP\Import::setDefUser($defaultUser); +SP\Import::setDefGroup($defaultGroup); +SP\Import::setImportPwd($importPwd); +SP\Import::setCsvDelimiter($csvDelimiter); + +$res = SP\Import::doImport($_FILES["inFile"]); + +if (isset($res['error']) && is_array($res['error'])) { + error_log($res['error']['hint']); + + $out = implode('\n\n', $res['error']); + + SP\Common::printJSON($out); +} else if (is_array($res['ok'])) { + $out = implode('\n\n', $res['ok']); + + SP\Common::printJSON($out, 0); +} \ No newline at end of file diff --git a/ajax/ajax_migrate.php b/ajax/ajax_migrate.php index 01980b84..76c1c2e3 100644 --- a/ajax/ajax_migrate.php +++ b/ajax/ajax_migrate.php @@ -1 +1,86 @@ -. * */ use SP\Request; define('APP_ROOT', '..'); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; Request::checkReferer('POST'); if (!SP\Init::isLoggedIn()) { SP\Common::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10); } if (SP\Util::demoIsEnabled()) { SP\Common::printJSON(_('Ey, esto es una DEMO!!')); } $sk = SP\Request::analyze('sk', false); if (!$sk || !SP\Common::checkSessionKey($sk)) { SP\Common::printJSON(_('CONSULTA INVÁLIDA')); } $frmDBUser = SP\Request::analyze('dbuser'); $frmDBPass = SP\Request::analyze('dbpass'); $frmDBName = SP\Request::analyze('dbname'); $frmDBHost = SP\Request::analyze('dbhost'); $frmMigrateEnabled = SP\Request::analyze('chkmigrate', 0, false, 1); if (!$frmMigrateEnabled) { SP\Common::printJSON(_('Confirmar la importación de cuentas')); } elseif (!$frmDBUser) { SP\Common::printJSON(_('Es necesario un usuario de conexión')); } elseif (!$frmDBPass) { SP\Common::printJSON(_('Es necesaria una clave de conexión')); } elseif (!$frmDBName) { SP\Common::printJSON(_('Es necesario el nombre de la BBDD')); } elseif (!$frmDBHost) { SP\Common::printJSON(_('Es necesario un nombre de host')); } $options['dbhost'] = $frmDBHost; $options['dbname'] = $frmDBName; $options['dbuser'] = $frmDBUser; $options['dbpass'] = $frmDBPass; $res = SP\Migrate::migrate($options); if (is_array($res['error'])) { foreach ($res['error'] as $error) { $errors [] = $error['description']; $errors [] = $error['hint']; error_log($error['hint']); } $out = implode('
', $errors); SP\Common::printJSON($out); } elseif (is_array($res['ok'])) { $out = implode('
', $res['ok']); SP\Common::printJSON($out, 0); } \ No newline at end of file +. + * + */ + +use SP\Request; + +define('APP_ROOT', '..'); + +require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; + +Request::checkReferer('POST'); + +if (!SP\Init::isLoggedIn()) { + SP\Common::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10); +} + +if (SP\Util::demoIsEnabled()) { + SP\Common::printJSON(_('Ey, esto es una DEMO!!')); +} + +$sk = SP\Request::analyze('sk', false); + +if (!$sk || !SP\Common::checkSessionKey($sk)) { + SP\Common::printJSON(_('CONSULTA INVÁLIDA')); +} + +$frmDBUser = SP\Request::analyze('dbuser'); +$frmDBPass = SP\Request::analyze('dbpass'); +$frmDBName = SP\Request::analyze('dbname'); +$frmDBHost = SP\Request::analyze('dbhost'); +$frmMigrateEnabled = SP\Request::analyze('chkmigrate', 0, false, 1); + +if (!$frmMigrateEnabled) { + SP\Common::printJSON(_('Confirmar la importación de cuentas')); +} elseif (!$frmDBUser) { + SP\Common::printJSON(_('Es necesario un usuario de conexión')); +} elseif (!$frmDBPass) { + SP\Common::printJSON(_('Es necesaria una clave de conexión')); +} elseif (!$frmDBName) { + SP\Common::printJSON(_('Es necesario el nombre de la BBDD')); +} elseif (!$frmDBHost) { + SP\Common::printJSON(_('Es necesario un nombre de host')); +} + +$options['dbhost'] = $frmDBHost; +$options['dbname'] = $frmDBName; +$options['dbuser'] = $frmDBUser; +$options['dbpass'] = $frmDBPass; + +$res = SP\Migrate::migrate($options); + +if (is_array($res['error'])) { + foreach ($res['error'] as $error) { + $errors [] = $error['description']; + $errors [] = $error['hint']; + error_log($error['hint']); + } + + $out = implode('
', $errors); + SP\Common::printJSON($out); +} elseif (is_array($res['ok'])) { + $out = implode('
', $res['ok']); + + SP\Common::printJSON($out, 0); +} \ No newline at end of file diff --git a/css/css.php b/css/css.php index a74ffadb..998dae0f 100644 --- a/css/css.php +++ b/css/css.php @@ -40,6 +40,7 @@ $cssFilesBase = array( array('href' => 'css/alertify.default.css', 'min' => true), array('href' => 'css/jquery.tagsinput.css', 'min' => true), array('href' => 'css/jquery.fancybox.css', 'min' => true), + array('href' => 'css/fonts.css', 'min' => true), ); if (file_exists($themeCssPath)){ diff --git a/css/fonts.css b/css/fonts.css new file mode 100644 index 00000000..379bb287 --- /dev/null +++ b/css/fonts.css @@ -0,0 +1,10 @@ +@font-face { + font-family: 'Register'; + font-style: normal; + font-weight: 400; + src: url("../imgs/register.eot"); /* For IE6-8 */ + src: local('Register'), + local('Register'), + url("../imgs/register.woff2") format('woff2'), + url("../imgs/register.ttf") format('truetype'); +} \ No newline at end of file diff --git a/inc/themes/classic/imgs/logo.svg b/imgs/logo.svg similarity index 52% rename from inc/themes/classic/imgs/logo.svg rename to imgs/logo.svg index f53690ab..37d68f9a 100644 --- a/inc/themes/classic/imgs/logo.svg +++ b/imgs/logo.svg @@ -284,21 +284,6 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #sysPass + Systems Password Manager + + diff --git a/imgs/register.eot b/imgs/register.eot new file mode 100644 index 00000000..f958b1cc Binary files /dev/null and b/imgs/register.eot differ diff --git a/imgs/register.otf b/imgs/register.otf new file mode 100644 index 00000000..162d4366 Binary files /dev/null and b/imgs/register.otf differ diff --git a/imgs/register.ttf b/imgs/register.ttf new file mode 100644 index 00000000..84fe73dc Binary files /dev/null and b/imgs/register.ttf differ diff --git a/imgs/register.woff b/imgs/register.woff new file mode 100644 index 00000000..ce8f01e3 Binary files /dev/null and b/imgs/register.woff differ diff --git a/imgs/register.woff2 b/imgs/register.woff2 new file mode 100644 index 00000000..ffda5c0f Binary files /dev/null and b/imgs/register.woff2 differ diff --git a/inc/themes/classic/css/styles.css b/inc/themes/classic/css/styles.css index 288d5f36..10ede1bd 100644 --- a/inc/themes/classic/css/styles.css +++ b/inc/themes/classic/css/styles.css @@ -249,7 +249,7 @@ a:focus { height: auto; min-height: 650px; /*background: url("../imgs/logo_full.png") no-repeat left top transparent;*/ - background: url("../inc/themes/classic/imgs/logo_full.svg") no-repeat left top #f2f2f2; + background: url("../imgs/logo_full.svg") no-repeat left top #f2f2f2; background-size: 350px; } @@ -1510,7 +1510,7 @@ footer img { min-height: 150px; margin: 75px auto; padding: 2em; - background: url("../inc/themes/classic/imgs/logo_full.svg") no-repeat left top #fff; + background: url("../imgs/logo_full.svg") no-repeat left top #fff; background-size: 300px auto; } diff --git a/inc/themes/classic/imgs/logo_full.svg b/inc/themes/classic/imgs/logo_full.svg deleted file mode 100644 index 9f036e31..00000000 --- a/inc/themes/classic/imgs/logo_full.svg +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - #sysPass - Systems Password Manager - - diff --git a/inc/themes/material-blue/css/styles.css b/inc/themes/material-blue/css/styles.css index 2d74ea0c..b25f9034 100644 --- a/inc/themes/material-blue/css/styles.css +++ b/inc/themes/material-blue/css/styles.css @@ -200,7 +200,7 @@ a:hover, a:active, a:focus { width: 100%; height: auto; min-height: 650px; - background: url("../inc/themes/material-blue/imgs/logo_full.svg") no-repeat left top transparent; + background: url("../imgs/logo_full.svg") no-repeat left top transparent; background-size: auto 200px; } @@ -1452,7 +1452,7 @@ footer img { min-height: 150px; margin: 75px auto; padding: 2em; - background: url("../inc/themes/material-blue/imgs/logo_full.svg") no-repeat left top #fff; + background: url("../imgs/logo_full.svg") no-repeat left top #fff; background-size: 300px auto; } diff --git a/inc/themes/material-blue/imgs/logo.png b/inc/themes/material-blue/imgs/logo.png deleted file mode 100644 index 765a1908..00000000 Binary files a/inc/themes/material-blue/imgs/logo.png and /dev/null differ diff --git a/inc/themes/material-blue/imgs/logo.svg b/inc/themes/material-blue/imgs/logo.svg deleted file mode 100644 index f53690ab..00000000 --- a/inc/themes/material-blue/imgs/logo.svg +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/inc/themes/material-blue/imgs/logo_full.png b/inc/themes/material-blue/imgs/logo_full.png deleted file mode 100644 index bb6476b3..00000000 Binary files a/inc/themes/material-blue/imgs/logo_full.png and /dev/null differ diff --git a/inc/themes/material-blue/imgs/logo_full.svg b/inc/themes/material-blue/imgs/logo_full.svg deleted file mode 100644 index 9f036e31..00000000 --- a/inc/themes/material-blue/imgs/logo_full.svg +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - #sysPass - Systems Password Manager - - diff --git a/web/MainC.class.php b/web/MainC.class.php index 2f46bb63..91295a4f 100644 --- a/web/MainC.class.php +++ b/web/MainC.class.php @@ -59,8 +59,8 @@ class MainC extends Controller implements ActionsInterface $this->view->assign('startTime', microtime()); $this->view->assign('page', $page); $this->view->assign('loggedIn', \SP\Init::isLoggedIn()); - $this->view->assign('logoMedium', Init::$THEMEURI . '/imgs/logo.svg'); - $this->view->assign('logo', Init::$THEMEURI . '/imgs/logo_full.svg'); + $this->view->assign('logoMedium', Init::$WEBURI . '/imgs/logo.svg'); + $this->view->assign('logo', Init::$WEBURI . '/imgs/logo_full.svg'); $this->getHeader(); $this->setHeaders();