0
1
Fork 0

Traducciones actualizadas, errores solucionados, release candidate

This commit is contained in:
Juan Ferrer Toribio 2016-10-15 20:58:30 +02:00
parent 8ed2b115ad
commit 960325833c
42 changed files with 362 additions and 287 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.353-deb8) stable; urgency=low
hedera-web (1.354-deb8) stable; urgency=low
* Initial Release.

14
debian/cron.d vendored
View File

@ -1,8 +1,8 @@
MAILTO=webmaster
*/4 * * * * root php /usr/share/hedera-web/cli.php -m tpv/confirm-mail
*/2 * * * * root php /usr/share/hedera-web/cli.php -m edi/load
0 23 * * * root php /usr/share/hedera-web/cli.php -m edi/clean
0 5 * * * root php /usr/share/hedera-web/cli.php -m edi/update
*/1 * * * * root php /usr/share/hedera-web/cli.php -m misc/mail
0 5 * * * root php /usr/share/hedera-web/cli.php -m misc/exchange-rate
45 14 20 11 * root php /usr/share/hedera-web/cli.php -m misc/exchange-rate
*/4 * * * * root /usr/share/hedera-web/cli.php -m tpv/confirm-mail
*/2 * * * * root /usr/share/hedera-web/cli.php -m edi/load
0 23 * * * root /usr/share/hedera-web/cli.php -m edi/clean
0 5 * * * root /usr/share/hedera-web/cli.php -m edi/update
*/1 * * * * root /usr/share/hedera-web/cli.php -m misc/mail
0 5 * * * root /usr/share/hedera-web/cli.php -m misc/exchange-rate
45 14 20 11 * root /usr/share/hedera-web/cli.php -m misc/exchange-rate

3
debian/postinst vendored
View File

@ -1,8 +1,7 @@
#!/bin/bash
cd /usr/share/hedera-web && npm install --production
a2enconf hedera-web
service apache2 reload
service cron restart
cd /usr/share/hedera-web && npm install --production

2
debian/postrm vendored
View File

@ -1,5 +1,5 @@
#!/bin/bash
rm -rf /usr/share/hedera-web/node_modules
service apache2 reload
service cron restart

View File

@ -47,7 +47,7 @@
<div class="box">
<div class="form">
<div class="form-group">
<label for="user-name"><t>UserName</t></label>
<label for="user-name"><t>Username</t></label>
<htk-text column="name" form="user-form"/>
</div>
<div class="form-group">
@ -55,7 +55,7 @@
<htk-entry column="email" form="user-form"></htk-entry>
</div>
<div class="form-group">
<label for="mail"><t>ReceiveInvoicesByEmail</t></label>
<label for="mail"><t>Receive invoices by email</t></label>
<htk-check column="mail" form="user-form"/>
</div>
</div>

View File

@ -41,13 +41,13 @@
<htk-repeater form-id="iter">
<db-model property="model">
<custom>
SELECT u.date_time, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visit_user u
JOIN visit_access c ON u.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
WHERE u.user_id = #user
ORDER BY u.date_time DESC
LIMIT 8
SELECT u.stamp, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visitUser u
JOIN visitAccess c ON c.id = u.access
JOIN visitAgent a ON a.id = c.agent
WHERE u.user = #user
ORDER BY u.stamp DESC
LIMIT 8
</custom>
<sql-batch property="batch">
<custom>
@ -58,18 +58,14 @@
<custom>
<div class="item">
<p>
<htk-text form="iter" column="date_time" format="_%a, %e %b %Y at %T"/>
<htk-text form="iter" column="stamp" format="_%a, %e %b %Y at %T"/>
</p>
<p>
<htk-text form="iter" column="platform"/> -
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="version"/>
</p>
<!-- <p>
<htk-text form="iter" column="javascript"/>,
<htk-text form="iter" column="cookies"/>
</p>
--> </div>
</div>
</custom>
</htk-repeater>
</div>

View File

@ -30,7 +30,7 @@ Hedera.Connections = new Class
{
this.hash.set ({
'form': 'admin/access-log'
,'user': form.get ('user_id')
,'user': form.get ('userId')
});
}

View File

@ -22,16 +22,16 @@
<htk-repeater form-id="iter">
<db-model property="model" id="sessions" on-status-changed="onModelStatusChange">
<custom>
SELECT s.id, e.user_id, c.Cliente, e.date_time login, is_new,
s.lastUpdate last_activity, a.platform, a.browser, a.version, u.name user
SELECT s.id, vu.user userId, vu.stamp, c.Cliente, s.lastUpdate,
a.platform, a.browser, a.version, u.name user
FROM userSession s
JOIN visit_user e ON s.userVisit = e.id
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
JOIN account.user u ON e.user_id = u.id
JOIN vn2008.Clientes c ON e.user_id = c.Id_cliente
ORDER BY last_activity DESC
JOIN visitUser vu ON vu.id = s.userVisit
JOIN visitAccess ac ON ac.id = vu.access
JOIN visitAgent a ON a.id = ac.agent
JOIN visit v ON v.id = a.visit
JOIN account.user u ON u.id = vu.user
JOIN vn2008.Clientes c ON c.Id_cliente = vu.user
ORDER BY lastUpdate DESC
</custom>
</db-model>
<custom>
@ -52,15 +52,15 @@
<htk-text form="iter" column="Cliente"/>
</p>
<p>
<htk-text form="iter" column="login" format="%a, %T"/> -
<htk-text form="iter" column="last_activity" format="%T"/>
<htk-text form="iter" column="stamp" format="%a, %T"/> -
<htk-text form="iter" column="lastUpdate" format="%T"/>
</p>
<p>
<htk-text form="iter" column="platform"/> -
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="version"/>
</p>
</div>
</div>
</custom>
</htk-repeater>
</div>

View File

@ -42,7 +42,7 @@
<db-calc-sum
property="param"
model="visits"
column-name="new_visits"/>
column-name="newVisits"/>
</htk-text>
<t>news</t>
</p>
@ -52,16 +52,16 @@
<db-model property="model" id="visits">
<custom>
SELECT browser
,MIN(CAST(version AS DECIMAL(4,1))) min_version
,MAX(CAST(version AS DECIMAL(4,1))) max_version
,MAX(e.date_time) last_visit
,MIN(CAST(version AS DECIMAL(4,1))) minVersion
,MAX(CAST(version AS DECIMAL(4,1))) maxVersion
,MAX(c.stamp) lastVisit
,COUNT(DISTINCT c.id) visits
,SUM(is_new) new_visits
FROM visit_user e
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
WHERE e.date_time BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
,SUM(a.firstAccess = c.id AND v.firstAgent = a.id) newVisits
FROM visitUser e
JOIN visitAccess c ON e.access = c.id
JOIN visitAgent a ON c.agent = a.id
JOIN visit v ON a.visit = v.id
WHERE c.stamp BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
GROUP BY browser ORDER BY visits DESC
</custom>
<sql-batch property="batch">
@ -75,19 +75,19 @@
<div class="item">
<p class="important">
<htk-text form="iter" column="browser"/>
<htk-text form="iter" column="min_version"/> -
<htk-text form="iter" column="max_version"/>
<htk-text form="iter" column="minVersion"/> -
<htk-text form="iter" column="maxVersion"/>
</p>
<p>
<htk-text form="iter" column="visits"/>
<t>visits</t>,
<htk-text form="iter" column="new_visits"/>
<htk-text form="iter" column="newVisits"/>
<t>news</t>
</p>
<p>
<htk-text form="iter" column="last_visit" format="_%a, %e %b %Y at %T"/>
<htk-text form="iter" column="lastVisit" format="_%a, %e %b %Y at %T"/>
</p>
</div>
</div>
</custom>
</htk-repeater>
</div>

View File

@ -138,6 +138,7 @@ module.exports = new Class
{
localStorage.removeItem ('hederaGuest');
this._focusUserInput ();
throw error;
}
}
@ -175,10 +176,10 @@ module.exports = new Class
,_onPasswordRecovered: function (json, error)
{
if (json)
Htk.Toast.showMessage (_('A mail has been sent wich you can recover your password'));
else
Htk.Toast.showError (error.message);
if (error)
throw error;
Htk.Toast.showMessage (_('A mail has been sent wich you can recover your password'));
}
});

View File

@ -17,7 +17,7 @@ module.exports = new Class
batch.addValue ('transaction', this.tpvOrder);
batch.addValue ('status', this.tpvStatus);
var query = 'CALL transaction_end (#transaction, #status)';
var query = 'CALL transactionEnd (#transaction, #status)';
this.conn.execQuery (query, null, batch);
}

View File

@ -79,32 +79,10 @@ module.exports = new Class
var th = document.createElement ('th');
tr.appendChild (th);
var weekday = Vn.Date.AbrWDays [i%len];
var weekday = _(Vn.Date.AbrWDays [i%len]);
th.appendChild (document.createTextNode (weekday));
}
/*
var tfoot = document.createElement ('tfoot');
table.appendChild (tfoot);
var tr = document.createElement ('tr');
tfoot.appendChild (tr);
var th = document.createElement ('th');
th.appendChild (document.createTextNode ('<'));
th.className = 'button';
th.addEventListener ('click', this.prevYearClicked.bind (this));
tr.appendChild (th);
var yearNode = document.createElement ('th');
yearNode.colSpan = 5;
tr.appendChild (yearNode);
var th = document.createElement ('th');
th.appendChild (document.createTextNode ('>'));
th.className = 'button';
th.addEventListener ('click', this.nextYearClicked.bind (this));
tr.appendChild (th);
*/
var tbody = document.createElement ('tbody');
table.appendChild (tbody);
@ -175,7 +153,7 @@ module.exports = new Class
,refresh: function ()
{
Vn.Node.setText (this.yearNode, this.year);
Vn.Node.setText (this.monthNode, Vn.Date.Months[this.month]);
Vn.Node.setText (this.monthNode, _(Vn.Date.Months[this.month]));
var day = 1;
var cellDate = new Date (this.year, this.month, 1);
@ -292,16 +270,4 @@ module.exports = new Class
this.refresh ();
}
/*
,prevYearClicked: function ()
{
this.year--;
this.refresh ();
}
,nextYearClicked: function ()
{
this.year++;
this.refresh ();
}*/
});

View File

@ -382,7 +382,7 @@ td.cell-image .htk-image
left: 50%;
top: 4em;
width: 21em;
margin-left: -10.5em;
margin-left: -11em;
text-align: center;
overflow: auto;
max-height: 40em;

View File

@ -11,56 +11,56 @@ module.exports =
{
WDays:
[
_('Sunday')
,_('Monday')
,_('Tuesday')
,_('Wednesday')
,_('Thursday')
,_('Friday')
,_('Saturday')
'Sunday'
,'Monday'
,'Tuesday'
,'Wednesday'
,'Thursday'
,'Friday'
,'Saturday'
]
,AbrWDays:
[
_('Su')
,_('Mo')
,_('Tu')
,_('We')
,_('Th')
,_('Fr')
,_('Sa')
'Su'
,'Mo'
,'Tu'
,'We'
,'Th'
,'Fr'
,'Sa'
]
,Months:
[
_('January')
,_('February')
,_('March')
,_('April')
,_('May')
,_('June')
,_('July')
,_('August')
,_('September')
,_('October')
,_('November')
,_('December')
'January'
,'February'
,'March'
,'April'
,'May'
,'June'
,'July'
,'August'
,'September'
,'October'
,'November'
,'December'
]
,AbrMonths:
[
_('Jan')
,_('Feb')
,_('Mar')
,_('Apr')
,_('May')
,_('Jun')
,_('Jul')
,_('Ago')
,_('Sep')
,_('Oct')
,_('Nov')
,_('Dec')
'Jan'
,'Feb'
,'Mar'
,'Apr'
,'May'
,'Jun'
,'Jul'
,'Ago'
,'Sep'
,'Oct'
,'Nov'
,'Dec'
]
,tokenD: _('%A, %B %e')
,tokenD: '%A, %B %e'
,regexp: new RegExp ('%[a-zA-Z]', 'g')
@ -86,10 +86,10 @@ module.exports =
case 'T': return d.toLocaleTimeString ();
// Complete week day name
case 'A': return this.WDays[d.getDay ()];
case 'A': return _(this.WDays[d.getDay ()]);
// Abreviated week day name
case 'a': return this.AbrWDays[d.getDay ()];
case 'a': return _(this.AbrWDays[d.getDay ()]);
// Day of month with 2 digits
case 'd': return this.pad (d.getDate ());
@ -98,10 +98,10 @@ module.exports =
case 'e': return d.getDate ();
// Complete month name
case 'B': return this.Months[d.getMonth ()];
case 'B': return _(this.Months[d.getMonth ()]);
// Abreviated month name
case 'b': return this.AbrMonths[d.getMonth ()];
case 'b': return _(this.AbrMonths[d.getMonth ()]);
// Month number with 2 digits
case 'm': return this.pad (d.getMonth () + 1);
@ -110,7 +110,7 @@ module.exports =
case 'Y': return d.getFullYear ();
// Complete date without year
case 'D': return this.tokenD.replace (this.regexp, this.regexpFunc.bind (this, d));
case 'D': return _(this.tokenD).replace (this.regexp, this.regexpFunc.bind (this, d));
}
return token;

View File

@ -1,14 +1,12 @@
var vnLocaleStrings = {};
vnLocaleStrings = {};
/**
* Class to manage the internationalization.
**/
module.exports =
{
strings: {}
,language: null
language: null
,init: function ()
{

View File

@ -1,19 +1,30 @@
{
"Configuration": "Configuració"
"Configuration": "Configuració"
,"UserNumber": "N d'usuari"
,"UserName": "Nom d'usuari"
,"Username": "Nom d'usuari"
,"Password": "Contrasenya"
,"Email": "Correu electrònic"
,"Billing": "Facturació"
,"ReceiveInvoicesByEmail": "Rebre factures per correu electrònic"
,"Receive invoices by email": "Rebre factures per correu electrònic"
,"NewPassword": "Nova contrasenya"
,"RepeatPassword": "Repetir contrasenya"
,"Old password": "Contrasenya antiga"
,"New password": "Nova contrasenya"
,"Repeat password": "Repetir contrasenya"
,"Info": "Info"
,"Modify": "Modificar"
,"MustReloginIfChange": "Per canviar el nom d'usuari hauràs de tornar a iniciar sessió"
,"PasswordsChanged": "Contrasenya modificada!"
,"PasswordsDoesntMatch": "Les contrasenyes no coincideixen!"
,"Password requirements": "Requisits de contrasenya"
,"characters long": "caràcters de longitud"
,"alphabetic characters": "caràcters alfabètics"
,"capital letters": "majúscules"
,"digits": "dígits"
,"symbols": "símbols"
,"Password changed!": "Contrasenya modificada!"
,"Password doesn't meet the requirements": ""
,"Passwords doesn't match": "Les contrasenyes no coincideixen!"
,"Passwords empty": "Les contrasenyes en blanc"
,"Addresses": "Adreces"
,"Change password": "Canvia la contrasenya"
}

View File

@ -7,10 +7,15 @@
,"Enter": "Entrar"
,"Login mail": "clientes@verdnatura.es"
,"Login phone": "+34 607 562 391"
,"Password forgotten? Push here": "¿Has oblidat la teva contrasenya?"
,"Yet you are not a customer?": "Encara no ets client?"
,"Sign up": "Registrarme"
,"You've been too idle": "Has estat massa temps inactiu i la sessió ha expirat"
,"Invalid login": "Usuari o contrasenya incorrectes, recorda que s'hi distingeix entre majúscula i minúscula"
,"There was an internal error": "S'ha produït un error intern"
,"There was an internal error": "S'ha produït un error intern"
,"Please write your user name": "Si us plau introdueix el teu nom d'usuari"
,"A mail has been sent wich you can recover your password": "T'hem enviat un correu on podràs recuperar la teva contrasenya"
,"Menu": "Menú"
,"Exit": "Sortir"

View File

@ -1,19 +1,30 @@
{
"Configuration": "Configuration"
,"UserNumber": "User number"
,"UserName": "Username"
,"Username": "Username"
,"Password": "Password"
,"Email": "Email"
,"Billing": "Billing"
,"ReceiveInvoicesByEmail": "Receive invoices by email"
,"Receive invoices by email": "Receive invoices by email"
,"NewPassword": "New password"
,"RepeatPassword": "Repeat password"
,"Old password": "Old password"
,"New password": "New password"
,"Repeat password": "Repeat password"
,"Info": "Info"
,"Modify": "Modify"
,"Password requirements": "Password requirements"
,"characters long": "characters long"
,"alphabetic characters": "alphabetic characters"
,"capital letters": "capital letters"
,"digits": "digits"
,"symbols": "symbols. Ej: $%&."
,"MustReloginIfChange": "To change your username you must login again"
,"PasswordsChanged": "Password changed!"
,"PasswordsDoesntMatch": "Passwords do not match!"
,"Password changed!": "Password changed!"
,"Password doesn't meet the requirements": "Password doesn't meet the requirements, press info button for more details"
,"Passwords doesn't match": "Passwords doesn't match"
,"Passwords empty": "Passwords empty"
,"Addresses": "Addresses"
,"Change password": "Change password"
}

View File

@ -7,10 +7,15 @@
,"Enter": "Enter"
,"Login mail": "clientes@verdnatura.es"
,"Login phone": "+34 607 562 391"
,"Password forgotten? Push here": "Password forgotten? Push here"
,"Yet you are not a customer?": "Yet you are not a customer?"
,"Sign up": "Sign up"
,"You've been too idle": "You have been idle too long and your session has expired"
,"Invalid login": "Username or password incorrect, remember that it is case-sensitive"
,"There was an internal error": "There was an internal error"
,"Please write your user name": "Please write your user name"
,"A mail has been sent wich you can recover your password": "A mail has been sent wich you can recover your password"
,"Menu": "Menu"
,"Exit": "Exit"

View File

@ -0,0 +1,5 @@
{
"Recover password": "Recover password"
,"Press on the following link to change your password.":
"Press on the following link to change your password."
}

View File

@ -0,0 +1,28 @@
{
"Cant lock cache": "The cache could not be blocked"
,"Bad file format": "Unrecognized file format"
,"File not choosed": "You have not selected any file"
,"Permission denied": "You are not allowed to upload the file"
,"File upload error": "Failed to upload the file, check that size is not too large"
,"File save error": "Failed to save the file: %s"
,"File size error": "The file must be no longer than %.2f MB"
,"Bad file name": "The file name must contain only lowercase letters, digits or the '_' character"
,"Bad schema name": "Invalid schema name"
,"Schema not exists": "Schema does not exist"
,"Unreferenced file": "The file is not referenced by the database"
,"Com error": "Error communicating with the server"
,"Image open error": "Error opening the image file"
,"Operation disabled": "Operation disabled for security"
,"Image added": "Image added correctly"
,"ErrIniSize": "File exceeds the upload_max_filesize directive in php.ini"
,"ErrFormSize": "File exceeds the MAX_FILE_SIZE specified in the HTML form"
,"ErrPartial": "File was partially uploaded"
,"ErrNoFile": "No file was uploaded"
,"ErrNoTmpDir": "Missing a temporary folder"
,"ErrCantWrite": "Failed to write file to disk"
,"ErrExtension": "File upload stopped by extension"
,"ErrDefault": "Unknown upload error"
,"Sync complete": "Synchronization complete"
}

View File

@ -1,5 +0,0 @@
{
"InvalidAction": "Invalid action"
,"EmptyQuery": "Empty query"
}

View File

@ -1,28 +0,0 @@
{
"CantLockCache": "The cache could not be blocked"
,"BadFileFormat": "Unrecognized file format"
,"FileNotChoosed": "You have not selected any file"
,"PermissionDenied": "You are not allowed to upload the file"
,"FileUploadError": "Failed to upload the file, check that size is not too large"
,"FileSaveError": "Failed to save the file: %s"
,"FileSizeError": "The file must be no longer than %.2f MB"
,"BadFileName": "The file name must contain only lowercase letters, digits or the '_' character"
,"BadSchemaName": "Invalid schema name"
,"SchemaNotExists": "Schema does not exist"
,"UnreferencedFile": "The file is not referenced by the database"
,"ComError": "Error communicating with the server"
,"ImageOpenError": "Error opening the image file"
,"OperationDisabled": "Operation disabled for security"
,"ImageAdded": "Image added correctly"
,"ErrIniSize": "File exceeds the upload_max_filesize directive in php.ini"
,"ErrFormSize": "File exceeds the MAX_FILE_SIZE specified in the HTML form"
,"ErrPartial": "File was partially uploaded"
,"ErrNoFile": "No file was uploaded"
,"ErrNoTmpDir": "Missing a temporary folder"
,"ErrCantWrite": "Failed to write file to disk"
,"ErrExtension": "File upload stopped by extension"
,"ErrDefault": "Unknown upload error"
,"SyncComplete": "Synchronization complete"
}

4
locale/en/vn/web.json Executable file
View File

@ -0,0 +1,4 @@
{
"You don't have enough privileges": "You don't have enough privileges"
,"Missing parameters": "Missing parameters"
}

View File

@ -1,19 +1,30 @@
{
"Configuration": "Configuración"
,"UserNumber": "Nº usuario"
,"UserName": "Nombre de usuario"
,"Username": "Nombre de usuario"
,"Password": "Contraseña"
,"Email": "Correo electrónico"
,"Billing": "Facturación"
,"ReceiveInvoicesByEmail": "Recibir facturas por correo electrónico"
,"Receive invoices by email": "Recibir facturas por correo electrónico"
,"NewPassword": "Nueva contraseña"
,"RepeatPassword": "Repetir contraseña"
,"Old password": "Contaseña antigua"
,"New password": "Nueva contraseña"
,"Repeat password": "Repetir contraseña"
,"Info": "Info"
,"Modify": "Modificar"
,"Password requirements": "Requisitos de constraseña"
,"characters long": "carácteres de longitud"
,"alphabetic characters": "carácteres alfabéticos"
,"capital letters": "letras mayúsculas"
,"digits": "dígitos"
,"symbols": "símbolos. Ej: $%&."
,"MustReloginIfChange": "Para cambiar tu nombre de usuario deberás volver a iniciar sesión"
,"PasswordsChanged": "¡Contraseña modificada!"
,"PasswordsDoesntMatch": "¡Las contraseñas no coinciden!"
,"Password changed!": "¡Contraseña modificada!"
,"Password doesn't meet the requirements": "La nueva contraseña no reune los requisitos de seguridad necesarios, pulsa en info para más detalle"
,"Passwords doesn't match": "¡Las contraseñas no coinciden!"
,"Passwords empty": "Contraseña vacía"
,"Addresses": "Direcciones"
,"Change password": "Cambiar contraseña"
}

View File

@ -7,10 +7,15 @@
,"Enter": "Entrar"
,"Login mail": "clientes@verdnatura.es"
,"Login phone": "+34 963 242 100"
,"Password forgotten? Push here": "¿Has olvidado tu contraseña?"
,"Yet you are not a customer?": "¿Todavía no eres cliente?"
,"Sign up": "Registrarme"
,"You've been too idle": "Has estado demasiado tiempo inactivo y la sesión ha expirado"
,"Invalid login": "Usuario o contraseña incorrectos, recuerda que se hace distinción entre mayúsculas y minúsculas"
,"There was an internal error": "Se ha producido un error interno"
,"Please write your user name": "Por favor escribe tu nombre de usuario"
,"A mail has been sent wich you can recover your password": "Te hemos enviado un correo donde podrás recuperar tu contraseña"
,"Menu": "Menú"
,"Exit": "Salir"

View File

@ -0,0 +1,5 @@
{
"Recover password": "Restaurar contraseña"
,"Press on the following link to change your password.":
"Presiona en el siguiente link para cambiar tu contraseña."
}

View File

@ -0,0 +1,28 @@
{
"Cant lock cache": "La caché no pudo ser bloqueada"
,"Bad file format": "Formato de archivo no reconocido"
,"File not choosed": "No has seleccionado ningún archivo"
,"Permission denied": "No tienes permiso para subir el fichero"
,"File upload error": "Error al subir el fichero, comprueba que su tamaño no sea demasiado grande"
,"File save error": "Error al guardar el fichero: %s"
,"File size error": "El fichero no debe ocupar más de %.2f MB"
,"Bad file name": "El nombre del archivo solo debe contener letras minúsculas, dígitos o el carácter '_'"
,"Bad schema name": "Nombre de esquema no válido"
,"Schema not exists": "El esquema no existe"
,"Unreferenced file": "El archivo no está referenciado por la base de datos"
,"Com error": "Error en la comunicación con el servidor"
,"Image open error": "Error al abrir el archivo de imagen"
,"Operation disabled": "Operación deshabilitada por seguridad"
,"Image added": "Imagen añadida correctamente"
,"ErrIniSize": "File exceeds the upload_max_filesize directive in php.ini"
,"ErrFormSize": "File exceeds the MAX_FILE_SIZE specified in the HTML form"
,"ErrPartial": "File was partially uploaded"
,"ErrNoFile": "No file was uploaded"
,"ErrNoTmpDir": "Missing a temporary folder"
,"ErrCantWrite": "Failed to write file to disk"
,"ErrExtension": "File upload stopped by extension"
,"ErrDefault": "Unknown upload error"
,"Sync complete": "Sincronización completada"
}

View File

@ -1,5 +0,0 @@
{
"InvalidAction": "Acción inválida"
,"EmptyQuery": "Consulta vacía"
}

View File

@ -1,28 +0,0 @@
{
"CantLockCache": "La caché no pudo ser bloqueada"
,"BadFileFormat": "Formato de archivo no reconocido"
,"FileNotChoosed": "No has seleccionado ningún archivo"
,"PermissionDenied": "No tienes permiso para subir el fichero"
,"FileUploadError": "Error al subir el fichero, comprueba que su tamaño no sea demasiado grande"
,"FileSaveError": "Error al guardar el fichero: %s"
,"FileSizeError": "El fichero no debe ocupar más de %.2f MB"
,"BadFileName": "El nombre del archivo solo debe contener letras minúsculas, dígitos o el carácter '_'"
,"BadSchemaName": "Nombre de esquema no válido"
,"SchemaNotExists": "El esquema no existe"
,"UnreferencedFile": "El archivo no está referenciado por la base de datos"
,"ComError": "Error en la comunicación con el servidor"
,"ImageOpenError": "Error al abrir el archivo de imagen"
,"OperationDisabled": "Operación deshabilitada por seguridad"
,"ImageAdded": "Imagen añadida correctamente"
,"ErrIniSize": "File exceeds the upload_max_filesize directive in php.ini"
,"ErrFormSize": "File exceeds the MAX_FILE_SIZE specified in the HTML form"
,"ErrPartial": "File was partially uploaded"
,"ErrNoFile": "No file was uploaded"
,"ErrNoTmpDir": "Missing a temporary folder"
,"ErrCantWrite": "Failed to write file to disk"
,"ErrExtension": "File upload stopped by extension"
,"ErrDefault": "Unknown upload error"
,"SyncComplete": "Sincronización completada"
}

4
locale/es/vn/web.json Executable file
View File

@ -0,0 +1,4 @@
{
"You don't have enough privileges": "No tienes suficientes privilegios"
,"Missing parameters": "Faltan parámetros"
}

View File

@ -1,19 +1,30 @@
{
"Configuration": "Configuration"
"Configuration": "Configuration"
,"UserNumber": "Numéro utilisateur"
,"UserName": "Utilisateur"
,"Username": "Utilisateur"
,"Password": "Mot de passe"
,"Email": "Courriel"
,"Billing": "Facturation"
,"ReceiveInvoicesByEmail": "Recevoir des factures par e-mail"
,"Receive invoices by email": "Recevoir des factures par e-mail"
,"NewPassword": "Nouveau mot de passe"
,"RepeatPassword": "Répéter le mot de passe"
,"Old password": "Ancien mot de passe"
,"New password": "Nouveau mot de passe"
,"Repeat password": "Répéter le mot de passe"
,"Info": "Info"
,"Modify": "Modifier"
,"MustReloginIfChange": "Vous devrez vous identifier à nouveau pour changer votre nom d'utilisateur"
,"PasswordsChanged": "Mot de passe modifié!"
,"PasswordsDoesntMatch": "Les mots de passe ne correspondent pas!"
,"Password requirements": "Mot de passe exigences"
,"characters long": "Longs caractères"
,"alphabetic characters": "les caractères alphabétiques"
,"capital letters": "lettres majuscules"
,"digits": "chiffres"
,"symbols": "symboles. Ej: $%&."
,"Password changed!": "Mot de passe modifié!"
,"Password doesn't meet the requirements": ""
,"Passwords doesn't match": "Les mots de passe ne correspondent pas!"
,"Passwords empty": ""
,"Addresses": "Adresses"
,"Change password": "Changer le mot de passe"
}

View File

@ -7,10 +7,15 @@
,"Enter": "Entrer"
,"Login mail": "ruben@verdnatura.es"
,"Login phone": "+33 781 533 900"
,"Password forgotten? Push here": "as tu oublié ton mot de passe?"
,"Yet you are not a customer?": "Êtes-vous Pas encore client?"
,"Sign up": "Inscription"
,"You've been too idle": "Il a eu le temps de trop paresseux et votre session a expiré"
,"Invalid login": "Utilisateur ou mot de passe incorrect, n'oubliez pas de distinction entre majuscules et minuscules"
,"There was an internal error": "Il ya eu une erreur interne"
,"Please write your user name": "S'il vous plaît entrer votre nom d'utilisateur"
,"A mail has been sent wich you can recover your password": "Nous avons envoyé un e-mail où vous pouvez récupérer votre mot de passe"
,"Menu": "Menu"
,"Exit": "Laisser"

View File

@ -1,19 +1,30 @@
{
"Configuration": "ТОХИРГОО"
"Configuration": "Configuration"
,"UserNumber": "ХЭРЭГЛЭГЧИЙН ТОО:"
,"UserName": "НЭВТРЭХ НЭР"
,"Password": "НУУЦ ҮГ"
,"Email": "И-МЭЙЛ"
,"Billing": "НЭХЭМЖЛЭЛ"
,"ReceiveInvoicesByEmail": "И-МЭЙЛ НЭХЭМЖЛЭЛ"
,"Username": "Username"
,"Password": "Password"
,"Email": "Email"
,"Billing": "Billing"
,"Receive invoices by email": "Receive invoices by email"
,"NewPassword": "ШИНЭ НУУЦ ҮГ"
,"RepeatPassword": "НУУЦ ҮГ ДАВТАХ"
,"Old password": "Old password"
,"New password": "New password"
,"Repeat password": "Repeat password"
,"Info": "Info"
,"Modify": "Modify"
,"Password requirements": "Password requirements"
,"characters long": "characters long"
,"alphabetic characters": "alphabetic characters"
,"capital letters": "capital letters"
,"digits": "digits"
,"symbols": "symbols. Ej: $%&."
,"MustReloginIfChange": "To change your username you must login again"
,"PasswordsChanged": "Password changed!"
,"PasswordsDoesntMatch": "Passwords do not match!"
,"Password changed!": "Password changed!"
,"Password doesn't meet the requirements": "Password doesn't meet the requirements, press info button for more details"
,"Passwords doesn't match": "Passwords doesn't match"
,"Passwords empty": "Passwords empty"
,"Addresses": "Addresses"
,"Change password": "Change password"
}

View File

@ -7,10 +7,15 @@
,"Enter": "энд бичнэ үү"
,"Login mail": "clientes@verdnatura.es"
,"Login phone": "+34 607 562 391"
,"Password forgotten? Push here": "Нууц үг мартсан? энд түлхэх"
,"Yet you are not a customer?": "Гэсэн хэдий ч та хэрэглэгчийн биш гэж үү?"
,"Sign up": "бүртгүүлэх"
,"You've been too idle": "Та нар ч бас зогссон байсан, чуулган хугацаа дууссан байна"
,"Invalid login": "Хэрэглэгчийн нэр эсвэл нууц үг буруу, Тэр хэргийг мэдрэмтгий гэдгийг санаарай"
,"There was an internal error": "Дотоод алдаа гарлаа"
,"Please write your user name": "Хэрэглэгчийн нэрээ бичнэ үү"
,"A mail has been sent wich you can recover your password": "Мэйл та нууц үгээ сэргээх боломжтой А байна илгээсэн"
,"Menu": "Цэс"
,"Exit": "гарах"

View File

@ -1,19 +1,30 @@
{
"Configuration": "Configuração"
,"UserNumber": "Nº usuario"
,"UserName": "Nome de usuario"
,"Username": "Nome de usuario"
,"Password": "Palavra-Passe"
,"Email": "E-Mail"
,"Billing": "Facturação"
,"ReceiveInvoicesByEmail": "Receber facturas por e-mail"
,"Receive invoices by email": "Receber facturas por e-mail"
,"NewPassword": "Nova Palavra-Passe"
,"RepeatPassword": "Repetir Palavra-Passe"
,"Old password": "Palavra-Passe antiga"
,"New password": "Nova Palavra-Passe"
,"Repeat password": "Repetir Palavra-Passe"
,"Info": "Info"
,"Modify": "Modificar"
,"Password requirements": "Requisitos de Palavra-Passe"
,"characters long": "caracteres"
,"alphabetic characters": "caracteres alfabéticos"
,"capital letters": "letras maiúsculas"
,"digits": "dígitos"
,"symbols": "símbolos. Ej: $%&."
,"MustReloginIfChange": "Para modificar seu nome de usario deves voltar a inicar sessão"
,"PasswordsChanged": "Palavra-Passe Modificada!"
,"PasswordsDoesntMatch": "As Palavras-Passe não coincidem!"
,"Password changed!": "Palavra-Passe Modificada!"
,"Password doesn't meet the requirements": "Palavra-Passe não atende aos requisitos"
,"Passwords doesn't match": "As Palavras-Passe não coincidem!"
,"Passwords empty": "Palavra-Passe vazia"
,"Addresses": "Endereços"
,"Change password": "Mudar Palavra-Passe"
}

View File

@ -7,10 +7,15 @@
,"Enter": "Entrar"
,"Login mail": "clientes@verdnatura.es"
,"Login phone": "+34 963 242 100"
,"Password forgotten? Push here": "Contra-senha? empurre aqui"
,"Yet you are not a customer?": "No entanto, você não é um cliente?"
,"Sign up": "Inscrever-se"
,"You've been too idle": "Muito tempo de inatividade, a sessão foi finalizada"
,"Invalid login": "Usuário ou Palavra-Passe incorreto, lembre-se de diferenciar maiusculas e minusculas"
,"There was an internal error": "Houve um erro interno"
,"Please write your user name": "Por favor, escreva seu nome de usuário"
,"A mail has been sent wich you can recover your password": "Um e-mail foi enviado a qual poderá recuperar sua senha"
,"Menu": "Menú"
,"Exit": "Sair"

View File

@ -19,13 +19,13 @@ class Upload extends Vn\Web\JsonRequest
$regexp = '/[^a-z0-9_]/';
if (empty ($_REQUEST['schema']) || preg_match ($regexp, $_REQUEST['schema']) !== 0)
throw new UserException (s('BadSchemaName'), 'badSchemaName');
throw new UserException (s('Bad schema name'));
$schema = $_REQUEST['schema'];
$info = $util->loadInfo ($schema);
if (!$info)
throw new UserException (s('SchemaNotExists'), 'schemaNotExists');
throw new UserException (s('Schema not exists'));
// Checks file name and identifier.
@ -50,7 +50,7 @@ class Upload extends Vn\Web\JsonRequest
}
if (empty ($_REQUEST['name']) || preg_match ($regexp, $_REQUEST['name']) !== 0)
throw new UserException (s('BadFileName'), 'badFileName');
throw new UserException (s('Bad file name'));
// Checks permissions.
@ -78,12 +78,12 @@ class Upload extends Vn\Web\JsonRequest
];
if (!$db->query ($query, $params))
throw new UserException (s('PermissionDenied'), 'permissionDenied');
throw new UserException (s('Permission denied'));
// Checks for file errors.
if (empty ($_FILES['image']['name']))
throw new UserException (s('FileNotChoosed'), 'fileNotChoosed');
throw new UserException (s('File not choosed'));
if ($_FILES['image']['error'] != 0)
{
@ -115,13 +115,13 @@ class Upload extends Vn\Web\JsonRequest
break;
}
throw new Lib\Exception (s($message), 'uploadError');
throw new Lib\Exception (s($message));
}
$maxSize = $db->getValue ('SELECT max_size FROM image_config');
if ($_FILES['image']['size'] > $maxSize * 1048576)
throw new UserException (sprintf (s('FileSizeError'), $maxSize), 'fileSizeError');
throw new UserException (sprintf (s('File size error'), $maxSize));
// Resizes and saves the image.

View File

@ -12,23 +12,23 @@ class Transaction extends Vn\Web\JsonRequest
$amount = (int) $_REQUEST['amount'];
$companyId = empty ($_REQUEST['company']) ? NULL : $_REQUEST['company'];
$row = $db->getRow ('CALL transaction_start_sha256 (#, #)',
$row = $db->getRow ('CALL transactionStart (#, #)',
[$amount, $companyId]);
if (!isset ($row))
throw new Exception ('Transaction error');
$transactionId = str_pad ($row['transaction_id'], 12, '0', STR_PAD_LEFT);
$transactionId = str_pad ($row['transactionId'], 12, '0', STR_PAD_LEFT);
$urlOk = empty ($_REQUEST['urlOk']) ? '' : sprintf ($_REQUEST['urlOk'], $transactionId);
$urlKo = empty ($_REQUEST['urlKo']) ? '' : sprintf ($_REQUEST['urlKo'], $transactionId);
$merchantUrl = $row['merchant_url'] ? $row['merchant_url'] : '';
$merchantUrl = $row['merchantUrl'] ? $row['merchantUrl'] : '';
$params = [
'Ds_Merchant_Amount' => $amount
,'Ds_Merchant_Order' => $transactionId
,'Ds_Merchant_MerchantCode' => $row['merchant']
,'Ds_Merchant_Currency' => $row['currency']
,'Ds_Merchant_TransactionType' => $row['transaction_type']
,'Ds_Merchant_TransactionType' => $row['transactionType']
,'Ds_Merchant_Terminal' => $row['terminal']
,'Ds_Merchant_MerchantURL' => $merchantUrl
,'Ds_Merchant_UrlOK' => $urlOk
@ -37,7 +37,7 @@ class Transaction extends Vn\Web\JsonRequest
$encodedParams = base64_encode (json_encode ($params));
$key = base64_decode ($row['secret_key']);
$key = base64_decode ($row['secretKey']);
$bytes = [0, 0, 0, 0, 0, 0, 0, 0];
$iv = implode (array_map ('chr', $bytes));

View File

@ -38,7 +38,6 @@ class DbSessionHandler implements \SessionHandlerInterface
function read ($sessionId)
{
//$db->query ('DO GET_LOCK(#, 30)', [$sessionId]);
$sessionData = $this->db->getValue (
'SELECT data FROM userSession WHERE ssid = #', [$sessionId]);
return isset ($sessionData) ? $sessionData : '';
@ -46,9 +45,12 @@ class DbSessionHandler implements \SessionHandlerInterface
function write ($sessionId, $sessionData)
{
$this->db->query ('REPLACE INTO userSession SET ssid = #, data = #',
$this->db->query (
'INSERT INTO userSession SET
ssid = #, data = #, lastUpdate = NOW()
ON DUPLICATE KEY UPDATE
data = VALUES(data), lastUpdate = VALUES(lastUpdate)',
[$sessionId, $sessionData]);
//$db->query ('DO RELEASE_LOCK(#)', [$sessionId]);
return TRUE;
}
}

View File

@ -15,6 +15,8 @@ class Report
extract ($params);
\Vn\Lib\Locale::addPath ("reports/$reportName");
ob_start ();
include __DIR__.'/report.html.php';
$this->html = ob_get_contents ();

View File

@ -77,6 +77,7 @@ abstract class Service
$_SESSION['lang'] = NULL;
Locale::set ($_SESSION['lang']);
Locale::addPath ('vn/web');
// Registering the visit
@ -134,7 +135,7 @@ abstract class Service
function login ()
{
$db = $this->db;
$user = NULL;
$anonymousUser = FALSE;
if (isset ($_POST['user']) && isset ($_POST['password']))
{
@ -175,24 +176,29 @@ abstract class Service
);
}
else
{
$user = $db->getValue ('SELECT guest_user FROM config');
$anonymousUser = TRUE;
}
$db->query ('CALL account.userLoginWithName (#)', [$user]);
}
$userChanged = !$anonymousUser
&& (empty ($_SESSION['user']) || $_SESSION['user'] != $user);
$_SESSION['user'] = $user;
// Registering the user access
if (isset ($_SESSION['access'])
&& !isset ($_SESSION['visitUser']))
if (isset ($_SESSION['access']) && $userChanged)
{
$_SESSION['visitUser'] = TRUE;
$db->query (
'CALL visitUserNew (#, #)',
[$_SESSION['access'], session_id ()]
);
error_log ($db->render ('CALL visitUserNew (#, #)',
[$_SESSION['access'], session_id ()]));
}
}
@ -201,7 +207,6 @@ abstract class Service
**/
function logout ()
{
unset ($_SESSION['visitUser']);
unset ($_SESSION['user']);
}
@ -266,7 +271,7 @@ abstract class Service
[$_REQUEST['method']]);
if (!$isAuthorized)
throw new UserException ('You don\'t have enough privileges');
throw new UserException (s('You don\'t have enough privileges'));
$methodDb = $db;
}
@ -275,6 +280,8 @@ abstract class Service
if ($method::PARAMS !== NULL && !$method->checkParams ($_REQUEST, $method::PARAMS))
throw new UserException (s('Missing parameters'));
Locale::addPath ("rest/{$_REQUEST['method']}");
$res = $method->run ($methodDb);
$db->query ('CALL account.userLogout ()');