· 9 years ago · Aug 29, 2017, 12:42 PM
1<?php
2
3//If you want to hide everything to others while you are restoring :
4// 1) Create an empty index.html file in your base directory
5// 2) Fill in $my_ip down here with your public (external) ip address. You can get your external ip adress with this website : rkx.fr
6// 3) Copy this script and your backup to your base directory and execute this script
7$my_ip = '176.134.140.100';
8
9
10
11
12//-----------------------------------------------------------------------------
13// i18n
14//-----------------------------------------------------------------------------
15$t = array(
16 'en' => array(
17 'Site Maintenance' => 'Site Maintenance',
18 'We will be back soon!' => 'We will be back soon!',
19 '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.',
20 'Yes' => 'Yes',
21 'No' => 'No',
22 'Starting restoration' => 'Starting restoration',
23 'Error : ' => 'Error : ',
24 'No files restoration, as wanted' => 'No files restoration, as wanted',
25 'No database restoration, as wanted' => 'No database restoration, as wanted',
26 'FINISH' => 'FINISH',
27 'FINISH ! Your backup was restored with success !' => 'FINISH ! Your backup was restored with success !',
28 'Error' => 'Error',
29 'Error while restoring files : No backup file found' => 'Error while restoring files : No backup file found',
30 'Restoring backup...' => 'Restoring backup...',
31 'Decompressing backup...' => 'Decompressing backup...',
32 'Restoring files...' => 'Restoring files...',
33 'Error : Unable to connect to the database ' => 'Error : Unable to connect to the database ',
34 'Restoring database...' => 'Restoring database...',
35 'Error while restoring database : ' => 'Error while restoring database : ',
36 'Updating URL configuration...' => 'Updating URL configuration...',
37 'Error while updating URL configuration : ' => 'Error while updating URL configuration : ',
38 'Deleting customers email...' => 'Deleting customers email...',
39 'Error while deleting customers emails : ' => 'Error while deleting customers emails : ',
40 'Error while deleting mailalert customers emails : ' => 'Error while deleting mailalert customers emails : ',
41 'Disabling SSL...' => 'Disabling SSL...',
42 'Error while disabling SSL : ' => 'Error while disabling SSL : ',
43 'Disabling media servers...' => 'Disabling media servers...',
44 'Error while disabling media servers : ' => 'Error while disabling media servers : ',
45 'Changing table prefix...' => 'Changing table prefix...',
46 'Error while changing table prefix : ' => 'Error while changing table prefix : ',
47 'Creating super admin...' => 'Creating super admin...',
48 'Error while creating super admin : ' => 'Error while creating super admin : ',
49 'Error while getting employee by email : ' => 'Error while getting employee by email : ',
50 'Error while updating super admin password : ' => 'Error while updating super admin password : ',
51 'Error while creating super admin : ' => 'Error while creating super admin : ',
52 'Error while getting likely understood language : ' => 'Error while getting likely understood language : ',
53 'Changing email shop...' => 'Changing email shop...',
54 'Error while changing email shop : ' => 'Error while changing email shop : ',
55 'Error while retrieving virtual uri : ' => 'Error while retrieving virtual uri : ',
56 'Updating settings...' => 'Updating settings...',
57 'Error while updating settings, settings file does not exist' => 'Error while updating settings, settings file does not exist',
58 'Error while updating settings, unable to read settings file' => 'Error while updating settings, unable to read settings file',
59 'Error while updating settings, unable to save settings file' => 'Error while updating settings, unable to save settings file',
60 'Updating .htaccess file...' => 'Updating .htaccess file...',
61 'Error while renaming .htaccess file, please check file access rigth' => 'Error while renaming .htaccess file, please check file access rigth',
62 'Error while updating .htaccess file, .htaccess file does not exist' => 'Error while updating .htaccess file, .htaccess file does not exist',
63 'Error while updating .htaccess file, unable to read .htaccess file' => 'Error while updating .htaccess file, unable to read .htaccess file',
64 'Error while updating .htaccess file, unable to save .htaccess file' => 'Error while updating .htaccess file, unable to save .htaccess file',
65 'Updating links...' => 'Updating links...',
66 'Error while updating links : ' => 'Error while updating links : ',
67 'Error while restoring files, tar file does not exist' => 'Error while restoring files, tar file does not exist',
68 'Error while restoring files, tar file is not correct' => 'Error while restoring files, tar file is not correct',
69 'Error while restoring files, unable to open tar file' => 'Error while restoring files, unable to open tar file',
70 'Error while restoring files, unable to read tar file' => 'Error while restoring files, unable to read tar file',
71 'Error while restoring files, unable to read name file in tar file' => 'Error while restoring files, unable to read name file in tar file',
72 'Error while restoring files, tar file truncated' => 'Error while restoring files, tar file truncated',
73 'Error while restoring files, unable to create directory ' => 'Error while restoring files, unable to create directory ',
74 'Error while restoring files, unable to create file ' => 'Error while restoring files, unable to create file ',
75 'Error while restoring files, unable to read data in tar file' => 'Error while restoring files, unable to read data in tar file',
76 'Error while restoring files, tar file truncated' => 'Error while restoring files, tar file truncated',
77 'Error while restoring files, unable to write file ' => 'Error while restoring files, unable to write file ',
78 'Restoring files : ' => 'Restoring files : ',
79 'Error while checking existence of table ' => 'Error while checking existence of table ',
80 'Restoring database : ' => 'Restoring database : ',
81 'Execution failed on :' => 'Execution failed on :',
82 ' on request :' => ' on request :',
83 'Query failed on :' => 'Query failed on :',
84 'No SQL file' => 'No SQL file',
85 'Unable to open SQL file' => 'Unable to open SQL file',
86 'Restoration failed on line n°' => 'Restoration failed on line n°',
87 'Nt Restoration for Prestashop' => 'Nt Restoration for Prestashop',
88 'Message' => 'Message',
89 'Refresh' => 'Refresh',
90 'Database connection parameters' => 'Database connection parameters',
91 'Database server address' => 'Database server address',
92 'Host server' => 'Host server',
93 'Database name' => 'Database name',
94 'Name' => 'Name',
95 'Database login' => 'Database login',
96 'User' => 'User',
97 'Database password' => 'Database password',
98 'Password' => 'Password',
99 'Options' => 'Options',
100 'Clean' => 'Clean',
101 'Delete backup file after restoration' => 'Delete backup file after restoration',
102 'Change shop email' => 'Change shop email',
103 'You can provide a new shop contact email' => 'You can provide a new shop contact email',
104 'Email' => 'Email',
105 'Create super admin' => 'Create super admin',
106 'Create a new super admin' => 'Create a new super admin',
107 'First name' => 'First name',
108 'Last name' => 'Last name',
109 'Delete customers emails' => 'Delete customers emails',
110 'Delete all customers emails. Useful for dev local test shop' => 'Delete all customers emails. Useful for dev local test shop',
111 'Disable SSL' => 'Disable SSL',
112 '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',
113 'Disable media servers' => 'Disable media servers',
114 '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',
115 'Disable cache' => 'Disable cache',
116 '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',
117 'Disable ModPagespeed' => 'Disable ModPagespeed',
118 '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',
119 'Change table prefix' => 'Change table prefix',
120 'Change database table prefix' => 'Change database table prefix',
121 'Database table prefix' => 'Database table prefix',
122 'Table prefix' => 'Table prefix ',
123 'Change access rights' => 'Change access rights',
124 'Change folders and files access rights' => 'Change folders and files access rights',
125 'File access rights, default : 644' => 'File access rights, default : 644',
126 'File access rights' => 'File access rights ',
127 'Folder access rights, default : 755' => 'Folder access rights, default : 755',
128 'Folder access rights' => 'Folder access rights ',
129 'Do not restore files' => 'Do not restore files',
130 'Do not restore files. Useful for testing' => 'Do not restore files. Useful for testing',
131 'Do not restore database' => 'Do not restore database',
132 'Do not restore database. Useful for testing' => 'Do not restore database. Useful for testing',
133 'Disable "NoAutoValueOnZero" SQL mode' => 'Disable "NoAutoValueOnZero" SQL mode',
134 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
135 'Start restoration' => 'Start restoration',
136 'Nt Restoration' => 'Nt Restoration',
137 'Database server is not valid.' => 'Database server is not valid.',
138 'Database name is not valid.' => 'Database name is not valid.',
139 'Database user is not valid.' => 'Database user is not valid.',
140 'Database password is not valid.' => 'Database password is not valid.',
141 'Shop email is not valid.' => 'Shop email is not valid.',
142 'Super admin email is not valid.' => 'Super admin email is not valid.',
143 'Super admin password is not valid.' => 'Super admin password is not valid.',
144 'Super admin first name is not valid.' => 'Super admin first name is not valid.',
145 'Super admin last name is not valid.' => 'Super admin last name is not valid.',
146 'Enable Mode Dev' => 'Enable Mode Dev',
147 'Enable Mode Dev. Useful for developers' => 'Enable Mode Dev. Useful for developers',
148 'Only database will be restored' => 'Only database will be restored',
149 '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',
150 'Updating defines...' => 'Updating defines...',
151 'Disable "NoAutoValueOnZero" SQL mode' => 'Disable "NoAutoValueOnZero" SQL mode',
152 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
153 'Error while updating defines, defines file does not exist' => 'Error while updating defines, defines file does not exist',
154 'Error while updating defines, unable to read defines file' => 'Error while updating defines, unable to read defines file',
155 'Error while updating defines, unable to save defines file' => 'Error while updating defines, unable to save defines file',
156 'Do not attempt to disable server timeout' => 'Do not attempt to disable server timeout',
157 '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.',
158 ),
159 'de' => array(
160 'Site Maintenance' => 'Wartungsarbeiten',
161 'We will be back soon!' => 'Wir sind gleich zrück!',
162 '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.',
163 'Yes' => 'Ja',
164 'No' => 'Nein',
165 'Starting restoration' => 'Beginne Wiederherstellung',
166 'Error : ' => 'Fehler : ',
167 'No files restoration, as wanted' => 'No files restoration, as wanted',
168 'No database restoration, as wanted' => 'No database restoration, as wanted',
169 'FINISH' => 'FERTIG',
170 'FINISH ! Your backup was restored with success !' => 'Fertig ! Backup wurde erfolgreich wiederhergestellt !',
171 'Error' => 'Fehler',
172 'Error while restoring files : No backup file found' => 'Fehler beim wiederherstellen der Files',
173 'Restoring backup...' => 'Backup wird wiederhergestellt...',
174 'Decompressing backup...' => 'Entpacke backup...',
175 'Restoring files...' => 'Files werden widerhergestellt...',
176 'Error : Unable to connect to the database ' => 'Fehler : konnte nicht mit der Datenbank verbinden ',
177 'Restoring database...' => 'Datenbank wird wiederhergestellt...',
178 'Error while restoring database : ' => 'Fehler beim wiederherstellen der Datenbank : ',
179 'Updating URL configuration...' => 'URL Konfiguration wird angepasst...',
180 'Error while updating URL configuration : ' => 'Fehler beim anpassen der URL Konfiguration : ',
181 'Deleting customers email...' => 'Emailadressen der Kunden werden gelöscht...',
182 'Error while deleting customers emails : ' => 'Fehler beim löschen der Kundenemails : ',
183 'Error while deleting mailalert customers emails : ' => 'Error while deleting mailalert customers emails : ',
184 'Disabling SSL...' => 'Deaktiviere SSL...',
185 'Error while disabling SSL : ' => 'Fehler beim deaktivieren von SSL : ',
186 'Disabling media servers...' => 'Media Server werden deaktiviert...',
187 'Error while disabling media servers : ' => 'Fehler beim deaktivieren des Medien Servers : ',
188 'Changing table prefix...' => 'Tabellen Prefix wird geändert...',
189 'Error while changing table prefix : ' => 'Fehler beim ändern der Tabellen Prefixe : ',
190 'Creating super admin...' => 'Super Admin wird angelegt...',
191 'Error while creating super admin : ' => 'Fehler beim anlegen des Super Admins : ',
192 'Error while getting employee by email : ' => 'Error while getting employee by email : ',
193 'Error while updating super admin password : ' => 'Fehler beim updaten des Super Admin Passwort : ',
194 'Error while creating super admin : ' => 'Fehler beim anlegen des Super Admin : ',
195 'Error while getting likely understood language : ' => 'Error while getting likely understood language : ',
196 'Changing email shop...' => 'Shop Email anpassen...',
197 'Error while changing email shop : ' => 'Fehler beim anpassen der Shop Email : ',
198 'Error while retrieving virtual uri : ' => 'Fehler beim anpassen des Virtual uri : ',
199 'Updating settings...' => 'Settings werden angepasst...',
200 'Error while updating settings, settings file does not exist' => 'Error while updating settings, settings file does not exist',
201 'Error while updating settings, unable to read settings file' => 'Error while updating settings, unable to read settings file',
202 'Error while updating settings, unable to save settings file' => 'Error while updating settings, unable to save settings file',
203 'Updating .htaccess file...' => '.htaccess wird angepasst ...',
204 'Error while renaming .htaccess file, please check file access rigth' => 'Error while renaming .htaccess file, please check file access rigth',
205 'Error while updating .htaccess file, .htaccess file does not exist' => 'Error while updating .htaccess file, .htaccess file does not exist',
206 'Error while updating .htaccess file, unable to read .htaccess file' => 'Error while updating .htaccess file, unable to read .htaccess file',
207 'Error while updating .htaccess file, unable to save .htaccess file' => 'Error while updating .htaccess file, unable to save .htaccess file',
208 'Updating links...' => 'Links werden angepasst...',
209 'Error while updating links : ' => 'Fehler beim anpassen der Links : ',
210 'Error while restoring files, tar file does not exist' => 'Error while restoring files, tar file does not exist',
211 'Error while restoring files, tar file is not correct' => 'Error while restoring files, tar file is not correct',
212 'Error while restoring files, unable to open tar file' => 'Error while restoring files, unable to open tar file',
213 'Error while restoring files, unable to read tar file' => 'Error while restoring files, unable to read tar file',
214 'Error while restoring files, unable to read name file in tar file' => 'Error while restoring files, unable to read name file in tar file',
215 'Error while restoring files, tar file truncated' => 'Error while restoring files, tar file truncated',
216 'Error while restoring files, unable to create directory ' => 'Error while restoring files, unable to create directory ',
217 'Error while restoring files, unable to create file ' => 'Error while restoring files, unable to create file ',
218 'Error while restoring files, unable to read data in tar file' => 'Error while restoring files, unable to read data in tar file',
219 'Error while restoring files, tar file truncated' => 'Error while restoring files, tar file truncated',
220 'Error while restoring files, unable to write file ' => 'Error while restoring files, unable to write file ',
221 'Restoring files : ' => 'Files werden geschrieben: ',
222 'Error while checking existence of table ' => 'Error while checking existence of table ',
223 'Restoring database : ' => 'Datenbank wird wiederhergestellt: ',
224 'Execution failed on :' => 'Ausführung abgebrochen auf:',
225 ' on request :' => ' on request :',
226 'Query failed on :' => 'Abfrage abgebrochen auf :',
227 'No SQL file' => 'Kein SQL File',
228 'Unable to open SQL file' => 'Konnte das SQL File nicht öffnen',
229 'Restoration failed on line n°' => 'Wiederherstellung abgebrochen auf Linie n°',
230 'Nt Restoration for Prestashop' => 'Nt Restoration für Prestashop',
231 'Message' => 'Nachricht',
232 'Refresh' => 'Aktualisieren',
233 'Database connection parameters' => 'Database connection parameters',
234 'Database server address' => 'datenbank Server Adresse',
235 'Host server' => 'Host Server',
236 'Database name' => 'Datenbank Name',
237 'Name' => 'Name',
238 'Database login' => 'Datenbank login',
239 'User' => 'Benutzer',
240 'Database password' => 'Datenbank Passwort',
241 'Password' => 'Passwort',
242 'Options' => 'Optionen | Anpassungen',
243 'Clean' => 'Clean',
244 'Delete backup file after restoration' => 'Das Backup File nach der Wiederherstellung löschen',
245 'Change shop email' => 'Anpassen der Shop Email',
246 'You can provide a new shop contact email' => 'Sie können eine neue Shop Email angeben',
247 'Email' => 'Email',
248 'Create super admin' => 'Super Admin anlegen',
249 'Create a new super admin' => 'Neuen Super Admin anlegen',
250 'First name' => 'Vorname',
251 'Last name' => 'Nachname',
252 'Delete customers emails' => 'Emailadressen der Kunden löschen',
253 'Delete all customers emails. Useful for dev local test shop' => 'Alle Emailadressen der Kunden löschen, dies ist für testumgebungen zu empfehlen',
254 'Disable SSL' => 'Deaktiviere SSL',
255 '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 ',
256 'Disable media servers' => 'Deaktiviere media servers',
257 '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',
258 'Disable cache' => 'Cache deaktivieren',
259 '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',
260 'Disable ModPagespeed' => 'Deaktiviere ModPagespeed',
261 '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',
262 'Change table prefix' => 'Anpassen des Tabellen prefix',
263 'Change database table prefix' => 'Anpassen des Datenbank Tabellen prefix',
264 'Database table prefix' => 'Datenbank Tabellen prefix',
265 'Table prefix' => 'Tabellen prefix ',
266 'Change access rights' => 'Anpassen der Zugriffsrechte',
267 'Change folders and files access rights' => 'Anpassen der Zugriffsrechte für Ordner und Files',
268 'File access rights, default : 644' => 'Files Zugriffsrechte, Standart : 644',
269 'File access rights' => 'File Zugriffsrechte ',
270 'Folder access rights, default : 755' => 'Ordner Zugriffsrechte, Standart : 755',
271 'Folder access rights' => 'Ordner zugriffs Rechte ',
272 'Do not restore files' => 'Wiederherstellung ohne Files',
273 'Do not restore files. Useful for testing' => 'Keine Files wiederherstellen, nützlich zum testen',
274 'Do not restore database' => 'Datenbank NICHT Wiederherstellen',
275 'Do not restore database. Useful for testing' => 'Do not restore database. Useful for testing',
276 'Disable "NoAutoValueOnZero" SQL mode' => 'Deaktiviere "NoAutoValueOnZero" SQL mode',
277 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
278 'Start restoration' => 'Wiederherstellung beginnen',
279 'Nt Restoration' => 'Nt Restoration',
280 'Database server is not valid.' => 'Datenbank Server ist ungültig',
281 'Database name is not valid.' => 'Datenbank Name ist ungültig.',
282 'Database user is not valid.' => 'Datenbank Benutzer (User) ist ungültig.',
283 'Database password is not valid.' => 'Datenbank Passwort ist ungültig.',
284 'Shop email is not valid.' => 'Shop Email ist nicht gültig.',
285 'Super admin email is not valid.' => 'Super admin Email ist ungültig.',
286 'Super admin password is not valid.' => 'Super admin Passwort ungültig.',
287 'Super admin first name is not valid.' => 'Super admin Vorname ungültig',
288 'Super admin last name is not valid.' => 'Super admin Nachname ungültig',
289 'Enable Mode Dev' => 'Entwickler (Dev.) Modus aktivieren',
290 'Enable Mode Dev. Useful for developers' => 'Entwickler (Dev.) Modus aktivieren, hilfreich für entwickler',
291 'Only database will be restored' => 'Nur die Datenbank wird zurückgespeichert',
292 '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',
293 'Updating defines...' => 'Updating defines...',
294 'Disable "NoAutoValueOnZero" SQL mode' => 'Deaktiviere "NoAutoValueOnZero" SQL mode',
295 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
296 'Error while updating defines, defines file does not exist' => 'Error while updating defines, defines file does not exist',
297 'Error while updating defines, unable to read defines file' => 'Error while updating defines, unable to read defines file',
298 'Error while updating defines, unable to save defines file' => 'Error while updating defines, unable to save defines file',
299 'Do not attempt to disable server timeout' => 'Do not attempt to disable server timeout',
300 '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.',
301 ),
302 'fr' => array(
303 'Site Maintenance' => 'Maintenance en cours',
304 'We will be back soon!' => 'Le site sera bientôt de retour !',
305 '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.',
306 'Yes' => 'Oui',
307 'No' => 'Non',
308 'Starting restoration' => 'Démarrage de la restauration',
309 'Error : ' => 'Erreur : ',
310 'No files restoration, as wanted' => 'Pas de restauration des fichiers, comme demandé',
311 'No database restoration, as wanted' => 'Pas de restauration de la base de données, comme demandé',
312 'FINISH' => 'Terminé',
313 'FINISH ! Your backup was restored with success !' => 'Terminé ! Votre sauvegarde a été restaurée avec succès !',
314 'Error' => 'Erreur',
315 'Error while restoring files : No backup file found' => 'Erreur pendant la restauration des fichiers : Pas de fichier de sauvegarde trouvé',
316 'Restoring backup...' => 'Restauration de la sauvegarde...',
317 'Decompressing backup...' => 'Decompression de la sauvegarde...',
318 'Restoring files...' => 'Restauration des fichiers...',
319 'Error : Unable to connect to the database ' => 'Erreur : Impossible de se connecter à la base de données ',
320 'Restoring database...' => 'Restauration de la base de données...',
321 'Error while restoring database : ' => 'Erreur pendant la restauration de la base de données : ',
322 'Updating URL configuration...' => 'Mise à jour de la configuration des URL...',
323 'Error while updating URL configuration : ' => 'Erreur pendant la mise à jour de la configuration des URL : ',
324 'Deleting customers email...' => 'Suppression des emails des clients...',
325 'Error while deleting customers emails : ' => 'Erreur pendant la suppression des emails des clients : ',
326 'Error while deleting mailalert customers emails : ' => 'Erreur pendant la suppression des emails des clients mailalert : ',
327 'Disabling SSL...' => 'Désactivation du SSL...',
328 'Error while disabling SSL : ' => 'Erreur pendant la désactivation du SSL : ',
329 'Disabling media servers...' => 'Désactivation des serveurs de média...',
330 'Error while disabling media servers : ' => 'Erreur pendant la désactivation des serveurs de média : ',
331 'Changing table prefix...' => 'Modification du préfixe des tables...',
332 'Error while changing table prefix : ' => 'Erreur pendant la modification du préfixe des tables : ',
333 'Creating super admin...' => 'Création du super admin...',
334 'Error while creating super admin : ' => 'Erreur pendant la création du super admin : ',
335 'Error while getting employee by email : ' => 'Erreur pendant la récupération de l\'employé par son email : ',
336 'Error while updating super admin password : ' => 'Erreur pendant la mise à jour du mot de passe du super admin : ',
337 'Error while creating super admin : ' => 'Erreur pendant la création du super admin : ',
338 'Error while getting likely understood language : ' => 'Erreur pendant la récupération du probable meilleur langage : ',
339 'Changing email shop...' => 'Modification de l\'email de la boutique...',
340 'Error while changing email shop : ' => 'Erreur pendant la modification de l\'email de la boutique : ',
341 'Error while retrieving virtual uri : ' => 'Erreur pendant la récupération des URI virtuelles : ',
342 'Updating settings...' => 'Mise à jour des paramètres...',
343 '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',
344 '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',
345 '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',
346 'Updating .htaccess file...' => 'Mise à jour du fichier .htaccess...',
347 'Error while renaming .htaccess file, please check file access rigth' => 'Erreur pendant le renommage du fichier .htaccess, vérifiez les droits d\'accès des fichiers',
348 'Error while updating .htaccess file, .htaccess file does not exist' => 'Erreur pendant la mise à jour du fichier .htaccess, le fichier .htaccess n\'existe pas',
349 'Error while updating .htaccess file, unable to read .htaccess file' => 'Erreur pendant la mise à jour du fichier .htaccess, impossible de lire le fichier .htaccess',
350 'Error while updating .htaccess file, unable to save .htaccess file' => 'Erreur pendant la mise à jour du fichier .htaccess, impossible d\'enregistrer le fichier .htaccess',
351 'Updating links...' => 'Mise à jour des liens...',
352 'Error while updating links : ' => 'Erreur pendant la mise à jour des liens : ',
353 'Error while restoring files, tar file does not exist' => 'Erreur pendant la restauration des fichiers, le fichier tar n\'existe pas',
354 'Error while restoring files, tar file is not correct' => 'Erreur pendant la restauration des fichiers, le fichier tar is not correct',
355 'Error while restoring files, unable to open tar file' => 'Erreur pendant la restauration des fichiers, impossible d\'ouvrir le fichier tar',
356 'Error while restoring files, unable to read tar file' => 'Erreur pendant la restauration des fichiers, impossible de lire le fichier tar',
357 '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',
358 'Error while restoring files, tar file truncated' => 'Erreur pendant la restauration des fichiers, le fichier tar est tronqué',
359 'Error while restoring files, unable to create directory ' => 'Erreur pendant la restauration des fichiers, impossible de créer le dossier ',
360 'Error while restoring files, unable to create file ' => 'Erreur pendant la restauration des fichiers, impossible de créer le fichier ',
361 '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',
362 'Error while restoring files, unable to write file ' => 'Erreur pendant la restauration des fichiers, impossible d\'écrire le fichier ',
363 'Restoring files : ' => 'Restauration des fichiers : ',
364 'Error while checking existence of table ' => 'Erreur pendant la vérification de l\'existance de la table ',
365 'Restoring database : ' => 'Restauration de la base de données : ',
366 'Execution failed on :' => 'L\'exécution a échoué sur :',
367 ' on request :' => ' sur la requête :',
368 'Query failed on :' => 'La requête a échoué sur :',
369 'No SQL file' => 'Pas de fichier SQL',
370 'Unable to open SQL file' => 'Impossible d\'ouvrir le fichier SQL',
371 'Restoration failed on line n°' => 'La restauration a échoué à la ligne n°',
372 'Nt Restoration for Prestashop' => 'Nt Restauration pour Prestashop',
373 'Message' => 'Message',
374 'Refresh' => 'Rafraîchir',
375 'Database connection parameters' => 'Paramètres de connexion de la base de données',
376 'Database server address' => 'Adresse du serveur de base de données',
377 'Host server' => 'Serveur Hôte',
378 'Database name' => 'Nom de la base de données',
379 'Name' => 'Nom',
380 'Database login' => 'Login de la base de données',
381 'User' => 'Utilisateur',
382 'Database password' => 'Mot de passe de la base de données',
383 'Password' => 'Mot de passe',
384 'Options' => 'Options',
385 'Clean' => 'Nettoyage',
386 'Delete backup file after restoration' => 'Supprimer le fichier de sauvegarde après la restauration',
387 'Change shop email' => 'Modifier l\'email de la boutique',
388 'You can provide a new shop contact email' => 'Vous pouvez indiquer un nouvel email de contact de la boutique',
389 'Email' => 'Email',
390 'Create super admin' => 'Créer un super admin',
391 'Create a new super admin' => 'Crée un nouveau super admin',
392 'First name' => 'Prénom',
393 'Last name' => 'Nom',
394 'Delete customers emails' => 'Supprimer les emails des clients',
395 'Delete all customers emails. Useful for dev local test shop' => 'Supprime les emails de tous les clients. Pratique pour les tests en local',
396 'Disable SSL' => 'Désactiver SSL',
397 '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',
398 'Disable media servers' => 'Désactiver les serveurs de média',
399 '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',
400 'Disable cache' => 'Désactiver le cache',
401 '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',
402 'Disable ModPagespeed' => 'Désactiver ModPagespeed',
403 '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',
404 'Change table prefix' => 'Modifier le préfixe des tables',
405 'Change database table prefix' => 'Modifie le préfixe des tables de la base de données',
406 'Database table prefix' => 'Préfixe des tables de la base de données',
407 'Table prefix' => 'Préfixe des tables',
408 'Change access rights' => 'Modifier les droits d\'accès',
409 'Change folders and files access rights' => 'Modifie les droits d\'accès aux dossiers et fichiers',
410 'File access rights, default : 644' => 'Droits d\'accès aux fichiers, par défaut : 644',
411 'File access rights' => 'Droits d\'accès aux fichiers ',
412 'Folder access rights, default : 755' => 'Droits d\'accès aux dossiers, par défaut : 755',
413 'Folder access rights' => 'Droits d\'accès aux dossiers ',
414 'Do not restore files' => 'Ne pas restaurer les fichiers',
415 'Do not restore files. Useful for testing' => 'Ne restaure pas les fichiers. Pratique pour les tests',
416 'Do not restore database' => 'Ne pas restaurer la base de données',
417 'Do not restore database. Useful for testing' => 'Ne restaure pas la base de données. Pratique pour les tests',
418 'Disable "NoAutoValueOnZero" SQL mode' => 'Désactiver le mode SQL "No Auto Value On Zero"',
419 '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',
420 'Start restoration' => 'Démarrer la restauration',
421 'Nt Restoration' => 'Nt Restauration',
422 'Database server is not valid.' => 'Le serveur de la base de données est incorrect.',
423 'Database name is not valid.' => 'Le nom de la base de données est incorrect.',
424 'Database user is not valid.' => 'L\'utilisateur de la base de données est incorrect.',
425 'Database password is not valid.' => 'Le mote de passe de la base de données est incorrect.',
426 'Shop email is not valid.' => 'L\'email de la boutique est incorrect.',
427 'Super admin email is not valid.' => 'L\'email du super admin est incorrect.',
428 'Super admin password is not valid.' => 'Le mot de passe du super admin est incorrect.',
429 'Super admin first name is not valid.' => 'Le prénom du super admin est incorrect.',
430 'Super admin last name is not valid.' => 'Le nom du super admin est incorrect.',
431 'Enable Mode Dev' => 'Activer le mode Dev',
432 'Enable Mode Dev. Useful for developers' => 'Activation du mode Dev. Utile pour les développeurs',
433 'Only database will be restored' => 'Seule la base de données sera restaurée',
434 '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',
435 'Updating defines...' => 'Mise à jour des définitions...',
436 'Disable "NoAutoValueOnZero" SQL mode' => 'Désactiver le mode SQL "NoAutoValueOnZero"',
437 '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',
438 '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',
439 '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',
440 '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',
441 'Do not attempt to disable server timeout' => 'Ne pas tenter de désactiver le timeout server',
442 '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.',
443 ),
444 'da' => array(
445 'Site Maintenance' => 'Site Maintenance',
446 'We will be back soon!' => 'Vi vil være tilbage snart!',
447 'Sorry for the inconvenience but we are performing some maintenance at the moment.' => 'Beklager ulejligheden, men vi udfører nogle vedligeholdelse i øjeblikket.',
448 'Yes' => 'Ja',
449 'No' => 'Nej',
450 'Starting restoration' => 'Starter restaurering',
451 'Error : ' => 'Fejl : ',
452 'No files restoration, as wanted' => 'ngen filer restaurering, som ønsket',
453 'No database restoration, as wanted' => 'Ingen database restaurering, som ønsket',
454 'FINISH' => 'FÆRDIG',
455 'FINISH ! Your backup was restored with success !' => 'FÆRDIG! Din backup blev restaureret med succes!',
456 'Error' => 'Fejl',
457 'Error while restoring files : No backup file found' => 'Fejl ved gendannelse af filer: Ingen backup fil fundet',
458 'Restoring backup...' => 'Gendanner backup...',
459 'Decompressing backup...' => 'Dekomprimere backup...',
460 'Restoring files...' => 'Gendannelse af filer...',
461 'Error : Unable to connect to the database ' => 'Fejl: Kan ikke forbinde til databasen ',
462 'Restoring database...' => 'Gendanner database...',
463 'Error while restoring database : ' => 'Fejl ved gendannelse database: ',
464 'Updating URL configuration...' => 'Opdatering URL-konfiguration...',
465 'Error while updating URL configuration : ' => 'Fejl under opdatering af URL-konfiguration: ',
466 'Deleting customers email...' => 'Sletning af kunde email...',
467 'Error while deleting customers emails : ' => 'Fejl under sletning af af kunde e-mails: ',
468 'Error while deleting mailalert customers emails : ' => 'Fejl under sletning af mailalert kunder emails : ',
469 'Disabling SSL...' => 'Deaktivering SSL...',
470 'Error while disabling SSL : ' => 'Fejl ved deaktivering af SSL: ',
471 'Disabling media servers...' => 'Deaktivering medieservere ...',
472 'Error while disabling media servers : ' => 'Fejl ved deaktivering af medieservere: ',
473 'Changing table prefix...' => 'Ændre tabel prefiks...',
474 'Error while changing table prefix : ' => 'Fejl ved ændring i tabel prefiks: ',
475 'Creating super admin...' => 'Oprettelse af super admin...',
476 'Error while creating super admin : ' => 'Fejl ved oprettelse super admin: ',
477 'Error while getting employee by email : ' => 'Fejl ved at oprette ansat via e-mail: ',
478 'Error while updating super admin password : ' => 'Fejl under opdatering super admin password:',
479 'Error while creating super admin : ' => 'Fejl ved oprettelse super admin: ',
480 'Error while getting likely understood language : ' => 'Fejl under hentning af et sprog: ',
481 'Changing email shop...' => 'Ændring email shop...',
482 'Error while changing email shop : ' => 'Fejl ved at ændre email shop: ',
483 'Error while retrieving virtual uri : ' => 'Fejl ved hentning af virtuel uri: ',
484 'Updating settings...' => 'Opdaterer indstillinger...',
485 'Error while updating settings, settings file does not exist' => 'Fejl ved opdatering af indstillinger, indstillingsfilen findes ikke',
486 'Error while updating settings, unable to read settings file' => 'Fejl ved opdatering af indstillinger, ude af stand til at læse indstillingsfil',
487 'Error while updating settings, unable to save settings file' => 'Fejl ved opdatering af indstillinger, ude af stand til at gemme filen',
488 'Updating .htaccess file...' => 'Opdaterer .htaccess fil...',
489 'Error while renaming .htaccess file, please check file access rigth' => 'Fejl ved omdøbning af .htaccess fil, kan du tjekke om den har de rigtige rettigheder',
490 'Error while updating .htaccess file, .htaccess file does not exist' => 'Fejl ved opdatering af .htaccess fil, htaccess fil findes ikke',
491 'Error while updating .htaccess file, unable to read .htaccess file' => 'Fejl ved opdatering af .htaccess fil, ude af stand til at læse .htaccess filen',
492 'Error while updating .htaccess file, unable to save .htaccess file' => 'Fejl ved opdatering af .htaccess filen, ude af stand til at gemme .htaccess filen',
493 'Updating links...' => 'Opdaterer links...',
494 'Error while updating links : ' => 'Fejl under opdatering links: ',
495 'Error while restoring files, tar file does not exist' => 'Fejl ved gendannelse af filer, tar-filen eksisterer ikke',
496 'Error while restoring files, tar file is not correct' => 'Fejl ved gendannelse af filer, tar filen er ikke korrekt',
497 'Error while restoring files, unable to open tar file' => 'Fejl ved gendannelse af filer, ude af stand til at åbne tar filen',
498 'Error while restoring files, unable to read tar file' => 'Fejl ved gendannelse af filer, ude af stand til at læse tar filen',
499 'Error while restoring files, unable to read name file in tar file' => 'Fejl ved gendannelse af filer, ude af stand til at læse navn fil i tar filen',
500 'Error while restoring files, tar file truncated' => 'Fejl ved gendannelse af filer, tar filen afkortet',
501 'Error while restoring files, unable to create directory ' => 'Fejl ved gendannelse af filer, ude af stand til at oprette mappe ',
502 'Error while restoring files, unable to create file ' => 'Fejl ved gendannelse af filer, ude af stand til at skabe filen ',
503 'Error while restoring files, unable to read data in tar file' => 'Fejl ved gendannelse af filer, ude af stand til at læse data i tar filen',
504 'Error while restoring files, tar file truncated' => 'Fejl ved gendannelse af filer, tar filen afkortet',
505 'Error while restoring files, unable to write file ' => 'Fejl ved gendannelse af filer, ude af stand til at skrive filen ',
506 'Restoring files : ' => 'Gendanner filer : ',
507 'Error while checking existence of table ' => 'Error while checking existence of table ',
508 'Restoring database : ' => 'Gendanner database: ',
509 'Execution failed on :' => 'Udførelse mislykkedes på:',
510 ' on request :' => ' på anmodning :',
511 'Query failed on :' => 'Query mislykkedes på :',
512 'No SQL file' => 'No SQL file',
513 'Unable to open SQL file' => 'Kan ikke åbne SQL filen',
514 'Restoration failed on line n°' => 'Restaurering mislykkedes på linje n°',
515 'Nt Restoration for Prestashop' => 'Nt Restoration til Prestashop',
516 'Message' => 'Besked',
517 'Refresh' => 'Refresh',
518 'Database connection parameters' => 'Parametre databaseforbindelse',
519 'Database server address' => 'Database server adresse',
520 'Host server' => 'Host server',
521 'Database name' => 'Database navn',
522 'Name' => 'Navn',
523 'Database login' => 'Database login',
524 'User' => 'Bruger',
525 'Database password' => 'Database password',
526 'Password' => 'Password',
527 'Options' => 'Indstillinger',
528 'Clean' => 'Ren',
529 'Delete backup file after restoration' => 'Slet backup filen efter restaurering',
530 'Change shop email' => 'Skift shop email',
531 'You can provide a new shop contact email' => 'Du kan give butikken en ny kontakt e-mail',
532 'Email' => 'Email',
533 'Create super admin' => 'Opret super admin',
534 'Create a new super admin' => 'Opret en ny super admin',
535 'First name' => 'Fornavn',
536 'Last name' => 'Efternavn',
537 'Delete customers emails' => 'Slet kunde e-mails',
538 'Delete all customers emails. Useful for dev local test shop' => 'Slet alle kunde e-mails. Nyttigt for en test butik',
539 'Disable SSL' => 'Deaktiver SSL',
540 '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ængelig nu',
541 'Disable media servers' => 'Deaktiver medieservere',
542 '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ængelig nu',
543 'Disable cache' => 'Deaktiver cache',
544 '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ængelig nu',
545 'Disable ModPagespeed' => 'Deaktiver modpagespeed',
546 '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ængelig nu',
547 'Change table prefix' => 'Skift tabel prefiks',
548 'Change database table prefix' => 'Skift database tabel prefiks',
549 'Database table prefix' => 'Database table prefix',
550 'Table prefix' => 'Tabel prefix ',
551 'Change access rights' => 'Skift adgangsrettigheder',
552 'Change folders and files access rights' => 'Skift mappe og fil adgangsrettigheder',
553 'File access rights, default : 644' => 'File adgangsrettigheder, standard: 644',
554 'File access rights' => 'Fil adgangs rettigheder ',
555 'Folder access rights, default : 755' => 'Folder adgangsrettigheder, standard: 755',
556 'Folder access rights' => 'Folder adgangs rettigheder ',
557 'Do not restore files' => 'Må ikke gendanne filer',
558 'Do not restore files. Useful for testing' => 'Gendan ikke filer. Nyttigt til test',
559 'Do not restore database' => 'Gendan ikke database',
560 'Do not restore database. Useful for testing' => 'Gendan ikke database. Nyttigt til test',
561 'Disable "NoAutoValueOnZero" SQL mode' => 'Disable "NoAutoValueOnZero" SQL mode',
562 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
563 'Start restoration' => 'Start restaurering',
564 'Nt Restoration' => 'Nt Restaurering',
565 'Database server is not valid.' => 'Database server er ikke gyldigt.',
566 'Database name is not valid.' => 'Database navn er ikke gyldigt.',
567 'Database user is not valid.' => 'Database bruger er ikke gyldig.',
568 'Database password is not valid.' => 'Database password er ikke gyldig.',
569 'Shop email is not valid.' => 'Shop email er ikke gyldig.',
570 'Super admin email is not valid.' => 'Super admin email er ikke gyldig.',
571 'Super admin password is not valid.' => 'Super admin password er ikke gyldig.',
572 'Super admin first name is not valid.' => 'Super admin fornavn er ikke gyldigt.',
573 'Super admin last name is not valid.' => 'Super admin efternavn er ikke gyldigt.',
574 'Enable Mode Dev' => 'Aktiver tilstand Dev',
575 'Enable Mode Dev. Useful for developers' => 'Aktiver tilstand Dev. Nyttigt for udviklere',
576 'Only database will be restored' => 'Kun database vil blive genoprettet',
577 'Backup file is big, progress is not accurate but everything is running well' => 'Backup filen er stor, fremskridt er ikke korrekte, men alt kører godt',
578 'Updating defines...' => 'Opdaterer definerer...',
579 'Disable "NoAutoValueOnZero" SQL mode' => 'Deaktiver "NoAutoValueOnZero" SQL mode',
580 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
581 'Error while updating defines, defines file does not exist' => 'Fejl under opdatering af definerer, definerer fil findes ikke',
582 'Error while updating defines, unable to read defines file' => 'Fejl ved opdatering definerer, ude af stand til at læse definerer filen',
583 'Error while updating defines, unable to save defines file' => 'Fejl under opdatering af definerer, ude af stand til at gemme definerer filen',
584 'Do not attempt to disable server timeout' => 'Do not attempt to disable server timeout',
585 '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.',
586 ),
587 'sv' => array(
588 'Site Maintenance' => 'Underhåll',
589 'We will be back soon!' => 'Vi kommer att vara tillbaka snart!',
590 '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',
591 'Yes' => 'Ja',
592 'No' => 'Nej',
593 'Starting restoration' => 'Startar återställningen',
594 'Error : ' => 'Fel : ',
595 'No files restoration, as wanted' => 'Inga filer återställdes, som du valt',
596 'No database restoration, as wanted' => 'Ingen databas återställdes, som du valt',
597 'FINISH' => 'KLART',
598 'FINISH ! Your backup was restored with success !' => 'KLART ! Din backup återställdes med lyckat resultat !',
599 'Error' => 'Fel',
600 'Error while restoring files : No backup file found' => 'Fel vid återställning av filer : Ingen återställnings fil hittades',
601 'Restoring backup...' => 'Återställer backup...',
602 'Decompressing backup...' => 'Packar upp backup...',
603 'Restoring files...' => 'Återställer filer…',
604 'Error : Unable to connect to the database ' => 'Fel : Kunde inte koppla upp till databasen ',
605 'Restoring database...' => 'Återställer databas...',
606 'Error while restoring database : ' => 'Fel vid återställning av databas : ',
607 'Updating URL configuration...' => 'Uppdaterar URL konfiguration...',
608 'Error while updating URL configuration : ' => 'Fel vid uppdatering av URL konfiguration : ',
609 'Deleting customers email...' => 'Tar bort kund E-post…',
610 'Error while deleting customers emails : ' => 'Fel vid borttagning av kund E-post : ',
611 'Error while deleting mailalert customers emails : ' => 'Fel vid borttagning av E-postavisering kund E-post : ',
612 'Disabling SSL...' => 'Inaktivera SSL...',
613 'Error while disabling SSL : ' => 'Fel vid inaktivering av SSL : ',
614 'Disabling media servers...' => 'Inaktivera mediaserver...',
615 'Error while disabling media servers : ' => 'Fel vid inaktivering av mediaserver : ',
616 'Changing table prefix...' => 'Ändra tabellprefix...',
617 'Error while changing table prefix : ' => 'Fel vid ändring av tabellprefix : ',
618 'Creating super admin...' => 'Skapa superadmin...',
619 'Error while creating super admin : ' => 'Fel vid skapande av superadmin : ',
620 'Error while getting employee by email : ' => 'Fel vid hämtning av anställdes E-post : ',
621 'Error while updating super admin password : ' => 'Fel vid uppdatering av superadmin lösenord : ',
622 'Error while creating super admin : ' => 'Fel vid skapande av superadmin : ',
623 'Error while getting likely understood language : ' => 'Fel vid hämtande av sannolikt förstående språk : ',
624 'Changing email shop...' => 'Ändra butikens E-post…',
625 'Error while changing email shop : ' => 'Fel vid ändring av butikens E-post : ',
626 'Error while retrieving virtual uri : ' => 'Fel vid hämtning av virtuell URL: ',
627 'Updating settings...' => 'Uppdatera inställningar…',
628 'Error while updating settings, settings file does not exist' => 'Fel vid uppdatering av inställningar, filen för inställningar finns inte',
629 'Error while updating settings, unable to read settings file' => 'Fel vid uppdatering av inställningar, kunde inte läsa filens inställningar',
630 'Error while updating settings, unable to save settings file' => 'Fel vid uppdatering av inställningar, kunde inte spara filens inställningar',
631 'Updating .htaccess file...' => 'Uppdatera .htaccess fil...',
632 'Error while renaming .htaccess file, please check file access rigth' => 'Fel vid namnändring av .htaccess fil, vänligen kontrollera filens rättigheter',
633 'Error while updating .htaccess file, .htaccess file does not exist' => 'Fel vid uppdatering av .htaccess fil, .htaccess filen finns inte',
634 'Error while updating .htaccess file, unable to read .htaccess file' => 'Fel vid uppdatering av .htaccess fil, kunde inte läsa .htaccess filen',
635 'Error while updating .htaccess file, unable to save .htaccess file' => 'Fel vid uppdatering av .htaccess fil, kunde inte spara .htaccess filen',
636 'Updating links...' => 'Uppdatera länkar...',
637 'Error while updating links : ' => 'Fel vid uppdatering av länkar : ',
638 'Error while restoring files, tar file does not exist' => 'Fel vid återställning av fil, tar filen finns inte',
639 'Error while restoring files, tar file is not correct' => 'Fel vid återställning av filer, tar filerna är inte riktiga',
640 'Error while restoring files, unable to open tar file' => 'Fel vid återställning av filer, kunde inte öppna tar filen',
641 'Error while restoring files, unable to read tar file' => 'Fel vid återställning av filer, kunde inte läsa tar filen',
642 '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',
643 'Error while restoring files, tar file truncated' => 'Fel vid återställning av filer, tar fil trunkerad',
644 'Error while restoring files, unable to create directory ' => 'Fel vid återställning av filer, kunde inte skapa katalog ',
645 'Error while restoring files, unable to create file ' => 'Fel vid återställning av filer, kunde inte skapa fil ',
646 'Error while restoring files, unable to read data in tar file' => 'Fel vid återskapande av filer, kunde inte läsa data i tar filen',
647 'Error while restoring files, tar file truncated' => 'Fel vid återställning av filer, tar fil trunkerad',
648 'Error while restoring files, unable to write file ' => 'Fel vid återställning av filer, kunde inte skriva till fil ',
649 'Restoring files : ' => 'Återställer filer : ',
650 'Error while checking existence of table ' => 'Fel vid kontroll av existerande av tabell ',
651 'Restoring database : ' => 'Återställer databas : ',
652 'Execution failed on :' => 'Utförande misslyckades på :',
653 ' on request :' => ' på förfrågan :',
654 'Query failed on :' => 'Fråga misslyckades på :',
655 'No SQL file' => 'Ingen SQL fil',
656 'Unable to open SQL file' => 'Kunde inte öppna SQL fil',
657 'Restoration failed on line n°' => 'Återställning misslyckades på rad n°',
658 'Nt Restoration for Prestashop' => 'Nt Återställning för Prestashop',
659 'Message' => 'Meddelande',
660 'Refresh' => 'Uppdatera',
661 'Database connection parameters' => 'Databasens anslutningsparametrar',
662 'Database server address' => 'Databasens server adress',
663 'Host server' => 'Värdserver',
664 'Database name' => 'Databasnamn',
665 'Name' => 'Namn',
666 'Database login' => 'Databas inloggning',
667 'User' => 'Användare',
668 'Database password' => 'Databasens lösenord',
669 'Password' => 'Lösenord',
670 'Options' => 'Alternativ',
671 'Clean' => 'Rena',
672 'Delete backup file after restoration' => 'Ta bort backupfiler efter återställningen',
673 'Change shop email' => 'Ändra butikens E-post',
674 'You can provide a new shop contact email' => 'Du kan tillhandahålla en ny e-post för butikens kontakt',
675 'Email' => 'E-post',
676 'Create super admin' => 'Skapa superadmin',
677 'Create a new super admin' => 'Skapa en ny superadmin',
678 'First name' => 'Förnamn',
679 'Last name' => 'Efternamn',
680 'Delete customers emails' => 'Ta bort kunders E-post',
681 'Delete all customers emails. Useful for dev local test shop' => 'Ta bort alla kunders E-post. Användbart för diverse lokala testbutiker',
682 'Disable SSL' => 'Inaktivera SSL',
683 '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',
684 'Disable media servers' => 'Inaktivera mediaserver',
685 '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',
686 'Disable cache' => 'Inaktivera cache',
687 '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',
688 'Disable ModPagespeed' => 'Inaktivera ModPagespeed',
689 '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',
690 'Change table prefix' => 'Ändra tabellprefix',
691 'Change database table prefix' => 'Ändra databas tabellprefix',
692 'Database table prefix' => 'Databas tabellprefix',
693 'Table prefix' => 'Tabellprefix ',
694 'Change access rights' => 'Ändra åtkomsträttigheter',
695 'Change folders and files access rights' => 'Ändra mappar och fil behörigheter',
696 'File access rights, default : 644' => 'Filåtkomst rättigheter, standard : 644',
697 'File access rights' => 'Filåtkomst rättigheter ',
698 'Folder access rights, default : 755' => 'Mapp rättigheter, standard : 755',
699 'Folder access rights' => 'Mapp åtkomsträttigheter',
700 'Do not restore files' => 'Återställ inte filerna',
701 'Do not restore files. Useful for testing' => 'Återställ inte filerna. Användbart för testning',
702 'Do not restore database' => 'Återställ inte databasen',
703 'Do not restore database. Useful for testing' => 'Återställ inte databasen. Användbart för testning',
704 'Disable "NoAutoValueOnZero" SQL mode' => 'Disable "NoAutoValueOnZero" SQL mode',
705 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
706 'Start restoration' => 'Starta återställningen',
707 'Nt Restoration' => 'Nt Återställning',
708 'Database server is not valid.' => 'Databasens server är inte giltig.',
709 'Database name is not valid.' => 'Databasens namn är inte giltigt.',
710 'Database user is not valid.' => 'Databasens användare är inte giltig.',
711 'Database password is not valid.' => 'Databasens lösenord är inte giltigt.',
712 'Shop email is not valid.' => 'Butikens E-post är inte giltig.',
713 'Super admin email is not valid.' => 'Super admins E-post är inte giltig.',
714 'Super admin password is not valid.' => 'Superadmin lösenordet är inte giltigt.',
715 'Super admin first name is not valid.' => 'Super admin förnamn är inte giltigt.',
716 'Super admin last name is not valid.' => 'Super admin efternamn är inte giltigt.',
717 'Enable Mode Dev' => 'Aktivera Utvecklings Läget',
718 'Enable Mode Dev. Useful for developers' => 'Aktivera Utvecklings Läget. Användbart för utvecklare',
719 'Only database will be restored' => 'Bara databasen kommer att återställas',
720 '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',
721 'Updating defines...' => 'Uppdaterar och definierar...',
722 'Disable "NoAutoValueOnZero" SQL mode' => 'Inaktivera "NoAutoValueOnZero" SQL mode',
723 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
724 'Error while updating defines, defines file does not exist' => 'Fel vid uppdatering av definieringen, definieringens fil finns inte',
725 'Error while updating defines, unable to read defines file' => 'Fel vid uppdatering av definieringen, kunde inte läsa fil definieringen',
726 'Error while updating defines, unable to save defines file' => 'Fel vid uppdatering av definieringen, kunde inte spara fil definieringen',
727 'Do not attempt to disable server timeout' => 'Do not attempt to disable server timeout',
728 '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.',
729 ),
730 'zh_tw' => array(
731 'Site Maintenance' => '網站ç¶è·æ¨¡å¼',
732 'We will be back soon!' => '網站很快就會å†ä¸Šç·šï¼Œè«‹è€å¿ƒç‰å€™ï¼',
733 'Sorry for the inconvenience but we are performing some maintenance at the moment.' => '很抱æ‰é€ æˆæ‚¨çš„ä¸ä¾¿ï¼Œç›®å‰ç¶²ç«™æ£åœ¨ç¶è·ä¸',
734 'Yes' => '是',
735 'No' => 'å¦',
736 'Starting restoration' => 'æ£åœ¨é‚„原ä¸',
737 'Error : ' => '錯誤 : ',
738 'No files restoration, as wanted' => 'å¦‚åŒæ‰€è¨å®šçš„,檔案並未被還原',
739 'No database restoration, as wanted' => 'å¦‚åŒæ‰€è¨å®šçš„,資料庫並未被還原',
740 'FINISH' => '完æˆ',
741 'FINISH ! Your backup was restored with success !' => '備份已經æˆåŠŸé‚„åŽŸå®Œæˆï¼',
742 'Error' => '錯誤',
743 'Error while restoring files : No backup file found' => '還原備份檔案時,發生錯誤,沒有找到備份檔案',
744 'Restoring backup...' => 'æ£åœ¨é‚„原備份ä¸...',
745 'Decompressing backup...' => 'æ£åœ¨è§£å£“縮備份檔案...',
746 'Restoring files...' => '還原檔案ä¸...',
747 'Error : Unable to connect to the database ' => '錯誤:無法連接資料庫',
748 'Restoring database...' => 'æ£åœ¨é‚„原資料庫...',
749 'Error while restoring database : ' => '還原資料庫時發生錯誤: ',
750 'Updating URL configuration...' => 'æ£åœ¨æ›´æ–° URL è¨å®š...',
751 'Error while updating URL configuration : ' => 'æ›´æ–° URL è¨å®šæ™‚,發生錯誤 : ',
752 'Deleting customers email...' => 'æ£åœ¨åˆªé™¤é¡§å®¢é›»å郵件...',
753 'Error while deleting customers emails : ' => '刪除顧客電å郵件時,發生錯誤 : ',
754 'Error while deleting mailalert customers emails : ' => '刪除郵件æé†’顧客電å郵件時,發生錯誤: ',
755 'Disabling SSL...' => 'æ£åœ¨é—œé–‰ SSL...',
756 'Error while disabling SSL : ' => '關閉 SSL 時,發生錯誤 : ',
757 'Disabling media servers...' => 'æ£åœ¨é—œé–‰åª’體伺æœå™¨...',
758 'Error while disabling media servers : ' => '關閉媒體伺æœå™¨æ™‚,發生錯誤 : ',
759 'Changing table prefix...' => 'æ£åœ¨æ”¹è®Šè³‡æ–™è¡¨å‰ç¶´...',
760 'Error while changing table prefix : ' => '改變資料表å‰ç¶´æ™‚,發生錯誤 : ',
761 'Creating super admin...' => 'æ£åœ¨å»ºç«‹è¶…級管ç†å“¡...',
762 'Error while creating super admin : ' => '建立超級管ç†å“¡æ™‚,發生錯誤 : ',
763 'Error while getting employee by email : ' => 'é€éŽé›»å郵件建立員工資料時,發生錯誤 : ',
764 'Error while updating super admin password : ' => '更新超級管ç†å“¡å¯†ç¢¼æ™‚,發生錯誤 : ',
765 'Error while creating super admin : ' => '建立超級管ç†å“¡æ™‚,發生錯誤 : ',
766 'Error while getting likely understood language : ' => 'å–得已知語言時,發生錯誤 : ',
767 'Changing email shop...' => 'æ£åœ¨å»ºç«‹å•†åº—的電å郵件...',
768 'Error while changing email shop : ' => '改變商店的電å郵件時,發生錯誤 : ',
769 'Error while retrieving virtual uri : ' => 'å–得虛擬 URI 時,發生錯誤 : ',
770 'Updating settings...' => 'æ£åœ¨æ›´æ–°è¨å®š...',
771 'Error while updating settings, settings file does not exist' => 'æ›´æ–°è¨å®šæ™‚,發生錯誤,è¨å®šæª”案並ä¸å˜åœ¨',
772 'Error while updating settings, unable to read settings file' => 'æ›´æ–°è¨å®šæ™‚,發生錯誤,無法讀å–è¨å®šæª”案',
773 'Error while updating settings, unable to save settings file' => 'æ›´æ–°è¨å®šæ™‚,發生錯誤,無法儲å˜è¨å®šæª”案',
774 'Updating .htaccess file...' => 'Updating .htaccess file...',
775 'Error while renaming .htaccess file, please check file access rigth' => '釿–°å‘½å .htaccess æ™‚ï¼Œç™¼ç”ŸéŒ¯èª¤ï¼Œè«‹ç¢ºèªæª”案å˜å–權é™',
776 'Error while updating .htaccess file, .htaccess file does not exist' => 'æ›´æ–° .htaccess 時,發生錯誤, .htaccess ä¸å˜åœ¨',
777 'Error while updating .htaccess file, unable to read .htaccess file' => 'æ›´æ–° .htaccess æ™‚ï¼Œç™¼ç”ŸéŒ¯èª¤ï¼Œç„¡æ³•è®€å– .htaccess 檔案',
778 'Error while updating .htaccess file, unable to save .htaccess file' => 'æ›´æ–° .htaccess æ™‚ï¼Œç™¼ç”ŸéŒ¯èª¤ï¼Œç„¡æ³•å„²å˜ .htaccess 檔案',
779 'Updating links...' => 'æ£åœ¨æ›´æ–°é€£çµ...',
780 'Error while updating links : ' => 'æ›´æ–°é€£çµæ™‚,發生錯誤 : ',
781 'Error while restoring files, tar file does not exist' => '還原備份檔案時,發生錯誤, tar檔案ä¸å˜åœ¨',
782 'Error while restoring files, tar file is not correct' => '還原備份檔案時,發生錯誤, taræª”æ¡ˆä¸æ£ç¢º',
783 'Error while restoring files, unable to open tar file' => '還原備份檔案時,發生錯誤,無法打開 tar檔案',
784 'Error while restoring files, unable to read tar file' => 'é‚„åŽŸå‚™ä»½æª”æ¡ˆæ™‚ï¼Œç™¼ç”ŸéŒ¯èª¤ï¼Œç„¡æ³•è®€å– tar檔案',
785 'Error while restoring files, unable to read name file in tar file' => 'é‚„åŽŸå‚™ä»½æª”æ¡ˆæ™‚ï¼Œç™¼ç”ŸéŒ¯èª¤ï¼Œç„¡æ³•è®€å– tar檔案裡的檔案å稱',
786 'Error while restoring files, tar file truncated' => '還原備份檔案時,發生錯誤, tar檔案ä¸å®Œæ•´',
787 'Error while restoring files, unable to create directory ' => '還原備份檔案時,發生錯誤,無法建立目錄',
788 'Error while restoring files, unable to create file ' => '還原備份檔案時,發生錯誤,無法建立檔案',
789 'Error while restoring files, unable to read data in tar file' => 'é‚„åŽŸå‚™ä»½æª”æ¡ˆæ™‚ï¼Œç™¼ç”ŸéŒ¯èª¤ï¼Œç„¡æ³•è®€å– tar檔案裡的資料',
790 'Error while restoring files, tar file truncated' => '還原備份檔案時,發生錯誤, tar檔案ä¸å®Œæ•´',
791 'Error while restoring files, unable to write file ' => '還原備份檔案時,發生錯誤,無法寫入檔案 ',
792 'Restoring files : ' => 'æ£åœ¨é‚„原檔案 : ',
793 'Error while checking existence of table ' => '檢查資料表時,發生錯誤 ',
794 'Restoring database : ' => 'æ£åœ¨é‚„原資料庫 : ',
795 'Execution failed on :' => '執行時,發生錯誤在:',
796 ' on request :' => ' æ ¹æ“šè¦æ±‚ :',
797 'Query failed on :' => '查詢時,發生錯誤在:',
798 'No SQL file' => '沒有 SQL 檔案',
799 'Unable to open SQL file' => '無法開啟 SQL 檔案',
800 'Restoration failed on line n°' => '還原失敗在 Line n°',
801 'Nt Restoration for Prestashop' => 'Nt Restoration for Prestashop',
802 'Message' => '訊æ¯',
803 'Refresh' => '釿–°æ•´ç†',
804 'Database connection parameters' => 'è³‡æ–™åº«é€£ç·šåƒæ•¸',
805 'Database server address' => '資料庫伺æœå™¨ä½ç½®',
806 'Host server' => '主機',
807 'Database name' => '資料庫å稱',
808 'Name' => 'å稱',
809 'Database login' => '資料庫登入',
810 'User' => '使用者',
811 'Database password' => '資料庫密碼',
812 'Password' => '密碼',
813 'Options' => 'é¸é …',
814 'Clean' => '清ç†',
815 'Delete backup file after restoration' => '在還原之後,刪除備份檔案',
816 'Change shop email' => '改變商店的電å郵件',
817 'You can provide a new shop contact email' => '您å¯ä»¥æä¾›ä¸€å€‹æ–°çš„商店電å郵件',
818 'Email' => 'é›»å郵件',
819 'Create super admin' => '建立超級管ç†å“¡',
820 'Create a new super admin' => '建立一個新的超級管ç†å“¡',
821 'First name' => 'åå—',
822 'Last name' => 'å§“æ°',
823 'Delete customers emails' => '刪除顧客電å郵件',
824 'Delete all customers emails. Useful for dev local test shop' => '刪除全部的顧客電å郵件',
825 'Disable SSL' => '關閉 SSL',
826 'Disable SSL mode. Useful if SSL was used and no SSL is available now' => '關閉 SSL 模å¼ï¼Œç•¶åŽŸæœ¬å•†åº—æœ‰ä½¿ç”¨SSL時,ç¾åœ¨æ²’有時,有用',
827 'Disable media servers' => '關閉媒體伺æœå™¨',
828 'Disable media servers. Useful if media servers were used and there are not available now' => '關閉媒體伺æœå™¨ï¼Œç•¶ä¹‹å‰æœ‰ä½¿ç”¨ï¼Œä½†ç¾åœ¨æ²’æœ‰æ™‚ï¼Œè«‹é¸æ“‡é—œé–‰',
829 'Disable cache' => '關閉快å–',
830 'Disable cache mode. Useful if cache was used and no cache is available now' => 'é—œé–‰å¿«å–æ¨¡å¼ï¼Œç•¶ä¹‹å‰æœ‰ä½¿ç”¨ï¼Œä½†ç¾åœ¨æ²’æœ‰æ™‚ï¼Œè«‹é¸æ“‡é—œé–‰',
831 'Disable ModPagespeed' => '關閉 ModPagespeed',
832 'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => '關閉 ModPagespeedï¼Œç•¶ä¹‹å‰æœ‰ä½¿ç”¨ï¼Œä½†ç¾åœ¨æ²’æœ‰æ™‚ï¼Œè«‹é¸æ“‡é—œé–‰',
833 'Change table prefix' => '改變資料表å‰ç¶´',
834 'Change database table prefix' => '改變資料庫資料表å‰ç¶´',
835 'Database table prefix' => '資料庫資料表å‰ç¶´',
836 'Table prefix' => '資料表å‰ç¶´ ',
837 'Change access rights' => 'æ”¹è®Šé€£çµæ¬Šé™',
838 'Change folders and files access rights' => 'æ”¹è®Šè³‡æ–™å¤¾ä»¥åŠæª”æ¡ˆçš„é€£çµæ¬Šé™',
839 'File access rights, default : 644' => 'æª”æ¡ˆé€£çµæ¬Šé™ï¼Œé è¨ : 644',
840 'File access rights' => 'æª”æ¡ˆé€£çµæ¬Šé™ ',
841 'Folder access rights, default : 755' => 'è³‡æ–™å¤¾é€£çµæ¬Šé™ï¼Œé è¨ : 755',
842 'Folder access rights' => 'è³‡æ–™å¤¾é€£çµæ¬Šé™',
843 'Do not restore files' => 'ä¸è¦é‚„原檔案',
844 'Do not restore files. Useful for testing' => 'ä¸è¦é‚„原檔案',
845 'Do not restore database' => 'ä¸è¦é‚„原資料庫',
846 'Do not restore database. Useful for testing' => 'ä¸è¦é‚„原資料庫',
847 'Disable "NoAutoValueOnZero" SQL mode' => '關閉 "NoAutoValueOnZero" SQL 模å¼',
848 'Useful if mysql is limited and cannot restore the database' => '如果 mysql是å—到é™åˆ¶çš„,無法更新資料庫時,這是有用的',
849 'Start restoration' => '開始還原',
850 'Nt Restoration' => 'Nt Restoration',
851 'Database server is not valid.' => '資料庫伺æœå™¨ç„¡æ•ˆ',
852 'Database name is not valid.' => '資料庫å稱無效',
853 'Database user is not valid.' => '資料庫使用者無效',
854 'Database password is not valid.' => '資料庫密碼無效',
855 'Shop email is not valid.' => '商店電å郵件無效',
856 'Super admin email is not valid.' => '超級管ç†å…ƒçš„é›»å郵件無效',
857 'Super admin password is not valid.' => '超級管ç†å“¡çš„密碼無效',
858 'Super admin first name is not valid.' => '超級管ç†å“¡çš„åå—無效',
859 'Super admin last name is not valid.' => '超級管ç†å“¡çš„å§“æ°ç„¡æ•ˆ',
860 'Enable Mode Dev' => '啟用開發者模å¼',
861 'Enable Mode Dev. Useful for developers' => '啟用開發者模å¼ï¼Œé€™å°é–‹ç™¼è€…是有用的',
862 'Only database will be restored' => 'åªæœ‰è³‡æ–™åº«å°‡è¢«é‚„原',
863 'Backup file is big, progress is not accurate but everything is running well' => '備份檔案太大,éŽç¨‹ç„¡æ³•精確顯示,但是目å‰é‹ä½œä¸€åˆ‡è‰¯å¥½',
864 'Updating defines...' => 'æ£åœ¨æ›´æ–°å®šç¾©...',
865 'Disable "NoAutoValueOnZero" SQL mode' => '關閉 "NoAutoValueOnZero" SQL 模å¼',
866 'Useful if mysql is limited and cannot restore the database' => '如果 mysql是å—到é™åˆ¶çš„,無法更新資料庫時,這是有用的',
867 'Error while updating defines, defines file does not exist' => '更新定義時,發生錯誤,定義檔案ä¸å˜åœ¨',
868 'Error while updating defines, unable to read defines file' => '更新定義時,發生錯誤,無法讀å–定義檔案',
869 'Error while updating defines, unable to save defines file' => '更新定義時,發生錯誤,無法儲å˜å®šç¾©æª”案',
870 'Do not attempt to disable server timeout' => 'ä¸è¦å˜—試關閉 Server Timeout',
871 '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 數值。',
872 ),
873 'zh_cn' => array(
874 'Site Maintenance' => '网站维护模å¼',
875 'We will be back soon!' => '网站很快就会å†ä¸Šçº¿ï¼Œè¯·è€å¿ƒç‰å¾…ï¼',
876 'Sorry for the inconvenience but we are performing some maintenance at the moment.' => '很抱æ‰é€ æˆæ‚¨çš„ä¸ä¾¿ï¼Œç›®å‰ç½‘ç«™æ£åœ¨ç»´æŠ¤ä¸',
877 'Yes' => '是',
878 'No' => 'å¦',
879 'Starting restoration' => 'æ£åœ¨è¿˜åŽŸä¸',
880 'Error : ' => '错误 : ',
881 'No files restoration, as wanted' => 'å¦‚åŒæ‰€è®¾å®šçš„,文件并未被还原',
882 'No database restoration, as wanted' => 'å¦‚åŒæ‰€è®¾å®šçš„,数æ®åº“并未被还原',
883 'FINISH' => '完æˆ',
884 'FINISH ! Your backup was restored with success !' => 'å¤‡ä»½å·²ç»æˆåŠŸå®Œæˆè¿˜åŽŸï¼',
885 'Error' => '错误',
886 'Error while restoring files : No backup file found' => '还原备份文件时,å‘生错误,没有找到备份文件',
887 'Restoring backup...' => 'æ£åœ¨è¿˜åŽŸå¤‡ä»½ä¸...',
888 'Decompressing backup...' => 'æ£åœ¨è§£åŽ‹ç¼©å¤‡ä»½æ–‡ä»¶...',
889 'Restoring files...' => '还原文件ä¸...',
890 'Error : Unable to connect to the database ' => 'é”™è¯¯ï¼šæ— æ³•è¿žæŽ¥æ•°æ®åº“',
891 'Restoring database...' => 'æ£åœ¨è¿˜åŽŸæ•°æ®åº“...',
892 'Error while restoring database : ' => '还原数æ®åº“æ—¶å‘生错误: ',
893 'Updating URL configuration...' => 'æ£åœ¨æ›´æ–° URL é…ç½®...',
894 'Error while updating URL configuration : ' => 'æ›´æ–° URL é…置时,å‘生错误 : ',
895 'Deleting customers email...' => 'æ£åœ¨åˆ 除客户电å邮件...',
896 'Error while deleting customers emails : ' => 'åˆ é™¤å®¢æˆ·ç”µå邮件时,å‘生错误 : ',
897 'Error while deleting mailalert customers emails : ' => 'åˆ é™¤é‚®ä»¶æé†’客户电å邮件时,å‘生错误: ',
898 'Disabling SSL...' => 'æ£åœ¨å…³é— SSL...',
899 'Error while disabling SSL : ' => 'å…³é— SSL 时,å‘生错误 : ',
900 'Disabling media servers...' => 'æ£åœ¨å…³é—媒体æœåС噍...',
901 'Error while disabling media servers : ' => 'å…³é—媒体æœåŠ¡å™¨æ—¶ï¼Œå‘生错误 : ',
902 'Changing table prefix...' => 'æ£åœ¨æ”¹å˜èµ„料表å‰ç¼€...',
903 'Error while changing table prefix : ' => '改å˜èµ„料表å‰ç¼€æ—¶ï¼Œå‘生错误 : ',
904 'Creating super admin...' => 'æ£åœ¨å»ºç«‹è¶…级管ç†å‘˜...',
905 'Error while creating super admin : ' => '建立超级管ç†å‘˜æ—¶ï¼Œå‘生错误 : ',
906 'Error while getting employee by email : ' => '通过电å邮件建立员工资料时,å‘生错误 : ',
907 'Error while updating super admin password : ' => '更新超级管ç†å‘˜å¯†ç 时,å‘生错误 : ',
908 'Error while creating super admin : ' => '建立超级管ç†å‘˜æ—¶ï¼Œå‘生错误 : ',
909 'Error while getting likely understood language : ' => 'å–得已知è¯è¨€æ—¶ï¼Œå‘生错误 : ',
910 'Changing email shop...' => 'æ£åœ¨å»ºç«‹å•†åº—的电å邮件...',
911 'Error while changing email shop : ' => '改å˜å•†åº—的电å邮件时,å‘生错误 : ',
912 'Error while retrieving virtual uri : ' => 'å–得虚拟 URI 时,å‘生错误 : ',
913 'Updating settings...' => 'æ£åœ¨æ›´æ–°è®¾å®š...',
914 'Error while updating settings, settings file does not exist' => '更新设定时,å‘生错误,设定文件并ä¸å˜åœ¨',
915 'Error while updating settings, unable to read settings file' => '更新设定时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•è¯»å–设定文件',
916 'Error while updating settings, unable to save settings file' => '更新设定时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•å‚¨å˜è®¾å®šæ–‡ä»¶',
917 'Updating .htaccess file...' => 'Updating .htaccess file...',
918 'Error while renaming .htaccess file, please check file access rigth' => '釿–°å‘½å .htaccess 时,å‘生错误,请确认文件å˜å–æƒé™',
919 'Error while updating .htaccess file, .htaccess file does not exist' => 'æ›´æ–° .htaccess 时,å‘生错误, .htaccess ä¸å˜åœ¨',
920 'Error while updating .htaccess file, unable to read .htaccess file' => 'æ›´æ–° .htaccess 时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•è¯»å– .htaccess 文件',
921 'Error while updating .htaccess file, unable to save .htaccess file' => 'æ›´æ–° .htaccess 时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•ä¿å˜ .htaccess 文件',
922 'Updating links...' => 'æ£åœ¨æ›´æ–°é“¾æŽ¥...',
923 'Error while updating links : ' => '更新链接时,å‘生错误 : ',
924 'Error while restoring files, tar file does not exist' => '还原备份文件时,å‘生错误, tar文件ä¸å˜åœ¨',
925 'Error while restoring files, tar file is not correct' => '还原备份文件时,å‘生错误, taræ–‡ä»¶ä¸æ£ç¡®',
926 'Error while restoring files, unable to open tar file' => '还原备份文件时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•æ‰“å¼€ tar文件',
927 'Error while restoring files, unable to read tar file' => '还原备份文件时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•è¯»å– tar文件',
928 'Error while restoring files, unable to read name file in tar file' => '还原备份文件时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•è¯»å– tar文件里的文件åç§°',
929 'Error while restoring files, tar file truncated' => '还原备份文件时,å‘生错误, tar文件ä¸å®Œæ•´',
930 'Error while restoring files, unable to create directory ' => '还原备份文件时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•å»ºç«‹ç›®å½•',
931 'Error while restoring files, unable to create file ' => '还原备份文件时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•å»ºç«‹æ–‡ä»¶',
932 'Error while restoring files, unable to read data in tar file' => '还原备份文件时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•è¯»å– tar文件里的资料',
933 'Error while restoring files, tar file truncated' => '还原备份文件时,å‘生错误, tar文件ä¸å®Œæ•´',
934 'Error while restoring files, unable to write file ' => '还原备份文件时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•å†™å…¥æ–‡ä»¶',
935 'Restoring files : ' => 'æ£åœ¨è¿˜åŽŸæ–‡ä»¶ : ',
936 'Error while checking existence of table ' => '检查资料表时,å‘生错误 ',
937 'Restoring database : ' => 'æ£åœ¨è¿˜åŽŸæ•°æ®åº“ : ',
938 'Execution failed on :' => '执行时,å‘生错误在:',
939 ' on request :' => ' æ ¹æ®è¦æ±‚ :',
940 'Query failed on :' => '查询时,å‘生错误在:',
941 'No SQL file' => '没有 SQL 文件',
942 'Unable to open SQL file' => 'æ— æ³•å¼€å¯ SQL 文件',
943 'Restoration failed on line n°' => '还原失败在行 n°',
944 'Nt Restoration for Prestashop' => 'Nt Restoration 为 Prestashop',
945 'Message' => 'ä¿¡æ¯',
946 'Refresh' => '釿–°æ•´ç†',
947 'Database connection parameters' => 'æ•°æ®åº“è¿žæŽ¥å‚æ•°',
948 'Database server address' => 'æ•°æ®åº“æœåС噍ä½ç½®',
949 'Host server' => '主机',
950 'Database name' => 'æ•°æ®åº“åç§°',
951 'Name' => 'åç§°',
952 'Database login' => 'æ•°æ®åº“登入',
953 'User' => '使用者',
954 'Database password' => 'æ•°æ®åº“密ç ',
955 'Password' => '密ç ',
956 'Options' => '选项',
957 'Clean' => '清ç†',
958 'Delete backup file after restoration' => '在还原之åŽï¼Œåˆ 除备份文件',
959 'Change shop email' => '编辑商店的电å邮件',
960 'You can provide a new shop contact email' => '您å¯ä»¥æä¾›ä¸€ä¸ªæ–°çš„商店电å邮件',
961 'Email' => '电å邮件',
962 'Create super admin' => '创建超级管ç†å‘˜',
963 'Create a new super admin' => '创建一个新的超级管ç†å‘˜',
964 'First name' => 'åå—',
965 'Last name' => 'å§“æ°',
966 'Delete customers emails' => 'åˆ é™¤å®¢æˆ·ç”µå邮件',
967 'Delete all customers emails. Useful for dev local test shop' => 'åˆ é™¤å…¨éƒ¨çš„å®¢æˆ·ç”µå邮件',
968 'Disable SSL' => 'å…³é— SSL',
969 'Disable SSL mode. Useful if SSL was used and no SSL is available now' => 'å…³é— SSL 模å¼ï¼Œå½“原本商店有使用SSL时,现在没有时,有用',
970 'Disable media servers' => 'å…³é—媒体æœåС噍',
971 'Disable media servers. Useful if media servers were used and there are not available now' => 'å…³é—媒体æœåŠ¡å™¨ï¼Œå½“ä¹‹å‰æœ‰ä½¿ç”¨ï¼Œä½†çŽ°åœ¨æ²¡æœ‰æ—¶ï¼Œè¯·é€‰æ‹©å…³é—',
972 'Disable cache' => 'å…³é—å¿«å–',
973 'Disable cache mode. Useful if cache was used and no cache is available now' => 'å…³é—å¿«å–æ¨¡å¼ï¼Œå½“之剿œ‰ä½¿ç”¨ï¼Œä½†çŽ°åœ¨æ²¡æœ‰æ—¶ï¼Œè¯·é€‰æ‹©å…³é—',
974 'Disable ModPagespeed' => 'å…³é— ModPagespeed',
975 'Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now' => 'å…³é— ModPagespeedï¼Œå½“ä¹‹å‰æœ‰ä½¿ç”¨ï¼Œä½†çŽ°åœ¨æ²¡æœ‰æ—¶ï¼Œè¯·é€‰æ‹©å…³é—',
976 'Change table prefix' => '编辑资料表å‰ç¼€',
977 'Change database table prefix' => '编辑数æ®åº“资料表å‰ç¼€',
978 'Database table prefix' => 'æ•°æ®åº“资料表å‰ç¼€',
979 'Table prefix' => '资料表å‰ç¼€ ',
980 'Change access rights' => '编辑访问æƒé™',
981 'Change folders and files access rights' => 'ç¼–è¾‘æ–‡ä»¶å¤¹ä»¥åŠæ–‡ä»¶çš„访问æƒé™',
982 'File access rights, default : 644' => '文件访问æƒé™ï¼Œé¢„设 : 644',
983 'File access rights' => '文件访问æƒé™ ',
984 'Folder access rights, default : 755' => '文件夹访问æƒé™ï¼Œé¢„设 : 755',
985 'Folder access rights' => '文件夹访问æƒé™',
986 'Do not restore files' => 'ä¸è¦è¿˜åŽŸæ–‡ä»¶',
987 'Do not restore files. Useful for testing' => 'ä¸è¦è¿˜åŽŸæ–‡ä»¶ã€‚æµ‹è¯•æ—¶æœ‰ç”¨',
988 'Do not restore database' => 'ä¸è¦è¿˜åŽŸæ•°æ®åº“',
989 'Do not restore database. Useful for testing' => 'ä¸è¦è¿˜åŽŸæ•°æ®åº“。测试时有用',
990 'Disable "NoAutoValueOnZero" SQL mode' => 'å…³é— "NoAutoValueOnZero" SQL 模å¼',
991 'Useful if mysql is limited and cannot restore the database' => '如果 mysql是å—到é™åˆ¶çš„ï¼Œæ— æ³•æ›´æ–°æ•°æ®åº“时,这是有用的',
992 'Start restoration' => '开始还原',
993 'Nt Restoration' => 'Nt Restoration',
994 'Database server is not valid.' => 'æ•°æ®åº“æœåŠ¡å™¨æ— æ•ˆ',
995 'Database name is not valid.' => 'æ•°æ®åº“åç§°æ— æ•ˆ',
996 'Database user is not valid.' => 'æ•°æ®åº“ä½¿ç”¨è€…æ— æ•ˆ',
997 'Database password is not valid.' => 'æ•°æ®åº“å¯†ç æ— 效',
998 'Shop email is not valid.' => '商店电åé‚®ä»¶æ— æ•ˆ',
999 'Super admin email is not valid.' => '超级管ç†å‘˜çš„电åé‚®ä»¶æ— æ•ˆ',
1000 'Super admin password is not valid.' => '超级管ç†å‘˜çš„å¯†ç æ— 效',
1001 'Super admin first name is not valid.' => '超级管ç†å‘˜çš„åå—æ— 效',
1002 'Super admin last name is not valid.' => '超级管ç†å‘˜çš„å§“æ°æ— 效',
1003 'Enable Mode Dev' => '激活开å‘者模å¼',
1004 'Enable Mode Dev. Useful for developers' => '激活开å‘者模å¼ï¼Œè¿™å¯¹å¼€å‘者是有用的',
1005 'Only database will be restored' => 'åªæœ‰æ•°æ®åº“将被还原',
1006 'Backup file is big, progress is not accurate but everything is running well' => 'å¤‡ä»½æ–‡ä»¶å¤ªå¤§ï¼Œè¿›åº¦æ— æ³•ç²¾ç¡®æ˜¾ç¤ºï¼Œä½†æ˜¯ç›®å‰è¿ä½œä¸€åˆ‡è‰¯å¥½',
1007 'Updating defines...' => 'æ£åœ¨æ›´æ–°å®šä¹‰...',
1008 'Disable "NoAutoValueOnZero" SQL mode' => 'å…³é— "NoAutoValueOnZero" SQL 模å¼',
1009 'Useful if mysql is limited and cannot restore the database' => '如果 mysql是å—到é™åˆ¶çš„ï¼Œæ— æ³•æ›´æ–°æ•°æ®åº“时,这是有用的',
1010 'Error while updating defines, defines file does not exist' => '更新定义时,å‘生错误,定义文件ä¸å˜åœ¨',
1011 'Error while updating defines, unable to read defines file' => '更新定义时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•è¯»å–定义文件',
1012 'Error while updating defines, unable to save defines file' => '更新定义时,å‘ç”Ÿé”™è¯¯ï¼Œæ— æ³•ä¿å˜å®šä¹‰æ–‡ä»¶',
1013 'Do not attempt to disable server timeout' => 'ä¸è¦å°è¯•å…³é—è¶…æ—¶æœåС噍',
1014 '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。',
1015 ),
1016 'it' => array(
1017 'Site Maintenance' => 'Site Maintenance',
1018 'We will be back soon!' => 'We will be back soon!',
1019 '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.',
1020 'Yes' => 'Yes',
1021 'No' => 'No',
1022 'Starting restoration' => 'Starting restoration',
1023 'Error : ' => 'Error : ',
1024 'No files restoration, as wanted' => 'No files restoration, as wanted',
1025 'No database restoration, as wanted' => 'No database restoration, as wanted',
1026 'FINISH' => 'FINISH',
1027 'FINISH ! Your backup was restored with success !' => 'FINISH ! Your backup was restored with success !',
1028 'Error' => 'Error',
1029 'Error while restoring files : No backup file found' => 'Error while restoring files : No backup file found',
1030 'Restoring backup...' => 'Restoring backup...',
1031 'Decompressing backup...' => 'Decompressing backup...',
1032 'Restoring files...' => 'Restoring files...',
1033 'Error : Unable to connect to the database ' => 'Error : Unable to connect to the database ',
1034 'Restoring database...' => 'Restoring database...',
1035 'Error while restoring database : ' => 'Error while restoring database : ',
1036 'Updating URL configuration...' => 'Updating URL configuration...',
1037 'Error while updating URL configuration : ' => 'Error while updating URL configuration : ',
1038 'Deleting customers email...' => 'Deleting customers email...',
1039 'Error while deleting customers emails : ' => 'Error while deleting customers emails : ',
1040 'Error while deleting mailalert customers emails : ' => 'Error while deleting mailalert customers emails : ',
1041 'Disabling SSL...' => 'Disabling SSL...',
1042 'Error while disabling SSL : ' => 'Error while disabling SSL : ',
1043 'Disabling media servers...' => 'Disabling media servers...',
1044 'Error while disabling media servers : ' => 'Error while disabling media servers : ',
1045 'Changing table prefix...' => 'Changing table prefix...',
1046 'Error while changing table prefix : ' => 'Error while changing table prefix : ',
1047 'Creating super admin...' => 'Creating super admin...',
1048 'Error while creating super admin : ' => 'Error while creating super admin : ',
1049 'Error while getting employee by email : ' => 'Error while getting employee by email : ',
1050 'Error while updating super admin password : ' => 'Error while updating super admin password : ',
1051 'Error while creating super admin : ' => 'Error while creating super admin : ',
1052 'Error while getting likely understood language : ' => 'Error while getting likely understood language : ',
1053 'Changing email shop...' => 'Changing email shop...',
1054 'Error while changing email shop : ' => 'Error while changing email shop : ',
1055 'Error while retrieving virtual uri : ' => 'Error while retrieving virtual uri : ',
1056 'Updating settings...' => 'Updating settings...',
1057 'Error while updating settings, settings file does not exist' => 'Error while updating settings, settings file does not exist',
1058 'Error while updating settings, unable to read settings file' => 'Error while updating settings, unable to read settings file',
1059 'Error while updating settings, unable to save settings file' => 'Error while updating settings, unable to save settings file',
1060 'Updating .htaccess file...' => 'Updating .htaccess file...',
1061 'Error while renaming .htaccess file, please check file access rigth' => 'Error while renaming .htaccess file, please check file access rigth',
1062 'Error while updating .htaccess file, .htaccess file does not exist' => 'Error while updating .htaccess file, .htaccess file does not exist',
1063 'Error while updating .htaccess file, unable to read .htaccess file' => 'Error while updating .htaccess file, unable to read .htaccess file',
1064 'Error while updating .htaccess file, unable to save .htaccess file' => 'Error while updating .htaccess file, unable to save .htaccess file',
1065 'Updating links...' => 'Updating links...',
1066 'Error while updating links : ' => 'Error while updating links : ',
1067 'Error while restoring files, tar file does not exist' => 'Error while restoring files, tar file does not exist',
1068 'Error while restoring files, tar file is not correct' => 'Error while restoring files, tar file is not correct',
1069 'Error while restoring files, unable to open tar file' => 'Error while restoring files, unable to open tar file',
1070 'Error while restoring files, unable to read tar file' => 'Error while restoring files, unable to read tar file',
1071 'Error while restoring files, unable to read name file in tar file' => 'Error while restoring files, unable to read name file in tar file',
1072 'Error while restoring files, tar file truncated' => 'Error while restoring files, tar file truncated',
1073 'Error while restoring files, unable to create directory ' => 'Error while restoring files, unable to create directory ',
1074 'Error while restoring files, unable to create file ' => 'Error while restoring files, unable to create file ',
1075 'Error while restoring files, unable to read data in tar file' => 'Error while restoring files, unable to read data in tar file',
1076 'Error while restoring files, tar file truncated' => 'Error while restoring files, tar file truncated',
1077 'Error while restoring files, unable to write file ' => 'Error while restoring files, unable to write file ',
1078 'Restoring files : ' => 'Restoring files : ',
1079 'Error while checking existence of table ' => 'Error while checking existence of table ',
1080 'Restoring database : ' => 'Restoring database : ',
1081 'Execution failed on :' => 'Execution failed on :',
1082 ' on request :' => ' on request :',
1083 'Query failed on :' => 'Query failed on :',
1084 'No SQL file' => 'No SQL file',
1085 'Unable to open SQL file' => 'Unable to open SQL file',
1086 'Restoration failed on line n°' => 'Restoration failed on line n°',
1087 'Nt Restoration for Prestashop' => 'Nt Restoration for Prestashop',
1088 'Message' => 'Message',
1089 'Refresh' => 'Refresh',
1090 'Database connection parameters' => 'Database connection parameters',
1091 'Database server address' => 'Database server address',
1092 'Host server' => 'Host server',
1093 'Database name' => 'Database name',
1094 'Name' => 'Name',
1095 'Database login' => 'Database login',
1096 'User' => 'User',
1097 'Database password' => 'Database password',
1098 'Password' => 'Password',
1099 'Options' => 'Options',
1100 'Clean' => 'Clean',
1101 'Delete backup file after restoration' => 'Delete backup file after restoration',
1102 'Change shop email' => 'Change shop email',
1103 'You can provide a new shop contact email' => 'You can provide a new shop contact email',
1104 'Email' => 'Email',
1105 'Create super admin' => 'Create super admin',
1106 'Create a new super admin' => 'Create a new super admin',
1107 'First name' => 'First name',
1108 'Last name' => 'Last name',
1109 'Delete customers emails' => 'Delete customers emails',
1110 'Delete all customers emails. Useful for dev local test shop' => 'Delete all customers emails. Useful for dev local test shop',
1111 'Disable SSL' => 'Disable SSL',
1112 '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',
1113 'Disable media servers' => 'Disable media servers',
1114 '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',
1115 'Disable cache' => 'Disable cache',
1116 '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',
1117 'Disable ModPagespeed' => 'Disable ModPagespeed',
1118 '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',
1119 'Change table prefix' => 'Change table prefix',
1120 'Change database table prefix' => 'Change database table prefix',
1121 'Database table prefix' => 'Database table prefix',
1122 'Table prefix' => 'Table prefix ',
1123 'Change access rights' => 'Change access rights',
1124 'Change folders and files access rights' => 'Change folders and files access rights',
1125 'File access rights, default : 644' => 'File access rights, default : 644',
1126 'File access rights' => 'File access rights ',
1127 'Folder access rights, default : 755' => 'Folder access rights, default : 755',
1128 'Folder access rights' => 'Folder access rights ',
1129 'Do not restore files' => 'Do not restore files',
1130 'Do not restore files. Useful for testing' => 'Do not restore files. Useful for testing',
1131 'Do not restore database' => 'Do not restore database',
1132 'Do not restore database. Useful for testing' => 'Do not restore database. Useful for testing',
1133 'Disable "NoAutoValueOnZero" SQL mode' => 'Disable "NoAutoValueOnZero" SQL mode',
1134 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
1135 'Start restoration' => 'Start restoration',
1136 'Nt Restoration' => 'Nt Restoration',
1137 'Database server is not valid.' => 'Database server is not valid.',
1138 'Database name is not valid.' => 'Database name is not valid.',
1139 'Database user is not valid.' => 'Database user is not valid.',
1140 'Database password is not valid.' => 'Database password is not valid.',
1141 'Shop email is not valid.' => 'Shop email is not valid.',
1142 'Super admin email is not valid.' => 'Super admin email is not valid.',
1143 'Super admin password is not valid.' => 'Super admin password is not valid.',
1144 'Super admin first name is not valid.' => 'Super admin first name is not valid.',
1145 'Super admin last name is not valid.' => 'Super admin last name is not valid.',
1146 'Enable Mode Dev' => 'Enable Mode Dev',
1147 'Enable Mode Dev. Useful for developers' => 'Enable Mode Dev. Useful for developers',
1148 'Only database will be restored' => 'Only database will be restored',
1149 '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',
1150 'Updating defines...' => 'Updating defines...',
1151 'Disable "NoAutoValueOnZero" SQL mode' => 'Disable "NoAutoValueOnZero" SQL mode',
1152 'Useful if mysql is limited and cannot restore the database' => 'Useful if mysql is limited and cannot restore the database',
1153 'Error while updating defines, defines file does not exist' => 'Error while updating defines, defines file does not exist',
1154 'Error while updating defines, unable to read defines file' => 'Error while updating defines, unable to read defines file',
1155 'Error while updating defines, unable to save defines file' => 'Error while updating defines, unable to save defines file',
1156 'Do not attempt to disable server timeout' => 'Do not attempt to disable server timeout',
1157 '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.',
1158 )
1159);
1160
1161//-----------------------------------------------------------------------------
1162
1163/**
1164* 2013-2016 2N Technologies
1165*
1166* NOTICE OF LICENSE
1167*
1168* This source file is subject to the Open Software License (OSL 3.0)
1169* that is bundled with this package in the file LICENSE.txt.
1170* It is also available through the world-wide-web at this URL:
1171* http://opensource.org/licenses/osl-3.0.php
1172* If you did not receive a copy of the license and are unable to
1173* obtain it through the world-wide-web, please send an email
1174* to contact@2n-tech.com so we can send you a copy immediately.
1175*
1176* @author 2N Technologies <contact@2n-tech.com>
1177* @copyright 2013-2016 2N Technologies
1178* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1179*
1180* CHANGELOG
1181*
1182* Version 7.1.1 :
1183* - Fix links update
1184* Version 7.0.0 :
1185* - Add option to change time limit
1186* Version 6.1.5 :
1187* - Add Simplified Chinese internationalization thanks to Bai Shijun
1188* Version 6.1.4 :
1189* - Add Traditional Chinese internationalization thanks to Bryant Kang
1190* Version 6.1.2 :
1191* - Auto reconnect to database if server timed out during restoration
1192* Version 4.1.0 :
1193* - Do not clean backup file if the backup is not compressed and clean is not wanted
1194* Version 4.0.4 :
1195* - Add option to disable "No Auto Value On Zero" SQL mode
1196* Version 4.0.3 :
1197* - Compatibility with Prestashop 1.7.0.0
1198* Version 3.0.13 :
1199* - Database connection port fix
1200* Version 3.0.5 :
1201* - Sync version number with main script
1202* Version 2.0.2 :
1203* - Add Swedish internationalization thanks to Roy Sohlander
1204* Version 2.0.1 :
1205* - Add Danish internationalization thanks to Nick Andersen (dinprestashop.dk)
1206* Version 2.0.0 :
1207* - Add Internationalization (English, French)
1208* - Option to delete customers emails now delete mails from mailalert module if exists
1209* - Option to enable mode Dev
1210* - Option to disable ModPagespeed
1211* - Option to disable media servers
1212* - Works better with virtual uri
1213* - Fix truncated file name with long link in tar file
1214* Version 1.3.0 :
1215* - Add maintenance page to everyone but specified ip address
1216* Version 1.2.0 :
1217* - Add option to disable cache
1218* Version 1.1.0 :
1219* - New design
1220* - Add option to create new super admin
1221* - Add option to delete customers emails
1222* - Add option to disable SSL
1223* - Add option to change table prefix
1224* - Add option to change files and folders access rights
1225* - Add option to not restore files
1226* - Add option to not restore database
1227* - Fix untar long filename restoration
1228* Version 1.0.1 :
1229* - Fix Mysql UTF-8 encoding
1230* - Fix untar zero size files
1231* - Fix folder access rights
1232* Version 1.0.0 :
1233* - First version for prestashop 1.5 and 1.6
1234*/
1235
1236$l = i18n();
1237
1238if($my_ip && !tools::check_ip($my_ip))
1239 tools::display_maintenance_page($l);
1240
1241define('VERSION', '7.1.1');
1242define('DUMP_FILE', 'modules/ntbackupandrestore/backup/dump.sql');
1243define('DUMP_FILE_ALONE', 'dump.sql');
1244define('SETTINGS_FILE', 'config/settings.inc.php');
1245define('SETTINGS_FILE_17', 'app/config/parameters.php');
1246define('DEFINES_FILE', 'config/defines.inc.php');
1247define('HTACCESS_FILE', '.htaccess');
1248define('HTACCESS_NTBR_FILE', 'htaccess.ntbr');
1249define('ACTIVATE_LOG', true);
1250define('LOG_DATE_FORMAT', 'd/m/Y H:i:s');
1251define('LOG_FILE', 'log.txt');
1252define('LASTLOG_FILE', 'lastlog.txt');
1253define('FILE_ACCESS_RIGHTS', 644);
1254define('FOLDER_ACCESS_RIGHTS', 755);
1255define('TIME_LIMIT', 7200);
1256define('MEMORY_LIMIT', 128);
1257
1258/* Ajax : Returning last log */
1259if (isset($_GET['lastlog']))
1260{
1261 if(!file_exists(LASTLOG_FILE))
1262 Tools::log(l('Starting restoration'));
1263 die('{"laslog":'.json_encode(file_get_contents(LASTLOG_FILE)).'}');
1264}
1265
1266if (isset($_GET['deletelastlog']))
1267{//Delete last log file
1268 Tools::fileDelete(LASTLOG_FILE);
1269 die('{"deletelastlog":"OK"}');
1270}
1271
1272$backup_parts = NtRestore::findBackup();
1273$dump_only = (strpos($backup_parts[1], 'dump') !== false);
1274
1275/* Ajax : Executing restoration */
1276if (isset($_GET['db_server']))
1277{
1278 $error = '';
1279 $opt = array();
1280
1281 $db_server = (isset($_GET['db_server'])) ? $_GET['db_server'] : '';
1282 $db_name = (isset($_GET['db_name'])) ? $_GET['db_name'] : '';
1283 $db_user = (isset($_GET['db_user'])) ? $_GET['db_user'] : '';
1284 $db_passwd = (isset($_GET['db_passwd'])) ? $_GET['db_passwd'] : '';
1285 if($db_server == '')
1286 $error .= l('Database server is not valid.').'<br />';
1287 if($db_name == '')
1288 $error .= l('Database name is not valid.').'<br />';
1289 if($db_user == '')
1290 $error .= l('Database user is not valid.').'<br />';
1291 if($db_passwd == '')
1292 $error .= l('Database password is not valid.').'<br />';
1293
1294 $opt['clean'] = (isset($_GET['clean']) && $_GET['clean'] == 'true') ? true : false;
1295
1296 $opt['change_shop_email'] = (isset($_GET['change_shop_email']) && $_GET['change_shop_email'] == 'true') ? true : false;
1297 if($opt['change_shop_email'])
1298 {
1299 $opt['shop_email'] = (isset($_GET['shop_email'])) ? $_GET['shop_email'] : '';
1300 if(!filter_var($opt['shop_email'], FILTER_VALIDATE_EMAIL))
1301 $error .= l('Shop email is not valid.').'<br />';
1302 }
1303
1304 $opt['create_super_admin'] = (isset($_GET['create_super_admin']) && $_GET['create_super_admin'] == 'true') ? true : false;
1305 if($opt['create_super_admin'])
1306 {
1307 $opt['super_admin_email'] = (isset($_GET['super_admin_email'])) ? $_GET['super_admin_email'] : '';
1308 $opt['super_admin_password'] = (isset($_GET['super_admin_password'])) ? $_GET['super_admin_password'] : '';
1309 $opt['super_admin_email_first_name'] = (isset($_GET['super_admin_email_first_name'])) ? $_GET['super_admin_email_first_name'] : '';
1310 $opt['super_admin_email_last_name'] = (isset($_GET['super_admin_email_last_name'])) ? $_GET['super_admin_email_last_name'] : '';
1311 if(!filter_var($opt['super_admin_email'], FILTER_VALIDATE_EMAIL))
1312 $error .= l('Super admin email is not valid.').'<br />';
1313 if($opt['super_admin_password'] == '')
1314 $error .= l('Super admin password is not valid.').'<br />';
1315 if($opt['super_admin_email_first_name'] == '')
1316 $error .= l('Super admin first name is not valid.').'<br />';
1317 if($opt['super_admin_email_last_name'] == '')
1318 $error .= l('Super admin last name is not valid.').'<br />';
1319 }
1320
1321 $opt['delete_customers_emails'] = (isset($_GET['delete_customers_emails']) && $_GET['delete_customers_emails'] == 'true') ? true : false;
1322 $opt['disable_ssl'] = (isset($_GET['disable_ssl']) && $_GET['disable_ssl'] == 'true') ? true : false;
1323 $opt['disable_cache'] = (isset($_GET['disable_cache']) && $_GET['disable_cache'] == 'true') ? true : false;
1324 $opt['disable_modpagespeed'] = (isset($_GET['disable_modpagespeed']) && $_GET['disable_modpagespeed'] == 'true') ? true : false;
1325 $opt['disable_mediaservers'] = (isset($_GET['disable_mediaservers']) && $_GET['disable_mediaservers'] == 'true') ? true : false;
1326 $opt['enable_mode_dev'] = (isset($_GET['enable_mode_dev']) && $_GET['enable_mode_dev'] == 'true') ? true : false;
1327
1328 $opt['change_table_prefix'] = (isset($_GET['change_table_prefix']) && $_GET['change_table_prefix'] == 'true') ? true : false;
1329 if($opt['change_table_prefix'])
1330 $opt['table_prefix'] = (isset($_GET['table_prefix'])) ? $_GET['table_prefix'] : '';
1331
1332 $opt['change_access_rights'] = (isset($_GET['change_access_rights']) && $_GET['change_access_rights'] == 'true') ? true : false;
1333 if($opt['change_access_rights'])
1334 {
1335 $opt['file_access_rights'] = (int)(isset($_GET['file_access_rights'])) ? $_GET['file_access_rights'] : '';
1336 $opt['folder_access_rights'] = (int)(isset($_GET['folder_access_rights'])) ? $_GET['folder_access_rights'] : '';
1337 if($opt['file_access_rights'] < 600 || $opt['file_access_rights'] > 777)
1338 $error .= 'File access rights are not valid (should be between 600 and 777).<br />';
1339 if($opt['folder_access_rights'] < 600 || $opt['folder_access_rights'] > 777)
1340 $error .= 'Folder access rights are not valid (should be between 600 and 777).<br />';
1341 }
1342
1343 $opt['do_not_restore_files'] = (isset($_GET['do_not_restore_files']) && $_GET['do_not_restore_files'] == 'true') ? true : false;
1344 $opt['do_not_restore_database'] = (isset($_GET['do_not_restore_database']) && $_GET['do_not_restore_database'] == 'true') ? true : false;
1345
1346 $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;
1347
1348 if($error != '')
1349 {//Errors happened
1350 Tools::log(l('Error').' : <br />'.$error);
1351 die(print_r($_REQUEST, true).'Error : '.'<br />'.$error);
1352 }
1353
1354 //Everything is good, we can start the restoration
1355 $restore = new NtRestore($db_server, $db_name, $db_user, $db_passwd, $opt, $l);
1356 $restore->restore();
1357 die();
1358}
1359
1360/**
1361* Return language translation
1362*
1363* @return array Translation array
1364*/
1365function i18n()
1366{
1367 global $t;
1368 $lang = 'en'; //Default language
1369
1370 if(!isset($_GET['l']))
1371 $_GET['l'] = $lang;
1372
1373 foreach($t as $language => $translation)
1374 {
1375 if($language === $_GET['l'])
1376 {
1377 $lang = $language;
1378 break;
1379 }
1380 }
1381 return $t[$lang];
1382}
1383
1384/**
1385* Return the translation of text in the selected language
1386*
1387* @param string $text Text to translate
1388* @return string Translated text
1389*/
1390function l($text)
1391{
1392 global $l;
1393 if(isset($l[$text]))
1394 return $l[$text];
1395 return $text;
1396}
1397
1398?>
1399
1400<!DOCTYPE html>
1401<html lang="en">
1402<head>
1403 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
1404 <title><?php echo l('Nt Restoration for Prestashop'); ?></title>
1405 <script type="text/javascript">
1406 /*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
1407 !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){
1408 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)),
1409 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});
1410 </script>
1411 <style type="text/css">
1412 body{
1413 width: 700px;
1414 margin: auto;
1415 padding: 20px;
1416 background-color: #ffffff;
1417 color: #0f70b7;
1418 font-size: 90%;
1419 font-family: verdana;
1420 }
1421 #title{
1422 font-size: 2em;
1423 padding-bottom: 30px;
1424 text-align: center;
1425 font-weight: 700;
1426 }
1427 #msg{
1428 min-height: 50px;
1429 padding: 10px;
1430 font-size: 1.4em;
1431 margin-bottom: 20px;
1432 }
1433 .ok{
1434 background-color: #98dc98;
1435 border: 1px solid #0d920d;
1436 color: #0d920d;
1437 }
1438 .error{
1439 background-color: #ffc1c1;
1440 border: 1px solid #bc1a1a;
1441 color: #bc1a1a;
1442 }
1443 .finish{
1444 font-size: 2.5em;
1445 }
1446 fieldset{
1447 border: 0px;
1448 font-size: 1.4em;
1449 margin-bottom: 20px;
1450 border-radius: 3px;
1451 }
1452 fieldset legend{
1453 font-weight: 700;
1454 padding-bottom: 20px;
1455 }
1456 .param{
1457 clear: both;
1458 }
1459 input{
1460 float: right;
1461 width: 400px;
1462 font-size: 1em;
1463 margin-bottom: 10px;
1464 height: 1.4em;
1465 border: 1px solid #6288f2;
1466 padding-left: 1px;
1467 border-radius: 3px;
1468 color: #0f70b7;
1469 }
1470 .param input{
1471 width: 230px;
1472 }
1473 .btn{
1474 float: left;
1475 width: 700px;
1476 font-size: 1.4em;
1477 margin-bottom: 30px;
1478 height: 100%;
1479 border: 1px solid #7caaf9;
1480 padding: 10px 0px 10px 0px;
1481 border-radius: 3px;
1482 background-color: #fff;
1483 color: #0f70b7;
1484 text-align: center;
1485 }
1486 .btn:hover{
1487 background-color: #f8f9ff;
1488 border: 1px solid #6288f2;
1489 cursor:pointer;
1490 }
1491 .noise {
1492 position: relative;
1493 z-index: 1;
1494 }
1495 .noise:before, .body-noise:before {
1496 content: "";
1497 position: absolute;
1498 opacity: 0.4;
1499 z-index: -1;
1500 top:0;
1501 bottom:0;
1502 left:0;
1503 right:0;
1504 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==');
1505 }
1506 #version{
1507 text-align: right;
1508 padding: 3px;
1509 position: fixed;
1510 bottom: 0;
1511 right: 0;
1512 }
1513 .onoffname{
1514 float: left;
1515 padding: 10px 0px 10px 0px;
1516 }
1517 .onoffswitch {
1518 position: relative; width: 75px; float: right;
1519 -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
1520 }
1521 .onoffswitch-checkbox {
1522 display: none;
1523 }
1524 .onoffswitch-label {
1525 display: block; overflow: hidden; cursor: pointer;
1526 border: 2px solid #999999; border-radius: 20px;
1527 }
1528 .onoffswitch-inner {
1529 display: block; width: 200%; margin-left: -100%;
1530 transition: margin 0.3s ease-in 0s;
1531 }
1532 .onoffswitch-inner:before, .onoffswitch-inner:after {
1533 display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
1534 font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
1535 box-sizing: border-box;
1536 }
1537 .onoffswitch-inner:before {
1538 content: "<?php echo l('Yes'); ?>";
1539 padding-left: 10px;
1540 background-color: #0f70b7; color: #FFFFFF;
1541 }
1542 .onoffswitch-inner:after {
1543 content: "<?php echo l('No'); ?>";
1544 padding-right: 10px;
1545 background-color: #EEEEEE; color: #999999;
1546 text-align: right;
1547 }
1548 .onoffswitch-switch {
1549 display: block; width: 18px; margin: 6px;
1550 background: #FFFFFF;
1551 position: absolute; top: 0; bottom: 0;
1552 right: 41px;
1553 border: 2px solid #999999; border-radius: 20px;
1554 transition: all 0.3s ease-in 0s;
1555 }
1556 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
1557 margin-left: 0;
1558 }
1559 .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
1560 right: 0px;
1561 }
1562 .flag{
1563 width: 16px;
1564 height: 11px;
1565 float: right;
1566 padding-right: 5px;
1567 background-repeat: no-repeat;
1568 }
1569 .flag_fr{
1570 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=");
1571 }
1572 .flag_en{
1573 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");
1574 }
1575 .flag_da{
1576 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')
1577 }
1578 .flag_sv{
1579 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=')
1580 }
1581 .flag_de{
1582 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=");
1583 }
1584 .flag_zh_tw{
1585 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');
1586 }
1587 .flag_zh_cn{
1588 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==');
1589 }
1590 .flag_it{
1591 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');
1592 }
1593 #dump_only_message{
1594 display: none;
1595 clear: both;
1596 }
1597 <?php
1598 if($dump_only)
1599 echo '#options_files{display: none;} #dump_only_message{display: block;}';
1600 ?>
1601 </style>
1602</head>
1603<body class="noise">
1604 <a id="flag_en" class="flag flag_en" href="?l=en"></a>
1605 <a id="flag_fr" class="flag flag_fr" href="?l=fr"></a>
1606 <!--<a id="flag_it" class="flag flag_it" href="?l=it"></a>-->
1607 <a id="flag_da" class="flag flag_da" href="?l=da"></a>
1608 <a id="flag_sv" class="flag flag_sv" href="?l=sv"></a>
1609 <a id="flag_de" class="flag flag_de" href="?l=de"></a>
1610 <a id="flag_zh_tw" class="flag flag_zh_tw" href="?l=zh_tw"></a>
1611 <a id="flag_zh_cn" class="flag flag_zh_cn" href="?l=zh_cn"></a>
1612 <div id="title"><?php echo l('Nt Restoration for Prestashop'); ?></div>
1613 <div id="msg" title="Message" style="display:none;" class="ok"><?php echo l('Starting restoration'); ?></div>
1614 <div id="refresh" title="Refresh" style="display:none;" onclick="lastlog();" class="btn"><?php echo l('Refresh'); ?></div>
1615 <form id="params">
1616 <fieldset>
1617 <legend><?php echo l('Database connection parameters'); ?></legend>
1618 <div class="param"><label for="db_server" title="<?php echo l('Database server address'); ?>"><?php echo l('Host server'); ?> * : </label><input type="text" name="db_server" id="db_server" value="localhost" /></div>
1619 <div class="param"><label for="db_name" title="<?php echo l('Database name'); ?>"><?php echo l('Name'); ?> * : </label><input type="text" name="db_name" id="db_name" value=""/></div>
1620 <div class="param"><label for="db_user" title="<?php echo l('Database login'); ?>"><?php echo l('User'); ?> * : </label><input type="text" name="db_user" id="db_user" value=""/></div>
1621 <div class="param"><label for="db_passwd" title="<?php echo l('Database password'); ?>"><?php echo l('Password'); ?> * : </label><input type="password" name="db_passwd" id="db_passwd" value=""/></div>
1622 </fieldset>
1623 <div id="options_btn" class="btn"><?php echo l('Options'); ?></div>
1624 <fieldset id="options">
1625 <div id="dump_only_message"><?php echo l('Only database will be restored'); ?></div>
1626 <div class="param">
1627 <div class="onoffname"><?php echo l('Clean'); ?></div>
1628 <div class="onoffswitch" title="<?php echo l('Delete backup file after restoration'); ?>">
1629 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="clean" checked>
1630 <label class="onoffswitch-label" for="clean">
1631 <span class="onoffswitch-inner"></span>
1632 <span class="onoffswitch-switch"></span>
1633 </label>
1634 </div>
1635 </div>
1636 <div id="options_files">
1637 <div class="param">
1638 <div class="onoffname"><?php echo l('Change shop email'); ?></div>
1639 <div class="onoffswitch" title="<?php echo l('You can provide a new shop contact email'); ?>">
1640 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_shop_email">
1641 <label class="onoffswitch-label" for="change_shop_email">
1642 <span class="onoffswitch-inner"></span>
1643 <span class="onoffswitch-switch"></span>
1644 </label>
1645 </div>
1646 </div>
1647 <div id="change_shop_email_value">
1648 <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>
1649 </div>
1650 <div class="param">
1651 <div class="onoffname"><?php echo l('Create super admin'); ?></div>
1652 <div class="onoffswitch" title="<?php echo l('Create a new super admin'); ?>">
1653 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="create_super_admin">
1654 <label class="onoffswitch-label" for="create_super_admin">
1655 <span class="onoffswitch-inner"></span>
1656 <span class="onoffswitch-switch"></span>
1657 </label>
1658 </div>
1659 </div>
1660 <div id="create_super_admin_value">
1661 <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>
1662 <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>
1663 <div class="param"><label for="super_admin_email_first_name" title="<?php echo l('First name'); ?>"><?php echo l('First name'); ?> * : </label><input type="text" name="super_admin_email_first_name" id="super_admin_email_first_name" value="" /></div>
1664 <div class="param"><label for="super_admin_email_last_name" title="<?php echo l('Last name'); ?>"><?php echo l('Last name'); ?> * : </label><input type="text" name="super_admin_email_last_name" id="super_admin_email_last_name" value="" /></div>
1665 </div>
1666 <div class="param">
1667 <div class="onoffname"><?php echo l('Delete customers emails'); ?></div>
1668 <div class="onoffswitch" title="<?php echo l('Delete all customers emails. Useful for dev local test shop'); ?>">
1669 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="delete_customers_emails">
1670 <label class="onoffswitch-label" for="delete_customers_emails">
1671 <span class="onoffswitch-inner"></span>
1672 <span class="onoffswitch-switch"></span>
1673 </label>
1674 </div>
1675 </div>
1676 <div class="param">
1677 <div class="onoffname"><?php echo l('Disable SSL'); ?></div>
1678 <div class="onoffswitch" title="<?php echo l('Disable SSL mode. Useful if SSL was used and no SSL is available now'); ?>">
1679 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_ssl">
1680 <label class="onoffswitch-label" for="disable_ssl">
1681 <span class="onoffswitch-inner"></span>
1682 <span class="onoffswitch-switch"></span>
1683 </label>
1684 </div>
1685 </div>
1686 <div class="param">
1687 <div class="onoffname"><?php echo l('Disable cache'); ?></div>
1688 <div class="onoffswitch" title="<?php echo l('Disable cache mode. Useful if cache was used and no cache is available now'); ?>">
1689 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_cache">
1690 <label class="onoffswitch-label" for="disable_cache">
1691 <span class="onoffswitch-inner"></span>
1692 <span class="onoffswitch-switch"></span>
1693 </label>
1694 </div>
1695 </div>
1696 <div class="param">
1697 <div class="onoffname"><?php echo l('Disable ModPagespeed'); ?></div>
1698 <div class="onoffswitch" title="<?php echo l('Disable ModPagespeed. Useful if ModPagespeed was used and it is not available now'); ?>">
1699 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_modpagespeed">
1700 <label class="onoffswitch-label" for="disable_modpagespeed">
1701 <span class="onoffswitch-inner"></span>
1702 <span class="onoffswitch-switch"></span>
1703 </label>
1704 </div>
1705 </div>
1706 <div class="param">
1707 <div class="onoffname"><?php echo l('Disable media servers'); ?></div>
1708 <div class="onoffswitch" title="<?php echo l('Disable media servers. Useful if media servers were used and there are not available now'); ?>">
1709 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_mediaservers">
1710 <label class="onoffswitch-label" for="disable_mediaservers">
1711 <span class="onoffswitch-inner"></span>
1712 <span class="onoffswitch-switch"></span>
1713 </label>
1714 </div>
1715 </div>
1716 <div class="param">
1717 <div class="onoffname"><?php echo l('Enable Mode Dev'); ?></div>
1718 <div class="onoffswitch" title="<?php echo l('Enable Mode Dev. Useful for developers'); ?>">
1719 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="enable_mode_dev">
1720 <label class="onoffswitch-label" for="enable_mode_dev">
1721 <span class="onoffswitch-inner"></span>
1722 <span class="onoffswitch-switch"></span>
1723 </label>
1724 </div>
1725 </div>
1726 <div class="param">
1727 <div class="onoffname"><?php echo l('Change table prefix'); ?></div>
1728 <div class="onoffswitch" title="<?php echo l('Change database table prefix'); ?>">
1729 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_table_prefix">
1730 <label class="onoffswitch-label" for="change_table_prefix">
1731 <span class="onoffswitch-inner"></span>
1732 <span class="onoffswitch-switch"></span>
1733 </label>
1734 </div>
1735 </div>
1736 <div id="change_table_prefix_value">
1737 <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>
1738 </div>
1739 <div class="param">
1740 <div class="onoffname"><?php echo l('Change access rights'); ?></div>
1741 <div class="onoffswitch" title="<?php echo l('Change folders and files access rights'); ?>">
1742 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="change_access_rights">
1743 <label class="onoffswitch-label" for="change_access_rights">
1744 <span class="onoffswitch-inner"></span>
1745 <span class="onoffswitch-switch"></span>
1746 </label>
1747 </div>
1748 </div>
1749 <div id="change_access_rights_value">
1750 <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>
1751 <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>
1752 </div>
1753 <div class="param">
1754 <div class="onoffname"><?php echo l('Do not restore files'); ?></div>
1755 <div class="onoffswitch" title="<?php echo l('Do not restore files. Useful for testing'); ?>">
1756 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="do_not_restore_files">
1757 <label class="onoffswitch-label" for="do_not_restore_files">
1758 <span class="onoffswitch-inner"></span>
1759 <span class="onoffswitch-switch"></span>
1760 </label>
1761 </div>
1762 </div>
1763 <div class="param">
1764 <div class="onoffname"><?php echo l('Do not restore database'); ?></div>
1765 <div class="onoffswitch" title="<?php echo l('Do not restore database. Useful for testing'); ?>">
1766 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="do_not_restore_database">
1767 <label class="onoffswitch-label" for="do_not_restore_database">
1768 <span class="onoffswitch-inner"></span>
1769 <span class="onoffswitch-switch"></span>
1770 </label>
1771 </div>
1772 </div>
1773 <div class="param">
1774 <div class="onoffname"><?php echo l('Disable "NoAutoValueOnZero" SQL mode'); ?></div>
1775 <div class="onoffswitch" title="<?php echo l('Useful if mysql is limited and cannot restore the database'); ?>">
1776 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_no_auto_value_on_zero">
1777 <label class="onoffswitch-label" for="disable_no_auto_value_on_zero">
1778 <span class="onoffswitch-inner"></span>
1779 <span class="onoffswitch-switch"></span>
1780 </label>
1781 </div>
1782 </div>
1783 <div class="param">
1784 <div class="onoffname"><?php echo l('Do not attempt to disable server timeout'); ?></div>
1785 <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.'); ?>">
1786 <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="disable_time_limit">
1787 <label class="onoffswitch-label" for="disable_time_limit">
1788 <span class="onoffswitch-inner"></span>
1789 <span class="onoffswitch-switch"></span>
1790 </label>
1791 </div>
1792 </div>
1793 </div>
1794 </fieldset>
1795 <input type="submit" id="restore" class="btn" value="<?php echo l('Start restoration'); ?>" />
1796 </form>
1797 <div id="version"><?php echo l('Nt Restoration').' '.VERSION; ?></div>
1798 <script type="text/javascript">
1799 var timer;
1800 var FINISH5 = '<?php echo substr(l('FINISH'), 0, 5); ?>';
1801 var ERROR5 = '<?php echo substr(l('Error'), 0, 5); ?>';
1802 var AJAX_SCRIPT = '?l=<?php echo $_GET['l']; ?>&';
1803
1804 $(document).ready(function()
1805 {
1806 //Hide options
1807 $('#options').hide();
1808 $('#change_table_prefix_value').hide();
1809 $('#change_access_rights_value').hide();
1810 $('#change_shop_email_value').hide();
1811 $('#create_super_admin_value').hide();
1812
1813 //Toggle options
1814 $('#options_btn').click(function(){
1815 $('#options').slideToggle();
1816 });
1817 $('#change_table_prefix').change(function(){
1818 if($(this).is(':checked')){
1819 $('#change_table_prefix_value').fadeIn();
1820 } else {
1821 $('#change_table_prefix_value').fadeOut();
1822 }
1823 });
1824 $('#change_access_rights').change(function(){
1825 if($(this).is(':checked')){
1826 $('#change_access_rights_value').fadeIn();
1827 } else {
1828 $('#change_access_rights_value').fadeOut();
1829 }
1830 });
1831 $('#change_shop_email').change(function(){
1832 if($(this).is(':checked')){
1833 $('#change_shop_email_value').fadeIn();
1834 } else {
1835 $('#change_shop_email_value').fadeOut();
1836 }
1837 });
1838 $('#create_super_admin').change(function(){
1839 if($(this).is(':checked')){
1840 $('#create_super_admin_value').fadeIn();
1841 } else {
1842 $('#create_super_admin_value').fadeOut();
1843 }
1844 });
1845
1846 //Start the restoration
1847 $('#params').bind('submit', function(event){
1848 event.preventDefault();
1849 $('#params').slideUp();
1850 $('#msg').slideDown();
1851 $('#refresh').slideDown();
1852 deletelastlog();
1853 });
1854 });
1855
1856 /*
1857 * Get last log
1858 *
1859 * @returns void
1860 */
1861 function lastlog()
1862 {
1863 clearTimeout(timer);
1864 $.getJSON(AJAX_SCRIPT + Math.round(new Date().getTime()), {lastlog:1}, showLastLog);
1865 }
1866
1867 /*
1868 * Delete last log
1869 *
1870 * @returns void
1871 */
1872 function deletelastlog()
1873 {
1874 $.getJSON(AJAX_SCRIPT + Math.round(new Date().getTime()), {deletelastlog:1}, deletelastlog_re);
1875 $('#msg').removeClass('error').addClass('ok');
1876 }
1877
1878 /*
1879 * Start last log
1880 *
1881 * @returns void
1882 */
1883 function deletelastlog_re(data)
1884 {
1885 lastlog();
1886 $.ajaxSetup({timeout: 7200000}); //Large timeout
1887 $.getJSON(AJAX_SCRIPT + Math.round(new Date().getTime()),
1888 {db_server:$('#db_server').val(),
1889 db_name:$('#db_name').val(),
1890 db_user:$('#db_user').val(),
1891 db_passwd:$('#db_passwd').val(),
1892 clean:$('#clean').is(':checked'),
1893 change_shop_email:$('#change_shop_email').is(':checked'),
1894 shop_email:$('#shop_email').val(),
1895 create_super_admin:$('#create_super_admin').is(':checked'),
1896 super_admin_email:$('#super_admin_email').val(),
1897 super_admin_password:$('#super_admin_password').val(),
1898 super_admin_email_first_name:$('#super_admin_email_first_name').val(),
1899 super_admin_email_last_name:$('#super_admin_email_last_name').val(),
1900 delete_customers_emails:$('#delete_customers_emails').is(':checked'),
1901 enable_mode_dev:$('#enable_mode_dev').is(':checked'),
1902 disable_cache:$('#disable_cache').is(':checked'),
1903 disable_modpagespeed:$('#disable_modpagespeed').is(':checked'),
1904 disable_mediaservers:$('#disable_mediaservers').is(':checked'),
1905 disable_ssl:$('#disable_ssl').is(':checked'),
1906 change_table_prefix:$('#change_table_prefix').is(':checked'),
1907 table_prefix:$('#table_prefix').val(),
1908 change_access_rights:$('#change_access_rights').is(':checked'),
1909 file_access_rights:$('#file_access_rights').val(),
1910 folder_access_rights:$('#folder_access_rights').val(),
1911 do_not_restore_files:$('#do_not_restore_files').is(':checked'),
1912 do_not_restore_database:$('#do_not_restore_database').is(':checked'),
1913 disable_no_auto_value_on_zero:$('#disable_no_auto_value_on_zero').is(':checked'),
1914 disable_time_limit:$('#disable_time_limit').is(':checked'),
1915 },
1916 showLastLog);
1917 }
1918
1919 /*
1920 * Show last log
1921 *
1922 * @returns void
1923 */
1924 function showLastLog(data)
1925 {
1926 var message = data.laslog;
1927
1928 var first = message.substr(0, 5);
1929 if(first !== FINISH5 && first !== ERROR5)
1930 timer = setTimeout('lastlog()', 1000);
1931
1932 if(first === ERROR5)
1933 {
1934 $('#msg').removeClass('ok').addClass('error');
1935 $('#params').slideDown();
1936 }
1937 if(first === FINISH5)
1938 $('#msg').addClass('finish');
1939
1940 //Display the last log
1941 $('#msg').html(message);
1942 }
1943 </script>
1944<?php
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984class NtRestore
1985{
1986 private $db_server;
1987 private $db_port;
1988 private $db_name;
1989 private $db_user;
1990 private $db_passwd;
1991 private $opt;
1992 private $backup_name;
1993 private $backup_parts;
1994 private $db;
1995 private $prefixe;
1996 private $cookie_key;
1997 private $old_domain;
1998 private $old_physical_uri;
1999 private $old_url;
2000 private $new_url;
2001 private $new_domain;
2002 private $new_physical_uri;
2003 private $file_access_rights;
2004 private $folder_access_rights;
2005 private $t;
2006 private $prestashop_version;
2007
2008 /**
2009 * Construct
2010 *
2011 * @param string $db_server Database host
2012 * @param string $db_name Database name
2013 * @param string $db_user Database user
2014 * @param string $db_passwd Database password
2015 * @param string $opt Selected options
2016 * @param bool $translations Translation array
2017 * @return void
2018 */
2019 public function __construct($db_server, $db_name, $db_user, $db_passwd, $opt, $translations)
2020 {
2021 $this->db_server = $db_server;
2022 $this->db_port = '';
2023 $posport = strpos($db_server, ':');
2024 if($posport !== false)
2025 {
2026 $this->db_server = substr($db_server, 0, $posport);
2027 $this->db_port= substr($db_server, $posport+1);
2028 }
2029 $this->db_name = $db_name;
2030 $this->db_user = $db_user;
2031 $this->db_passwd = $db_passwd;
2032 $this->opt = $opt;
2033 $this->t = $translations;
2034 $this->file_access_rights = FILE_ACCESS_RIGHTS;
2035 $this->folder_access_rights = FOLDER_ACCESS_RIGHTS;
2036 }
2037
2038 /**
2039 * Return the translation of text in the selected language
2040 *
2041 * @param string $text Text to translate
2042 * @return string Translated text
2043 */
2044 public function l($text)
2045 {
2046 if(isset($this->t[$text]))
2047 return $this->t[$text];
2048 return $text;
2049 }
2050
2051 /**
2052 * Restore a prestashop backup
2053 *
2054 * @return bool
2055 */
2056 public function restore()
2057 {
2058 global $dump_only;
2059
2060 if (!isset($_GET['disable_time_limit']) || $_GET['disable_time_limit'] != 'true') {
2061 set_time_limit(TIME_LIMIT);
2062 }
2063
2064 $this->changeAccessRights();
2065 if (!$this->dbConnect())
2066 return false;
2067 if(!$this->opt['do_not_restore_files'])
2068 {
2069 if (!$this->restoreFiles())
2070 return false;
2071 }
2072 else
2073 Tools::log($this->l('No files restoration, as wanted'));
2074 if(!$this->opt['do_not_restore_database'])
2075 {
2076 $dump_file = DUMP_FILE;
2077 if($dump_only)
2078 $dump_file = DUMP_FILE_ALONE;
2079 if (!$this->restoreDump($dump_file))
2080 return false;
2081 }
2082 else
2083 Tools::log($this->l('No database restoration, as wanted'));
2084
2085
2086 if(!$dump_only)
2087 {//Options available only for a full restoration
2088 if (!$this->updateSettings())
2089 return false;
2090 if (!$this->updateDefines())
2091 return false;
2092 if (!$this->createSuperAdmin())
2093 return false;
2094 if (!$this->updateURLConfiguration())
2095 return false;
2096 if (!$this->changeEmailConfiguration())
2097 return false;
2098 if (!$this->updateLinks())
2099 return false;
2100 if (!$this->deleteCustomersEmail())
2101 return false;
2102 if (!$this->disableSSL())
2103 return false;
2104 if (!$this->changeTablePrefix())
2105 return false;
2106 if (!$this->updateHtaccess())
2107 return false;
2108 }
2109 if (!$this->cleaning())
2110 return false;
2111
2112 Tools::log($this->l('FINISH ! Your backup was restored with success !'));
2113
2114 $this->cleaningLastFiles();
2115 return true;
2116 }
2117
2118 /**
2119 * Change access rights
2120 *
2121 * @return bool
2122 */
2123 private function changeAccessRights()
2124 {
2125 if (!$this->opt['change_access_rights'])
2126 return true;
2127
2128 $this->file_access_rights = $this->opt['file_access_rights'];
2129 $this->folder_access_rights = $this->opt['folder_access_rights'];
2130 return true;
2131 }
2132
2133 /**
2134 * Delete backup and temporary files
2135 *
2136 * @return bool
2137 */
2138 private function cleaning()
2139 {
2140 if (!$this->opt['clean'])
2141 return true;
2142
2143 Tools::fileDelete(DUMP_FILE);
2144 Tools::fileDelete(DUMP_FILE_ALONE);
2145
2146 foreach ($this->backup_parts as $part) {
2147 Tools::fileDelete($part);
2148 }
2149
2150 return true;
2151 }
2152
2153 /**
2154 * Delete logs' files and restore.php after waiting a few secondes to be sur that we don't need them anymore
2155 *
2156 * @return bool
2157 */
2158 private function cleaningLastFiles()
2159 {
2160 if (!$this->opt['clean'])
2161 return true;
2162
2163 sleep(10);
2164 Tools::fileDelete(LOG_FILE);
2165 Tools::fileDelete(LASTLOG_FILE);
2166 Tools::fileDelete(__FILE__);
2167
2168 return true;
2169 }
2170
2171 /**
2172 * Return the first backup file found
2173 *
2174 * @return string
2175 */
2176 public static function findBackup()
2177 {
2178 $backup_file = '';
2179 $backup_list = array();
2180 $backup_part = array();
2181 $matches = array();
2182 $extentions_test = array(
2183 '*.tar.bz2',
2184 '*.tar.gz',
2185 '*.tar',
2186 );
2187
2188 //Look for tar.bz2 files or tar.gz files or .tar files
2189 foreach ($extentions_test as $ext_test) {
2190 $list_files = glob($ext_test);
2191
2192 if (is_array($list_files) && isset($list_files[0])) {
2193 $backup_list = $list_files;
2194 break;
2195 }
2196 }
2197
2198 if (count($backup_list)) {
2199 rsort($backup_list);
2200 $backup_file = $backup_list[0];
2201 }
2202
2203 // Check if the file is only a part of the backup
2204 if (strpos($backup_file, '.part.') !== false) {
2205 preg_match('/(.*)\.[0-9]*\.part/', $backup_file, $matches);
2206
2207 if (isset($matches[1])) {
2208 $nb_part_max = count($backup_list);
2209
2210 for ($nb_part = 1; $nb_part <= $nb_part_max; $nb_part++) {
2211 foreach ($backup_list as $nb => $part) {
2212 if (strpos($part, $matches[1].'.'.$nb_part.'.') !== false) {
2213 $backup_part[$nb_part] = $part;
2214 unset($backup_list[$nb]);
2215 }
2216 }
2217 }
2218 }
2219 }
2220
2221 if (!count($backup_part)) {
2222 $backup_part[1] = $backup_file;
2223 }
2224
2225 return $backup_part;
2226 }
2227
2228 /**
2229 * Decompress backup and restore files
2230 *
2231 * @return bool
2232 */
2233 private function restoreFiles()
2234 {
2235 Tools::log($this->l('Restoring backup...'));
2236 //Find backup
2237 $this->backup_parts = self::findBackup();
2238 $this->backup_name = $this->backup_parts[1];
2239 if (!$this->backup_name)
2240 {
2241 Tools::log($this->l('Error while restoring files : No backup file found'));
2242 return false;
2243 }
2244
2245 $delete_tar = true;
2246 $pathinfo = array();
2247
2248 if(strtolower(substr($this->backup_name, -3)) !== 'tar')
2249 {
2250 //PHP builtin method failed on file > 2 Gb so we use our own method working with small and big files
2251 Tools::log($this->l('Decompressing backup...'));
2252 if(strtolower(substr($this->backup_name, -3)) === 'bz2')
2253 {//BZ2 file
2254 foreach ($this->backup_parts as $nb_part => $part) {
2255 if (!$this->unbz($part, '.'))
2256 return false;
2257
2258 $pathinfo[$nb_part] = pathinfo($part, PATHINFO_FILENAME);
2259 }
2260 }
2261 else
2262 {//GZ file
2263 foreach ($this->backup_parts as $nb_part => $part) {
2264 if (!$this->ungz($part, '.'))
2265 return false;
2266
2267 $pathinfo[$nb_part] = pathinfo($part, PATHINFO_FILENAME);
2268 }
2269 }
2270 }
2271 else
2272 {
2273 foreach ($this->backup_parts as $nb_part => $part) {
2274 $pathinfo[$nb_part] = $part;
2275 }
2276
2277 // If we do not want to clean, we don't delete the tar file
2278 if (!$this->opt['clean'])
2279 $delete_tar = false;
2280 }
2281
2282 Tools::log($this->l('Restoring files...'));
2283
2284 $total_part = count($pathinfo);
2285 foreach ($pathinfo as $nb_part => $path) {
2286 if (!$this->untar($path, './', $nb_part, $total_part))
2287 return false;
2288
2289 if ($delete_tar)
2290 Tools::fileDelete($path);
2291 }
2292
2293 return true;
2294 }
2295
2296 /**
2297 * Connect to the database
2298 *
2299 * @return bool
2300 */
2301 private function dbConnect()
2302 {
2303 $this->db = new Dbn($this->t);
2304
2305 if (!$this->db->connect($this->db_name, $this->db_user, $this->db_passwd, $this->db_server, $this->db_port))
2306 {
2307 Tools::log($this->l('Error : Unable to connect to the database ').$this->db->getError());
2308 return false;
2309 }
2310 return true;
2311 }
2312
2313 /**
2314 * Restore dump
2315 *
2316 * @return bool
2317 */
2318 private function restoreDump($dump_file = DUMP_FILE)
2319 {
2320 Tools::log($this->l('Restoring database...'));
2321 if (!$this->db->restore($dump_file))
2322 {
2323 Tools::log($this->l('Error while restoring database : ').$this->db->getError());
2324 return false;
2325 }
2326 return true;
2327 }
2328
2329 /**
2330 * Update domain information in database
2331 *
2332 * @return bool
2333 */
2334 private function updateURLConfiguration()
2335 {
2336 Tools::log($this->l('Updating URL configuration...'));
2337 //Find old domain information
2338 $req = 'SELECT domain, physical_uri
2339 FROM `'.$this->prefixe.'shop_url`
2340 WHERE main = 1';
2341 $res = $this->db->query($req);
2342 if ($res === false)
2343 {
2344 Tools::log($this->l('Reconnexion : ').$this->db->getError());
2345 //Tools::log($this->l('Error while updating URL configuration : ').$this->db->getError());
2346 if(strpos($this->db->getError(), 'server has gone away') !== false)
2347 {
2348 if (!$this->dbConnect())
2349 return false;
2350 $res = $this->db->query($req);
2351 if ($res === false)
2352 {
2353 Tools::log($this->l('Error while updating URL configuration : ').$this->db->getError());
2354 return false;
2355 }
2356 }
2357 }
2358 $this->old_domain = $res[0]['domain'];
2359 $this->old_physical_uri = $res[0]['physical_uri'];
2360 $this->old_url = $this->old_domain.rtrim($this->old_physical_uri, '/');
2361
2362 //Find new domain information
2363 $this->new_url = Tools::currentDirectoryURL(); //Without http://
2364 $slash = strpos($this->new_url, '/');
2365 if ($slash !== false)
2366 {
2367 $this->new_domain = substr($this->new_url, 0, $slash);
2368 $this->new_physical_uri = substr($this->new_url, $slash).'/';
2369 }
2370 else
2371 {
2372 $this->new_domain = $this->new_url;
2373 $this->new_physical_uri = '/';
2374 }
2375
2376 //Update URL configuration in database
2377 $req = 'UPDATE `'.$this->prefixe.'configuration` SET value = replace(value, '.$this->db->q($this->old_domain).', '.$this->db->q($this->new_domain).');
2378 UPDATE `'.$this->prefixe.'shop_url` SET domain = '.$this->db->q($this->new_domain).', domain_ssl = '.$this->db->q($this->new_domain).' WHERE main = 1;
2379 UPDATE `'.$this->prefixe.'shop_url` SET physical_uri = '.$this->db->q($this->new_physical_uri).' WHERE main = 1;';
2380 if (!$this->db->exec($req))
2381 {
2382 Tools::log($this->l('Error while updating URL configuration : ').$this->db->getError());
2383 return false;
2384 }
2385
2386 return true;
2387 }
2388
2389 /**
2390 * Delete Customers Email. Useful for testing with insurance that no email will be sent to customers
2391 *
2392 * @return bool
2393 */
2394 private function deleteCustomersEmail()
2395 {
2396 if (!$this->opt['delete_customers_emails'])
2397 return true;
2398
2399 Tools::log($this->l('Deleting customers email...'));
2400
2401 //Delete from customer table
2402 $req = 'UPDATE `'.$this->prefixe.'customer`
2403 SET email = \'\'';
2404 if (!$this->db->exec($req))
2405 {
2406 Tools::log($this->l('Error while deleting customers emails : ').$this->db->getError());
2407 return false;
2408 }
2409
2410 //Delete from mailalert module table if exists
2411 if($this->table_exists($this->prefixe.'mailalert_customer_oos'))
2412 {
2413 $req = 'DELETE FROM `'.$this->prefixe.'mailalert_customer_oos`';
2414 if (!$this->db->exec($req))
2415 {
2416 Tools::log($this->l('Error while deleting mailalert customers emails : ').$this->db->getError());
2417 return false;
2418 }
2419 }
2420
2421
2422 return true;
2423 }
2424
2425 /**
2426 * Return true if the table exists.
2427 *
2428 * @return bool
2429 */
2430 private function table_exists($table)
2431 {
2432 $res = $this->db->query('SHOW TABLES WHERE Tables_in_'.$this->db_name.' = '.$this->db->q($table));
2433 if ($res === false)
2434 {
2435 Tools::log($this->l('Error while checking existence of table ').$table.' : '.$this->db->getError());
2436 return false;
2437 }
2438
2439 return (count($res) > 0);
2440 }
2441
2442 /**
2443 * Disable SSL. Useful if the new environment do not support SSL but SSL was enabled in the backup
2444 *
2445 * @return bool
2446 */
2447 private function disableSSL()
2448 {
2449 if (!$this->opt['disable_ssl'])
2450 return true;
2451
2452 Tools::log($this->l('Disabling SSL...'));
2453
2454 $req = 'UPDATE `'.$this->prefixe.'configuration`
2455 SET value = 0
2456 WHERE name = \'PS_SSL_ENABLED\'';
2457 if (!$this->db->exec($req))
2458 {
2459 Tools::log($this->l('Error while disabling SSL : ').$this->db->getError());
2460 return false;
2461 }
2462
2463 return true;
2464 }
2465
2466 /**
2467 * Disable media servers. Useful if no media servers are available now but media servers were used in the backup
2468 *
2469 * @return bool
2470 */
2471 private function disableMediaServers()
2472 {
2473 if (!$this->opt['disable_mediaservers'])
2474 return true;
2475
2476 Tools::log($this->l('Disabling media servers...'));
2477
2478 $req = 'UPDATE `'.$this->prefixe.'configuration` SET value = 0 WHERE name = \'PS_MEDIA_SERVERS\';
2479 UPDATE `'.$this->prefixe.'configuration` SET value = \'\' WHERE name = \'PS_MEDIA_SERVER_1\';
2480 UPDATE `'.$this->prefixe.'configuration` SET value = \'\' WHERE name = \'PS_MEDIA_SERVER_2\';
2481 UPDATE `'.$this->prefixe.'configuration` SET value = \'\' WHERE name = \'PS_MEDIA_SERVER_3\';';
2482 if (!$this->db->exec($req))
2483 {
2484 Tools::log($this->l('Error while disabling media servers : ').$this->db->getError());
2485 return false;
2486 }
2487
2488 return true;
2489 }
2490
2491 /**
2492 * Change Table prefix
2493 *
2494 * @return bool
2495 */
2496 private function changeTablePrefix()
2497 {
2498 if (!$this->opt['change_table_prefix'])
2499 return true;
2500
2501 Tools::log($this->l('Changing table prefix...'));
2502
2503 //Check if old prefix is different from the new one
2504 if($this->prefixe == $this->opt['table_prefix'])
2505 return true;
2506
2507 //Search for all tables name
2508 $res = $this->db->query('SHOW TABLES');
2509 if ($res === false || !isset($res[0]))
2510 {
2511 Tools::log($this->l('Error while changing table prefix : ').$this->db->getError());
2512 return false;
2513 }
2514
2515 //Build rename requests
2516 $req = '';
2517 $old_prefix_length = strlen($this->prefixe);
2518 foreach ($res as $table)
2519 {
2520 $table_name = $table['Tables_in_'.$this->db_name];
2521 if($this->prefixe != '')
2522 {//There is an old prefix
2523 if(substr($table_name, 0, $old_prefix_length) !== $this->prefixe)
2524 continue; //This table do not have the old prefix
2525 //Find table name without prefix
2526 $table_name = substr($table_name, $old_prefix_length, strlen($table_name) - $old_prefix_length);
2527 }
2528 $req .= 'DROP TABLE IF EXISTS '.$this->opt['table_prefix'].$table_name.';
2529 RENAME TABLE '.$table['Tables_in_'.$this->db_name].' TO '.$this->opt['table_prefix'].$table_name.';'."\n";
2530 }
2531
2532 //Rename all tables
2533 if (!$this->db->exec($req))
2534 {
2535 Tools::log($this->l('Error while changing table prefix : ').$this->db->getError());
2536 return false;
2537 }
2538
2539 //Save new prefix
2540 $this->prefixe = $this->opt['table_prefix'];
2541 $this->updateSettings();
2542
2543 return true;
2544 }
2545
2546 /**
2547 * Create a new super admin
2548 *
2549 * @return bool
2550 */
2551 private function createSuperAdmin()
2552 {
2553 if (!$this->opt['create_super_admin'])
2554 return true;
2555
2556 Tools::log($this->l('Creating super admin...'));
2557
2558 //Compute password
2559 $password = md5($this->cookie_key.$this->opt['super_admin_password']);
2560
2561 //Check if super admin email already exists
2562 $id_employee = $this->getEmployeeByEmail($this->opt['super_admin_email']);
2563 if($id_employee === false)
2564 return false;
2565
2566 if($id_employee != 0)
2567 {//Employee already exists
2568 return $this->updateSuperAdminPassword($id_employee, $password);
2569 }
2570
2571 //Employee do not exist, we need to create it
2572
2573 //Find likely understood language
2574 $id_lang = $this->getLikelyUnderstoodLanguage();
2575 if(!$id_lang)
2576 $id_lang = 1;
2577
2578 //Create employee
2579 $req = 'INSERT INTO `'.$this->prefixe.'employee`
2580 (id_profile, id_lang, lastname, firstname, email, passwd, active)
2581 VALUES (1,
2582 '.$this->db->q($id_lang).',
2583 '.$this->db->q($this->opt['super_admin_email_last_name']).',
2584 '.$this->db->q($this->opt['super_admin_email_first_name']).',
2585 '.$this->db->q($this->opt['super_admin_email']).',
2586 '.$this->db->q($password).',
2587 1);';
2588 if (!$this->db->exec($req))
2589 {
2590 Tools::log($this->l('Error while creating super admin : ').$this->db->getError());
2591 return false;
2592 }
2593
2594 return true;
2595 }
2596
2597 /**
2598 * Get employee id by email
2599 *
2600 * @param string $email Employee email
2601 * @return int. ID of the employee. 0 if not found. False on error
2602 */
2603 private function getEmployeeByEmail($email)
2604 {
2605 $res = $this->db->query('SELECT id_employee
2606 FROM `'.$this->prefixe.'employee`
2607 WHERE email = '.$this->db->q($email));
2608 if ($res === false)
2609 {
2610 Tools::log($this->l('Error while getting employee by email : ').$this->db->getError());
2611 return false;
2612 }
2613
2614 if(isset($res[0]))
2615 {//Employee exists
2616 return $res[0]['id_employee'];
2617 }
2618
2619 //Employee does not exists
2620 return 0;
2621 }
2622
2623 /**
2624 * Update super admin password in database
2625 *
2626 * @param string $id_employee Employee id
2627 * @param string $password New password
2628 * @return bool
2629 */
2630 private function updateSuperAdminPassword($id_employee, $password)
2631 {
2632 $req = 'UPDATE `'.$this->prefixe.'employee`
2633 SET id_profile = 1,
2634 active = 1,
2635 lastname = '.$this->db->q($this->opt['super_admin_email_last_name']).',
2636 firstname = '.$this->db->q($this->opt['super_admin_email_first_name']).',
2637 passwd = '.$this->db->q($password).'
2638 WHERE id_employee = '.$this->db->q($id_employee);
2639 if (!$this->db->exec($req))
2640 {
2641 Tools::log($this->l('Error while updating super admin password : ').$this->db->getError());
2642 return false;
2643 }
2644 return true;
2645 }
2646
2647 /**
2648 * Get likely understood language
2649 *
2650 * @return int. ID of the language. False on error
2651 */
2652 private function getLikelyUnderstoodLanguage()
2653 {
2654 $res = $this->db->query('SELECT MIN(id_lang) AS id
2655 FROM `'.$this->prefixe.'lang`
2656 WHERE active = 1');
2657 if ($res === false)
2658 {
2659 Tools::log($this->l('Error while creating super admin : ').$this->db->getError());
2660 $id_lang = 1;
2661 }
2662 $id_lang = $res[0]['id'];
2663
2664 $res = $this->db->query('SELECT MIN(id_lang) AS id
2665 FROM `'.$this->prefixe.'lang`
2666 WHERE active = 1');
2667 if ($res === false)
2668 {
2669 Tools::log($this->l('Error while getting likely understood language : ').$this->db->getError());
2670 return false;
2671 }
2672
2673 if(isset($res[0]))
2674 return $res[0]['id'];
2675
2676 return 0;
2677 }
2678
2679 /**
2680 * Change contact email in database
2681 *
2682 * @return bool
2683 */
2684 private function changeEmailConfiguration()
2685 {
2686 if (!$this->opt['change_shop_email'])
2687 return true;
2688
2689 Tools::log($this->l('Changing email shop...'));
2690
2691 //Retrieve old shop email
2692 $res = $this->db->query('SELECT value
2693 FROM `'.$this->prefixe.'configuration`
2694 WHERE name = '.$this->db->q('PS_SHOP_EMAIL'));
2695 if ($res === false)
2696 {
2697 Tools::log($this->l('Error while changing email shop : ').$this->db->getError());
2698 return false;
2699 }
2700
2701 $old_email = $res[0]['value'];
2702
2703 $req = 'UPDATE `'.$this->prefixe.'configuration` SET value = replace(value, '.$this->db->q($old_email).', '.$this->db->q($this->opt['shop_email']).');
2704 UPDATE `'.$this->prefixe.'contact` SET email = replace(email, '.$this->db->q($old_email).', '.$this->db->q($this->opt['shop_email']).');';
2705 if (!$this->db->exec($req))
2706 {
2707 Tools::log($this->l('Error while changing email shop : ').$this->db->getError());
2708 return false;
2709 }
2710
2711 return true;
2712 }
2713
2714 /**
2715 * Update settings file
2716 *
2717 * @return bool
2718 */
2719 private function updateSettings()
2720 {
2721 $sets = file(SETTINGS_FILE);
2722 if(strpos($sets[1], '//@deprecated 1.7') !== false)
2723 $settings = SETTINGS_FILE_17;
2724 else
2725 $settings = SETTINGS_FILE;
2726
2727 Tools::log($this->l('Updating settings...'));
2728 if (!file_exists($settings))
2729 {
2730 Tools::log($this->l('Error while updating settings, settings file does not exist'));
2731 return false;
2732 }
2733
2734 $conf = '';
2735 if (($file = fopen($settings, 'r')) === false)
2736 {
2737 Tools::log($this->l('Error while updating settings, unable to read settings file'));
2738 return false;
2739 }
2740 //File is open for reading
2741 while (!feof($file))
2742 {//Read each line of the file
2743 $line = fgets($file);
2744
2745 if($settings == SETTINGS_FILE_17)
2746 {//Prestashop >= 1.7
2747 if (strpos($line, "'database_host'") !== false)
2748 $line = " 'database_host' => '".$this->db_server."',"."\n";
2749 if (strpos($line, "'database_port'") !== false)
2750 $line = " 'database_port' => '".$this->db_port."',"."\n";
2751 if (strpos($line, "'database_name'") !== false)
2752 $line = " 'database_name' => '".$this->db_name."',"."\n";
2753 if (strpos($line, "'database_user'") !== false)
2754 $line = " 'database_user' => '".$this->db_user."',"."\n";
2755 if (strpos($line, "'database_password'") !== false)
2756 $line = " 'database_password' => '".$this->db_passwd."',"."\n";
2757 if (strpos($line, "'database_prefix'") !== false)
2758 {//Get or set prefix value
2759 if($this->prefixe == '')
2760 $this->prefixe = substr($line, 26, strpos($line, "'", 26) - 26);
2761 else
2762 $line = " 'database_prefix' => '".$this->prefixe."',"."\n";
2763 }
2764 if (strpos($line, "'cookie_key'") !== false)
2765 $this->cookie_key = substr($line, 21, strpos($line, "'", 21) - 21);
2766 if (strpos($line, "'ps_cache_enable'") !== false && $this->opt['disable_cache'])
2767 $line = " 'ps_cache_enable' => false,"."\n";
2768 }
2769 else
2770 {//Prestashop < 1.7
2771 if (strpos($line, "'_DB_SERVER_'") !== false)
2772 $line = "define('_DB_SERVER_', '".$this->db_server."');"."\n";
2773 if (strpos($line, "'_DB_NAME_'") !== false)
2774 $line = "define('_DB_NAME_', '".$this->db_name."');"."\n";
2775 if (strpos($line, "'_DB_USER_'") !== false)
2776 $line = "define('_DB_USER_', '".$this->db_user."');"."\n";
2777 if (strpos($line, "'_DB_PASSWD_'") !== false)
2778 $line = "define('_DB_PASSWD_', '".$this->db_passwd."');"."\n";
2779 if (strpos($line, "'_DB_PREFIX_'") !== false)
2780 {//Get or set prefix value
2781 if($this->prefixe == '')
2782 $this->prefixe = substr($line, 23, strpos($line, "'", 23) - 23);
2783 else
2784 $line = "define('_DB_PREFIX_', '".$this->prefixe."');"."\n";
2785 }
2786 if (strpos($line, "'_COOKIE_KEY_'") !== false)
2787 $this->cookie_key = substr($line, 24, strpos($line, "'", 24) - 24);
2788 if (strpos($line, "'_PS_CACHE_ENABLED_'") !== false && $this->opt['disable_cache'])
2789 $line = "define('_PS_CACHE_ENABLED_', '0');"."\n";
2790 }
2791 $conf .= $line;
2792 }
2793 fclose($file);
2794
2795 //Saving settings
2796 if (file_put_contents($settings, $conf) === false)
2797 {
2798 Tools::log($this->l('Error while updating settings, unable to save settings file'));
2799 return false;
2800 }
2801
2802 return true;
2803 }
2804
2805 /**
2806 * Update defines file
2807 *
2808 * @return bool
2809 */
2810 private function updateDefines()
2811 {
2812 if(!$this->opt['enable_mode_dev'])
2813 return true;
2814
2815 Tools::log($this->l('Updating defines...'));
2816 if (!file_exists(DEFINES_FILE))
2817 {
2818 Tools::log($this->l('Error while updating defines, defines file does not exist'));
2819 return false;
2820 }
2821
2822 $conf = '';
2823 if (($file = fopen(DEFINES_FILE, 'r')) === false)
2824 {
2825 Tools::log($this->l('Error while updating defines, unable to read defines file'));
2826 return false;
2827 }
2828 //File is open for reading
2829 while (!feof($file))
2830 {//Read each line of the file
2831 $line = fgets($file);
2832 if (strpos($line, "define('_PS_MODE_DEV_'") !== false)
2833 $line = "define('_PS_MODE_DEV_', ".Tools::tf($this->opt['enable_mode_dev']).");"."\n";
2834 $conf .= $line;
2835 }
2836 fclose($file);
2837
2838 //Saving defines
2839 if (file_put_contents(DEFINES_FILE, $conf) === false)
2840 {
2841 Tools::log($this->l('Error while updating defines, unable to save defines file'));
2842 return false;
2843 }
2844
2845 return true;
2846 }
2847
2848 /**
2849 * Return an array containing all virtual URI
2850 *
2851 * @return array
2852 */
2853 public function findVirtualURI()
2854 {
2855 //Retrieve all virtual URI
2856 $res = $this->db->query('SELECT virtual_uri
2857 FROM `'.$this->prefixe.'shop_url`
2858 WHERE virtual_uri <> \'\'');
2859 if ($res === false)
2860 {
2861 Tools::log($this->l('Error while retrieving virtual uri : ').$this->db->getError());
2862 return false;
2863 }
2864 return $res;
2865 }
2866
2867 /**
2868 * Update htaccess file
2869 *
2870 * @return bool
2871 */
2872 private function updateHtaccess()
2873 {
2874 Tools::log($this->l('Updating .htaccess file...'));
2875
2876 if (!file_exists(HTACCESS_FILE) && !file_exists(HTACCESS_NTBR_FILE))
2877 {
2878 Tools::log($this->l('Error while updating .htaccess file, .htaccess file does not exist'));
2879 return false;
2880 }
2881
2882 if (file_exists(HTACCESS_FILE))
2883 $htaccess = HTACCESS_FILE;
2884 else
2885 $htaccess = HTACCESS_NTBR_FILE;
2886
2887 $conf = '';
2888 if (($file = fopen($htaccess, 'r')) === false)
2889 {
2890 Tools::log($this->l('Error while updating .htaccess file, unable to read .htaccess file'));
2891 return false;
2892 }
2893
2894 $shops_uri = $this->findVirtualURI();
2895
2896 //File is open for reading
2897 while (!feof($file))
2898 {//Read each line of the file
2899 $line = fgets($file);
2900 //Correct bad lines
2901 if (strpos($line, 'RewriteCond %{HTTP_HOST} ^'.$this->old_url.'$') !== false)
2902 $line = '';
2903 //Change base uri
2904 if (strpos($line, 'RewriteRule . - [E=REWRITEBASE:'.$this->old_physical_uri.']') !== false)
2905 $line = 'RewriteRule . - [E=REWRITEBASE:'.$this->new_physical_uri.']'."\n";
2906 if (strpos($line, 'ErrorDocument 404 '.$this->old_physical_uri.'index.php?controller=404') !== false)
2907 $line = 'ErrorDocument 404 '.$this->new_physical_uri.'index.php?controller=404'."\n";
2908 //Replace all occurences of old URI and URL
2909 $line = str_replace($this->old_url, $this->new_url, $line);
2910 //Virtual URI
2911 foreach($shops_uri as $shop_uri)
2912 {
2913 $virtual_uri_ws = rtrim($shop_uri['virtual_uri'], '/');
2914 if (strpos($line, 'RewriteRule ^'.$virtual_uri_ws.'$ '.$this->old_physical_uri.$shop_uri['virtual_uri'].' [L,R]') !== false)
2915 $line = 'RewriteRule ^'.$virtual_uri_ws.'$ '.$this->new_physical_uri.$shop_uri['virtual_uri'].' [L,R]'."\n";
2916 if (strpos($line, 'RewriteRule ^'.$virtual_uri_ws.'/(.*) '.$this->old_physical_uri.'$1 [L]') !== false)
2917 $line = 'RewriteRule ^'.$virtual_uri_ws.'/(.*) '.$this->new_physical_uri.'$1 [L]'."\n";
2918 }
2919 //Disabling ModPagespeed
2920 if ($this->opt['disable_modpagespeed'] && strpos($line, 'ModPagespeed') !== false)
2921 $line = '#'.$line;
2922
2923 $conf .= $line;
2924 }
2925 fclose($file);
2926
2927 //Saving .htaccess file
2928 if (file_put_contents($htaccess, $conf) === false)
2929 {
2930 Tools::log($this->l('Error while updating .htaccess file, unable to save .htaccess file'));
2931 return false;
2932 }
2933
2934 //Rename htaccess if needed
2935 if (!file_exists(HTACCESS_FILE))
2936 {//There must be a .ntbr htaccess file
2937 if (!rename(HTACCESS_NTBR_FILE, HTACCESS_FILE))
2938 {
2939 Tools::log($this->l('Error while renaming .htaccess file, please check file access rigth'));
2940 return false;
2941 }
2942 }
2943
2944 return true;
2945 }
2946
2947 /**
2948 * Return the maximal database field length
2949 *
2950 * @param string $type Type information
2951 * @return int Maximal type length or 0 if unlimited
2952 */
2953 private function maximalLength($type)
2954 {
2955 $pos = strpos($type, '(');
2956 if ($pos === false)
2957 return 0;
2958 return (int)substr($type, $pos + 1, strpos($type, ')', $pos));
2959 }
2960
2961 /**
2962 * Update links everywhere in database
2963 *
2964 * @return bool
2965 */
2966 private function updateLinks()
2967 {
2968 Tools::log($this->l('Updating links...'));
2969 //List all tables of the database
2970 $res_tables = $this->db->query('SHOW TABLES');
2971 if ($res_tables === false)
2972 {
2973 Tools::log($this->l('Error while updating links : ').$this->db->getError());
2974 return false;
2975 }
2976
2977 foreach ($res_tables as $table)
2978 {
2979 $old_length = strlen($this->old_url);
2980 $new_length = strlen($this->new_url);
2981
2982 //List all columns of the table
2983 $current_table = $table['Tables_in_'.$this->db_name];
2984 if ($current_table == '')
2985 continue;
2986 $res_columns = $this->db->query('SHOW COLUMNS
2987 FROM `'.$current_table."`
2988 WHERE Type LIKE 'varchar%'
2989 OR Type LIKE 'TINYTEXT%'
2990 OR Type LIKE 'TEXT%'
2991 OR Type LIKE 'MEDIUMTEXT%'
2992 OR Type LIKE 'LONGTEXT%';");
2993 if ($res_columns === false)
2994 {
2995 Tools::log($this->l('Error while updating links : ').$this->db->getError());
2996 return false;
2997 }
2998
2999 foreach ($res_columns as $column)
3000 {
3001 //Replace URL in the field
3002 $current_column = $column['Field'];
3003
3004 //Detect if this column can contains links
3005 $max_length = $this->maximalLength($column['Type']);
3006 if ($max_length != 0 && ($old_length > $max_length || $new_length > $max_length))
3007 continue;
3008
3009 //Detect if this column is a key
3010 if ($column['Key'])
3011 continue;
3012
3013 if($max_length != 0)
3014 {//Column size is limited
3015 $req_update = 'UPDATE `'.$current_table.'`
3016 SET `'.$current_column.'` = LEFT(REPLACE(`'.$current_column.'`,
3017 '.$this->db->q($this->old_url).',
3018 '.$this->db->q($this->new_url).'),'.$max_length.')';
3019 }
3020 else
3021 {//No size limit
3022 $req_update = 'UPDATE `'.$current_table.'`
3023 SET `'.$current_column.'` = REPLACE(`'.$current_column.'`,
3024 '.$this->db->q($this->old_url).',
3025 '.$this->db->q($this->new_url).')';
3026 }
3027
3028 if (!$this->db->exec($req_update))
3029 {
3030 Tools::log($this->l('Error while updating links : ').$this->db->getError());
3031 return false;
3032 }
3033 }
3034 }
3035
3036 return true;
3037 }
3038
3039 /**
3040 * Decompress a .gz file
3041 *
3042 * @param string $path GZ file path
3043 * @param string $destination Destination path
3044 * @return bool
3045 */
3046 private function ungz($path, $destination)
3047 {
3048 $decompressed_file = str_replace('.gz', '', $path);
3049
3050 //Open gz file
3051 if (($gz_file = gzopen($path, 'rb')) === false)
3052 return false;
3053
3054 //Create decompressed file
3055 if (($decompressed_file = fopen($destination.'/'.$decompressed_file, 'wb')) === false)
3056 return false;
3057
3058 //Write decompressed data, 1 Mb each time
3059 while (!gzeof($gz_file))
3060 {
3061 if ((fwrite($decompressed_file, gzread($gz_file, 1048576))) === false)
3062 return false;
3063 }
3064
3065 //Close files
3066 if (!fclose($decompressed_file))
3067 return false;
3068 if (!gzclose($gz_file))
3069 return false;
3070
3071 return true;
3072 }
3073
3074 /**
3075 * Decompress a .bz2 file
3076 *
3077 * @param string $path BZ2 file path
3078 * @param string $destination Destination path
3079 * @return bool
3080 */
3081 private function unbz($path, $destination)
3082 {
3083 $decompressed_file = str_replace('.bz2', '', $path);
3084
3085 //Open bz file
3086 if (($bz_file = bzopen($path, 'r')) === false)
3087 return false;
3088
3089 //Create decompressed file
3090 if (($decompressed_file = fopen($destination.'/'.$decompressed_file, 'w')) === false)
3091 return false;
3092
3093 //Write decompressed data, 1 Mb each time
3094 do {
3095 $data = bzread($bz_file, 1048576);
3096 if($data !== false)
3097 {
3098 if ((fwrite($decompressed_file, $data)) === false)
3099 return false;
3100 }
3101 }
3102 while($data);
3103
3104 //Close files
3105 if (!fclose($decompressed_file))
3106 return false;
3107 if (!bzclose($bz_file))
3108 return false;
3109
3110 return true;
3111 }
3112
3113 /**
3114 * Extract files from a TAR file (even for file > 2 Gb)
3115 * Basic specification : https://www.gnu.org/software/tar/manual/html_node/Standard.html
3116 *
3117 * @param string $path Tar file path
3118 * @param string $destination Destination path
3119 * @return bool
3120 */
3121 private function untar($path, $destination = './', $nb_part = 1, $total_part = 1)
3122 {
3123 if (!file_exists($path))
3124 {
3125 Tools::log($this->l('Error while restoring files, tar file does not exist'));
3126 return false;
3127 }
3128
3129 $filesize = Tools::getFileSize($path);
3130 if ($filesize < 2048)
3131 {//A valid tar file should contains at least 4 blocks of 512 bytes
3132 Tools::log($this->l('Error while restoring files, tar file is not correct'));
3133 return false;
3134 }
3135
3136 //Destination path need a trailing slash
3137 $destination = Tools::trailingSlash($destination);
3138
3139 if (!($file = fopen($path, 'rb')))
3140 {
3141 Tools::log($this->l('Error while restoring files, unable to open tar file'));
3142 return false;
3143 }
3144
3145 $done_size = 0;
3146 $old_percent = 0;
3147 $name = '';
3148 if (($block = fread($file, 512)) === false)
3149 {
3150 Tools::log($this->l('Error while restoring files, unable to read tar file'));
3151 return false;
3152 }
3153 while (!feof($file) || $done_size < ($filesize - 1024))
3154 {//Read header
3155 $done_size += 512;
3156 $header = array();
3157 $header['name'] = trim(substr($block, 0, 100));
3158 $header['mode'] = trim(substr($block, 103, 4));
3159 $header['uid'] = (int)substr($block, 108, 7);
3160 $header['gid'] = (int)substr($block, 116, 7);
3161 $header['size'] = octdec(substr($block, 124, 11));
3162 $header['mtime'] = octdec(substr($block, 136, 11));
3163 $header['chksum'] = octdec(substr($block, 148, 7));
3164 $header['typeflag'] = octdec(substr($block, 156, 1));
3165 $header['linkname'] = trim(substr($block, 157, 99));
3166 $header['magic'] = trim(substr($block, 257, 5));
3167 $header['version'] = trim(substr($block, 263, 2));
3168 $header['uname'] = trim(substr($block, 265, 31));
3169 $header['gname'] = trim(substr($block, 297, 31));
3170 $header['devmajor'] = trim(substr($block, 329, 8));
3171 $header['devminor'] = trim(substr($block, 337, 8));
3172 $header['prefix'] = trim(substr($block, 345, 155));
3173
3174 if ($header['name'] == '././@LongLink')
3175 {//It's a file with a long name, name is stored in next block
3176 $name = '';
3177 $size = 0;
3178 while ($size < $header['size'])
3179 {//Read data
3180 if (($block = fread($file, 512)) === false)
3181 {
3182 Tools::log($this->l('Error while restoring files, unable to read name file in tar file'));
3183 fclose($file);
3184 return false;
3185 }
3186 if (feof($file))
3187 {
3188 Tools::log($this->l('Error while restoring files, tar file truncated'));
3189 fclose($file);
3190 return false;
3191 }
3192 $size += 512;
3193 $done_size += 512;
3194 //The last block is padded with zero if too large
3195 if ($size > $header['size'])
3196 $block = substr($block, 0, 512 - ($size - $header['size']) - 1); //-1 to remove last nul character
3197 //Get Name
3198 $name .= $block;
3199 }
3200
3201 //Remove last nul character
3202 $name = substr($name, 0, strlen($name));
3203 //Read next 512 bytes
3204 $block = fread($file, 512);
3205 continue;
3206 }
3207
3208 //In ustar format archive, long file names are stored half in prefix header and half in name header
3209 if ($header['magic'] == 'ustar' && $header['prefix'] != '')
3210 $name = $destination.$header['prefix'].'/'.$header['name'];
3211
3212 if ($header['typeflag'] == 5 && $header['name'] != '././@LongLink')
3213 {//It's a directory
3214 if ($name == '')
3215 $name = $destination.$header['name'];
3216 $new_directory = $name;
3217 $name = '';
3218
3219 //Create complete destination directory
3220 //Tools::directoryCreate($new_directory, $header['mode']);
3221 Tools::directoryCreate($new_directory, octdec($this->folder_access_rights));
3222
3223 //Read next 512 bytes
3224 $block = fread($file, 512);
3225 continue;
3226 }
3227
3228 if ($header['typeflag'] == 0 && $header['name'] != '././@LongLink')
3229 {//It's a regular file
3230 if ($name == '')
3231 $name = $destination.$header['name'];
3232 $new_file = $name;
3233 $name = '';
3234
3235 //Create complete destination directory
3236 if(!Tools::directoryCreate(dirname($new_file), octdec($this->folder_access_rights)))
3237 {
3238 Tools::log($this->l('Error while restoring files, unable to create directory ').dirname($new_file));
3239 return false;
3240 }
3241
3242 if($new_file == './')
3243 {//No size file
3244 $block = fread($file, 512);
3245 continue;
3246 }
3247
3248 if($new_file == './.htaccess')
3249 {//Temporary rename htaccess file so no access problem
3250 $new_file = './'.HTACCESS_NTBR_FILE;
3251 }
3252
3253 //Create new file
3254 if (($file_write = fopen($new_file, 'wb')) === false)
3255 {
3256 Tools::log($this->l('Error while restoring files, unable to create file ').$new_file);
3257 fclose($file);
3258 return false;
3259 }
3260
3261 $size = 0;
3262 while ($size < $header['size'])
3263 {//Read data
3264 if (($block = fread($file, 512)) === false)
3265 {
3266 Tools::log($this->l('Error while restoring files, unable to read data in tar file'));
3267 fclose($file_write);
3268 fclose($file);
3269 return false;
3270 }
3271 if (feof($file))
3272 {
3273 Tools::log($this->l('Error while restoring files, tar file truncated'));
3274 fclose($file_write);
3275 fclose($file);
3276 return false;
3277 }
3278 $size += 512;
3279 $done_size += 512;
3280
3281 //The last block is padded with zero if too large
3282 if ($size > $header['size'])
3283 $block = substr($block, 0, 512 - ($size - $header['size']));
3284
3285 //Write data
3286 if (fwrite($file_write, $block) === false)
3287 {
3288 Tools::log($this->l('Error while restoring files, unable to write file ').$new_file);
3289 fclose($file_write);
3290 fclose($file);
3291 return false;
3292 }
3293 }
3294
3295 //Close new file and apply rights and times
3296 fclose($file_write);
3297 touch($new_file, $header['mtime'], $header['mtime']);
3298 //chmod($new_file, $header['mode']);
3299 chmod($new_file, octdec($this->file_access_rights));
3300
3301 //Compute percentage progression
3302 $percent = ($done_size * 100) / $filesize;
3303 if ($percent >= $old_percent + 1)
3304 {
3305 $old_percent = round($percent, 0);
3306
3307 if ($total_part == 1) {
3308 if($percent >= 101)
3309 Tools::log($this->l('Restoring files : ').round($percent, 0).'%. '.$this->l('Backup file is big, progress is not accurate but everything is running well'));
3310 else
3311 Tools::log($this->l('Restoring files : ').round($percent, 0).'%');
3312 } else {
3313 if($percent >= 101)
3314 Tools::log($this->l('Restoring files : ').$nb_part.'/'.$total_part.' : '.round($percent, 0).'%. '.$this->l('Backup file is big, progress is not accurate but everything is running well'));
3315 else
3316 Tools::log($this->l('Restoring files : ').$nb_part.'/'.$total_part.' : '.round($percent, 0).'%');
3317 }
3318 }
3319 }
3320
3321 //Other typeflag are currently unsupported and ignored (not restored)
3322 //1 : Link to another file already archived
3323 //2 : Symbolic link
3324 //3 : Character special device
3325 //4 : Block special device
3326 //6 : FIFO special file
3327 //7 : Contiguous files
3328
3329 //Read next 512 bytes
3330 $block = fread($file, 512);
3331 }
3332 fclose($file);
3333 return true;
3334 }
3335}
3336
3337class Dbn
3338{
3339 private $pdo;
3340 private $error;
3341 private $t;
3342
3343 /**
3344 * __construct()
3345 *
3346 */
3347 public function __construct($translations)
3348 {
3349 $this->t = $translations;
3350 }
3351
3352 /**
3353 * Return the translation of text in the selected language
3354 *
3355 * @param string $text Text to translate
3356 * @return string Translated text
3357 */
3358 public function l($text)
3359 {
3360 if(isset($this->t[$text]))
3361 return $this->t[$text];
3362 return $text;
3363 }
3364
3365 /**
3366 * Connect to the database
3367 *
3368 * @param string $database Database name
3369 * @param string $user User
3370 * @param string $pass Password
3371 * @param string $host Host
3372 * @param string $port Port
3373 * @param string $engine PDO Driver (mysql, pgsql...)
3374 */
3375 public function connect($database, $user, $pass, $host = 'localhost', $port = '', $engine = 'mysql')
3376 {
3377 $this->initError();
3378
3379 $this->engine = $engine;
3380 $this->host = $host;
3381 $this->port = $port;
3382 $this->database = $database;
3383 $this->user = $user;
3384 $this->pass = $pass;
3385
3386 if ($this->engine == 'sqlite')
3387 $dns = 'sqlite:'.$this->database;
3388 else
3389 $dns = $this->engine.':dbname='.$this->database.';host='.$this->host;
3390 if ($this->port != '') $dns .= ';port='.$this->port;
3391
3392 try
3393 {
3394 $this->pdo = new PDO($dns, $this->user, $this->pass);
3395 }
3396 catch(PDOException $e)
3397 {
3398 //$this->setError($e);
3399 return false;
3400 }
3401
3402 return true;
3403 }
3404
3405 /**
3406 * Reconnect the database
3407 *
3408 * @return bool
3409 *
3410 */
3411 public function reconnect()
3412 {
3413 return $this->connect($this->database, $this->user, $this->pass, $this->host, $this->port, $this->engine);
3414 }
3415
3416 /**
3417 * Return the last error message
3418 *
3419 * @return string
3420 *
3421 */
3422 public function getError()
3423 {
3424 return $this->error;
3425 }
3426
3427 /**
3428 * Set error message
3429 *
3430 * @return void
3431 *
3432 */
3433 private function setError($messsage)
3434 {
3435 $this->error = $messsage;
3436 }
3437
3438 /**
3439 * Empty error message
3440 *
3441 * @return void
3442 *
3443 */
3444 private function initError()
3445 {
3446 $this->error = '';
3447 }
3448
3449 /**
3450 * Get PDO last error
3451 *
3452 * @return string
3453 *
3454 */
3455 private function getPDOError()
3456 {
3457 $error = $this->pdo->errorInfo();
3458 return $error[2];
3459 }
3460
3461 /**
3462 * Execute a request
3463 * Request params should be escaped with PDO::quote()
3464 *
3465 * @param string $request The request
3466 * @return bool
3467 *
3468 */
3469 public function exec($request)
3470 {
3471 $this->initError();
3472
3473 if ($this->pdo->exec($request) === false)
3474 {//Bad request
3475 $this->setError($this->l('Execution failed on :')."\n".$this->getPDOError().$this->l(' on request :')."\n".$request);
3476 return false;
3477 }
3478 return true;
3479 }
3480
3481 /**
3482 * Execute a query (select, show...) and return an array containing the result
3483 * Request params should be escaped with q()
3484 *
3485 * @param string $request The request
3486 * @return mixed False on error, result array on success
3487 *
3488 */
3489 public function query($request)
3490 {
3491 $this->initError();
3492
3493 $result = array();
3494 foreach (($res = $this->pdo->query($request)) as $row)
3495 $result[] = $row;
3496 if ($res === false)
3497 {
3498 $this->setError($this->l('Query failed on :')."\n".$this->getPDOError().$this->l(' on request :')."\n".$request);
3499 return false;
3500 }
3501 return $result;
3502 }
3503
3504 /**
3505 * Escape a value and quote it if necessary
3506 *
3507 * @param string $value Value to escape and quote if necessary
3508 * @return bool
3509 *
3510 */
3511 public function q($value)
3512 {
3513 if (is_int($value))
3514 return (int)$value;
3515 if (is_float($value))
3516 return (float)$value;
3517 if (is_bool($value) && $value)
3518 return 'true';
3519 if (is_bool($value) && !$value)
3520 return 'false';
3521 if (is_null($value))
3522 return 'null';
3523 return $this->pdo->quote($value, PDO::PARAM_STR);
3524 }
3525
3526 /**
3527 * Execute a SQL file
3528 *
3529 * @param string $sql_file_path SQL file path
3530 * @return bool
3531 *
3532 */
3533 public function restore($sql_file_path)
3534 {
3535 $this->initError();
3536
3537 //Verifying that SQL file exists
3538 if (!file_exists($sql_file_path))
3539 {
3540 $this->setError($this->l('No SQL file'));
3541 return false;
3542 }
3543
3544 //Gestion de l'UTF-8 par Mysql
3545 $this->pdo->exec("SET NAMES 'utf8'");
3546
3547 $total_lines = Tools::fileTotalLines($sql_file_path);
3548 $line_num = 0;
3549 $old_percent = 0;
3550
3551 $disable_no_auto_value_on_zero = (isset($_GET['disable_no_auto_value_on_zero']) && $_GET['disable_no_auto_value_on_zero'] == 'true') ? true : false;
3552
3553 //Open file in read mode
3554 if (($file = fopen($sql_file_path, 'r')) === false)
3555 {
3556 $this->setError($this->l('Unable to open SQL file'));
3557 return false;
3558 }
3559
3560 while (!feof($file))
3561 {//Read each line of the file
3562 $line_num++;
3563 if (($line = fgets($file)) === false)
3564 break;
3565
3566 if (substr(trim($line), 0, 2) != '--' && substr(trim($line), 0, 2) != '')
3567 {//This line is a request line
3568 $request = trim($line);
3569 while (!feof($file) && substr(trim($line), -1) != ';')
3570 {//Request not finished (no ; at the end of line)
3571 $line_num++; //To get a correct number
3572 if (($line = fgets($file)) === false)
3573 break;
3574 $request .= trim($line);
3575 }
3576
3577 if ($disable_no_auto_value_on_zero)
3578 {//Do not change sql mode
3579 if(strpos($request, 'NO_AUTO_VALUE_ON_ZERO') !== false || strpos($request, 'FOREIGN_KEY_CHECKS') !== false)
3580 continue;
3581 }
3582
3583 //Execute the request
3584 if ($this->pdo->exec($request) === false)
3585 {//Error
3586 if (strpos($this->getPDOError(), 'server has gone away') !== false)
3587 {//Maybe there was a timeout and get disconnected
3588 if (!$this->reconnect())
3589 {//Reconnection to database failed
3590 fclose($file);
3591 $this->setError($this->l('Restoration failed on line n°').$line_num." : \n".$this->getPDOError().$this->l(' on request : ')."\n".$request);
3592 return false;
3593 }
3594
3595 if ($this->pdo->exec($request) === false)
3596 {//Error again
3597 fclose($file);
3598 $this->setError($this->l('Restoration failed on line n°').$line_num." : \n".$this->getPDOError().$this->l(' on request : ')."\n".$request);
3599 return false;
3600 }
3601 }
3602 }
3603 }
3604
3605 //Compute percentage progression
3606 $percent = ($line_num * 100) / $total_lines;
3607 if ($percent >= $old_percent + 1)
3608 {
3609 $old_percent = round($percent, 0);
3610 Tools::log($this->l('Restoring database : ').round($percent, 0).'%');
3611 }
3612 }
3613 fclose($file);
3614 return true;
3615 }
3616}
3617
3618class Tools
3619{
3620 /**
3621 * fileWrite()
3622 *
3623 * Write a file
3624 *
3625 * @param string $path File path
3626 * @param string $content Content of the file
3627 * @param string $write_mode Write mode (r, r+, w, w+, a, a+, x, x+)
3628 * @return boolean True if file written
3629 *
3630 */
3631 public static function fileWrite($path, $content, $write_mode = 'w+')
3632 {
3633 self::directoryCreate(dirname($path));
3634
3635 if (!($file = fopen($path, $write_mode)))
3636 return false;
3637 if (!fwrite($file, $content))
3638 return false;
3639 if (!fclose($file))
3640 return false;
3641 return true;
3642 }
3643
3644 /**
3645 * directoryCreate()
3646 *
3647 * Create a directory and all its parents if necessary
3648 *
3649 * @param string $path Path of the folder
3650 * @param integer $rights Rights of the folder
3651 * @return boolean True if directory created
3652 *
3653 */
3654 public static function directoryCreate($path, $rights = 0777)
3655 {
3656 if (is_dir($path))
3657 return true;
3658
3659 if (!mkdir($path, $rights, true))
3660 return false;
3661
3662 return true;
3663 }
3664
3665 /**
3666 * fileDelete()
3667 *
3668 * Delete a file
3669 *
3670 * @param string $path Path of the file to delete
3671 * @return boolean
3672 *
3673 */
3674 public static function fileDelete($path)
3675 {
3676 if (is_file($path))
3677 return unlink($path);
3678 else
3679 return false;
3680 }
3681
3682 /**
3683 * Based on https://github.com/jkuchar/BigFileTools/blob/master/class/BigFileTools.php
3684 * Return file size (even for file > 2 Gb)
3685 *
3686 * @param string $path Path of the file
3687 * @param boolean $force_big_files True to disable php filesize detection. Will not work for files smaller than 2 GB.
3688 * @return mixed File size or false if error
3689 */
3690 public static function getFileSize($path, $force_big_files = false)
3691 {
3692 if (!file_exists($path))
3693 return false;
3694
3695 if (!$force_big_files)
3696 {
3697 $size = filesize($path);
3698 if ($size >= 0)
3699 return $size;
3700 }
3701
3702 if (!($file = fopen($path, 'rb')))
3703 return false;
3704
3705 flock($file, LOCK_SH);
3706 rewind($file);
3707 $offset = PHP_INT_MAX - 1;
3708 $size = (string)$offset;
3709 if (fseek($file, $offset) !== 0)
3710 {
3711 flock($file, LOCK_UN);
3712 fclose($file);
3713 return false;
3714 }
3715 $chunksize = 1024 * 1024;
3716 while (!feof($file))
3717 {
3718 $read = strlen(fread($file, $chunksize));
3719 $size = bcadd($size, $read);
3720 }
3721 flock($file, LOCK_UN);
3722 fclose($file);
3723 return $size;
3724 }
3725
3726 /**
3727 * Return file path with a trailing slash
3728 *
3729 * @param string $path File path
3730 * @return string The file path with a slash at its end
3731 */
3732 public static function trailingSlash($path)
3733 {
3734 if (!preg_match('/\/$/', $path))
3735 return $path.'/';
3736 return $path;
3737 }
3738
3739 /**
3740 * Log()
3741 *
3742 * Log message to file
3743 *
3744 * @param string $message Message to log
3745 * @return void
3746 *
3747 */
3748 public static function log($message)
3749 {
3750 if (ACTIVATE_LOG)
3751 self::fileWrite(LOG_FILE, date(LOG_DATE_FORMAT).' '.$message."\n", 'a+');
3752 self::fileWrite(LASTLOG_FILE, $message, 'w+');
3753 }
3754
3755 /**
3756 * Get lines count in a file
3757 *
3758 * @param string $path Path of the file
3759 * @return int Total lines
3760 *
3761 */
3762 public static function fileTotalLines($path)
3763 {
3764 if (!file_exists($path))
3765 return false;
3766
3767 $line_nb = 0;
3768 if (($file = fopen($path, 'r')) === false)
3769 return false;
3770
3771 //File is open for reading
3772 while (!feof($file))
3773 {//Read each line
3774 $line_nb++;
3775 if (fgets($file) === false)
3776 break;
3777 }
3778 fclose($file);
3779
3780 return $line_nb;
3781 }
3782
3783 /**
3784 * Get current directory URL
3785 *
3786 * @return string URL
3787 *
3788 */
3789 public static function currentDirectoryURL()
3790 {
3791 //Get complete script URL
3792 $url = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
3793 //Remove script name
3794 $slash = strrpos($url, '/');
3795 $url = substr($url, 0, $slash);
3796
3797 return $url;
3798 }
3799
3800 /**
3801 * Return 'true' or 'false' string
3802 *
3803 * @param boolean $value True or false value
3804 * @return string URL
3805 *
3806 */
3807 public static function tf($value)
3808 {
3809 if($value)
3810 return 'true';
3811 else
3812 return 'false';
3813 }
3814
3815 /**
3816 * Check IP address
3817 *
3818 * @param string $ip_ok Authorized IP
3819 * @return bool
3820 *
3821 */
3822 public static function check_ip($ip_ok)
3823 {
3824 $ip = self::ip();
3825
3826 if($ip === $ip_ok)
3827 return true;
3828 return false;
3829 }
3830
3831 /**
3832 * Get ip of the launcher of this script
3833 *
3834 * @return string IP
3835 */
3836 public static function ip()
3837 {
3838 if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
3839 return $_SERVER['HTTP_X_FORWARDED_FOR'];
3840 if(isset($_SERVER['HTTP_CLIENT_IP']))
3841 return $_SERVER['HTTP_CLIENT_IP'];
3842 return $_SERVER['REMOTE_ADDR'];
3843 }
3844
3845 /**
3846 * Display a maintenance page and die
3847 *
3848 * @param string $l Translation array
3849 * @return string IP
3850 */
3851 public static function display_maintenance_page($l)
3852 {
3853 die('<!doctype html>
3854 <html>
3855 <head>
3856 <title>'.self::l($l, 'Site Maintenance').'</title>
3857 <style>
3858 body { text-align: center; padding: 150px; }
3859 h1 { font-size: 50px; }
3860 body { font: 20px Helvetica, sans-serif; color: #333; }
3861 article { display: block; text-align: left; width: 800px; margin: 0 auto; }
3862 </style>
3863 </head>
3864 <body>
3865 <article>
3866 <h1>'.self::l($l, 'We will be back soon!').'</h1>
3867 <p>'.self::l($l, 'Sorry for the inconvenience but we are performing some maintenance at the moment.').'</p>
3868 </article>
3869 </body>
3870 </html>');
3871 }
3872
3873 /**
3874 * Return the translation of text in the selected language
3875 *
3876 * @param string $translations Translation texts
3877 * @param string $text Text to translate
3878 * @return string Translated text
3879 */
3880 public static function l($translations, $text)
3881 {
3882 if(isset($translations[$text]))
3883 return $translations[$text];
3884 return $text;
3885 }
3886}