<?php

//If you want to hide everything to others while you are restoring :
// 1) Fill in $my_ip down here with your public (external) ip address. You can get your external ip adress with this website : rkx.fr
// 2) Copy this script and your backup to your base directory and execute this script
$my_ip = '';




//-----------------------------------------------------------------------------
// i18n
//-----------------------------------------------------------------------------
$t = array(
    'en' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?',
        'Attempt to disable server timeout' => 'Attempt to disable server timeout',
        'Available collations and charsets' => 'Available collations and charsets',
        'Available collations cannot be found' => 'Available collations cannot be found',
        'Available storage engines' => 'Available storage engines',
        'Available storage engines cannot be found' => 'Available storage engines cannot be found',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'Backup file is big, progress is not accurate but everything is running well',
        // C
        'Change access rights' => 'Change access rights',
        'Change collation and charset' => 'Change collation and charset',
        'Change database table prefix' => 'Change database table prefix',
        'Change storage engine' => 'Change storage engine',
        'Change folders and files access rights' => 'Change folders and files access rights',
        'Change shop email' => 'Change shop email',
        'Change table prefix' => 'Change table prefix',
        'Changing email shop...' => 'Changing email shop...',
        'Changing table prefix...' => 'Changing table prefix...',
        'Charset value not valid' => 'Charset value not valid',
        'Clean' => 'Clean',
        'Clean database before restore' => 'Clean database before restore',
        'Clean files before restore' => 'Clean files before restore',
        'Cleaning database before restoration...' => 'Cleaning database before restoration...',
        'Cleaning files before restoration...' => 'Cleaning files before restoration...',
        'Collation value not valid' => 'Collation value not valid',
        'Collations and charsets known by the database where the data will be restored' => 'Collations and charsets known by the database where the data will be restored',
        'Could not check the existance of collation/charset' => 'Could not check the existance of collation/charset',
        'Could not check the existance of storage engine' => 'Could not check the existance of storage engine',
        'Could not find default charset' => 'Could not find default charset',
        'Could not find default collation' => 'Could not find default collation',
        'Could not find default storage engine' => 'Could not find default storage engine',
        'Create a new super admin' => 'Create a new super admin',
        'Create super admin' => 'Create super admin',
        'Creating super admin...' => 'Creating super admin...',
        'Current timeout: %d secondes' => 'Current timeout: %d secondes',
        // D
        'Database connection parameters' => 'Database connection parameters',
        'Database Host server' => 'Database Host server',
        'Database Host server:' => 'Database Host server:',
        'Database login' => 'Database login',
        'Database name' => 'Database name',
        'Database name:' => 'Database name:',
        'Database name is not valid.' => 'Database name is not valid.',
        'Database parameters are not valid.' => 'Database parameters are not valid.',
        'Database password' => 'Database password',
        'Database Port:' => 'Database Port:',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'Database server address. You can indicate the port by adding \':\' after the IP',
        'Database server is not valid.' => 'Database server is not valid.',
        'Database table prefix' => 'Database table prefix',
        'Database User' => 'Database User',
        'Database User:' => 'Database User:',
        'Database user is not valid.' => 'Database user is not valid.',
        'Decompressing backup' => 'Decompressing backup',
        'Decompressing backup part' => 'Decompressing backup part',
        'Delete all customers emails. Useful for dev local test shop' => 'Delete all customers emails. Useful for dev local test shop',
        'Delete all datas in database before restoration' => 'Delete all datas in database before restoration',
        'Delete all files and directories before restoration' => 'Delete all files and directories before restoration',
        'Delete backup file after restoration' => 'Delete backup file after restoration',
        'Delete customers emails' => 'Delete customers emails',
        'Delete lock' => 'Delete lock',
        'Deleting customers email...' => 'Deleting customers email...',
        'Disable "NoAutoValueOnZero" SQL mode' => 'Disable "NoAutoValueOnZero" SQL mode',
        'Disable cache' => 'Disable cache',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'Disable cache mode. Useful if cache was used and no cache is available now',
        'Disable media servers' => 'Disable media servers',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'Disable media servers. Useful if media servers were used and there are not available now',
        'Disable ModPagespeed' => 'Disable ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now',
        'Disable SSL' => 'Disable SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'Disable SSL mode. Useful if SSL was used and no SSL is available now',
        'Disabling media servers...' => 'Disabling media servers...',
        'Disabling SSL...' => 'Disabling SSL...',
        'Do not extract database' => 'Do not extract database',
        'Do not extract database. Only if your database is already extracted' => 'Do not extract database. Only if your database is already extracted',
        'Do not restore database' => 'Do not restore database',
        'Do not restore database. Useful for testing' => 'Do not restore database. Useful for testing',
        'Do not restore files' => 'Do not restore files',
        'Do not restore files. Useful for testing' => 'Do not restore files. Useful for testing',
        'Duration between progress refresh' => 'Duration between progress refresh',
        'Duration between progress refresh:' => 'Duration between progress refresh:',
        'Duration between refresh' => 'Duration between refresh',
        'Duration between refresh:' => 'Duration between refresh:',
        'Duration of intermediate renewal.' => 'Duration of intermediate renewal.',
        'Duration of intermediate renewal:' => 'Duration of intermediate renewal:',
        // E
        'Email' => 'Email',
        'Enable Mode Dev' => 'Enable Mode Dev',
        'Enable Mode Dev. Useful for developers' => 'Enable Mode Dev. Useful for developers',
        'Error, the compressed backup file cannot be closed' => 'Error, the compressed backup file cannot be closed',
        'Error, the compressed backup file cannot be opened' => 'Error, the compressed backup file cannot be opened',
        'Error, the uncompressed backup file cannot be closed' => 'Error, the uncompressed backup file cannot be closed',
        'Error, the uncompressed backup file cannot be created' => 'Error, the uncompressed backup file cannot be created',
        'Error, the uncompressed backup file cannot be writen' => 'Error, the uncompressed backup file cannot be writen',
        'Error while cleaning datas:' => 'Error while cleaning datas:',
        'Error while changing email shop:' => 'Error while changing email shop:',
        'Error while changing table prefix:' => 'Error while changing table prefix:',
        'Error while checking existence of table' => 'Error while checking existence of table',
        'Error while creating super admin:' => 'Error while creating super admin:',
        'Error while deleting customers emails:' => 'Error while deleting customers emails:',
        'Error while deleting mailalert customers emails:' => 'Error while deleting mailalert customers emails:',
        'Error while disabling media servers:' => 'Error while disabling media servers:',
        'Error while disabling SSL:' => 'Error while disabling SSL:',
        'Error while getting database file: No backup file found' => 'Error while getting database file: No backup file found',
        'Error while getting employee by email:' => 'Error while getting employee by email:',
        'Error while getting likely understood language:' => 'Error while getting likely understood language:',
        'Error while renaming .htaccess file, please check file access right' => 'Error while renaming .htaccess file, please check file access right',
        'Error while restoring backup: More than one backup file found' => 'Error while restoring backup: More than one backup file found',
        'Error while restoring backup: No backup file found' => 'Error while restoring backup: No backup file found',
        'Error while restoring database:' => 'Error while restoring database:',
        'Error while restoring files: No backup file found' => 'Error while restoring files: No backup file found',
        'Error while restoring files, tar file does not exist' => 'Error while restoring files, tar file does not exist',
        'Error while restoring files, tar file is not correct' => 'Error while restoring files, tar file is not correct',
        'Error while restoring files, tar file truncated' => 'Error while restoring files, tar file truncated',
        'Error while restoring files, unable to create directory' => 'Error while restoring files, unable to create directory',
        'Error while restoring files, unable to create file' => 'Error while restoring files, unable to create file',
        'Error while restoring files, unable to open tar file' => 'Error while restoring files, unable to open tar file',
        'Error while restoring files, unable to read data in tar file' => 'Error while restoring files, unable to read data in tar file',
        'Error while restoring files, unable to read name file in tar file' => 'Error while restoring files, unable to read name file in tar file',
        'Error while restoring files, unable to read tar file' => 'Error while restoring files, unable to read tar file',
        'Error while restoring files, unable to write file' => 'Error while restoring files, unable to write file',
        'Error while retrieving Prestashop version, unable to find the version' => 'Error while retrieving Prestashop version, unable to find the version',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'Error while retrieving Prestashop version, unable to read the file with the information',
        'Error while retrieving virtual uri:' => 'Error while retrieving virtual uri:',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'Error while updating .htaccess file, unable to read .htaccess file',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'Error while updating .htaccess file, unable to save .htaccess file',
        'Error while updating defines, defines file does not exist' => 'Error while updating defines, defines file does not exist',
        'Error while updating defines, unable to read defines file' => 'Error while updating defines, unable to read defines file',
        'Error while updating defines, unable to save defines file' => 'Error while updating defines, unable to save defines file',
        'Error while updating links:' => 'Error while updating links:',
        'Error while updating settings, settings file does not exist' => 'Error while updating settings, settings file does not exist',
        'Error while updating settings, unable to find the prefix' => 'Error while updating settings, unable to find the prefix',
        'Error while updating settings, unable to read settings file' => 'Error while updating settings, unable to read settings file',
        'Error while updating settings, unable to save settings file' => 'Error while updating settings, unable to save settings file',
        'Error while updating super admin password:' => 'Error while updating super admin password:',
        'Error while updating URL configuration:' => 'Error while updating URL configuration:',
        'Error:' => 'Error:',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.',
        'Error, the compressed backup file is no longer seekable' => 'Error, the compressed backup file is no longer seekable',
        'Error, the compressed backup file is no longer readable' => 'Error, the compressed backup file is no longer readable',
        'Error, the compressed backup file has a compression issue' => 'Error, the compressed backup file has a compression issue',
        'Error, the backup is no longer readable' => 'Error, the backup is no longer readable',
        'Error, the backup is no longer seekable' => 'Error, the backup is no longer seekable',
        'Error. The config file cannot be opened' => 'Error. The config file cannot be opened',
        'Error. The config file cannot be rewind' => 'Error. The config file cannot be rewind',
        'Error, the file is no longer readable' => 'Error, the file is no longer readable',
        'Error, the file is no longer seekable' => 'Error, the file is no longer seekable',
        'Error. There is an error with the "Intermediate renewal" option' => 'Error. There is an error with the "Intermediate renewal" option',
        'Error: Unable to connect to the database' => 'Error: Unable to connect to the database',
        'Execution failed on:' => 'Execution failed on:',
        'Extract dump' => 'Extract dump',
        // F
        'File "%s" has been renamed in "%s"' => 'File "%s" has been renamed in "%s"',
        'File access rights' => 'File access rights',
        'File access rights are not valid (should be between 600 and 777).' => 'File access rights are not valid (should be between 600 and 777).',
        'File access rights, default: 644' => 'File access rights, default: 644',
        'File to restore:' => 'File to restore:',
        'FINISH ! Your backup was restored with success !' => 'FINISH ! Your backup was restored with success !',
        'First name' => 'First name',
        'Folder access rights' => 'Folder access rights',
        'Folder access rights are not valid (should be between 600 and 777).' => 'Folder access rights are not valid (should be between 600 and 777).',
        'Folder access rights, default: 755' => 'Folder access rights, default: 755',
        // G
        'Get database file' => 'Get database file',
        'Go to your shop' => 'Go to your shop',
        // H
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.',
        'Ignore SQL errors' => 'Ignore SQL errors',
        'Intermediate renewal' => 'Intermediate renewal',
        // J
        // K
        // L
        'Last name' => 'Last name',
        // M
        'Make sure you know all storage engines specificities before you choose. In doubt choose InnoDb.' => 'Make sure you know all storage engines specificities before you choose. In doubt choose InnoDb.',
        'Message' => 'Message',
        'More than one backup file found:' => 'More than one backup file found:',
        // N
        'No' => 'No',
        'No backup file found' => 'No backup file found',
        'No database restoration, as wanted' => 'No database restoration, as wanted',
        'No extraction, as wanted' => 'No extraction, as wanted',
        'No files restoration, as wanted' => 'No files restoration, as wanted',
        'Nt Restoration' => 'Nt Restoration',
        'Nt Restoration for Prestashop' => 'Nt Restoration for Prestashop',
        // O
        'on request:' => 'on request:',
        'Only database will be restored' => 'Only database will be restored',
        'Options' => 'Options',
        // P
        'Password' => 'Password',
        'Pay attention you do not have a .htaccess file' => 'Pay attention you do not have a .htaccess file',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.',
        // Q
        'Query failed on:' => 'Query failed on:',
        // R
        'Reconnection:' => 'Reconnection:',
        'Refresh' => 'Refresh',
        'Refresh deactivated' => 'Refresh deactivated',
        'Replace .htaccess' => 'Replace .htaccess',
        'Restoration failed' => 'Restoration failed',
        'Restoration failed on line n°' => 'Restoration failed on line n°',
        'Restoring backup...' => 'Restoring backup...',
        'Restoring database file: "%s"...' => 'Restoring database file: "%s"...',
        'Restoring database:' => 'Restoring database:',
        'Restoring files...' => 'Restoring files...',
        'Restoring files:' => 'Restoring files:',
        // S
        'Simple automation is enabled in Nt Backup And Restore module with your old domain. If your new domain is final (not a test site), you should click on the "Update domain" button in Automation menu.' => 'Simple automation is enabled in Nt Backup And Restore module with your old domain. If your new domain is final (not a test site), you should click on the "Update domain" button in Automation menu.',
        'Site Maintenance' => 'Site Maintenance',
        'Shop email is not valid.' => 'Shop email is not valid.',
        'Shop url:' => 'Shop url:',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Sorry for the inconvenience but we are performing some maintenance at the moment.',
        'SQL file is missing' => 'SQL file is missing',
        'Start restoration' => 'Start restoration',
        'Starting restoration' => 'Starting restoration',
        'Super admin email is not valid.' => 'Super admin email is not valid.',
        'Super admin first name is not valid.' => 'Super admin first name is not valid.',
        'Super admin last name is not valid.' => 'Super admin last name is not valid.',
        'Super admin password is not valid.' => 'Super admin password is not valid.',
        // T
        'Table prefix' => 'Table prefix',
        'The storage engine usually used is InnoDB but it is possible to choose another one.' => 'The storage engine usually used is InnoDB but it is possible to choose another one.',
        'The lock could not be deleted.' => 'The lock could not be deleted.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => 'The restore will be performed with interruption if the server timeout is not large enough.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.',
        // U
        'Unable to connect to the database' => 'Unable to connect to the database',
        'Unable to open SQL file' => 'Unable to open SQL file',
        'Updating .htaccess file...' => 'Updating .htaccess file...',
        'Updating defines...' => 'Updating defines...',
        'Updating links...' => 'Updating links...',
        'Updating settings...' => 'Updating settings...',
        'Updating URL configuration...' => 'Updating URL configuration...',
        'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
        'Useful if the new database does not know the old collation or charset. This is usually the case when moving from mysql to mariadb or vice versa, or when database versions are different.' => 'Useful if the new database does not know the old collation or charset. This is usually the case when moving from mysql to mariadb or vice versa, or when database versions are different.',
        // V
        // W
        'We will be back soon!' => 'We will be back soon!',
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:',
        // X
        // Y
        'Yes' => 'Yes',
        'You can provide a new shop contact email' => 'You can provide a new shop contact email',
        'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s' => 'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")',
        // Z
    ),
    'de' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'Eine .htaccess-Datei wurde auf Ihrem Server gefunden. Dies wird wahrscheinlich verhindern, dass Ihre Website nach der Wiederherstellung gut funktioniert. Sollte die gefundene .htaccess-Datei durch das Backup ersetzt werden?',
        'Attempt to disable server timeout' => 'Versuch, Server-Timeout zu deaktivieren',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'Backup-Datei ist groß, Fortschritt ist nicht genau, aber alles läuft gut',
        // C
        'Change access rights' => 'Anpassen der Zugriffsrechte',
        'Change database table prefix' => 'Anpassen des Datenbank Tabellen prefix',
        'Change folders and files access rights' => 'Anpassen der Zugriffsrechte für Ordner und Files',
        'Change shop email' => 'Anpassen der Shop Email',
        'Change table prefix' => 'Anpassen des Tabellen prefix',
        'Changing email shop...' => 'Shop Email anpassen...',
        'Changing table prefix...' => 'Tabellen Prefix wird geändert...',
        'Clean' => 'Reinigen',
        'Clean database before restore' => 'Säubern Sie die Datenbank vor der Wiederherstellung',
        'Clean files before restore' => 'Dateien vor der Wiederherstellung bereinigen',
        'Cleaning database before restoration...' => 'Datenbank vor der Wiederherstellung bereinigen ...',
        'Cleaning files before restoration...' => 'Dateien vor der Wiederherstellung bereinigen ...',
        'Create a new super admin' => 'Neuen Super Admin anlegen',
        'Create super admin' => 'Super Admin anlegen',
        'Creating super admin...' => 'Super Admin wird angelegt...',
        'Current timeout: %d secondes' => 'Aktuelles Timeout: %d Sekunden',
        // D
        'Database connection parameters' => 'Datenbankverbindungsparameter',
        'Database Host server' => 'Database Host-Server',
        'Database Host server:' => 'Database Host-Server :',
        'Database login' => 'Datenbank login',
        'Database name' => 'Datenbank Name',
        'Database name:' => 'Datenbank Name :',
        'Database name is not valid.' => 'Datenbank Name ist ungültig.',
        'Database password' => 'Datenbank Passwort',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'datenbank Server Adresse. Sie können den Port angeben, indem Sie nach der IP-Adresse \':\' hinzufügen',
        'Database server is not valid.' => 'Datenbank Server ist ungültig',
        'Database table prefix' => 'Datenbank Tabellen prefix',
        'Database User' => 'Database Benutzer',
        'Database User:' => 'Database Benutzer :',
        'Database user is not valid.' => 'Datenbank Benutzer (User) ist ungültig.',
        'Decompressing backup' => 'Dekomprimieren der Sicherung',
        'Decompressing backup part' => 'Dekomprimieren der Teil-Sicherung',
        'Delete all customers emails. Useful for dev local test shop' => 'Alle Emailadressen der Kunden löschen, dies ist für testumgebungen zu empfehlen',
        'Delete all datas in database before restoration' => 'Löschen Sie alle Daten in der Datenbank vor der Wiederherstellung',
        'Delete all files and directories before restoration' => 'Löschen Sie alle Dateien und das Verzeichnis vor der Wiederherstellung',
        'Delete backup file after restoration' => 'Das Backup File nach der Wiederherstellung löschen',
        'Delete customers emails' => 'Emailadressen der Kunden löschen',
        'Delete lock' => 'Löschen Sie die Sperre',
        'Deleting customers email...' => 'Emailadressen der Kunden werden gelöscht...',
        'Disable "NoAutoValueOnZero" SQL mode' => 'Deaktiviere "NoAutoValueOnZero" SQL mode',
        'Disable cache' => 'Cache deaktivieren',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'Deaktivieren Sie den Cache-Modus. Nützlich, wenn Cache verwendet wurde und kein Cache verfügbar ist',
        'Disable media servers' => 'Deaktiviere media servers',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'Deaktivieren Sie Medienserver. Nützlich, wenn Medienserver verwendet wurden und diese nicht verfügbar sind',
        'Disable ModPagespeed' => 'Deaktiviere ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'Deaktivieren Sie ModPagespeed. Nützlich, wenn ModPagespeed verwendet wurde und es jetzt nicht verfügbar ist',
        'Disable SSL' => 'Deaktiviere SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'Deaktiviere den SSL modus. Wenn der Original Shop mit SSL betrieben wurde, auf der neuen Umgebung aber kein SSL zur Verfügung steht ',
        'Disabling media servers...' => 'Media Server werden deaktiviert...',
        'Disabling SSL...' => 'Deaktiviere SSL...',
        'Do not extract database' => 'Datenbank nicht extrahieren',
        'Do not extract database. Only if your database is already extracted' => 'Extrahieren Sie keine Datenbank. Nur wenn Ihre Datenbank bereits extrahiert ist',
        'Do not restore database' => 'Datenbank NICHT Wiederherstellen',
        'Do not restore database. Useful for testing' => 'Datenbank nicht wiederherstellen. Nützlich zum Testen',
        'Do not restore files' => 'Wiederherstellung ohne Files',
        'Do not restore files. Useful for testing' => 'Keine Files wiederherstellen, nützlich zum testen',
        'Duration between progress refresh' => 'Dauer zwischen Deraktualisierung',
        'Duration between progress refresh:' => 'Dauer zwischen Deraktualisierung :',
        'Duration between refresh' => 'Dauer zwischen Aktualisierung',
        'Duration between refresh:' => 'Dauer zwischen Aktualisierung :',
        'Duration of intermediate renewal.' => 'Dauer der Zwischenerneuerung.',
        'Duration of intermediate renewal:' => 'Dauer der Zwischenerneuerung :',
        // E
        'Email' => 'Email',
        'Enable Mode Dev' => 'Entwickler (Dev.) Modus aktivieren',
        'Enable Mode Dev. Useful for developers' => 'Entwickler (Dev.) Modus aktivieren, hilfreich für entwickler',
        'Error while changing email shop:' => 'Fehler beim anpassen der Shop Email :',
        'Error while changing table prefix:' => 'Fehler beim ändern der Tabellen Prefixe :',
        'Error while checking existence of table' => 'Fehler beim Überprüfen der Existenz der Tabelle',
        'Error while cleaning datas:' => 'Fehler beim Reinigen der Daten:',
        'Error while creating super admin:' => 'Fehler beim anlegen des Super Admins :',
        'Error while deleting customers emails:' => 'Fehler beim löschen der Kundenemails :',
        'Error while deleting mailalert customers emails:' => 'Fehler beim Löschen von mailalert-Kunden-E-Mails:',
        'Error while disabling media servers:' => 'Fehler beim deaktivieren des Medien Servers :',
        'Error while disabling SSL:' => 'Fehler beim deaktivieren von SSL :',
        'Error while getting database file: No backup file found' => 'Fehler beim Abrufen der Datenbankdatei: Keine Sicherungsdatei gefunden',
        'Error while getting employee by email:' => 'Fehler beim Abrufen des Mitarbeiters per E-Mail:',
        'Error while getting likely understood language:' => 'Fehler beim Abrufen der wahrscheinlich verstandenen Sprache:',
        'Error while renaming .htaccess file, please check file access right' => 'Fehler beim Umbenennen der .htaccess-Datei, bitte Dateizugriffsrecht prüfen',
        'Error while restoring database:' => 'Fehler beim wiederherstellen der Datenbank :',
        'Error while restoring files, tar file does not exist' => 'Fehler beim Wiederherstellen von Dateien, TAR-Datei existiert nicht',
        'Error while restoring files, tar file is not correct' => 'Fehler beim Dekomprimieren der Sicherung, TAR-Datei ist nicht korrekt',
        'Error while restoring files, tar file truncated' => 'Fehler beim Wiederherstellen von Dateien, TAR-Datei abgeschnitten',
        'Error while restoring files, unable to create directory' => 'Fehler beim Wiederherstellen von Dateien, Verzeichnis konnte nicht erstellt werden',
        'Error while restoring files, unable to create file' => 'Fehler beim Wiederherstellen von Dateien, Datei kann nicht erstellt werden',
        'Error while restoring files, unable to open tar file' => 'Fehler beim Wiederherstellen von Dateien, TAR-Datei kann nicht geöffnet werden',
        'Error while restoring files, unable to read data in tar file' => 'Fehler beim Wiederherstellen von Dateien, Daten können nicht in TAR-Datei gelesen werden',
        'Error while restoring files, unable to read name file in tar file' => 'Fehler beim Wiederherstellen von Dateien, Datei kann nicht in TAR-Datei gelesen werden',
        'Error while restoring files, unable to read tar file' => 'Fehler beim Wiederherstellen von Dateien, TAR-Datei konnte nicht gelesen werden',
        'Error while restoring files, unable to write file' => 'Fehler beim Wiederherstellen von Dateien, Datei kann nicht geschrieben werden',
        'Error while restoring files: No backup file found' => 'Fehler beim wiederherstellen der Files',
        'Error while retrieving Prestashop version, unable to find the version' => 'Fehler beim Abrufen der Prestashop-Version, die Version konnte nicht gefunden werden',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'Fehler beim Abrufen der Prestashop-Version, unmöglich, die Datei mit den Informationen zu lesen',
        'Error while retrieving virtual uri:' => 'Fehler beim anpassen des Virtual uri :',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'Fehler beim Aktualisieren der .htaccess-Datei, Lesen der .htaccess-Datei nicht möglich',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'Fehler beim Aktualisieren der .htaccess-Datei, Speichern der .htaccess-Datei nicht möglich',
        'Error while updating defines, defines file does not exist' => 'Fehler beim Update definiert, definiert Datei existiert nicht',
        'Error while updating defines, unable to read defines file' => 'Fehler beim Aktualisieren definiert, kann keine Definitionsdatei lesen',
        'Error while updating defines, unable to save defines file' => 'Fehler beim Aktualisieren definiert, kann keine Definitionsdatei speichern',
        'Error while updating links:' => 'Fehler beim anpassen der Links :',
        'Error while updating settings, settings file does not exist' => 'Fehler beim Aktualisieren der Einstellungen, Einstellungsdatei existiert nicht',
        'Error while updating settings, unable to find the prefix' => 'Fehler beim Aktualisieren von Einstellungen, das Präfix kann nicht gefunden werden',
        'Error while updating settings, unable to read settings file' => 'Fehler beim Aktualisieren der Einstellungen, Lesen der Einstellungsdatei nicht möglich',
        'Error while updating settings, unable to save settings file' => 'Fehler beim Aktualisieren der Einstellungen, Speichern der Einstellungsdatei nicht möglich',
        'Error while updating super admin password:' => 'Fehler beim updaten des Super Admin Passwort :',
        'Error while updating URL configuration:' => 'Fehler beim anpassen der URL Konfiguration :',
        'Error, the backup is no longer readable' => 'Fehler, die Sicherung ist nicht mehr lesbar',
        'Error, the backup is no longer seekable' => 'Fehler, die Sicherung ist nicht mehr suchbar',
        'Error, the compressed backup file has a compression issue' => 'Fehler, die komprimierte Sicherungsdatei hat ein Komprimierungsproblem',
        'Error, the compressed backup file is no longer readable' => 'Fehler, die komprimierte Sicherungsdatei ist nicht mehr lesbar',
        'Error, the compressed backup file is no longer seekable' => 'Fehler, die komprimierte Sicherungsdatei ist nicht mehr suchbar',
        'Error, the file is no longer readable' => 'Fehler, die Datei ist nicht mehr lesbar',
        'Error, the file is no longer seekable' => 'Fehler, die Datei ist nicht mehr suchbar',
        'Error:' => 'Fehler :',
        'Error: Unable to connect to the database' => 'Fehler : konnte nicht mit der Datenbank verbinden',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'Error. Maximale Laufzeit Ihres Servers erreicht (%d s). Bitte erhöhen Sie diese Zeit auf Ihrem Server, damit die Wiederherstellung abgeschlossen werden kann. Meistens müssen Sie PHP max_execution_time erhöhen. Sie können auch die Option "Zwischenerneuerung" aktivieren, um diese Einschränkung zu umgehen.',
        'Error. The config file cannot be opened' => 'Error. Die Konfigurationsdatei kann nicht geöffnet werden',
        'Error. The config file cannot be rewind' => 'Error. Die Konfigurationsdatei kann nicht zurückgespult werden',
        'Error. There is an error with the "Intermediate renewal" option' => 'Error. Bei der Option "Zwischenerneuerung" ist ein Fehler aufgetreten',
        'Execution failed on:' => 'Ausführung abgebrochen auf:',
        'Extract dump' => 'Extrahiere Papierkorb',
        // F
        'File access rights' => 'File Zugriffsrechte',
        'File access rights are not valid (should be between 600 and 777).' => 'Dateizugriffsrechte sind nicht gültig (sollte zwischen 600 und 777 liegen).',
        'File access rights, default: 644' => 'Files Zugriffsrechte, Standart : 644',
        'FINISH ! Your backup was restored with success !' => 'FERTIG ! Backup wurde erfolgreich wiederhergestellt !',
        'First name' => 'Vorname',
        'Folder access rights' => 'Ordner zugriffs Rechte',
        'Folder access rights are not valid (should be between 600 and 777).' => 'Ordnerzugriffsrechte sind nicht gültig (sollte zwischen 600 und 777 liegen).',
        'Folder access rights, default: 755' => 'Ordner Zugriffsrechte, Standart : 755',
        // G
        'Get database file' => 'Holen Sie sich die Datenbankdatei',
        'Go to your shop' => 'Geh zu deinem Geschäft',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'Wenn die ursprüngliche Datenbank fehlerhaft ist und die Wiederherstellung bei einer SQL INSERT-Anforderung fehlschlägt, kann diese Option Fehler umgehen. Dies ist besonders nützlich bei dem Fehler "Duplicate entry".',
        'Ignore SQL errors' => 'SQL-Fehler ignorieren',
        'Intermediate renewal' => 'Zwischenerneuerung',
        // L
        'Last name' => 'Nachname',
        // M
        'Message' => 'Nachricht',
        // N
        'No' => 'Nein',
        'No database restoration, as wanted' => 'Keine Datenbankwiederherstellung, wie gewünscht',
        'No extraction, as wanted' => 'Keine Extraktion, wie gewünscht',
        'No files restoration, as wanted' => 'Keine Wiederherstellung von Dateien, wie gewünscht',
        'Nt Restoration' => 'Nt Restoration',
        'Nt Restoration for Prestashop' => 'Nt Restoration für Prestashop',
        // O
        'on request:' => 'auf Anfrage:',
        'Only database will be restored' => 'Nur die Datenbank wird zurückgespeichert',
        'Options' => 'Optionen',
        // P
        'Password' => 'Passwort',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'Bitte stellen Sie sicher, dass Ihre PHP-Version (%1$s) mit Ihrer Prestashop-Version (%2$s) kompatibel ist. Sie können es überprüfen auf:',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'Prestashop .htaccess scheint Änderungen von Original Prestashop Dateien zu enthalten. Stellen Sie bitte sicher dass die Datei immer noch gültig ist für die neue Installation.',
        // Q
        'Query failed on:' => 'Abfrage abgebrochen auf :',
        // R
        'Reconnection:' => 'Wiederverbindung:',
        'Refresh' => 'Aktualisieren',
        'Replace .htaccess' => 'Ersetzen Sie .htaccess',
        'Restoration failed' => 'Wiederherstellung fehlgeschlagen',
        'Restoration failed on line n°' => 'Wiederherstellung abgebrochen auf Linie n°',
        'Restoring backup...' => 'Backup wird wiederhergestellt...',
        'Restoring database:' => 'Datenbank wird wiederhergestellt:',
        'Restoring files:' => 'Files werden widerhergestellt:',
        'Restoring files...' => 'Files werden widerhergestellt...',
        // S
        'Shop email is not valid.' => 'Shop Email ist nicht gültig.',
        'Site Maintenance' => 'Wartungsarbeiten',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Entschuldigung für die Unannehmlichkeiten, aber wir führen gerade Wartungsarbeiten durch.',
        'Start restoration' => 'Wiederherstellung beginnen',
        'Starting restoration' => 'Beginne Wiederherstellung',
        'Super admin email is not valid.' => 'Super admin Email ist ungültig.',
        'Super admin first name is not valid.' => 'Super admin Vorname ungültig',
        'Super admin last name is not valid.' => 'Super admin Nachname ungültig',
        'Super admin password is not valid.' => 'Super admin Passwort ungültig.',
        // T
        'Table prefix' => 'Tabellen prefix',
        'The lock could not be deleted.' => 'Die Sperre konnte nicht gelöscht werden.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => 'Die Wiederherstellung wird mit Unterbrechung durchgeführt, wenn das Server-Timeout nicht groß genug ist.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'Um eine vollständige Wiederherstellung durchzuführen, benötigt das Skript einige Zeit. Wenn der Server das Skript vor dem Ende stoppt, ist die Wiederherstellung nicht abgeschlossen. Wenn Sie einen Fehler erhalten, aktivieren Sie diese Option und erhöhen Sie Ihre PHP max_execution_time.',
        // U
        'Unable to connect to the database' => 'Konnte nicht mit der Datenbank verbinden',
        'Unable to open SQL file' => 'Konnte das SQL File nicht öffnen',
        'Updating .htaccess file...' => '.htaccess wird angepasst ...',
        'Updating defines...' => 'Aktualisierung definiert ...',
        'Updating links...' => 'Links werden angepasst...',
        'Updating settings...' => 'Settings werden angepasst...',
        'Updating URL configuration...' => 'URL Konfiguration wird angepasst...',
        'Useful if mysql is limited and cannot restore the database' => 'Nützlich, wenn mysql eingeschränkt ist und die Datenbank nicht wiederherstellen kann',
        // W
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'Wir können nicht sicherstellen, dass Ihre PHP-Version (%s) mit Ihrer Prestashop-Version kompatibel ist. Sie können es auf überprüfen:',
        'We will be back soon!' => 'Wir sind gleich zrück!',
        // Y
        'Yes' => 'Ja',
        'You can provide a new shop contact email' => 'Sie können eine neue Shop Email angeben',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Ihre Serverarchitektur (32 Bit) ist nicht in der Lage, Zwischenzeitliche Erneuerungen auf großen komprimierten Dateien (> 2 GB) auszuführen, so dass Sie entweder sicherstellen müssen, dass Ihr Servertimeout groß genug ist (damit die Wiederherstellung das Ende des Prozesses erreichen kann) oder Entpacken Sie Ihre Sicherung, um eine .tar anstelle einer .tar.gz zu verwenden (Sie können Sicherungen als .tar anstelle von .tar.gz im Modul erstellen, indem Sie die erweiterte Option "Nicht komprimieren" verwenden).',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Ihr Serverarchitektursystem (Windows) ist nicht in der Lage, Zwischenzeitliche Erneuerungen auf großen komprimierten Dateien (> 2 GB) auszuführen, so dass Sie entweder sicherstellen müssen, dass Ihr Servertimeout groß genug ist (damit die Wiederherstellung das Ende des Prozesses erreichen kann) oder Entpacken Sie Ihre Sicherung, um eine .tar anstelle einer .tar.gz zu verwenden (Sie können Sicherungen als .tar anstelle von .tar.gz im Modul erstellen, indem Sie die erweiterte Option "Nicht komprimieren" verwenden).',
    ),
    'fr' => array(
        ':' => ' :',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'Un fichier .htaccess a été détecté sur votre serveur. Cela empêchera probablement le bon fonctionnement de votre site après restauration. Le fichier .htaccess détecté doit-il être remplacer par celui de la sauvegarde ?',
        'Attempt to disable server timeout' => 'Tenter de désactiver le timeout server',
        'Available collations and charsets' => 'Interclassements et jeux de caractères disponibles',
        'Available collations cannot be found' => 'Les interclassements disponibles n\'ont pas put être trouvés',
        'Available storage engines' => 'Moteurs de stockage disponibles',
        'Available storage engines cannot be found' => 'Les moteurs de stockage disponibles n\'ont pas put être trouvés',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'Le fichier de sauvegarde est gros, l\'avancement n\'est pas précis mais tout avance bien',
        // C
        'Change access rights' => 'Modifier les droits d\'accès',
        'Change collation and charset' => 'Modifier l\'interclassement et le jeu de caractères',
        'Change database table prefix' => 'Modifie le préfixe des tables de la base de données',
        'Change storage engine' => 'Modifier le moteur de stockage',
        'Change folders and files access rights' => 'Modifie les droits d\'accès aux dossiers et fichiers',
        'Change shop email' => 'Modifier l\'email de la boutique',
        'Change table prefix' => 'Modifier le préfixe des tables',
        'Changing email shop...' => 'Modification de l\'email de la boutique...',
        'Changing table prefix...' => 'Modification du préfixe des tables...',
        'Charset value not valid' => 'Valeur de jeux de caractères invalide',
        'Clean' => 'Nettoyage',
        'Clean database before restore' => 'Vider la base de données avant de restaurer',
        'Clean files before restore' => 'Supprimer les fichiers et dossiers avant de restaurer',
        'Cleaning database before restoration...' => 'Nettoyage de la base de données avant la restauration...',
        'Cleaning files before restoration...' => 'Nettoyage des fichiers avant la restauration...',
        'Collation value not valid' => 'Valeur d\'interclassement invalide',
        'Collations and charsets known by the database where the data will be restored' => 'Interclassements et jeux de caractères connus par la base de données où seront restaurées les données',
        'Could not check the existance of collation/charset' => 'Impossible de vérifier l\'existance de l\'interclassements/jeux de caractères',
        'Could not check the existance of storage engine' => 'Impossible de vérifier l\'existance du moteur de stockage',
        'Could not find default charset' => 'Impossible de trouver le jeu de caractères par défaut',
        'Could not find default collation' => 'Impossible de trouver l\'interclassement par défaut',
        'Could not find default storage engine' => 'Impossible de trouver le moteur de stockage par défaut',
        'Create a new super admin' => 'Crée un nouveau super admin',
        'Create super admin' => 'Créer un super admin',
        'Creating super admin...' => 'Création du super admin...',
        'Current timeout: %d secondes' => 'Timeout actuel : %d secondes',
        // D
        'Database connection parameters' => 'Paramètres de connexion de la base de données',
        'Database Host server' => 'Serveur Hôte de la base de données',
        'Database Host server:' => 'Serveur Hôte de la base de données :',
        'Database login' => 'Login de la base de données',
        'Database name' => 'Nom de la base de données',
        'Database name:' => 'Nom de la base de données :',
        'Database name is not valid.' => 'Le nom de la base de données est incorrect.',
        'Database parameters are not valid.' => 'Les paramètres de la base de donnée sont incorrect.',
        'Database password' => 'Mot de passe de la base de données',
        'Database Port:' => 'Port de la base de données :',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'Adresse du serveur de base de données. Vous pouvez indiquer le port en ajoutant \':\' après l\'IP',
        'Database server is not valid.' => 'Le serveur de la base de données est incorrect.',
        'Database table prefix' => 'Préfixe des tables de la base de données',
        'Database User' => 'Utilisateur de la base de données',
        'Database User:' => 'Utilisateur de la base de données :',
        'Database user is not valid.' => 'L\'utilisateur de la base de données est incorrect.',
        'Decompressing backup' => 'Décompression de la sauvegarde',
        'Decompressing backup part' => 'Décompression de la sauvegarde partie',
        'Delete all customers emails. Useful for dev local test shop' => 'Supprime les emails de tous les clients. Pratique pour les tests en local',
        'Delete all datas in database before restoration' => 'Supprimer toutes les données de la base de données avant la restauration',
        'Delete all files and directories before restoration' => 'Supprimer tous les fichiers et dossiers avant la restauration',
        'Delete backup file after restoration' => 'Supprimer le fichier de sauvegarde après la restauration',
        'Delete customers emails' => 'Supprimer les emails des clients',
        'Delete lock' => 'Supprimer le vérouillage',
        'Deleting customers email...' => 'Suppression des emails des clients...',
        'Disable "NoAutoValueOnZero" SQL mode' => 'Désactiver le mode SQL "No Auto Value On Zero"',
        'Disable cache' => 'Désactiver le cache',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'Désactive le cache. Pratique si le cache était activé mais qu\'il n\'est plus disponible maintenant',
        'Disable media servers' => 'Désactiver les serveurs de média',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'Désactive les serveurs de média. Utile si des serveurs de média étaient utilisés mais qu\'ils ne sont plus disponibles maintenant',
        'Disable ModPagespeed' => 'Désactiver ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'Désactiver ModPagespeed. Utile si ModPagespeed était activé mais qu\'il n\'est plus disponible maintenant',
        'Disable SSL' => 'Désactiver SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'Désactive SSL. Pratique si SSL était utilisé mais qu\'il n\'est plus disponible maintenant',
        'Disabling media servers...' => 'Désactivation des serveurs de média...',
        'Disabling SSL...' => 'Désactivation du SSL...',
        'Do not extract database' => 'Ne pas extraire la base de données',
        'Do not extract database. Only if your database is already extracted' => 'Ne pas extraire la base de données. Seulement si votre bae de données est déjà extraite',
        'Do not restore database' => 'Ne pas restaurer la base de données',
        'Do not restore database. Useful for testing' => 'Ne restaure pas la base de données. Pratique pour les tests',
        'Do not restore files' => 'Ne pas restaurer les fichiers',
        'Do not restore files. Useful for testing' => 'Ne restaure pas les fichiers. Pratique pour les tests',
        'Duration between progress refresh' => 'Temps entre les rafraichissements de la progression',
        'Duration between progress refresh:' => 'Temps entre les rafraichissements de la progression :',
        'Duration between refresh' => 'Temps entre les rafraichissements',
        'Duration between refresh:' => 'Temps entre les rafraichissements :',
        'Duration of intermediate renewal.' => 'Temps des relances intermédiaires.',
        'Duration of intermediate renewal:' => 'Temps des relances intermédiaires :',
        // E
        'Email' => 'Email',
        'Enable Mode Dev' => 'Activer le mode Dev',
        'Enable Mode Dev. Useful for developers' => 'Activation du mode Dev. Utile pour les développeurs',
        'Error while changing email shop:' => 'Erreur pendant la modification de l\'email de la boutique :',
        'Error while changing table prefix:' => 'Erreur pendant la modification du préfixe des tables :',
        'Error while checking existence of table' => 'Erreur pendant la vérification de l\'existance de la table',
        'Error while cleaning datas:' => 'Erreur pendant le nettoyage des données :',
        'Error while creating super admin:' => 'Erreur pendant la création du super admin :',
        'Error while deleting customers emails:' => 'Erreur pendant la suppression des emails des clients :',
        'Error while deleting mailalert customers emails:' => 'Erreur pendant la suppression des emails des clients mailalert :',
        'Error while disabling media servers:' => 'Erreur pendant la désactivation des serveurs de média :',
        'Error while disabling SSL:' => 'Erreur pendant la désactivation du SSL :',
        'Error while getting database file: No backup file found' => 'Erreur durant la récupération de la base de donnée : Aucun fichier de sauvegarde trouvé',
        'Error while getting employee by email:' => 'Erreur pendant la récupération de l\'employé par son email :',
        'Error while getting likely understood language:' => 'Erreur pendant la récupération du probable meilleur langage  :',
        'Error while renaming .htaccess file, please check file access right' => 'Erreur pendant le renommage du fichier .htaccess, vérifiez les droits d\'accès des fichiers',
        'Error while restoring backup: More than one backup file found' => 'Erreur pendant la restauration: Plus d\'un fichier de sauvegarde trouvé',
        'Error while restoring backup: No backup file found' => 'Erreur pendant la restauration: Aucun fichier de sauvegarde trouvé',
        'Error while restoring database:' => 'Erreur pendant la restauration de la base de données :',
        'Error while restoring files, tar file does not exist' => 'Erreur pendant la restauration des fichiers, le fichier tar n\'existe pas',
        'Error while restoring files, tar file is not correct' => 'Erreur pendant la restauration des fichiers, le fichier tar est incorrect',
        'Error while restoring files, tar file truncated' => 'Erreur pendant la restauration des fichiers, le fichier tar est tronqué',
        'Error while restoring files, unable to create directory' => 'Erreur pendant la restauration des fichiers, impossible de créer le dossier',
        'Error while restoring files, unable to create file' => 'Erreur pendant la restauration des fichiers, impossible de créer le fichier',
        'Error while restoring files, unable to open tar file' => 'Erreur pendant la restauration des fichiers, impossible d\'ouvrir le fichier tar',
        'Error while restoring files, unable to read data in tar file' => 'Erreur pendant la restauration des fichiers, impossible de lire les données dans le fichier tar',
        'Error while restoring files, unable to read name file in tar file' => 'Erreur pendant la restauration des fichiers, impossible de lire le nom du fichier dans le fichier tar',
        'Error while restoring files, unable to read tar file' => 'Erreur pendant la restauration des fichiers, impossible de lire le fichier tar',
        'Error while restoring files, unable to write file' => 'Erreur pendant la restauration des fichiers, impossible d\'écrire le fichier',
        'Error while restoring files: No backup file found' => 'Erreur pendant la restauration des fichiers : Pas de fichier de sauvegarde trouvé',
        'Error while retrieving Prestashop version, unable to find the version' => 'Erreur durant la récupération de la version Prestashop, impossible de trouver la version',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'Erreur durant la récupération de la version Prestashop, impossible de lire le fichier avec l\'information',
        'Error while retrieving virtual uri:' => 'Erreur pendant la récupération des URI virtuelles :',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'Erreur pendant la mise à jour du fichier .htaccess, impossible de lire le fichier .htaccess',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'Erreur pendant la mise à jour du fichier .htaccess, impossible d\'enregistrer le fichier .htaccess',
        'Error while updating defines, defines file does not exist' => 'Erreur pendant la mise à jour des définitions, Le fichier des définitions n\'existe pas',
        'Error while updating defines, unable to read defines file' => 'Erreur pendant la mise à jour des définitions, impossible de lire le fichier des définitions',
        'Error while updating defines, unable to save defines file' => 'Erreur pendant la mise à jour des définitions, impossible d\'enregistrer le fichier des définitions',
        'Error while updating links:' => 'Erreur pendant la mise à jour des liens :',
        'Error while updating settings, settings file does not exist' => 'Erreur pendant la mise à jour des paramètres, le fichier des paramètres n\'existe pas',
        'Error while updating settings, unable to find the prefix' => 'Erreur pendant la mise à jour des paramètres, impossible de trouver le préfixe',
        'Error while updating settings, unable to read settings file' => 'Erreur pendant la mise à jour des paramètres, impossible de lire le fichier des paramètres',
        'Error while updating settings, unable to save settings file' => 'Erreur pendant la mise à jour des paramètres, impossible d\'enregistrer le fichier des paramètres',
        'Error while updating super admin password:' => 'Erreur pendant la mise à jour du mot de passe du super admin :',
        'Error while updating URL configuration:' => 'Erreur pendant la mise à jour de la configuration des URL :',
        'Error, the backup is no longer readable' => 'Erreur, la sauvegarde ne peut plus être lue',
        'Error, the backup is no longer seekable' => 'Erreur, la sauvegarde ne peut plus être parcourue',
        'Error, the compressed backup file cannot be closed' => 'Erreur, la sauvegarde compressée ne peut pas être fermée',
        'Error, the compressed backup file cannot be opened' => 'Erreur, la sauvegarde compressée ne peut pas être ouverte',
        'Error, the compressed backup file has a compression issue' => 'Erreur, la sauvegarde compressée a un problème de compression',
        'Error, the compressed backup file is no longer readable' => 'Erreur, la sauvegarde compressée ne peut plus être lue',
        'Error, the compressed backup file is no longer seekable' => 'Erreur, la sauvegarde compressée ne peut plus être parcourue',
        'Error, the file is no longer readable' => 'Erreur, le fichier ne peut plus être lu',
        'Error, the file is no longer seekable' => 'Erreur, le fichier ne peut plus être parcouru',
        'Error, the uncompressed backup file cannot be closed' => 'Erreur, la sauvegarde non compressée ne peut pas être fermée',
        'Error, the uncompressed backup file cannot be created' => 'Erreur, la sauvegarde non compressée ne peut pas être créée',
        'Error, the uncompressed backup file cannot be writen' => 'Erreur, la sauvegarde non compressée ne peut pas être écrite',
        'Error:' => 'Erreur :',
        'Error: Unable to connect to the database' => 'Erreur : Impossible de se connecter à la base de données',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'Erreur. La durée d\'exécution maximale de votre serveur est atteinte (%d s). Merci d\'augmenter ce temps sur votre serveur afin que la restauration se termine. La plupart du temps, vous devez augmenter la valeur max_execution_time de PHP. Vous pouvez également activer l\'option "Relance intermédiaire" pour passer outre cette limite.',
        'Error. The config file cannot be opened' => 'Erreur. Le fichier de config ne peut être ouvert',
        'Error. The config file cannot be rewind' => 'Error. Impossible de revenir au début du fichier de config',
        'Error. There is an error with the "Intermediate renewal" option' => 'Erreur. Il y a une erreur avec l\'option "Relance intermédiaire"',
        'Execution failed on:' => 'L\'exécution a échoué sur :',
        'Extract dump' => 'Extraire le dump',
        // F
        'File "%s" has been renamed in "%s"' => 'Le fichier "%s" a été renomé en "%s"',
        'File access rights' => 'Droits d\'accès aux fichiers',
        'File access rights are not valid (should be between 600 and 777).' => 'Les droits d\'accès des fichiers ne sont pas valide (ils devraient être compris entre 600 et 777).',
        'File access rights, default: 644' => 'Droits d\'accès aux fichiers, par défaut : 644',
        'File to restore:' => 'Fichier à restaurer :',
        'FINISH ! Your backup was restored with success !' => 'Terminé ! Votre sauvegarde a été restaurée avec succès !',
        'First name' => 'Prénom',
        'Folder access rights' => 'Droits d\'accès aux dossiers',
        'Folder access rights are not valid (should be between 600 and 777).' => 'Les droits d\'accès des dossiers ne sont pas valide (ils devraient être compris entre 600 et 777).',
        'Folder access rights, default: 755' => 'Droits d\'accès aux dossiers, par défaut : 755',
        // G
        'Get database file' => 'Récupérer le fichier de base de données',
        'Go to your shop' => 'Aller sur votre boutique',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'S\'il y a des erreurs dans la base de données d\'origine et que la restauration échoue sur une requête SQL INSERT, cette option peut contourner les erreurs. C\'est particulièrement utile en cas d\'erreur de type "Duplicate Entry"',
        'Ignore SQL errors' => 'Ignorer les erreurs SQL',
        'Intermediate renewal' => 'Relance intermédiaire',
        // L
        'Last name' => 'Nom',
        // M
        'Make sure you know all storage engines specificities before you choose. In doubt choose InnoDb.' => 'Assurez vous de connaitre les spécificités de chacun avant de choisir. Dans le doute choisissez InnoDB.',
        'Message' => 'Message',
        'More than one backup file found:' => 'Plus d\'un fichier de sauvegarde trouvé :',
        // N
        'No' => 'Non',
        'No backup file found' => 'Aucun fichier de sauvegarde trouvé',
        'No database restoration, as wanted' => 'Pas de restauration de la base de données, comme demandé',
        'No extraction, as wanted' => 'Pas d\'extraction, comme demandé',
        'No files restoration, as wanted' => 'Pas de restauration des fichiers, comme demandé',
        'Nt Restoration' => 'Nt Restauration',
        'Nt Restoration for Prestashop' => 'Nt Restauration pour Prestashop',
        // O
        'on request:' => 'sur la requête :',
        'Only database will be restored' => 'Seule la base de données sera restaurée',
        'Options' => 'Options',
        // P
        'Password' => 'Mot de passe',
        'Pay attention you do not have a .htaccess file' => 'Attention vous n\'avez pas de fichier .htaccess',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'Veuillez vous assurer que votre version PHP (%1$s) est compatible avec votre version Prestashop (%2$s). Vous pouvez vérifier sur :',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'Le fichier .htaccess Prestashop semble contenir des modifications par rapport au fichier Prestashop d\'origine. Veuillez vous assurer que le fichier est toujours valide pour cette nouvelle installation',
        // Q
        'Query failed on:' => 'La requête a échoué sur :',
        // R
        'Reconnection:' => 'Reconnexion :',
        'Refresh' => 'Rafraîchir',
        'Refresh deactivated' => 'Refraichissement désactivé',
        'Replace .htaccess' => 'Remplacer .htaccess',
        'Restoration failed' => 'La restauration a échouée',
        'Restoration failed on line n°' => 'La restauration a échoué à la ligne n°',
        'Restoring backup...' => 'Restauration de la sauvegarde...',
        'Restoring database file: "%s"...' => 'Restauration du fichier de base de données : "%s"...',
        'Restoring database:' => 'Restauration de la base de données :',
        'Restoring files:' => 'Restauration des fichiers :',
        'Restoring files...' => 'Restauration des fichiers...',
        // S
        'Shop email is not valid.' => 'L\'email de la boutique est incorrect.',
        'Shop url:' => 'Url boutique :',
        'Simple automation is enabled in Nt Backup And Restore module with your old domain. If your new domain is final (not a test site), you should click on the "Update domain" button in Automation menu.' => 'L\'automatisation simple est activée dans le module Nt Backup Et Restaure avec votre ancienne URL. Si votre nouveau domaine est définitif (pas un site de test), vous devriez cliquer sur le bouton de "Mise à jour du domaine" dans le menu Automatisation.',
        'Site Maintenance' => 'Maintenance en cours',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Nous effectuons une maintenance en ce moment.<br />Veuillez nous excuser pour le dérangement.',
        'SQL file is missing' => 'Le fichier SQL est manquant',
        'Start restoration' => 'Démarrer la restauration',
        'Starting restoration' => 'Démarrage de la restauration',
        'Super admin email is not valid.' => 'L\'email du super admin est incorrect.',
        'Super admin first name is not valid.' => 'Le prénom du super admin est incorrect.',
        'Super admin last name is not valid.' => 'Le nom du super admin est incorrect.',
        'Super admin password is not valid.' => 'Le mot de passe du super admin est incorrect.',
        // T
        'Table prefix' => 'Préfixe des tables',
        'The storage engine usually used is InnoDB but it is possible to choose another one.' => 'Le moteur de stockage normalement utilisé est InnoDB mais il est possible d\'en choisir un autre.',
        'The lock could not be deleted.' => 'Le verrou ne peut être supprimé.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => 'La restauration s\'effectura avec des interruptions si le timeout du serveur n\'est pas assez grand.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'Pour que la restauration soit complète, le script a besoin d\'un certain temps. Si le serveur arrête le script avant qu\'il ait terminé, la restauration ne sera pas complète. Si vous avez une erreur, activez cette option et augmentez max_execution_time dans votre PHP.',
        // U
        'Unable to connect to the database' => 'Impossible de se connecter à la base de données',
        'Unable to open SQL file' => 'Impossible d\'ouvrir le fichier SQL',
        'Updating .htaccess file...' => 'Mise à jour du fichier .htaccess...',
        'Updating defines...' => 'Mise à jour des définitions...',
        'Updating links...' => 'Mise à jour des liens...',
        'Updating settings...' => 'Mise à jour des paramètres...',
        'Updating URL configuration...' => 'Mise à jour de la configuration des URL...',
        'Useful if mysql is limited and cannot restore the database' => 'Utile si Mysql est limité et empêche la restauration de la base de données',
        'Useful if the new database does not know the old collation or charset. This is usually the case when moving from mysql to mariadb or vice versa, or when database versions are different.' => 'Utile si la nouvelle base de données ne connaît pas l\'ancien interclassement ou jeu de caractères. C\'est généralement le cas lors du passage de mysql à mariadb ou vice versa, ou lorsque les versions des bases de données sont différentes.',
        // W
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'Nous ne pouvons nous assurer que votre version PHP (%s) est compatible avec votre version Prestashop. Vous pouvez vérifier sur :',
        'We will be back soon!' => 'Le site sera bientôt de retour !',
        // Y
        'Yes' => 'Oui',
        'You can provide a new shop contact email' => 'Vous pouvez indiquer un nouvel email de contact de la boutique',
        'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s' => 'Votre version Prestashop (%1$s) a besoin d\'une version PHP entre %2$s et %3$s. Votre version PHP actuelle est %4$s',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'L\'architecture de votre serveur (32 bits) n\'est pas en mesure d\'exécuter des relances intermédiaires sur de gros fichiers compressés (> 2 Go), vous devez donc soit vous assurer que le timeout de votre serveur est suffisamment grand (pour que la restauration puisse atteindre la fin de son processus) ou décompressez votre sauvegarde pour utiliser un .tar au lieu d\'un .tar.gz (vous pouvez créer des sauvegardes en .tar au lieu de .tar.gz dans le module en utilisant l\'option avancée "Ne pas compresser la sauvegarde")',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Le système de votre serveur (Windows) n\'est pas en mesure d\'exécuter des relances intermédiaires sur de gros fichiers compressés (> 2 Go), vous devez donc soit vous assurer que le timeout de votre serveur est suffisamment grand (pour que la restauration puisse atteindre la fin de son processus) ou décompressez votre sauvegarde pour utiliser un .tar au lieu d\'un .tar.gz (vous pouvez créer des sauvegardes en .tar au lieu de .tar.gz dans le module en utilisant l\'option avancée "Ne pas compresser la sauvegarde")',
    ),
    'da' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'En .htaccess-fil er blevet registreret på din server. Dette vil sandsynligvis forhindre, at dit websted fungerer godt efter restaurering. Skal den registrerede .htaccess-fil blive erstattet af backupen?',
        'Attempt to disable server timeout' => 'Forsøg at deaktivere server timeout',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'Backup filen er stor, fremskridt er ikke korrekte, men alt k&oslash;rer godt',
        // C
        'Change access rights' => 'Skift adgangsrettigheder',
        'Change database table prefix' => 'Skift database tabel prefiks',
        'Change folders and files access rights' => 'Skift mappe og fil adgangsrettigheder',
        'Change shop email' => 'Skift shop email',
        'Change table prefix' => 'Skift tabel prefiks',
        'Changing email shop...' => '&AElig;ndring email shop...',
        'Changing table prefix...' => '&AElig;ndre tabel prefiks...',
        'Clean' => 'Ren',
        'Clean database before restore' => 'Rens database før gendannelse',
        'Clean files before restore' => 'Rens filer før genoprettelse',
        'Cleaning database before restoration...' => 'Rengøringsdatabase inden restaurering ...',
        'Cleaning files before restoration...' => 'Rengøring af filer inden restaurering ...',
        'Create a new super admin' => 'Opret en ny super admin',
        'Create super admin' => 'Opret super admin',
        'Creating super admin...' => 'Oprettelse af super admin...',
        'Current timeout: %d secondes' => 'Aktuel timeout: %d sekunder',
        // D
        'Database connection parameters' => 'Parametre databaseforbindelse',
        'Database Host server' => 'Database Værtsserver',
        'Database Host server:' => 'Database Værtsserver:',
        'Database login' => 'Database login',
        'Database name' => 'Database navn',
        'Database name:' => 'Database navn:',
        'Database name is not valid.' => 'Database navn er ikke gyldigt.',
        'Database password' => 'Database kodeord',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'Database server adresse. Du kan angive porten ved at tilføje \':\' efter IP\'en',
        'Database server is not valid.' => 'Database server er ikke gyldigt.',
        'Database table prefix' => 'Database tabel præfiks',
        'Database User' => 'Database Bruger',
        'Database User:' => 'Database Bruger:',
        'Database user is not valid.' => 'Database bruger er ikke gyldig.',
        'Decompressing backup' => 'Dekomprimere sikkerhedskopiering',
        'Decompressing backup part' => 'Dekomprimere backup del',
        'Delete all customers emails. Useful for dev local test shop' => 'Slet alle kunde e-mails. Nyttigt for en test butik',
        'Delete all datas in database before restoration' => 'Slet alle data i database før genoprettelse',
        'Delete all files and directories before restoration' => 'Slet alle filer og mapper før genoprettelse',
        'Delete backup file after restoration' => 'Slet backup filen efter restaurering',
        'Delete customers emails' => 'Slet kunde e-mails',
        'Delete lock' => 'Slet lås',
        'Deleting customers email...' => 'Sletning af kunde email...',
        'Disable "NoAutoValueOnZero" SQL mode' => 'Deaktiver "NoAutoValueOnZero" SQL mode',
        'Disable cache' => 'Deaktiver cache',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'Deaktiver cachede tilstand. Nyttigt, hvis cache blev anvendt, og ingen cache er tilg&aelig;ngelig nu',
        'Disable media servers' => 'Deaktiver medieservere',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'Deaktiver medieservere. Nyttigt, hvis medieservere blev brugt, og der er ikke tilg&aelig;ngelig nu',
        'Disable ModPagespeed' => 'Deaktiver modpagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'Deaktiver modpagespeed. Nyttigt, hvis modpagespeed blev brugt, og det er ikke tilg&aelig;ngelig nu',
        'Disable SSL' => 'Deaktiver SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'Deaktiver SSL-tilstand. Nyttigt, hvis SSL blev anvendt, og ingen SSL er tilg&aelig;ngelig nu',
        'Disabling media servers...' => 'Deaktivering medieservere ...',
        'Disabling SSL...' => 'Deaktivering SSL...',
        'Do not extract database' => 'Udpak ikke databasen',
        'Do not extract database. Only if your database is already extracted' => 'Udpak ikke databasen. Kun hvis databasen allerede er udtrukket',
        'Do not restore database' => 'Gendan ikke database',
        'Do not restore database. Useful for testing' => 'Gendan ikke database. Nyttigt til test',
        'Do not restore files' => 'M&aring; ikke gendanne filer',
        'Do not restore files. Useful for testing' => 'Gendan ikke filer. Nyttigt til test',
        'Duration between progress refresh' => 'Varighed mellem opdatering af fremdrift',
        'Duration between progress refresh:' => 'Varighed mellem opdatering af fremdrift:',
        'Duration between refresh' => 'Varighed mellem opdatering',
        'Duration between refresh:' => 'Varighed mellem opdatering:',
        'Duration of intermediate renewal.' => 'Varighed af mellemfornyelse.',
        'Duration of intermediate renewal:' => 'Varighed af mellemfornyelse:',
        // E
        'Email' => 'E-mail',
        'Enable Mode Dev' => 'Aktiver tilstand Dev',
        'Enable Mode Dev. Useful for developers' => 'Aktiver tilstand Dev. Nyttigt for udviklere',
        'Error while changing email shop:' => 'Fejl ved at &aelig;ndre email shop:',
        'Error while changing table prefix:' => 'Fejl ved &aelig;ndring i tabel prefiks:',
        'Error while checking existence of table' => 'Fejl under kontrol af eksistensen af ​​bordet',
        'Error while cleaning datas:' => 'Fejl under rengøring af data:',
        'Error while creating super admin:' => 'Fejl ved oprettelse super admin:',
        'Error while deleting customers emails:' => 'Fejl under sletning af af kunde e-mails:',
        'Error while deleting mailalert customers emails:' => 'Fejl under sletning af mailalert kunder emails :',
        'Error while disabling media servers:' => 'Fejl ved deaktivering af medieservere:',
        'Error while disabling SSL:' => 'Fejl ved deaktivering af SSL:',
        'Error while getting database file: No backup file found' => 'Fejl under hentning af databasefil: Ingen backupfil fundet',
        'Error while getting employee by email:' => 'Fejl ved at oprette ansat via e-mail:',
        'Error while getting likely understood language:' => 'Fejl under hentning af et sprog:',
        'Error while renaming .htaccess file, please check file access right' => 'Fejl ved omd&oslash;bning af .htaccess fil, kan du tjekke om den har de rigtige rettigheder',
        'Error while restoring database:' => 'Fejl ved gendannelse database:',
        'Error while restoring files, tar file does not exist' => 'Fejl ved gendannelse af filer, tar-filen eksisterer ikke',
        'Error while restoring files, tar file is not correct' => 'Fejl ved gendannelse af filer, tar filen er ikke korrekt',
        'Error while restoring files, tar file truncated' => 'Fejl ved gendannelse af filer, tar filen afkortet',
        'Error while restoring files, unable to create directory' => 'Fejl ved gendannelse af filer, ude af stand til at oprette mappe',
        'Error while restoring files, unable to create file' => 'Fejl ved gendannelse af filer, ude af stand til at skabe filen',
        'Error while restoring files, unable to open tar file' => 'Fejl ved gendannelse af filer, ude af stand til at &aring;bne tar filen',
        'Error while restoring files, unable to read data in tar file' => 'Fejl ved gendannelse af filer, ude af stand til at l&aelig;se data i tar filen',
        'Error while restoring files, unable to read name file in tar file' => 'Fejl ved gendannelse af filer, ude af stand til at l&aelig;se navn fil i tar filen',
        'Error while restoring files, unable to read tar file' => 'Fejl ved gendannelse af filer, ude af stand til at l&aelig;se tar filen',
        'Error while restoring files, unable to write file' => 'Fejl ved gendannelse af filer, ude af stand til at skrive filen',
        'Error while restoring files: No backup file found' => 'Fejl ved gendannelse af filer: Ingen backup fil fundet',
        'Error while retrieving Prestashop version, unable to find the version' => 'Der opstod en fejl under hentning af Prestashop-versionen, og versionen blev ikke fundet',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'Der opstod en fejl under hentning af Prestashop-versionen, og filen kunne ikke læses med oplysningerne',
        'Error while retrieving virtual uri:' => 'Fejl ved hentning af virtuel uri:',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'Fejl ved opdatering af .htaccess fil, ude af stand til at l&aelig;se .htaccess filen',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'Fejl ved opdatering af .htaccess filen, ude af stand til at gemme .htaccess filen',
        'Error while updating defines, defines file does not exist' => 'Fejl under opdatering af definerer, definerer fil findes ikke',
        'Error while updating defines, unable to read defines file' => 'Fejl ved opdatering definerer, ude af stand til at l&aelig;se definerer filen',
        'Error while updating defines, unable to save defines file' => 'Fejl under opdatering af definerer, ude af stand til at gemme definerer filen',
        'Error while updating links:' => 'Fejl under opdatering links:',
        'Error while updating settings, settings file does not exist' => 'Fejl ved opdatering af indstillinger, indstillingsfilen findes ikke',
        'Error while updating settings, unable to find the prefix' => 'Der opstod en fejl under opdatering af indstillingerne.',
        'Error while updating settings, unable to read settings file' => 'Fejl ved opdatering af indstillinger, ude af stand til at l&aelig;se indstillingsfil',
        'Error while updating settings, unable to save settings file' => 'Fejl ved opdatering af indstillinger, ude af stand til at gemme filen',
        'Error while updating super admin password:' => 'Fejl under opdatering super admin password:',
        'Error while updating URL configuration:' => 'Fejl under opdatering af URL-konfiguration:',
        'Error, the backup is no longer readable' => 'Fejl, backupen er ikke længere læsbar',
        'Error, the backup is no longer seekable' => 'Fejl, backupen er ikke længere søgbar',
        'Error, the compressed backup file has a compression issue' => 'Fejl, har den komprimerede sikkerhedskopifil et komprimeringsproblem',
        'Error, the compressed backup file is no longer readable' => 'Fejl, kan den komprimerede sikkerhedskopifil ikke længere læses',
        'Error, the compressed backup file is no longer seekable' => 'Fejl, kan den komprimerede sikkerhedskopifil ikke længere søges',
        'Error, the file is no longer readable' => 'Fejl, filen er ikke længere læsbar',
        'Error, the file is no longer seekable' => 'Fejl, filen er ikke længere søgbar',
        'Error:' => 'Fejl :',
        'Error: Unable to connect to the database' => 'Fejl: Kan ikke forbinde til databasen',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'Fejl. Maksimal runtime på din server nået (%d s). Øg venligst denne gang på din server for at gendannelsen skal fuldføre. Det meste af tiden skal du øge PHP max_execution_time. Du kan også aktivere indstillingen "Intermediate renewal" for at omgå denne begrænsning.',
        'Error. The config file cannot be opened' => 'Fejl. Konfigurationsfilen kan ikke åbnes',
        'Error. The config file cannot be rewind' => 'Fejl. Konfigureringsfilen kan ikke spole tilbage',
        'Error. There is an error with the "Intermediate renewal" option' => 'Fejl. Der er en fejl med optionen "Intermediate renewal"',
        'Execution failed on:' => 'Udf&oslash;relse mislykkedes p&aring:',
        'Extract dump' => 'Uddrag dump',
        // F
        'File access rights' => 'Fil adgangs rettigheder',
        'File access rights are not valid (should be between 600 and 777).' => 'Filadgangsrettigheder er ikke gyldige (skal være mellem 600 og 777).',
        'File access rights, default: 644' => 'File adgangsrettigheder, standard: 644',
        'FINISH ! Your backup was restored with success !' => 'F&AElig;RDIG! Din backup blev restaureret med succes!',
        'First name' => 'Fornavn',
        'Folder access rights' => 'Folder adgangs rettigheder',
        'Folder access rights are not valid (should be between 600 and 777).' => 'Mappeadgangsrettigheder er ikke gyldige (skal være mellem 600 og 777).',
        'Folder access rights, default: 755' => 'Folder adgangsrettigheder, standard: 755',
        // G
        'Get database file' => 'Få database fil',
        'Go to your shop' => 'Gå til din butik',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'Hvis der er fejl i den originale database, og gendannelsen mislykkes på SQL INSERT-anmodning, kan denne mulighed omgå fejl. Dette er især nyttigt ved "Duplicate entry" -fejl.',
        'Ignore SQL errors' => 'Ignorer SQL-fejl',
        'Intermediate renewal' => 'Mellemliggende fornyelse',
        // L
        'Last name' => 'Efternavn',
        // M
        'Message' => 'Besked',
        // N
        'No' => 'Nej',
        'No database restoration, as wanted' => 'Ingen database restaurering, som &oslash;nsket',
        'No extraction, as wanted' => 'Ingen ekstraktion, som ønsket',
        'No files restoration, as wanted' => 'ngen filer restaurering, som &oslash;nsket',
        'Nt Restoration' => 'Nt Restaurering',
        'Nt Restoration for Prestashop' => 'Nt Restoration til Prestashop',
        // O
        'on request:' => 'p&aring; anmodning :',
        'Only database will be restored' => 'Kun database vil blive genoprettet',
        'Options' => 'Indstillinger',
        // P
        'Password' => 'Adgangskode',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'Sørg for, at din PHP-version (%1$s) er kompatibel med din Prestashop-version (%2$s). Du kan tjekke det på:',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'Prestashop .htaccess fil synes at indeholde ændringer fra Prestashop oprindelige fil. Kontroller, at filen stadig er gyldig til denne nye installation.',
        // Q
        'Query failed on:' => 'Query mislykkedes p&aring :',
        // R
        'Reconnection:' => 'Genåbning:',
        'Refresh' => 'Opdater',
        'Replace .htaccess' => 'Udskift .htaccess',
        'Restoration failed' => 'Gendannelse mislykkedes',
        'Restoration failed on line n°' => 'Restaurering mislykkedes p&aring; linje n°',
        'Restoring backup...' => 'Gendanner backup...',
        'Restoring database:' => 'Gendanner database:',
        'Restoring files:' => 'Gendannelse af filer:',
        'Restoring files...' => 'Gendannelse af filer...',
        // S
        'Shop email is not valid.' => 'Shop email er ikke gyldig.',
        'Site Maintenance' => 'Site Vedligeholdelse',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Beklager ulejligheden, men vi udf&oslash;rer nogle vedligeholdelse i &oslash;jeblikket.',
        'Start restoration' => 'Start restaurering',
        'Starting restoration' => 'Starter restaurering',
        'Super admin email is not valid.' => 'Super admin email er ikke gyldig.',
        'Super admin first name is not valid.' => 'Super admin fornavn er ikke gyldigt.',
        'Super admin last name is not valid.' => 'Super admin efternavn er ikke gyldigt.',
        'Super admin password is not valid.' => 'Super admin password er ikke gyldig.',
        // T
        'Table prefix' => 'Tabel prefix',
        'The lock could not be deleted.' => 'Låsen kunne ikke slettes.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => 'Gendannelsen vil blive udført med afbrydelse, hvis serverens timeout ikke er stor nok.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'For at udføre en komplet restaurering behøver scriptet nogen tid. Hvis serveren stopper scriptet inden slutningen, er restaureringen ikke færdig. Hvis du får en fejl, aktiver denne indstilling og øg din max_execution_time PHP.',
        // U
        'Unable to connect to the database' => 'Kan ikke forbinde til databasen',
        'Unable to open SQL file' => 'Kan ikke &aring;bne SQL filen',
        'Updating .htaccess file...' => 'Opdaterer .htaccess fil...',
        'Updating defines...' => 'Opdaterer definerer...',
        'Updating links...' => 'Opdaterer links...',
        'Updating settings...' => 'Opdaterer indstillinger...',
        'Updating URL configuration...' => 'Opdatering URL-konfiguration...',
        'Useful if mysql is limited and cannot restore the database' => 'Nyttigt, hvis mysql er begrænset og ikke kan gendanne databasen',
        // W
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'Vi kan ikke sikre os, at din PHP-version (%s) er kompatibel med din Prestashop-version. Du kan tjekke det på:',
        'We will be back soon!' => 'Vi vil v&aelig;re tilbage snart!',
        // Y
        'Yes' => 'Ja',
        'You can provide a new shop contact email' => 'Du kan give butikken en ny kontakt e-mail',
        'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s' => 'Din Prestashop-version (%1$s) skal bruge en PHP-version mellem %2$s og %3$s. Din nuværende PHP-version er %4$s',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Serverarkitekturen (32 bit) kan ikke køre mellemliggende fornyelser på store komprimerede filer (> 2 GB), så du skal enten sørge for, at serverens timeout er stor nok (så gendannelsen kan nå slutningen af processen) eller lyne sikkerhedskopien ud for at bruge en .tar i stedet for en .tar.gz (du kan oprette sikkerhedskopier som .tar i stedet for .tar.gz i modulet ved hjælp af den avancerede indstilling "Kom ikke med at komprimere sikkerhedskopien")',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Dit serverarkitektursystem (Windows) kan ikke køre mellemliggende fornyelser på store komprimerede filer (> 2 GB), så du skal enten sørge for, at serverens timeout er stor nok (så gendannelsen kan nå slutningen af processen) eller lyne sikkerhedskopien ud for at bruge en .tar i stedet for en .tar.gz (du kan oprette sikkerhedskopier som .tar i stedet for .tar.gz i modulet ved hjælp af den avancerede indstilling "Komprimer ikke sikkerhedskopiering")',
    ),
    'sv' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'En .htaccess-fil har upptäckts på din server. Detta kommer förmodligen att förhindra att din webbplats fungerar bra efter restaureringen. Ska den detekterade .htaccess-filen ersättas med backupen?',
        'Attempt to disable server timeout' => 'Försök att inaktivera server timeout',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'Backup filen är stor, framåtskridandet är inte korrekt, men allt går bra',
        // C
        'Change access rights' => 'Ändra åtkomsträttigheter',
        'Change database table prefix' => 'Ändra databas tabellprefix',
        'Change folders and files access rights' => 'Ändra mappar och fil behörigheter',
        'Change shop email' => 'Ändra  butikens E-post',
        'Change table prefix' => 'Ändra tabellprefix',
        'Changing email shop...' => 'Ändra butikens E-post…',
        'Changing table prefix...' => 'Ändra tabellprefix...',
        'Clean' => 'Rena',
        'Clean database before restore' => 'Rensa databasen innan du återställer',
        'Clean files before restore' => 'Rensa filer innan du återställer',
        'Cleaning database before restoration...' => 'Rengöringsdatabas före restaurering ...',
        'Cleaning files before restoration...' => 'Rengöring av filer före restaurering ...',
        'Create a new super admin' => 'Skapa en ny superadmin',
        'Create super admin' => 'Skapa superadmin',
        'Creating super admin...' => 'Skapa superadmin...',
        'Current timeout: %d secondes' => 'Aktuell timeout:%d sekunder',
        // D
        'Database connection parameters' => 'Databasens anslutningsparametrar',
        'Database Host server' => 'Database Värdserver',
        'Database Host server:' => 'Database Värdserver :',
        'Database login' => 'Databas inloggning',
        'Database name' => 'Databasnamn',
        'Database name:' => 'Databasnamn :',
        'Database name is not valid.' => 'Databasens namn är inte giltigt.',
        'Database password' => 'Databasens lösenord',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'Databasens server adress. Du kan ange hamnen genom att lägga till \':\' efter IP',
        'Database server is not valid.' => 'Databasens server är inte giltig.',
        'Database table prefix' => 'Databas tabellprefix',
        'Database User' => 'Database Användare',
        'Database User:' => 'Database Användare :',
        'Database user is not valid.' => 'Databasens användare är inte giltig.',
        'Decompressing backup' => 'Expandera säkerhetskopiering',
        'Decompressing backup part' => 'Expandera säkerhetskopieringsdelen',
        'Delete all customers emails. Useful for dev local test shop' => 'Ta bort alla kunders E-post. Användbart för diverse lokala testbutiker',
        'Delete all datas in database before restoration' => 'Ta bort alla data i databasen före restaurering',
        'Delete all files and directories before restoration' => 'Ta bort alla filer och katalog innan restaurering',
        'Delete backup file after restoration' => 'Ta bort backupfiler efter återställningen',
        'Delete customers emails' => 'Ta bort kunders E-post',
        'Delete lock' => 'Ta bort lås',
        'Deleting customers email...' => 'Tar bort kund E-post…',
        'Disable "NoAutoValueOnZero" SQL mode' => 'Inaktivera "NoAutoValueOnZero" SQL mode',
        'Disable cache' => 'Inaktivera cache',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'Inaktivera cache läge. Användbar om cache används och inte är tillgänglig nu',
        'Disable media servers' => 'Inaktivera mediaserver',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'Inaktivera mediaserver. Användbart om mediaserver används och inte längre är tillgänglig',
        'Disable ModPagespeed' => 'Inaktivera ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'Inaktivera ModPagespeed. Användbart om ModPagespeed används och inte är tillgänglig nu',
        'Disable SSL' => 'Inaktivera SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'Inaktivera SSL läge. Användbart om SSL används och ingen SSL är tillgänglig nu',
        'Disabling media servers...' => 'Inaktivera mediaserver...',
        'Disabling SSL...' => 'Inaktivera SSL...',
        'Do not extract database' => 'Extrahera inte databasen',
        'Do not extract database. Only if your database is already extracted' => 'Extrahera inte databasen. Endast om databasen redan har extraherats',
        'Do not restore database' => 'Återställ inte databasen',
        'Do not restore database. Useful for testing' => 'Återställ inte databasen. Användbart för testning',
        'Do not restore files' => 'Återställ inte filerna',
        'Do not restore files. Useful for testing' => 'Återställ inte filerna. Användbart för testning',
        'Duration between progress refresh' => 'Varaktighet mellan uppdatering av förlopp',
        'Duration between progress refresh:' => 'Varaktighet mellan uppdatering av förlopp :',
        'Duration between refresh' => 'Varaktighet mellan uppdatering',
        'Duration between refresh:' => 'Varaktighet mellan uppdatering :',
        'Duration of intermediate renewal.' => 'Varaktighet för mellanförnyelse.',
        'Duration of intermediate renewal:' => 'Varaktighet för mellanförnyelse :',
        // E
        'Email' => 'E-post',
        'Enable Mode Dev' => 'Aktivera Utvecklings Läget',
        'Enable Mode Dev. Useful for developers' => 'Aktivera Utvecklings Läget. Användbart för utvecklare',
        'Error while changing email shop:' => 'Fel vid ändring av butikens E-post :',
        'Error while changing table prefix:' => 'Fel vid ändring av tabellprefix :',
        'Error while checking existence of table' => 'Fel vid kontroll av existerande av tabell',
        'Error while cleaning datas:' => 'Fel vid rengöring av data:',
        'Error while creating super admin:' => 'Fel vid skapande av superadmin :',
        'Error while deleting customers emails:' => 'Fel vid borttagning av kund E-post :',
        'Error while deleting mailalert customers emails:' => 'Fel vid borttagning av E-postavisering kund E-post :',
        'Error while disabling media servers:' => 'Fel vid inaktivering av mediaserver :',
        'Error while disabling SSL:' => 'Fel vid inaktivering av SSL :',
        'Error while getting database file: No backup file found' => 'Det gick inte att få databasfilen: Ingen säkerhetskopierad fil hittades',
        'Error while getting employee by email:' => 'Fel vid hämtning av anställdes E-post :',
        'Error while getting likely understood language:' => 'Fel vid hämtande av sannolikt förstående språk :',
        'Error while renaming .htaccess file, please check file access right' => 'Fel vid namnändring av .htaccess fil, vänligen kontrollera filens rättigheter',
        'Error while restoring database:' => 'Fel vid återställning av databas :',
        'Error while restoring files, tar file does not exist' => 'Fel vid återställning av fil, tar filen finns inte',
        'Error while restoring files, tar file is not correct' => 'Fel vid återställning av filer, tar filerna är inte riktiga',
        'Error while restoring files, tar file truncated' => 'Fel vid återställning av filer, tar fil trunkerad',
        'Error while restoring files, unable to create directory' => 'Fel vid återställning av filer, kunde inte skapa katalog',
        'Error while restoring files, unable to create file' => 'Fel vid återställning av filer, kunde inte skapa fil',
        'Error while restoring files, unable to open tar file' => 'Fel vid återställning av filer, kunde inte öppna tar filen',
        'Error while restoring files, unable to read data in tar file' => 'Fel vid återskapande av filer, kunde inte läsa data i tar filen',
        'Error while restoring files, unable to read name file in tar file' => 'Fel vid återställning av filer, kunde inte läsa namnet på filen i tar filen',
        'Error while restoring files, unable to read tar file' => 'Fel vid återställning av filer, kunde inte läsa tar filen',
        'Error while restoring files, unable to write file' => 'Fel vid återställning av filer, kunde inte skriva till fil',
        'Error while restoring files: No backup file found' => 'Fel vid återställning av filer : Ingen återställnings fil hittades',
        'Error while retrieving Prestashop version, unable to find the version' => 'Fel när du hämtar Prestashop version, inte kan hitta versionen',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'Fel när du hämtar Prestashop version, inte kan läsa filen med informationen',
        'Error while retrieving virtual uri:' => 'Fel vid hämtning av virtuell URL:',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'Fel vid uppdatering av .htaccess fil, kunde inte läsa .htaccess filen',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'Fel vid uppdatering av .htaccess fil, kunde inte spara .htaccess filen',
        'Error while updating defines, defines file does not exist' => 'Fel vid uppdatering av definieringen, definieringens fil finns inte',
        'Error while updating defines, unable to read defines file' => 'Fel vid uppdatering av definieringen, kunde inte läsa fil definieringen',
        'Error while updating defines, unable to save defines file' => 'Fel vid uppdatering av definieringen, kunde inte spara fil definieringen',
        'Error while updating links:' => 'Fel vid uppdatering av länkar :',
        'Error while updating settings, settings file does not exist' => 'Fel vid uppdatering av inställningar, filen för  inställningar finns inte',
        'Error while updating settings, unable to find the prefix' => 'Fel vid uppdatering av inställningar, det gick inte att hitta prefixet',
        'Error while updating settings, unable to read settings file' => 'Fel vid uppdatering av inställningar, kunde inte läsa filens inställningar',
        'Error while updating settings, unable to save settings file' => 'Fel vid uppdatering av inställningar, kunde inte spara filens inställningar',
        'Error while updating super admin password:' => 'Fel vid uppdatering av superadmin lösenord :',
        'Error while updating URL configuration:' => 'Fel vid uppdatering av URL konfiguration :',
        'Error, the backup is no longer readable' => 'Fel, säkerhetskopieringen är inte längre läsbar',
        'Error, the backup is no longer seekable' => 'Fel, säkerhetskopieringen är inte längre sökbar',
        'Error, the compressed backup file has a compression issue' => 'Fel, den komprimerade säkerhetskopian har ett komprimeringsproblem',
        'Error, the compressed backup file is no longer readable' => 'Fel är den komprimerade säkerhetskopian inte längre läsbar',
        'Error, the compressed backup file is no longer seekable' => 'Fel är den komprimerade säkerhetskopian inte längre sökbar',
        'Error, the file is no longer readable' => 'Fel, filen är inte längre läsbar',
        'Error, the file is no longer seekable' => 'Fel, filen är inte längre sökbar',
        'Error:' => 'Fel :',
        'Error: Unable to connect to the database' => 'Fel : Kunde inte koppla upp till databasen',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'Fel. Maximal körtid för din server uppnådd (%d s). Vänligen öka den här tiden på din server för att återställningen ska slutföras. För det mesta behöver du öka PHP max_execution_time. Du kan också aktivera alternativet "Intermediate Renewal" för att kringgå denna begränsning.',
        'Error. The config file cannot be opened' => 'Fel. Konfigureringsfilen kan inte öppnas',
        'Error. The config file cannot be rewind' => 'Fel. Konfigureringsfilen kan inte spola tillbaka',
        'Error. There is an error with the "Intermediate renewal" option' => 'Fel. Det finns ett fel med alternativet "Intermediate Renewal"',
        'Execution failed on:' => 'Utförande misslyckades på :',
        'Extract dump' => 'Extrakt dumpa',
        // F
        'File access rights' => 'Filåtkomst rättigheter',
        'File access rights are not valid (should be between 600 and 777).' => 'Filåtkomsträttigheter är inte giltiga (bör vara mellan 600 och 777).',
        'File access rights, default: 644' => 'Filåtkomst rättigheter, standard : 644',
        'FINISH ! Your backup was restored with success !' => 'KLART ! Din backup återställdes med lyckat resultat !',
        'First name' => 'Förnamn',
        'Folder access rights' => 'Mapp åtkomsträttigheter',
        'Folder access rights are not valid (should be between 600 and 777).' => 'Tillgångsrättigheter för mappar är inte giltiga (bör vara mellan 600 och 777).',
        'Folder access rights, default: 755' => 'Mapp rättigheter, standard : 755',
        // G
        'Get database file' => 'Hämta databasfilen',
        'Go to your shop' => 'Gå till din butik',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'Om det finns fel i den ursprungliga databasen och återställningen misslyckas på SQL INSERT-begäran kan detta alternativ kringgå fel. Detta är särskilt användbart vid felet "Duplicate entry".',
        'Ignore SQL errors' => 'Ignorera SQL-fel',
        'Intermediate renewal' => 'Mellanförnyelse',
        // L
        'Last name' => 'Efternamn',
        // M
        'Message' => 'Meddelande',
        // N
        'No' => 'Nej',
        'No database restoration, as wanted' => 'Ingen databas återställdes, som du valt',
        'No extraction, as wanted' => 'Ingen extraktion, som ville',
        'No files restoration, as wanted' => 'Inga filer återställdes, som du valt',
        'Nt Restoration' => 'Nt Återställning',
        'Nt Restoration for Prestashop' => 'Nt Återställning för Prestashop',
        // O
        'on request:' => 'på förfrågan :',
        'Only database will be restored' => 'Bara databasen kommer att återställas',
        'Options' => 'Alternativ',
        // P
        'Password' => 'Lösenord',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'Vänligen se till att din PHP-version (%1$s) är kompatibel med din Prestashop-version (%2$s). Du kan kontrollera det på:',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'Prestashop .htaccess fil verkar innehålla ändringar från Prestashop originalfilen. Vänligen se till att filen fortfarande är giltig för denna nya installation.',
        // Q
        'Query failed on:' => 'Fråga misslyckades på :',
        // R
        'Reconnection:' => 'Återanslutning:',
        'Refresh' => 'Uppdatera',
        'Replace .htaccess' => 'Byt ut .htaccess',
        'Restoration failed' => 'Återställningen misslyckades',
        'Restoration failed on line n°' => 'Återställning misslyckades på rad n°',
        'Restoring backup...' => 'Återställer backup...',
        'Restoring database:' => 'Återställer databas :',
        'Restoring files:' => 'Återställer filer:',
        'Restoring files...' => 'Återställer filer…',
        // S
        'Shop email is not valid.' => 'Butikens E-post är inte giltig.',
        'Site Maintenance' => 'Underhåll',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Ledsen för besväret men vi utför visst underhåll för tillfället',
        'Start restoration' => 'Starta återställningen',
        'Starting restoration' => 'Startar återställningen',
        'Super admin email is not valid.' => 'Super admins E-post är inte giltig.',
        'Super admin first name is not valid.' => 'Super admin förnamn är inte giltigt.',
        'Super admin last name is not valid.' => 'Super admin efternamn är inte giltigt.',
        'Super admin password is not valid.' => 'Superadmin lösenordet är inte giltigt.',
        // T
        'Table prefix' => 'Tabellprefix',
        'The lock could not be deleted.' => 'Låset kunde inte raderas.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => 'Återställningen utförs med avbrott om serverns timeout inte är tillräckligt stor.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'För att utföra en fullständig restaurering behöver manuset lite tid. Om servern slutar skriptet före slutet är restaureringen inte klar. Om du får ett fel, aktivera det här alternativet och öka din max_execution_time PHP.',
        // U
        'Unable to connect to the database' => 'Kunde inte koppla upp till databasen',
        'Unable to open SQL file' => 'Kunde inte öppna SQL fil',
        'Updating .htaccess file...' => 'Uppdatera .htaccess fil...',
        'Updating defines...' => 'Uppdaterar och definierar...',
        'Updating links...' => 'Uppdatera länkar...',
        'Updating settings...' => 'Uppdatera inställningar…',
        'Updating URL configuration...' => 'Uppdaterar URL konfiguration...',
        'Useful if mysql is limited and cannot restore the database' => 'Användbar om mysql är begränsad och kan inte återställa databasen',
        // W
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'Vi kan inte se till att din PHP-version (%s) är kompatibel med din Prestashop-version. Du kan kontrollera det på:',
        'We will be back soon!' => 'Vi kommer att vara tillbaka snart!',
        // Y
        'Yes' => 'Ja',
        'You can provide a new shop contact email' => 'Du kan tillhandahålla en ny e-post för butikens kontakt',
        'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s' => 'Din Prestashop-version (%1$s) behöver en PHP-version mellan %2$s och %3$s. Din nuvarande PHP-version är %4$s',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Din server arkitektur (32 bitar) inte kan köra mellanliggande förnyelser på stora komprimerade filer (> 2GB) så du måste antingen se till att din server timeout är tillräckligt stor (så att restaureringen kan nå slutet av sin process) eller packa upp din säkerhetskopia för att använda en .tar istället för en .tar.gz (du kan skapa säkerhetskopior som .tar istället för .tar.gz i modulen med hjälp av det avancerade alternativet "Komprimera inte säkerhetskopiering")',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Din server arkitektur system (Windows) inte kan köra mellanliggande förnyelser på stora komprimerade filer (> 2GB) så du måste antingen se till att din server timeout är tillräckligt stor (så att restaureringen kan nå slutet av sin process) eller packa upp din backup för att använda en .tar istället för en .tar.gz (du kan skapa säkerhetskopior som .tar istället för .tar.gz i modulen genom att använda det avancerade alternativet "Do not compress")',
    ),
    'zh-tw' => array(
        ':' => ':',
        // A
        'Attempt to disable server timeout' => '不要嘗試關閉 Server Timeout',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => '備份檔案太大，過程無法精確顯示，但是目前運作一切良好',
        // C
        'Change access rights' => '改變連結權限',
        'Change database table prefix' => '改變資料庫資料表前綴',
        'Change folders and files access rights' => '改變資料夾以及檔案的連結權限',
        'Change shop email' => '改變商店的電子郵件',
        'Change table prefix' => '改變資料表前綴',
        'Changing email shop...' => '正在建立商店的電子郵件...',
        'Changing table prefix...' => '正在改變資料表前綴...',
        'Clean' => '清理',
        'Create a new super admin' => '建立一個新的超級管理員',
        'Create super admin' => '建立超級管理員',
        'Creating super admin...' => '正在建立超級管理員...',
        // D
        'Database connection parameters' => '資料庫連線參數',
        'Database Host server' => 'Database 主機',
        'Database Host server:' => 'Database 主機 :',
        'Database login' => '資料庫登入',
        'Database name' => '資料庫名稱',
        'Database name:' => '資料庫名稱 :',
        'Database name is not valid.' => '資料庫名稱無效',
        'Database password' => '資料庫密碼',
        'Database server is not valid.' => '資料庫伺服器無效',
        'Database table prefix' => '資料庫資料表前綴',
        'Database User' => 'Database 使用者',
        'Database User:' => 'Database 使用者 :',
        'Database user is not valid.' => '資料庫使用者無效',
        'Delete all customers emails. Useful for dev local test shop' => '刪除全部的顧客電子郵件',
        'Delete backup file after restoration' => '在還原之後，刪除備份檔案',
        'Delete customers emails' => '刪除顧客電子郵件',
        'Deleting customers email...' => '正在刪除顧客電子郵件...',
        'Disable "NoAutoValueOnZero" SQL mode' => '關閉 "NoAutoValueOnZero" SQL 模式',
        'Disable cache' => '關閉快取',
        'Disable cache mode. Useful if cache was used and no cache is available now' => '關閉快取模式，當之前有使用，但現在沒有時，請選擇關閉',
        'Disable media servers' => '關閉媒體伺服器',
        'Disable media servers. Useful if media servers were used and there are not available now' => '關閉媒體伺服器，當之前有使用，但現在沒有時，請選擇關閉',
        'Disable ModPagespeed' => '關閉 ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => '關閉 ModPagespeed，當之前有使用，但現在沒有時，請選擇關閉',
        'Disable SSL' => '關閉 SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => '關閉 SSL 模式，當原本商店有使用SSL時，現在沒有時，有用',
        'Disabling media servers...' => '正在關閉媒體伺服器...',
        'Disabling SSL...' => '正在關閉 SSL...',
        'Do not restore database' => '不要還原資料庫',
        'Do not restore database. Useful for testing' => '不要還原資料庫',
        'Do not restore files' => '不要還原檔案',
        'Do not restore files. Useful for testing' => '不要還原檔案',
        // E
        'Email' => '電子郵件',
        'Enable Mode Dev' => '啟用開發者模式',
        'Enable Mode Dev. Useful for developers' => '啟用開發者模式，這對開發者是有用的',
        'Error while changing email shop:' => '改變商店的電子郵件時，發生錯誤 :',
        'Error while changing table prefix:' => '改變資料表前綴時，發生錯誤 :',
        'Error while checking existence of table' => '檢查資料表時，發生錯誤',
        'Error while creating super admin:' => '建立超級管理員時，發生錯誤 :',
        'Error while deleting customers emails:' => '刪除顧客電子郵件時，發生錯誤 :',
        'Error while deleting mailalert customers emails:' => '刪除郵件提醒顧客電子郵件時，發生錯誤:',
        'Error while disabling media servers:' => '關閉媒體伺服器時，發生錯誤 :',
        'Error while disabling SSL:' => '關閉 SSL 時，發生錯誤 :',
        'Error while getting employee by email:' => '透過電子郵件建立員工資料時，發生錯誤 :',
        'Error while getting likely understood language:' => '取得已知語言時，發生錯誤 :',
        'Error while renaming .htaccess file, please check file access right' => '重新命名 .htaccess 時，發生錯誤，請確認檔案存取權限',
        'Error while restoring database:' => '還原資料庫時發生錯誤：',
        'Error while restoring files, tar file does not exist' => '還原備份檔案時，發生錯誤， tar檔案不存在',
        'Error while restoring files, tar file is not correct' => '還原備份檔案時，發生錯誤， tar檔案不正確',
        'Error while restoring files, tar file truncated' => '還原備份檔案時，發生錯誤， tar檔案不完整',
        'Error while restoring files, unable to create directory' => '還原備份檔案時，發生錯誤，無法建立目錄',
        'Error while restoring files, unable to create file' => '還原備份檔案時，發生錯誤，無法建立檔案',
        'Error while restoring files, unable to open tar file' => '還原備份檔案時，發生錯誤，無法打開 tar檔案',
        'Error while restoring files, unable to read data in tar file' => '還原備份檔案時，發生錯誤，無法讀取 tar檔案裡的資料',
        'Error while restoring files, unable to read name file in tar file' => '還原備份檔案時，發生錯誤，無法讀取 tar檔案裡的檔案名稱',
        'Error while restoring files, unable to read tar file' => '還原備份檔案時，發生錯誤，無法讀取 tar檔案',
        'Error while restoring files, unable to write file' => '還原備份檔案時，發生錯誤，無法寫入檔案',
        'Error while restoring files: No backup file found' => '還原備份檔案時，發生錯誤，沒有找到備份檔案',
        'Error while retrieving virtual uri:' => '取得虛擬 URI 時，發生錯誤 :',
        'Error while updating .htaccess file, unable to read .htaccess file' => '更新 .htaccess 時，發生錯誤，無法讀取 .htaccess 檔案',
        'Error while updating .htaccess file, unable to save .htaccess file' => '更新 .htaccess 時，發生錯誤，無法儲存 .htaccess 檔案',
        'Error while updating defines, defines file does not exist' => '更新定義時，發生錯誤，定義檔案不存在',
        'Error while updating defines, unable to read defines file' => '更新定義時，發生錯誤，無法讀取定義檔案',
        'Error while updating defines, unable to save defines file' => '更新定義時，發生錯誤，無法儲存定義檔案',
        'Error while updating links:' => '更新連結時，發生錯誤 :',
        'Error while updating settings, settings file does not exist' => '更新設定時，發生錯誤，設定檔案並不存在',
        'Error while updating settings, unable to read settings file' => '更新設定時，發生錯誤，無法讀取設定檔案',
        'Error while updating settings, unable to save settings file' => '更新設定時，發生錯誤，無法儲存設定檔案',
        'Error while updating super admin password:' => '更新超級管理員密碼時，發生錯誤 :',
        'Error while updating URL configuration:' => '更新 URL 設定時，發生錯誤 :',
        'Error:' => '錯誤 :',
        'Error: Unable to connect to the database' => '錯誤：無法連接資料庫',
        'Execution failed on:' => '執行時，發生錯誤在：',
        // F
        'File access rights' => '檔案連結權限',
        'File access rights, default: 644' => '檔案連結權限，預設 : 644',
        'FINISH ! Your backup was restored with success !' => '備份已經成功還原完成！',
        'First name' => '名字',
        'Folder access rights' => '資料夾連結權限',
        'Folder access rights, default: 755' => '資料夾連結權限，預設 : 755',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => '如果原始數據庫中有錯誤，並且對SQL INSERT請求的還原失敗，則此選項可以繞過錯誤。 這對於“Duplicate entry”錯誤特別有用。',
        'Ignore SQL errors' => '忽略SQL錯誤',
        // L
        'Last name' => '姓氏',
        // M
        'Message' => '訊息',
        // N
        'No' => '否',
        'No database restoration, as wanted' => '如同所設定的，資料庫並未被還原',
        'No files restoration, as wanted' => '如同所設定的，檔案並未被還原',
        'Nt Restoration' => 'Nt Restoration',
        'Nt Restoration for Prestashop' => 'Nt Restoration for Prestashop',
        // O
        'on request:' => '根據要求 :',
        'Only database will be restored' => '只有資料庫將被還原',
        'Options' => '選項',
        // P
        'Password' => '密碼',
        // Q
        'Query failed on:' => '查詢時，發生錯誤在：',
        // R
        'Refresh' => '重新整理',
        'Restoration failed on line n°' => '還原失敗在 Line n°',
        'Restoring backup...' => '正在還原備份中...',
        'Restoring database:' => '正在還原資料庫 :',
        'Restoring files:' => '還原檔案中:',
        'Restoring files...' => '還原檔案中...',
        // S
        'Shop email is not valid.' => '商店電子郵件無效',
        'Site Maintenance' => '網站維護模式',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => '很抱歉造成您的不便，目前網站正在維護中',
        'Start restoration' => '開始還原',
        'Starting restoration' => '正在還原中',
        'Super admin email is not valid.' => '超級管理元的電子郵件無效',
        'Super admin first name is not valid.' => '超級管理員的名字無效',
        'Super admin last name is not valid.' => '超級管理員的姓氏無效',
        'Super admin password is not valid.' => '超級管理員的密碼無效',
        // T
        'Table prefix' => '資料表前綴',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => '進行完整還原，執行腳本需要一點時間。如果伺服器在完成之前，停止執行腳本，還原將不會完整。如果您看到錯誤訊息，啟用這個選項，並增加 PHP max_execution_time 數值。',
        // U
        'Unable to connect to the database' => '無法連接資料庫',
        'Unable to open SQL file' => '無法開啟 SQL 檔案',
        'Updating defines...' => '正在更新定義...',
        'Updating links...' => '正在更新連結...',
        'Updating settings...' => '正在更新設定...',
        'Updating URL configuration...' => '正在更新 URL 設定...',
        'Useful if mysql is limited and cannot restore the database' => '如果 mysql是受到限制的，無法更新資料庫時，這是有用的',
        // W
        'We will be back soon!' => '網站很快就會再上線，請耐心等候！',
        // Y
        'Yes' => '是',
        'You can provide a new shop contact email' => '您可以提供一個新的商店電子郵件',
    ),
    'zh-cn' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => '已在服务器上检测到 .htaccess 文件。这可能会阻止您的网站在还原后正常工作。检测到的 .htaccess 文件是否应替换为备份？',
        'Attempt to disable server timeout' => '尝试禁用服务器超时',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => '备份文件很大，进度无法精确显示，但是一切运行良好',
        // C
        'Change access rights' => '更改访问权限',
        'Change database table prefix' => '更改数据库表前缀',
        'Change folders and files access rights' => '更改文件夹和文件访问权限',
        'Change shop email' => '更改商店电子邮件',
        'Change table prefix' => '更改资料表前缀',
        'Changing email shop...' => '正在更改电子邮件商店...',
        'Changing table prefix...' => '正在更改资料表前缀...',
        'Clean' => '清理',
        'Clean database before restore' => '还原前清理数据库',
        'Clean files before restore' => '还原前清理文件',
        'Cleaning database before restoration...' => '还原前清理数据库...',
        'Cleaning files before restoration...' => '还原前正在清理文件...',
        'Create a new super admin' => '创建一个新的超级管理员',
        'Create super admin' => '创建超级管理员',
        'Creating super admin...' => '正在创建超级管理员...',
        'Current timeout: %d secondes' => '当前超时：%d 秒',
        // D
        'Database connection parameters' => '数据库连接参数',
        'Database Host server' => 'Database 主机服务器',
        'Database Host server:' => 'Database 主机服务器:',
        'Database login' => '数据库登录',
        'Database name' => '数据库名称',
        'Database name:' => '数据库名称:',
        'Database name is not valid.' => '数据库名称无效。',
        'Database password' => '数据库密码',
        'Database server address. You can indicate the port by adding \':\' after the IP' => '数据库服务器地址。您可以通过在 IP 后添加"："来指示端口',
        'Database server is not valid.' => '数据库服务器无效。',
        'Database table prefix' => '数据库资料表前缀',
        'Database User' => 'Database 用户',
        'Database User:' => 'Database 用户:',
        'Database user is not valid.' => '数据库用户无效。',
        'Decompressing backup' => '解压缩备份',
        'Decompressing backup part' => '解压缩备份部件',
        'Delete all customers emails. Useful for dev local test shop' => '删除所有客户电子邮件。可用于开发本地测试商店',
        'Delete all datas in database before restoration' => '在还原之前删除数据库中的所有数据',
        'Delete all files and directories before restoration' => '在还原之前删除所有文件和目录',
        'Delete backup file after restoration' => '在还原之后删除备份文件',
        'Delete customers emails' => '删除客户电子邮件',
        'Delete lock' => '删除锁',
        'Deleting customers email...' => '正在删除客户电子邮件...',
        'Disable "NoAutoValueOnZero" SQL mode' => '禁用"NoAutoValueOnZero" SQL 模式',
        'Disable cache' => '禁用缓存',
        'Disable cache mode. Useful if cache was used and no cache is available now' => '禁用缓存模式。如果使用了缓存，并且现在没有可用的缓存，则非常有用',
        'Disable media servers' => '禁用媒体服务器',
        'Disable media servers. Useful if media servers were used and there are not available now' => '禁用媒体服务器。如果媒体服务器已使用且现在不可用，则非常有用',
        'Disable ModPagespeed' => '禁用 ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => '禁用 ModPagespeed。如果使用 ModPagespeed，并且现在不可用，则非常有用',
        'Disable SSL' => '禁用 SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => '禁用 SSL 模式。如果使用了 SSL 且现在没有可用的 SSL，则非常有用',
        'Disabling media servers...' => '正在禁用媒体服务器...',
        'Disabling SSL...' => '正在禁用 SSL...',
        'Do not extract database' => '不要提取数据库',
        'Do not extract database. Only if your database is already extracted' => '不要提取数据库。仅当数据库已提取时',
        'Do not restore database' => '不要还原数据库',
        'Do not restore database. Useful for testing' => '不要还原数据库。测试时有用',
        'Do not restore files' => '不要还原文件',
        'Do not restore files. Useful for testing' => '不要还原文件。测试时有用',
        'Duration of intermediate renewal.' => '中间续订的持续时间。',
        'Duration of intermediate renewal:' => '中间续订的持续时间:',
        // E
        'Email' => '电子邮件',
        'Enable Mode Dev' => '启用开发模式',
        'Enable Mode Dev. Useful for developers' => '启用开发模式. 对开发人员有用',
        'Error while changing email shop:' => '更改电子邮件商店时出错：',
        'Error while changing table prefix:' => '更改资料表前缀时出错：',
        'Error while checking existence of table' => '检查资料表存在时出错',
        'Error while cleaning datas:' => '清理数据时出错：',
        'Error while creating super admin:' => '创建超级管理员时出错：',
        'Error while deleting customers emails:' => '删除客户电子邮件时出错：',
        'Error while deleting mailalert customers emails:' => '删除邮件警报客户电子邮件时出错：',
        'Error while disabling media servers:' => '禁用媒体服务器时出错：',
        'Error while disabling SSL:' => '禁用 SSL 时出错：',
        'Error while getting database file: No backup file found' => '获取数据库文件时出错：未找到备份文件',
        'Error while getting employee by email:' => '通过电子邮件获取员工资料时出错：',
        'Error while getting likely understood language:' => '获取可能理解的语言时出错：',
        'Error while renaming .htaccess file, please check file access right' => '重命名 .htaccess 文件时出错，请检查文件访问权限',
        'Error while restoring database:' => '还原数据库时出错：',
        'Error while restoring files, tar file does not exist' => '还原文件时出错，tar 文件不存在',
        'Error while restoring files, tar file is not correct' => '还原文件时出错，tar 文件不正确',
        'Error while restoring files, tar file truncated' => '还原文件时出错，tar 文件被截断',
        'Error while restoring files, unable to create directory' => '还原文件时出错，无法创建目录',
        'Error while restoring files, unable to create file' => '还原文件时出错，无法创建文件',
        'Error while restoring files, unable to open tar file' => '还原文件时出错，无法打开 tar 文件',
        'Error while restoring files, unable to read data in tar file' => '还原文件时出错，无法读取 tar 文件中的数据',
        'Error while restoring files, unable to read name file in tar file' => '还原文件时出错，无法读取 tar 文件中的名称文件',
        'Error while restoring files, unable to read tar file' => '还原文件时出错，无法读取 tar 文件',
        'Error while restoring files, unable to write file' => '还原文件时出错，无法写入文件',
        'Error while restoring files: No backup file found' => '还原文件时出错：未找到备份文件',
        'Error while retrieving virtual uri:' => '检索虚拟 uri 时出错：',
        'Error while updating .htaccess file, unable to read .htaccess file' => '更新 .htaccess 文件时出错，无法读取 .htaccess 文件',
        'Error while updating .htaccess file, unable to save .htaccess file' => '更新 .htaccess 文件时出错，无法保存 .htaccess 文件',
        'Error while updating defines, defines file does not exist' => '更新定义时出错，定义文件不存在',
        'Error while updating defines, unable to read defines file' => '更新定义时出错，无法读取定义文件',
        'Error while updating defines, unable to save defines file' => '更新定义时出错，无法保存定义文件',
        'Error while updating links:' => '更新链接时出错：',
        'Error while updating settings, settings file does not exist' => '更新设置时出错，设置文件不存在',
        'Error while updating settings, unable to read settings file' => '更新设置时出错，无法读取设置文件',
        'Error while updating settings, unable to save settings file' => '更新设置时出错，无法保存设置文件',
        'Error while updating super admin password:' => '更新超级管理员密码时出错：',
        'Error while updating URL configuration:' => '更新 URL 配置时出错：',
        'Error, the backup is no longer readable' => '错误，备份不再可读',
        'Error, the backup is no longer seekable' => '错误，备份不再可搜索',
        'Error, the compressed backup file has a compression issue' => '错误，压缩的备份文件存在压缩问题',
        'Error, the compressed backup file is no longer readable' => '错误，压缩的备份文件不再可读',
        'Error, the compressed backup file is no longer seekable' => '错误，压缩的备份文件不再可搜索',
        'Error, the file is no longer readable' => '错误，文件不再可读',
        'Error, the file is no longer seekable' => '错误，文件不再可搜索',
        'Error:' => '错误 :',
        'Error: Unable to connect to the database' => '错误：无法连接数据库',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => '错误。已达到服务器的最大运行时间 （%d s）。请在服务器上增加此时间，以便完成还原。大多数时候，您需要增加PHPmax_execution_time。您还可以启用"中间续订"选项以绕过此限制。',
        'Error. The config file cannot be opened' => '错误。无法打开配置文件',
        'Error. The config file cannot be rewind' => '错误。配置文件不能倒带',
        'Error. There is an error with the "Intermediate renewal" option' => '错误。"中间续订"选项出错',
        'Execution failed on:' => '执行失败：',
        'Extract dump' => '提取转储',
        // F
        'File access rights' => '文件访问权限',
        'File access rights are not valid (should be between 600 and 777).' => '文件访问权限无效（应介于 600 和 777 之间）。',
        'File access rights, default: 644' => '文件访问权限，默认值： 644',
        'FINISH ! Your backup was restored with success !' => '完成！您的备份已成功还原！',
        'First name' => '名字',
        'Folder access rights' => '文件夹访问权限',
        'Folder access rights are not valid (should be between 600 and 777).' => '文件夹访问权限无效（应介于 600 和 777 之间）。',
        'Folder access rights, default: 755' => '文件夹访问权限，默认值： 755',
        // G
        'Get database file' => '获取数据库文件',
        'Go to your shop' => '去您的商店',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => '如果原始数据库中有错误，并且对SQL INSERT的请求还原失败，则此选项可以绕过错误。 这对于“Duplicate entry”错误特别有用。',
        'Ignore SQL errors' => '忽略SQL错误',
        'Intermediate renewal' => '中间续订',
        // L
        'Last name' => '姓氏',
        // M
        'Message' => '消息',
        // N
        'No' => '无',
        'No database restoration, as wanted' => '无需根据需要进行数据库还原',
        'No extraction, as wanted' => '无需提取，如所想',
        'No files restoration, as wanted' => '没有文件还原，如需要',
        'Nt Restoration' => 'Nt 还原',
        'Nt Restoration for Prestashop' => '为 Prestashop Nt还原',
        // O
        'on request:' => '根据要求 :',
        'Only database will be restored' => '将仅还原数据库',
        'Options' => '选项',
        // P
        'Password' => '密码',
        // Q
        'Query failed on:' => '查询失败：',
        // R
        'Reconnection:' => '重新连接：',
        'Refresh' => '刷新',
        'Replace .htaccess' => '替换 .ht 访问',
        'Restoration failed' => '还原失败',
        'Restoration failed on line n°' => '还原失败在行 n°',
        'Restoring backup...' => '正在还原备份中...',
        'Restoring database:' => '正在还原数据库 :',
        'Restoring files:' => '正在还原文件中:',
        'Restoring files...' => '正在还原文件中...',
        // S
        'Shop email is not valid.' => '商店电子邮件无效。',
        'Site Maintenance' => '网站维护',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => '很抱歉给您带来不便，目前网站正在维护中',
        'Start restoration' => '开始还原',
        'Starting restoration' => '正在启动还原',
        'Super admin email is not valid.' => '超级管理员电子邮件无效。',
        'Super admin first name is not valid.' => '超级管理员名字无效。',
        'Super admin last name is not valid.' => '超级管理员姓氏无效。',
        'Super admin password is not valid.' => '超级管理员密码无效。',
        // T
        'Table prefix' => '资料表前缀',
        'The lock could not be deleted.' => '无法删除锁。',
        'The restore will be performed with interruption if the server timeout is not large enough.' => '如果服务器超时不够大，将中断执行还原。',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => '要执行完整还原，脚本需要一些时间。如果服务器在脚本结束之前停止该脚本，则还原未完成。如果出现错误，请启用此选项并增加 PHP max_execution_time。',
        // U
        'Unable to connect to the database' => '无法连接数据库',
        'Unable to open SQL file' => '无法打开 SQL 文件',
        'Updating .htaccess file...' => '正在更新 .htaccess 文件...',
        'Updating defines...' => '正在更新定义...',
        'Updating links...' => '正在更新链接...',
        'Updating settings...' => '正在更新设置...',
        'Updating URL configuration...' => '正在更新 URL 配置...',
        'Useful if mysql is limited and cannot restore the database' => '如果 mysql 受限且无法还原数据库，则很有用',
        // W
        'We will be back soon!' => '网站很快就会再上线，请耐心等待！',
        // Y
        'Yes' => '是的',
        'You can provide a new shop contact email' => '您可以提供新的商店联系人电子邮件',
    ),
	'ru' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'На сервере в дереве проекта обнаружен служебный файл .htaccess. Замена этого файла архивным (если они разные), может привести к изменению сценария работы сайта. Заменить этот файл?',
        'Attempt to disable server timeout' => 'Попытка отключить тайм-аут сервера',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'Файл архива очень большой. Информация на прогресс-баре может отображаться неправильно.',
        // C
        'Change access rights' => 'Изменение прав доступа к (файлу/каталогу)',
        'Change database table prefix' => 'Изменение префикса таблицы Базы Данных',
        'Change folders and files access rights' => 'Изменение катологов и прав доступа к файлам',
        'Change shop email' => 'Изменение Shop e-mail',
        'Change table prefix' => 'Изменение префикса таблицы',
        'Changing email shop...' => 'Изменение Shop e-mail...',
        'Changing table prefix...' => 'Изменение префикса таблицы...',
        'Clean' => 'Очистка',
        'Clean database before restore' => 'Очистка Базы Данных перед восстановлением',
        'Clean files before restore' => 'Очистка дерева проекта перед восстановлением',
        'Cleaning database before restoration...' => 'Очистка Базы Данных перед восстановлением...',
        'Cleaning files before restoration...' => 'Очистка дерева проекта перед восстановлением...',
        'Create a new super admin' => 'Создание нового super admin\'а',
        'Create super admin' => 'Создание super admin\'а',
        'Creating super admin...' => 'Создание super admin\'а...',
        'Current timeout: %d secondes' => 'Текущий тайм-аут: %d секунд',
        // D
        'Database connection parameters' => 'Параметры доступа к серверу Базы Данных (БД)',
        'Database Host server' => 'Database Сервер-хост',
        'Database Host server:' => 'Database Сервер-хост:',
        'Database login' => 'Логин сервера БД',
        'Database name' => 'Имя БД',
        'Database name:' => 'Имя БД:',
        'Database name is not valid.' => 'Неправильное имя БД',
        'Database password' => 'Пароль доступа к серверу БД',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'Адрес сервера Базы Данных. Если номер порта сервера БД отличается от номера "по умолчанию", то после IP адреса следует указать и порт как "ip_address:port_number"',
        'Database server is not valid.' => 'Сервер БД недоступен',
        'Database table prefix' => 'Префикс таблицы Базы Данных',
        'Database User' => 'Database Пользователь',
        'Database User:' => 'Database Пользователь:',
        'Database user is not valid.' => 'Неправильный пользователь БД',
        'Decompressing backup' => 'Декомпрессия файла архива',
        'Decompressing backup part' => 'Декомпрессия файла фрагментированного архива',
        'Delete all customers emails. Useful for dev local test shop' => 'Удаление всех e-mail клиентов. Может быть полезно при тестировании',
        'Delete all datas in database before restoration' => 'Очистка Базы Данных перед восстановлением их архива',
        'Delete all files and directories before restoration' => 'Очистка',
        'Delete backup file after restoration' => 'Удалите резервный файл после восстановления',
        'Delete customers emails' => 'Удаление электронных писем клиентов',
        'Delete lock' => 'Удалить блокировку',
        'Deleting customers email...' => 'Удаление электронных писем клиентов...',
        'Disable "NoAutoValueOnZero" SQL mode' => 'Отключить "NoAutoValueOnZero" SQL mode',
        'Disable cache' => 'Выключить кеширование',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'Выключить режим кеширования. Может быть полезно, если кеширование не выполняется',
        'Disable media servers' => 'Отключить медиасервисы',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'Отключить медиасервисы. Может быть полезно, если ожидаемые медиасервисы окажутся недоступны',
        'Disable ModPagespeed' => 'Отключить ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'Отключить ModPagespeed. Полезно, если ModPagespeed использовался, но не доступен сейчас',
        'Disable SSL' => 'Отключить SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'Отключить режим использования SSL. Может быть полезно, если SSL не доступен',
        'Disabling media servers...' => 'Отключение медиасервисов...',
        'Disabling SSL...' => 'Отказ от SSL',
        'Do not extract database' => 'Не извлекать Базу Данных',
        'Do not extract database. Only if your database is already extracted' => 'Не извлекать Базу Данных. Только в том случае, если ваша база данных уже извлечена',
        'Do not restore database' => 'Не восстанавливать Базу Данных',
        'Do not restore database. Useful for testing' => 'Не восстанавливать Базу Данных',
        'Do not restore files' => 'Не восстанавливать файлы',
        'Do not restore files. Useful for testing' => 'Не восстанавливать файлы',
        'Duration between progress refresh' => 'Продолжительность между обновлением прогресса',
        'Duration between progress refresh:' => 'Продолжительность между обновлением прогресса:',
        'Duration between refresh' => 'Продолжительность между обновлениями',
        'Duration between refresh:' => 'Продолжительность между обновлениями:',
        'Duration of intermediate renewal.' => 'Длина отрезка обнавления прогресс-бара',
        'Duration of intermediate renewal:' => 'Длина отрезка обнавления прогресс-бара:',
        // E
        'Email' => ' электронная почта',
        'Enable Mode Dev' => 'Включить Mode Dev',
        'Enable Mode Dev. Useful for developers' => 'Включить Mode Dev. (для разработчиков)',
        'Error while changing email shop:' => 'Ошибка при изменении e-mail Shop:',
        'Error while changing table prefix:' => 'Ошибка при изменении префикса таблицы:',
        'Error while checking existence of table' => 'Ошибка. Не обнаружена таблица',
        'Error while cleaning datas:' => 'Ошибка очистки данных:',
        'Error while creating super admin:' => 'Ошибка при создании super admin\'а:',
        'Error while deleting customers emails:' => 'Ошибка удаления почтовых сообщений клиентов:',
        'Error while deleting mailalert customers emails:' => 'Ошибка удаления писем-предупреждений клиентов:',
        'Error while disabling media servers:' => 'Ошибка при отключении медиасерверов:',
        'Error while disabling SSL:' => 'Ошибка при отключении SSL:',
        'Error while getting database file: No backup file found' => 'Ошибка доступа к файлу Базы Данных: файл резервного копирования не найден',
        'Error while getting employee by email:' => 'Ошибка при получении employee электронной почтой:',
        'Error while getting likely understood language:' => 'Ошибка выбора языка:',
        'Error while renaming .htaccess file, please check file access right' => 'Ошибка переименования файла .htaccess. Проверьте права доступа к файлу.',
        'Error while restoring database:' => 'Ошибка восстановления Базы Данных:',
        'Error while restoring files, tar file does not exist' => 'Ошибка восстановления файлов. Не найден архивный .tar-файл',
        'Error while restoring files, tar file is not correct' => 'Ошибка восстановления файлов. Архивный .tar-файл возможно испорчен',
        'Error while restoring files, tar file truncated' => 'Ошибка восстановления файлов. Архивный .tar-файл имеет неправильную длину',
        'Error while restoring files, unable to create directory' => 'Ошибка восстановления файлов. Невозможно создать каталог',
        'Error while restoring files, unable to create file' => 'Ошибка восстановления файлов. Невозможно создать файл',
        'Error while restoring files, unable to open tar file' => 'Ошибка восстановления файлов. Невозможно получить доступ к архивному .tar-файлу',
        'Error while restoring files, unable to read data in tar file' => 'Ошибка восстановления  файлов.Невозможно получить доступ на чтение к архивному .tar-файлу',
        'Error while restoring files, unable to read name file in tar file' => 'Ошибка восстановления файлов. Невозможно получить названия файлов в архивном .tar-файле',
        'Error while restoring files, unable to read tar file' => 'Ошибка восстановления файлов. Ошибка чтения архивного .tar-файла',
        'Error while restoring files, unable to write file' => 'Ошибка восстановления файлов. Ошибка записи в архивный .tar-файл',
        'Error while restoring files: No backup file found' => 'Ошибка восстановления файлов. Не найден файл архива',
        'Error while retrieving Prestashop version, unable to find the version' => 'Ошибка при извлечении версии Prestashop, не в состоянии найти версию',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'Ошибка при извлечении версии Prestashop, не в состоянии прочитать файл с информацией',
        'Error while retrieving virtual uri:' => 'Ошибка восстановления виртуального URI:',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'Ошибка обновления файла .htaccess. Файл .htaccess не читается',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'Ошибка обновления файла .htaccess. Невозможно сохранить файл .htaccess ',
        'Error while updating defines, defines file does not exist' => 'Ошибка обновления файла defines. не найден файл defines',
        'Error while updating defines, unable to read defines file' => 'Ошибка обновления файла defines. Ошибка чтения файла defines',
        'Error while updating defines, unable to save defines file' => 'Ошибка обновления файла defines. Ошибка сохранения файла defines',
        'Error while updating links:' => 'Ошибка обновления ссылок:',
        'Error while updating settings, settings file does not exist' => 'Ошибка обновления настроек. Не найден файл настроек',
        'Error while updating settings, unable to find the prefix' => 'Ошибка при обновлении настроек, не удается найти приставку',
        'Error while updating settings, unable to read settings file' => 'Ошибка обновления настроек. Ошибка чтения файла настроек',
        'Error while updating settings, unable to save settings file' => 'Ошибка обновления настроек. Ошибка сохранения файла настроек',
        'Error while updating super admin password:' => 'Ошибка обнавления пароля Super Admin\'а:',
        'Error while updating URL configuration:' => 'Ошибка обнавлеия URL конфигурации:',
        'Error, the backup is no longer readable' => 'Ошибка чтения файла архива',
        'Error, the backup is no longer seekable' => 'Ошибка доступа к файлу архива',
        'Error, the compressed backup file has a compression issue' => 'Ошибка декомпрессии архивного файла',
        'Error, the compressed backup file is no longer readable' => 'Ошибка доступа на чтение к сжатому архивному файлу',
        'Error, the compressed backup file is no longer seekable' => 'Ошибка доступа к сжатому архивному файлу',
        'Error, the file is no longer readable' => 'Ошибка, файл больше не читается',
        'Error, the file is no longer seekable' => 'Ошибка. Невозможно позиционирование внутри файла',
        'Error:' => 'Ошибка:',
        'Error: Unable to connect to the database' => 'Ошибка: Невозможно подключиться к базе данных',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'Ошибка. Исчерпано максимально допустимое время выполнения процедуры восстановления на Вашем сервере (%d s). Пожалуйста, увеличьте это время для завершения восстановления. Обычно достаточно увеличить значение параметра max_execution_time в файле конфигурации PHP. Вы также можете включить опцию "Промежуточное обновление", чтобы обойти это ограничение.',
        'Error. The config file cannot be opened' => 'Ошибка. Не удаётся открыть файл конфигурации',
        'Error. The config file cannot be rewind' => 'Ошибка. Не удаётся пермещаться в файле конфигурации',
        'Error. There is an error with the "Intermediate renewal" option' => 'Ошибка. Исключение при применении опции "Промежуточное обновление"',
        'Execution failed on:' => 'Ошибка выполнения:',
        'Extract dump' => 'Извлечение дампа',
        // F
        'File access rights' => 'Права доступа к файлу',
        'File access rights are not valid (should be between 600 and 777).' => 'Недопустимые права доступа к файлу (должно быть между 600 и 777).',
        'File access rights, default: 644' => 'Права доступа к файлу (по умолчанию: 644)',
        'FINISH ! Your backup was restored with success !' => 'ЗАКОНЧЕНО ! Данные восстановлены успешно !',
        'First name' => 'Имя',
        'Folder access rights' => 'Права доступа к каталогу',
        'Folder access rights are not valid (should be between 600 and 777).' => 'Недопустимые права доступа к каталогу (должно быть между 600 и 777).',
        'Folder access rights, default: 755' => 'Права доступа к каталогу (по умолчанию: 755)',
        // G
        'Get database file' => 'Извлечение файла БазыДанных',
        'Go to your shop' => 'Войдите в свой Shop',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'Если в исходной базе данных есть ошибки и восстановление не выполняется по запросу SQL INSERT, эта опция может обойти ошибки. Это особенно полезно при ошибке "Duplicate entry".',
        'Ignore SQL errors' => 'Игнорировать ошибки SQL',
        'Intermediate renewal' => 'Промежуточное обновление',
        // L
        'Last name' => 'Фамилия',
        // M
        'Message' => 'Сообщение',
        // N
        'No' => 'Нет',
        'No database restoration, as wanted' => 'Восстановление Базы Данных невозможно',
        'No extraction, as wanted' => 'Восстановление невозможно',
        'No files restoration, as wanted' => 'Восстановление файлов невозможно',
        'Nt Restoration' => 'NT восстановление',
        'Nt Restoration for Prestashop' => 'NT Восстановление для Prestashop',
        // O
        'on request:' => 'по запросу:',
        'Only database will be restored' => 'Только База Данных будет восстановлена',
        'Options' => 'Параметры',
        // P
        'Password' => 'Пароль',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'Пожалуйста, убедитесь, что ваша версия PHP (%1$s) совместима с вашей версией Prestashop (%2$s). Вы можете проверить его на:',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'Файл Prestashop .htaccess, кажется, содержит изменения из оригинального файла Prestashop. Пожалуйста, убедитесь, что файл по-прежнему действителен для этой новой установки.',
        // Q
        'Query failed on:' => 'Запрос не удался:',
        // R
        'Reconnection:' => 'Попытка подключения:',
        'Refresh' => 'Обновить',
        'Replace .htaccess' => 'Заменить .htaccess',
        'Restoration failed' => 'Восстановление завершилось с ошибкой',
        'Restoration failed on line n°' => 'Восстановление завершилось с ошибкой на строке n°',
        'Restoring backup...' => 'Восстановление данных из архива...',
        'Restoring database:' => 'Восстановление Базы Данных:',
        'Restoring files:' => 'Восстановление файлов:',
        'Restoring files...' => 'Восстановление файлов...',
        // S
        'Shop email is not valid.' => 'Недействительный Shop e-mail.',
        'Site Maintenance' => 'Обслуживание сайта',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Извините за доставленные неудобства. На сервере, в данный момент, выполняется техническое обслуживание.',
        'Start restoration' => 'Начало процедуры восстановления',
        'Starting restoration' => 'Стартует процедура восстановления',
        'Super admin email is not valid.' => 'Недействительный Super Admin e-mail.',
        'Super admin first name is not valid.' => 'Недопустимое имя для Super Admin\'а.',
        'Super admin last name is not valid.' => 'Недопустимая фамилия для Super Admin\'а.',
        'Super admin password is not valid.' => 'Неверный пароль  для Super Admin\'а.',
        // T
        'Table prefix' => 'Префикс таблицы',
        'The lock could not be deleted.' => 'Невозможно снять блокировку.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => 'Если тайм-аут сервера будет исчерпан, восстановление данных будет прервано.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'Для полного восстановления скрипту требуется некоторое время. Если сервер останавит скрипт до окончания его выполнения, восстановление окажется не завершено. В случае, возникновения такой ошибки , увеличьте значение параметра max_execution_time в файле конфигурации PHP.',
        // U
        'Unable to connect to the database' => 'Невозможно подключиться к базе данных',
        'Unable to open SQL file' => 'Невозможно открыть SQL файл',
        'Updating .htaccess file...' => 'Обновление файла .htaccess ...',
        'Updating defines...' => 'Обновление объявлений...',
        'Updating links...' => 'Обновление ссылок...',
        'Updating settings...' => 'Обновление настроек...',
        'Updating URL configuration...' => 'Обновление конфигурации URL...',
        'Useful if mysql is limited and cannot restore the database' => 'Может быть полезно, в случае если ограничения сервера MySQL не позволяют восстановить Базу Данных',
        // W
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'Мы не можем убедиться, что ваша версия PHP (%s) совместима с вашей версией Prestashop. Вы можете проверить его на:',
        'We will be back soon!' => 'Ожидайте!',
        // Y
        'Yes' => 'Да',
        'You can provide a new shop contact email' => 'Вы можете указать новый  shop contact email',
        'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s' => 'Ваша версия Prestashop (%1$s) нуждается в версии PHP между %2$s и %2$s. Текущая версия PHP %4$s',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Архитектура сервера (32 бита) не может запускать промежуточные обновления на больших сжатых файлах (> 2 ГБ), поэтому вам нужно либо убедиться, что тайм-аут сервера достаточно велик (так что восстановление может достичь конца процесса) или распаковать резервную копию, чтобы использовать .tar вместо .tar.gz (вы можете создавать резервные копии как .tar вместо .tar.gz в модуле, используя расширенный вариант "Не сжимать")',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Ваша система архитектуры сервера (Windows) не в состоянии запустить промежуточные обновления на больших сжатых файлах (> 2 ГБ), так что вам нужно либо убедиться, что ваш сервер тайм-аут достаточно велик (так что восстановление может достичь конца своего процесса) или распаковать резервную копию, чтобы использовать .tar вместо .tar.gz (вы можете создать резервные копии как .tar вместо .tar.gz в модуле, используя расширенный вариант "Не сжимать")',
    ),
    'it' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'A . il file di accesso è stato rilevato sul tuo server. Probabilmente questo proteggerà il tuo  sito di lavoro anche dopo il ripristino. Devi sostituire il file di accesso rilevato dal backup?',
        'Attempt to disable server timeout' => 'Tentativo di disattivare il timeout del server',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'Il file del backup è grande, l\'avanzamento non è accurato ma tutto sta funzionabdo bene',
        // C
        'Change access rights' => 'Cmabia diritto di accesso',
        'Change database table prefix' => 'Cambia la tabella prefissa dell\'archivio',
        'Change folders and files access rights' => 'Cambia i diritti di accesso di file e cartelle',
        'Change shop email' => 'Cambia l\'email del neogozio',
        'Change table prefix' => 'Cambia il prefisso di tabella',
        'Changing email shop...' => 'Sta cambiando l\'email del negozio...',
        'Changing table prefix...' => 'Sta cambiando il prefisso della tabella...',
        'Clean' => 'Pulire',
        'Clean database before restore' => 'Pulire l\'archivio prima del ripristino',
        'Clean files before restore' => 'Pulire i file prima del ripristino',
        'Cleaning database before restoration...' => 'Sta pulendo il database prima del restauro...',
        'Cleaning files before restoration...' => 'Sta pulendo i file prima del restauro...',
        'Create a new super admin' => 'Crea un nuovo super admin',
        'Create super admin' => 'Crea un super admin',
        'Creating super admin...' => 'Sta creando un super admin...',
        'Current timeout: %d secondes' => 'Timeout corrente: %d secondi',
        // D
        'Database connection parameters' => 'Parametri di connessione dell\'archivio',
        'Database Host server' => 'Database Server host',
        'Database Host server:' => 'Database Server host:',
        'Database login' => 'Accesso all\'archivio',
        'Database name' => 'Nome archivio',
        'Database name:' => 'Nome archivio:',
        'Database name is not valid.' => 'Nome archivio non valido.',
        'Database password' => 'Password archivio',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'Indirizzo archivio del server. Puoi indicare la porta da aggiungere \':\' dopo l\'IP',
        'Database server is not valid.' => 'Il server archivio non valido.',
        'Database table prefix' => 'Archivio prefisso tabella',
        'Database User' => 'Database Utente',
        'Database User:' => 'Database Utente:',
        'Database user is not valid.' => 'Utente archivionon valido.',
        'Decompressing backup' => 'Decompressione dei backup',
        'Decompressing backup part' => 'Decompressione parzialde del backup',
        'Delete all customers emails. Useful for dev local test shop' => 'Cancella tutte le emails dei clienti. Utile per il test dev locale del negozio',
        'Delete all datas in database before restoration' => 'Cancellare tutte le date nell\'archivio prima del restauro',
        'Delete all files and directories before restoration' => 'Cancellare tutti i file e le directory prima del restauro',
        'Delete backup file after restoration' => 'Cancellare i file backup dopo il restauro',
        'Delete customers emails' => 'Cancellare le emails dei clienti',
        'Delete lock' => 'Eliminare il blocco',
        'Deleting customers email...' => 'Eliminazione email clienti...',
        'Disable "NoAutoValueOnZero" SQL mode' => 'Disabilita "NoAutoValueOnZero" SQL modalità',
        'Disable cache' => 'Disabilita cache',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'Disabilità modalità cache. Utile se cache è stata usata e la cache non è disponibile ora',
        'Disable media servers' => 'Disabilita i media servers',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'Disabilita i media servers. Utile se i media servers sono stati usati e ora non sono disponibili',
        'Disable ModPagespeed' => 'Disabilita ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'Disabilita ModPagespeed. Utile se ModPagespeed è stato usato e se non è disponibile ora',
        'Disable SSL' => 'Disabilita SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'Disabilita modalità SSL. Utile se SSL è stato usato e SSL non è disponibile ora',
        'Disabling media servers...' => 'Disattivazione media servers...',
        'Disabling SSL...' => 'Disattivazione SSL...',
        'Do not extract database' => 'Non estrarre il database',
        'Do not extract database. Only if your database is already extracted' => 'Non estrarre il database. Solo se il database è già estratto',
        'Do not restore database' => 'Non ripristinare archivio',
        'Do not restore database. Useful for testing' => 'Non ripristinare archivio utile per il test',
        'Do not restore files' => 'Non ripristinare i files',
        'Do not restore files. Useful for testing' => 'Non ripristinare i files. Utile per il test',
        'Duration between progress refresh' => 'Durata tra l\'aggiornamento dello stato di avanzamento',
        'Duration between progress refresh:' => 'Durata tra l\'aggiornamento dello stato di avanzamento:',
        'Duration between refresh' => 'Durata tra l\'aggiornamento',
        'Duration between refresh:' => 'Durata tra l\'aggiornamento:',
        'Duration of intermediate renewal.' => 'Durata del rinnovo intermedio.',
        'Duration of intermediate renewal:' => 'Durata del rinnovo intermedio:',
        // E
        'Email' => 'Email',
        'Enable Mode Dev' => 'Permette Modalità Dev',
        'Enable Mode Dev. Useful for developers' => 'Permette Modalità Dev. Utile per gli sviluppatori',
        'Error while changing email shop:' => 'Errore durante modifica email del negozio:',
        'Error while changing table prefix:' => 'Errore durante la modifica del prefisso tabella:',
        'Error while checking existence of table' => 'Errore durante controllo esistenza tabella',
        'Error while cleaning datas:' => 'Errore durante pulizia dati:',
        'Error while creating super admin:' => 'Errore durante la creazione super admin:',
        'Error while deleting customers emails:' => 'Errore durahte la cancellazione dele emails dei clienti:',
        'Error while deleting mailalert customers emails:' => 'Errore durante la cancellazione delle mailalert delle emails dei clienti:',
        'Error while disabling media servers:' => 'Errore durante la disativazione dei media servers:',
        'Error while disabling SSL:' => 'Errore durante disattivazione SSL:',
        'Error while getting database file: No backup file found' => 'Errore durante il recupero del file archivio: Nessun file di backup trovato',
        'Error while getting employee by email:' => 'Errore durante il recupero dipendente dalla email:',
        'Error while getting likely understood language:' => 'Errore durante  la probabile comprensione del linguaggio:',
        'Error while renaming .htaccess file, please check file access right' => 'Errore durante la ridenominazione del file .htaccess, controllare il diritto di accesso al file',
        'Error while restoring database:' => 'Errore durante il ripristino dell\'archivio:',
        'Error while restoring files, tar file does not exist' => 'Errore durante il ripristino files, tar file non esiste',
        'Error while restoring files, tar file is not correct' => 'Errore durante il ripristino files, tar file non è corretto',
        'Error while restoring files, tar file truncated' => 'Errore durante il ripristino , tar file troncato',
        'Error while restoring files, unable to create directory' => 'Errore durante il ripristino files, impossibile creare la directory ',
        'Error while restoring files, unable to create file' => 'Errore durante il ripristino files, impossibile creare il file ',
        'Error while restoring files, unable to open tar file' => 'Errore durante il ripristino files, impossibile aprire tar file',
        'Error while restoring files, unable to read data in tar file' => 'Errore durante il ripristino files, impossibile leggere la data nel tar file',
        'Error while restoring files, unable to read name file in tar file' => 'Errore durante il ripristino files, ipossibilke leggere il nome del file nel tad file',
        'Error while restoring files, unable to read tar file' => 'Errore durante il ripristino files, impossibile leggere tar file',
        'Error while restoring files, unable to write file' => 'Errore durante il ripristino file, impossibile scrivere il file ',
        'Error while restoring files: No backup file found' => 'Errore durante il ripristino files: Backup file non trovato',
        'Error while retrieving Prestashop version, unable to find the version' => 'Errore durante il recupero della versione Prestashop, impossibile trovare la versione',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'Errore durante il recupero della versione Prestashop, impossibile leggere il file con le informazioni',
        'Error while retrieving virtual uri:' => 'Errore durante il recupero del virtual uri:',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'Errore durante l\'aggiornamento .htaccess file, impossibile leggere .htaccess file',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'Errore durante l\'aggiornamento di .htaccess file, impossibile salvare .htaccess file',
        'Error while updating defines, defines file does not exist' => 'Errore durante l\'aggiornamento defines, il file defines non esiste',
        'Error while updating defines, unable to read defines file' => 'Errore durante l\'aggiornamento defines, impossibile leggere il defines file',
        'Error while updating defines, unable to save defines file' => 'Errore durante l\'aggiornamento defines, impossibile salvare defines file',
        'Error while updating links:' => 'Errore durante l\'aggiornamento dei links:',
        'Error while updating settings, settings file does not exist' => 'Errore durante l\'aggiornamento delle impostazioni, il file impostazioni non esiste',
        'Error while updating settings, unable to find the prefix' => 'Errore durante l\'aggiornamento delle impostazioni, impossibile trovare il prefisso',
        'Error while updating settings, unable to read settings file' => 'Errore durante l\'aggiornamento delle impostazioni, impossibile leggere il file impostazioni',
        'Error while updating settings, unable to save settings file' => 'Errore durante l\'aggiornamento delle impostazioni, impossibile salvare il file impostazioni',
        'Error while updating super admin password:' => 'Errore durante l\'aggiornamento della password super admin:',
        'Error while updating URL configuration:' => 'Errore durante l\'aggiornamento della configurazione URL:',
        'Error, the backup is no longer readable' => 'Errore, il backup non è più leggibile',
        'Error, the backup is no longer seekable' => 'Errore, il backup non è più ricercabile',
        'Error, the compressed backup file has a compression issue' => 'Errore, il file backup compresso ha un problema di compressione',
        'Error, the compressed backup file is no longer readable' => 'Errore, il file backup compresso non è piu leggibile',
        'Error, the compressed backup file is no longer seekable' => 'Errore, il file backup compresso non è più ricercabile',
        'Error, the file is no longer readable' => 'Errore, il file non è più leggibile',
        'Error, the file is no longer seekable' => 'Errore, il file non è più ricercabile',
        'Error:' => 'Errore:',
        'Error: Unable to connect to the database' => 'Errore: Incapace di connettersi all\'archivio',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'Errore. Raggiunto il massimo di esecuzione del server (%d s). Per cortesia aumentare questo tempo sul vostro server per completare il ripristino. La maggior parte del tempo, hai bisogno di aumentare PHP il tempo massimo di esecuzione. Tu puoi anche scegliere l\'opzione "Intermediate renewal" per evitare questa limitazione.',
        'Error. The config file cannot be opened' => 'Errore. Il file di configurazione non può essere aperto',
        'Error. The config file cannot be rewind' => 'Errore. Il file di configurazione non può essere riavvolto',
        'Error. There is an error with the "Intermediate renewal" option' => 'Errore. C\'é un errore con l\'opzione "Intermediate renewal"',
        'Execution failed on:' => 'Esecuzione fallita:',
        'Extract dump' => 'Estrarre il dump',
        // F
        'File access rights' => 'Diritti di accesso al file',
        'File access rights are not valid (should be between 600 and 777).' => 'I diritti di accesso al file non sono validi (dovrebbe essere tra 600 e 777).',
        'File access rights, default: 644' => 'Diritti di accesso al file, predefinito: 644',
        'FINISH ! Your backup was restored with success !' => 'FINITO ! Il tuo backup è stato ripristinato con successo !',
        'First name' => 'Primo nome',
        'Folder access rights' => 'Diritti di accesso della cartella',
        'Folder access rights are not valid (should be between 600 and 777).' => 'I diritti di accesso della cartella non sono validi (dovrebbe essere tra 600 e 777).',
        'Folder access rights, default: 755' => 'Diritti di accesso della cartella:predefinito: 755',
        // G
        'Get database file' => 'Ottieni file archivio',
        'Go to your shop' => 'Vai al tuo negozio',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'Se sono presenti errori nel database originale e il ripristino non riesce su richiesta SQL INSERT, questa opzione può ignorare gli errori. Ciò è particolarmente utile in caso di errore "Duplicate Entry".',
        'Ignore SQL errors' => 'Ignora gli errori SQL',
        'Intermediate renewal' => 'Rinnovo intermedio',
        // L
        'Last name' => 'Ultimo nome',
        // M
        'Message' => 'Messaggio',
        // N
        'No' => 'No',
        'No database restoration, as wanted' => 'Nessun ripristino di archivio, come voluto',
        'No extraction, as wanted' => 'Nessuna estrazione, come voluto',
        'No files restoration, as wanted' => 'Nessun ripristino di file, come voluto',
        'Nt Restoration' => 'Nt Rirpistino',
        'Nt Restoration for Prestashop' => 'Nt Ripristino per Prestashop',
        // O
        'on request:' => 'su richiesta:',
        'Only database will be restored' => 'Solo l\'archivio sarà ripristinato',
        'Options' => 'Opzioni',
        // P
        'Password' => 'Password',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'Assicurati che la tua versione PHP (%1$s) sia compatibile con la tua versione Prestashop (%2$s). È possibile controllare su:',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'Il file Prestashop .htaccess sembra contenere modifiche dal file originale di Prestashop. Assicurarsi che il file sia ancora valido per questa nuova installazione.',
        // Q
        'Query failed on:' => 'Domanda non riuscita su:',
        // R
        'Reconnection:' => 'Riconnessione:',
        'Refresh' => 'Aggiornamento',
        'Replace .htaccess' => 'Sostituire.htaccess',
        'Restoration failed' => 'Ripristino non riuscito',
        'Restoration failed on line n°' => 'Ripristino fallito sulla linea n°',
        'Restoring backup...' => 'Ripristino backup...',
        'Restoring database:' => 'Ripristino archivio:',
        'Restoring files:' => 'Ripristino files:',
        'Restoring files...' => 'Ripristino files...',
        // S
        'Shop email is not valid.' => 'L\'email del negozio non è valida.',
        'Site Maintenance' => 'Manutenzione del sito',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Ci scusiamo per il disagio ma al momento stiamo eseguendo alcuni interventi di manutenzione.',
        'Start restoration' => 'Inizio ripristino',
        'Starting restoration' => 'Ripristino di partenza',
        'Super admin email is not valid.' => 'l\'email del super amministratore non è valida.',
        'Super admin first name is not valid.' => 'Il primo nome del super amministratore non è valido.',
        'Super admin last name is not valid.' => 'L\'ultimo nome del super amministratore non è valido.',
        'Super admin password is not valid.' => 'La password del super amministratore non è valida.',
        // T
        'Table prefix' => 'Tabella prefissa',
        'The lock could not be deleted.' => 'Il blocco non può essere eliminato.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => 'Il ripristino verrà eseguito con interruzione seil timeout del server non è sufficiente.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'Per eseguire un ripristino completo, lo script ha bisogno di tempo. Se il server interrompe lo script prima della sua scadenza, il restauro non è completo. Se si verifica un errore, attivare questa opzione e aumentare il vostro PHP max_execution_time.',
        // U
        'Unable to connect to the database' => 'Incapace di connettersi all\'archivio',
        'Unable to open SQL file' => 'Impossibile aprire il file SQL',
        'Updating .htaccess file...' => 'Aggiornamento .htaccess file...',
        'Updating defines...' => 'Definisce aggiornamento...',
        'Updating links...' => 'Aggiornamento links...',
        'Updating settings...' => 'Aggiornamento impostazioni...',
        'Updating URL configuration...' => 'Aggiornamento configurazione URL ...',
        'Useful if mysql is limited and cannot restore the database' => 'Utile se mysql è limitata e non è possibile ripristinare l\'archivio',
        // W
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'Non possiamo assicurarci che la tua versione PHP (%s) sia compatibile con la tua versione Prestashop. È possibile controllare su:',
        'We will be back soon!' => 'Ci torneremo presto!',
        // Y
        'Yes' => 'Si',
        'You can provide a new shop contact email' => 'Puoi fornire una nuova email di contatto per il negozio',
        'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s' => 'La versione Disinstalla (%1$s) necessita di una versione PHP compresa tra %2$s e %3$s. La versione PHP corrente è %4$s',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'L\'architettura del server (32 bit) non è in grado di eseguire rinnovi intermedi su file compressi di grandi dimensioni (> 2GB) pertanto è necessario assicurarsi che il timeout del server sia sufficientemente grande (in modo che il ripristino possa raggiungere la fine del processo) o decomprimere il backup per utilizzare un file .tar anziché un file .tar.gz (è possibile creare backup come .tar anziché .tar.gz nel modulo utilizzando l\'opzione avanzata "Non comprimere il backup")',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'Il sistema di architettura server (Windows) non è in grado di eseguire rinnovi intermedi su file compressi di grandi dimensioni (> 2GB) pertanto è necessario assicurarsi che il timeout del server sia sufficientemente grande (in modo che il ripristino possa raggiungere la fine del processo) o decomprimere il backup per utilizzare un file .tar anziché un file .tar.gz (è possibile creare backup come .tar anziché .tar.gz nel modulo utilizzando l\'opzione avanzata "Non comprimere il backup")',
    ),
    'fa' => array(
        ':' => ':',
        // A
        'A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?' => 'یک فایل .htaccess در سرور شما شناسایی شده سات. این احتمالا باعث می شود، سایت شما بعد از بازیابی به درستی کار نکند. آیا فایل تشخیص داده شده باید با .htaccess پشتیبان جایگزین شود؟خ',
        'Attempt to disable server timeout' => 'تلاش برای غیر فعال کردن تایم آوت سرور',
        // B
        'Backup file is big, progress is not accurate but everything is running well' => 'فایل پشتیبان گیری بزرگ است ،پیشرفت دقیق نیست اما همه چیز به خوبی در حال اجراست',
        // C
        'Change access rights' => 'تغییر حق دسترسی ها',
        'Change database table prefix' => 'تغییر پیش شماره جدول پایگاه داده',
        'Change folders and files access rights' => 'تغییر پوشه ها و حق دسترسی فایل ها',
        'Change shop email' => 'تغییر ایمیل فروشگاه',
        'Change table prefix' => 'تغییر پیش شماره جدول',
        'Changing email shop...' => 'تغییر ایمیل فروشگاه...',
        'Changing table prefix...' => 'تغییر پیش شماره جدول...',
        'Clean' => 'پاک کردن',
        'Clean database before restore' => 'پاک کردن پایگاه داده قبل از بازیابی',
        'Clean files before restore' => 'پاک کردن فایل ها قبل از بازیابی',
        'Cleaning database before restoration...' => 'در حال پاک کردن پایگاه داده قبل از بازیابی...',
        'Cleaning files before restoration...' => 'در حال پاک کردن فایل ها قبل از بازیابی...',
        'Create a new super admin' => 'ایجاد یک سوپروایزر جدید',
        'Create super admin' => 'ایجاد سوپروایزر',
        'Creating super admin...' => 'در حال ایجاد سوپروایزر...',
        'Current timeout: %d secondes' => 'تایم اوت فعلی: %d ثانیه',
        // D
        'Database connection parameters' => 'پارامترهای اتصال پایگاه داده',
        'Database Host server' => 'Database سرور میزبان',
        'Database Host server:' => 'Database سرور میزبان:',
        'Database login' => 'نام کاربری پایگاه داده',
        'Database name' => 'نام پایگاه داده',
        'Database name:' => 'نام پایگاه داده:',
        'Database name is not valid.' => 'نام پایگاه داده معتبر نیست.',
        'Database password' => 'گذرواژه پایگاه داده',
        'Database server address. You can indicate the port by adding \':\' after the IP' => 'آدرس سرور پایگاه داده. شما می توانید پورت را با اضافه کردن \':\' پس از آی پی نشان دهید',
        'Database server is not valid.' => 'سرور پایگاه داده معتبر نیست.',
        'Database table prefix' => 'پیش فرض جدول پایگاه داده',
        'Database User' => 'کاربر پایگاه داده',
        'Database User:' => 'کاربر پایگاه داده:',
        'Database user is not valid.' => 'کاربر پایگاه داده معتبر نیست.',
        'Decompressing backup' => 'بازکردن فایل پشتیبان',
        'Decompressing backup part' => 'بازکردن قسمت فایل پشتیبان',
        'Delete all customers emails. Useful for dev local test shop' => 'حذف تمام ایمیل های مشتریان. مناسب توسعه دهندگان برای تست فروشگاه به صورت لوکال',
        'Delete all datas in database before restoration' => 'حذف تمام داده ها در پایگاه داده قبل از بازیابی',
        'Delete all files and directories before restoration' => 'حذف تمام فایل ها و پوشه قبل از بازیابی',
        'Delete backup file after restoration' => 'حذف فایل پشتیبان پس از بازیابی',
        'Delete customers emails' => 'حذف ایمیل های مشتریان',
        'Delete lock' => 'حذف قفل',
        'Deleting customers email...' => 'در حال حذف ایمیل مشتریان...',
        'Disable "NoAutoValueOnZero" SQL mode' => 'غیر فعال کردن "NoAutoValueOnZero" حالت SQL',
        'Disable cache' => 'غیر فعال کردن حافظه پنهان',
        'Disable cache mode. Useful if cache was used and no cache is available now' => 'غیرفعال کردن حالت حافظه پنهان. اگر حافظه پنهان مورد استفاده قرار گرفته بود مفید است ولی  الان حافظه پنهانی در دسترس نیست',
        'Disable media servers' => 'غیر فعال کردن سرورهای رسانه ای',
        'Disable media servers. Useful if media servers were used and there are not available now' => 'غیر فعال کردن سرورهای رسانه ای. غیرفعال کردن حالت حافظه پنهان. اگر سرور رسانه ای مورد استفاده قرار گرفته بود مفید است ولی  الان در دسترس نیست',
        'Disable ModPagespeed' => 'غیر فعال کردن ModPagespeed',
        'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'غیر فعال کردن ModPagespeed. اگر ModPagespeed استفاده شده بود مفید است ولی الان در دسترس نیست',
        'Disable SSL' => 'غیر فعال کردن SSL',
        'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'غیر فعال کردن SSL. اگر از SSL استفاده شده مفید است ولی الان در دسترس نیست.',
        'Disabling media servers...' => 'درحال غیر فعال کردن سرورهای رسانه ای',
        'Disabling SSL...' => ' درحال غیر فعال کردن SSL',
        'Do not extract database' => 'پایگاه داده ای استخراج نشود',
        'Do not extract database. Only if your database is already extracted' => 'پایگاه داده ای استخراج نشود. فقط اگر پایگاه داده شما از قبل استخراج شده باشد',
        'Do not restore database' => 'پایگاه داده ای بازیابی نشود',
        'Do not restore database. Useful for testing' => 'پایگاه داده ای بازیابی نشود. مناسب برای تست',
        'Do not restore files' => 'فایل ها بازیابی نشود',
        'Do not restore files. Useful for testing' => 'فایل ها بازیابی نشود. مناسب برای تست',
        'Duration between progress refresh' => 'مدت زمان بین پیشرفت تازه کردن',
        'Duration between progress refresh:' => 'مدت زمان بین پیشرفت تازه کردن:',
        'Duration between refresh' => 'مدت زمان بین تازه کردن',
        'Duration between refresh:' => 'مدت زمان بین تازه کردن:',
        'Duration of intermediate renewal.' => 'مدت زمان نوسازی میانه.',
        'Duration of intermediate renewal:' => 'مدت زمان نوسازی میانه:',
        // E
        'Email' => 'ایمیل',
        'Enable Mode Dev' => 'فعال کردن حالت توسعه دهنده',
        'Enable Mode Dev. Useful for developers' => 'فعال کردن حالت توسعه دهنده. مناسب برای توسعه دهنگان',
        'Error while changing email shop:' => 'خطا در هنگام تغییر ایمیل فروشگاه:',
        'Error while changing table prefix:' => 'خطا در هنگام تغییر پیش شماره جدول:',
        'Error while checking existence of table' => 'خطا در هنگام بررسی وجود جدول',
        'Error while cleaning datas:' => 'خطا در هنگام پاک کردن داده ها:',
        'Error while creating super admin:' => 'خطا در هنگام ایجاد سوپروایزر:',
        'Error while deleting customers emails:' => 'خطا در هنگام حذف ایمیل های مشتریان:',
        'Error while deleting mailalert customers emails:' => 'خطا در هنگام که حذف هشدار ایمیل های مشتریان:',
        'Error while disabling media servers:' => 'خطا در هنگام غیرفعال کردن سرورهای رسانه ای:',
        'Error while disabling SSL:' => 'خطا در هنگام غیرفعال کردن SSL:',
        'Error while getting database file: No backup file found' => 'خطا در هنگام گرفتن فایل پایگاه داده: هیچ فایل پشتیبانی یافت نشد',
        'Error while getting employee by email:' => 'خطا در هنگام دریافت کارمند از طریق ایمیل:',
        'Error while getting likely understood language:' => 'خطا در هنگام گرفتن به احتمال زیاد زبان درک شده:',
        'Error while renaming .htaccess file, please check file access right' => 'خطا در هنگام تغییر نام فایل .htaccess، لطفا دسترسی فایل را بررسی کنید',
        'Error while restoring database:' => 'خطا در هنگام بازیابی پایگاه داده:',
        'Error while restoring files, tar file does not exist' => 'خطا در هنگام بازیابی فایل ها، فایل تار وجود ندارد',
        'Error while restoring files, tar file is not correct' => 'خطا در هنگام بازیابی فایل ها، فایل تار صحیح نیست',
        'Error while restoring files, tar file truncated' => 'خطا در هنگام بازیابی فایل ها، فایل تار کوتاه شده است',
        'Error while restoring files, unable to create directory' => 'خطا در هنگام بازیابی فایل ها، نمی توان پوشه را ساخت',
        'Error while restoring files, unable to create file' => 'خطا در هنگام بازیابی فایل ها، نمی توان فایل را ایجاد کرد',
        'Error while restoring files, unable to open tar file' => 'خطا در هنگام بازیابی فایل ها، نمی توان فایل تار را باز کرد',
        'Error while restoring files, unable to read data in tar file' => 'خطا در هنگام بازیابی فایل ها، قادر به خواندن داده ها در فایل تار نیست',
        'Error while restoring files, unable to read name file in tar file' => 'خطا در هنگام بازگرداندن فایل ها، قادر به خواندن فایل نام در فایل تار نیست',
        'Error while restoring files, unable to read tar file' => 'خطا در هنگام بازیابی فایل ها، قادر به خواندن فایل تار نیست',
        'Error while restoring files, unable to write file' => 'خطا در هنگام بازیابی فایل ها، قادر به نوشتن فایل نیست',
        'Error while restoring files: No backup file found' => 'خطا در هنگام بازگرداندن فای ها: هیچ فایل پشتیبانی یافت نشد',
        'Error while retrieving Prestashop version, unable to find the version' => 'هنگام بازیابی نسخه پرستاشاپ خطایی رخ داد، یافتن نسخه امکان پذیر نیست',
        'Error while retrieving Prestashop version, unable to read the file with the information' => 'هنگام بازیابی نسخه پرستاشاپ خطایی رخ داد، قادر به خواندن فایل همراه با اطلاعات موجود نیست',
        'Error while retrieving virtual uri:' => 'خطا در هنگام بازیابی uri مجازی:',
        'Error while updating .htaccess file, unable to read .htaccess file' => 'خطا در هنگام به روز رسانی فایل .htaccess، قادر به خواندن فایل .htaccess نیست',
        'Error while updating .htaccess file, unable to save .htaccess file' => 'خطا در هنگام به روز رسانی فایل .htaccess،  قادر به ذخیره فایل .htaccess نیست',
        'Error while updating defines, defines file does not exist' => 'خطا در هنگام به روز رسانی مشخصه ها، فایل مشخصه ها وجود ندارد',
        'Error while updating defines, unable to read defines file' => 'خطا در هنگام به روز رسانی مشخصه ها، قادر به خواندن فایل مشخصه ها نیست',
        'Error while updating defines, unable to save defines file' => 'خطا در هنگام به روز رسانی مشخصه ها می کند، قادر به ذخیره کردن فایل مشخصه ها نیست',
        'Error while updating links:' => 'خطا در هنگام به روز رسانی پیوند ها:',
        'Error while updating settings, settings file does not exist' => 'خطا در هنگام به روز رسانی تنظیمات، فایل تنظیمات وجود ندارد',
        'Error while updating settings, unable to find the prefix' => 'خطا در هنگام به روز رسانی تنظیمات، قادر به پیدا کردن پیش زمینه نیست',
        'Error while updating settings, unable to read settings file' => 'خطا در هنگام به روز رسانی تنظیمات، قادر به خواندن فایل تنظیمات نیست',
        'Error while updating settings, unable to save settings file' => 'خطا در هنگام به روز رسانی تنظیمات، قادر به ذخیره فایل تنظیمات نیست',
        'Error while updating super admin password:' => 'خطا در حالی که به روز رسانی رمز عبور مدیر فوق العاده:',
        'Error while updating URL configuration:' => 'خطا در هنگام به روز رسانی آدرس اینترنتی پیکربندی:',
        'Error, the backup is no longer readable' => 'خطا، فایل پشتیبان دیگر قابل خواندن نیست',
        'Error, the backup is no longer seekable' => 'خطا، فایل پشتیبان دیگر قابل جستجو نیست',
        'Error, the compressed backup file has a compression issue' => 'خطا، فایل پشتیبان فشرده شده دارای یک ایراد در فشرده سازی است',
        'Error, the compressed backup file is no longer readable' => 'خطا، فایل پشتیبان فشرده شده دیگر قابل خواندن نیست',
        'Error, the compressed backup file is no longer seekable' => 'خطا، فایل پشتیبان فشرده شده دیگر قابل جستجو نیست',
        'Error, the file is no longer readable' => 'خطا، فایل دیگر قابل خواندن نیست',
        'Error, the file is no longer seekable' => 'خطا، فایل دیگر قابل جستجو نیست',
        'Error:' => 'خطا:',
        'Error: Unable to connect to the database' => 'خطا: عدم توانایی در اتصال به پایگاه داده',
        'Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.' => 'خطا. حداکثر زمان اجرا در سرور شما (%d ثانیه) به سررسیده است. لطفاً این زمان را در سرور خود افزایش دهید تا بازیابی کامل شود. در بیشتر مواقع ، باید PHP max_execution_time را افزایش دهید. برای دور زدن این محدودیت می توانید گزینه "تمدید متوسط" را نیز فعال کنید.',
        'Error. The config file cannot be opened' => 'خطا فایل پیکربندی باز نمی شود',
        'Error. The config file cannot be rewind' => 'خطا فایل پیکربندی نمی تواند بازپیچی شود',
        'Error. There is an error with the "Intermediate renewal" option' => 'خطا در گزینه "نوسازی میانه" خطایی رخ داده است',
        'Execution failed on:' => 'اجرا با شکست مواجه شد:',
        'Extract dump' => 'استخراج دامپ',
        // F
        'File access rights' => 'حق دسترسی به فایل',
        'File access rights are not valid (should be between 600 and 777).' => 'حق دسترسی به فایل معتبر نیست (باید بین ۶۰۰ تا ۷۷۷ باشد).',
        'File access rights, default: 644' => 'حق دسترسی به فایل، پیش فرض: 644',
        'FINISH ! Your backup was restored with success !' => 'تمام! نسخه پشتیبان شما با موفقیا بازیابی شد!',
        'First name' => 'نام',
        'Folder access rights' => 'حق دسترسی پوشه ',
        'Folder access rights are not valid (should be between 600 and 777).' => 'حق دسترسی پوشه ها معتبر نیست (باید بین ۶۰۰ تا ۷۷۷ باشد).',
        'Folder access rights, default: 755' => 'حق دسترسی به پوشه، پیش فرض: 755',
        // G
        'Get database file' => 'دریافت فایل پایگاه داده',
        'Go to your shop' => 'نمایش فروشگاه من',
        // I
        'If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.' => 'اگر در پایگاه داده اصلی خطاهایی وجود داشته باشد و بازیابی در درخواست SQL INSERT ناموفق باشد ، این گزینه می تواند خطاها را دور بزند. این به ویژه در مورد خطای Duplicate Entries بسیار مفید است.',
        'Ignore SQL errors' => 'نادیده گرفتن خطاهای SQL',
        'Intermediate renewal' => 'نوسازی میانه',
        // L
        'Last name' => 'نام خانوادگی',
        // M
        'Message' => 'پیام',
        // N
        'No' => 'نه',
        'No database restoration, as wanted' => 'همانطور که خواستید، هیچ پایگاه داده ای بازیابی نشد',
        'No extraction, as wanted' => 'همانطور که می خواستید، استخراجی انجام نشد',
        'No files restoration, as wanted' => 'همانطور که می خواستید، هیچ فایلی بازیابی نشد',
        'Nt Restoration' => 'بازیابی Nt',
        'Nt Restoration for Prestashop' => 'بازیابی Nt برای پرستاشاپ',
        // O
        'on request:' => 'بنا به درخواست:',
        'Only database will be restored' => 'فقط پایگاه داده بازیابی خواهد شد',
        'Options' => 'گزینه ها',
        // P
        'Password' => 'گذرواژه',
        'Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:' => 'لطفاً مطمئن شوید نسخه پی اچ پی شما (%1$s) با نسخه پرستاشاپ(%2$s) سازگار است. می توانید آن را اینجا بررسی کنید:',
        'Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.' => 'به نظر می رسد فایل htaccess. پرستاشاپ دارای تغییراتی نسبت به فایل اصلی پرستاشاپ است. لطفاً اطمینان حاصل کنید که فایل برای این نصب جدید همچنان معتبر است.',
        // Q
        'Query failed on:' => 'کوئری شکست خورده در:',
        // R
        'Reconnection:' => 'اتصال مجدد:',
        'Refresh' => 'تازه سازی',
        'Replace .htaccess' => 'جایگزینی .htaccess',
        'Restoration failed' => 'بازیابی انجام نشد',
        'Restoration failed on line n°' => 'بازیابی در خط n° با شکست مواجه شد',
        'Restoring backup...' => 'در حال بازیابی نسخه پشتیبان...',
        'Restoring database:' => 'بازیابی پایگاه داده:',
        'Restoring files:' => 'بازگرداندن پرونده ها:',
        'Restoring files...' => 'درحال بازیابی فایل ها...',
        // S
        'Shop email is not valid.' => 'ایمیل فروشگاه معتبر نیست.',
        'Site Maintenance' => 'تعمیر و نگهداری سایت',
        'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'با عرض پوزش برای این مشکل، اما ما در حال حاضر برخی از تعمیرات را انجام می دهیم.',
        'Start restoration' => 'شروع بازیابی',
        'Starting restoration' => 'در حال بازیابی',
        'Super admin email is not valid.' => 'ایمیل سوپروایزر معتبر نیست.',
        'Super admin first name is not valid.' => 'نام سوپروایزر معتبر نیست.',
        'Super admin last name is not valid.' => 'نام خانوادگی سوپروایزر معتبر نیست',
        'Super admin password is not valid.' => 'گذرواژه سوپروایزر معتبر نیست.',
        // T
        'Table prefix' => 'پیش شماره جدول ',
        'The lock could not be deleted.' => 'قفل حذف نمی شود.',
        'The restore will be performed with interruption if the server timeout is not large enough.' => ' اگر تایم اوت سرور به اندازه کافی بزرگ نباشد بازیابی با وقفه انجام خواهد شد.',
        'To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.' => 'برای انجام یک بازیابی کامل، اسکریپت به مدتی زمان نیاز دارد. اگر سرور قبل از پایان کار اسکریپت را متوقف کند، بازیابی کامل نمی شود. در صورت دریافت خطا، این گزینه را در PHP خود فعال کنید max_execution_time.',
        // U
        'Unable to connect to the database' => 'عدم توانایی در اتصال به پایگاه داده',
        'Unable to open SQL file' => 'فایل SQL باز نمی شود',
        'Updating .htaccess file...' => 'به روز رسانی فایل .htaccess...',
        'Updating defines...' => 'به روز رسانی مشخصه ها...',
        'Updating links...' => 'به روز رسانی پیوند ها...',
        'Updating settings...' => 'به روز رسانی تنظیمات...',
        'Updating URL configuration...' => 'به روز رسانی آدرس اینترنتی پیکره بندی...',
        'Useful if mysql is limited and cannot restore the database' => 'زمانی مفید است که mysql محدود باشد و قادر به بازیابی پایگاه داده نباشد',
        // W
        'We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:' => 'ما نمی توانیم اطمینان حاصل کنیم که نسخه پی اچ پی (%s) شما با نسخه پرستاشاپ شما سازگار است. می توانید آن را اینجا بررسی کنید:',
        'We will be back soon!' => 'بزودي برميگرديم!',
        // Y
        'Yes' => 'بله',
        'You can provide a new shop contact email' => 'شما می توانید یک فروشگاه جدید بسازید. از طریق ایمیل در تماس باشید',
        'Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s' => 'نسخه (%1$s) پرستاشاپ شما به پی اچ پی نسخه ی %2$s تا %3$s  نیاز دارد. نسخه پی اچ پی فعلی شما %4$s است',
        'Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'معماری سرور شما (32 بیت) قادر به تمدید میانی در فایل های بزرگ فشرده (> 2 گیگابایت) نیست بنابراین باید یا اطمینان حاصل کنید که زمان تام اوت سرور شما به اندازه کافی بزرگ است (بنابراین بازیابی می تواند به پایان روند خود برسد) یا فایل پشتیبان خود را از حالت فشرده خارج کنید تا از tar. به جای tar.gz. استفاده کنید (می توانید در ماژول با استفاده از گزینه پیشرفته "پشتیبان گیری را فشرده نکنید" را فعال کنید تا از tar. به جای tar.gz. استفاده کنید.)',
        'Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")' => 'سیستم معماری سرور شما (ویندوز) قادر به انجام تجدید میانه روی پرونده های فشرده بزرگ (> 2 گیگابایت) نیست بنابراین باید مطمئن شوید که زمان تایم اوت سرور شما به اندازه کافی بزرگ است (در نتیجه بازیابی می تواند به پایان روند خود برسد) یا فایل های پشتیبان خود را از حالت فشرده خارج کنید و بجای فایل های .tat.gz از .tar استفاده کنید. (شما می توانید با از استفاده از گزینه "فشرده نکردن فایل پشتیبان" در قسمت پیشرفته ماژول فایل های .tar بجای .tar.gz بسازید)',
    ),
);

//-----------------------------------------------------------------------------

/**
* 2013-2022 2N Technologies
*
* @author    2N Technologies <contact@2n-tech.com>
* @copyright 2013-2022 2N Technologies
*
* CHANGELOG
*
* Version 13.1.3 :
*		- Fix database host if there is no port for Prestashop < 1.7
* Version 13.1.2 :
*		- Fix missing database port if non standard port for Prestashop < 1.7
*		- Fix SSL enabling/disabling in some case
* Version 13.1.1 :
*		- Replace old url both with and without www
* Version 13.1.0 :
*		- Fix issue with collation replacement
*		- Fix new domain detection when moving from an old domain
*		- Fix issue with directories ending by "." in Windows
* Version 13.0.8 :
*		- If old Prestashop setting file does not display "deprecated" but is empty, use new Prestashop parameters file
* Version 13.0.7 :
*		- Compatibility with the module Protect My Shop by librasoft
* Version 13.0.5 :
*		- Add Prestashop 1.7.8 to the PHP version test
* Version 13.0.2 :
*		- Fix issue for charset and collation replacement
* Version 13.0.0 :
*		- Fix old config file deprecation check
*		- Improve ability to restore a Linux backup on Windows by renaming forbidden files
*		- Display a warning if more than one backup file found
*		- Display backup file name to restore
*		- Ability to change collation and charset
*		- Ability to change storage engine
*		- Fix issue when htaccess already exists and should be replaced
* Version 12.2.0 :
*		- Display warnings if necessary
*		- Handle intermediate renewals pause tweak
*		- Stop if more than one backup file found
*		- Add selected options in logs
*		- If no htaccess file, a warning is issued instead of being stopped
* Version 12.1.1 :
*		- Clean dump file, even if the cleaning option is not enabled
* Version 12.0.11 :
*		- Do not raise php notice on php 7.4 and higher on long file name
* Version 12.0.8 :
*		- Fix team session handling when restoring from within the module
* Version 12.0.7 :
*		- Improve complex mysql stored procedure management
* Version 12.0.1 :
*		- Change name of some files if they exists
* Version 12.0.0 :
*		- Add pause between refresh
*		- The restoration from the module can now update links and htaccess if needed (if shop_url has changed)
* Version 11.6.6 :
*		- Fix issue when intermediate renewal occurs during uncompressing a big gz file
* Version 11.6.5 :
*		- Improve some text
* Version 11.6.2 :
*		- Add persian translations thanks to Siavash Kamalpour
* Version 11.6.0 :
*		- Add PHP version to the message diplayed when PHP version is not compatible with Prestashop version
*		- Fix some translations
*		- Fix issue on uncompressing big backup file on Windows with intermediate renewals enabled
*		- Fix update links on tables not existing in old backups
* Version 11.5.0 :
*		- Add option to ignore SQL errors
* Version 11.4.0 :
*		- Display an information message after restoration if PHP version is not compatible with Prestashop version
*		- Display an information message after restoration if the .htaccess file is different from Prestashop original file
*		- Automatically enable "Disable SSL" option if localhost
* Version 11.3.0 :
*		- Large performance improvement for big backup files (>2 GB) on 64 bits Linux or Mac
*       - Add intermediate renewals for files and database cleaning before restoration
* Version 11.2.6 :
*		- Fix database tables prefix not found in Prestashop 1.7
* Version 11.2.5 :
*		- Fix issue when the config file is not write exactly as expected (use preg_match to get prefix)
* Version 11.2.0 :
*		- Fix issue with progress message not being displayed in some cases
*		- The refresh button now appears after 10s
*		- Optimization of the update link procedure which is now done only if really needed
*		- Change backup directory to default if the restoration is on a new location
*		- List of backups is now cleared if the restoration is on a new location
*		- Update simplified chinese translation (thanks to Bai Shijun) and add russian translation (thanks to Svetlana Gaillard)
* Version 11.1.9 :
*		- Fix issue if query result is not as expected
* Version 11.1.5 :
*		- Fix cleaning views
* Version 11.1.2 :
*		- Update links on tables only, not views
* Version 11.0.1 :
*       - Disable foreign key check while cleaning tables
* Version 11.0.0 :
*       - Check presence of ntbr lock when cliking on refresh button. If does not exists, the restoration is considered successfull
*       - Launch SQL commands after refresh that were launch a the bagining of the dump file and concern all of the file (SET SQL_MODE, if configured that way, and SET FOREIGN_KEY_CHECKS)
* Version 10.1.7 :
*       - Fix issue with undisplayed mysql errors
*       - Fix issue with bad dump path after refresh when backup is only a dump backup
* Version 10.1.1 :
*       - Fix db issue with intermediate renewals
* Version 10.0.0 :
*       - Fix loader display when decompressing
*       - Move creation of maintenance file and lock file after test database
* Version 9.0.2 :
*       - Add option to choose time between to progress refresh
* Version 9.0.0 :
*       - Automated restoration is now using intermediate renewals
*       - Unpacking is now using intermediate renewals
*       - Restoration is now possible on passwordless database
*       - If .htaccess already in place, ask if it should be replaced
*       - Increase sleeping time before cleaning log files
*       - Fix tar file cleaning
*       - Add option to remove all datas from database before restoring
* Version 8.0.0 :
*       - The script can be called automatically (see doc)
*       - Display a maintenance page for others during backup
*       - Display a button to go to the shop when the restoration ends
*       - Add option to remove all files and directories before restoring
*       - The script now forbid simultaneous run, useful on some servers
*       - Better utf8 sql connection
*       - Fix options hidden when it was a database restoration only
*       - Fix restoration of big file (> 2 GB) inside backup file
*       - Add intermediate renewal option to restoration for timeout limited servers
*       - Auto fix bad filename on Windows filesystem
* Version 7.1.1 :
*		- Fix links update
* Version 7.0.0 :
*		- Add option to change time limit
* Version 6.1.5 :
*		- Add Simplified Chinese internationalization thanks to Bai Shijun
* Version 6.1.4 :
*		- Add Traditional Chinese internationalization thanks to Bryant Kang
* Version 6.1.2 :
*       - Auto reconnect to database if server timed out during restoration
* Version 4.1.0 :
*       - Do not clean backup file if the backup is not compressed and clean is not wanted
* Version 4.0.4 :
*       - Add option to disable "No Auto Value On Zero" SQL mode
* Version 4.0.3 :
*       - Compatibility with Prestashop 1.7.0.0
* Version 3.0.13 :
*		- Database connection port fix
* Version 3.0.5 :
*       - Sync version number with main script
* Version 2.0.2 :
*       - Add Swedish internationalization thanks to Roy Sohlander
* Version 2.0.1 :
*       - Add Danish internationalization thanks to Nick Andersen (dinprestashop.dk)
* Version 2.0.0 :
*       - Add Internationalization (English, French)
*       - Option to delete customers emails now delete mails from mailalert module if exists
*       - Option to enable mode Dev
*       - Option to disable ModPagespeed
*       - Option to disable media servers
*       - Works better with virtual uri
*       - Fix truncated file name with long link in tar file
* Version 1.3.0 :
*		- Add maintenance page to everyone but specified ip address
* Version 1.2.0 :
*       - Add option to disable cache
* Version 1.1.0 :
*		- New design
*		- Add option to create new super admin
*		- Add option to delete customers emails
*		- Add option to disable SSL
*		- Add option to change table prefix
*		- Add option to change files and folders access rights
*		- Add option to not restore files
*		- Add option to not restore database
*       - Fix untar long filename restoration
* Version 1.0.1 :
*		- Fix Mysql UTF-8 encoding
*		- Fix untar zero size files
*		- Fix folder access rights
* Version 1.0.0 :
*		- First version for prestashop 1.5 and 1.6
*/

$l = i18n();

if($my_ip && !tools::check_ip($my_ip)) {
    tools::display_maintenance_page($l);
}

define('VERSION', '13.1.3');
define('MODULE_PATH', 'modules/ntbackupandrestore/backup/');
define('DUMP_FILE', 'modules/ntbackupandrestore/backup/dump.sql');
define('DUMP_FILE_ALONE', 'dump.sql');
define('DUMP_FILE_NAME', 'dump');
define('DUMP_FILE_EXT', 'sql');
define('SETTINGS_FILE', 'config/settings.inc.php');
define('SETTINGS_FILE_17', 'app/config/parameters.php');
define('SETTINGS_FILE_17_VERSION', 'app/AppKernel.php');
define('DEFINES_FILE', 'config/defines.inc.php');
define('HTACCESS_FILE', '.htaccess');
define('HTACCESS_REPLACE_FILE', '.htaccess.ntbr.origin');
define('HTACCESS_NTBR_FILE', 'htaccess.ntbr');
define('MAINTENANCE_FILE', 'index.html');
define('LOCK_FILE', '.lockntbr');
define('ACTIVATE_LOG', true);
define('LOG_DATE_FORMAT', 'd/m/Y H:i:s');
define('LOG_FILE', 'log.txt');
define('LASTLOG_FILE', 'lastlog.txt');
define('CONFIG_FILE', 'config.txt');
define('FILE_ACCESS_RIGHTS', 644);
define('FOLDER_ACCESS_RIGHTS', 755);
define('TIME_LIMIT', 7200);
define('MEMORY_LIMIT', 128);
define('MAX_TIME_BEFORE_REFRESH', 25); // in seconds
define('MIN_TIME_BEFORE_REFRESH', 1); // in seconds
define('MAX_TIME_BEFORE_PROGRESS_REFRESH', 1); // in seconds
define('MAX_WEIGHT_REFRESH', 4294967296); // The max size of the file must be 4Gb to use the refresh
define('MYSQL_DEFAULT_DELIMITER', ';'); // Default delimiter in mysql, typically : ';'

$auto = (isset($_GET['cron']) && $_GET['cron'] == 'true') ? true : false;
$from_module = (isset($_GET['from_module']) && $_GET['from_module'] == 'true') ? true : false;

// If it's a refresh
if (isset($_GET['refresh']))
{
    // continu where we were
    $restore = new NtRestore();
    $result = $restore->restore(true);

    if (file_exists(LOCK_FILE)) {
        Tools::fileDelete(LOCK_FILE);
    }

    if ($result) {
        // If the hash is still the same (so it's still our file), delete it
        if ($restore->hash_file_maintenance == md5_file(MAINTENANCE_FILE)) {
            Tools::fileDelete(MAINTENANCE_FILE);
        }

        if ($auto) {
            die('OK');
        } else {
            die(json_encode(array(
                'result' => 1,
                'warnings' => $restore->warnings
            )));
        }
    } else {
        if ($auto) {
            die('Error');
        } else {
            die(json_encode(array(
                'result' => 0,
                'warnings' => $restore->warnings
            )));
        }
    }

    die();
}

/* Ajax : Returning last log */
if (isset($_GET['lastlog']))
{
    if(!file_exists(LASTLOG_FILE))
        Tools::log(l('Starting restoration'));
    die('{"lastlog":'.json_encode(file_get_contents(LASTLOG_FILE)).'}');
}

if (isset($_GET['deletelastlog']))
{//Delete last log file
    Tools::fileDelete(LASTLOG_FILE);
    die('{"deletelastlog":"OK"}');
}

if (isset($_GET['deletelock'])) {
    if (!file_exists(LOCK_FILE)) {
        // If there is no lock return OK
        die('{"deletelock":"OK"}');
    } elseif (Tools::fileDelete(LOCK_FILE)) {
        // If the lock was deleted return OK
        die('{"deletelock":"OK"}');
    }

    // If there is still a lock return NOK
    die('{"deletelock":"'.l('The lock could not be deleted.').'"}');
}

if (isset($_GET['get_collation'])) {
    // Get available collation
    $list_collations = array();

    $db_server = (isset($_GET['db_server'])) ? $_GET['db_server'] : '';
    $db_name = (isset($_GET['db_name'])) ? $_GET['db_name'] : '';
    $db_user = (isset($_GET['db_user'])) ? $_GET['db_user'] : '';
    $db_passwd = (isset($_GET['db_passwd'])) ? $_GET['db_passwd'] : '';

    if ($db_server == '' || $db_name == '' || $db_user == '') {
        die(json_encode(array(
            'list_collations' => $list_collations,
            'error' => l('Database parameters are not valid.'),
        )));
    }

    $db_port = '';
    $posport = strpos($db_server, ':');

    if ($posport !== false) {
        $db_server = substr($db_server, 0, $posport);
        $db_port= substr($db_server, $posport+1);
    }

    $db = new Dbn($l);

    if (!$db->connect($db_name, $db_user, $db_passwd, $db_server, $db_port)) {
        die(json_encode(array(
            'list_collations' => $list_collations,
            'error' => l('Unable to connect to the database').' '.$db->getError(),
        )));
    }

    $req_default_charset = 'SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = "'.$db_name.'" LIMIT 1;';
    $res_default_charset = $db->query($req_default_charset);

    if ($res_default_charset === false || !isset($res_default_charset[0])) {
        $res_default_charset = false;
    } else {
        $res_default_charset = $res_default_charset[0]['DEFAULT_CHARACTER_SET_NAME'];
    }

    $res_collations = $db->query('SHOW COLLATION');

    if ($res_collations === false || !isset($res_collations[0]))
    {
        die(json_encode(array(
            'list_collations' => $list_collations,
            'error' => l('Available collations cannot be found').' '.$db->getError(),
        )));
    }

    foreach ($res_collations as $collation) {
        $list_collations[] = array(
            'collation' => $collation['Collation'],
            'charset' => $collation['Charset'],
            'default' => ($res_default_charset && $collation['Charset'] != $res_default_charset)?'':$collation['Default'], // Only want default collation of default charset
        );
    }

    die(json_encode(array(
            'list_collations' => $list_collations,
            'error' => '',
    )));
}

if (isset($_GET['get_engine'])) {
    // Get available storage engine
    $list_engines = array();

    $db_server = (isset($_GET['db_server'])) ? $_GET['db_server'] : '';
    $db_name = (isset($_GET['db_name'])) ? $_GET['db_name'] : '';
    $db_user = (isset($_GET['db_user'])) ? $_GET['db_user'] : '';
    $db_passwd = (isset($_GET['db_passwd'])) ? $_GET['db_passwd'] : '';

    if ($db_server == '' || $db_name == '' || $db_user == '') {
        die(json_encode(array(
            'list_engines' => $list_engines,
            'error' => l('Database parameters are not valid.'),
        )));
    }

    $db_port = '';
    $posport = strpos($db_server, ':');

    if ($posport !== false) {
        $db_server = substr($db_server, 0, $posport);
        $db_port= substr($db_server, $posport+1);
    }

    $db = new Dbn($l);

    if (!$db->connect($db_name, $db_user, $db_passwd, $db_server, $db_port)) {
        die(json_encode(array(
            'list_engines' => $list_engines,
            'error' => l('Unable to connect to the database').' '.$db->getError(),
        )));
    }

    $res_engines = $db->query('SELECT * FROM information_schema.engines WHERE support <> "NO" AND engine NOT IN ("PERFORMANCE_SCHEMA", "BLACKHOLE");');

    if ($res_engines === false || !isset($res_engines[0]))
    {
        die(json_encode(array(
            'list_engines' => $list_engines,
            'error' => l('Available storage engines cannot be found').' '.$db->getError(),
        )));
    }

    foreach ($res_engines as $engine) {
        $list_engines[] = array(
            'engine' => $engine['ENGINE'],
            'default' => ($engine['SUPPORT'] == 'DEFAULT')?true:false,
        );
    }

    die(json_encode(array(
            'list_engines' => $list_engines,
            'error' => '',
    )));
}

if (isset($_GET['check_system']))
{// check system compatibility for the Prestashop version
    $match = array();
    $ps_version = '';
    $php_version = substr(phpversion(), 0, 3);
    $php_min = '5.2';
    $php_max = '7.4';
    $file_ps_version_path = SETTINGS_FILE;
    $check_system = '';

    // Check PHP version for the prestashop version
    if (file_exists(SETTINGS_FILE_17_VERSION)) {
        $file_ps_version_path = SETTINGS_FILE_17_VERSION;
    }

    if (($file_ps_version = fopen($file_ps_version_path, 'r')) === false) {
        Tools::log(l('Error while retrieving Prestashop version, unable to read the file with the information'));
    } else {
        //File is open for reading, read each line of the file
        while (!feof($file_ps_version)) {
            $line = fgets($file_ps_version);

            if ($file_ps_version_path == SETTINGS_FILE) {
                preg_match('/define[\s]*\([\s]*\'_PS_VERSION_\'[\s]*,[\s]*\'([1-9.]+)\'/', $line, $match);

                if (isset($match[1])) {
                    $ps_version = $match[1];
                    break;
                }
            } else {
                preg_match('/const[\s]*VERSION[\s]*\=[\s]*\'([1-9.]+)\'/', $line, $match);

                if (isset($match[1])) {
                    $ps_version = $match[1];
                    break;
                }
            }
        }

        fclose($file_ps_version);

        if ($ps_version == '') {
            Tools::log(l('Error while retrieving Prestashop version, unable to find the version'));
        }
    }

    if ($ps_version == '') {
        $check_system .= (($check_system != '')?'</br>':'').sprintf(l('We cannot make sure your PHP version (%s) is compatible with your Prestashop version. You can check it on:'), $php_version)
            .'<a href="https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/" target="_blank">https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/</a>';
    } elseif (version_compare($ps_version, '1.7.9', '>') === true) { // We do not know yet the requirement for higher version than 1.7.8
        $check_system .= (($check_system != '')?'</br>':'').sprintf(l('Please make sure your PHP version (%1$s) is compatible with your Prestashop version (%2$s). You can check it on:'), $php_version, $ps_version)
        .'<a href="https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/" target="_blank">https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/</a>';
    } else {
        if (version_compare($ps_version, '1.7.7', '>=') === true) {
            // Prestashop version at least at 1.7.7
            $php_min = '7.1';
        } elseif (version_compare($ps_version, '1.7.4', '>=') === true) {
            // Prestashop version at least at 1.7.4
            $php_min = '5.6';
        } elseif (version_compare($ps_version, '1.7.0', '>=') === true) {
            // Prestashop version at least at 1.7.0
            $php_min = '5.4';
        }

        if (version_compare($ps_version, '1.6.1', '<') === true) {
            // Prestashop version lower than 1.6.1
            $php_max = '5.6';
        } elseif (version_compare($ps_version, '1.7.5', '<') === true) {
            // Prestashop version lower than 1.7.5
            $php_max = '7.1';
        } elseif (version_compare($ps_version, '1.7.7', '<') === true) {
            // Prestashop version lower than 1.7.7
            $php_max = '7.2';
        } elseif (version_compare($ps_version, '1.7.8', '<') === true) {
            // Prestashop version lower than 1.7.8
            $php_max = '7.3';
        } elseif (version_compare($ps_version, '1.7.9', '<') === true) {
            // Prestashop version lower than 1.7.9
            $php_max = '7.4';
        }

        if (version_compare($php_version, $php_min, '<') || version_compare($php_version, $php_max, '>')) {
            $check_system .= (($check_system != '')?'</br>':'')
                .sprintf(l('Your Prestashop version (%1$s) need a PHP version between %2$s and %3$s. Your current PHP version is %4$s'), $ps_version, $php_min, $php_max, $php_version);
        }
    }

    // Check if there are modification in the .htaccess file
    if (file_exists(HTACCESS_FILE)) {
        // Check if there are line before the line "# ~~start~~" or after the line "# ~~end~~"
        $file_htaccess_array = file(HTACCESS_FILE);
        $first_line = '';
        $last_line  = '';

        // Search the first (not empty) line
        foreach ($file_htaccess_array as $line) {
            if ($first_line == '') {
                $first_line = trim($line);
            }

            if ($first_line != '') {
                break;
            }
        }

        // Reverse the array to search for the latest line
        $reversed_array = array_reverse($file_htaccess_array);

        // Search the latest (not empty) line
        foreach ($reversed_array as $r_line) {
            if ($last_line == '') {
                $last_line = trim($r_line);
            }

            if ($last_line != '') {
                break;
            }
        }

        if (strpos($first_line, '# ~~start~~') === false || strpos($last_line, '# ~~end~~') === false) {
            $check_system .= (($check_system != '')?'</br>':'')
                .l('Prestashop .htaccess file seems to contain modifications from Prestashop original file. Please ensure the file is still valid for this new installation.');
        }
    }

    die('{"check_system":'.json_encode($check_system).'}');
}

$backup_parts = NtRestore::findBackup();

//get backup size
$backup_size = 0;

foreach ($backup_parts as $part) {
    $part_size = Tools::getFileSize($part);

    // In multipart, only keep the size of the biggest part
    if ($part_size > $backup_size) {
        $backup_size = $part_size;
    }
}

$count_backup_files = NtRestore::countBackup();

// Check if we are in localhost
$localhost = (strpos($_SERVER['SERVER_NAME'], 'localhost') === false)?0:1;

$htaccess_exists = false;

if (file_exists(HTACCESS_FILE)) {
    $htaccess_exists = true;
}

$limit_weight_refresh   = 0;
$is_windows             = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')?true:false;
$is_32_bits             = (PHP_INT_MAX == 2147483647)?1:0;

// If the backup is a .gz and we are using a 32bits PHP or the system is windows
// (gzseek is limited when in 32 bit and/or windows), we cannot use refresh with big files
if ((strpos($backup_parts[1], '.tar.gz') !== false) && ($is_32_bits || $is_windows) && $backup_size >= MAX_WEIGHT_REFRESH) {
    $limit_weight_refresh = 1;
}

$dump_only = (strpos($backup_parts[1], 'dump') !== false);
$display_btn_delete_lock = file_exists(LOCK_FILE)?true:false;

/* Ajax : Executing restoration */
if (isset($_GET['db_server']))
{
    $error = '';
    $opt = array();

    $db_server = (isset($_GET['db_server'])) ? $_GET['db_server'] : '';
    $db_name = (isset($_GET['db_name'])) ? $_GET['db_name'] : '';
    $db_user = (isset($_GET['db_user'])) ? $_GET['db_user'] : '';
    $db_passwd = (isset($_GET['db_passwd'])) ? $_GET['db_passwd'] : '';
    if($db_server == '')
        $error .= l('Database server is not valid.').'<br />';
    if($db_name == '')
        $error .= l('Database name is not valid.').'<br />';
    if($db_user == '')
        $error .= l('Database user is not valid.').'<br />';

    $opt['clean'] = (isset($_GET['clean']) && $_GET['clean'] == 'true') ? true : false;
    $opt['clean_files_before'] = (isset($_GET['clean_files_before']) && $_GET['clean_files_before'] == 'true') ? true : false;
    $opt['clean_data_before'] = (isset($_GET['clean_data_before']) && $_GET['clean_data_before'] == 'true') ? true : false;
    $opt['replace_htaccess'] = (isset($_GET['replace_htaccess']) && $_GET['replace_htaccess'] == 'true') ? true : false;

    $opt['change_shop_email'] = (isset($_GET['change_shop_email']) && $_GET['change_shop_email'] == 'true') ? true : false;
    if($opt['change_shop_email'])
    {
        $opt['shop_email'] = (isset($_GET['shop_email'])) ? $_GET['shop_email'] : '';
        if(!filter_var($opt['shop_email'], FILTER_VALIDATE_EMAIL))
            $error .= l('Shop email is not valid.').'<br />';
    }

    $opt['activate_refresh'] = (isset($_GET['activate_refresh']) && $_GET['activate_refresh'] == 'true') ? true : false;
    if($opt['activate_refresh'])
    {
        $opt['refresh_time'] = (int)(isset($_GET['refresh_time'])) ? $_GET['refresh_time'] : MIN_TIME_BEFORE_REFRESH;
        $opt['time_pause_between_refresh'] = (int)(isset($_GET['time_pause_between_refresh'])) ? $_GET['time_pause_between_refresh'] : 0;
        $opt['progress_refresh_time'] = (int)(isset($_GET['progress_refresh_time'])) ? $_GET['progress_refresh_time'] : MAX_TIME_BEFORE_PROGRESS_REFRESH;
    }

    $opt['create_super_admin'] = (isset($_GET['create_super_admin']) && $_GET['create_super_admin'] == 'true') ? true : false;
    if($opt['create_super_admin'])
    {
        $opt['super_admin_email'] = (isset($_GET['super_admin_email'])) ? $_GET['super_admin_email'] : '';
        $opt['super_admin_password'] = (isset($_GET['super_admin_password'])) ? $_GET['super_admin_password'] : '';
        $opt['super_admin_first_name'] = (isset($_GET['super_admin_first_name'])) ? $_GET['super_admin_first_name'] : '';
        $opt['super_admin_last_name'] = (isset($_GET['super_admin_last_name'])) ? $_GET['super_admin_last_name'] : '';
        if(!filter_var($opt['super_admin_email'], FILTER_VALIDATE_EMAIL))
            $error .= l('Super admin email is not valid.').'<br />';
        if($opt['super_admin_password'] == '')
            $error .= l('Super admin password is not valid.').'<br />';
        if($opt['super_admin_first_name'] == '')
            $error .= l('Super admin first name is not valid.').'<br />';
        if($opt['super_admin_last_name'] == '')
            $error .= l('Super admin last name is not valid.').'<br />';
    }

    $opt['delete_customers_emails'] = (isset($_GET['delete_customers_emails']) && $_GET['delete_customers_emails'] == 'true') ? true : false;
    $opt['disable_ssl'] = (isset($_GET['disable_ssl']) && $_GET['disable_ssl'] == 'true') ? true : false;
    $opt['disable_cache'] = (isset($_GET['disable_cache']) && $_GET['disable_cache'] == 'true') ? true : false;
    $opt['disable_modpagespeed'] = (isset($_GET['disable_modpagespeed']) && $_GET['disable_modpagespeed'] == 'true') ? true : false;
    $opt['disable_mediaservers'] = (isset($_GET['disable_mediaservers']) && $_GET['disable_mediaservers'] == 'true') ? true : false;
    $opt['enable_mode_dev'] = (isset($_GET['enable_mode_dev']) && $_GET['enable_mode_dev'] == 'true') ? true : false;

    $opt['change_table_prefix'] = (isset($_GET['change_table_prefix']) && $_GET['change_table_prefix'] == 'true') ? true : false;
    if($opt['change_table_prefix'])
        $opt['table_prefix'] = (isset($_GET['table_prefix'])) ? $_GET['table_prefix'] : '';

    $opt['change_access_rights'] = (isset($_GET['change_access_rights']) && $_GET['change_access_rights'] == 'true') ? true : false;
    if($opt['change_access_rights'])
    {
        $opt['file_access_rights'] = (int)(isset($_GET['file_access_rights'])) ? $_GET['file_access_rights'] : '';
        $opt['folder_access_rights'] = (int)(isset($_GET['folder_access_rights'])) ? $_GET['folder_access_rights'] : '';
        if($opt['file_access_rights'] < 600 || $opt['file_access_rights'] > 777)
            $error .= l('File access rights are not valid (should be between 600 and 777).').'<br />';
        if($opt['folder_access_rights'] < 600 || $opt['folder_access_rights'] > 777)
            $error .= l('Folder access rights are not valid (should be between 600 and 777).').'<br />';
    }

    $opt['change_collation'] = (isset($_GET['change_collation']) && $_GET['change_collation'] == 'true') ? true : false;

    if ($opt['change_collation']) {
        $collation_value = (isset($_GET['collation_value'])) ? $_GET['collation_value'] : '';

        $collation_charset = explode(' - ', $collation_value);

        if (!isset($collation_charset[0]) || !isset($collation_charset[1])) {
            if (!isset($collation_charset[0])) {
                $error .= l('Collation value not valid').'<br />';
            }

            if (!isset($collation_charset[1])) {
                $error .= l('Charset value not valid').'<br />';
            }
        } else {
            $opt['collation'] = $collation_charset[0];
            $opt['charset'] = $collation_charset[1];
        }
    }

    $opt['change_engine'] = (isset($_GET['change_engine']) && $_GET['change_engine'] == 'true') ? true : false;

    if ($opt['change_engine']) {
        $opt['engine'] = (isset($_GET['engine_value'])) ? $_GET['engine_value'] : '';
    }

    $opt['do_not_restore_files'] = (isset($_GET['do_not_restore_files']) && $_GET['do_not_restore_files'] == 'true') ? true : false;
    $opt['do_not_restore_database'] = (isset($_GET['do_not_restore_database']) && $_GET['do_not_restore_database'] == 'true') ? true : false;
    $opt['do_not_extract_database'] = (isset($_GET['do_not_extract_database']) && $_GET['do_not_extract_database'] == 'true') ? true : false;

    $opt['disable_no_auto_value_on_zero'] = (isset($_GET['disable_no_auto_value_on_zero']) && $_GET['disable_no_auto_value_on_zero'] == 'true') ? true : false;
    $opt['ignore_sql_errors'] = (isset($_GET['ignore_sql_errors']) && $_GET['ignore_sql_errors'] == 'true') ? true : false;

    if($error != '')
    {//Errors happened
        Tools::log('ERR'.l('Error:').' <br />'.$error);
        die(print_r($_REQUEST, true).l('Error:').' <br />'.$error);
    }

    //Everything is good, we can start the restoration
    $restore = new NtRestore($db_server, $db_name, $db_user, $db_passwd, $opt, $l, $auto, $from_module, $dump_only);
    $result = $restore->restore();

    if (file_exists(LOCK_FILE)) {
        Tools::fileDelete(LOCK_FILE);
    }

    if ($result) {
        // If the hash is still the same (so it's still our file), delete it
        if ($restore->hash_file_maintenance == md5_file(MAINTENANCE_FILE)) {
            Tools::fileDelete(MAINTENANCE_FILE);
        }

        if ($auto) {
            die('OK');
        } else {
            die(json_encode(array(
                'result' => 1,
                'warnings' => $restore->warnings
            )));
        }
    } else {
        if ($auto) {
            die('Error');
        } else {
            die(json_encode(array(
                'result' => 0,
                'warnings' => $restore->warnings
            )));
        }
    }

    die();
}

/**
* Return language translation
*
* @return array Translation array
*/
function i18n()
{
    global $t;
    $lang = 'en'; //Default language

    if(!isset($_GET['l']))
        $_GET['l'] = $lang;

    foreach($t as $language => $translation)
    {
        if($language === $_GET['l'])
        {
            $lang = $language;
            break;
        }
    }
    return $t[$lang];
}

/**
* Return the translation of text in the selected language
*
* @param string $text Text to translate
* @return string Translated text
*/
function l($text)
{
    global $l;
    if(isset($l[$text]))
        return $l[$text];
    return $text;
}

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title><?php echo l('Nt Restoration for Prestashop'); ?></title>
    <script type="text/javascript">
        /*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
        !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
        return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)),
        void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n});
    </script>
    <style type="text/css">
        body{
            width: 700px;
            margin: auto;
            padding: 20px;
            background-color: #ffffff;
            color: #0f70b7;
            font-size: 90%;
            font-family: verdana;
        }
        #title{
            font-size: 2em;
            padding-bottom: 10px;
            text-align: center;
            font-weight: 700;
        }
        #flags_list {
            padding-bottom: 30px;
            min-height: 11px;
            text-align: center;
        }
        .flag{
            width: 16px;
            height: 11px;
            display: inline-block;
            padding-right: 5px;
            background-repeat: no-repeat;
        }
        .flag_fr{
            background-image: url("data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYiyeepkBBv79+Zfnx/f379+fP38CyT9//jAyMiq5GP77wvDnJ8MfoAIGBoAAYgGqC7STApL///3/9++/pCTv////Qdz/QO4/IMna0vf/z+9/v379//37bUUTQACBNDD8Z/j87fffvyAVX79+/Q8GQDbQeKA9fM+e/Pv18/+vnwzCIkBLAAKQOAY5AIAwCEv4/4PddNUm3ji0QJyxW3rgzE0iLfqDGr2oYuu0l54AYvnz5x9Q6d+/QPQfyAQqAin9B3EOyG1A1UDj//36zfjr1y8GBoAAFI9BDgAwCMIw+P8Ho3GDO6XQ0l4MN8b2kUwYaLszqgKM/KHcDXwBxAJUD3TJ779A8h9Q5D8SAHoARP36+Rfo41+/mcA2AAQQy49ff0Cu//MPpAeI/0FdA1QNYYNVA/3wmwEYVgwMAAHE8uPHH5BqoD1//gJJLADoJKDS378Z//wFhhJAALF8A3rizz8uTmYg788fJkj4QOKREQyYxSWBhjEC/fcXZANAALF8+/anbcHlHz9+ffvx58uPX9KckkCn/gby/wLd8uvHjx96k+cD1UGiGQgAAgwA7q17ZpsMdUQAAAAASUVORK5CYII=");
        }
        .flag_en{
            background-image: url("data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHzSURBVHjaYkxOP8IAB//+Mfz7w8Dwi4HhP5CcJb/n/7evb16/APL/gRFQDiAAw3JuAgAIBEDQ/iswEERjGzBQLEru97ll0g0+3HvqMn1SpqlqGsZMsZsIe0SICA5gt5a/AGIEarCPtFh+6N/ffwxA9OvP/7//QYwff/6fZahmePeB4dNHhi+fGb59Y4zyvHHmCEAAAW3YDzQYaJJ93a+vX79aVf58//69fvEPlpIfnz59+vDhw7t37968efP3b/SXL59OnjwIEEAsDP+YgY53b2b89++/awvLn98MDi2cVxl+/vl6mituCtBghi9f/v/48e/XL86krj9XzwEEEENy8g6gu22rfn78+NGs5Ofr16+ZC58+fvyYwX8rxOxXr169fPny+fPn1//93bJlBUAAsQADZMEBxj9/GBxb2P/9+S/R8u3vzxuyaX8ZHv3j8/YGms3w8ycQARmi2eE37t4ACCDGR4/uSkrKAS35B3TT////wADOgLOBIaXIyjBlwxKAAGKRXjCB0SOEaeu+/y9fMnz4AHQxCP348R/o+l+//sMZQBNLEvif3AcIIMZbty7Ly6t9ZmXl+fXj/38GoHH/UcGfP79//BBiYHjy9+8/oUkNAAHEwt1V/vI/KBY/QSISFqM/GBg+MzB8A6PfYC5EFiDAABqgW776MP0rAAAAAElFTkSuQmCC");
        }
        .flag_da{
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGBSURBVHjaYvzIwPCPAQqADIG/f/+9evVBUvIfmIuM/oDVAAQQC5DFUV0NV v4PiBgZGZl4eblLiv99/fb/z5//v38zgEkg+9/v3y83bQIIIBawtv//njxl+Pv3PxABwd+/f+8//PflM0jdr9//f//6/+sXUDWTrCzQdIAALM1BDgBADAFA/f+PSahm9+YwuAc4X3ev7cSiHz0ts0EjEVgBOBpzGwAAEAQS99/WDkgU7e95IWi+NuQ7VE03KHz7KiRykwKvAGIE2g90938wgBj//x/QRob/GICRienjhw8AAcTCAJdjAEOwvv/YACPIqH8AAcTyipmZNyvr7/37IFf9+sW1a9f/jx+/+Pr9+/wJ4h6IB4CyLEpKT86dAwggsA2QgAO6FUhCLPv1k+HnT6ggUMMfYOD+BXoV6AeAAAJ5+v/vP0ySkmBj/oICmZkZGIIMX74wQoL/zx+mv2DVf0GyAAHE+BQchZCIBCKxt2//PHr0xtAQLghJB5BoZmJgAAgwAAauWfWiVmegAAAAAElFTkSuQmCC')
        }
        .flag_sv{
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGwSURBVHjaYmRwbmSAgb919Qz/GICIuayU4dc/hl+/GH79YfjxC8H4/QsggFiA6qpzPYHkv3//GZW/Mfz7+5/hb26J35+////8/QdEv//+BZH/QIxNuZMBAogFbPT/J++//f33n+Hno///fzP8/3v/9effQEV//gIV/frz9xeQ/fuvrDA3A8MvgABiAZr87x8DUPWfn6wQ1f///WJh/PHtD9MvsJ5fYPT7H1Az0Lm/AAKI8e9BBkalMoZfQLP/MPz/8//fbxD6Dyb//QIjMOP/b0Z2+U97DwIEEAvDHwaQqSAVMA3/f0G1IVSDGAz//gCVAAQQ0EkM/0Hq/gBFgUJIGpBIsAgj0Od/GAACiJFBvzirLOD+m4/AoNjq3gu26pf52pLff/6A/PCD6dcfYPj8+/Pnr7IY39nWSQABxMLw488fkIf+/v7zD2bYr19A1aAg+gcM/98Mf/8w/vvDBETsDAxPAAKIBRgpQKWS/NzAAGFgk2YABtS/37JCPKCwB7r531+gOX///gOhf6BIBQggRgbJZHhEvp2zFhgGQIeKptsygELjFwz9A3OBJANAgAEA3Ll5iCfmAhAAAAAASUVORK5CYII=')
        }
        .flag_de{
            background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYvTxcWb4+53h3z8GZpZff/79+v3n/7/fDAz/GHAAgABi+f37e3FxOZD1Dwz+/v3z9y+E/AMFv3//+Qumfv9et241QACxMDExAVWfOHkJJAEW/gUEP0EQDn78+AHE/gFOQJUAAcQiy8Ag8O+fLFj1n1+/QDp+/gQioK7fP378+vkDqOH39x9A/RJ/gE5lAAhAYhzcAACCQBDkgRXRjP034R0IaDTZTFZn0DItot37S94KLOINerEcI7aKHAHE8v/3r/9//zIA1f36/R+o4tevf1ANYNVA9P07RD9IJQMDQACxADHD3z8Ig4GMHz+AqqHagKp//fwLVA0U//v7LwMDQACx/LZiYFD7/5/53/+///79BqK/EMZ/UPACSYa/v/8DyX9A0oTxx2EGgABi+a/H8F/m339BoCoQ+g8kgRaCQvgPJJiBYmAuw39hxn+uDAABxMLwi+E/0PusRkwMvxhBGoDkH4b/v/+D2EDyz///QB1/QLb8+sP0lQEggFh+vGXYM2/SP6A2Zoaf30Ex/J+PgekHwz9gQDAz/P0FYrAyMfz7wcDAzPDtFwNAgAEAd3SIyRitX1gAAAAASUVORK5CYII=");
        }
        .flag_zh_tw{
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFjSURBVHjaYmRQ38wAB3/+gdCvfww//jx8Hy7BwPAPAwEEEAtQWUutDpA0EmZnZmI68vTL338Mf//+FbhQwPznK9Pv3////PkPI79s2gQQQCwQo0W+/nMOFWdlZXww+8vhN9///Pn3596Df78//f/1+//vX/9//QKqZpSVBdoAEEAsQGv+/fv3+9dfBgag4L/v3//8/vsPqAGqFKT6N0QDA1CagQEggFgY/vz5+5fhwo/fNXPu/fn379nHn3/+/vsNNAPJbLgGoFsAAoiF4RdQ2b+/f/4+f/cHaPDvv/+BHgAy2H9/QaiGaACKMjAABBDL36ehDJfy/z94ADSP4TfYf0jOQCYZwU4CCCAWIGYECwENQFGEqhokC3QBAwNAAIE0MIODjAGuCFPbH6CGv8DABvoBIIBAGph+/2GQlAQb85fhD0gnI9hIBggJRH//QhBQMUAAMX5FjUgGbLELlwICgAADAElTZuDmjaewAAAAAElFTkSuQmCC');
        }
        .flag_zh_cn{
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFqSURBVHjaYrzOwPAPjJgYQEDAleHVbhADIvgHLPgHiQ0QQCxAlkR9NW8sw+cV/1gV/7Gb/hV4+vfzhj8Mv/78//Pn/+/f/8AkhH1t0yaAAAJp4I37zyz2lDfu79uqv/++/WYz+cuq/vvLxt8gdb+A5K9/v34B2SyyskBLAAII5JAva/7/+/z367a/f3/8ZuT9+//Pr78vQUrB6n4CSSj6/RuoASCAWEDO/fD3ddEfhv9/OE3/sKj8/n7k9/fDQNUIs/+DVf8HawAIIJCT/v38C3Hr95N/GDh/f94AVvT7N8RUBpjxQAVADQABBNLw/y/Ifwy/f/399ufTOpDBEPf8g5sN0QBEDAwAAQTWABEChgOSA9BVA00E2wAQQCANQBbEif/AzoCqgLkbbBYwWP/+//sXqBYggFhAkfL7D7OkJFCOCSj65zfUeFjwg8z++/ffX5AGoGKAAGI8jhSRyIw/SJH9D4aAYQoQYAA6rnMw1jU2vQAAAABJRU5ErkJggg==');
        }
        .flag_it{
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYmSYyMDwgwEE/jEw/GF4mvT0HyqQUlX9B5aEIIAAYmH4wlDtWg1SDwT//0lKSv7/D+T9/w+nYmL+//79/88fIPll0yaAAGJhYAGJP/n69O+/v0CAUAcHt2////ULqJpRVhZoA0AAsQCtAZoMVP0HiP7+RlcNBEDVYA0Mv38DNQAEEMj8vwx//wCt/AdC/zEBkgagYoAAYgF6FGj277+///wlpAEoz8AAEEAgDX/BZv/69wuoB48GRrCTAAKICajh9//fv/6CVP/++wu7BrDxQFf/YWAACCCwk0BKf0MQdg1/gBqAPv0L9ANAALEAY+33vz+S3JIgb/z5C45CBkZGRgY4UFICKQUjoJMAAoiRoZSB4RMojkHx/YPhbNVZoM3AOISQQPUK9vaQOIYAgAADAC5Wd4RRwnKfAAAAAElFTkSuQmCC');
        }
		.flag_ru{
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYvz69T8DAvz79w9CQVj/0MCffwwAAcQClObiAin6/x+okxHMgPCAbOb//5n+I4EXL74ABBALxGSwagTjPzbAyMgItAQggBg9Pf9nZPx//x7kjL9////9C2QAyf9//qCQQCQkxFhY+BEggFi2b/+nq8v46BEDSPQ3w+8//3//BqFfv9BJeXmQEwACCOSkP38YgHy4Bog0RN0vIOMXVOTPH6Cv/gEEEEgDxFKgHEgDXCmGDUAE1AAQQCybGZg1f/d8//XsH0jTn3+///z79RtE/v4NZfz68xfI/vOX+4/0ZoZFAAHE4gYMvD+3/v2+h91wCANo9Z+/jH9VxBkYAAKIBRg9TL//MEhKAuWAogxgZzGC2CCfgUggAoYdGAEVAwQQ41egu5AQAyoXTQoIAAIMAD+JZR7YOGEWAAAAAElFTkSuQmCC');
        }
		.flag_fa{
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGSSURBVHjaYmSYyMDwgwEK/jEw/IGRyOgXjGRhAAggFoYvDNWu1SDFQMDw7++/v3/+/f37/8+ffxD0+/ffP3/+g8jff39vmrEJIIBYgJoYGRiffH367/9fuKI////++vv7z9/fv/79Aqr79RdI/pLllWNgYgAIADEAzv8Et1q3EgYSEAYQ5PXkGgoa4fPhHAsd3/PfHAob4PXiHQkb3vLeHgse2/HbKhEq9Fb0Aojx79+/jIyMQCf9//+fAQz/f//5//Ch///+/7e2/s/B9h8GgMo+ffoEEEBMEN9CxSD0imX/37z+z8byf9GC/8gA7E+AAGJCVw0EMTH/nz79f+LE/8REFPX//wM1AAQQcy07O4OKyv8zZxh+/vp/8eL/nz9BpJ7+fxYWoDxIG1DkxAmG798Zrlz5smsHQAAx/mRgYM7M/HfvHsOvX8DQAyE4A4nNAPSqsvLbc+cAAogFGEtMP34yiImBRP/8Zfjzm+H3b0YQ+w8DhASiv39B6NcvoGKAAGL8Co5ZOGJA5aJJAQFAgAEA8eJIJDc4COoAAAAASUVORK5CYII=');
        }
        #msg{
            min-height: 50px;
            padding: 10px;
            font-size: 1.4em;
            margin-bottom: 20px;
        }
        .ok{
            background-color: #98dc98;
            border: 1px solid #0d920d;
            color: #0d920d;
        }
        .error{
            background-color: #ffc1c1;
            border: 1px solid #bc1a1a;
            color: #bc1a1a;
        }
        .warning{
            background-color: #ffe3c1;
            border: 1px solid #bc661a;
            color: #bc661a;
            font-size: 1.4em;
            padding: 10px;
            margin-bottom: 20px;
        }
        .msg_error,
        #msg_replace_htaccess,
        #msg_limit_weight_refresh {
            color: #bc1a1a;
        }
        .finish{
            font-size: 2.5em;
        }
        fieldset,
        .msg_error,
        #msg_limit_weight_refresh {
            border: 0px;
            font-size: 1.4em;
            margin-bottom: 20px;
            border-radius: 3px;
        }
        fieldset legend{
            font-weight: 700;
            padding-bottom: 20px;
        }
        .param{
            clear: both;
        }
        select,
        input{
            float: right;
            width: 400px;
            font-size: 1em;
            margin-bottom: 10px;
            height: 1.4em;
            border: 1px solid #6288f2;
            padding-left: 1px;
            border-radius: 3px;
            color: #0f70b7;
        }
        .param select,
        .param input{
            width: 230px;
        }
        .btn{
            float: left;
            width: 700px;
            font-size: 1.4em;
            margin-bottom: 30px;
            height: 100%;
            border: 1px solid #7caaf9;
            padding: 10px 0px 10px 0px;
            border-radius: 3px;
            background-color: #fff;
            color: #0f70b7;
            text-align: center;
        }
        .btn:hover{
            background-color: #f8f9ff;
            border: 1px solid #6288f2;
            cursor:pointer;
        }
        .noise {
            position: relative;
            z-index: 1;
        }
        .noise:before, .body-noise:before {
            content: "";
            position: absolute;
            opacity: 0.4;
            z-index: -1;
            top:0;
            bottom:0;
            left:0;
            right:0;
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wFDg0lF+LvSMQAAAAMaVRYdENvbW1lbnQAAAAAALyuspkAAARzSURBVGje3VrZbuMwDKQO15Yl/f+H9tgtemRfZICZDCWl7aJpDQRxI5mkeAwP14lIEZEHubw2EfkLv3kReReRJCKh/aafjSLy2u5L2ysi8qT2LCJyJyLPjcaziFQROYmIE5H7ti8r/l5EVkXjpX0/t++qBRS1uTZB8KqNGe4XxTwDcUdoHDwjrB1/74T3qgUGhbvjJsOmrO71gZzY10Gwqr8PC2hBN8LDoscU6o0DnT1YiDZ9c4HSPq4jRBkId1gyEGsgjawsnmFNKzRpWtkwP1ogtb2RmD+Au0TjELXRKIr+Zuxjgu+W8jIRVojvHpYIxKfRStWgmUkcZBKfTtGtsO50XIhxQhYDjvh36uyPxoEK7B+5IQMhDwrbNeAwhAhEg7hWDe0zF91hn5e5KwNgFPiuTOOeMKjkfoWc8JGgXxqvBBYOHe/YyUEor5VoPU5qrhDiydCuAy/IzWW9YTHtFUzG0nOFnplvPoEmwG50n1uH6AsXCaC9DIlMOnC9EAidsTa6yK4OuXXonOWZTPxZ47jruBgTJrcDab/2ygIYSwfIoObdtahaDaSwNOhAmAB+PgMQ1XBf6fDE50OPOBZki5Hpe+i0qrVIrJlU7Rbb/nWQEFNH5jKC+0IeQGgMHQjGYNaVwU5833q2kIMW5H/USI+/ocH6tmrVsEAyUDIArwthD829Kg3sSoun9nlT8KwtdKfuH9r6CeBc12UPABhFKSeKyB/F+02h4JvidWKx4wyE+Km1l9lCJiJ8NRBPiPuVTrXrmiJmSno8UO7lttLJ4NWIpUrAoVevbR2rzRwqEXl3fZqZHmFUZhxDjE0BhBXYfpAUr+l3tpEvF9gUOl1kgHj5tti7pu6vkOSwNMFCskKQ1gnrsnyWZzayHOCNkwejnWVZO5NBArNGIT35TJwknat6CJAMzMcpinXtRoyMLGI1Y0PXSmpxmQj0ZAjtJ8v+lSghT7qZruvORqkZyuO9UyZvpNyP6r6q2CiGhusAimdQclEomRn89ipYIUM6K4ew2g0r6DhwQQsUFhgcUqjMAzP7TrngiRJyh+Y64VYVGrrFUnwhxOoHSgcrgyMari2+FkNJushMg0p5prs88/1IkluWy9cPRf22GTEyc2HzFsh0sX6kOrUOw7SCfp0hqa6Gazmrmu1c62yycYBCbO5qCebJEO5/A8qXjy6/o4S5cJV1ZDJSSMZBLHhSdicj7kZJ13pX050h/TQo/lzjT/zVkYbJD5qvJF9wbQROscSIRvUbiJV02xuNA3gVQ+zN8aJkcqOeP6qpxCMsvrTP1ojeq7U3EO6pMUttGvOs6OrpzAlc8F3NsUKje1IKelSzrqD46tHUPbPwzffl12RTLCmqEYAVcoWVmXuvBRaY38b22wJINhqMV31SzLr7wCprJ0AdmVnhf0CwAXhRfOOgtGEDjB/zVqo3iv09r6dvXdPXDL2HmV273vF62SlNbyowUcBMBIwTWX3Uv7P3JsOHqkpuCZjrXiEa2qygtQV6/88UiUVE8j+sSVpHBc0oNwAAAABJRU5ErkJggg==');
        }
        #version{
            text-align: right;
            padding: 3px;
            position: fixed;
            bottom: 0;
            right: 0;
        }
        .msg_error,
        #msg_limit_weight_refresh {
            padding-inline-start: 0.75em;
            padding-inline-end: 0.75em;
        }
        .onoffname{
            float: left;
            padding: 10px 0px 10px 0px;
        }
        .onoffswitch {
            position: relative; width: 75px; float: right;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox {
            display: none;
        }
        .onoffswitch-label {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner:before, .onoffswitch-inner:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner:before {
            content: "<?php echo l('Yes'); ?>";
            padding-left: 10px;
            background-color: #0f70b7; color: #FFFFFF;
        }
        .onoffswitch-inner:after {
            content: "<?php echo l('No'); ?>";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch {
            display: block; width: 18px; margin: 6px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 41px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s;
        }
        .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
            margin-left: 0;
        }
        .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
            right: 0px;
        }
        #loader_content {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: none;
        }
        #loader{
            position: absolute;
            top: 50%;
            left: 50%;
            height: 32px;
            width: 32px;
            display: block;
            background-image: url('data:image/gif;base64,R0lGODlhIAAgAPMAAGZmZv///4eHh6+vr5GRkaGhod3d3crKynx8fHV1dY2Njezs7Pv7+wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ/V/nmOM82XiHRLYKhKP1oZmADdEAAAh+QQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY/CZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB+A4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6+Ho7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq+B6QDtuetcaBPnW6+O7wDHpIiK9SaVK5GgV543tzjgGcghAgAh+QQJCgAAACwAAAAAIAAgAAAE7hDISSkxpOrN5zFHNWRdhSiVoVLHspRUMoyUakyEe8PTPCATW9A14E0UvuAKMNAZKYUZCiBMuBakSQKG8G2FzUWox2AUtAQFcBKlVQoLgQReZhQlCIJesQXI5B0CBnUMOxMCenoCfTCEWBsJColTMANldx15BGs8B5wlCZ9Po6OJkwmRpnqkqnuSrayqfKmqpLajoiW5HJq7FL1Gr2mMMcKUMIiJgIemy7xZtJsTmsM4xHiKv5KMCXqfyUCJEonXPN2rAOIAmsfB3uPoAK++G+w48edZPK+M6hLJpQg484enXIdQFSS1u6UhksENEQAAIfkECQoAAAAsAAAAACAAIAAABOcQyEmpGKLqzWcZRVUQnZYg1aBSh2GUVEIQ2aQOE+G+cD4ntpWkZQj1JIiZIogDFFyHI0UxQwFugMSOFIPJftfVAEoZLBbcLEFhlQiqGp1Vd140AUklUN3eCA51C1EWMzMCezCBBmkxVIVHBWd3HHl9JQOIJSdSnJ0TDKChCwUJjoWMPaGqDKannasMo6WnM562R5YluZRwur0wpgqZE7NKUm+FNRPIhjBJxKZteWuIBMN4zRMIVIhffcgojwCF117i4nlLnY5ztRLsnOk+aV+oJY7V7m76PdkS4trKcdg0Zc0tTcKkRAAAIfkECQoAAAAsAAAAACAAIAAABO4QyEkpKqjqzScpRaVkXZWQEximw1BSCUEIlDohrft6cpKCk5xid5MNJTaAIkekKGQkWyKHkvhKsR7ARmitkAYDYRIbUQRQjWBwJRzChi9CRlBcY1UN4g0/VNB0AlcvcAYHRyZPdEQFYV8ccwR5HWxEJ02YmRMLnJ1xCYp0Y5idpQuhopmmC2KgojKasUQDk5BNAwwMOh2RtRq5uQuPZKGIJQIGwAwGf6I0JXMpC8C7kXWDBINFMxS4DKMAWVWAGYsAdNqW5uaRxkSKJOZKaU3tPOBZ4DuK2LATgJhkPJMgTwKCdFjyPHEnKxFCDhEAACH5BAkKAAAALAAAAAAgACAAAATzEMhJaVKp6s2nIkolIJ2WkBShpkVRWqqQrhLSEu9MZJKK9y1ZrqYK9WiClmvoUaF8gIQSNeF1Er4MNFn4SRSDARWroAIETg1iVwuHjYB1kYc1mwruwXKC9gmsJXliGxc+XiUCby9ydh1sOSdMkpMTBpaXBzsfhoc5l58Gm5yToAaZhaOUqjkDgCWNHAULCwOLaTmzswadEqggQwgHuQsHIoZCHQMMQgQGubVEcxOPFAcMDAYUA85eWARmfSRQCdcMe0zeP1AAygwLlJtPNAAL19DARdPzBOWSm1brJBi45soRAWQAAkrQIykShQ9wVhHCwCQCACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq+E71SRQeyqUToLA7VxF0JDyIQh/MVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiRMDjI0Fd30/iI2UA5GSS5UDj2l6NoqgOgN4gksEBgYFf0FDqKgHnyZ9OX8HrgYHdHpcHQULXAS2qKpENRg7eAMLC7kTBaixUYFkKAzWAAnLC7FLVxLWDBLKCwaKTULgEwbLA4hJtOkSBNqITT3xEgfLpBtzE/jiuL04RGEBgwWhShRgQExHBAAh+QQJCgAAACwAAAAAIAAgAAAE7xDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfZiCqGk5dTESJeaOAlClzsJsqwiJwiqnFrb2nS9kmIcgEsjQydLiIlHehhpejaIjzh9eomSjZR+ipslWIRLAgMDOR2DOqKogTB9pCUJBagDBXR6XB0EBkIIsaRsGGMMAxoDBgYHTKJiUYEGDAzHC9EACcUGkIgFzgwZ0QsSBcXHiQvOwgDdEwfFs0sDzt4S6BK4xYjkDOzn0unFeBzOBijIm1Dgmg5YFQwsCMjp1oJ8LyIAACH5BAkKAAAALAAAAAAgACAAAATwEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq+E71SRQeyqUToLA7VxF0JDyIQh/MVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GGl6NoiPOH16iZKNlH6KmyWFOggHhEEvAwwMA0N9GBsEC6amhnVcEwavDAazGwIDaH1ipaYLBUTCGgQDA8NdHz0FpqgTBwsLqAbWAAnIA4FWKdMLGdYGEgraigbT0OITBcg5QwPT4xLrROZL6AuQAPUS7bxLpoWidY0JtxLHKhwwMJBTHgPKdEQAACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq+E71SRQeyqUToLA7VxF0JDyIQh/MVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GAULDJCRiXo1CpGXDJOUjY+Yip9DhToJA4RBLwMLCwVDfRgbBAaqqoZ1XBMHswsHtxtFaH1iqaoGNgAIxRpbFAgfPQSqpbgGBqUD1wBXeCYp1AYZ19JJOYgH1KwA4UBvQwXUBxPqVD9L3sbp2BNk2xvvFPJd+MFCN6HAAIKgNggY0KtEBAAh+QQJCgAAACwAAAAAIAAgAAAE6BDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfYIDMaAFdTESJeaEDAIMxYFqrOUaNW4E4ObYcCXaiBVEgULe0NJaxxtYksjh2NLkZISgDgJhHthkpU4mW6blRiYmZOlh4JWkDqILwUGBnE6TYEbCgevr0N1gH4At7gHiRpFaLNrrq8HNgAJA70AWxQIH1+vsYMDAzZQPC9VCNkDWUhGkuE5PxJNwiUK4UfLzOlD4WvzAHaoG9nxPi5d+jYUqfAhhykOFwJWiAAAIfkECQoAAAAsAAAAACAAIAAABPAQyElpUqnqzaciSoVkXVUMFaFSwlpOCcMYlErAavhOMnNLNo8KsZsMZItJEIDIFSkLGQoQTNhIsFehRww2CQLKF0tYGKYSg+ygsZIuNqJksKgbfgIGepNo2cIUB3V1B3IvNiBYNQaDSTtfhhx0CwVPI0UJe0+bm4g5VgcGoqOcnjmjqDSdnhgEoamcsZuXO1aWQy8KAwOAuTYYGwi7w5h+Kr0SJ8MFihpNbx+4Erq7BYBuzsdiH1jCAzoSfl0rVirNbRXlBBlLX+BP0XJLAPGzTkAuAOqb0WT5AH7OcdCm5B8TgRwSRKIHQtaLCwg1RAAAOwAAAAAAAAAAAA==');
        }
        #loader_background {
            background-color: #000;
            opacity: 0.2;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }
        #dump_only_message{
            display: none;
            clear: both;
        }

        <?php
            if($dump_only) {
                //echo '#options_files{display: none;}';
                echo '#dump_only_message{display: block;}';
            }

            if (!$display_btn_delete_lock) {
                echo '#delete_lock{display: none;}';
            } else {
                echo '#restore{display: none;}';
            }
        ?>
    </style>
</head>
<body class="noise">
    <div id="title"><?php echo l('Nt Restoration for Prestashop'); ?></div>
    <div id="flags_list">
        <a id="flag_en" class="flag flag_en" href="?l=en" title="English (English)"></a>
        <a id="flag_fr" class="flag flag_fr" href="?l=fr" title="Français (French)"></a>
        <a id="flag_it" class="flag flag_it" href="?l=it" title="Italiano (Italian)"></a>
        <a id="flag_da" class="flag flag_da" href="?l=da" title="Dansk (Danish)"></a>
        <a id="flag_sv" class="flag flag_sv" href="?l=sv" title="Svenska (Swedish)"></a>
        <a id="flag_de" class="flag flag_de" href="?l=de" title="Deutsch (German)"></a>
        <a id="flag_zh_tw" class="flag flag_zh_tw" href="?l=zh-tw" title="繁體中文 (Traditional Chinese)"></a>
        <a id="flag_zh_cn" class="flag flag_zh_cn" href="?l=zh-cn" title="中文 (Simplified Chinese)"></a>
        <a id="flag_ru" class="flag flag_ru" href="?l=ru" title="Русский (Russian)"></a>
        <a id="flag_fa" class="flag flag_fa" href="?l=fa" title="فارسى (Persian)"></a>
    </div>
    <div id="msg" title="<?php echo l('Message'); ?>" style="display:none;" class="ok"><?php echo l('Starting restoration'); ?></div>
    <div id="refresh" title="Refresh" style="display:none;" onclick="refreshLastlog();" class="btn"><?php echo l('Refresh'); ?></div>
    <div id="go_shop" title="<?php echo l('Go to your shop'); ?>" style="display:none;" onclick="goShop();" class="btn"><?php echo l('Go to your shop'); ?></div>
    <form id="params">
        <fieldset>
            <legend><?php echo l('Database connection parameters'); ?></legend>
            <div class="param">
                <label for="db_server" title="<?php echo l('Database server address. You can indicate the port by adding \':\' after the IP'); ?>">
                    <?php echo l('Database Host server'); ?> *
                </label>
                <input type="text" name="db_server" id="db_server" value="localhost" />
            </div>
            <div class="param">
                <label for="db_name" title="<?php echo l('Database name'); ?>">
                    <?php echo l('Database name'); ?> *
                </label>
                <input type="text" name="db_name" id="db_name" value=""/>
            </div>
            <div class="param">
                <label for="db_user" title="<?php echo l('Database login'); ?>">
                    <?php echo l('Database User'); ?> *
                </label>
                <input type="text" name="db_user" id="db_user" value=""/>
            </div>
            <div class="param">
                <label for="db_passwd" title="<?php echo l('Database password'); ?>">
                    <?php echo l('Database password'); ?>
                </label>
                <input type="password" name="db_passwd" id="db_passwd" value=""/>
            </div>
        </fieldset>
        <?php
        if ($limit_weight_refresh) {
        ?>
            <div id="msg_limit_weight_refresh">
                <?php
                    if ($is_windows) {
                        echo l('Your server architecture system (Windows) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")');
                    } else {
                        echo l('Your server architecture (32 bits) is not able to run intermediate renewals on big compressed files (> 2GB) so you need to either make sure your server timeout is big enough (so the restoration can reach the end of its process) or unzip your backup to use a .tar instead of a .tar.gz (you can create backups as .tar instead of .tar.gz in the module by using the advanced option "Do not compress backup")');
                    }
                ?>
            </div>
        <?php
        }
        if (isset($count_backup_files) && isset($count_backup_files['nb']) && $count_backup_files['nb'] > 1) {
        ?>
            <div class="msg_error">
        <?php
            echo l('More than one backup file found:')."<br/>- ".implode("<br/>- ", $count_backup_files['list']);
        ?>
            </div>
        <?php
        } elseif (isset($count_backup_files) && isset($count_backup_files['nb']) && $count_backup_files['nb'] < 1) {
            ?>
            <div class="msg_error">
        <?php
            echo l('No backup file found');
        ?>
            </div>
        <?php
        }
        ?>
        <?php
            if ($htaccess_exists) {
        ?>
        <fieldset>
            <div class="param" id="msg_replace_htaccess">
                <div class="onoffname"><?php echo l('A .htaccess file has been detected on your server. This will probably prevent your site from working well after restoration. Should the detected .htaccess file be replaced by the backup?'); ?></div>
                <div class="onoffswitch" title="<?php echo l('Replace .htaccess'); ?>">
                    <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="replace_htaccess" checked>
                    <label class="onoffswitch-label" for="replace_htaccess">
                        <span class="onoffswitch-inner"></span>
                        <span class="onoffswitch-switch"></span>
                    </label>
                </div>
            </div>
        </fieldset>
        <?php
            }
        ?>
        <div id="options_btn" class="btn"><?php echo l('Options'); ?></div>
        <fieldset id="options">
        <?php
            if (isset($count_backup_files) && isset($count_backup_files['nb']) && $count_backup_files['nb'] == 1) {
                if (isset($backup_parts) && isset($backup_parts[1])) {
        ?>
                    <div>
                        <label>
                            <?php echo l('File to restore:'); ?>
                        </label>
                        <span><?php echo $backup_parts[1]; ?> </span>
                    </div>
                    <br/>
        <?php
                }
            }
        ?>
            <div id="dump_only_message"><?php echo l('Only database will be restored'); ?></div>
            <div class="param">
                <div class="onoffname"><?php echo l('Clean'); ?></div>
                <div class="onoffswitch" title="<?php echo l('Delete backup file after restoration'); ?>">
                    <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="clean" checked>
                    <label class="onoffswitch-label" for="clean">
                        <span class="onoffswitch-inner"></span>
                        <span class="onoffswitch-switch"></span>
                    </label>
                </div>
            </div>
            <div class="param">
                <div class="onoffname"><?php echo l('Clean files before restore'); ?></div>
                <div class="onoffswitch" title="<?php echo l('Delete all files and directories before restoration'); ?>">
                    <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="clean_files_before">
                    <label class="onoffswitch-label" for="clean_files_before">
                        <span class="onoffswitch-inner"></span>
                        <span class="onoffswitch-switch"></span>
                    </label>
                </div>
            </div>
            <div class="param">
                <div class="onoffname"><?php echo l('Clean database before restore'); ?></div>
                <div class="onoffswitch" title="<?php echo l('Delete all datas in database before restoration'); ?>">
                    <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="clean_data_before">
                    <label class="onoffswitch-label" for="clean_data_before">
                        <span class="onoffswitch-inner"></span>
                        <span class="onoffswitch-switch"></span>
                    </label>
                </div>
            </div>
            <?php
            if (!$limit_weight_refresh) {
            ?>
            <div id="activate_refresh_time_block">
                <div class="param">
                    <div class="onoffname"><?php echo l('Intermediate renewal'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('The restore will be performed with interruption if the server timeout is not large enough.'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="activate_refresh" checked>
                        <label class="onoffswitch-label" for="activate_refresh">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div id="activate_refresh_time">
                    <div class="param">
                        <label for="refresh_time" title="<?php echo l('Duration of intermediate renewal.'); ?>">
                            <?php echo l('Duration of intermediate renewal.').' ('.sprintf(l('Current timeout: %d secondes'), ini_get('max_execution_time')).')'; ?> *
                        </label>
                        <input type="text" name="refresh_time" id="refresh_time" value="<?php echo MAX_TIME_BEFORE_REFRESH; ?>" />
                    </div>
                    <div class="param">
                        <label for="time_pause_between_refresh" title="<?php echo l('Duration between refresh'); ?>">
                            <?php echo l('Duration between refresh'); ?>
                        </label>
                        <input type="text" name="time_pause_between_refresh" id="time_pause_between_refresh" value="0" />
                    </div>
                </div>
            </div>
            <?php
                }
            ?>
            <div class="param">
                <label for="progress_refresh_time" title="<?php echo l('Duration between progress refresh'); ?>">
                    <?php echo l('Duration between progress refresh'); ?>
                </label>
                <input type="text" name="progress_refresh_time" id="progress_refresh_time" value="<?php echo MAX_TIME_BEFORE_PROGRESS_REFRESH; ?>" />
            </div>
            <div id="options_files">
                <div class="param">
                    <div class="onoffname"><?php echo l('Change shop email'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('You can provide a new shop contact email'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_shop_email">
                        <label class="onoffswitch-label" for="change_shop_email">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div id="change_shop_email_value">
                    <div class="param">
                        <label for="shop_email" title="<?php echo l('Email'); ?>">
                            <?php echo l('Email'); ?> *
                        </label>
                        <input type="text" name="shop_email" id="shop_email" value="" />
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Create super admin'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Create a new super admin'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="create_super_admin">
                        <label class="onoffswitch-label" for="create_super_admin">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div id="create_super_admin_value">
                    <div class="param">
                        <label for="super_admin_email" title="<?php echo l('Email'); ?>">
                            <?php echo l('Email'); ?> *
                        </label>
                        <input type="text" name="super_admin_email" id="super_admin_email" value="" />
                    </div>
                    <div class="param">
                        <label for="super_admin_password" title="<?php echo l('Password'); ?>">
                            <?php echo l('Password'); ?> *
                        </label>
                        <input type="password" name="super_admin_password" id="super_admin_password" value="" />
                    </div>
                    <div class="param">
                        <label for="super_admin_first_name" title="<?php echo l('First name'); ?>">
                            <?php echo l('First name'); ?> *
                        </label>
                        <input type="text" name="super_admin_first_name" id="super_admin_first_name" value="" />
                    </div>
                    <div class="param">
                        <label for="super_admin_last_name" title="<?php echo l('Last name'); ?>">
                            <?php echo l('Last name'); ?> *
                        </label>
                        <input type="text" name="super_admin_last_name" id="super_admin_last_name" value="" />
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Delete customers emails'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Delete all customers emails. Useful for dev local test shop'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="delete_customers_emails">
                        <label class="onoffswitch-label" for="delete_customers_emails">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Disable SSL'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Disable SSL mode. Useful if SSL was used and no SSL is available now'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_ssl" <?php echo (($localhost)?'checked':''); ?>>
                        <label class="onoffswitch-label" for="disable_ssl">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Disable cache'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Disable cache mode. Useful if cache was used and no cache is available now'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_cache">
                        <label class="onoffswitch-label" for="disable_cache">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Disable ModPagespeed'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_modpagespeed">
                        <label class="onoffswitch-label" for="disable_modpagespeed">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Disable media servers'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Disable media servers. Useful if media servers were used and there are not available now'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_mediaservers">
                        <label class="onoffswitch-label" for="disable_mediaservers">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Enable Mode Dev'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Enable Mode Dev. Useful for developers'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="enable_mode_dev">
                        <label class="onoffswitch-label" for="enable_mode_dev">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Change table prefix'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Change database table prefix'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_table_prefix">
                        <label class="onoffswitch-label" for="change_table_prefix">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div id="change_table_prefix_value">
                    <div class="param">
                        <label for="table_prefix" title="<?php echo l('Database table prefix'); ?>">
                            <?php echo l('Table prefix'); ?>
                        </label>
                        <input type="text" name="table_prefix" id="table_prefix" value="ps_" />
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Change access rights'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Change folders and files access rights'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_access_rights">
                        <label class="onoffswitch-label" for="change_access_rights">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div id="change_access_rights_value">
                    <div class="param">
                        <label for="file_access_rights" title="<?php echo l('File access rights, default: 644'); ?>">
                            <?php echo l('File access rights'); ?>
                        </label>
                        <input type="text" name="file_access_rights" id="file_access_rights" value="644" />
                    </div>
                    <div class="param">
                        <label for="folder_access_rights" title="<?php echo l('Folder access rights, default: 755'); ?>">
                            <?php echo l('Folder access rights'); ?>
                        </label>
                        <input type="text" name="folder_access_rights" id="folder_access_rights" value="755" />
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Change collation and charset'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Useful if the new database does not know the old collation or charset. This is usually the case when moving from mysql to mariadb or vice versa, or when database versions are different.'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_collation">
                        <label class="onoffswitch-label" for="change_collation">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div id="change_collation_value">
                    <div class="param">
                        <label for="collation_value" title="<?php echo l('Collations and charsets known by the database where the data will be restored'); ?>">
                            <?php echo l('Available collations and charsets'); ?>
                        </label>
                        <select name="collation_value" id="collation_value">
                            <option value="0"></option>
                        </select>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Change storage engine'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('The storage engine usually used is InnoDB but it is possible to choose another one.'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_engine">
                        <label class="onoffswitch-label" for="change_engine">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div id="change_engine_value">
                    <div class="param">
                        <label for="engine_value" title="<?php echo l('Make sure you know all storage engines specificities before you choose. In doubt choose InnoDb.'); ?>">
                            <?php echo l('Available storage engines'); ?>
                        </label>
                        <select name="engine_value" id="engine_value">
                            <option value="0"></option>
                        </select>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Do not restore files'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Do not restore files. Useful for testing'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="do_not_restore_files">
                        <label class="onoffswitch-label" for="do_not_restore_files">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Do not extract database'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Do not extract database. Only if your database is already extracted'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="do_not_extract_database">
                        <label class="onoffswitch-label" for="do_not_extract_database">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Do not restore database'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Do not restore database. Useful for testing'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="do_not_restore_database">
                        <label class="onoffswitch-label" for="do_not_restore_database">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Disable "NoAutoValueOnZero" SQL mode'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('Useful if mysql is limited and cannot restore the database'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_no_auto_value_on_zero">
                        <label class="onoffswitch-label" for="disable_no_auto_value_on_zero">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Ignore SQL errors'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('If there are errors in original database and restoration fails on SQL INSERT request, this option can bypass errors. This is especially useful on Duplicate Entries error.'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="ignore_sql_errors">
                        <label class="onoffswitch-label" for="ignore_sql_errors">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="param">
                    <div class="onoffname"><?php echo l('Attempt to disable server timeout'); ?></div>
                    <div class="onoffswitch" title="<?php echo l('To perform a complete restoration, the script needs some time. If the server stops the script before its end, the restoration is not complete. If you get an error, enable this option and increase your PHP max_execution_time.'); ?>">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_time_limit">
                        <label class="onoffswitch-label" for="disable_time_limit">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
            </div>
        </fieldset>
        <div id="delete_lock" title="<?php echo l('Delete lock'); ?>" onclick="deletelock();" class="btn"><?php echo l('Delete lock'); ?></div>
        <input type="submit" id="restore" class="btn" value="<?php echo l('Start restoration'); ?>" />
    </form>
    <div id="loader_content">
        <div id="loader"></div>
        <div id="loader_background"></div>
    </div>
    <div id="version"><?php echo l('Nt Restoration').' '.VERSION; ?></div>
    <script type="text/javascript">
        var timer = '';
        var refresh_sent = 0;
        var FINISH = 'END';
        var ERROR = 'ERR';
        var WARNING = 'WAR';
        var REFRESH = 'REFRESH';
        var RESUME = 'RESUME';
        var AJAX_SCRIPT = '?l=<?php echo $_GET['l']; ?>&';
        var LIMIT_WEIGHT_REFRESH = '<?php echo $limit_weight_refresh; ?>';
        var progress_refresh_time = '<?php echo MAX_TIME_BEFORE_PROGRESS_REFRESH * 1000; ?>';
        var time_pause_between_refresh = 0;
        var LOCK_FILE = '<?php echo LOCK_FILE; ?>';
        var FINISH_MSG = '<?php echo 'END'.l('FINISH ! Your backup was restored with success !'); ?>';
        var display_refresh;
        var warning_msg = [];

        $(document).ready(function()
        {
            placeLoader();

            progress_refresh_time = parseInt($('#progress_refresh_time').val()) * 1000;

            //Hide options
            $('#options').hide();
            $('#change_table_prefix_value').hide();
            $('#change_access_rights_value').hide();
            $('#change_collation_value').hide();
            $('#change_engine_value').hide();
            $('#change_shop_email_value').hide();
            $('#create_super_admin_value').hide();
            $('#do_not_extract_database').parent().parent().hide();

            //Toggle options
            $('#options_btn').click(function(){
                $('#options').slideToggle();
            });
            $('#change_table_prefix').change(function(){
                if($(this).is(':checked')){
                    $('#change_table_prefix_value').fadeIn();
                } else {
                    $('#change_table_prefix_value').fadeOut();
                }
            });
            $('#change_access_rights').change(function(){
                if($(this).is(':checked')){
                    $('#change_access_rights_value').fadeIn();
                } else {
                    $('#change_access_rights_value').fadeOut();
                }
            });
            $('#change_shop_email').change(function(){
                if($(this).is(':checked')){
                    $('#change_shop_email_value').fadeIn();
                } else {
                    $('#change_shop_email_value').fadeOut();
                }
            });
            $('#activate_refresh').change(function(){
                if($(this).is(':checked')){
                    $('#activate_refresh_time').fadeIn();
                } else {
                    $('#activate_refresh_time').fadeOut();
                }
            });
            $('#progress_refresh_time').change(function(){
                progress_refresh_time = parseInt($('#progress_refresh_time').val()) * 1000;
            });
            $('#create_super_admin').change(function(){
                if($(this).is(':checked')){
                    $('#create_super_admin_value').fadeIn();
                } else {
                    $('#create_super_admin_value').fadeOut();
                }
            });
            $('#do_not_restore_files').change(function(){
                if($(this).is(':checked')){
                    $('#do_not_extract_database').parent().parent().fadeIn();
                } else {
                    $('#do_not_extract_database').parent().parent().fadeOut();
                }
            });
            $('#change_collation').change(function(){
                if($(this).is(':checked')){
                    getCollation();
                    $('#change_collation_value').fadeIn();
                } else {
                    $('#change_collation_value').fadeOut();
                }
            });
            $('#change_engine').change(function(){
                if($(this).is(':checked')){
                    getEngine();
                    $('#change_engine_value').fadeIn();
                } else {
                    $('#change_engine_value').fadeOut();
                }
            });

            //Start the restoration
            $('#params').bind('submit', function(event){
                event.preventDefault();
                $('#params').slideUp();
                $('#msg').slideDown();
                display_refresh = setTimeout(function(){
                    $('#refresh').slideDown();
                }, 10000);
                $('#go_shop').slideUp();
                deletelastlog();
            });
        });

        /*
         * Go to the shop
         *
         * @returns void
         */
        function goShop()
        {
            window.location = './';
        }

        /*
         * Get last log
         *
         * @returns void
         */
        function refreshLastlog()
        {
            $.get(LOCK_FILE + '?' + Math.round(new Date().getTime()))
            .done(function() {
                refresh_sent = 0;
                lastlog();
            })
            .fail(function() {
                showLastLog({lastlog:FINISH_MSG});
            });
        }

        /*
         * Get last log
         *
         * @returns void
         */
        function lastlog()
        {
            if (timer === '') {
                timer = setInterval(lastlog, progress_refresh_time);
            }

            $.getJSON(AJAX_SCRIPT + Math.round(new Date().getTime()), {lastlog:1}, showLastLog);
        }

        /*
         * Clear timer and put it back to empty value
         *
         * @returns void
         */
        function clearTimer()
        {
            clearInterval(timer);
            timer = '';
        }

        /*
         * Delete last log
         *
         * @returns void
         */
        function deletelastlog()
        {
            $.getJSON(AJAX_SCRIPT + Math.round(new Date().getTime()), {deletelastlog:1}, deletelastlog_re);
            $('#msg').removeClass('error').addClass('ok');
        }

        /*
         * Place loader
         *
         * @returns void
         */
        function placeLoader()
        {
            var window_height = $(window).height();
            var body_width = $('body').width();
            var loader_height = $('#loader').height();
            var loader_width = $('#loader').width();

            var loader_top = (window_height/2) - (loader_height/2)
            var loader_left = (body_width/2) - (loader_width/2)

            $('#loader_content').height(window_height);

            $('#loader').css({
                'top':loader_top+'px',
                'left':loader_left+'px',
            });
        }

        /*
         * Delete lock
         *
         * @returns void
         */
        function deletelock()
        {
            $.getJSON(
                AJAX_SCRIPT + Math.round(new Date().getTime()),
                {
                    deletelock:1
                },
                function(data){
                    if (data.deletelock == 'OK') {
                        $('#delete_lock').hide();
                        $('#restore').show();
                    } else {
                        $('#delete_lock').show();
                        $('#restore').hide();
                        $('#msg').removeClass('ok').addClass('error');
                        $('#msg').html(data.deletelock);
                    }
                }
            );
            $('#msg').removeClass('error').addClass('ok');
        }

        /*
         * Refresh restore
         *
         * @returns void
         */
        function refreshRestore()
        {
            console.log('refreshRestore');

            if (parseInt(refresh_sent) === 1) {
                return false;
            }

            clearTimer();

            lastlog();

            refresh_sent = 1;

            $.getJSON(
                AJAX_SCRIPT + Math.round(new Date().getTime()),
                {
                    refresh:1
                },
                function(data) {
                    console.log('refreshRestore re');
                    console.log(data);

                    if (typeof data.warnings !== 'undefined' && data.warnings) {
                        $.each(data.warnings, function(key, warning) {
                            warning_msg.push(warning);
                        });
                    }

                    refresh_sent = 0;
                    lastlog();
                }
            );
        }

        /*
         * Check system validity for the Prestashop version and display warnings if needed
         *
         * @returns String
         */
        function checkSystem()
        {
            console.log('check the system compatibility');
            $('#loader_content').show();

            $.getJSON(
                AJAX_SCRIPT + Math.round(new Date().getTime()),
                {
                    check_system:1
                },
                function(data) {
                    if (data.check_system && data.check_system != '') {
                        $('#msg').after('<div class="warning">'+data.check_system+'</div>');
                    }

                    $('#loader_content').hide();
                }
            );
        }

        /*
         * Get available collation
         *
         * @returns array
         */
        function getCollation()
        {
            console.log('Get available collation');
            $('#loader_content').show();
            $('#change_collation_value #collation_value').show();
            $('#change_collation_value .param .error').remove();

            $.getJSON(
                AJAX_SCRIPT + Math.round(new Date().getTime()),
                {
                    get_collation:1,
                    db_server:$('#db_server').val(),
                    db_name:$('#db_name').val(),
                    db_user:$('#db_user').val(),
                    db_passwd:$('#db_passwd').val(),
                },
                function(data) {
                    console.log(data);
                    console.log(data.error);

                    if (data.error && data.error !== '') {
                        $('#change_collation_value #collation_value').hide();
                        $('#change_collation_value .param').append('<p class="error">'+data.error+'</p>');
                    } else if (data.list_collations && Array.isArray(data.list_collations)) {
                        var html_collation_value = '';
                        var selected = '';

                        $.each(data.list_collations, function(key, collation) {
                            if (collation.default && (collation.default === 'Yes' || collation.default === 'yes')) {
                                selected = 'selected="selected"';
                            } else {
                                selected = '';
                            }

                            html_collation_value += '<option value="'+collation.collation+' - '+collation.charset+'" '+selected+'>'+collation.collation+' - '+collation.charset+'</option>';
                        });

                        $('#change_collation_value #collation_value').html(html_collation_value);
                    }

                    $('#loader_content').hide();
                }
            );
        }

        /*
         * Get available storage engine
         *
         * @returns array
         */
        function getEngine()
        {
            console.log('Get available storage engines');
            $('#loader_content').show();
            $('#change_engine_value #engine_value').show();
            $('#change_engine_value .param .error').remove();

            $.getJSON(
                AJAX_SCRIPT + Math.round(new Date().getTime()),
                {
                    get_engine:1,
                    db_server:$('#db_server').val(),
                    db_name:$('#db_name').val(),
                    db_user:$('#db_user').val(),
                    db_passwd:$('#db_passwd').val(),
                },
                function(data) {
                    console.log(data);
                    console.log(data.error);

                    if (data.error && data.error !== '') {
                        $('#change_engine_value #engine_value').hide();
                        $('#change_engine_value .param').append('<p class="error">'+data.error+'</p>');
                    } else if (data.list_engines && Array.isArray(data.list_engines)) {
                        var html_engine_value = '';
                        var selected = '';

                        $.each(data.list_engines, function(key, engine) {
                            if (engine.default) {
                                selected = 'selected="selected"';
                            } else {
                                selected = '';
                            }

                            html_engine_value += '<option value="'+engine.engine+'" '+selected+'>'+engine.engine+'</option>';
                        });

                        $('#change_engine_value #engine_value').html(html_engine_value);
                    }

                    $('#loader_content').hide();
                }
            );
        }

        /*
         * Start last log
         *
         * @returns void
         */
        function deletelastlog_re(data)
        {
            console.log('deletelastlog_re');
            console.log(data);

            lastlog();

            $.ajaxSetup({timeout: 7200000}); //Large timeout

            $.getJSON(
                AJAX_SCRIPT + Math.round(new Date().getTime()),
                {
                    db_server:$('#db_server').val(),
                    db_name:$('#db_name').val(),
                    db_user:$('#db_user').val(),
                    db_passwd:$('#db_passwd').val(),
                    clean:$('#clean').is(':checked'),
                    clean_files_before:$('#clean_files_before').is(':checked'),
                    clean_data_before:$('#clean_data_before').is(':checked'),
                    change_shop_email:$('#change_shop_email').is(':checked'),
                    shop_email:$('#shop_email').val(),
                    activate_refresh:$('#activate_refresh').is(':checked'),
                    refresh_time:$('#refresh_time').val(),
                    progress_refresh_time:$('#progress_refresh_time').val(),
                    time_pause_between_refresh:$('#time_pause_between_refresh').val(),
                    create_super_admin:$('#create_super_admin').is(':checked'),
                    super_admin_email:$('#super_admin_email').val(),
                    super_admin_password:$('#super_admin_password').val(),
                    super_admin_first_name:$('#super_admin_first_name').val(),
                    super_admin_last_name:$('#super_admin_last_name').val(),
                    delete_customers_emails:$('#delete_customers_emails').is(':checked'),
                    enable_mode_dev:$('#enable_mode_dev').is(':checked'),
                    disable_cache:$('#disable_cache').is(':checked'),
                    disable_modpagespeed:$('#disable_modpagespeed').is(':checked'),
                    disable_mediaservers:$('#disable_mediaservers').is(':checked'),
                    disable_ssl:$('#disable_ssl').is(':checked'),
                    change_table_prefix:$('#change_table_prefix').is(':checked'),
                    table_prefix:$('#table_prefix').val(),
                    change_access_rights:$('#change_access_rights').is(':checked'),
                    file_access_rights:$('#file_access_rights').val(),
                    folder_access_rights:$('#folder_access_rights').val(),
                    change_collation:$('#change_collation').is(':checked'),
                    collation_value:$('#collation_value').val(),
                    change_engine:$('#change_engine').is(':checked'),
                    engine_value:$('#engine_value').val(),
                    do_not_restore_files:$('#do_not_restore_files').is(':checked'),
                    do_not_restore_database:$('#do_not_restore_database').is(':checked'),
                    do_not_extract_database:$('#do_not_extract_database').is(':checked'),
                    disable_no_auto_value_on_zero:$('#disable_no_auto_value_on_zero').is(':checked'),
                    ignore_sql_errors:$('#ignore_sql_errors').is(':checked'),
                    disable_time_limit:$('#disable_time_limit').is(':checked'),
                    replace_htaccess:$('#replace_htaccess').is(':checked'),
                },
                function(data) {
                    console.log('deletelastlog_re re');
                    console.log(data);

                    if (typeof data.warnings !== 'undefined' && data.warnings) {
                        $.each(data.warnings, function(key, warning) {
                            warning_msg.push(warning);
                        });
                    }

                    lastlog();
                }
            );
        }

        /*
         * Show last log
         *
         * @returns void
         */
        function showLastLog(data)
        {
            var message = data.lastlog;

            console.log(message);
            console.log(refresh_sent);
            console.log('------------------');

            if (!message) {
                return;
            }

            if (message == RESUME) {
                refresh_sent = 0;
                return;
            }

            if (message == REFRESH) {
                if (parseInt(refresh_sent) != 1) {
                    refreshRestore();
                }
            } else {
                refresh_sent = 0;
                var type = message.substr(0, 3);

                if(type === FINISH || type === ERROR) {
                    message = message.substr(3);
                    clearTimer();
                }

                if(type === ERROR)
                {
                    $('#msg').removeClass('ok').addClass('error');

                    if ($('#refresh').is(":visible")) {
                        $('#refresh').slideUp();
                    } else {
                        clearTimeout(display_refresh);
                    }

                    $('#params').slideDown();
                }

                if(type === FINISH) {
                    $('#msg').addClass('finish');

                    if ($('#refresh').is(":visible")) {
                        $('#refresh').slideUp();
                    } else {
                        clearTimeout(display_refresh);
                    }

                    checkSystem();

                    console.log(warning_msg);

                    $.each(warning_msg, function(key, war_msg) {
                        if (war_msg && war_msg != '') {
                            $('#msg').after('<div class="warning">'+war_msg+'</div>');
                        }
                    });

                    $('#go_shop').slideDown();
                }

                //Display the last log
                if (message !== '') {
                    $('#msg').html(message);
                }
            }
        }
    </script>
<?php






































class NtRestore
{
    private $db_server;
    private $db_port;
    private $db_name;
    private $db_user;
    private $db_passwd;
    private $auto;
    private $from_module;
    private $opt;
    private $backup_name;
    private $backup_parts;
    private $db;
    private $prefixe;
    private $cookie_key;
    private $old_domain;
    private $old_physical_uri;
    private $old_url;
    private $new_url;
    private $new_domain;
    private $new_physical_uri;
    private $file_access_rights;
    private $folder_access_rights;
    private $t;
    private $prestashop_version;
    private $total_time;
    public $next_step;
    private $position_restore_file;
    private $position_restore_dump;
    private $old_percent_restore_file;
    private $old_percent_restore_dump;
    private $pathinfo;
    private $total_part;
    private $filesize_tar;
    private $total_lines_dump_sql;
    private $current_lines_dump_sql;
    private $last_log;
    private $current_part;
    private $position_tar_file;
    private $old_percent_tar_file;
    private $filesize_compress_tar;
    private $loader = '/';
    private $dump_only;
    private $list_dump_files;
    public $hash_file_maintenance;
    protected $pause_refresh = 1;
    public $warnings;

    const TEMP_EMPTY_FILE                   = 'ntbr.tmp';
    const MAX_SEEK_SIZE                     = 2147483646; // The max size to seek in a file is just under 2GB
    const MAX_READ_SIZE                     = 100663296; // The max size to read in a file is about 96 MG
    const STEP_CLEAN_FILES_BEFORE           = 1;
    const STEP_CLEAN_DATA_BEFORE            = 2;
    const STEP_CHANGE_ACCESS_RIGHT          = 3;
    const STEP_RESTORE_FILES                = 4;
    const STEP_RESTORE_FILES_CONTINUE       = 5;
    const STEP_RESTORE_DUMP                 = 6;
    const STEP_RESTORE_DUMP_CONTINUE        = 7;
    const STEP_UPDATE_SETTINGS              = 8;
    const STEP_UPDATE_DEFINES               = 9;
    const STEP_CREATE_SUPER_ADMIN           = 10;
    const STEP_UPDATE_URL_CONFIGURATION     = 11;
    const STEP_CHANGE_EMAIL_CONFIGURATION   = 12;
    const STEP_CHECK_AUTOMATION_DOMAIN      = 13;
    const STEP_UPDATE_LINKS                 = 14;
    const STEP_DELETE_CUSTOMERS_EMAIL       = 15;
    const STEP_DISABLE_SSL                  = 16;
    const STEP_CHANGE_TABLE_PREFIX          = 17;
    const STEP_UPDATE_HTACCESS              = 18;
    const STEP_CLEANING                     = 19;

    /**
    * Construct
    *
    * @param string $db_server Database host
    * @param string $db_name Database name
    * @param string $db_user Database user
    * @param string $db_passwd Database password
    * @param string $opt Selected options
    * @param bool $translations Translation array
    * @return void
    */
    public function __construct($db_server = '', $db_name = '', $db_user = '', $db_passwd = '', $opt = '', $translations = '', $auto = false, $from_module = false, $dump_only = false)
    {
        $this->db_server = $db_server;
        $this->db_port = '';
        $posport = strpos($db_server, ':');
        if($posport !== false)
        {
            $this->db_server = substr($db_server, 0, $posport);
            $this->db_port= substr($db_server, $posport+1);
        }
        $this->db_name = $db_name;
        $this->db_user = $db_user;
        $this->db_passwd = $db_passwd;
        $this->auto = $auto;
        $this->from_module = $from_module;
        $this->opt = $opt;
        $this->t = $translations;
        $this->dump_only = $dump_only;
        $this->list_dump_files = array();
        $this->file_access_rights = FILE_ACCESS_RIGHTS;
        $this->folder_access_rights = FOLDER_ACCESS_RIGHTS;
        $this->current_part = 1;
        $this->position_restore_file = 0;
        $this->position_restore_dump = 0;
        $this->position_tar_file = 0;
        $this->old_percent_restore_file = 0;
        $this->old_percent_restore_dump = 0;
        $this->old_percent_tar_file = 0;
        $this->filesize_tar = 0;
        $this->filesize_compress_tar = 0;
        $this->last_log = '';
        $this->pathinfo = array();
        $this->warnings = array();
    }

    public function log($message, $not_displayed = false)
    {
        if (!is_string($message)) {
            $message = print_r($message, true);
        } else {
            $message = html_entity_decode($message, ENT_COMPAT, 'UTF-8');
        }

        $type = substr($message, 0, 3);

        if ($type == 'WAR') {
            if (!isset($this->warnings) || !is_array($this->warnings)) {
                $this->warnings = array();
            }

            $warning = substr($message, 3);

            if (!in_array($warning, $this->warnings)) {
                $this->warnings[] = $warning;
            }
        }

        Tools::log($message, $not_displayed);
    }

    /**
    * Return part of a multibyte string
    * Use mb_substr but if mbstring extension is not enabled, use an alternative
    *
    * @param string $string The string to extract the substring from.
    * @param string $start Start
    * @param string $length Length
    * @return string The extracted part of the string
    */
    private function mb_substr($string, $start, $length = null)
    {
        if(!function_exists('mb_substr'))
        {
            $arr = preg_split("//u", $string);
            $slice = array_slice($arr, $start + 1, $length);
            return implode("", $slice);
        }
        else
            return mb_substr($string, $start, $length);
    }

    /**
    * Get string length
    * Use mb_strlen but if mbstring extension is not enabled, use an alternative
    *
    * @param string $string The string being checked for length.
    * @return string The length of the string
    */
    private function mb_strlen($string)
    {
        if(!function_exists('mb_strlen'))
        {
            $matches = array();
            return preg_match_all("/.{1}/us", $string, $matches);
        }
        else
            return mb_strlen($string);
    }

    /**
    * Return the translation of text in the selected language
    *
    * @param string $text Text to translate
    * @return string Translated text
    */
    public function l($text)
    {
        if(isset($this->t[$text]))
            return $this->t[$text];
        return $text;
    }

    public function shutdown()
    {
        $error = error_get_last();
        $connection_status = connection_status(); //http://php.net/manual/fr/features.connection-handling.php
        if (isset($error['type']) && $error['type'] === E_ERROR && ($connection_status == 2 || $connection_status == 3)) {
            $this->refreshBackup();
            $time = time() - $this->total_time;
            $this->log('ERR'.sprintf($this->l('Error. Maximum runtime of your server reached (%d s). Please increase this time on your server for the restore to complete. Most of the time, you need to increase PHP max_execution_time. You can also enable the "Intermediate renewal" option to bypass this limitation.'), $time));
        }
    }

    public function getAllDumpFiles()
    {
        return array_merge($this->getModuleDumpFiles(), $this->getRootDumpFiles());
    }

    public function getRootDumpFiles()
    {
        return glob(DUMP_FILE_NAME.'*.'.DUMP_FILE_EXT);
    }

    public function getModuleDumpFiles()
    {
        return glob(MODULE_PATH.DUMP_FILE_NAME.'*.'.DUMP_FILE_EXT);
    }

    public function getCacheDirectories()
    {
        $cache_dirs = array(
            'cache/cachefs',
            'cache/smarty/cache',
            'cache/smarty/compile',
            'app/cache',
            'var/cache',
        );

        $theme_dirs = glob('themes/*', GLOB_ONLYDIR);

        foreach ($theme_dirs as $theme_dir) {
            if (file_exists($theme_dir.'/cache')) {
                $cache_dirs[] = $theme_dir.'/cache';
            }
        }

        return $cache_dirs;
    }

    /**
    * Restore a prestashop backup
    *
    * @return bool
    */
    public function restore($refresh = false)
    {
        $this->total_time = time();

        if (isset($_GET['disable_time_limit']) && $_GET['disable_time_limit'] == 'true') {
            set_time_limit(TIME_LIMIT);
        }

        register_shutdown_function(array($this, 'shutdown'));

        if ($refresh) {
            // We need a log so that the "REFRESH" log won't trigger a new refresh before it's time
            $this->log('RESUME');

            // If we need to retrieve the previous values of this
            if (!isset($this->next_step) || !$this->next_step) {
                if (!($handle_config_file = fopen(CONFIG_FILE, 'a+'))) {
                    $this->log('ERR'.$this->l('Error. The config file cannot be opened'));
                    return false;
                }
                if (!rewind($handle_config_file)) {
                    $this->log('ERR'.$this->l('Error. The config file cannot be rewind'));
                    return false;
                }
                $restore_values = unserialize(fgets($handle_config_file));
                fclose($handle_config_file);

                foreach ($restore_values as &$value) {
                    $value = json_decode($value, true);
                }

                if (!$this->setAllValues($restore_values)) {
                    $this->log('ERR'.$this->l('Error. There is an error with the "Intermediate renewal" option'));
                    return false;
                }

                $pause_between_refresh = $this->opt['time_pause_between_refresh'];

                if ($this->pause_refresh && $pause_between_refresh) {
                    $this->pause_refresh = 0;
                    sleep($pause_between_refresh);
                    $this->refreshBackup(false, false);
                } else {
                    $this->pause_refresh = 1;
                }
            }

            // Display the log that was display before refresh (in case the refresh was so close to it that it never was diplay)
            if ($this->last_log && $this->last_log != '') {
                $this->log($this->last_log);
            }
        } else {
            //To do first for security !
            if (!$this->dbConnect()) {
                return false;
            }

            $count_backup_files = NtRestore::countBackup();

            if ($count_backup_files['nb'] > 1) {
                $this->log('ERR'.$this->l('Error while restoring backup: More than one backup file found').' '.implode(', ', $count_backup_files['list']));
                return false;
            } elseif ($count_backup_files['nb'] < 1) {
                $this->log('ERR'.$this->l('Error while restoring backup: No backup file found'));
                return false;
            }

            if (file_exists(LOCK_FILE)) {
                die();
            }

            touch(LOCK_FILE);

            // Create a maintenance file in the current language
            // (after the log functions so it's not call at every display of lastlog)
            if (!file_exists(MAINTENANCE_FILE)) {
                tools::fileWrite(MAINTENANCE_FILE, tools::get_maintenance_page($this->t), 'w');
            }
            $this->hash_file_maintenance = md5_file(MAINTENANCE_FILE);
            $this->backup_parts = self::findBackup();
            $this->next_step = self::STEP_CLEAN_FILES_BEFORE;

            if (isset($_SERVER) && isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) {
                $this->log($this->l('Shop url:').' '.$_SERVER['HTTP_REFERER']);
            }

            $this->log($this->l('Database Host server:').' '.$this->db_server);
            $this->log($this->l('Database Port:').' '.$this->db_port);
            $this->log($this->l('Database name:').' '.$this->db_name);
            $this->log($this->l('Database User:').' '.$this->db_user);

            if (isset($this->opt['refresh_time'])) {
                $this->log($this->l('Duration of intermediate renewal:').' '.$this->opt['refresh_time']);
            }

            if (isset($this->opt['time_pause_between_refresh'])) {
                $this->log($this->l('Duration between refresh:').' '.$this->opt['time_pause_between_refresh']);
            }

            if (isset($this->opt['progress_refresh_time'])) {
                $this->log($this->l('Duration between progress refresh:').' '.$this->opt['progress_refresh_time']);
            }

            if (!$this->opt['activate_refresh']) {
                $this->log($this->l('Refresh deactivated'));
            }
        }

        if (!count($this->pathinfo)) {
            foreach ($this->backup_parts as $nb_part => $part) {
                if (!isset($this->pathinfo[$nb_part])) {
                    $filename_tmp = pathinfo($part, PATHINFO_FILENAME);

                    if (substr($filename_tmp, -4) !== '.tar') {
                        $filename_tmp .= '.tar';
                    }

                    $this->pathinfo[$nb_part] = $filename_tmp;
                }
            }
        }

        $this->total_part = count($this->pathinfo);

        if ($this->next_step == self::STEP_CLEAN_FILES_BEFORE) {
            if ($this->opt['clean_files_before']) {
                $file_to_keep = array(
                    MAINTENANCE_FILE,
                    LOG_FILE,
                    LASTLOG_FILE,
                    LOCK_FILE,
                    basename(__FILE__),
                );

                foreach ($this->getAllDumpFiles() as $dump_file) {
                    $file_to_keep[] = $dump_file;
                }

                foreach ($this->backup_parts as $part) {
                    $file_to_keep[] = $part;
                }

                $this->log($this->l('Cleaning files before restoration...'));
                $this->emptyDirectory('./', $file_to_keep);

                $this->next_step = self::STEP_CLEAN_DATA_BEFORE;
                //refresh
                $this->refreshBackup();
            } else {
                $this->next_step = self::STEP_CLEAN_DATA_BEFORE;
            }
        }

        if ($this->next_step == self::STEP_CLEAN_DATA_BEFORE) {
            if ($this->opt['clean_data_before']) {

                $this->log($this->l('Cleaning database before restoration...'));
                $res_tables = $this->db->query('SET FOREIGN_KEY_CHECKS = 0');

                //Clean tables
                $res_tables = $this->db->query("SHOW FULL TABLES WHERE TABLE_TYPE = 'BASE TABLE'");
                if ($res_tables === false)
                {
                    $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                    //return false;
                }

                foreach ($res_tables as $table)
                {
                    $current_table = $table['Tables_in_'.$this->db_name];
                    if ($current_table == '' || !$current_table)
                        continue;
                    $res_drop = $this->db->query('DROP TABLE `'.$current_table.'`;');
                    if ($res_drop === false)
                    {
                        $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                        //return false;
                    }

                    //refresh
                    $this->refreshBackup(true);
                }

                //Clean views
                $res_views = $this->db->query("SHOW FULL TABLES WHERE TABLE_TYPE = 'VIEW'");
                if ($res_views === false)
                {
                    $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                    //return false;
                }

                foreach ($res_views as $view)
                {
                    $current_view = $view['Tables_in_'.$this->db_name];
                    if ($current_view == '' || !$current_view)
                        continue;
                    $res_drop = $this->db->query('DROP VIEW `'.$current_view.'`;');
                    if ($res_drop === false)
                    {
                        $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                        //return false;
                    }

                    //refresh
                    $this->refreshBackup(true);
                }

                //Clean procedures
                $res_procedures = $this->db->query('SHOW PROCEDURE STATUS WHERE db = \''.$this->db_name.'\';');
                if ($res_procedures === false)
                {
                    $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                    //return false;
                }

                foreach ($res_procedures as $proc)
                {
                    $current_proc = $proc['Name'];
                    if ($current_proc == '' || !$current_proc)
                        continue;
                    $res_drop = $this->db->query('DROP PROCEDURE `'.$current_proc."`;");
                    if ($res_drop === false)
                    {
                        $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                        //return false;
                    }

                    //refresh
                    $this->refreshBackup(true);
                }

                //Clean functions
                $res_functions = $this->db->query('SHOW FUNCTION STATUS WHERE db = \''.$this->db_name.'\';');
                if ($res_functions === false)
                {
                    $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                    //return false;
                }

                foreach ($res_functions as $func)
                {
                    $current_func = $func['Name'];
                    if ($current_func == '' || !$current_func)
                        continue;
                    $res_drop = $this->db->query('DROP FUNCTION `'.$current_func."`;");
                    if ($res_drop === false)
                    {
                        $this->log('ERR'.$this->l('Error while cleaning datas:').' '.$this->db->getError());
                        //return false;
                    }

                    //refresh
                    $this->refreshBackup(true);
                }

                $this->next_step = self::STEP_CHANGE_ACCESS_RIGHT;
                //refresh
                $this->refreshBackup();
            } else {
                $this->next_step = self::STEP_CHANGE_ACCESS_RIGHT;
            }
        }

        if ($this->next_step == self::STEP_CHANGE_ACCESS_RIGHT) {
            $this->changeAccessRights();

            $this->next_step = self::STEP_RESTORE_FILES;
            //refresh
            $this->refreshBackup();
        }

        if ($this->next_step == self::STEP_RESTORE_FILES || $this->next_step == self::STEP_RESTORE_FILES_CONTINUE) {
            if(!$this->opt['do_not_restore_files'])
            {
                if (!$this->restoreFiles())
                    return false;

                $this->next_step = self::STEP_RESTORE_DUMP;
                //refresh
                $this->refreshBackup();
            } else {
                $this->log($this->l('No files restoration, as wanted'));
                $this->log($this->l('Get database file'));

                if (!$this->opt['do_not_extract_database']) {
                    $this->log($this->l('Extract dump'));

                    if (!$this->untarDump()) {
                        return false;
                    }
                } else {
                    $this->log($this->l('No extraction, as wanted'));
                }

                $this->next_step = self::STEP_RESTORE_DUMP;
            }
        }

        if ($this->next_step == self::STEP_RESTORE_DUMP || $this->next_step == self::STEP_RESTORE_DUMP_CONTINUE) {
            if(!$this->opt['do_not_restore_database'])
            {
                if (!isset($this->list_dump_files) || !is_array($this->list_dump_files) || !count($this->list_dump_files)) {
                    if($this->dump_only) {
                        $this->list_dump_files = $this->getRootDumpFiles();
                    } else {
                        $this->list_dump_files = $this->getModuleDumpFiles();
                    }
                }

                if (!$this->restoreDump($this->list_dump_files))
                    return false;

                $this->next_step = self::STEP_UPDATE_SETTINGS;
                //refresh
                $this->refreshBackup();
            }
            else {
                $this->log($this->l('No database restoration, as wanted'));
                $this->next_step = self::STEP_UPDATE_SETTINGS;
            }
        }

        //if(!$this->dump_only)
        //{//Options available only for a full restoration
            if ($this->next_step == self::STEP_UPDATE_SETTINGS) {
                if (!$this->updateSettings())
                    return false;

                $this->next_step = self::STEP_UPDATE_DEFINES;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_UPDATE_DEFINES) {
                if (!$this->updateDefines())
                    return false;

                $this->next_step = self::STEP_CREATE_SUPER_ADMIN;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_CREATE_SUPER_ADMIN) {
                if (!$this->createSuperAdmin())
                    return false;

                $this->next_step = self::STEP_UPDATE_URL_CONFIGURATION;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_UPDATE_URL_CONFIGURATION) {
                if(!$this->opt['do_not_restore_database']) { // only if we restore database
                    //if (!$this->from_module) {
                        if (!$this->updateURLConfiguration())
                            return false;
                    //}
                }

                $this->next_step = self::STEP_CHECK_AUTOMATION_DOMAIN;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_CHECK_AUTOMATION_DOMAIN) {
                $this->checkAutomationForDomain();

                $this->next_step = self::STEP_CHANGE_EMAIL_CONFIGURATION;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_CHANGE_EMAIL_CONFIGURATION) {
                if (!$this->changeEmailConfiguration())
                    return false;

                $this->next_step = self::STEP_UPDATE_LINKS;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_UPDATE_LINKS) {
                if(!$this->opt['do_not_restore_database']) { // only if we restore database
                    //if (!$this->from_module) {
                        if (!$this->updateLinks())
                            return false;
                    //}
                }

                $this->next_step = self::STEP_DELETE_CUSTOMERS_EMAIL;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_DELETE_CUSTOMERS_EMAIL) {
                if (!$this->deleteCustomersEmail())
                    return false;

                $this->next_step = self::STEP_DISABLE_SSL;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_DISABLE_SSL) {
                if (!$this->disableSSL())
                    return false;

                $this->next_step = self::STEP_CHANGE_TABLE_PREFIX;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_CHANGE_TABLE_PREFIX) {
                if (!$this->changeTablePrefix())
                    return false;

                $this->next_step = self::STEP_UPDATE_HTACCESS;
                //refresh
                $this->refreshBackup();
            }

            if ($this->next_step == self::STEP_UPDATE_HTACCESS) {
                //if (!$this->from_module) {
                    if (!$this->updateHtaccess())
                        return false;
                //}

                $this->next_step = self::STEP_CLEANING;
                //refresh
                $this->refreshBackup();
            }
        //} else {
            //$this->next_step = self::STEP_CLEANING;
        //}

        if ($this->next_step == self::STEP_CLEANING) {
            if (!$this->cleaning())
                return false;
        }

        $this->log('END'.$this->l('FINISH ! Your backup was restored with success !'));

        $this->cleaningLastFiles();

        return true;
    }

    public function refreshBackup($loop = false, $check_validity = true)
    {
        // Check if we should do the refresh
        if ($check_validity) {
            if (!$this->validRefresh($loop)) {
                return false;
            }
        }

        $last_log = file_get_contents(LASTLOG_FILE);

        if ($last_log && $last_log != '' && $last_log != 'RESUME' && $last_log != 'REFRESH') {
            $this->last_log = $last_log;
        }

        $values = $this->getAllValues();

        foreach ($values as &$value) {
            $value = json_encode($value);
        }

        $handle_config_file = fopen(CONFIG_FILE, 'w+');
        fwrite($handle_config_file, serialize($values));
        fclose($handle_config_file);

        if ($this->auto || $this->from_module) {
            $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

            if (strpos($url, '&refresh=true') === false) {
                $url .= '&refresh=true';
            }

            header('HTTP/1.1 303 See other');
            header('Location: ' . $url);
        }

        $this->log('REFRESH');
        exit();
    }

    public function validRefresh($loop)
    {
        // If refresh is activated
        if (!$this->opt['activate_refresh']) {
            return false;
        }

        $time_spend = time() - $this->total_time;

        if ($time_spend <= MIN_TIME_BEFORE_REFRESH) {
            return false;
        }

        $time_between_refresh = $this->opt['refresh_time'];
        if ($time_between_refresh <= 0) {
            $time_between_refresh = MAX_TIME_BEFORE_REFRESH;
        }

        // If we are in a loop we only do backup if enough time has passed since the last backup
        if ($loop && $time_spend < $time_between_refresh) {
            return false;
        }

        return true;
    }

    public function getAllValues()
    {
        $values = array(
            'db_server'                     => $this->db_server,
            'db_port'                       => $this->db_port,
            'db_name'                       => $this->db_name,
            'db_user'                       => $this->db_user,
            'db_passwd'                     => $this->db_passwd,
            'auto'                          => $this->auto,
            'from_module'                   => $this->from_module,
            'opt'                           => $this->opt,
            'backup_name'                   => $this->backup_name,
            'backup_parts'                  => $this->backup_parts,
            'prefixe'                       => $this->prefixe,
            'cookie_key'                    => $this->cookie_key,
            'old_domain'                    => $this->old_domain,
            'old_physical_uri'              => $this->old_physical_uri,
            'old_url'                       => $this->old_url,
            'new_url'                       => $this->new_url,
            'new_domain'                    => $this->new_domain,
            'new_physical_uri'              => $this->new_physical_uri,
            'file_access_rights'            => $this->file_access_rights,
            'folder_access_rights'          => $this->folder_access_rights,
            't'                             => $this->t,
            'next_step'                     => $this->next_step,
            'position_restore_file'         => $this->position_restore_file,
            'position_restore_dump'         => $this->position_restore_dump,
            'old_percent_restore_file'      => $this->old_percent_restore_file,
            'old_percent_restore_dump'      => $this->old_percent_restore_dump,
            'pathinfo'                      => $this->pathinfo,
            'total_lines_dump_sql'          => $this->total_lines_dump_sql,
            'current_lines_dump_sql'        => $this->current_lines_dump_sql,
            'last_log'                      => $this->last_log,
            'current_part'                  => $this->current_part,
            'position_tar_file'             => $this->position_tar_file,
            'old_percent_tar_file'          => $this->old_percent_tar_file,
            'filesize_compress_tar'         => $this->filesize_compress_tar,
            'filesize_tar'                  => $this->filesize_tar,
            'hash_file_maintenance'         => $this->hash_file_maintenance,
            'dump_only'         			=> $this->dump_only,
            'list_dump_files'               => $this->list_dump_files,
            'pause_refresh'                 => $this->pause_refresh,
            'warnings'                      => $this->warnings,
            //'handle_file_list_file'       => $handle_file_list_file,
        );

        return $values;
    }

    public function setAllValues($values)
    {
        $this->db_server                    = $values['db_server'];
        $this->db_port                      = $values['db_port'];
        $this->db_name                      = $values['db_name'];
        $this->db_user                      = $values['db_user'];
        $this->db_passwd                    = $values['db_passwd'];
        $this->auto                         = $values['auto'];
        $this->from_module                  = $values['from_module'];
        $this->opt                          = $values['opt'];
        $this->backup_name                  = $values['backup_name'];
        $this->backup_parts                 = $values['backup_parts'];
        $this->prefixe                      = $values['prefixe'];
        $this->cookie_key                   = $values['cookie_key'];
        $this->old_domain                   = $values['old_domain'];
        $this->old_physical_uri             = $values['old_physical_uri'];
        $this->old_url                      = $values['old_url'];
        $this->new_url                      = $values['new_url'];
        $this->new_domain                   = $values['new_domain'];
        $this->new_physical_uri             = $values['new_physical_uri'];
        $this->file_access_rights           = $values['file_access_rights'];
        $this->folder_access_rights         = $values['folder_access_rights'];
        $this->t                            = $values['t'];
        $this->next_step                    = $values['next_step'];
        $this->position_restore_file        = $values['position_restore_file'];
        $this->position_restore_dump        = $values['position_restore_dump'];
        $this->old_percent_restore_file     = $values['old_percent_restore_file'];
        $this->old_percent_restore_dump     = $values['old_percent_restore_dump'];
        $this->pathinfo                     = $values['pathinfo'];
        $this->total_lines_dump_sql         = $values['total_lines_dump_sql'];
        $this->current_lines_dump_sql       = $values['current_lines_dump_sql'];
        $this->last_log                     = $values['last_log'];
        $this->current_part                 = $values['current_part'];
        $this->position_tar_file            = $values['position_tar_file'];
        $this->old_percent_tar_file         = $values['old_percent_tar_file'];
        $this->filesize_compress_tar        = $values['filesize_compress_tar'];
        $this->filesize_tar                 = $values['filesize_tar'];
        $this->hash_file_maintenance        = $values['hash_file_maintenance'];
        $this->dump_only        			= $values['dump_only'];
        $this->list_dump_files              = $values['list_dump_files'];
        $this->pause_refresh                = $values['pause_refresh'];
        $this->warnings                     = $values['warnings'];

        if (!$this->dbConnect()) {
            return false;
        }

        return true;
    }

    /**
     * emptyDirectory()
     *
     * Empty a directory
     *
     * @param string $path Path of the folder
     * @param array $file_to_keep Name of the files/folder to keep
     * @return boolean True if directory emptied
     *
     */
    private function emptyDirectory($path, $file_to_keep = array())
    {
        if (!is_dir($path))
            return false;

        $return = true;

        // List directory content (folders and files)
        $list_files = array_diff(scandir($path), array('..', '.'));

        foreach ($list_files as $file) {
            if (in_array($file, $file_to_keep)) {
                continue;
            }
            $path_file = $path.DIRECTORY_SEPARATOR.$file;
            // Delete directory content
            if (is_dir($path_file)) {
                if ($this->emptyDirectory($path_file)) {
                    if (!@rmdir($path_file)) {
                        $return = false;
                    }
                } else {
                    $return = false;
                }
            } else {
                if (!Tools::fileDelete($path_file)) {
                    $return = false;
                }
            }

            //refresh
            $this->refreshBackup(true);
        }

        return $return;
    }

    /**
    * Change access rights
    *
    * @return bool
    */
    private function changeAccessRights()
    {
        if (!$this->opt['change_access_rights'])
            return true;

        $this->file_access_rights = $this->opt['file_access_rights'];
        $this->folder_access_rights = $this->opt['folder_access_rights'];
        return true;
    }

    /**
    * Delete backup and temporary files
    *
    * @return bool
    */
    private function cleaning()
    {
        foreach ($this->getAllDumpFiles() as $dump_file) {
            Tools::fileDelete($dump_file);
        }

        if (!$this->opt['clean']) {
            // If the backup is not a .tar, delete the .tar
            if(strtolower(substr($this->backup_name, -3)) !== 'tar') {
                foreach ($this->backup_parts as $part) {
                    if(strtolower(substr($this->backup_name, -3)) === 'bz2') {
                        $decompressed_file = str_replace('.bz2', '', $part);
                    } else {
                        $decompressed_file = str_replace('.gz', '', $part);
                    }
                    Tools::fileDelete($decompressed_file);
                }
            }

            return true;
        }

        foreach ($this->backup_parts as $part) {
            if ($this->from_module) {
                rename($part, MODULE_PATH.$part);
            } else {
                Tools::fileDelete($part);
            }
        }

        return true;
    }

    /**
    * Delete logs' files and restore.php after waiting a few secondes to be sur that we don't need them anymore
    *
    * @return bool
    */
    private function cleaningLastFiles()
    {
        Tools::fileDelete(CONFIG_FILE); // Even if the clean option is false

        if (file_exists(LOCK_FILE)) {
            Tools::fileDelete(LOCK_FILE);
        }

        // If from module, empty cache
        if ($this->from_module) {
            foreach ($this->getCacheDirectories() as $cache_dir) {
                if (file_exists($cache_dir)) {
                    $this->emptyDirectory($cache_dir, array('index.php', 'index.html'));
                }
            }
        }

        if (!$this->opt['clean'])
            return true;

        sleep(20);

        Tools::fileDelete(LOG_FILE);
        Tools::fileDelete(LASTLOG_FILE);
        Tools::fileDelete(__FILE__);

        return true;
    }

    /**
    * Return the number of backup files found
    *
    * @return int
    */
    public static function countBackup()
    {
        $extentions_test = array(
            '*.tar.bz2',
            '*.tar.gz',
            '*.tar',
        );

        $result = array(
            'nb'    => 0,
            'list'  => array(),
        );

        //Look for tar.bz2 files or tar.gz files or .tar files
        foreach ($extentions_test as $ext_test) {
            $found = false;
            $list_files = glob($ext_test);

            if (is_array($list_files) && isset($list_files[0])) {
                $found = true;

                foreach ($list_files as $backup_file) {
                    // Check if the file is a part of the backup. Only count if it is not or if it is the first
                    if (strpos($backup_file, '.part.') === false || strpos($backup_file, '.1.part.')) {
                        $result['nb']++;
                        $result['list'][] = basename($backup_file);
                    }
                }
            }

            if ($found) {
                break;
            }
        }

        return $result;
    }

    /**
    * Return the first backup file found
    *
    * @return string
    */
    public static function findBackup()
    {
        $backup_file = '';
        $backup_list = array();
        $backup_part = array();
        $matches = array();
        $extentions_test = array(
            '*.tar.bz2',
            '*.tar.gz',
            '*.tar',
        );

        //Look for tar.bz2 files or tar.gz files or .tar files
        foreach ($extentions_test as $ext_test) {
            $list_files = glob($ext_test);

            if (is_array($list_files) && isset($list_files[0])) {
                $backup_list = $list_files;
                break;
            }
        }

        if (count($backup_list)) {
            rsort($backup_list);
            $backup_file = $backup_list[0];
        }

        // Check if the file is only a part of the backup
        if (strpos($backup_file, '.part.') !== false) {
            preg_match('/(.*)\.[0-9]*\.part/', $backup_file, $matches);

            if (isset($matches[1])) {
                $nb_part_max = count($backup_list);

                for ($nb_part = 1; $nb_part <= $nb_part_max; $nb_part++) {
                    foreach ($backup_list as $nb => $part) {
                        if (strpos($part, $matches[1].'.'.$nb_part.'.') !== false) {
                            $backup_part[$nb_part] = $part;
                            unset($backup_list[$nb]);
                        }
                    }
                }
            }
        }

        if (!count($backup_part)) {
            $backup_part[1] = $backup_file;
        }

        return $backup_part;
    }

    /**
    * Decompress backup and restore files
    *
    * @return bool
    */
    private function restoreFiles()
    {
        if ($this->next_step == self::STEP_RESTORE_FILES) {
            if ($this->position_tar_file == 0 && $this->current_part <= 1) {
                $this->log($this->l('Restoring backup...'));

                //Find backup
                $this->backup_name = $this->backup_parts[1];
            }

            //$this->current_part = 1;

            if (!$this->backup_name)
            {
                $this->log('ERR'.$this->l('Error while restoring files: No backup file found'));
                return false;
            }

            if(strtolower(substr($this->backup_name, -3)) !== 'tar')
            {
                //PHP builtin method failed on file > 2 Gb so we use our own method working with small and big files
                if ($this->position_tar_file == 0 && $this->current_part <= 1) {
                    $this->log($this->l('Restoring files...'));
                }

                if(strtolower(substr($this->backup_name, -3)) === 'bz2') {
                    //BZ2 file
                    foreach ($this->backup_parts as $nb_part => $part) {
                        if ($this->current_part == $nb_part) {
                            if (!$this->unbz($part, '.', $nb_part, $this->total_part)) {
                                return false;
                            }

                            $this->position_tar_file        = 0;
                            $this->old_percent_tar_file     = 0;
                            $this->filesize_compress_tar    = 0;
                            $this->current_part++;
                        }
                    }
                } else {
                    //GZ file
                    foreach ($this->backup_parts as $nb_part => $part) {
                        if ($this->current_part == $nb_part) {
                            if (!$this->ungz($part, '.', $nb_part, $this->total_part)) {
                                return false;
                            }

                            $this->position_tar_file        = 0;
                            $this->old_percent_tar_file     = 0;
                            $this->filesize_compress_tar    = 0;
                            $this->current_part++;
                        }
                    }
                }

                // Go back to part 1 for the following proccess
                $this->current_part = 1;
            }

            $this->log($this->l('Restoring files...'));
        }

        foreach ($this->pathinfo as $nb_part => $path) {
            if ($this->current_part == $nb_part) {
                if (!$this->untar($path, './', $nb_part, $this->total_part))
                    return false;

                // If we do not want to clean, we don't delete the tar file
                if ($this->opt['clean'])
                    Tools::fileDelete($path);

                $this->position_restore_file    = 0; //Start at the begining of the new part
                $this->old_percent_restore_file = 0;
                $this->filesize_tar             = 0;
                $this->current_part++;
            }
        }

        return true;
    }

    /**
    * Decompress backup and restore dump
    *
    * @return bool
    */
    private function untarDump()
    {
        if ($this->next_step == self::STEP_RESTORE_FILES) {
            //Find backup
            $this->backup_name = $this->backup_parts[1];
            $this->current_part = 1;

            if (!$this->backup_name)
            {
                $this->log('ERR'.$this->l('Error while getting database file: No backup file found'));
                return false;
            }

            if(strtolower(substr($this->backup_name, -3)) !== 'tar')
            {
                //PHP builtin method failed on file > 2 Gb so we use our own method working with small and big files
                if ($this->position_tar_file == 0 && $this->current_part <= 1) {
                    $this->log($this->l('Restoring files...'));
                }

                if (strtolower(substr($this->backup_name, -3)) === 'bz2') {
                    //BZ2 file
                    foreach ($this->backup_parts as $nb_part => $part) {
                        if ($this->current_part == $nb_part) {
                            if (!$this->unbz($part, '.', $nb_part, $this->total_part)) {
                                return false;
                            }

                            $this->position_tar_file        = 0;
                            $this->old_percent_tar_file     = 0;
                            $this->filesize_compress_tar    = 0;
                            $this->current_part++;
                        }
                    }
                } else {
                    //GZ file
                    foreach ($this->backup_parts as $nb_part => $part) {
                        if ($this->current_part == $nb_part) {
                            if (!$this->ungz($part, '.', $nb_part, $this->total_part)) {
                                return false;
                            }

                            $this->position_tar_file        = 0;
                            $this->old_percent_tar_file     = 0;
                            $this->filesize_compress_tar    = 0;
                            $this->current_part++;
                        }
                    }
                }

                // Go back to part 1 for the following proccess
                $this->current_part = 1;
            }
        }

        foreach ($this->pathinfo as $nb_part => $path) {
            if ($this->current_part == $nb_part) {
                if (!$this->untar($path, './', $nb_part, $this->total_part, true))
                    return false;

                // If we do not want to clean, we don't delete the tar file
                if ($this->opt['clean'])
                    Tools::fileDelete($path);

                $this->position_restore_file    = 0; //Start at the begining of the new part
                $this->old_percent_restore_file = 0;
                $this->filesize_tar             = 0;
                $this->current_part++;
            }
        }

        return true;
    }

    /**
    * Connect to the database
    *
    * @return bool
    */
    private function dbConnect()
    {
        $this->db = new Dbn($this->t);

        if (!$this->db->connect($this->db_name, $this->db_user, $this->db_passwd, $this->db_server, $this->db_port))
        {
            $this->log('ERR'.$this->l('Error: Unable to connect to the database').' '.$this->db->getError());
            return false;
        }
        return true;
    }

    /**
    * Restore dump
    *
    * @return bool
    */
    private function restoreDump($dump_files)
    {
        $error_dump_db = 'ERR'.$this->l('Error while restoring database:');

        // Get default charset
        $req_default_charset = 'SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = "'.$this->db_name.'" LIMIT 1;';
        $res_default_charset = $this->db->query($req_default_charset);

        if ($res_default_charset === false || !isset($res_default_charset[0])) {
            //Error
            $this->log($this->l('Could not find default charset')." : \n".$this->db->getPDOError());
            $res_default_charset = false;
            $res_default_collation = false;
        } else {
            $res_default_charset = $res_default_charset[0]['DEFAULT_CHARACTER_SET_NAME'];

            // Get default collation for the default charset not the same as default collation from information_schema.SCHEMATA
            $req_default_collation = 'SHOW COLLATION WHERE `Charset` = "'.$res_default_charset.'" AND `Default` = "Yes";';
            $res_default_collation = $this->db->query($req_default_collation);

            if ($res_default_collation === false || !isset($res_default_collation[0])) {
                //Error
                $this->log($this->l('Could not find default collation')." : \n".$this->db->getPDOError());
                $res_default_collation = false;
            } else {
                $res_default_collation = $res_default_collation[0]['Collation'];
            }
        }

        // Get default storage engine
        $req_default_engine = 'SELECT `ENGINE` FROM information_schema.engines WHERE support = "DEFAULT";';
        $res_default_engine = $this->db->query($req_default_engine);

        if ($res_default_engine === false || !isset($res_default_engine[0])) {
            //Error
            $this->log($this->l('Could not find default storage engine')." : \n".$this->db->getPDOError());
            $res_default_engine = false;
        } else {
            $res_default_engine = $res_default_engine[0]['ENGINE'];
        }

        foreach ($dump_files as $key => $dump_file) {
            if ($this->next_step == self::STEP_RESTORE_DUMP) {
                $this->log(sprintf($this->l('Restoring database file: "%s"...'),$dump_file));

                //Verifying that SQL file exists
                if (!file_exists($dump_file)) {
                    $this->log($error_dump_db.' "'.$dump_file.'" '.$this->l('SQL file is missing'));
                    return false;
                }

                //Gestion de l'UTF-8 par Mysql
                //$this->db->exec("SET NAMES 'utf8'");

                $this->total_lines_dump_sql = Tools::fileTotalLines($dump_file);
                $this->current_lines_dump_sql = 0;
                $this->position_restore_dump = 0;
                $this->old_percent_restore_dump = 0;
                $old_percent = 0;
                $position = 0;
                $this->next_step = self::STEP_RESTORE_DUMP_CONTINUE;
            } else {
                // Replay SET SQL_MODE (if option allow it) and SET FOREIGN_KEY_CHECKS (since those two commands are lost after the refresh)
                $request = '';

                if (!$this->opt['disable_no_auto_value_on_zero'])
                {//Change sql mode
                    $request .= 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";';
                }

                $request .= 'SET FOREIGN_KEY_CHECKS = 0;';

                //Execute the request
                if ($this->db->exec($request) === false)
                {//Error
                    if (strpos($this->db->getPDOError(), 'server has gone away') !== false)
                    {//Maybe there was a timeout and get disconnected
                        if (!$this->db->reconnect())
                        {//Reconnection to database failed
                            $this->log($error_dump_db.' '.$this->l('Restoration failed')." : \n".$this->db->getPDOError().' '.$this->l('on request:')."\n".$request);
                            return false;
                        }

                        if ($this->db->exec($request) === false)
                        {//Error again
                            $this->log($error_dump_db.' '.$this->l('Restoration failed')." : \n".$this->db->getPDOError().' '.$this->l('on request:')."\n".$request);
                            return false;
                        }
                    } else { // Other kind of error
                        $this->log($error_dump_db.' '.$this->l('Restoration failed')." : \n".$this->db->getPDOError().' '.$this->l('on request:')."\n".$request);
                        return false;
                    }
                }
            }

            //Open file in read mode
            if (($file = fopen($dump_file, 'r')) === false)
            {
                $this->log($error_dump_db.' '.$this->l('Unable to open SQL file'));
                return false;
            }

            // Go to where we were (if refresh)
            if ($this->position_restore_dump > 0) {
                $position = $this->position_restore_dump;
                $old_percent = $this->old_percent_restore_dump;

                // Search the max size we can use with the fseek function
                $max_seek = $this->position_restore_dump;

                if ($this->position_restore_dump > (PHP_INT_MAX - 1)) {
                    $max_seek = PHP_INT_MAX - 1;
                }

                // Set where we were in the file as much as we can with the function fseek
                if (fseek($file, $max_seek) == -1) {
                    $this->log('ERR'.$this->l('Error, the file is no longer seekable'));
                    fclose($file);
                    return false;
                }

                // Find what is left before we are where we want
                $this->position_restore_dump -= $max_seek;
                $max_read = self::MAX_READ_SIZE;

                // Until we are in the right position, read the file
                while ($this->position_restore_dump > 0) {
                    if ($this->position_restore_dump >= $max_read) {
                        $size_to_read = $max_read;
                    } else {
                        $size_to_read = $this->position_restore_dump;
                    }

                    if (fread($file, $size_to_read) === false) {
                        $this->log('ERR'.$this->l('Error, the file is no longer readable'));
                        fclose($file);
                        return false;
                    }

                    $this->position_restore_dump -= $size_to_read;
                }
            }

            $delimiter = MYSQL_DEFAULT_DELIMITER;
            $delimiter_len = $this->mb_strlen(MYSQL_DEFAULT_DELIMITER);
            $delimiter_concat = '';
            while (!feof($file))
            {//Read each line of the file
                $this->current_lines_dump_sql++;
                if (($line = fgets($file)) === false)
                    break;
                $position += strlen($line);

                if (substr(trim($line), 0, 2) != '--' && substr(trim($line), 0, 2) != '')
                {//This line is a request line
                    $request = trim($line);

                    if (substr($request, 0, 9) == 'DELIMITER')
                    {//Entering a delimiter area
                        //We need to find the delimiter
                        $delimiter_cmd = explode(' ', $request);
                        if (!isset($delimiter_cmd[1]))
                            continue;
                        $delimiter = $delimiter_cmd[1];
                        if($delimiter == MYSQL_DEFAULT_DELIMITER)
                            continue;
                        $delimiter_len = $this->mb_strlen($delimiter);
                        $delimiter_concat = ' ';
                        //We must not execute de DELIMITER request but concatenate delimiter content in one request
                        continue;
                    }

                    while (!feof($file) && $this->mb_substr(trim($line), -$delimiter_len) != $delimiter)
                    {//Request not finished (no $delimiter at the end of line)
                        $this->current_lines_dump_sql++; //To get a correct number
                        if (($line = fgets($file)) === false)
                            break;
                        $position += strlen($line);
                        if ($delimiter != MYSQL_DEFAULT_DELIMITER && (substr(trim($line), 0, 2) == '--' || substr(trim($line), 0, 2) == ''))
                            continue;
                        $request .= $delimiter_concat.trim($line);
                    }

                    if($delimiter != MYSQL_DEFAULT_DELIMITER)
                    {//Exiting delimiter area
                        $request = $this->mb_substr($request, 0, -$delimiter_len);
                        $delimiter = MYSQL_DEFAULT_DELIMITER;
                        $delimiter_len = 1;
                        $delimiter_concat = '';
                    }

                    if ($this->opt['disable_no_auto_value_on_zero'])
                    {//Do not change sql mode
                        if(strpos($request, 'NO_AUTO_VALUE_ON_ZERO') !== false || strpos($request, 'FOREIGN_KEY_CHECKS') !== false)
                            continue;
                    }

                    if (preg_match_all('/(CREATE TABLE|ALTER TABLE)/i', $request)) {
                        $reg_replace_charset = '/((CHAR|CHARACTER)[\s]*SET[\s]*([\s]*=[\s]*|[\s]+))([^\s;,`]+)/i';
                        $reg_replace_collation = '/(COLLATE([\s]*=[\s]*|[\s]+))([^\s;,)`]+)/i';

                        if ($this->opt['change_collation']) {
                            //Change collation/charset
                            $request = preg_replace($reg_replace_charset, '$1'.$this->opt['charset'], $request);
                            $request = preg_replace($reg_replace_collation, '$1'.$this->opt['collation'], $request);
                        } elseif ($res_default_charset && $res_default_collation) {
                            //Check if collation/charset exists
                            $match_charset = array();
                            $match_collation = array();

                            preg_match('/(CHAR|CHARACTER)[\s]*SET[\s]*([\s]*=[\s]*|[\s]+)([^\s;,`]+)/i', $request, $match_charset);
                            preg_match('/COLLATE([\s]*=[\s]*|[\s]+)([^\s;,)`]+)/i', $request, $match_collation);

                            if (isset($match_charset[3]) || isset($match_collation[2])) {
                                if (isset($match_charset[3]) && isset($match_collation[2])) {
                                    $req_exists_collation = 'SHOW COLLATION WHERE `Collation` = "'.$match_collation[2].'" AND `Charset` = "'.$match_charset[3].'";';
                                } elseif (isset($match_charset[3])) {
                                    $req_exists_collation = 'SHOW COLLATION WHERE `Charset` = "'.$match_charset[3].'";';
                                } else {
                                    $req_exists_collation = 'SHOW COLLATION WHERE `Collation` = "'.$match_collation[2].'";';
                                }

                                $res_exists_collations = $this->db->query($req_exists_collation);

                                //Execute the request
                                if ($res_exists_collations === false) {
                                    //Error
                                    $this->log($this->l('Could not check the existance of collation/charset')." : \n".$this->db->getPDOError());
                                } else {
                                    //Change collation or charset are unavailable on new database, use default ones
                                    $request = preg_replace($reg_replace_charset, '$1'.$res_default_charset, $request);
                                    $request = preg_replace($reg_replace_collation, '$1'.$res_default_collation, $request);
                                }
                            }
                        }

                        $reg_replace_engine = '/(ENGINE([\s]*=[\s]*|[\s]+))([^\s;,`]+)/i';

                        if ($this->opt['change_engine']) {
                            //Change engine
                            $request = preg_replace($reg_replace_engine, '$1'.$this->opt['engine'], $request);
                        } elseif ($res_default_engine) {
                            //Check if engine exists
                            $match_engine = array();

                            preg_match('/ENGINE([\s]*=[\s]*|[\s]+)([^\s;,`]+)/i', $request, $match_engine);

                            if (isset($match_engine[2])) {
                                $req_exists_engine = 'SELECT `ENGINE` FROM information_schema.engines WHERE `ENGINE` = "'.$match_engine[2].'";';
                                $res_exists_engines = $this->db->query($req_exists_engine);

                                //Execute the request
                                if ($res_exists_engines === false) {
                                    //Error
                                    $this->log($this->l('Could not check the existance of storage engine')." : \n".$this->db->getPDOError());
                                } else {
                                    //Change engine are unavailable on new database, use default ones
                                    $request = preg_replace($reg_replace_engine, '$1'.$res_default_engine, $request);
                                }
                            }
                        }
                    }

                    if ($this->from_module)
                    {//Do not change or recreate session
                        if (preg_match_all('/(DROP TABLE|DROP TABLE IF EXISTS|CREATE TABLE|INSERT INTO)[^_]+_employee_session[\s`;(]+/i', $request))
                            continue;
                    }

                    if ($this->opt['ignore_sql_errors'])
                    {//If we want to ignore sql error
                        if (substr($request, 0, 12) == 'INSERT INTO ') {
                            $request = substr_replace($request, 'INSERT IGNORE INTO ', 0, 12);
                        }
                    }

                    //Execute the request
                    if ($this->db->exec($request) === false)
                    {//Error
                        if (strpos($this->db->getPDOError(), 'server has gone away') !== false)
                        {//Maybe there was a timeout and get disconnected
                            if (!$this->db->reconnect())
                            {//Reconnection to database failed
                                fclose($file);
                                $this->log($error_dump_db.' '.$this->l('Restoration failed on line n°').$this->current_lines_dump_sql." : \n".$this->db->getPDOError().' '.$this->l('on request:')."\n".$request);
                                return false;
                            }

                            if ($this->db->exec($request) === false)
                            {//Error again
                                fclose($file);
                                $this->log($error_dump_db.' '.$this->l('Restoration failed on line n°').$this->current_lines_dump_sql." : \n".$this->db->getPDOError().' '.$this->l('on request:')."\n".$request);
                                return false;
                            }
                        } else { // Other kind of error
                            fclose($file);
                            $this->log($error_dump_db.' '.$this->l('Restoration failed on line n°').$this->current_lines_dump_sql." : \n".$this->db->getPDOError().' '.$this->l('on request:')."\n".$request);
                            return false;
                        }
                    }

                    $this->position_restore_dump = $position;
                    $this->old_percent_restore_dump = $old_percent;

                    //refresh
                    $this->refreshBackup(true);
                }

                //Compute percentage progression
                $percent = ($this->current_lines_dump_sql * 100) / $this->total_lines_dump_sql;

                if ($percent >= $old_percent + 1)
                {
                    $old_percent = round($percent, 0);
                    $this->log($this->l('Restoring database:').' '.round($percent, 0).'%');
                }
            }
            fclose($file);

            // Check if this is the last loop
            end($dump_files);

            if ($key !== key($dump_files)) {// Not last loop
                $this->next_step = self::STEP_RESTORE_DUMP;
            }

            unset($this->list_dump_files[$key]);
        }

        return true;
    }

    /**
    * Update domain information in database
    *
    * @return bool
    */
    private function updateURLConfiguration()
    {
        $this->log($this->l('Updating URL configuration...'));

        //Find old domain information
        $req = '
            SELECT su.domain, su.physical_uri
            FROM `'.$this->prefixe.'shop_url` su
            WHERE su.id_shop = (
                SELECT c.value
                FROM `'.$this->prefixe.'configuration` c
                WHERE c.name = "PS_SHOP_DEFAULT"
            )
        ';
        $res = $this->db->query($req);
        if ($res === false || !isset($res[0]['domain']) || !isset($res[0]['physical_uri']))
        {
            $this->log($this->l('Reconnection:').' '.$this->db->getError());
            //$this->log('ERR'.$this->l('Error while updating URL configuration:').' '.$this->db->getError());
            if(strpos($this->db->getError(), 'server has gone away') !== false)
            {
                if (!$this->dbConnect())
                    return false;
                $res = $this->db->query($req);
                if ($res === false || !isset($res[0]['domain']))
                {
                    $this->log('ERR'.$this->l('Error while updating URL configuration:').' '.$this->db->getError());
                    return false;
                }
            }
        }

        $this->old_domain = $res[0]['domain'];
        $this->old_physical_uri = $res[0]['physical_uri'];
        $this->old_url = $this->old_domain.rtrim($this->old_physical_uri, '/');

        //Find new domain information
        $this->new_url = Tools::currentDirectoryURL(); //Without http://
        $slash = strpos($this->new_url, '/');
        if ($slash !== false)
        {
            $this->new_domain = substr($this->new_url, 0, $slash);
            $this->new_physical_uri = substr($this->new_url, $slash).'/';
        }
        else
        {
            $this->new_domain = $this->new_url;
            $this->new_physical_uri = '/';
        }

        if ($this->old_url != $this->new_url) {
            //Update URL configuration in database
            $req = '
                UPDATE `'.$this->prefixe.'configuration` SET value = replace(value, '.$this->db->q($this->old_domain).', '.$this->db->q($this->new_domain).');
                UPDATE `'.$this->prefixe.'shop_url` su SET su.domain = '.$this->db->q($this->new_domain).', domain_ssl = '.$this->db->q($this->new_domain).' WHERE su.id_shop = (
                    SELECT c.value
                    FROM `'.$this->prefixe.'configuration` c
                    WHERE c.name = "PS_SHOP_DEFAULT"
                );
                UPDATE `'.$this->prefixe.'shop_url` su SET su.physical_uri = '.$this->db->q($this->new_physical_uri).' WHERE su.id_shop = (
                    SELECT c.value
                    FROM `'.$this->prefixe.'configuration` c
                    WHERE c.name = "PS_SHOP_DEFAULT"
                );
            ';

            if (!$this->db->exec($req))
            {
                $this->log('ERR'.$this->l('Error while updating URL configuration:').' '.$this->db->getError());
                return false;
            }
        }

        return true;
    }

    /**
     * Check automation/domain
     *
     * @return bool
     */
    private function checkAutomationForDomain()
    {
        //Get automation config value
        $req_automation = '
            SELECT `value`
            FROM `'.$this->prefixe.'ntbr_glob_conf`
            WHERE `name` = "NTBR_AUTOMATION_2NT"
        ';

        $res_automation = $this->db->query($req_automation);

        if ($res_automation === false || !isset($res_automation[0]['value'])) {
            return;
        }

        if ($res_automation[0]['value']) {
            //Get old shop url config value
            $req_old_url = '
                SELECT `value`
                FROM `'.$this->prefixe.'ntbr_glob_conf`
                WHERE `name` = "NTBR_LAST_SHOP_URL"
            ';

            $res_old_url = $this->db->query($req_old_url);

            if ($res_old_url === false || !isset($res_old_url[0]['value'])) {
                return;
            }

            $protocol = (isset($_SERVER['HTTPS'])?'https':'http').'://';
            $directory_url = Tools::currentDirectoryURL(); //Without http://
            $current_url = rtrim(trim($protocol.$directory_url), '/');
            $old_url = rtrim(trim($res_old_url[0]['value']), '/');// Keep the not decrypted one in case the backup was done before it was crypted
            $old_url_decrypt = rtrim(trim(Tools::decrypt($res_old_url[0]['value'])), '/');

            if ($current_url != $old_url && $current_url != $old_url_decrypt) {// url changed and should be upgrade for automation
                $this->log('WAR'.$this->l('Simple automation is enabled in Nt Backup And Restore module with your old domain. If your new domain is final (not a test site), you should click on the "Update domain" button in Automation menu.'));
            }
        }

        return true;
    }

    /**
    * Delete Customers Email. Useful for testing with insurance that no email will be sent to customers
    *
    * @return bool
    */
    private function deleteCustomersEmail()
    {
        if (!$this->opt['delete_customers_emails'])
            return true;

        $this->log($this->l('Deleting customers email...'));

        //Delete from customer table
        $req = 'UPDATE `'.$this->prefixe.'customer`
                SET email = \'\'';
        if (!$this->db->exec($req))
        {
            $this->log('ERR'.$this->l('Error while deleting customers emails:').' '.$this->db->getError());
            return false;
        }

        //Delete from mailalert module table if exists
        if($this->table_exists($this->prefixe.'mailalert_customer_oos'))
        {
            $req = 'DELETE FROM `'.$this->prefixe.'mailalert_customer_oos`';
            if (!$this->db->exec($req))
            {
                $this->log('ERR'.$this->l('Error while deleting mailalert customers emails:').' '.$this->db->getError());
                return false;
            }
        }


        return true;
    }

    /**
    * Return true if the table exists.
    *
    * @return bool
    */
    private function table_exists($table)
    {
        $res = $this->db->query('SHOW TABLES WHERE Tables_in_'.$this->db_name.' = '.$this->db->q($table));
        if ($res === false)
        {
            $this->log('ERR'.$this->l('Error while checking existence of table').' '.$table.' : '.$this->db->getError());
            return false;
        }

        return (count($res) > 0);
    }

    /**
    * Disable SSL. Useful if the new environment do not support SSL but SSL was enabled in the backup
    *
    * @return bool
    */
    private function disableSSL()
    {
        if (!$this->opt['disable_ssl'])
            return true;

        $this->log($this->l('Disabling SSL...'));

        $req = 'UPDATE `'.$this->prefixe.'configuration`
                SET value = 0
                WHERE name = \'PS_SSL_ENABLED\'';
        if (!$this->db->exec($req))
        {
            $this->log('ERR'.$this->l('Error while disabling SSL:').' '.$this->db->getError());
            return false;
        }

        $req2 = 'UPDATE `'.$this->prefixe.'configuration`
                SET value = 0
                WHERE name = \'PS_SSL_ENABLED_EVERYWHERE\'';
        if (!$this->db->exec($req2))
        {
            $this->log('ERR'.$this->l('Error while disabling SSL:').' '.$this->db->getError());
            return false;
        }

        return true;
    }

    /**
    * Disable media servers. Useful if no media servers are available now but media servers were used in the backup
    *
    * @return bool
    */
    private function disableMediaServers()
    {
        if (!$this->opt['disable_mediaservers'])
            return true;

        $this->log($this->l('Disabling media servers...'));

        $req = 'UPDATE `'.$this->prefixe.'configuration` SET value = 0 WHERE name = \'PS_MEDIA_SERVERS\';
                UPDATE `'.$this->prefixe.'configuration` SET value = \'\' WHERE name = \'PS_MEDIA_SERVER_1\';
                UPDATE `'.$this->prefixe.'configuration` SET value = \'\' WHERE name = \'PS_MEDIA_SERVER_2\';
                UPDATE `'.$this->prefixe.'configuration` SET value = \'\' WHERE name = \'PS_MEDIA_SERVER_3\';';
        if (!$this->db->exec($req))
        {
            $this->log('ERR'.$this->l('Error while disabling media servers:').' '.$this->db->getError());
            return false;
        }

        return true;
    }

    /**
    * Change Table prefix
    *
    * @return bool
    */
    private function changeTablePrefix()
    {
        if (!$this->opt['change_table_prefix'])
            return true;

        $this->log($this->l('Changing table prefix...'));

        //Check if old prefix is different from the new one
        if($this->prefixe == $this->opt['table_prefix'])
            return true;

        //Search for all tables name
        $res = $this->db->query('SHOW TABLES');
        if ($res === false || !isset($res[0]))
        {
            $this->log('ERR'.$this->l('Error while changing table prefix:').$this->db->getError());
            return false;
        }

        //Build rename requests
        $req = '';
        $old_prefix_length = strlen($this->prefixe);
        foreach ($res as $table)
        {
            $table_name = $table['Tables_in_'.$this->db_name];
            if($this->prefixe != '')
            {//There is an old prefix
                if(substr($table_name, 0, $old_prefix_length) !== $this->prefixe)
                    continue; //This table do not have the old prefix
                //Find table name without prefix
                $table_name = substr($table_name, $old_prefix_length, strlen($table_name) - $old_prefix_length);
            }
            $req .= 'DROP TABLE IF EXISTS '.$this->opt['table_prefix'].$table_name.';
                    RENAME TABLE '.$table['Tables_in_'.$this->db_name].' TO '.$this->opt['table_prefix'].$table_name.';'."\n";
        }

        //Rename all tables
        if (!$this->db->exec($req))
        {
            $this->log('ERR'.$this->l('Error while changing table prefix:').$this->db->getError());
            return false;
        }

        //Save new prefix
        $this->prefixe = $this->opt['table_prefix'];
        $this->updateSettings();

        return true;
    }

    /**
    * Create a new super admin
    *
    * @return bool
    */
    private function createSuperAdmin()
    {
        if (!$this->opt['create_super_admin'])
            return true;

        $this->log($this->l('Creating super admin...'));

        //Compute password
        $password = md5($this->cookie_key.$this->opt['super_admin_password']);

        //Check if super admin email already exists
        $id_employee = $this->getEmployeeByEmail($this->opt['super_admin_email']);
        if($id_employee === false)
            return false;

        if($id_employee != 0)
        {//Employee already exists
            return $this->updateSuperAdminPassword($id_employee, $password);
        }

        //Employee do not exist, we need to create it

        //Find likely understood language
        $id_lang = $this->getLikelyUnderstoodLanguage();
        if(!$id_lang)
            $id_lang = 1;

        //Create employee
        $req = 'INSERT INTO `'.$this->prefixe.'employee`
                (id_profile, id_lang, lastname, firstname, email, passwd, active)
                VALUES (1,
                        '.$this->db->q($id_lang).',
                        '.$this->db->q($this->opt['super_admin_last_name']).',
                        '.$this->db->q($this->opt['super_admin_first_name']).',
                        '.$this->db->q($this->opt['super_admin_email']).',
                        '.$this->db->q($password).',
                        1);';
        if (!$this->db->exec($req))
        {
            $this->log('ERR'.$this->l('Error while creating super admin:').' '.$this->db->getError());
            return false;
        }

        return true;
    }

    /**
    * Get employee id by email
    *
    * @param string $email Employee email
    * @return int. ID of the employee. 0 if not found. False on error
    */
    private function getEmployeeByEmail($email)
    {
        $res = $this->db->query('SELECT id_employee
                                FROM `'.$this->prefixe.'employee`
                                WHERE email = '.$this->db->q($email));
        if ($res === false)
        {
            $this->log('ERR'.$this->l('Error while getting employee by email:').' '.$this->db->getError());
            return false;
        }

        if(isset($res[0]))
        {//Employee exists
            return $res[0]['id_employee'];
        }

        //Employee does not exists
        return 0;
    }

    /**
    * Update super admin password in database
    *
    * @param string $id_employee Employee id
    * @param string $password New password
    * @return bool
    */
    private function updateSuperAdminPassword($id_employee, $password)
    {
        $req = 'UPDATE `'.$this->prefixe.'employee`
                    SET id_profile = 1,
                        active = 1,
                        lastname = '.$this->db->q($this->opt['super_admin_last_name']).',
                        firstname = '.$this->db->q($this->opt['super_admin_first_name']).',
                        passwd = '.$this->db->q($password).'
                    WHERE id_employee = '.$this->db->q($id_employee);
            if (!$this->db->exec($req))
            {
                $this->log('ERR'.$this->l('Error while updating super admin password:').' '.$this->db->getError());
                return false;
            }
            return true;
    }

    /**
    * Get likely understood language
    *
    * @return int. ID of the language. False on error
    */
    private function getLikelyUnderstoodLanguage()
    {
        $res = $this->db->query('SELECT MIN(id_lang) AS id
                                FROM `'.$this->prefixe.'lang`
                                WHERE active = 1');
        if ($res === false || !isset($res[0]['id']))
        {
            $this->log('ERR'.$this->l('Error while creating super admin:').' '.$this->db->getError());
            $id_lang = 1;
        } else {
            $id_lang = $res[0]['id'];
        }

        $res = $this->db->query('SELECT MIN(id_lang) AS id
                                FROM `'.$this->prefixe.'lang`
                                WHERE active = 1');
        if ($res === false)
        {
            $this->log('ERR'.$this->l('Error while getting likely understood language:').' '.$this->db->getError());
            return false;
        }

        if(isset($res[0]))
            return $res[0]['id'];

        return 0;
    }

    /**
    * Change contact email in database
    *
    * @return bool
    */
    private function changeEmailConfiguration()
    {
        if (!$this->opt['change_shop_email'])
            return true;

        $this->log($this->l('Changing email shop...'));

        //Retrieve old shop email
        $res = $this->db->query('SELECT value
                                FROM `'.$this->prefixe.'configuration`
                                WHERE name = '.$this->db->q('PS_SHOP_EMAIL'));
        if ($res === false || !isset($res[0]['value']))
        {
            $this->log('ERR'.$this->l('Error while changing email shop:').' '.$this->db->getError());
            return false;
        }

        $old_email = $res[0]['value'];

        $req = 'UPDATE `'.$this->prefixe.'configuration` SET value = replace(value, '.$this->db->q($old_email).', '.$this->db->q($this->opt['shop_email']).');
                UPDATE `'.$this->prefixe.'contact` SET email = replace(email, '.$this->db->q($old_email).', '.$this->db->q($this->opt['shop_email']).');';
        if (!$this->db->exec($req))
        {
            $this->log('ERR'.$this->l('Error while changing email shop:').' '.$this->db->getError());
            return false;
        }

        return true;
    }

    /**
    * Update settings file
    *
    * @return bool
    */
    private function updateSettings()
    {
        if (file_exists(SETTINGS_FILE)) {
            $sets = file(SETTINGS_FILE);
            if(strpos($sets[1], '//@deprecated 1.7') !== false || !isset($sets[1]))
                $settings = SETTINGS_FILE_17;
            else
                $settings = SETTINGS_FILE;
        } else {
            $settings = SETTINGS_FILE_17;
        }

        $this->log($this->l('Updating settings...'));
        if (!file_exists($settings))
        {
            $this->log('ERR'.$this->l('Error while updating settings, settings file does not exist'));
            return false;
        }

        $conf = '';
        if (($file = fopen($settings, 'r')) === false)
        {
            $this->log('ERR'.$this->l('Error while updating settings, unable to read settings file'));
            return false;
        }
        //File is open for reading
        while (!feof($file))
        {//Read each line of the file
            $line = fgets($file);

            if($settings == SETTINGS_FILE_17)
            {//Prestashop >= 1.7
                if (strpos($line, "'database_host'") !== false)
                    $line = "    'database_host' => '".$this->db_server."',"."\n";
                if (strpos($line, "'database_port'") !== false)
                    $line = "    'database_port' => '".$this->db_port."',"."\n";
                if (strpos($line, "'database_name'") !== false)
                    $line = "    'database_name' => '".$this->db_name."',"."\n";
                if (strpos($line, "'database_user'") !== false)
                    $line = "    'database_user' => '".$this->db_user."',"."\n";
                if (strpos($line, "'database_password'") !== false)
                    $line = "    'database_password' => '".$this->db_passwd."',"."\n";
                if (strpos($line, "'database_prefix'") !== false)
                {//Get or set prefix value
                    if ($this->prefixe == '') {
                        $match = array();
                        preg_match('/=>[\s]*[\'"]{1}(.*)[\'"]{1}/', $line, $match);

                        if (!isset($match[1])) {
                            $this->log('ERR'.$this->l('Error while updating settings, unable to find the prefix'));
                            return false;
                        }

                        $this->prefixe = $match[1];
                    } else
                        $line = "    'database_prefix' => '".$this->prefixe."',"."\n";
                }
                if (strpos($line, "'cookie_key'") !== false)
                    $this->cookie_key = substr($line, 21, strpos($line, "'", 21) - 21);
                if (strpos($line, "'ps_cache_enable'") !== false && $this->opt['disable_cache'])
                     $line = "    'ps_cache_enable' => false,"."\n";
            }
            else
            {//Prestashop < 1.7
                $db_server = $this->db_server;

                if ($this->db_port) {
                    $db_server .= ':'.$this->db_port;
                }

                if (strpos($line, "'_DB_SERVER_'") !== false)
                    $line = "define('_DB_SERVER_', '".$db_server."');"."\n";
                if (strpos($line, "'_DB_NAME_'") !== false)
                    $line = "define('_DB_NAME_', '".$this->db_name."');"."\n";
                if (strpos($line, "'_DB_USER_'") !== false)
                    $line = "define('_DB_USER_', '".$this->db_user."');"."\n";
                if (strpos($line, "'_DB_PASSWD_'") !== false)
                    $line = "define('_DB_PASSWD_', '".$this->db_passwd."');"."\n";
                if (strpos($line, "'_DB_PREFIX_'") !== false)
                {//Get or set prefix value
                    if ($this->prefixe == '') {
                        $match = array();
                        preg_match('/,[\s]*[\'"]{1}(.*)[\'"]{1}/', $line, $match);

                        if (!isset($match[1])) {
                            $this->log('ERR'.$this->l('Error while updating settings, unable to find the prefix'));
                            return false;
                        }

                        $this->prefixe = $match[1];
                    } else
                        $line = "define('_DB_PREFIX_', '".$this->prefixe."');"."\n";
                }
                if (strpos($line, "'_COOKIE_KEY_'") !== false)
                    $this->cookie_key = substr($line, 24, strpos($line, "'", 24) - 24);
                if (strpos($line, "'_PS_CACHE_ENABLED_'") !== false && $this->opt['disable_cache'])
                    $line = "define('_PS_CACHE_ENABLED_', '0');"."\n";
            }
            $conf .= $line;
        }
        fclose($file);

        //Saving settings
        if (file_put_contents($settings, $conf) === false)
        {
            $this->log('ERR'.$this->l('Error while updating settings, unable to save settings file'));
            return false;
        }

        return true;
    }

    /**
    * Update defines file
    *
    * @return bool
    */
    private function updateDefines()
    {
        if(!$this->opt['enable_mode_dev'])
            return true;

        $this->log($this->l('Updating defines...'));
        if (!file_exists(DEFINES_FILE))
        {
            $this->log('ERR'.$this->l('Error while updating defines, defines file does not exist'));
            return false;
        }

        $conf = '';
        if (($file = fopen(DEFINES_FILE, 'r')) === false)
        {
            $this->log('ERR'.$this->l('Error while updating defines, unable to read defines file'));
            return false;
        }
        //File is open for reading
        while (!feof($file))
        {//Read each line of the file
            $line = fgets($file);
            if (strpos($line, "define('_PS_MODE_DEV_'") !== false)
                $line = "define('_PS_MODE_DEV_', ".Tools::tf($this->opt['enable_mode_dev']).");"."\n";
            $conf .= $line;
        }
        fclose($file);

        //Saving defines
        if (file_put_contents(DEFINES_FILE, $conf) === false)
        {
            $this->log('ERR'.$this->l('Error while updating defines, unable to save defines file'));
            return false;
        }

        return true;
    }

    /**
    * Return an array containing all virtual URI
    *
    * @return array
    */
    public function findVirtualURI()
    {
        //Retrieve all virtual URI
        $res = $this->db->query('SELECT virtual_uri
                                FROM `'.$this->prefixe.'shop_url`
                                WHERE virtual_uri <> \'\'');
        if ($res === false)
        {
            $this->log('ERR'.$this->l('Error while retrieving virtual uri:').' '.$this->db->getError());
            return false;
        }
        return $res;
    }

    /**
    * Update htaccess file
    *
    * @return bool
    */
    private function updateHtaccess()
    {
        if (!file_exists(HTACCESS_FILE) && file_exists(HTACCESS_REPLACE_FILE)) {
            rename(HTACCESS_REPLACE_FILE, HTACCESS_FILE);
        }

        if ($this->old_url != $this->new_url) {
            $this->log($this->l('Updating .htaccess file...'));

            if (!file_exists(HTACCESS_FILE) && !file_exists(HTACCESS_NTBR_FILE))
            {
                $this->log('WAR'.$this->l('Pay attention you do not have a .htaccess file'));
                return true;
            }

            if (!$this->opt['replace_htaccess'] || !file_exists(HTACCESS_FILE)) {
                $htaccess = HTACCESS_NTBR_FILE;
            } else {
                $htaccess = HTACCESS_FILE;
            }

            $conf = '';
            if (($file = fopen($htaccess, 'r')) === false)
            {
                $this->log('ERR'.$this->l('Error while updating .htaccess file, unable to read .htaccess file'));
                return false;
            }

            $shops_uri = $this->findVirtualURI();

            if (substr($this->old_url, 0, 4) == 'www.') {
                $old_url_without_www    = str_replace('www.', '', $this->old_url);
                $old_url_with_www       = $this->old_url;
            } else {
                $old_url_without_www    = $this->old_url;
                $old_url_with_www       = 'www.'.$this->old_url;
            }

            // For librasoft
            $regex_old_url_without_www  = str_replace('.', '\.', $old_url_without_www);
            $regex_old_url_with_www     = str_replace('.', '\.', $old_url_with_www);
            $regex_new_url              = str_replace('.', '\.', $this->new_url);

            //File is open for reading
            while (!feof($file))
            {//Read each line of the file
                $line = fgets($file);
                //Correct bad lines
                if (strpos($line, 'RewriteCond %{HTTP_HOST} ^'.$old_url_without_www.'$') !== false || strpos($line, 'RewriteCond %{HTTP_HOST} ^'.$old_url_with_www.'$') !== false)
                    $line = '';
                if (strpos($line, 'RewriteCond %{HTTP_HOST} ^'.$this->old_domain.'$') !== false)
                    $line = '';
                //Change base uri
                if (strpos($line, 'RewriteRule . - [E=REWRITEBASE:'.$this->old_physical_uri.']') !== false)
                    $line = 'RewriteRule . - [E=REWRITEBASE:'.$this->new_physical_uri.']'."\n";
                if (strpos($line, 'ErrorDocument 404 '.$this->old_physical_uri.'index.php?controller=404') !== false)
                    $line = 'ErrorDocument 404 '.$this->new_physical_uri.'index.php?controller=404'."\n";
                //Replace all occurences of old URI and URL
                $line = str_replace($old_url_with_www, $this->new_url, $line);
                $line = str_replace($old_url_without_www, $this->new_url, $line);

                // Replace all regex occurence of old URI and URL (for librasoft)
                $line = str_replace($regex_old_url_with_www, $regex_new_url, $line);
                $line = str_replace($regex_old_url_without_www, $regex_new_url, $line);
                //Virtual URI
                foreach($shops_uri as $shop_uri)
                {
                    $virtual_uri_ws = rtrim($shop_uri['virtual_uri'], '/');
                    if (strpos($line, 'RewriteRule ^'.$virtual_uri_ws.'$ '.$this->old_physical_uri.$shop_uri['virtual_uri'].' [L,R]') !== false)
                        $line = 'RewriteRule ^'.$virtual_uri_ws.'$ '.$this->new_physical_uri.$shop_uri['virtual_uri'].' [L,R]'."\n";
                    if (strpos($line, 'RewriteRule ^'.$virtual_uri_ws.'/(.*) '.$this->old_physical_uri.'$1 [L]') !== false)
                        $line = 'RewriteRule ^'.$virtual_uri_ws.'/(.*) '.$this->new_physical_uri.'$1 [L]'."\n";
                }
                //Disabling ModPagespeed
                if ($this->opt['disable_modpagespeed'] && strpos($line, 'ModPagespeed') !== false)
                    $line = '#'.$line;

                $conf .= $line;
            }
            fclose($file);

            //Saving .htaccess file
            if (file_put_contents($htaccess, $conf) === false)
            {
                $this->log('ERR'.$this->l('Error while updating .htaccess file, unable to save .htaccess file'));
                return false;
            }

            //Rename htaccess if needed
            if (!file_exists(HTACCESS_FILE))
            {//There must be a .ntbr htaccess file
                if (!rename(HTACCESS_NTBR_FILE, HTACCESS_FILE))
                {
                    $this->log('ERR'.$this->l('Error while renaming .htaccess file, please check file access right'));
                    return false;
                }
            }
        }

        return true;
    }

    /**
    * Return the maximal database field length
    *
    * @param string $type Type information
    * @return int Maximal type length or 0 if unlimited
    */
    private function maximalLength($type)
    {
        $pos = strpos($type, '(');
        if ($pos === false)
            return 0;
        return (int)substr($type, $pos + 1, strpos($type, ')', $pos));
    }

    /**
    * Update links everywhere in database
    *
    * @return bool
    */
    private function updateLinks()
    {
        if ($this->old_url != $this->new_url) {
            $this->log($this->l('Updating links...'));

            // Update backup directory to default value
            $physic_path_modules = realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'modules').DIRECTORY_SEPARATOR;
            $backup_dir = $physic_path_modules.'ntbackupandrestore'.DIRECTORY_SEPARATOR.'backup'.DIRECTORY_SEPARATOR;

            $req_module_version = '
                SELECT `version`
                FROM `'.$this->prefixe.'module`
                WHERE `name` = "ntbackupandrestore"
            ';

            $res_module_version = $this->db->query($req_module_version);

            if ($res_module_version !== false && isset($res_module_version[0]['version']))
            {
                if (version_compare($res_module_version[0]['version'], '11.1.1', '>=') === true) {
                    // Module version at least at 11.1.1
                    $req_backup_dir = '
                        UPDATE `'.$this->prefixe.'ntbr_config`
                        SET `backup_dir` = '.$this->db->q($backup_dir).';
                    ';

                    if (!$this->db->exec($req_backup_dir)) {
                        $this->log('ERR'.$this->l('Error while updating links:').' '.$this->db->getError());
                        return false;
                    }
                }

                if (version_compare($res_module_version[0]['version'], '10.0.0', '>=') === true) {
                    // Module version at least at 10.0.0
                    // Delete backups related to previous shop in the database
                    $req_old_backups = '
                        TRUNCATE `'.$this->prefixe.'ntbr_backups`;
                    ';

                    if (!$this->db->exec($req_old_backups)) {
                        $this->log('ERR'.$this->l('Error while updating links:').' '.$this->db->getError());
                        return false;
                    }
                }
            }

            //List all tables of the database
            $res_tables = $this->db->query("SHOW FULL TABLES WHERE TABLE_TYPE = 'BASE TABLE'");
            if ($res_tables === false)
            {
                $this->log('ERR'.$this->l('Error while updating links:').' '.$this->db->getError());
                return false;
            }

            foreach ($res_tables as $table)
            {
                if (substr($this->old_url, 0, 4) == 'www.') {
                    $old_url_without_www    = str_replace('www.', '', $this->old_url);
                    $old_url_with_www       = $this->old_url;
                } else {
                    $old_url_without_www    = $this->old_url;
                    $old_url_with_www       = 'www.'.$this->old_url;
                }

                $old_with_www_length = strlen($old_url_with_www);
                $new_length = strlen($this->new_url);

                //List all columns of the table
                $current_table = $table['Tables_in_'.$this->db_name];
                if ($current_table == '' || !$current_table)
                    continue;
                $res_columns = $this->db->query('SHOW COLUMNS
                                                FROM `'.$current_table."`
                                                WHERE Type LIKE 'varchar%'
                                                    OR Type LIKE 'VARCHAR%'
                                                    OR Type LIKE 'TINYTEXT%'
                                                    OR Type LIKE 'tinytext%'
                                                    OR Type LIKE 'TEXT%'
                                                    OR Type LIKE 'text%'
                                                    OR Type LIKE 'MEDIUMTEXT%'
                                                    OR Type LIKE 'mediumtext%'
                                                    OR Type LIKE 'longtext%'
                                                    OR Type LIKE 'LONGTEXT%';");
                if ($res_columns === false)
                {
                    $this->log('ERR'.$this->l('Error while updating links:').' '.$this->db->getError());
                    return false;
                }

                foreach ($res_columns as $column)
                {
                    //Replace URL in the field
                    $current_column = $column['Field'];

                    //Detect if this column can contains links
                    $max_length = $this->maximalLength($column['Type']);
                    if ($max_length != 0 && ($old_with_www_length > $max_length || $new_length > $max_length))
                        continue;

                    //Detect if this column is a key
                    if ($column['Key'])
                        continue;

                    if($max_length != 0)
                    {//Column size is limited
                        $req_update_without_www = '
                            UPDATE `'.$current_table.'`
                            SET `'.$current_column.'` = LEFT(REPLACE(`'.$current_column.'`,
                            '.$this->db->q($old_url_without_www).',
                            '.$this->db->q($this->new_url).'),'.$max_length.');
                        ';

                        $req_update_with_www = '
                            UPDATE `'.$current_table.'`
                            SET `'.$current_column.'` = LEFT(REPLACE(`'.$current_column.'`,
                            '.$this->db->q($old_url_with_www).',
                            '.$this->db->q($this->new_url).'),'.$max_length.');
                        ';
                    }
                    else
                    {//No size limit
                        $req_update_without_www = '
                            UPDATE `'.$current_table.'`
                            SET `'.$current_column.'` = REPLACE(`'.$current_column.'`,
                            '.$this->db->q($old_url_without_www).',
                            '.$this->db->q($this->new_url).');
                        ';

                        $req_update_with_www = '
                            UPDATE `'.$current_table.'`
                            SET `'.$current_column.'` = REPLACE(`'.$current_column.'`,
                            '.$this->db->q($old_url_with_www).',
                            '.$this->db->q($this->new_url).');
                        ';
                    }

                    if (!$this->db->exec($req_update_without_www))
                    {
                        $this->log('ERR'.$this->l('Error while updating links:').' '.$this->db->getError());
                        return false;
                    }

                    if (!$this->db->exec($req_update_with_www))
                    {
                        $this->log('ERR'.$this->l('Error while updating links:').' '.$this->db->getError());
                        return false;
                    }
                }
            }
        }

        return true;
    }

    /**
     * Decompress a .gz file
     *
     * @param string $path GZ file path
     * @param string $destination Destination path
     * @return bool
     */
    private function ungz($path, $destination, $nb_part = 1, $total_part = 1)
    {
        $decompressed_file = str_replace('.gz', '', $path);

        //Open gz file
        if (($gz_file = gzopen($path, 'rb')) === false) {
            $this->log('ERR'.$this->l('Error, the compressed backup file cannot be opened'));
            return false;
        }

        //Delete previous tar if needed
        if (file_exists($destination.'/'.$decompressed_file) && $this->position_tar_file <= 0) {
            Tools::fileDelete($destination.'/'.$decompressed_file);
        }

        //Create decompressed file
        if (($decompressed_file = fopen($destination.'/'.$decompressed_file, 'ab')) === false) {
            $this->log('ERR'.$this->l('Error, the uncompressed backup file cannot be created'));
            return false;
        }

        // init with the current position
        $done_size      = ($this->position_tar_file > 0)?$this->position_tar_file:0;
        $old_percent    = ($this->old_percent_tar_file > 0)?$this->old_percent_tar_file:0;
        $filesize       = ($this->filesize_compress_tar > 0)?$this->filesize_compress_tar:Tools::getFileSize($path);

        // Go to where we were (if refresh)
        if ($this->position_tar_file > 0) {
            // Search the max size we can use with the fseek function
            $max_seek = $this->position_tar_file;

            $is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')?true:false;

            if ($is_windows && $this->position_tar_file > self::MAX_SEEK_SIZE) {
                $max_seek = self::MAX_SEEK_SIZE;
            } elseif (!$is_windows && $this->position_tar_file > (PHP_INT_MAX - 1)) {
                $max_seek = PHP_INT_MAX - 1;
            }

            // Set where we were in the file as much as we can with the function fseek
            if (gzseek($gz_file, $max_seek) == -1) {
                $this->log('ERR'.$this->l('Error, the compressed backup file is no longer seekable'));
                gzclose($gz_file);
                return false;
            }

            // Find what is left before we are where we want
            $this->position_tar_file -= $max_seek;
            $max_read = self::MAX_READ_SIZE;

            // Until we are in the right position, read the file
            while ($this->position_tar_file > 0) {
                if ($this->position_tar_file >= $max_read) {
                    $size_to_read = $max_read;
                } else {
                    $size_to_read = $this->position_tar_file;
                }

                if (gzread($gz_file, $size_to_read) === false) {
                    $this->log('ERR'.$this->l('Error, the compressed backup file is no longer readable'));
                    gzclose($gz_file);
                    return false;
                }

                $this->position_tar_file -= $size_to_read;
            }
        }

        //Write decompressed data, 1 Mb each time
        while (!gzeof($gz_file))
        {
            if ((fwrite($decompressed_file, gzread($gz_file, 1048576))) === false) {
                $this->log('ERR'.$this->l('Error, the uncompressed backup file cannot be writen'));
                return false;
            }

            $done_size += 1048576;

            //Compute percentage progression
            $percent = ($done_size * 100) / $filesize;
            if ($percent >= $old_percent + 1)
            {
                $old_percent = round($percent, 0);

                if ($this->loader != '/') {
                    $this->loader = '/';
                } else {
                    $this->loader = '\\';
                }

                if ($total_part == 1) {
                    $this->log($this->l('Decompressing backup').' '.$this->loader);
                } else {
                    $this->log($this->l('Decompressing backup part').' '.$nb_part.' '.$this->loader);
                }
            }

            $this->position_tar_file = $done_size;
            $this->old_percent_tar_file = $old_percent;

            //refresh
            $this->refreshBackup(true);
        }

        //Close files
        if (!fclose($decompressed_file)) {
            $this->log('ERR'.$this->l('Error, the uncompressed backup file cannot be closed'));
            return false;
        }

        if (!gzclose($gz_file)) {
            $this->log('ERR'.$this->l('Error, the compressed backup file cannot be closed'));
            return false;
        }

        return true;
    }

    /**
     * Decompress a .bz2 file
     *
     * @param string $path BZ2 file path
     * @param string $destination Destination path
     * @return bool
     */
    private function unbz($path, $destination, $nb_part = 1, $total_part = 1)
    {
        $decompressed_file = str_replace('.bz2', '', $path);
        $max_bzread = 8192; // bzread cannot read more than 8192

        //Open bz file
        if (($bz_file = bzopen($path, 'r')) === false)
            return false;

        //Create decompressed file
        if (($decompressed_file = fopen($destination.'/'.$decompressed_file, 'a')) === false)
            return false;

        // init with the current position
        $done_size      = ($this->position_tar_file > 0)?$this->position_tar_file:0;
        $old_percent    = ($this->old_percent_tar_file > 0)?$this->old_percent_tar_file:0;
        $filesize       = ($this->filesize_compress_tar > 0)?$this->filesize_compress_tar:Tools::getFileSize($path);

        // Go to where we were (if refresh)
        if ($this->position_tar_file > 0) {
            // Find what is left before we are where we want
            $max_read = $max_bzread;

            // Until we are in the right position, read the file
            while ($this->position_tar_file > 0) {
                if ($this->position_tar_file >= $max_read) {
                    $size_to_read = $max_read;
                } else {
                    $size_to_read = $this->position_tar_file;
                }

                $data = bzread($bz_file, $size_to_read);

                if ($data === false) {
                    $this->log('ERR'.$this->l('Error, the compressed backup file is no longer readable'));
                    bzclose($bz_file);
                    return false;
                } elseif (bzerrno($bz_file) !== 0) {
                    $this->log('ERR'.$this->l('Error, the compressed backup file has a compression issue'));
                    bzclose($bz_file);
                    return false;
                }

                $this->position_tar_file -= $size_to_read;
            }
        }

        //Write decompressed data, max bzread each time
        while (!feof($bz_file)) {
            $data = bzread($bz_file, $max_bzread);
            if($data !== false)
            {
                if (bzerrno($bz_file) !== 0) {
                    $this->log('ERR'.$this->l('Error, the compressed backup file has a compression issue'));
                    bzclose($bz_file);
                    return false;
                }

                if ((fwrite($decompressed_file, $data)) === false)
                    return false;

                $done_size += $max_bzread;

                //Compute percentage progression
                $percent = ($done_size * 100) / $filesize;
                if ($percent >= $old_percent + 1)
                {
                    $old_percent = round($percent, 0);

                    if ($this->loader != '/') {
                        $this->loader = '/';
                    } else {
                        $this->loader = '\\';
                    }

                    if ($total_part == 1) {
                        $this->log($this->l('Decompressing backup').' '.$this->loader);
                    } else {
                        $this->log($this->l('Decompressing backup part').' '.$nb_part.' '.$this->loader);
                    }
                }

                $this->position_tar_file = $done_size;
                $this->old_percent_tar_file = $old_percent;
                //refresh
                $this->refreshBackup(true);
            }
        }

        //Close files
        if (!fclose($decompressed_file))
            return false;
        if (!bzclose($bz_file))
            return false;

        return true;
    }

    /**
    * Extract files from a TAR file (even for file > 2 Gb)
    * Basic specification : https://www.gnu.org/software/tar/manual/html_node/Standard.html
    *
    * @param string $path Tar file path
    * @param string $destination Destination path
    * @return bool
    */
    private function untar($path, $destination = './', $nb_part = 1, $total_part = 1, $only_dump = false)
    {
        $this->next_step = self::STEP_RESTORE_FILES_CONTINUE;

        if (!file_exists($path))
        {
            $this->log('ERR'.$this->l('Error while restoring files, tar file does not exist'));
            return false;
        }

        $filesize = ($this->filesize_tar > 0)?$this->filesize_tar:Tools::getFileSize($path);
        if ($filesize < 2048)
        {//A valid tar file should contains at least 4 blocks of 512 bytes
            $this->log('ERR'.$this->l('Error while restoring files, tar file is not correct'));
            return false;
        }

        //Destination path need a trailing slash
        $destination = Tools::trailingSlash($destination);

        if (!($file = fopen($path, 'rb')))
        {
            $this->log('ERR'.$this->l('Error while restoring files, unable to open tar file'));
            return false;
        }

        // init with the current position
        $done_size = ($this->position_restore_file > 0)?$this->position_restore_file:0;
        $old_percent = ($this->old_percent_restore_file > 0)?$this->old_percent_restore_file:0;
        $name = '';

        // Go to where we were (if refresh)
        if ($this->position_restore_file > 0) {
            // Search the max size we can use with the fseek function
            $max_seek = $this->position_restore_file;

            if ($this->position_restore_file > (PHP_INT_MAX - 1)) {
                $max_seek = PHP_INT_MAX - 1;
            }

            // Set where we were in the file as much as we can with the function fseek
            if (fseek($file, $max_seek) == -1) {
                $this->log('ERR'.$this->l('Error, the backup is no longer seekable'));
                fclose($file);
                return false;
            }

            // Find what is left before we are where we want
            $this->position_restore_file -= $max_seek;
            $max_read = self::MAX_READ_SIZE;

            // Until we are in the right position, read the file
            while ($this->position_restore_file > 0) {
                if ($this->position_restore_file >= $max_read) {
                    $size_to_read = $max_read;
                } else {
                    $size_to_read = $this->position_restore_file;
                }

                if (fread($file, $size_to_read) === false) {
                    $this->log('ERR'.$this->l('Error, the backup is no longer readable'));
                    fclose($file);
                    return false;
                }

                $this->position_restore_file -= $size_to_read;
            }
        }

        if (($block = fread($file, 512)) === false)
        {
            $this->log('ERR'.$this->l('Error while restoring files, unable to read tar file'));
            return false;
        }

        while (!feof($file) || $done_size < ($filesize - 1024))
        {//Read header
            $done_size += 512;
            $header = array();
            $header['name'] = trim(substr($block, 0, 100));
            $header['mode'] = trim(substr($block, 103, 4));
            $header['uid'] = (int)substr($block, 108, 7);
            $header['gid'] = (int)substr($block, 116, 7);
            $header['size'] = octdec(substr($block, 124, 11));
            $header['mtime'] = octdec(substr($block, 136, 11));
            $header['chksum'] = octdec(substr($block, 148, 7));
			$header['typeflag'] = 0;
			if(is_numeric(substr($block, 156, 1)))
				$header['typeflag'] = octdec(substr($block, 156, 1));
            $header['linkname'] = trim(substr($block, 157, 99));
            $header['magic'] = trim(substr($block, 257, 5));
            $header['version'] = trim(substr($block, 263, 2));
            $header['uname'] = trim(substr($block, 265, 31));
            $header['gname'] = trim(substr($block, 297, 31));
            $header['devmajor'] = trim(substr($block, 329, 8));
            $header['devminor'] = trim(substr($block, 337, 8));
            $header['prefix'] = trim(substr($block, 345, 155));

            if ($header['name'] == '././@LongLink')
            {//It's a file with a long name, name is stored in next block
                $name = '';
                $size = 0;
                while ($size < $header['size'])
                {//Read data
                    if (($block = fread($file, 512)) === false)
                    {
                        $this->log('ERR'.$this->l('Error while restoring files, unable to read name file in tar file'));
                        fclose($file);
                        return false;
                    }
                    if (feof($file))
                    {
                        $this->log('ERR'.$this->l('Error while restoring files, tar file truncated'));
                        fclose($file);
                        return false;
                    }
                    $size += 512;
                    $done_size += 512;
                    //The last block is padded with zero if too large
                    if ($size > $header['size'])
                        $block = substr($block, 0, 512 - ($size - $header['size']) - 1); //-1 to remove last nul character
                    //Get Name
                    $name .= $block;
                }

                //Remove last nul character
                $name = substr($name, 0, strlen($name));
                //Read next 512 bytes
                $block = fread($file, 512);
                continue;
            }

            //In ustar format archive, long file names are stored half in prefix header and half in name header
            if ($header['magic'] == 'ustar' && $header['prefix'] != '')
                $name = $destination.$header['prefix'].'/'.$header['name'];

            if ($header['typeflag'] == 5 && $header['name'] != '././@LongLink' && !$only_dump)
            {//It's a directory
                if ($name == '')
                    $name = $destination.$header['name'];
                $new_directory = Tools::directoryCheckPath($name);
                $name = '';

                //Create complete destination directory
                //Tools::directoryCreate($new_directory, $header['mode']);
                Tools::directoryCreate($new_directory, octdec($this->folder_access_rights));

                //Read next 512 bytes
                $block = fread($file, 512);
                continue;
            }

            if ($header['typeflag'] == 0 && $header['name'] != '././@LongLink')
            {//It's a regular file
                if ($name == '')
                    $name = $destination.$header['name'];
                $new_file = $name;
                $name = '';

                $matches = array();
                // If file name content only "."
                preg_match('/^\.*$/', basename($new_file), $matches);

                if (count($matches)) {
                    $block = fread($file, 512);
                    continue;
                }

                if (
                    (
                        strpos($new_file, '.user.ini') !== false
                        || strpos($new_file, '.eslintignore') !== false
                        || strpos($new_file, '.eslintrc.js') !== false
                        || strpos($new_file, '.php_cs.dist') !== false
                    )
                    && file_exists($new_file)
                ) {
                    $new_file .= '.ntbr';
                }

                if (!$only_dump || strpos($new_file, DUMP_FILE_NAME.'.'.DUMP_FILE_EXT) || preg_match('/'.DUMP_FILE_NAME.'(_[0-9]+)?\.'.DUMP_FILE_EXT.'/', $new_file)) {
                    //Create complete destination directory
                    if(!Tools::directoryCreate(Tools::directoryCheckPath(dirname($new_file)), octdec($this->folder_access_rights)))
                    {
                        $this->log('ERR'.$this->l('Error while restoring files, unable to create directory').' '.dirname($new_file));
                        return false;
                    }
                }

                if($new_file == './')
                {//No size file
                    $block = fread($file, 512);
                    continue;
                }

                if($new_file == './.htaccess')
                {//Temporary rename htaccess file so no access problem
                    $new_file = './'.HTACCESS_NTBR_FILE;

                    if (file_exists(HTACCESS_FILE)) {
                        if ($this->opt['replace_htaccess']) {
                            rename(HTACCESS_FILE, HTACCESS_REPLACE_FILE);
                        }
                    }
                }

                //Check filename validity on Windows OS
                if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
                    $old_file = $new_file;

                    //Some characters are not available in Windows filesystem : \ : * ? | < >
                    $reserved = preg_quote('\:*?"<>|', '/');
                    $new_file = preg_replace("/([\\x00-\\x1f{$reserved}])/", "_", $new_file);

                    // Windows files cannot end by "."
                    if (substr($new_file, -1) == '.') {
                        $new_file .= 'linux';
                        $this->log($this->l('Error while restoring files, unable to create file').' '.$new_file);
                    }

                    if ($old_file != $new_file) {
                        $this->log(sprintf($this->l('File "%s" has been renamed in "%s"'), $old_file, $new_file), true);
                    }
                }
                if (
                    (!$only_dump || preg_match('/'.DUMP_FILE_NAME.'(_[0-9]+)?\.'.DUMP_FILE_EXT.'/', $new_file))
                    && basename($new_file) != self::TEMP_EMPTY_FILE
                ) {
                    //Create new file
                    if (($file_write = fopen($new_file, 'wb')) === false)
                    {
                        $this->log('ERR'.$this->l('Error while restoring files, unable to create file').' '.$new_file);
                        fclose($file);
                        return false;
                    }
                }

                $size = 0;
                while ($size < $header['size'])
                {//Read data
                    if (($block = fread($file, 512)) === false)
                    {
                        $this->log('ERR'.$this->l('Error while restoring files, unable to read data in tar file'));
                        fclose($file_write);
                        fclose($file);
                        return false;
                    }
                    if (feof($file))
                    {
                        $this->log('ERR'.$this->l('Error while restoring files, tar file truncated'));
                        fclose($file_write);
                        fclose($file);
                        return false;
                    }
                    $size += 512;
                    $done_size += 512;

                    //The last block is padded with zero if too large
                    if ($size > $header['size'])
                        $block = substr($block, 0, 512 - ($size - $header['size']));

                    if ((!$only_dump || preg_match('/'.DUMP_FILE_NAME.'(_[0-9]+)?\.'.DUMP_FILE_EXT.'/', $new_file))
                        && basename($new_file) != self::TEMP_EMPTY_FILE
                    ) {
                        //Write data
                        if (fwrite($file_write, $block) === false)
                        {
                            $this->log('ERR'.$this->l('Error while restoring files, unable to write file').' '.$new_file);
                            fclose($file_write);
                            fclose($file);
                            return false;
                        }
                    }
                }

                if ((!$only_dump || preg_match('/'.DUMP_FILE_NAME.'(_[0-9]+)?\.'.DUMP_FILE_EXT.'/', $new_file))
                    && basename($new_file) != self::TEMP_EMPTY_FILE
                ) {
                    //Close new file and apply rights and times
                    fclose($file_write);
                    touch($new_file, $header['mtime'], $header['mtime']);

                    try {
                        //chmod($new_file, $header['mode']);
                        chmod($new_file, octdec($this->file_access_rights));
                    } catch (\Throwable $t) {
                        // Executed only in PHP 7, will not match in PHP 5
                    } catch (\Exception $e) {
                        // Executed only in PHP 5, will not be reached in PHP 7
                    }
                }

                //Compute percentage progression
                $percent = ($done_size * 100) / $filesize;
                if ($percent >= $old_percent + 1)
                {
                    $old_percent = round($percent, 0);

                    if ($total_part == 1) {
                        if($percent >= 101) {
                            $this->log($this->l('Restoring files:').' '.round($percent, 0).'%. '.$this->l('Backup file is big, progress is not accurate but everything is running well'));
                        } else {
                            $this->log($this->l('Restoring files:').' '.round($percent, 0).'%');
                        }
                    } else {
                        if($percent >= 101) {
                            $this->log($this->l('Restoring files:').' '.$nb_part.'/'.$total_part.$this->l(':').' '.round($percent, 0).'%. '.$this->l('Backup file is big, progress is not accurate but everything is running well'));
                        } else {
                            $this->log($this->l('Restoring files:').' '.$nb_part.'/'.$total_part.$this->l(':').' '.round($percent, 0).'%');
                        }
                    }
                }
            }

            //Other typeflag are currently unsupported and ignored (not restored)
            //1 : Link to another file already archived
            //2 : Symbolic link
            //3 : Character special device
            //4 : Block special device
            //6 : FIFO special file
            //7 : Contiguous files
            //L : Long file name

            $this->position_restore_file = $done_size;
            $this->old_percent_restore_file = $old_percent;
            //refresh
            $this->refreshBackup(true);

            //Read next 512 bytes
            $block = fread($file, 512);
        }
        fclose($file);
        return true;
    }
}

class Dbn
{
    private $pdo;
    private $error;
    private $t;

    /**
     * __construct()
     *
     */
    public function __construct($translations)
    {
        $this->t = $translations;
    }

    /**
    * Return the translation of text in the selected language
    *
    * @param string $text Text to translate
    * @return string Translated text
    */
    public function l($text)
    {
        if(isset($this->t[$text]))
            return $this->t[$text];
        return $text;
    }

    /**
     * Connect to the database
     *
     * @param string $database Database name
     * @param string $user User
     * @param string $pass Password
     * @param string $host Host
     * @param string $port Port
     * @param string $engine PDO Driver (mysql, pgsql...)
     */
    public function connect($database, $user, $pass, $host = 'localhost', $port = '', $engine = 'mysql')
    {
        $this->initError();

        $this->engine = $engine;
        $this->host = $host;
        $this->port = $port;
        $this->database = $database;
        $this->user = $user;
        $this->pass = $pass;

        if ($this->engine == 'sqlite')
            $dns = 'sqlite:'.$this->database;
        else
            $dns = $this->engine.':dbname='.$this->database.';host='.$this->host.';charset=utf8';
        if ($this->port != '') $dns .= ';port='.$this->port;

        try
        {
            $this->pdo = new PDO($dns, $this->user, $this->pass);
        }
        catch(PDOException $e)
        {
            //$this->setError($e);
            return false;
        }

        return true;
    }

    /**
     * Reconnect the database
     *
     * @return bool
     *
     */
    public function reconnect()
    {
        return $this->connect($this->database, $this->user, $this->pass, $this->host, $this->port, $this->engine);
    }

    /**
     * Return the last error message
     *
     * @return string
     *
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * Set error message
     *
     * @return void
     *
     */
    private function setError($messsage)
    {
        $this->error = $messsage;
    }

    /**
     * Empty error message
     *
     * @return void
     *
     */
    private function initError()
    {
        $this->error = '';
    }

    /**
     * Get PDO last error
     *
     * @return string
     *
     */
    public function getPDOError()
    {
        $error = $this->pdo->errorInfo();
        return $error[2];
    }

    /**
    * Execute a request
    * Request params should be escaped with PDO::quote()
    *
    * @param string $request The request
    * @return bool
    *
    */
    public function exec($request)
    {
        $this->initError();

        if ($this->pdo->exec($request) === false)
        {//Bad request
            $this->setError($this->l('Execution failed on:')."\n".$this->getPDOError().' '.$this->l('on request:')."\n".$request);
            return false;
        }
        return true;
    }

    /**
    * Execute a query (select, show...) and return an array containing the result
    * Request params should be escaped with q()
    *
    * @param string $request The request
    * @return mixed False on error, result array on success
    *
    */
    public function query($request)
    {
        $this->initError();

        $result = array();
        $res = $this->pdo->query($request);

        if (is_array($res) || is_object($res)) {
            foreach ($res as $row)
                $result[] = $row;
        } elseif ($res === false)
        {
            $this->setError($this->l('Query failed on:')."\n".$this->getPDOError().' '.$this->l('on request:')."\n".$request);
            return false;
        }
        return $result;
    }

    /**
    * Escape a value and quote it if necessary
    *
    * @param string $value Value to escape and quote if necessary
    * @return bool
    *
    */
    public function q($value)
    {
        if (is_int($value))
            return (int)$value;
        if (is_float($value))
            return (float)$value;
        if (is_bool($value) && $value)
            return 'true';
        if (is_bool($value) && !$value)
            return 'false';
        if (is_null($value))
            return 'null';
        return $this->pdo->quote($value, PDO::PARAM_STR);
    }
}

class Tools
{
    const CIPHER_CRYPTAGE = 'aes-256-cbc'; // The cipher
    const CLE_CRYPTAGE = 'D_T+rW*H`0b84ra.YIen(X|>_Ot&|va;9odG:Gkk3meU=y5kBf3}Yuim'; // The cryptage key

    /**
     * fileWrite()
     *
     * Write a file
     *
     * @param string $path File path
     * @param string $content Content of the file
     * @param string $write_mode Write mode (r, r+, w, w+, a, a+, x, x+)
     * @return boolean True if file written
     *
     */
    public static function fileWrite($path, $content, $write_mode = 'w+')
    {
        self::directoryCreate(dirname($path));

        if (!($file = fopen($path, $write_mode)))
            return false;
        if (fwrite($file, $content) === false)
            return false;
        if (!fclose($file))
            return false;
        return true;
    }

    /**
     * directoryCreate()
     *
     * Create a directory and all its parents if necessary
     *
     * @param string $path Path of the folder
     * @param integer $rights Rights of the folder
     * @return boolean True if directory created
     *
     */
    public static function directoryCreate($path, $rights = 0777)
    {
        if (is_dir($path))
            return true;

        if (!mkdir($path, $rights, true))
                return false;

        return true;
    }

    /**
     * directoryCheckPath()
     *
     * Check directory path and changed it if needed for windows
     *
     * @param string $path Path of the folder
     * @return string Correct path
     *
     */
    public static function directoryCheckPath($path)
    {
        if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
            return $path;
        }

        $dir_part = dirname($path);
        $file_part = basename($path);

        $list_parts = explode('/', $dir_part);

        foreach ($list_parts as &$name) {
            //Some characters are not available in Windows filesystem : \ : * ? | < >
            $reserved = preg_quote('\:*?"<>|', '/');
            $name = preg_replace("/([\\x00-\\x1f{$reserved}])/", "_", $name);

            // Windows files cannot end by ".", but can be '.' or '..'
            if (substr($name, -1) == '.' && $name != '.' && $name != '..') {
                $name .= 'linux';
            }
        }

        $new_path = implode('/', $list_parts).'/'.$file_part;

        if ($path != $new_path) {
            Tools::log(sprintf(l('File "%s" has been renamed in "%s"'), $path, $new_path), true);
        }

        return $new_path;
    }

    /**
     * fileDelete()
     *
     * Delete a file
     *
     * @param string $path Path of the file to delete
     * @return boolean
     *
     */
    public static function fileDelete($path)
    {
        if (is_file($path))
            return unlink($path);
        else
            return false;
    }

    /**
     * Based on https://github.com/jkuchar/BigFileTools/blob/master/class/BigFileTools.php
     * Return file size (even for file > 2 Gb)
     *
     * @param string $path Path of the file
     * @return mixed File size or false if error
     */
    public static function getFileSize($path)
    {
        if (!file_exists($path)) {
            return false;
        }

        $real_path = realpath($path);

        if (!$real_path) {
            return false;
        }

        if (function_exists("curl_init")) {
            $ch = curl_init('file://'.rawurlencode($real_path));
            curl_setopt($ch, CURLOPT_NOBODY, true);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HEADER, true);

            $curl_copy  = curl_copy_handle($ch);
            $data       = curl_exec($ch);

            if ($data === false && strpos(curl_error($ch), 'HTTP/2') !== false) {
                curl_close($ch);
                $ch = curl_copy_handle($curl_copy);
                curl_close($curl_copy);

                // The HTTP/2 is not supported, try again with HTTP/1
                curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
                $data = curl_exec($ch);
            } else {
                curl_close($curl_copy);
            }

            curl_close($ch);
            if ($data !== false && preg_match('/Content-Length: (\d+)/', $data, $matches)) {
                return $matches[1];
            }
        }

        $size = filesize($real_path);

        if (!($file = fopen($real_path, 'rb'))) {
            return false;
        }

        if ($size >= 0) {
            //Check if it really is a small file (< 2 GB)
            if (fseek($file, 0, SEEK_END) === 0) {
                //It really is a small file
                fclose($file);
                return $size;
            }
        }

        //From now on, we are sure this is a big file
        //Quickly jump to the first 2 GB with fseek. After that fseek is not working on 32 bit php (it uses int internally)
        $size = PHP_INT_MAX - 1;
        if (fseek($file, PHP_INT_MAX - 1) !== 0) {
            fclose($file);
            return false;
        }

        $length = 1024 * 1024;
        while (!feof($file)) {
            //Read the file until end
            $read = fread($file, $length);
            $size = bcadd($size, $length);
        }
        $size = bcsub($size, $length);
        $size = bcadd($size, strlen($read));

        fclose($file);
        return $size;
    }

    /**
    * Return file path with a trailing slash
    *
    * @param string $path File path
    * @return string The file path with a slash at its end
    */
    public static function trailingSlash($path)
    {
        if (!preg_match('/\/$/', $path))
            return $path.'/';
        return $path;
    }

    /**
    * Log()
    *
    * Log message to file
    *
    * @param string $message Message to log
    * @return void
    *
    */
    public static function log($message, $not_displayed = false)
    {
        if (!is_string($message)) {
            $message = print_r($message, true);
        } else {
            $message = html_entity_decode($message, ENT_COMPAT, 'UTF-8');
        }

        if (ACTIVATE_LOG) {
            self::fileWrite(LOG_FILE, date(LOG_DATE_FORMAT).' '.$message."\n", 'a+');
        }

        if (!$message || $message == '') {
            return false;
        }

        // The log should appears in the module progress
        if (!$not_displayed) {
            self::fileWrite(LASTLOG_FILE, $message, 'w+');
        }
    }

    /**
     * Get lines count in a file
     *
     * @param string $path Path of the file
     * @return int Total lines
     *
     */
    public static function fileTotalLines($path)
    {
        if (!file_exists($path))
            return false;

        $line_nb = 0;
        if (($file = fopen($path, 'r')) === false)
            return false;

        //File is open for reading
        while (!feof($file))
        {//Read each line
            $line_nb++;
            if (fgets($file) === false)
                break;
        }
        fclose($file);

        return $line_nb;
    }

    /**
     * Get current directory URL
     *
     * @return string URL
     *
     */
    public static function currentDirectoryURL()
    {
        //Get complete script URL
        $port   = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443)?'':':'.$_SERVER['SERVER_PORT'];
        $url    = $_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
        //Remove script name
        $slash = strrpos($url, '/');
        $url = substr($url, 0, $slash);

        return $url;
    }

    /**
     * Return 'true' or 'false' string
     *
     * @param boolean $value True or false value
     * @return string URL
     *
     */
    public static function tf($value)
    {
        if($value)
            return 'true';
        else
            return 'false';
    }

    /**
     * Check IP address
     *
     * @param string $ip_ok Authorized IP
     * @return bool
     *
     */
    public static function check_ip($ip_ok)
    {
        $ip = self::ip();

        if($ip === $ip_ok)
            return true;
        return false;
    }

    /**
     * Get ip of the launcher of this script
     *
     * @return string IP
     */
    public static function ip()
    {
        if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
            return $_SERVER['HTTP_X_FORWARDED_FOR'];
        if(isset($_SERVER['HTTP_CLIENT_IP']))
            return $_SERVER['HTTP_CLIENT_IP'];
        return $_SERVER['REMOTE_ADDR'];
    }

    /**
     * Display a maintenance page and die
     *
     * @param string $l Translation array
     * @return string IP
     */
    public static function display_maintenance_page($l)
    {
        die(get_maintenance_page($l));
    }

    /**
     * Get the content of a maintenance page
     *
     * @param string $l Translation array
     * @return string content of a maintenance page
     */
    public static function get_maintenance_page($l)
    {
        return '<!doctype html>
            <html>
            <head>
            <title>'.self::l($l, 'Site Maintenance').'</title>
            <style>
              body { text-align: center; padding: 150px; }
              h1 { font-size: 50px; }
              body { font: 20px Helvetica, sans-serif; color: #333; }
              article { display: block; text-align: left; width: 800px; margin: 0 auto; }
            </style>
            </head>
            <body>
            <article>
                <h1>'.self::l($l, 'We will be back soon!').'</h1>
                <p>'.self::l($l, 'Sorry for the inconvenience but we are performing some maintenance at the moment.').'</p>
            </article>
            </body>
            </html>';
    }

    /**
    * Return the translation of text in the selected language
    *
    * @param string $translations Translation texts
    * @param string $text Text to translate
    * @return string Translated text
    */
    public static function l($translations, $text)
    {
        if(isset($translations[$text]))
            return $translations[$text];
        return $text;
    }

    public static function encrypt($pure_string)
    {
        if (!extension_loaded('openssl')) {
            return false;
        }

        $iv_size    = openssl_cipher_iv_length(self::CIPHER_CRYPTAGE);
        $iv         = openssl_random_pseudo_bytes($iv_size);

        $encrypted_string = openssl_encrypt(
            $pure_string,
            self::CIPHER_CRYPTAGE,
            self::CLE_CRYPTAGE,
            OPENSSL_RAW_DATA,
            $iv
        );

        if ($encrypted_string === false) {
            while ($msg = openssl_error_string()) {
                self::log($msg);
            }

            return false;
        }

        $hmac = hash_hmac('sha256', $encrypted_string, self::CLE_CRYPTAGE, true);

        return base64_encode($iv.$hmac.$encrypted_string);
    }

    public static function decrypt($encrypted_string)
    {
        if (!extension_loaded('openssl')) {
            return false;
        }

        if ($encrypted_string == '') {
            return $encrypted_string;
        }

        $decode_string  = base64_decode($encrypted_string);
        $iv_size        = openssl_cipher_iv_length(self::CIPHER_CRYPTAGE);
        $iv             = self::substr($decode_string, 0, $iv_size, '8bit');
        $hmac           = self::substr($decode_string, $iv_size, 32, '8bit');
        $ciphertext_raw = str_replace($iv.$hmac, '', $decode_string);

        $decrypted_string = openssl_decrypt(
            $ciphertext_raw,
            self::CIPHER_CRYPTAGE,
            self::CLE_CRYPTAGE,
            OPENSSL_RAW_DATA,
            $iv
        );

        if ($decrypted_string === false) {
            while ($msg = openssl_error_string()) {
                self::log($msg);
            }

            return false;
        }

        $calcmac = hash_hmac('sha256', $ciphertext_raw, self::CLE_CRYPTAGE, true);

        if (self::hash_equals($hmac, $calcmac)) {//timing attack safe comparison
            return $decrypted_string;
        }

        return false;
    }

    public static function substr($str, $start, $length = false, $encoding = 'utf-8')
    {
        if (is_array($str)) {
            return false;
        }

        if (function_exists('mb_substr')) {
            return mb_substr($str, (int) $start, ($length === false ? self::strlen($str) : (int) $length), $encoding);
        }

        return substr($str, $start, ($length === false ? self::strlen($str) : (int) $length));
    }

    public static function strlen($str, $encoding = 'UTF-8')
    {
        if (is_array($str)) {
            return false;
        }

        $str = html_entity_decode($str, ENT_COMPAT, 'UTF-8');

        if (function_exists('mb_strlen')) {
            return mb_strlen($str, $encoding);
        }

        return strlen($str);
    }

    /**
     * Timing attack safe string comparison
     *
     * @param String $known_string  The string of known length to compare against
     * @param String $user_string   The user-supplied string
     *
     * @return boolean
     */
    public static function hash_equals($known_string, $user_string) {
        if(!function_exists('hash_equals')) {
            if (strlen($known_string) != strlen($user_string)) {
                return false;
            } else {
                $res = $known_string ^ $user_string;
                $ret = 0;
                for($i = strlen($res) - 1; $i >= 0; $i--) $ret |= ord($res[$i]);
                return !$ret;
            }
        } else {
            return hash_equals($known_string, $user_string);
        }
    }
}